From 4d08cb2fa0daad4b7593a2b8282466b000194344 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 27 七月 2021 14:29:55 +0800
Subject: [PATCH] 2021-07-27

---
 src/views/appmanage/index.jsx |   87 +++++++++++++++++++++++++++----------------
 1 files changed, 54 insertions(+), 33 deletions(-)

diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx
index 41a56ca..91fb606 100644
--- a/src/views/appmanage/index.jsx
+++ b/src/views/appmanage/index.jsx
@@ -305,45 +305,66 @@
   }
 
   submitScript = () => {
-    // const { selectTran } = this.state
+    const { selectTran } = this.state
 
     this.scriptRef.handleConfirm().then(res => {
       this.setState({
         confirmloading: true
       })
-      // let param = {}
-      // s_sVersionDetail_Add
-      // s_sVersionDetail_CloudAdd
 
-      // Api.getCloudConfig(param).then(result => {
-      //   if (result.status) {
-      //     notification.success({
-      //       top: 92,
-      //       message: '鎿嶄綔鎴愬姛锛�',
-      //       duration: 3
-      //     })
-      //     this.setState({
-      //       scriptIndex: 1,
-      //       confirmloading: false,
-      //       scriptVisible: false
-      //     }, () => {
-      //       this.getScriptList()
-      //     })
-      //   } else {
-      //     this.setState({
-      //       confirmloading: false
-      //     })
-      //     notification.warning({
-      //       top: 92,
-      //       message: result.message,
-      //       duration: 5
-      //     })
-      //   }
-      // }, () => {
-      //   this.setState({
-      //     confirmloading: false
-      //   })
-      // })
+      let kei_no = res.appId.split(',')[1]
+      let lang = res.subAppId.split(',')[1]
+      let kei_no_detail = res.subAppId.split(',')[2]
+      
+      let param = {
+        func: 's_sVersionDetail_CloudAdd',
+        kei_no: kei_no,
+        kei_no_detail: kei_no_detail,
+        lang: lang,
+        BID: selectTran.ID
+      }
+
+      if (res.VType === 'subapp') {
+        param.VType = 'mob_menu'
+        param.TrdMenuID = ''
+        param.upid = md5(window.GLOB.appkey + kei_no + kei_no_detail + lang)
+      } else if (res.VType === 'view') {
+        param.VType = 'mob_menu'
+        param.TrdMenuID = res.viewId
+      } else if (res.VType === 'role') {
+        param.VType = 'mob_roletree'
+        param.upid = md5(window.GLOB.appkey + kei_no + kei_no_detail + lang)
+      }
+
+      Api.getCloudConfig(param).then(result => {
+        if (result.status) {
+          notification.success({
+            top: 92,
+            message: '鎿嶄綔鎴愬姛锛�',
+            duration: 3
+          })
+          this.setState({
+            scriptIndex: 1,
+            confirmloading: false,
+            scriptVisible: false
+          }, () => {
+            this.getScriptList()
+          })
+        } else {
+          this.setState({
+            confirmloading: false
+          })
+          notification.warning({
+            top: 92,
+            message: result.message,
+            duration: 5
+          })
+        }
+      }, () => {
+        this.setState({
+          confirmloading: false
+        })
+      })
     })
   }
 

--
Gitblit v1.8.0