From 140adf41ca32aafcbc1f0d32dace9da81aa5ef3f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 三月 2023 17:57:05 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/comtableconfig/index.jsx | 117 +++++++++++++++++++++++----------------------------------- 1 files changed, 47 insertions(+), 70 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 2f79d57..0a1e76b 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -380,7 +380,7 @@ } let _sort = 0 - let btntabs = [] + // let btntabs = [] let btnParam = { // 娣诲姞鑿滃崟鎸夐挳 func: 'sPC_Button_AddUpt', @@ -396,14 +396,14 @@ _config.action.forEach(item => { if (item.hidden === 'true') return _sort++ - if (item.OpenType === 'popview') { - btntabs.push({ - uuid: item.uuid, - linkTab: item.linkTab, - label: item.label, - sort: _sort - }) - } + // if (item.OpenType === 'popview') { + // btntabs.push({ + // uuid: item.uuid, + // linkTab: item.linkTab, + // label: item.label, + // sort: _sort + // }) + // } btnParam.LText.push(`select '${item.uuid}' as menuid, '${item.label}' as menuname, '${_sort * 10}' as Sort`) }) @@ -413,33 +413,33 @@ btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) - let tabParam = { // 娣诲姞鑿滃崟tab椤� - func: 'sPC_sMenusTab_AddUpt', - MenuID: menu.MenuID - } + // let tabParam = { // 娣诲姞鑿滃崟tab椤� + // func: 'sPC_sMenusTab_AddUpt', + // MenuID: menu.MenuID + // } - let _LText = [] + // let _LText = [] - btntabs.forEach(item => { - _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`) - }) - _config.tabgroups.forEach(group => { - group.sublist.forEach(item => { - _sort++ - _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`) - }) - }) + // btntabs.forEach(item => { + // _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`) + // }) + // _config.tabgroups.forEach(group => { + // group.sublist.forEach(item => { + // _sort++ + // _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`) + // }) + // }) - _LText = _LText.join(' union all ') + // _LText = _LText.join(' union all ') // 娓呯┖鑿滃崟涓嬪叧鑱旂殑鏍囩 - if (!_LText) { - _LText = `select '${menu.MenuID}' as MenuID ,'' as Tabid,'' as TabName ,'0' as Sort` - } + // if (!_LText) { + // _LText = `select '${menu.MenuID}' as MenuID ,'' as Tabid,'' as TabName ,'0' as Sort` + // } - tabParam.LText = Utils.formatOptions(_LText) - tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp) + // tabParam.LText = Utils.formatOptions(_LText) + // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp) let _vals = this.getFuncNames(_config) @@ -596,7 +596,7 @@ delete localParam.EasyCode delete localParam.open_edition - this.submitAction(btnParam, tabParam, localParam) + this.submitAction(btnParam, localParam) } else { this.setState({ menuloading: false, @@ -616,52 +616,29 @@ /** * @description 淇濆瓨鎴栦慨鏀硅彍鍗曟寜閽泦 */ - submitAction = (btnParam, tabParam, localParam) => { + submitAction = (btnParam, localParam) => { const { config } = this.state new Promise(resolve => { - let deffers = [] - - let defer = new Promise(resolve => { - Api.getSystemConfig(tabParam).then(result => { - resolve(result) - }) - }) - deffers.push(defer) - if (btnParam.LText) { - let defer = new Promise(resolve => { - Api.getSystemConfig(btnParam).then(result => { - if (result.status) { - this.setState({ // 淇濆瓨鎴愬姛鍚庢竻绌哄鍒跺垪琛� - copyActions: [] - }) - } + Api.getSystemConfig(btnParam).then(result => { + if (result.status) { + this.setState({ // 淇濆瓨鎴愬姛鍚庢竻绌哄鍒跺垪琛� + copyActions: [] + }) resolve(result) - }) - }) - deffers.push(defer) - } - - Promise.all(deffers).then(result => { - let error = false - result.forEach(res => { - if (!res.status) { - error = res + } else { + notification.warning({ + top: 92, + message: result.message, + duration: 5 + }) + resolve(false) } }) - - if (error) { - notification.warning({ - top: 92, - message: error.message, - duration: 5 - }) - resolve(false) - } else { - resolve(true) - } - }) + } else { + resolve(true) + } }).then(response => { if (response === false) return response -- Gitblit v1.8.0