From c362db481ce88fd1e81a77b30e2f650b4fed9cba Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 05 十一月 2021 15:42:23 +0800
Subject: [PATCH] 2021-11-05

---
 src/tabviews/zshare/topSearch/index.jsx                           |    6 ++++--
 src/templates/zshare/formconfig.jsx                               |   14 ++++++++++++++
 src/menu/components/card/cardcomponent/options.jsx                |    2 +-
 src/utils/utils.js                                                |    4 +++-
 src/templates/sharecomponent/searchcomponent/searchform/index.jsx |   22 +++++++++++-----------
 5 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx
index 6eff72a..96aa457 100644
--- a/src/menu/components/card/cardcomponent/options.jsx
+++ b/src/menu/components/card/cardcomponent/options.jsx
@@ -97,7 +97,7 @@
       field: 'click',
       label: '鐐瑰嚮浜嬩欢',
       initval: setting.click || '',
-      tooltip: '褰撻�夋嫨瑙﹀彂鎸夐挳鏃讹紝鍙湁褰撳崱鐗囦腑鍙瓨鍦ㄤ竴涓寜閽椂鏈夋晥銆�',
+      tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��',
       required: false,
       options: [
         {value: '', label: '鏃�'},
diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx
index c1403af..4a2ad50 100644
--- a/src/tabviews/zshare/topSearch/index.jsx
+++ b/src/tabviews/zshare/topSearch/index.jsx
@@ -588,7 +588,8 @@
           value: values[item.datefield] || '',
           label: item.label,
           match: 'between',
-          required: item.required
+          required: item.required,
+          forbid: item.$forbid
         }, {
           type: 'group',
           key: item.field,
@@ -615,7 +616,8 @@
           value: val,
           label: item.label,
           match: item.match,
-          required: item.required
+          required: item.required,
+          forbid: item.$forbid
         })
       }
     })
diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
index e8faf2e..88f8bfc 100644
--- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -87,17 +87,17 @@
 ]
 
 const searchTypeOptions = {
-  text: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'inputType', 'advanced'],
-  select: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown'],
-  multiselect: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'],
-  link: ['label', 'field', 'resourceType', 'initval', 'type', 'linkField', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown'],
-  date: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'],
-  checkcard: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'resourceType', 'display', 'width', 'multiple', 'borderColor', 'required', 'Hide', 'labelShow', 'advanced'],
-  dateweek: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'],
-  datemonth: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'],
-  daterange: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'],
-  group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow'],
-  range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow']
+  text: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'inputType', 'advanced', 'query'],
+  select: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown', 'query'],
+  multiselect: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'],
+  link: ['label', 'field', 'resourceType', 'initval', 'type', 'linkField', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown', 'query'],
+  date: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'],
+  checkcard: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'resourceType', 'display', 'width', 'multiple', 'borderColor', 'required', 'Hide', 'labelShow', 'advanced', 'query'],
+  dateweek: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'],
+  datemonth: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'],
+  daterange: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'],
+  group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow', 'query'],
+  range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query']
 }
 
 class MainSearch extends Component {
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index fbc0a97..b2ece7d 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -678,6 +678,20 @@
         text: Formdict['model.false']
       }]
     },
+    {
+      type: 'radio',
+      key: 'query',
+      label: '鍙備笌鏌ヨ',
+      initVal: card.query || 'true',
+      tooltip: '鏄惁浣滀负 where 鏉′欢锛屽弬涓庢暟鎹煡璇€��',
+      options: [{
+        value: 'true',
+        text: '鏄�'
+      }, {
+        value: 'false',
+        text: '鍚�'
+      }]
+    },
     // {
     //   type: 'radio',
     //   key: 'transfer',
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 6890210..85b401e 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -248,6 +248,7 @@
       item.hidden = item.Hide === 'true'
       item.required = !item.hidden && item.required === 'true'
       item.advanced = item.advanced === 'true'
+      item.$forbid = item.query === 'false'
 
       if (item.type === 'date') { // 鏃堕棿鎼滅储
         item.initval = item.initval ? moment().subtract(item.initval, 'days').format('YYYY-MM-DD') : ''
@@ -356,7 +357,8 @@
         type: cell.type,
         label: cell.label,
         value: cell.initval,
-        required: cell.required
+        required: cell.required,
+        forbid: cell.$forbid
       }
       
       if (cell.type === 'multiselect' || (cell.type === 'checkcard' && cell.multiple === 'true')) {

--
Gitblit v1.8.0