From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/views/systemproc/proc/index.jsx | 31 ++++++++++++++++++++++--------- 1 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/views/systemproc/proc/index.jsx b/src/views/systemproc/proc/index.jsx index 6f13864..100a0ff 100644 --- a/src/views/systemproc/proc/index.jsx +++ b/src/views/systemproc/proc/index.jsx @@ -6,6 +6,7 @@ import Utils from '@/utils/utils.js' import Api from '@/api' import CodeMirror from '@/templates/zshare/codemirror' +import Transfer from '../transfer' import './index.scss' const { confirm } = Modal @@ -13,7 +14,7 @@ class ProcControl extends Component { state = { - procName: '', + procName: this.props.func || '', content: '', loading: false, visible: false, @@ -24,9 +25,12 @@ } componentDidMount () { + sessionStorage.setItem('User_Name', sessionStorage.getItem('CloudUserName')) + sessionStorage.setItem('Full_Name', sessionStorage.getItem('CloudFullName')) + if (sessionStorage.getItem('permFuncField')) { this.setState({permFuncs: JSON.parse(sessionStorage.getItem('permFuncField'))}) - } else { + } else if (sessionStorage.getItem('UserID')) { Api.getCloudConfig({func: 'sPC_Get_Roles_sModular'}).then(res => { if (res.status) { let _permFuncs = [] @@ -53,6 +57,12 @@ }) } }) + } + + if (this.props.func && sessionStorage.getItem('UserID')) { + setTimeout(() => { + this.search(this.props.func) + }, 500) } } @@ -108,7 +118,8 @@ {key: 'alter', reg: /(^|\s)alter\s/ig}, {key: 'object', reg: /(^|\s)object(\s|\()/ig}, {key: 'kill', reg: /(^|\s)kill\s/ig}, - {key: '--', reg: /--/ig} + {key: '--', reg: /--/ig}, + {key: ',,', reg: /,,/ig} ] let error = '' @@ -151,23 +162,24 @@ let dropParam = { func: 'sPC_TableData_InUpDe', - LText: Utils.formatOptions(dropfunc), + LText: Utils.formatOptions(dropfunc, window.GLOB.execType || 'y'), + exec_type: window.GLOB.execType || 'y', TypeCharOne: 'proc' // 鍒犻櫎瀛樺偍杩囩▼ } dropParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - dropParam.secretkey = Utils.encrypt(dropParam.LText, dropParam.timestamp) + dropParam.secretkey = Utils.encrypt('', dropParam.timestamp) dropParam.open_key = Utils.encryptOpenKey(dropParam.secretkey, dropParam.timestamp) - let createParam = { func: 'sPC_TableData_InUpDe', - LText: Utils.formatOptions(createfunc), + LText: Utils.formatOptions(createfunc, window.GLOB.execType || 'y'), + exec_type: window.GLOB.execType || 'y', TypeCharOne: 'proc' // 鍒涘缓瀛樺偍杩囩▼ } createParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - createParam.secretkey = Utils.encrypt(createParam.LText, createParam.timestamp) + createParam.secretkey = Utils.encrypt('', createParam.timestamp) createParam.open_key = Utils.encryptOpenKey(createParam.secretkey, createParam.timestamp) let saveParam = { @@ -370,13 +382,14 @@ {!inputing ? <Search placeholder="璇疯緭鍏ュ瓨鍌ㄨ繃绋嬪悕绉�" defaultValue={procName} disabled={loading} enterButton="纭畾" onSearch={this.search}/> : null} </div> <div className="action-wrap"> + {!procName || loading || !content ? null : <Transfer procName={procName} content={content} />} <Button key="save" className="mk-btn mk-green" disabled={loading} onClick={() => this.save()}>淇濆瓨</Button> <Button key="prev" className="mk-btn mk-primary" disabled={!procName || loading} onClick={this.prev}>涓婁竴鐗堟湰</Button> <Button key="next" className="mk-btn mk-primary" disabled={!procName || loading} onClick={this.next}>涓嬩竴鐗堟湰</Button> </div> </div> <div className="edit-wrap"> - <CodeMirror value={content} onChange={(val) => this.setState({content: val})}/> + <CodeMirror value={content} func={true} onChange={(val) => this.setState({content: val})}/> </div> </div> <Modal -- Gitblit v1.8.0