From bf772e586c29b4858366dbad143b1eaeca3c46ed Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 四月 2020 10:18:09 +0800 Subject: [PATCH] 2020-04-17 --- src/templates/zshare/verifycard/index.jsx | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 42 insertions(+), 1 deletions(-) diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 396c41e..a4b935c 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -36,6 +36,7 @@ orderModularDetail: [], voucher: [], voucherDetail: [], + systemScripts: [], uniqueColumns: [ { title: '瀛楁鍚�', @@ -224,7 +225,13 @@ { title: 'SQL', dataIndex: 'sql', - width: '70%' + width: '60%' + }, + { + title: '鎵ц浣嶇疆', + dataIndex: 'position', + width: '10%', + render: (text, record) => record.position !== 'front' ? 'sql鍚�' : 'sql鍓�' }, { title: '鐘舵��', @@ -769,6 +776,39 @@ voucher: result[0].data, voucherDetail: result[1].data }) + }) + + let _scriptSql = `Select distinct func+Remark as funcname,longparam from聽s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end` + + _scriptSql = Utils.formatOptions(_scriptSql) + + let _sParam = { + func: 'sPC_Get_SelectedList', + LText: _scriptSql, + obj_name: 'data', + arr_field: 'funcname,longparam' + } + + _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' + _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) + + Api.getSystemConfig(_sParam).then(res => { + if (res.status) { + this.setState({ + systemScripts: res.data.map(item => { + return { + name: item.funcname, + value: Utils.formatOptions(item.longparam, true) + } + }) + }) + } else { + notification.warning({ + top: 92, + message: res.message, + duration: 10 + }) + } }) } @@ -1331,6 +1371,7 @@ usefulfields={this.state.usefulfields} initsql={this.state.initsql} dict={this.props.dict} + systemScripts={this.state.systemScripts} scriptsChange={this.scriptsChange} wrappedComponentRef={(inst) => this.scriptsForm = inst} /> -- Gitblit v1.8.0