Lijy 3 месяцев назад
Родитель
Сommit
4e75511261
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

+ 10 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -3980,7 +3980,6 @@ a {
 
             //确定选择参与人
             chooseParticip() {
-                this.chooseParticipVisible = false;
                 var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
                 if(this.searchPersonnelFlg) {
                     chosenList = [...chosenList, ...this.chosenListBackup]
@@ -4005,6 +4004,11 @@ a {
                 console.log(this.addForm.userId)
                 console.log(this.addForm.userNames)
                 console.log(this.addFormUserNames)
+
+                console.log(chosenList, '<===== chosenList')
+                // console.log(parentId)
+                this.addForm.deptIds = [...new Set(chosenList.map(item => item.parentId))].filter(item => item != 0);
+                this.chooseParticipVisible = false;
             },
 
             //选中相关领导
@@ -5047,6 +5051,7 @@ a {
                         manDay:0,
                         fromOutside: 0,
                         // deptId: []
+                        deptIds: []
                     }
                     this.estimatedWorkTime=''
                     for(var i in this.dataList) {
@@ -5183,7 +5188,8 @@ a {
                         manDay:item.manDay==null?0:item.manDay,
                         manDayStartDate:item.manDayStartDate,
                         manDayDisable:item.manDay,
-                        fromOutside:item.fromOutside
+                        fromOutside:item.fromOutside,
+                        deptIds: (item.departmentList || []).map(item => item.departmentId)
                     }
                     for(var i in this.dataList) {
                         var str = 'plate' + (+i + 1)
@@ -5601,6 +5607,8 @@ a {
                         if (this.addForm.reviwerId) {
                             formData.append('reviwerId', this.addForm.reviwerId);
                         }
+
+                        formData.append('deptIds', this.addForm.deptIds)
                         this.http.uploadFile(this.port.project.add,formData,
                         res => {
                             this.addLoading = false;