From b5b28e8b9c639f49e69efc60684e68bf642d1092 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 21 六月 2023 16:43:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/template/SetPersonnel.vue |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue
index 07ebde0..5718a6f 100644
--- a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue
+++ b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -73,6 +73,10 @@
     watch: {
         visible(n) {
             this.dialogVisible = n;
+            if(n){
+              this.apiInit()
+              this.apiDict()
+            }
         },
         dialogVisible(n) {
             this.$emit('update:visible', n)
@@ -98,8 +102,8 @@
     },
 
     mounted() {
-        this.apiInit()
-        this.apiDict()
+        // this.apiInit()
+        // this.apiDict()
     },
     methods: {
         saveParam() {
@@ -175,7 +179,13 @@
         },
         async apiSave() {
             try {
-                const response = await personnelSave(this.saveParam)
+                if(this.collectParam.flowTaskUsers.length ===0){
+                    this.$message({
+                    type: "error",
+                    message: "璇烽�夋嫨鑺傜偣锛�"
+                });
+                } else {
+                    const response = await personnelSave({...this.saveParam,flowTaskUsers:this.collectParam.flowTaskUsers})
                 if (response.status === 200) {
                     console.log(response)
                     this.$message({
@@ -184,12 +194,15 @@
                     });
                     this.done()
                 }
+                }
+                
             } catch {
                 console.error('鎺ュ彛璋冪敤澶辫触')
             }
         },
         handleClickTag(event) {
             console.log(event)
+            console.log('tasks', this.collectParam)
             const flowTaskUsers = event.flowTaskUsers//collet.flowTaskUsers
             let tasks =  this.collectParam.flowTaskUsers;//user
             for(let i=0;i<tasks.length;i++){
@@ -254,4 +267,4 @@
     justify-content: end;
     padding-bottom: 10px;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3