| | |
| | | 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 |
| | |
| | | |
| | | 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 = [] |
| | |
| | | }) |
| | | } |
| | | |
| | | if (this.props.func) { |
| | | if (this.props.func && sessionStorage.getItem('UserID')) { |
| | | setTimeout(() => { |
| | | this.search(this.props.func) |
| | | }, 500) |
| | |
| | | |
| | | 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 = { |
| | |
| | | {!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> |