From be107069b14c8d23b9d1aa50391897324dfa9f35 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 05 九月 2023 21:57:27 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/chart/antv-X6/index.jsx |   58 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 47 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx
index 781b43c..32267f3 100644
--- a/src/tabviews/custom/components/chart/antv-X6/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -387,6 +387,7 @@
     loading: false,
     status: 0,
     flowname: '',
+    flowcode: '',
     orgs: []
   }
 
@@ -621,7 +622,8 @@
 
       this.setState({
         status: item.status || 0,
-        flowname: item.works_flow_name,
+        flowname: item.works_flow_name || '',
+        flowcode: item.works_flow_code || '',
         loading: false
       })
 
@@ -1535,7 +1537,7 @@
   }
 
   save = () => {
-    const { BID, plot, status } = this.state
+    const { BID, plot, status, flowname, flowcode } = this.state
 
     if (!BID) {
       Modal.error({
@@ -1569,18 +1571,52 @@
         ID: BID,
         BID: ''
       }
+
+      let ssoParam = {
+        func: 's_works_flow_param_sso_upt_v6',
+        status: status,
+        ID: BID,
+        works_flow_code: flowcode,
+        works_flow_name: flowname,
+        long_param: window.btoa(window.encodeURIComponent(JSON.stringify(nodes)))
+      }
   
       Api.genericInterface(param).then(res => {
         if (res.status) {
-          notification.success({
-            top: 92,
-            message: '淇濆瓨鎴愬姛锛�',
-            duration: 2
-          })
-          this.setState({
-            loading: false,
-            status: _status
-          })
+          if (plot.subtype === 'xflow') {
+            Api.getSystemConfig(ssoParam).then(result => {
+              if (result.status) {
+                notification.success({
+                  top: 92,
+                  message: '淇濆瓨鎴愬姛锛�',
+                  duration: 2
+                })
+                this.setState({
+                  loading: false,
+                  status: _status
+                })
+              } else {
+                notification.error({
+                  top: 92,
+                  message: result.message,
+                  duration: 10
+                })
+                this.setState({
+                  loading: false
+                })
+              }
+            })
+          } else {
+            notification.success({
+              top: 92,
+              message: '淇濆瓨鎴愬姛锛�',
+              duration: 2
+            })
+            this.setState({
+              loading: false,
+              status: _status
+            })
+          }
         } else {
           notification.error({
             top: 92,

--
Gitblit v1.8.0