From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 09 二月 2022 11:48:29 +0800
Subject: [PATCH] 2022-02-09

---
 src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx |   54 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 44 insertions(+), 10 deletions(-)

diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx
index 913df71..b4622fd 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, InputNumber } 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 = () => {
@@ -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,9 +159,9 @@
     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({
@@ -167,6 +185,10 @@
                     {
                       required: true,
                       message: this.props.dict['form.required.input'] + '琛ㄥ悕!'
+                    },
+                    {
+                      max: 50,
+                      message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
                     }
                   ]
                 })(<Input placeholder={''} autoComplete="off" />)}
@@ -193,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> : '鍐呴儴鍑芥暟'
               }>
@@ -229,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>
               }>
@@ -241,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>
               }>
@@ -291,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