From 75623dd039b742dbb44fb4c6b4af563404ed9c7f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 03 二月 2020 16:06:04 +0800
Subject: [PATCH] 2020-02-03

---
 src/templates/ushare/modalform/index.jsx |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/templates/modalconfig/modalform/index.jsx b/src/templates/ushare/modalform/index.jsx
similarity index 96%
rename from src/templates/modalconfig/modalform/index.jsx
rename to src/templates/ushare/modalform/index.jsx
index 37555a0..d0a7029 100644
--- a/src/templates/modalconfig/modalform/index.jsx
+++ b/src/templates/ushare/modalform/index.jsx
@@ -31,7 +31,7 @@
     if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 閫夋嫨绫诲瀷銆佽嚜瀹氫箟璧勬簮
       _options = [..._options, 'resourceType', 'options']
     } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 閫夋嫨绫诲瀷銆佹暟鎹簮
-      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
+      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
     } else if (type === 'number') {
       _options = [..._options, 'decimal', 'min', 'max']
     } else if (type === 'fileupload') {
@@ -44,6 +44,8 @@
       _options = [..._options, 'setAll', 'linkField']
     } else if (type === 'funcvar') {       // 璁剧疆涓哄嚱鏁板彉閲忔椂锛屼笉闇�瑕佸叾浠栦俊鎭�
       _options = ['label', 'field', 'type']
+    } else if (type === 'linkMain') {
+      _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden']
     }
     
     this.setState({
@@ -82,7 +84,7 @@
       if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 閫夋嫨绫诲瀷銆佽嚜瀹氫箟璧勬簮
         _options = [..._options, 'resourceType', 'options']
       } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 閫夋嫨绫诲瀷銆佹暟鎹簮
-        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
+        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
       } else if (value === 'number') {
         _options = [..._options, 'decimal', 'min', 'max']
       } else if (value === 'fileupload') {
@@ -95,6 +97,8 @@
         _options = [..._options, 'setAll', 'linkField']
       } else if (value === 'funcvar') {
         _options = ['label', 'field', 'type']
+      } else if (value === 'linkMain') {
+        _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden']
       }
       
       this.setState({
@@ -118,7 +122,7 @@
       }, () => {
         this.setState({
           formlist: this.state.formlist.map(form => {
-            if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar') {
+            if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar' && value !== 'linkMain') {
               form.show = true
             }
             return form
@@ -136,7 +140,7 @@
       if (value === '0') {
         _options = [..._options, 'options']
       } else if (value === '1') {
-        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
+        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
       }
 
       if (openType === 'select') {
@@ -371,6 +375,8 @@
                 duration: 10
               })
             }
+          } else if (values.type === 'linkMain') {
+            values.initval = ''
           }
 
           if (isvalid) {

--
Gitblit v1.8.0