Преглед изворни кода

部门筛选转译不生效的问题修改

Min пре 11 месеци
родитељ
комит
3495a78957
1 измењених фајлова са 26 додато и 6 уклоњено
  1. 26 6
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

+ 26 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1426,12 +1426,12 @@
               <!-- 222 -->
             </div>
             <div>
+                <el-cascader v-if="user.userNameNeedTranslate != 1" :size="'small'" v-model="deptIdForHasReport" placeholder="请选择部门" :options="departmentList" :props="{ checkStrictly: true, value: 'id' }" clearable style="width: 200px;" @change="showMonthWorkTime()"></el-cascader>
+                <vueCascader :subjectId="deptIdForHasReport" :size="'small'" :widthStr="'200'" :clearable="true" :subject="trandepartmentList" :radios="true" :distinction="'14'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" :selectNameChuan="$t('other.allDepartments')"></vueCascader>
                 <el-input style="float:left;width:22%" v-if="user.userNameNeedTranslate != '1'" v-model="searchKeyword" @keyup.enter.native="searchScreen(0)" class="input-with-select" :placeholder="$t('defaultText.pleaseEnterNametoSearch')" clearable="true" size="small">
                     <el-button slot="append" @click="searchScreen(0)" icon="el-icon-search"></el-button>
                 </el-input>
                 <selectCat v-if="user.userNameNeedTranslate == '1'" :filterable="true"  :searchBoxTop="'1'" :size="'small'" :subject="usersList" :subjectId="usersListId" :distinction="'12'" :clearable="true" @selectCal="selectCal"></selectCat>
-                <el-cascader v-if="user.userNameNeedTranslate != 1" :size="'small'" v-model="deptIdForHasReport" placeholder="请选择部门" :options="departmentList" :props="{ checkStrictly: true, value: 'id' }" clearable style="width: 200px;" @change="showMonthWorkTime()"></el-cascader>
-                <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" :selectNameChuan="$t('other.allDepartments')" @change="showMonthWorkTime()"></vueCascader>
             </div>
             <div style="float: right; vertical-align: middle;height:32px">
               <el-link
@@ -1606,7 +1606,7 @@
             <div>
                 <div style="margin-top:10px;">
                     <el-cascader v-if="user.userNameNeedTranslate != 1" :size="'small'" v-model="deptIdForNoReport" placeholder="请选择部门" :options="departmentList" :props="{ checkStrictly: true, value: 'id' }" clearable style="width: 200px;" @change="showMonthNotWorkTime()"></el-cascader>
-                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" :selectNameChuan="$t('other.allDepartments')" @change="showMonthNotWorkTime()"></vueCascader>
+                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="trandepartmentList" :radios="true" :distinction="'15'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" :selectNameChuan="$t('other.allDepartments')"></vueCascader>
                     <el-input style="width:200px;margin-left: 15px" v-if="user.userNameNeedTranslate != '1'" @keyup.enter.native="searchScreen(1)" v-model="searchKeyword" class="input-with-select" :placeholder="$t('defaultText.pleaseEnterNametoSearch')" clearable="true" size="small">
                         <el-button slot="append" @click="searchScreen(1)" icon="el-icon-search"></el-button>
                     </el-input>
@@ -1694,12 +1694,12 @@
             </div>
             <div>
                 <div style="margin-top:10px;">
+                    <el-cascader v-if="user.userNameNeedTranslate != 1" :size="'small'" v-model="deptIdForReminder" placeholder="请选择部门" :options="departmentList" :props="{ checkStrictly: true, value: 'id' }" clearable style="width: 200px;" @change="showMonthWorkTimeReminder()"></el-cascader>
+                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="trandepartmentList" :radios="true" :distinction="'16'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" :selectNameChuan="$t('other.allDepartments')"></vueCascader>
                     <el-input style="float:left;width:18%" v-if="user.userNameNeedTranslate != '1'" @keyup.enter.native="searchScreen(0)" v-model="searchKeyword" class="input-with-select" :placeholder="$t('defaultText.pleaseEnterNametoSearch')" clearable="true" size="small">
                         <el-button slot="append" @click="searchScreen(0)" icon="el-icon-search"></el-button>
                     </el-input>
                     <selectCat v-if="user.userNameNeedTranslate == '1'" :filterable="true"  :searchBoxTop="'1'" :size="'small'" :subject="usersList" :subjectId="usersListId" :distinction="'12'" :clearable="true" @selectCal="selectCal"></selectCat>
-                    <el-cascader v-if="user.userNameNeedTranslate != 1" :size="'small'" v-model="deptIdForReminder" placeholder="请选择部门" :options="departmentList" :props="{ checkStrictly: true, value: 'id' }" clearable style="width: 200px;" @change="showMonthWorkTimeReminder()"></el-cascader>
-                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" :selectNameChuan="$t('other.allDepartments')" @change="showMonthWorkTimeReminder()"></vueCascader>
                     <el-checkbox v-model="isReminder" @change="showMonthWorkTimeReminder()">是否异常</el-checkbox>
                 </div>
             </div>
@@ -2423,6 +2423,7 @@
 
                 notifySelList:[],
                 departmentList: [],
+                trandepartmentList:[],
 
                 approvalProcessDialog: false,
                 approvalProcessData: [],
@@ -5278,6 +5279,7 @@
                         }
                         this.departmentList = JSON.parse(JSON.stringify(res.data))
                         var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
+                        this.trandepartmentList=this.changeArr(JSON.parse(JSON.stringify(res.data)))
                         // let noAllData = JSON.parse(JSON.stringify(res.data));
                         // if (this.user.role > 0) {
                             
@@ -8493,7 +8495,7 @@
                 this.workForm.domains[obj.idx].projectAuditorId = obj.id
             },
             vueCasader(obj) {
-                console.log(obj, '看看值')
+                console.log(obj, '看看值', this.departmentList)
                 if(obj.distinction == 1 && obj.item) {
                     let arr = []
                     arr.push(obj.item.value)
@@ -8504,6 +8506,24 @@
                     const { id, other } = obj
                     this.workForm.domains[other].reportTargetDeptId = id
                 }
+                if(obj.distinction == '14' && obj) {
+                    let arr = []
+                    arr.push(obj.id)
+                    this.deptIdForHasReport = arr
+                    this.showMonthWorkTime()
+                }
+                if(obj.distinction == '15' && obj) {
+                    let arr = []
+                    arr.push(obj.id)
+                    this.deptIdForNoReport = arr
+                    this.showMonthNotWorkTime()
+                }
+                if(obj.distinction == '16' && obj) {
+                    let arr = []
+                    arr.push(obj.id)
+                    this.deptIdForReminder = arr
+                    this.showMonthWorkTimeReminder()
+                }
             },
             //分页
             handleCurrentChange(val) {