Browse Source

调整添加参与人任务看板不更新的问题

Lijy 2 years ago
parent
commit
b0a1b534bd

+ 11 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue

@@ -975,11 +975,20 @@
                 this.addLoading = true;
                 let formData = new FormData();
                 formData.append("id", this.curProjectId);
+                console.log(this.addMembForm.userId, '要传过去的数据')
                 if(this.addMembForm.userId.length != 0) {
                     for(var j in this.addMembForm.userId) {
                         formData.append("userId", this.addMembForm.userId[j]);
                     }
+                } else {
+                    this.addLoading = false;
+                    this.$message({
+                        message: '请选择参与者',
+                        type: 'warning'
+                    });
+                    return
                 }
+                // return
                 this.http.uploadFile('/project/addMemb',formData,
                 res => {
                     this.addLoading = false;
@@ -988,8 +997,10 @@
                             message: "添加成功",
                             type: "success"
                         });
+                        this.addMembForm.userId = []
                         this.addMembVisible = false;
                         this.getProjectInfo();
+                        this.$parent.$parent.$parent.getDetail(); // 调用父级页面的方法
                     } else {
                         this.$message({
                             message: res.msg,

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -2904,7 +2904,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                 })
                 .catch(() => {});
             },
-
+ 
             detail(i) {
                 this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
             },