From 213c70792e6af7f9ccef17d778c5f8806fbd513c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 28 十一月 2019 15:01:24 +0800
Subject: [PATCH] 2019-11-28-01

---
 src/tabviews/commontable/mainAction/index.jsx |  139 +++++++++++++++++++++++-----------------------
 1 files changed, 70 insertions(+), 69 deletions(-)

diff --git a/src/tabviews/commontable/mainAction/index.jsx b/src/tabviews/commontable/mainAction/index.jsx
index 5ba5f08..97f3764 100644
--- a/src/tabviews/commontable/mainAction/index.jsx
+++ b/src/tabviews/commontable/mainAction/index.jsx
@@ -6,7 +6,7 @@
 import Api from '@/api'
 import './index.scss'
 
-const { confirm } = Modal
+// const { confirm } = Modal
 
 class MainAction extends Component {
   static propTpyes = {
@@ -28,76 +28,77 @@
     this.props.refreshdata()
   }
   actionTrigger = (item) => {
-    let _this = this
+    // let _this = this
     let data = this.props.gettableselected() || []
-    if (item.Ot === 'required' && data.length === 0) {
-      // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
-      notification.warning({
-        top: 92,
-        message: this.props.dict['main.action.confirm.selectline']
-      })
-      return
-    } else if (item.Ot === 'pop' && data.length !== 1) {
-      if (data.length === 0) {
-        // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
-        notification.warning({
-          top: 92,
-          message: this.props.dict['main.action.confirm.selectline']
-        })
-        return
-      } else {
-        // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
-        notification.warning({
-          top: 92,
-          message: this.props.dict['main.action.confirm.selectSingleLine']
-        })
-        return
-      }
-    }
+    console.log(data)
+    // if (item.Ot === 'required' && data.length === 0) {
+    //   // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
+    //   notification.warning({
+    //     top: 92,
+    //     message: this.props.dict['main.action.confirm.selectline']
+    //   })
+    //   return
+    // } else if (item.Ot === 'pop' && data.length !== 1) {
+    //   if (data.length === 0) {
+    //     // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
+    //     notification.warning({
+    //       top: 92,
+    //       message: this.props.dict['main.action.confirm.selectline']
+    //     })
+    //     return
+    //   } else {
+    //     // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
+    //     notification.warning({
+    //       top: 92,
+    //       message: this.props.dict['main.action.confirm.selectSingleLine']
+    //     })
+    //     return
+    //   }
+    // }
 
-    if (item.Action === 'Prompt' || item.Action === 'Delete') {
-      confirm({
-        title: this.props.dict['main.action.confirm.tip'],
-        onOk() {
-          return Api.setActionSubmit({
-            func: 'SetActionSubmitSuccess'
-            // func: 'SetActionSubmitError'
-          }).then((res) => {
-            if (res.status) {
-              notification.success({
-                top: 92,
-                message: _this.props.dict['main.action.confirm.success']
-                // duration: 0
-                // description:
-              })
-              _this.refreshdata()
-            } else {
-              notification.error({
-                top: 92,
-                message: res.message
-              })
-            }
-          })
-        },
-        onCancel() {}
-      })
-    } else if (item.Action === 'Update') {
-      Api.getModelFormData(item.MenuID).then(res => {
-        if (res.status) {
-          this.setState({
-            formdata: res.data.map(input => {
-              let validate = input.Validate && JSON.parse(input.Validate)
-              input.DynOptions = JSON.parse(input.DynOptions)
-              input.required = (validate && validate.required) || false
-              return input
-            }),
-            visible: true,
-            execAction: item,
-            tabledata: data[0]
-          })
-        }
-      })
-    }
+    // if (item.Action === 'Prompt' || item.Action === 'Delete') {
+    //   confirm({
+    //     title: this.props.dict['main.action.confirm.tip'],
+    //     onOk() {
+    //       return Api.setActionSubmit({
+    //         func: 'SetActionSubmitSuccess'
+    //         // func: 'SetActionSubmitError'
+    //       }).then((res) => {
+    //         if (res.status) {
+    //           notification.success({
+    //             top: 92,
+    //             message: _this.props.dict['main.action.confirm.success']
+    //             // duration: 0
+    //             // description:
+    //           })
+    //           _this.refreshdata()
+    //         } else {
+    //           notification.error({
+    //             top: 92,
+    //             message: res.message
+    //           })
+    //         }
+    //       })
+    //     },
+    //     onCancel() {}
+    //   })
+    // } else if (item.Action === 'Update') {
+    //   Api.getModelFormData(item.MenuID).then(res => {
+    //     if (res.status) {
+    //       this.setState({
+    //         formdata: res.data.map(input => {
+    //           let validate = input.Validate && JSON.parse(input.Validate)
+    //           input.DynOptions = JSON.parse(input.DynOptions)
+    //           input.required = (validate && validate.required) || false
+    //           return input
+    //         }),
+    //         visible: true,
+    //         execAction: item,
+    //         tabledata: data[0]
+    //       })
+    //     }
+    //   })
+    // }
   }
 
   getModels = () => {

--
Gitblit v1.8.0