From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 四月 2022 19:23:18 +0800 Subject: [PATCH] 2022-04-26 --- src/tabviews/commontable/index.jsx | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index c11195d..3b32650 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -386,6 +386,8 @@ config.setting.selected = 'false' } else if (config.setting.selected === 'init' && config.setting.onload === 'false') { config.setting.selected = 'false' + } else { + config.setting.orisel = true } let autoMatic = null @@ -485,7 +487,7 @@ } } - loadData = () => { + loadData = (id) => { const { MenuID } = this.props const { setting, search, loadCustomApi, hasReqFields, ContainerId } = this.state @@ -521,10 +523,10 @@ this.loadOutResource() if (setting.execType === 'async') { - this.loadmaindata() + this.loadmaindata(id) } } else { - this.loadmaindata() + this.loadmaindata(id) } } @@ -664,7 +666,7 @@ Sort: index + 1 })) - if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { + if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { let sql = lines.map(item => (` ${item.insert} ${item.selects.join(` union all @@ -698,7 +700,7 @@ /** * @description 涓昏〃鏁版嵁鍔犺浇 */ - async loadmaindata () { + async loadmaindata (id) { const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields, autoMatic } = this.state this.setState({ @@ -718,9 +720,9 @@ start = pageSize * (pageIndex - 1) + 1 } - if (setting.selected !== 'false') { + if (setting.selected !== 'false' || (setting.orisel && id)) { setTimeout(() => { - MKEmitter.emit('mkTableCheckTopLine', this.props.MenuID) + MKEmitter.emit('mkTableCheckTopLine', this.props.MenuID, id) }, 200) if (setting.selected === 'init') { this.setState({setting: {...setting, selected: 'false'}}) @@ -952,17 +954,17 @@ /** * @description 琛ㄦ牸鍒锋柊 */ - reloadtable = (btn) => { + reloadtable = (btn, id = '') => { if (!btn || btn.resetPageIndex !== 'false') { MKEmitter.emit('resetTable', this.props.MenuID) // 鍒楄〃閲嶇疆 this.setState({ pageIndex: 1 }, () => { - this.loadData() + this.loadData(id) }) } else { MKEmitter.emit('resetTable', this.props.MenuID, 'false') // 鍒楄〃閲嶇疆 - this.loadData() + this.loadData(id) } } @@ -1023,7 +1025,6 @@ const { MenuID } = this.props if (MenuID !== menuId) return - if (id === 'empty') return if (id === 'formtab') { // 琛ㄥ崟鏍囩椤靛埛鏂� this.reloadtable(btn) @@ -1079,7 +1080,7 @@ if (position === 'line' && lines && lines.length === 1) { this.loadmainLinedata(lines[0].$$uuid) } else { - this.reloadtable(btn) + this.reloadtable(btn, id) } } -- Gitblit v1.8.0