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/treesettingcomponent/settingform/datasource/index.jsx |   43 +++++++++++++++++++++++++++----------------
 1 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
index 02acde2..0bf23eb 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/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, InputNumber } 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,       // 瀛楀吀椤�
     menu: PropTypes.object,       // 鑿滃崟淇℃伅
-    permFuncField: PropTypes.any, // 瀛樺偍杩囩▼鍙敤寮�濮嬪瓧绗�
     setting: PropTypes.object,    // 鏁版嵁婧愰厤缃�
     inputSubmit: PropTypes.func   // 瑙﹀彂鎻愪氦
   }
@@ -25,14 +25,25 @@
   }
 
   UNSAFE_componentWillMount () {
-    const { setting, permFuncField } = this.props
+    const { setting } = this.props
 
+    let usefulFields = sessionStorage.getItem('permFuncField')
     let tooltip = null
     let rules = []
 
-    if (permFuncField && permFuncField.length > 0) {
-      tooltip = '寮�澶村彲鐢ㄥ瓧绗︼細' + permFuncField.join(', ')
-      let str = '^(' + permFuncField.join('|') + ')'
+    if (usefulFields) {
+      try {
+        usefulFields = JSON.parse(usefulFields)
+      } catch (e) {
+        usefulFields = []
+      }
+    } else {
+      usefulFields = []
+    }
+
+    if (usefulFields.length > 0) {
+      tooltip = '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', ')
+      let str = '^(' + usefulFields.join('|') + ')'
       let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g')
 
       rules.push({
@@ -191,8 +202,8 @@
                       message: dict['form.required.input'] + '琛ㄥ悕!'
                     },
                     {
-                      max: formRule.input.max,
-                      message: formRule.input.message
+                      max: 50,
+                      message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
                     }
                   ]
                 })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
@@ -253,7 +264,7 @@
             {interType === 'inner' ? <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={funcTooltip}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   鍐呴儴鍑芥暟
                 </Tooltip>
               }>
@@ -305,7 +316,7 @@
             {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
               <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
                 <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   鏁版嵁婧�
                 </Tooltip>
               }>
@@ -317,7 +328,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   Value
                 </Tooltip>
               }>
@@ -342,7 +353,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鏄剧ず鏂囧瓧瀛楁銆�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   Label
                 </Tooltip>
               }>
@@ -367,7 +378,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   Parent
                 </Tooltip>
               }>
@@ -392,7 +403,7 @@
             <Col span={12}>
               <Form.Item label="鎺掑簭">
                 {getFieldDecorator('order', {
-                  initialValue: setting.order || '',
+                  initialValue: setting.order || 'ID desc',
                   rules: [
                     {
                       required: true,
@@ -409,7 +420,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   椤剁骇鏍囪瘑
                 </Tooltip>
               }>
@@ -427,7 +438,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   瀹藉害
                 </Tooltip>
               }>

--
Gitblit v1.8.0