From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 四月 2022 19:23:18 +0800
Subject: [PATCH] 2022-04-26

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   67 ++++++++++++++++++++++++---------
 1 files changed, 48 insertions(+), 19 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index d9bb436..ce4fea6 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'],
@@ -198,9 +198,9 @@
       } else {
         reOptions.sqlType = this.state.insertUpdateOptions
       }
-      if (this.record.execSuccess === 'goback') {
+      // if (this.record.execSuccess === 'goback') {
         shows.push('reload')
-      }
+      // }
     } else if (openType === 'form') {
       let intertype = this.record.intertype
 
@@ -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 = ''
@@ -340,6 +344,8 @@
         reTooltip.linkmenu = '浣跨敤鎵爜鐧诲綍鍔熻兘鎴栬彍鍗曡烦杞姛鑳芥椂锛岄渶閫夋嫨璺宠浆鐨勮彍鍗曘��'
       } else if (_funcType === 'goBack') {
         shows.push('reload')
+      // } else if (_funcType === 'megvii') {
+      //   shows.push('subFunc')
       }
     }
     
@@ -353,6 +359,9 @@
         ]
         if (this.record.control) {
           shows.push('controlField', 'controlVal')
+        }
+        if (this.record.control === 'disabled') {
+          shows.push('reason')
         }
       }
     } else {
@@ -377,6 +386,9 @@
       }
       if (this.record.control) {
         shows.push('controlField', 'controlVal')
+      }
+      if (this.record.control === 'disabled') {
+        shows.push('reason')
       }
     }
 
@@ -635,25 +647,42 @@
           { required: item.required, message: dict['form.required.input'] + item.label + '!' }
         ]
 
-        content = <InputNumber min={item.min} max={item.max} precision={item.precision} />
+        content = <InputNumber min={item.min} max={item.max} precision={item.precision} onPressEnter={this.handleSubmit}/>
       } else if (item.type === 'select') {
         rules = [
           { 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