From e657b7ed2c047af4b54cbc26e5ac66cb7656dbb5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 十月 2022 12:13:05 +0800 Subject: [PATCH] 2022-10-12 --- src/menu/components/table/edit-table/columns/tableIn/index.jsx | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/index.jsx index 61698fb..69d1200 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx @@ -86,7 +86,7 @@ ) : ( <div> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> </div> ) @@ -139,7 +139,7 @@ ) : ( <div> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> </div> ) @@ -196,6 +196,17 @@ } componentDidMount () { + this.getsysScript() + } + + getsysScript = () => { + if (sessionStorage.getItem('mk_sys_scripts')) { + this.setState({ + systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts')) + }) + return + } + let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort 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 order by s.Sort` _scriptSql = Utils.formatOptions(_scriptSql) @@ -214,13 +225,17 @@ Api.getSystemConfig(_sParam).then(res => { if (res.status) { + let _scripts = res.data.map(item => { + return { + name: item.funcname, + value: window.decodeURIComponent(window.atob(item.longparam)) + } + }) + + sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts)) + this.setState({ - systemScripts: res.data.map(item => { - return { - name: item.funcname, - value: window.decodeURIComponent(window.atob(item.longparam)) - } - }) + systemScripts: _scripts }) } else { notification.warning({ -- Gitblit v1.8.0