From b8cde0c39d7b6d58ceff3adf6dea3cb3118ea602 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 九月 2022 14:46:15 +0800 Subject: [PATCH] 2022-09-13 --- src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index a54097c..8b00a43 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -28,6 +28,7 @@ } state = { + wrapId: Utils.getuuid(), editItem: null, loading: false, usefulFields: '', @@ -70,13 +71,13 @@ render: (text, record) => record.status === 'false' ? ( <div style={{color: '#ff4d4f'}}> - {this.props.dict['model.status.forbidden']} + 绂佺敤 <StopOutlined style={{marginLeft: '5px'}} /> </div> ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -289,12 +290,14 @@ exec_type: 'y', LText: SettingUtils.getCustomDebugSql(_scripts, this.props.regoptions) } - param.LText = Utils.formatOptions(param.LText) + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + param.LText = Utils.formatOptions(param.LText) param.secretkey = Utils.encrypt('', param.timestamp) this.setState({loading: true}) - Api.getLocalConfig(param).then(result => { + Api.genericInterface(param).then(result => { if (result.status) { this.setState({ loading: false, @@ -356,7 +359,7 @@ } scrolltop = () => { - let node = document.getElementById('model-setting-form-body').parentNode + let node = document.getElementById(this.state.wrapId).parentNode if (node && node.scrollTop) { let inter = Math.ceil(node.scrollTop / 10) @@ -404,7 +407,7 @@ render() { const { setting, scripts } = this.props const { getFieldDecorator } = this.props.form - const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state + const { usefulFields, scriptsColumns, systemScripts, urlFields, wrapId } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -417,7 +420,7 @@ } return ( - <div className="modal-menu-setting-script"> + <div className="modal-menu-setting-script" id={wrapId}> <Form {...formItemLayout}> <Row gutter={24}> <Col span={4}> -- Gitblit v1.8.0