From 2cd8b0ca2746c6f4467995e2f0ed7bd62aa77131 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期日, 09 三月 2025 11:50:59 +0800
Subject: [PATCH] 容缺查询,TODO:容缺完成时调新的接口

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

diff --git a/src/views/flowable/task/myProcess/send/index.vue b/src/views/flowable/task/myProcess/send/index.vue
index 02da72f..74d9240 100644
--- a/src/views/flowable/task/myProcess/send/index.vue
+++ b/src/views/flowable/task/myProcess/send/index.vue
@@ -18,11 +18,11 @@
                   <div class="op-list">
                     <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '鎸傝捣' || 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" :disabled="formDataObj.taskStatus === '鎸傝捣'" @click="openDelegation(formDataList[0].beforeNodeName)">杞姙</el-button>
-                    <el-button v-if="formDataObj.canJump" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="jumpTask()">璺宠繃</el-button>
-                    <el-button v-if="formDataObj.canWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" >瀹圭己</el-button>
-                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '鎸傝捣'" size="small" type="primary" @click="hangup">鎸傝捣</el-button>
-                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="cancelHangup">缁撴潫鎸傝捣</el-button>
+                    <el-button size="small" type="primary" v-if="!isWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" @click="openDelegation(formDataList[0].beforeNodeName)">杞姙</el-button>
+                    <el-button v-if="formDataObj.canJump && !isWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="jumpTask()">璺宠繃</el-button>
+                    <el-button v-if="formDataObj.canWait && !isWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="waitTask()">瀹圭己</el-button>
+                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '鎸傝捣' && !isWait" size="small" type="primary" @click="hangup">鎸傝捣</el-button>
+                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '鎸傝捣' && !isWait" size="small" type="primary" @click="cancelHangup">缁撴潫鎸傝捣</el-button>
                   </div>
                   <div class="current">褰撳墠闃舵锛�<span>{{formDataObj.beforeNodeName}}</span><span v-if="formDataObj.taskStatus === 'HANGUP'">锛堟寕璧蜂腑锛�</span></div>
                 </div>
@@ -30,19 +30,18 @@
                   <!--     鍓嶇疆鑺傜偣鍙┏鍥�         -->
                   <div class="reject-but">
                     <el-button type="danger" size="small" @click="openRejectTask(formDataObj.beforeNodeName)">椹� 鍥�</el-button>
-                    <div style="margin-left: 10px" v-if="formDataObj.events.length > 0">
-                      <el-popover
-                        placement="right-start"
-                        title="浠诲姟鏃ュ織"
-                        width="600"
-                        trigger="hover"
-                      >
-                        <div v-if="formDataObj.events.length > 0">
-                          <log-view :log-list="formDataObj.events"/>
-                        </div>
-                        <el-button slot="reference">浠诲姟鏃ュ織</el-button>
-                      </el-popover>
-                    </div>
+                    <el-popover
+                      style="margin-left: 10px" v-if="formDataObj.events.length > 0"
+                      placement="right-start"
+                      title="浠诲姟鏃ュ織"
+                      width="800"
+                      trigger="hover"
+                    >
+                      <div v-if="formDataObj.events.length > 0">
+                        <log-view :log-list="formDataObj.events"/>
+                      </div>
+                      <el-button slot="reference">浠诲姟鏃ュ織</el-button>
+                    </el-popover>
                   </div>
                   <div class="before">鍓嶇疆闃舵锛�<span>{{formDataObj.beforeNodeName}}</span></div>
                 </div>
@@ -189,8 +188,9 @@
 import {completeSubmitFormTask} from "@/api/flowable/process";
 import { flowTaskForm } from "@/api/flowable/todo";
 import {getNextFlowNodeByStart} from "@/api/flowable/todo";
+import LogView from "@/views/projectProcess/components/LogView";
 import {rejectTask} from "@/api/flowable/process";
-import {cancelTaskHangup, taskDelegation, taskHangup, taskJump} from "@/api/projectProcess/projectProcess";
+import {cancelTaskHangup, taskDelegation, taskHangup, taskJump, taskWait} from "@/api/projectProcess/projectProcess";
 
 export default {
   name: "Record",
@@ -200,10 +200,12 @@
     MyDept,
     SingleUser,
     MultUser,
+    LogView
   },
   props: {},
   data() {
     return {
+      isWait: false,
       jumpDesc: '', // 璺宠繃璇存槑
       rejectLoading: false, // 椹冲洖鎸夐挳鍔犺浇
       submitLoading: false, // 鎻愪氦鎸夐挳鍔犺浇
@@ -287,6 +289,7 @@
     this.procDefId  = this.$route.query && this.$route.query.procDefId;
     this.procInsId  = this.$route.query && this.$route.query.procInsId;
     this.goBackParams  = this.$route.query && this.$route.query.goBackParams;
+    this.isWait = this.$route.query && this.$route.query.isWait;
     // this.getNextFlowNodeByStart(this.deployId);
     this.getFlowFormData(this.taskId);
   },
@@ -335,6 +338,30 @@
         })
       })
     },
+    // 瀹圭己浠诲姟
+    waitTask() {
+      this.$prompt('澶囨敞璇存槑', '纭畾瑕佸缂烘浠诲姟鍚�', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        inputType: 'textarea'
+      }).then(({ value }) => {
+        let waitForm = {
+          taskId: this.taskId,
+          projectId: this.projectId,
+          processInsId: this.procInsId,
+          desc: value
+        }
+        taskWait(waitForm).then(res => {
+          this.$message.success("鎿嶄綔鎴愬姛")
+          this.goBack()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝缂烘搷浣�'
+        });
+      });
+    },
     // 璺宠繃浠诲姟
     jumpTask() {
       this.$prompt('澶囨敞璇存槑', '纭畾瑕佽烦杩囨浠诲姟鍚�', {

--
Gitblit v1.8.0