From b6cbfb08b51e87e6eac995be8e7751815715e6a1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 29 三月 2022 15:36:21 +0800
Subject: [PATCH] 2022-03-29

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   59 +++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 43 insertions(+), 16 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 0d4b95f..55184da 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -11,8 +11,8 @@
 const { TextArea } = Input
 const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
 const acTyOptions = {
-  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab'],
-  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab'],
+  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'position', 'tipTitle'],
+  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'position', 'tipTitle'],
   exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab'],
   excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'],
   excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'],
@@ -296,7 +296,11 @@
       if (this.record.pageTemplate === 'custom') {
         shows.push('url', 'joint')
       } else if (this.record.pageTemplate === 'linkpage') {
-        shows.push('linkmenu', 'joint')
+        shows.push('linkmenu')
+
+        if (Ot === 'requiredSgl') {
+          shows.push('joint')
+        }
 
         reRequired.linkmenu = true
         reTooltip.linkmenu = ''
@@ -354,6 +358,9 @@
         if (this.record.control) {
           shows.push('controlField', 'controlVal')
         }
+        if (this.record.control === 'disabled') {
+          shows.push('reason')
+        }
       }
     } else {
       if (Ot !== 'notRequired') {
@@ -377,6 +384,9 @@
       }
       if (this.record.control) {
         shows.push('controlField', 'controlVal')
+      }
+      if (this.record.control === 'disabled') {
+        shows.push('reason')
       }
     }
 
@@ -641,19 +651,36 @@
           { required: item.required, message: dict['form.required.select'] + item.label + '!' }
         ]
 
-        content = <Select
-          showSearch
-          allowClear={item.allowClear === true}
-          filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
-          onChange={(value) => {this.optionChange(item.key, value)}}
-          getPopupContainer={() => document.getElementById('winter')}
-        >
-          {item.options.map((option, index) =>
-            <Select.Option key={index} value={(option.value || option.field)}>
-              {(option.text || option.label)}
-            </Select.Option>
-          )}
-        </Select>
+        if (item.extendName) {
+          content = <Select
+            showSearch
+            allowClear={item.allowClear === true}
+            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+              option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+            onChange={(value) => {this.optionChange(item.key, value)}}
+            getPopupContainer={() => document.getElementById('winter')}
+          >
+            {item.options.map((option, index) =>
+              <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}>
+                {(option.text || option.label)}
+              </Select.Option>
+            )}
+          </Select>
+        } else {
+          content = <Select
+            showSearch
+            allowClear={item.allowClear === true}
+            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+            onChange={(value) => {this.optionChange(item.key, value)}}
+            getPopupContainer={() => document.getElementById('winter')}
+          >
+            {item.options.map((option, index) =>
+              <Select.Option key={index} value={(option.value || option.field)}>
+                {(option.text || option.label)}
+              </Select.Option>
+            )}
+          </Select>
+        }
       } else if (item.type === 'radio') {
         rules = [
           { required: item.required, message: dict['form.required.select'] + item.label + '!' }

--
Gitblit v1.8.0