From ac3fc53f2c2f69690dbc0b7d5637624bb4457f73 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 25 三月 2022 23:05:18 +0800 Subject: [PATCH] 2022-03-25 --- src/tabviews/custom/components/form/tab-form/index.jsx | 2 src/tabviews/custom/components/card/table-card/index.jsx | 21 + src/tabviews/custom/components/card/prop-card/index.jsx | 21 + src/tabviews/custom/components/chart/antv-scatter/index.jsx | 20 + src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 21 + src/templates/zshare/formconfig.jsx | 12 src/menu/components/share/actioncomponent/formconfig.jsx | 16 src/tabviews/custom/components/table/normal-table/index.jsx | 34 ++- src/menu/components/card/balcony/options.jsx | 2 src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 21 + src/tabviews/custom/components/form/normal-form/index.jsx | 2 public/options.json | 30 +- src/tabviews/custom/components/carousel/data-card/index.jsx | 21 + src/tabviews/custom/components/table/edit-table/normalTable/index.scss | 2 src/tabviews/custom/components/table/edit-table/index.jsx | 34 ++- src/tabviews/custom/components/carousel/prop-card/index.jsx | 21 + src/tabviews/custom/index.jsx | 58 ++++- src/tabviews/custom/components/card/balcony/index.jsx | 37 ++- src/tabviews/subtable/index.jsx | 17 + src/tabviews/commontable/index.jsx | 1 src/tabviews/custom/components/chart/custom-chart/index.jsx | 21 + src/tabviews/custom/components/card/data-card/index.jsx | 80 +++++--- 22 files changed, 311 insertions(+), 183 deletions(-) diff --git a/public/options.json b/public/options.json index 792a858..7199de2 100644 --- a/public/options.json +++ b/public/options.json @@ -1,17 +1,17 @@ { - "appId": "202108312122504607B107A83F55B40C98CCF", - "appkey": "20210831212235413F287EC3BF489424496C8", - "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", - "systemType": "", - "externalDatabase": "false", - "lineColor": "", - "filter": "false", - "defaultApp": "mkindustry", - "defaultLang": "zh-CN", - "WXAppID": "", - "debugger": false, - "licenseKey": "7EFE13KIKLILIJB64C12", - "probation": "2021-12-31", - "host": "http://demo.mk9h.cn", - "service": "erp_new/" +"appId": "201912040924165801464FF1788654BC5AC73", +"appkey": "20191106103859640976D6E924E464D029CF0", +"mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", +"systemType": "", +"externalDatabase": "false", +"lineColor": "", +"filter": "false", +"defaultApp": "mk", +"defaultLang": "zh-CN", +"WXAppID": "", +"debugger": false, +"licenseKey": "", +"probation": "", +"host": "http://qingqiumarket.cn", +"service": "MKWMS/" } \ No newline at end of file diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx index 5adf31f..1308685 100644 --- a/src/menu/components/card/balcony/options.jsx +++ b/src/menu/components/card/balcony/options.jsx @@ -57,7 +57,7 @@ field: 'linkType', label: '鍙楁帶绫诲瀷', initval: wrap.linkType || 'static', - tooltip: '缁勪欢涓庡叾浠栫粍浠朵箣闂寸殑鎺у埗绫诲瀷锛岀嫭绔嬭〃绀轰笌鍏朵粬娌℃湁鍏宠仈銆�', + tooltip: '缁勪欢涓庡叾浠栫粍浠朵箣闂寸殑鎺у埗绫诲瀷锛岀嫭绔嬬被鍨嬭〃绀轰笌鍏朵粬缁勪欢娌℃湁鍏宠仈锛屽悓姝ョ被鍨嬩腑鍏紡涓庢寜閽瘮杈冪壒娈婏紝鎿嶄綔鏁版嵁涓哄叾鍚屾缁勪欢鐨勬暟鎹��', required: false, options: [ {value: 'static', label: '鐙珛'}, diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 36d5a74..23e93bf 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -402,17 +402,17 @@ key: 'execSuccess', label: Formdict['model.form.afterSuccess'], initVal: card.execSuccess || 'grid', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', required: true, options: [{ value: 'never', text: Formdict['header.form.refresh.never'] }, { - value: 'grid', - text: '鍒锋柊褰撳墠缁勪欢' - }, { value: 'line', text: '鍒锋柊琛�' + }, { + value: 'grid', + text: '鍒锋柊褰撳墠缁勪欢' }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' @@ -427,18 +427,18 @@ key: 'execError', label: Formdict['model.form.afterError'], initVal: card.execError || 'never', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��', required: true, options: [{ value: 'never', text: Formdict['header.form.refresh.never'] }, { - value: 'grid', - text: '鍒锋柊褰撳墠缁勪欢' - }, { value: 'line', text: '鍒锋柊琛�' }, { + value: 'grid', + text: '鍒锋柊褰撳墠缁勪欢' + }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' }, diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 3f673dc..2ab0cd1 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -1023,7 +1023,6 @@ const { MenuID } = this.props if (MenuID !== menuId) return - if (id === 'empty') return if (id === 'formtab') { // 琛ㄥ崟鏍囩椤靛埛鏂� this.reloadtable(btn) diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index 2383819..fb01441 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -205,30 +205,35 @@ * @param {*} position // 鍒锋柊浣嶇疆 * @param {*} btn // 鎵ц鐨勬寜閽� */ - refreshByButtonResult = (menuId, position, btn) => { + refreshByButtonResult = (menuId, position, btn, id, lines) => { const { config, BID, syncConfig } = this.state if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 - - let supModule = config.wrap.supModule - if (syncConfig) { - supModule = syncConfig.setting.supModule + MKEmitter.emit('refreshByButtonResult', syncConfig.uuid, position, btn, id, lines) - MKEmitter.emit('refreshByButtonResult', syncConfig.uuid, position, btn) - } + this.loadData() + } else { + let supModule = config.wrap.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 - } + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) - if (position === 'mainline' && supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - supModule && MKEmitter.emit('reloadData', supModule, (BID || 'empty')) - btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } + } + + if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 + btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) + } } } diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 66a25b5..c13c422 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -268,27 +268,14 @@ if (config.uuid !== menuId) return - if (position === 'line' && lines && lines.length === 1) { - this.loadLinedata(lines[0].$$uuid) - } else if (!btn || btn.resetPageIndex !== 'false') { - this.setState({ - pageIndex: 1 - }, () => { - this.loadData() - }) - } else { - this.loadData() - } - - if (supComs) { - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && !supComs.includes(btn.syncComponentId)) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 - } - - if (position === 'mainline' || position === 'popclose') { // 涓昏〃琛屽埛鏂� + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (position === 'mainline' || position === 'popclose') { // 涓昏〃鍒锋柊锛屽幓闄ゅ悓姝ュ埛鏂扮粍浠� let supNode = supNodes[supNodes.length - 1] supComs.forEach((item, i) => { + if (item === btn.syncComponentId) return + setTimeout(() => { if (supNode && supNode.key === item) { MKEmitter.emit('reloadData', item, supNode.value) @@ -297,21 +284,55 @@ } }, i * 10) }) - if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) + } else if (!btn.syncComponentId || !supComs.includes(btn.syncComponentId)) { + if (position === 'line') { + if (lines && lines.length === 1) { + this.loadLinedata(lines[0].$$uuid) + } else { + this.loadData() + } + } else if (!btn || btn.resetPageIndex !== 'false') { + this.setState({ + pageIndex: 1 + }, () => { + this.loadData() + }) + } else { + this.loadData() } } } else { - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + let supModule = config.setting.supModule + + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'line') { + if (lines && lines.length === 1) { + this.loadLinedata(lines[0].$$uuid) + } else { + this.loadData() + } + } else if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else if (!btn || btn.resetPageIndex !== 'false') { + this.setState({ + pageIndex: 1 + }, () => { + this.loadData() + }) + } else { + this.loadData() + } } - - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) - } + } + + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 + btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } @@ -377,7 +398,6 @@ const { config } = this.state if (config.uuid !== menuId) return - if (id === 'empty') return if (!id) { this.loadData() diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index a639f5f..fded714 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -270,16 +270,23 @@ if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index 723ca1f..845703f 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -169,16 +169,23 @@ if (config.uuid !== menuId) return - this.loadData(btn) // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx index 78d7fdd..9fe7608 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.jsx +++ b/src/tabviews/custom/components/carousel/data-card/index.jsx @@ -151,16 +151,23 @@ if (config.uuid !== menuId) return - this.loadData(btn) // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index 22a2df9..34f0eb3 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -150,16 +150,23 @@ if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index 2680b42..ec50a3b 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -441,16 +441,23 @@ if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx index f5a5c3f..e4d43c3 100644 --- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx +++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx @@ -184,14 +184,24 @@ if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 + btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx index f84f163..41cc2ac 100644 --- a/src/tabviews/custom/components/chart/custom-chart/index.jsx +++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx @@ -179,16 +179,23 @@ if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx index 6876ca4..6c75291 100644 --- a/src/tabviews/custom/components/form/normal-form/index.jsx +++ b/src/tabviews/custom/components/form/normal-form/index.jsx @@ -201,7 +201,7 @@ if (group.uuid !== menuId) return - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { + if (btn.syncComponentId && btn.syncComponentId !== config.setting.supModule) { MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 } diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index c2fb8c6..d5880a3 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -184,7 +184,7 @@ if (group.uuid !== menuId) return - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { + if (btn.syncComponentId && btn.syncComponentId !== config.setting.supModule) { MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 } diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index 2ee936f..613acf2 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -489,7 +489,6 @@ const { config } = this.state if (config.uuid !== menuId) return - if (id === 'empty') return if (!id) { this.reloadtable() @@ -525,20 +524,29 @@ if (config.uuid !== menuId) return - if (position === 'line' && lines && lines.length === 1) { - this.loadmainLinedata(lines[0].$$uuid) - } else { - this.reloadtable(btn) // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule + + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'line') { + if (lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else { + this.reloadtable(btn) + } + } else if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.reloadtable(btn) + } + } else { + this.reloadtable(btn) + } } - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 - } - - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss index dcfc772..9e0ddc1 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss @@ -204,6 +204,7 @@ .editing_all_table_cell { .ant-input { border-radius: 0; + padding: 4px 5px; } .ant-select { width: 100%; @@ -219,6 +220,7 @@ } .ant-input-number-input { border-radius: 0; + padding: 4px 5px; } } .anticon-exclamation-circle { diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index e5aff36..6f3ec15 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -503,7 +503,6 @@ const { config } = this.state if (config.uuid !== menuId) return - if (id === 'empty') return if (!id) { this.reloadtable() @@ -539,20 +538,29 @@ if (config.uuid !== menuId) return - if (position === 'line' && lines && lines.length === 1) { - this.loadmainLinedata(lines[0].$$uuid) - } else { - this.reloadtable(btn) // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule + + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'line') { + if (lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else { + this.reloadtable(btn) + } + } else if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.reloadtable(btn) + } + } else { + this.reloadtable(btn) + } } - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 - } - - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index 864e357..c3353c1 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -158,16 +158,23 @@ if (config.uuid !== menuId) return - this.loadData(btn) // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 614ad03..3e41197 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -523,6 +523,23 @@ } } + if (item.wrap && item.wrap.supType === 'multi') { // 鏁版嵁鍗″涓婄骇缁勪欢 + if (item.supNodes && item.supNodes[0]) { + item.setting.supModule = item.supNodes[0].componentId + } else { + item.wrap.supType = 'single' + item.supNodes = null + item.setting.supModule = '' + } + } else if (item.setting && item.setting.supModule) { + let pid = item.setting.supModule.pop() + if (pid && pid !== 'empty') { + item.setting.supModule = pid + } else { + item.setting.supModule = '' + } + } + // 鎼滅储鏉′欢鍒濆鍖� if (item.search && item.search.length > 0) { item.search = Utils.initSearchVal(item.search) @@ -584,6 +601,10 @@ cell.$tabId = tabId cell.$view = 'CustomPage' + if (cell.syncComponentId === item.uuid) { + cell.syncComponentId = '' + } + if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) } @@ -619,6 +640,10 @@ cell.$tabId = tabId cell.$view = 'CustomPage' + if (cell.syncComponentId === item.uuid) { + cell.syncComponentId = '' + } + if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) } @@ -642,6 +667,10 @@ cell.$MenuID = this.props.MenuID cell.$tabId = tabId cell.$view = 'CustomPage' + + if (cell.syncComponentId === item.uuid) { + cell.syncComponentId = '' + } if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) @@ -671,6 +700,10 @@ cell.$tabId = tabId cell.$view = 'CustomPage' + if (cell.syncComponentId === item.uuid) { + cell.syncComponentId = '' + } + if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) } @@ -693,6 +726,10 @@ cell.$MenuID = this.props.MenuID cell.$tabId = tabId cell.$view = 'CustomPage' + + if (cell.syncComponentId === item.uuid) { + cell.syncComponentId = '' + } if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) @@ -720,6 +757,10 @@ cell.$tabId = tabId cell.$view = 'CustomPage' + if (cell.syncComponentId === item.uuid) { + cell.syncComponentId = '' + } + if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 鎵撳嵃鏈鸿缃� cell = this.getPrinter(cell, item.uuid) } @@ -737,23 +778,6 @@ if (item.subtype === 'editable') { item.submit.logLabel = item.$menuname + '-鎻愪氦' item.submit.$menuId = item.uuid - } - } - - if (item.wrap && item.wrap.supType === 'multi') { // 鏁版嵁鍗″涓婄骇缁勪欢 - if (item.supNodes && item.supNodes[0]) { - item.setting.supModule = item.supNodes[0].componentId - } else { - item.wrap.supType = 'single' - item.supNodes = null - item.setting.supModule = '' - } - } else if (item.setting && item.setting.supModule) { - let pid = item.setting.supModule.pop() - if (pid && pid !== 'empty') { - item.setting.supModule = pid - } else { - item.setting.supModule = '' } } diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 074d6c0..434ca1b 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -892,7 +892,6 @@ const { MenuID } = this.props if (menuId.indexOf(MenuID) === -1) return - if (id === 'empty') return if (!id) { this.reloadtable() @@ -915,16 +914,20 @@ const { Tab, SupMenuID } = this.props const { BID } = this.state - if (position === 'line' && lines && lines.length === 1) { - this.loadmainLinedata(lines[0].$$uuid) + if (position === 'line') { + if (lines && lines.length === 1) { + this.loadmainLinedata(lines[0].$$uuid) + } else { + this.reloadtable(btn) + } } else if (position === 'grid' || position === 'view') { this.reloadtable(btn) } else if (position === 'maingrid' || position === 'mainline') { this.reloadtable(btn) - if (Tab.supMenu) { - MKEmitter.emit('reloadData', Tab.supMenu, (BID || 'empty')) // 涓昏〃閲嶇疆 - } else if (!Tab.supMenu && Tab.level === 0) { - MKEmitter.emit('reloadData', SupMenuID, (BID || 'empty')) // 鏍戝舰缁撴瀯锛�0绾ф爣绛� + if (Tab.supMenu && BID) { + MKEmitter.emit('reloadData', Tab.supMenu, BID) // 涓昏〃閲嶇疆 + } else if (!Tab.supMenu && Tab.level === 0 && BID) { + MKEmitter.emit('reloadData', SupMenuID, BID) // 鏍戝舰缁撴瀯锛�0绾ф爣绛� } } else if (position === 'equaltab') { this.reloadtable(btn) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index c8e030c..1cb6393 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1204,11 +1204,11 @@ value: 'never', text: '涓嶅埛鏂�' }, { - value: 'grid', - text: '鍒锋柊琛ㄦ牸' - }, { value: 'line', text: '鍒锋柊琛�' + }, { + value: 'grid', + text: '鍒锋柊琛ㄦ牸' }, ...refresh] }, @@ -1223,11 +1223,11 @@ value: 'never', text: '涓嶅埛鏂�' }, { - value: 'grid', - text: '鍒锋柊琛ㄦ牸' - }, { value: 'line', text: '鍒锋柊琛�' + }, { + value: 'grid', + text: '鍒锋柊琛ㄦ牸' }, ...refresh] }, -- Gitblit v1.8.0