Selaa lähdekoodia

剩余假期表更改部门选择方式

Lijy 2 vuotta sitten
vanhempi
commit
ffe5f9712e
1 muutettua tiedostoa jossa 18 lisäystä ja 4 poistoa
  1. 18 4
      fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

+ 18 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -555,12 +555,13 @@
                 <span>{{ $t('departmentofscreening') }}</span>
                 <el-cascader
                 size="small"
+                collapse-tags 
                 @change="departmentOptionsChg"
                 v-model="departmentSel"
                 :options="departmentOptions"
                 :placeholder="$t('qing-xuan-ze-bu-men')"
                 :show-all-levels="false"
-                :props="{ checkStrictly: true }"
+                :props="{ multiple: true }"
                 clearable></el-cascader>
               </div>
               <div>
@@ -930,8 +931,14 @@ export default {
       let param = {
         leaveCode: this.leaveTypeItem,
         companyId: this.user.companyId,
-        departmentId: this.departmentSel ? this.departmentSel[this.departmentSel.length - 1] : '',
+        // departmentId: this.departmentSel ? this.departmentSel[this.departmentSel.length - 1] : '',
       }
+      let arrList = []
+      for(let i in this.departmentSel) {
+        arrList.push(this.departmentSel[i][this.departmentSel[i].length - 1])
+      }
+      console.log(arrList, '处理好的')
+      param.departmentId = arrList
       if(this.userSelId != '') {
         param.userId = this.userSelId
       }
@@ -1034,9 +1041,16 @@ export default {
           pageIndex: this.page,
           leaveCode: this.leaveTypeItem
         }
-        if(this.departmentSel.length != 0){
-          item.departmentId = this.departmentSel[this.departmentSel.length - 1]
+        console.log(this.departmentSel, '甚于')
+        // if(this.departmentSel.length != 0){
+        //   item.departmentId = this.departmentSel[this.departmentSel.length - 1]
+        // }
+        let arrList = []
+        for(let i in this.departmentSel) {
+          arrList.push(this.departmentSel[i][this.departmentSel[i].length - 1])
         }
+        console.log(arrList, '处理好的')
+        item.departmentId = arrList
         if(this.userSelId != ''){
           item.userId = this.userSelId
         }