From a0a285c90987eb9b1591f90333f3aeb15659ded2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 一月 2020 19:04:57 +0800 Subject: [PATCH] 2020-01-17 --- src/tabviews/commontable/index.jsx | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index d099e40..14b1a3a 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -187,7 +187,7 @@ }, () => { this.improveSearch() - if (config.setting.onload !== 'false') { + if (config.setting.onload !== 'false') { // 鍒濆鍖栧彲鍔犺浇 this.loadmaindata() } }) @@ -318,6 +318,10 @@ this.handleTableId('mainTable', '') + if (!param) { // 鏈幏鍙栧弬鏁版椂锛屼笉鍙戣姹� + return + } + let result = await Api.genericInterface(param) if (result.status) { this.setState({ @@ -378,6 +382,15 @@ getDefaultParam = () => { const { arr_field, pageIndex, pageSize, orderColumn, orderType, search, setting } = this.state + if (!arr_field) { + notification.warning({ + top: 92, + message: '鏈缃樉绀哄垪锛�', + duration: 10 + }) + return null + } + let _search = Utils.joinMainSearchkey(search) _search = _search ? 'where ' + _search : '' -- Gitblit v1.8.0