From 5a995a24857abb0a1dac5e4c67c600e54db01539 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 13 十月 2021 17:35:56 +0800
Subject: [PATCH] 2021-10-13

---
 src/templates/zshare/unattended/settingform/index.jsx |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/src/templates/zshare/unattended/settingform/index.jsx b/src/templates/zshare/unattended/settingform/index.jsx
index 5191f35..5712b33 100644
--- a/src/templates/zshare/unattended/settingform/index.jsx
+++ b/src/templates/zshare/unattended/settingform/index.jsx
@@ -10,7 +10,9 @@
     actions: PropTypes.array
   }
 
-  state = {}
+  state = {
+    enable: this.props.autoMatic.enable
+  }
 
   handleConfirm = () => {
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
@@ -28,6 +30,7 @@
   render() {
     const { actions, autoMatic } = this.props
     const { getFieldDecorator } = this.props.form
+    const { enable } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -48,7 +51,7 @@
               {getFieldDecorator('enable', {
                 initialValue: autoMatic.enable,
               })(
-                <Radio.Group>
+                <Radio.Group onChange={(e) => this.setState({enable: e.target.value})}>
                   <Radio value="true">鏄�</Radio>
                   <Radio value="false">鍚�</Radio>
                 </Radio.Group>
@@ -65,7 +68,7 @@
               {getFieldDecorator('action', {
                 initialValue: autoMatic.action || '',
                 rules: [{
-                  required: true,
+                  required: enable === 'true',
                   message: '璇烽�夋嫨鎵ц鎸夐挳锛�'
                 }]
               })(
@@ -77,6 +80,24 @@
               )}
             </Form.Item>
           </Col>
+          <Col span={20}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="鎸夐挳鎵ц澶辫触鏃讹紝鍚庣画鐨勫鐞嗘柟寮忋��">
+                <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}} />
+                鎶ラ敊鏃�
+              </Tooltip>
+            }>
+              {getFieldDecorator('onFail', {
+                initialValue: autoMatic.onFail,
+              })(
+                <Radio.Group onChange={(e) => this.setState({enable: e.target.value})}>
+                  <Radio value="stop">鍋滄</Radio>
+                  <Radio value="skip">璺宠繃</Radio>
+                  <Radio value="again">閲嶆柊鎵ц</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col>
         </Row>
       </Form>
     )

--
Gitblit v1.8.0