From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 01 九月 2021 10:31:45 +0800
Subject: [PATCH] 2021-09-01

---
 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
index 27ba28c..208815c 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
@@ -13,7 +13,6 @@
   static propTpyes = {
     dict: PropTypes.object,       // 瀛楀吀椤�
     menu: PropTypes.object,       // 鑿滃崟淇℃伅
-    permFuncField: PropTypes.any, // 瀛樺偍杩囩▼鍙敤寮�濮嬪瓧绗�
     setting: PropTypes.object,    // 鏁版嵁婧愰厤缃�
     inputSubmit: PropTypes.func   // 瑙﹀彂鎻愪氦
   }
@@ -25,14 +24,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 +201,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}/>)}
@@ -392,7 +402,7 @@
             <Col span={12}>
               <Form.Item label="鎺掑簭">
                 {getFieldDecorator('order', {
-                  initialValue: setting.order || '',
+                  initialValue: setting.order || 'ID desc',
                   rules: [
                     {
                       required: true,
@@ -408,7 +418,7 @@
             </Col>
             <Col span={12}>
               <Form.Item label={
-                <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑锛堥粯璁ゅ�间负绌猴級鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}>
+                <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}>
                   <Icon type="question-circle" />
                   椤剁骇鏍囪瘑
                 </Tooltip>
@@ -426,7 +436,7 @@
             </Col>
             <Col span={12}>
               <Form.Item label={
-                <Tooltip placement="topLeft" title={'姣忚鍒嗕负24浠斤紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}>
+                <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}>
                   <Icon type="question-circle" />
                   瀹藉害
                 </Tooltip>

--
Gitblit v1.8.0