From 9e716f3bd30820a08757845b592db73363faa48c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 25 四月 2022 14:53:37 +0800 Subject: [PATCH] 2022-04-25 --- src/tabviews/subtabtable/index.jsx | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 63ebd78..9343c02 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -280,6 +280,8 @@ config.setting.selected = 'false' } else if (config.setting.selected === 'init' && config.setting.onload === 'false') { config.setting.selected = 'false' + } else { + config.setting.orisel = true } if (config.setting.controlField) { @@ -321,7 +323,7 @@ } } - loadData = () => { + loadData = (id) => { const { setting, search, hasReqFields, loadCustomApi } = this.state let searches = fromJS(search).toJS() @@ -356,10 +358,10 @@ this.loadOutResource(searches) if (setting.execType === 'async') { - this.loadmaindata() + this.loadmaindata(id) } } else { - this.loadmaindata() + this.loadmaindata(id) } } @@ -500,7 +502,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 @@ -534,7 +536,7 @@ /** * @description 瀛愯〃鏁版嵁鍔犺浇 */ - async loadmaindata () { + async loadmaindata (id) { const { BID } = this.props const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state @@ -557,9 +559,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'}}) @@ -578,6 +580,7 @@ } item.key = index item.$$uuid = item[setting.primaryKey] || '' + item.$$key = '' + item.key + item.$$uuid item.$$BID = BID || '' item.$Index = start + index + '' @@ -688,6 +691,7 @@ data = data.map(item => { if (item.$$uuid === _data.$$uuid) { _data.key = item.key + _data.$$key = '' + item.key + item.$$uuid _data.$Index = item.$Index return _data } else { @@ -760,17 +764,17 @@ /** * @description 琛ㄦ牸鍒锋柊 */ - reloadtable = (btn) => { + reloadtable = (btn, id) => { if (!btn || btn.resetPageIndex !== 'false') { MKEmitter.emit('resetTable', this.props.Tab.uuid) // 鍒楄〃閲嶇疆 this.setState({ pageIndex: 1 }, () => { - this.loadData() + this.loadData(id) }) } else { MKEmitter.emit('resetTable', this.props.Tab.uuid, 'false') // 鍒楄〃閲嶇疆 - this.loadData() + this.loadData(id) } } @@ -805,7 +809,7 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn, id, lines) => { + refreshByButtonResult = (menuId, position, btn, id = '', lines) => { const { MenuID } = this.props if (MenuID !== menuId) return @@ -813,7 +817,7 @@ if (position === 'line' && lines && lines.length === 1) { this.loadmainLinedata(lines[0].$$uuid) } else { - this.reloadtable(btn) + this.reloadtable(btn, id) } MKEmitter.emit('refreshPopButton', this.props.Tab.uuid) } -- Gitblit v1.8.0