From 2b84af9bed8f4b7da94a4bb85e7223d3b18e4fcb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 14 十二月 2019 23:03:26 +0800 Subject: [PATCH] 2019-12-14 --- src/templates/comtableconfig/index.jsx | 55 +++++++++++++++++++++++-------------------------------- 1 files changed, 23 insertions(+), 32 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 7ef6d02..75af4d9 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -1085,11 +1085,13 @@ } let _param = { + funcName: btn.innerFunc, name: _config.setting.tableName || '', - fields: fields + fields: fields, + menuNo: this.props.menu.MenuNo } LText = Utils.formatOptions(Utils.getfunc(_param)) - DelText = Utils.formatOptions(Utils.dropfunc(_param.name)) + DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName)) resolve(true) } else { resolve(false) @@ -1102,11 +1104,13 @@ }) } else { let _param = { + funcName: btn.innerFunc, name: _config.setting.tableName || '', - fields: '' + fields: '', + menuNo: this.props.menu.MenuNo } LText = Utils.formatOptions(Utils.getfunc(_param)) - DelText = Utils.formatOptions(Utils.dropfunc(_param.name)) + DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName)) resolve(true) } }).then(res => { @@ -1193,25 +1197,8 @@ } _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) - return Api.getSystemConfig(_param) - }).then(res => { - console.log(res) - if (res === false) return res - if (!res.status) { - notification.warning({ - top: 92, - message: res.message, - duration: 10 - }) - return false - } else { - notification.success({ - top: 92, - message: '鍒涘缓鎴愬姛', - duration: 5 - }) - } + return Api.getSystemConfig(_param) }).then(res => { console.log(res) if (res === false) return res @@ -1237,9 +1224,9 @@ let isupdate = false _config.action = _config.action.map(item => { - if (item.uuid === res.values.uuid) { + if (item.uuid === btn.uuid) { isupdate = true - return res.values + return btn } else { return item } @@ -1248,7 +1235,7 @@ if (!isupdate) { // 鎿嶄綔涓嶆槸淇敼锛屾坊鍔犲厓绱犺嚦鍒楄〃 - _config.action.push(res.values) + _config.action.push(btn) } let gridbtn = _config.action.filter(act => act.position === 'grid') @@ -1449,13 +1436,17 @@ const { config } = this.state new Promise(resolve => { // 鍐呴儴璇锋眰 - Api.getSystemConfig(param).then(response => { - if (response.status) { - resolve('true') - } else { - resolve(response) - } - }) + if (param.LText) { + Api.getSystemConfig(param).then(response => { + if (response.status) { + resolve('true') + } else { + resolve(response) + } + }) + } else { + resolve('true') + } }).then(res => { console.log(res) if (res === 'true' && this.state.delActions.length > 0) { -- Gitblit v1.8.0