From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 09 二月 2022 11:48:29 +0800 Subject: [PATCH] 2022-02-09 --- src/tabviews/custom/components/table/edit-table/index.jsx | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index 8080bbc..b594372 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -6,8 +6,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import zhCN from '@/locales/zh-CN/main.js' -import enUS from '@/locales/en-US/main.js' import UtilsDM from '@/utils/utils-datamanage.js' import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' @@ -29,7 +27,6 @@ } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, BID: '', // 涓婄骇ID BData: '', // 涓婄骇缁勪欢琛屾暟鎹� config: {}, // 椤甸潰閰嶇疆淇℃伅锛屽寘鎷寜閽�佹悳绱€�佹樉绀哄垪銆佹爣绛剧瓑 @@ -80,14 +77,15 @@ } _config.columns.forEach(item => { + if (item.type !== 'number') return _cols.set(item.field, item) }) _config.cols.forEach(column => { if (column.type === 'custom') { column.elements = column.elements.map(item => { - if (item.field && _cols.has(item.field)) { - item.col = _cols.get(item.field) + if (item.eleType === 'number' && item.field && _cols.has(item.field) && typeof(item.decimal) !== 'number') { + item.decimal = _cols.get(item.field).decimal || 0 } return item }) @@ -108,6 +106,7 @@ } this.setState({ + pageSize: setting.pageSize || 10, BID: BID || '', BData: BData || '', title: _config.wrap.title, @@ -373,7 +372,7 @@ const { setting } = this.state if (!setting.supModule || setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ pageIndex: 1, BID: id, @@ -478,10 +477,12 @@ /> <div className={'main-table-box ' + (!actions || actions.length === 0 ? 'no-action' : '')}> <MainTable + BID={BID} setting={setting} columns={columns} MenuID={config.uuid} data={this.state.data} + submit={config.submit} fields={config.columns} total={this.state.total} lineMarks={config.lineMarks} -- Gitblit v1.8.0