From 862b6cf69dc925a6138a7ebf79b782a5d7791202 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 03 一月 2020 12:13:52 +0800
Subject: [PATCH] 2020-01-03

---
 src/templates/comtableconfig/actionform/index.jsx |   56 ++++++--------------------------------------------------
 1 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/src/templates/comtableconfig/actionform/index.jsx b/src/templates/comtableconfig/actionform/index.jsx
index 95dc5ea..cc2b284 100644
--- a/src/templates/comtableconfig/actionform/index.jsx
+++ b/src/templates/comtableconfig/actionform/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber, Button, Modal, message } from 'antd'
+import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber } from 'antd'
 import { btnIcons, btnClasses } from '@/utils/option.js'
 import Utils from '@/utils/utils.js'
 import './index.scss'
@@ -18,7 +18,6 @@
   state = {
     formlist: null,  // 琛ㄥ崟淇℃伅
     openType: null,  // 鎵撳紑鏂瑰紡
-    errorType: 'E',  // 鎶ラ敊绫诲瀷
     interType: null, // 鎺ュ彛绫诲瀷锛氬唴閮ㄣ�佸閮�
     position: null,  // 鎸夐挳浣嶇疆
     reqOptionSgl: [{
@@ -72,7 +71,6 @@
     let _opentype = ''
     let _intertype = ''
     let _position = ''
-    let _errorType = ''
     let _tabType = ''
     let _linkTab = ''
     let _options = null
@@ -84,8 +82,6 @@
         _intertype = form.initVal
       } else if (form.key === 'position') {
         _position = form.initVal
-      } else if (form.key === 'errorTip') {
-        _errorType = form.initVal
       } else if (form.key === 'tabType') {
         _tabType = form.initVal
       } else if (form.key === 'linkTab') {
@@ -112,16 +108,15 @@
       }
     } else {
       if (_intertype === 'outer') {
-        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'errorTip', 'errorTime', 'method']
+        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method']
       } else {
-        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'errorTip', 'errorTime', 'sql', 'sqlType']
+        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
       }
     }
     this.setState({
       openType: _opentype,
       interType: _intertype,
       position: _position,
-      errorType: _errorType,
       formlist: this.props.formlist.map(item => {
         if (item.key === 'class') {
           item.options = btnClasses
@@ -192,9 +187,9 @@
         }
       } else {
         if (this.state.interType === 'inner') {
-          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'errorTip', 'errorTime', 'sql', 'sqlType']
+          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
         } else {
-          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'errorTip', 'errorTime', 'interface', 'outerFunc', 'callbackFunc', 'method']
+          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method']
         }
       }
       this.setState({
@@ -271,10 +266,6 @@
           })
         })
       })
-    } else if (key === 'errorTip') {
-      this.setState({
-        errorType: value
-      })
     } else if (key === 'tabType') {
       let _tabs = this.props.tabs.filter(tab => tab.type === value)
 
@@ -315,9 +306,6 @@
       } else {
         _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method']
       }
-      if (['pop', 'prompt', 'exec'].includes(this.state.openType)) {
-        _options.push('errorTip', 'errorTime')
-      }
       this.setState({
         interType: value,
         formlist: this.state.formlist.map(item => {
@@ -325,37 +313,6 @@
           return item
         })
       })
-    }
-  }
-
-  showError = () => {
-    const { errorType } = this.state
-
-    if (errorType === 'S') {
-      notification.success({
-        top: 92,
-        message: '鎵ц鎴愬姛锛�',
-        duration: 2
-      })
-    } else if (errorType === 'F') {
-      notification.error({
-        className: 'notification-custom-error',
-        top: 92,
-        message: '鎵ц澶辫触锛�',
-        duration: 15
-      })
-    } else if (errorType === 'N') {
-      notification.error({
-        top: 92,
-        message: '鎵ц澶辫触锛�',
-        duration: 15
-      })
-    } else if (errorType === 'E') {
-      Modal.error({
-        title: '鎵ц澶辫触锛�'
-      })
-    } else if (errorType === 'NM') {
-      message.error('鎵ц澶辫触锛�')
     }
   }
 
@@ -417,7 +374,7 @@
         )
       } else if (item.type === 'select') { // 涓嬫媺鎼滅储
         fields.push(
-          <Col span={12} key={index} className={item.key === 'errorTip' ? 'with-button' : ''}>
+          <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
               <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
                 <Icon type="question-circle" />
@@ -447,7 +404,6 @@
                 </Select>
               )}
             </Form.Item>
-            {item.key === 'errorTip' ? <Button onClick={this.showError}>鏌ョ湅</Button> : null}
           </Col>
         )
       } else if (item.type === 'radio') {

--
Gitblit v1.8.0