From cbb1cc11a9557ce5c3cca9bca549b098436092b6 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 14 二月 2025 14:55:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/flowable/task/myProcess/send/index.vue |   83 ++++++++++++++++++-----------------------
 1 files changed, 37 insertions(+), 46 deletions(-)

diff --git a/src/views/flowable/task/myProcess/send/index.vue b/src/views/flowable/task/myProcess/send/index.vue
index 52bda98..ea5dd7c 100644
--- a/src/views/flowable/task/myProcess/send/index.vue
+++ b/src/views/flowable/task/myProcess/send/index.vue
@@ -19,6 +19,8 @@
                     <el-button size="small" type="primary" :disabled="submitLoading" v-loading="submitLoading" @click="submitForm">纭骞舵彁浜�</el-button>
                     <el-button size="small" type="primary" disabled @click="submitForm">鍗忓悓鍔炵悊(鍔熻兘寮�鍙戜腑)</el-button>
                     <el-button size="small" type="primary" @click="openDelegation(formDataList[0].beforeNodeName)">杞姙</el-button>
+                    <el-button v-if="formDataObj.canJump" size="small" type="primary" @click="jumpTask()">璺宠繃</el-button>
+                    <el-button v-if="formDataObj.canWait" size="small" type="primary" >瀹圭己</el-button>
                   </div>
                   <div class="current">褰撳墠闃舵锛�<span>{{formDataObj.beforeNodeName}}</span></div>
                 </div>
@@ -173,7 +175,7 @@
 import { flowTaskForm } from "@/api/flowable/todo";
 import {getNextFlowNodeByStart} from "@/api/flowable/todo";
 import {rejectTask} from "@/api/flowable/process";
-import {taskDelegation} from "@/api/projectProcess/projectProcess";
+import {taskDelegation, taskJump} from "@/api/projectProcess/projectProcess";
 
 export default {
   name: "Record",
@@ -187,6 +189,7 @@
   props: {},
   data() {
     return {
+      jumpDesc: '', // 璺宠繃璇存槑
       rejectLoading: false, // 椹冲洖鎸夐挳鍔犺浇
       submitLoading: false, // 鎻愪氦鎸夐挳鍔犺浇
       delegationButLoading: false, // 杞姙鎸夐挳鍔犺浇
@@ -217,7 +220,9 @@
         taskId: '',
         peopleType: '',
         targetId: '',
-        taskName: ''
+        taskName: '',
+        processInsId: '',
+        projectId: '',
       },
       delegationShow: false, // 杞姙鏄剧ず
       rejectShow: false, // 椹冲洖鏄剧ず
@@ -270,6 +275,32 @@
     this.getFlowFormData(this.taskId);
   },
   methods: {
+    // 璺宠繃浠诲姟
+    jumpTask() {
+      this.$prompt('澶囨敞璇存槑', '纭畾瑕佽烦杩囨浠诲姟鍚�', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        inputType: 'textarea'
+        // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
+        // inputErrorMessage: '閭鏍煎紡涓嶆纭�'
+      }).then(({ value }) => {
+        let jumpForm = {
+          taskId: this.taskId,
+          projectId: this.goBackParams.projectId,
+          processInsId: this.procInsId,
+          desc: value
+        }
+        taskJump(jumpForm).then(res => {
+          this.$message.success("鎿嶄綔鎴愬姛")
+          this.goBack()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堣烦杩囨搷浣�'
+        });
+      });
+    },
     removeDept(dept) {
       let index = this.delegationDeptSelect.indexOf(dept);
       if (index !== -1) {
@@ -313,6 +344,8 @@
             cancelButtonText: '鍙栨秷',
             type: 'warning'
           }).then(() => {
+            this.delegationForm.projectId = this.goBackParams.projectId
+            this.delegationForm.processInsId = this.procInsId
             this.delegationButLoading = true
             taskDelegation(this.delegationForm).then(res => {
               this.$message.success("宸插彂璧疯浆鍔炵敵璇�")
@@ -473,7 +506,7 @@
     handleClick(tab, event) {
       if (tab.name === '2'){
         this.imgLoading = true
-        flowXmlAndNode({procInsId:this.procInsId,deployId:this.deployId}).then(res => {
+        flowXmlAndNode({processInsId:this.procInsId,deployId:this.deployId}).then(res => {
           this.imgLoading = false
           this.flowData = res.data;
         })
@@ -544,10 +577,10 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.submitLoading = true
         let that = this
         if (eval("that.$refs.form" +0)) {
           eval("that.$refs.form" +0)[0].getFormData().then(formData => {
+            this.submitLoading = true
             this.formData = formData
             const param = {
               formJson:  this.formJson,
@@ -569,48 +602,6 @@
             this.goBack();
           })
         }
-
-        // let that = this
-        // eval("that.$refs.form" +0)[0].getFormData().then(formData => {
-        //   // 鏍规嵁褰撳墠浠诲姟鎴栬�呮祦绋嬭璁¢厤缃殑涓嬩竴姝ヨ妭鐐� todo 鏆傛椂鏈秹鍙婂埌鑰冭檻缃戝叧銆佽〃杈惧紡鍜屽鑺傜偣鎯呭喌
-        //   getNextFlowNodeByStart({deploymentId: this.deployId, variables: formData}).then(res => {
-        //     const data = res.data;
-        //     if (data) {
-        //       this.formData = formData;
-        //       if (data.dataType === 'dynamic') {
-        //         if (data.type === 'assignee') { // 鎸囧畾浜哄憳
-        //           this.checkSendUser = true;
-        //           this.checkType = "single";
-        //         } else if (data.type === 'candidateUsers') {  // 鍊欓�変汉鍛�(澶氫釜)
-        //           this.checkSendUser = true;
-        //           this.checkType = "multiple";
-        //         } else if (data.type === 'candidateGroups') { // 鎸囧畾缁�(鎵�灞炶鑹叉帴鏀朵换鍔�)
-        //           this.checkSendRole = true;
-        //         } else { // 浼氱
-        //           // 娴佺▼璁捐鎸囧畾鐨� elementVariable 浣滀负浼氱浜哄憳鍒楄〃
-        //           this.multiInstanceVars = data.vars;
-        //           this.checkSendUser = true;
-        //           this.checkType = "multiple";
-        //         }
-        //         this.taskOpen = true;
-        //         this.taskTitle = "閫夋嫨浠诲姟鎺ユ敹";
-        //       } else {
-        //         if (this.procDefId) {
-        //           const param = {
-        //             formJson:  this.formJson,
-        //           }
-        //           // 澶嶅埗瀵硅薄鐨勫睘鎬у�肩粰鏂扮殑瀵硅薄
-        //           Object.assign(param, formData);
-        //           // 瀹屾垚浠诲姟
-        //           completeSubmitFormTask(this.taskId, param).then(res => {
-        //             this.$modal.msgSuccess(res.msg);
-        //             this.goBack();
-        //           })
-        //         }
-        //       }
-        //     }
-        //   })
-        // })
       }).catch((err) => {
         console.log(err)
         this.$message({

--
Gitblit v1.8.0