From d1cd5af5adb53e91efdd278328e1b6f8ad834fb5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 06 二月 2025 21:11:56 +0800 Subject: [PATCH] Merge branch 'positec' into dms --- src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 71 ++++++++++++++++++++++------------- 1 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 9986355..7931f0e 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -259,12 +259,8 @@ let _sheet = this.props.card.sheet - if (window.GLOB.externalDatabase !== null) { - _sheet = _sheet.replace(/@db@/ig, window.GLOB.externalDatabase) - } - - let database = _sheet.match(/(.*)\.(.*)\./ig) - let sheet = _sheet.replace(/(.*)\.(.*)\./ig, '') + let database = _sheet.match(/(.*)\.(.*)\.|@db@/ig) || '' + let sheet = _sheet.replace(/(.*)\.(.*)\.|@db@/ig, '') database = database ? (database[0] || '') : '' @@ -403,6 +399,16 @@ _verify.columns = _columns _verify.scripts = _verify.scripts || [] _verify.uniques = _verify.uniques || [] + + if (window.GLOB.process && card.intertype === 'system') { + _verify.workFlow = _verify.workFlow || 'false' + _verify.flowType = 'start' + _verify.flowSql = _verify.flowSql || 'true' + } else { + delete _verify.workFlow + delete _verify.flowType + delete _verify.flowSql + } this.setState({ searchKey: '', @@ -590,18 +596,18 @@ clearField = () => { const { verify } = this.state - const _this = this + const that = this confirm({ content: `纭畾娓呯┖Excel鍒楀悧锛焋, onOk() { - _this.setState({ + that.setState({ verify: { ...verify, columns: [] } }, () => { - _this.resetUniqueColumns() + that.resetUniqueColumns() }) }, onCancel() {} @@ -611,8 +617,8 @@ columnChange = (values, callback) => { let verify = JSON.parse(JSON.stringify(this.state.verify)) - let fields = verify.columns.map(item => item.Column) - if (fields.includes(values.Column)) { + let fields = verify.columns.map(item => item.Column.toLowerCase()) + if (fields.includes(values.Column.toLowerCase())) { notification.warning({ top: 92, message: values.Column + '瀛楁宸插瓨鍦紒', @@ -879,21 +885,11 @@ }) } - onOptionChange = (e) => { + onOptionChange = (value, key) => { const { verify } = this.state - let value = e.target.value this.setState({ - verify: {...verify, default: value} - }) - } - - onHandleChange = (e) => { - const { verify } = this.state - let value = e.target.value - - this.setState({ - verify: {...verify, excelHandle: value} + verify: {...verify, [key]: value} }) } @@ -975,8 +971,8 @@ <Form {...formItemLayout}> <Row gutter={24}> {card.intertype === 'system' ? <Col span={8}> - <Form.Item label={'榛樿sql'}> - <Radio.Group value={verify.default} onChange={this.onOptionChange}> + <Form.Item label="榛樿sql"> + <Radio.Group value={verify.default} onChange={(e) => this.onOptionChange(e.target.value, 'default')}> <Radio value="true">鎵ц</Radio> <Radio value="false">涓嶆墽琛�</Radio> </Radio.Group> @@ -992,7 +988,7 @@ {getFieldDecorator('excelHandle', { initialValue: verify.excelHandle })( - <Radio.Group onChange={this.onHandleChange}> + <Radio.Group onChange={(e) => this.onOptionChange(e.target.value, 'excelHandle')}> <Radio value="false">榛樿</Radio> <Radio value="true">鑷畾涔�</Radio> </Radio.Group>)} @@ -1041,6 +1037,27 @@ })(<CodeMirror mode="text/javascript" theme="cobalt" />)} </Form.Item> </Col> : null} + {window.GLOB.process && card.intertype === 'system' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="瀵煎叆Excel宸ヤ綔娴佷粎鏀寔鍙戣捣娴佺▼銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 宸ヤ綔娴� + </Tooltip> + }> + <Radio.Group value={verify.workFlow} onChange={(e) => {this.onOptionChange(e.target.value, 'workFlow')}}> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">涓嶅紑鍚�</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + {verify.workFlow === 'true' ? <Col span={8}> + <Form.Item label="榛樿sql锛堝伐浣滄祦锛�"> + <Radio.Group value={verify.flowSql} onChange={(e) => {this.onOptionChange(e.target.value, 'flowSql')}}> + <Radio value="true">鎵ц</Radio> + <Radio value="false">涓嶆墽琛�</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} </Row> </Form> </TabPane> @@ -1087,6 +1104,7 @@ btn={this.props.card} usefulfields={verify.columns} scripts={verify.scripts} + workFlow={verify.workFlow} systemScripts={this.state.systemScripts} scriptsChange={this.scriptsChange} wrappedComponentRef={(inst) => this.scriptsFullForm = inst} @@ -1096,6 +1114,7 @@ btn={this.props.card} usefulfields={verify.columns} scripts={verify.scripts} + workFlow={verify.workFlow} systemScripts={this.state.systemScripts} scriptsChange={this.scriptsChange} wrappedComponentRef={(inst) => this.scriptsForm = inst} -- Gitblit v1.8.0