From c45a375e5b4ce0e33c7fc8a1aecdad67d60acc9e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 01 三月 2021 15:09:06 +0800
Subject: [PATCH] 2021-03-01

---
 src/templates/sharecomponent/actioncomponent/actionform/index.jsx |   40 +++++++++++++++++++++++++---------------
 1 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
index 9f45bd7..9e150f6 100644
--- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -189,13 +189,13 @@
       }
     } else if (_opentype === 'excelOut') {    // 瀵煎叆瀵煎嚭
       if (_intertype === 'outer') {
-        _options.push('innerFunc', 'sysInterface', 'interface', 'outerFunc')
+        _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc')
       } else if (_intertype === 'inner') {
         _options.push('innerFunc')
       }
     } else if (_opentype === 'excelIn') {    // 瀵煎叆瀵煎嚭
       if (_intertype === 'outer') {
-        _options.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
+        _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
       } else if (_intertype === 'inner') {
         _options.push('innerFunc')
       }
@@ -203,7 +203,7 @@
       if (_funcType === 'print') {
         _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError')
         if (_intertype === 'outer') {
-          _options.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
+          _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
         } else if (_intertype === 'inner') {
           _options.push('innerFunc')
         }
@@ -217,7 +217,7 @@
           _options.push('innerFunc')
         }
       } else if (_intertype === 'outer') {
-        _options.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
+        _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
       } else if (_intertype === 'inner') {
         _options.push('innerFunc')
       } else {
@@ -641,8 +641,14 @@
           <Col span={24} key={index}>
             <Form.Item label={item.label} className="textarea">
               {getFieldDecorator(item.key, {
-                initialValue: item.initVal
-              })(<TextArea rows={2} />)}
+                initialValue: item.initVal,
+                rules: [
+                  {
+                    required: item.readonly ? false : !!item.required,
+                    message: this.props.dict['form.required.input'] + item.label + '!'
+                  }
+                ]
+              })(<TextArea rows={2} readOnly={item.readonly} />)}
             </Form.Item>
           </Col>
         )
@@ -659,7 +665,7 @@
                   }
                 ]
               })(
-                <Cascader options={item.options || []} placeholder="" />
+                <Cascader allowClear options={item.options || []} placeholder="" />
               )}
             </Form.Item>
           </Col>
@@ -670,13 +676,13 @@
   }
 
   handleConfirm = () => {
-    const { setting } = this.props
+    const { setting, card } = this.props
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     return new Promise((resolve, reject) => {
       this.props.form.validateFieldsAndScroll((err, values) => {
         if (!err) {
-          values.uuid = this.props.card.uuid
-          values.verify = this.props.card.verify || null
+          values.uuid = card.uuid
+          values.verify = card.verify || null
 
           if (values.OpenType === 'excelIn') {
             values.position = 'toolbar'
@@ -694,14 +700,18 @@
             values.Ot = 'notRequired'
           } else if (values.OpenType === 'popview' && !values.linkTab) { // 娌℃湁鍏宠仈鏍囩锛堟柊寤烘椂锛夛紝鍒涘缓鏂版爣绛綢d
             values.linkTab = Utils.getuuid()
-            values.createTab = true // 鐢ㄤ簬鏍囪鎸夐挳澶嶅埗鏃讹紝鏄惁澶嶅埗鍘熸湁鏍囩
           } else if (values.OpenType === 'funcbutton') { // 杞崲鎵撳嵃鏃舵墦寮�鏂瑰紡
             values.position = 'toolbar'
           } else if (['pop', 'prompt', 'exec'].includes(values.OpenType) && values.verify) {
-            if (values.Ot === 'requiredOnce' && ['notRequired', 'requiredSgl', 'required'].includes(this.props.card.Ot)) {
+            if ((values.Ot === 'requiredOnce' || card.Ot === 'requiredOnce') && card.Ot !== values.Ot) {
               values.verify.uniques = []
-            } else if (this.props.card.Ot === 'requiredOnce' && ['notRequired', 'requiredSgl', 'required'].includes(values.Ot)) {
-              values.verify.uniques = []
+            }
+            if (card.Ot !== values.Ot) {
+              if (values.Ot === 'notRequired') {
+                values.verify.invalid = 'false'
+              } else if (card.Ot === 'notRequired' && values.Ot !== 'notRequired') {
+                values.verify.invalid = 'true'
+              }
             }
           }
 
@@ -725,7 +735,7 @@
       }
     }
     return (
-      <Form {...formItemLayout} className="ant-advanced-search-form commontable-action-form" id="winter">
+      <Form {...formItemLayout} className="normal-action-list-form" id="winter">
         <Row gutter={24}>{this.getFields()}</Row>
       </Form>
     )

--
Gitblit v1.8.0