From 3c6862fdfc6af3ae176436d2e22f1b7f8bcc8479 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 六月 2023 17:55:07 +0800 Subject: [PATCH] 2023-06-07 --- src/tabviews/custom/components/table/base-table/index.jsx | 41 ++++++++--------------------------------- 1 files changed, 8 insertions(+), 33 deletions(-) diff --git a/src/tabviews/custom/components/table/base-table/index.jsx b/src/tabviews/custom/components/table/base-table/index.jsx index f8f7454..9658a04 100644 --- a/src/tabviews/custom/components/table/base-table/index.jsx +++ b/src/tabviews/custom/components/table/base-table/index.jsx @@ -46,7 +46,6 @@ */ UNSAFE_componentWillMount () { let _config = fromJS(this.props.config).toJS() - let _cols = new Map() let BID = '' let BData = '' @@ -75,17 +74,6 @@ } else { setting.orisel = true } - - _config.columns.forEach(item => { - if (item.type !== 'number') return - _cols.set(item.field, item) - }) - - _config.cols.forEach(column => { - if (column.type === 'action') { - column.operations = column.elements - } - }) _config.style = _config.style || {} @@ -212,7 +200,7 @@ }) } if (setting.controlField) { - if (setting.controlVal.includes(item[setting.controlField])) { + if (setting.controlVal.includes(item[setting.controlField] + '')) { item.$disabled = true } } @@ -408,26 +396,13 @@ * 鍚湁鍒濆涓嶅姞杞界殑椤甸潰锛屼慨鏀硅缃� */ refreshbysearch = (searches) => { - const { setting } = this.state - - if (setting.onload === 'false') { - this.setState({ - pageIndex: 1, - search: searches, - setting: {...setting, onload: 'true'} - }, () => { - this.loadmaindata() - this.getStatFieldsValue() - }) - } else { - this.setState({ - pageIndex: 1, - search: searches - }, () => { - this.loadmaindata(true, 'true') - this.getStatFieldsValue() - }) - } + this.setState({ + pageIndex: 1, + search: searches + }, () => { + this.loadmaindata(true, 'true') + this.getStatFieldsValue() + }) } /** -- Gitblit v1.8.0