From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx | 61 ++++++++++++++++++++++++------ 1 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx index ef1f4cc..c07d5f6 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, Tooltip, Icon, notification } from 'antd' +import { Form, Row, Col, Input, Radio, Tooltip, notification } from 'antd' +import { QuestionCircleOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -13,7 +14,6 @@ static propTpyes = { dict: PropTypes.object, // 瀛楀吀椤� menuId: PropTypes.string, // 鑿滃崟Id - permFuncField: PropTypes.any, // 鑿滃崟Id setting: PropTypes.object, // 鏁版嵁婧愰厤缃� columns: PropTypes.array, // 鍒楄缃� scripts: PropTypes.array, // 鑷畾涔夎剼鏈� @@ -21,6 +21,24 @@ state = { interType: this.props.setting.interType || 'system', + usefulFields: [] + } + + UNSAFE_componentWillMount() { + let usefulFields = sessionStorage.getItem('permFuncField') + if (usefulFields) { + try { + usefulFields = JSON.parse(usefulFields) + } catch (e) { + usefulFields = [] + } + } else { + usefulFields = [] + } + + this.setState({ + usefulFields + }) } handleConfirm = () => { @@ -33,7 +51,7 @@ if (values.interType === 'system' && values.execute !== 'false' && !values.dataresource) { notification.warning({ top: 92, - message: '璇峰~鍐欏唴閮ㄥ嚱鏁版垨鏁版嵁婧愶紒', + message: '璇峰~鍐欐暟鎹簮锛�', duration: 5 }) reject() @@ -98,7 +116,7 @@ } param.LText = Utils.formatOptions(param.LText) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) Api.getLocalConfig(param) @@ -123,9 +141,9 @@ } render() { - const { setting, permFuncField } = this.props + const { setting } = this.props const { getFieldDecorator } = this.props.form - const { interType } = this.state + const { interType, usefulFields } = this.state const formItemLayout = { labelCol: { @@ -141,12 +159,15 @@ let tooltip = null let rules = [] - if (permFuncField && permFuncField.length > 0) { - tooltip = '寮�澶村彲鐢ㄥ瓧绗︼細' + permFuncField.join(', ') - let str = '^(' + permFuncField.join('|') + ')' + if (usefulFields.length > 0) { + tooltip = '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', ') + let str = '^(' + usefulFields.join('|') + ')' let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g') rules.push({ + required: true, + message: this.props.dict['form.required.input'] + '鍐呴儴鍑芥暟!' + }, { pattern: _patten, message: formRule.func.innerMessage }) @@ -165,6 +186,10 @@ required: true, message: this.props.dict['form.required.input'] + '琛ㄥ悕!' }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' + } ] })(<Input placeholder={''} autoComplete="off" />)} </Form.Item> @@ -190,7 +215,7 @@ {interType === 'inner' ? <Col span={8}> <Form.Item label={tooltip ? <Tooltip placement="topLeft" title={tooltip}> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> 鍐呴儴鍑芥暟 </Tooltip> : '鍐呴儴鍑芥暟' }> @@ -226,7 +251,7 @@ {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}> <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={ <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> 鏁版嵁婧� </Tooltip> }> @@ -238,7 +263,7 @@ {interType === 'system' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'鏌ヨ鏃讹紝鎼滅储鏉′欢浠here鏉′欢鎷兼帴杩涘叆sql锛岀粺璁℃椂锛屽皢鏁版嵁婧愪腑浠モ�淍+鎼滅储瀛楁+@鈥濈殑鍐呭锛屼互鎼滅储鏉′欢涓殑鍊艰繘琛屾浛鎹㈠悗锛屾彁浜ゆ煡璇紝娉細鏌ヨ绫诲瀷浠呭湪浣跨敤绯荤粺鍑芥暟鏃舵湁鏁堛��'}> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> 鏌ヨ绫诲瀷 </Tooltip> }> @@ -288,6 +313,18 @@ </Radio.Group>)} </Form.Item> </Col> + {/* <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 楂樼骇鎼滅储 + </Tooltip> + }> + {getFieldDecorator('advanceWidth', { + initialValue: setting.advanceWidth || 1000 + })(<InputNumber min={10} max={3000} precision={0}/>)} + </Form.Item> + </Col> */} </Row> </Form> </div> -- Gitblit v1.8.0