统计
This commit is contained in:
		| @@ -5,7 +5,7 @@ | ||||
|         <template #rightBtn> | ||||
|           <el-row type="flex" align="middle"> | ||||
|             <el-cascader ref="cascader1" clearable v-model="totalDeptList" :options="deptOptions" placeholder="所属部门" size="small" | ||||
|               :props="defaultProps" :show-all-levels="false" @change="totalDeptSelect"></el-cascader> | ||||
|               :props="defaultProps" :show-all-levels="false" @visible-change="totalDeptSelect"></el-cascader> | ||||
|           </el-row> | ||||
|         </template> | ||||
|       </ai-title> | ||||
| @@ -150,7 +150,7 @@ export default { | ||||
|   methods: { | ||||
|     getStatisticsToatl() { | ||||
|       console.log(1) | ||||
|       var totalDepartmentId = this.totalDeptList && this.totalDeptList.length ? this.totalDeptList[0] : '' | ||||
|       var totalDepartmentId = this.totalDeptList.length ? this.totalDeptList[this.totalDeptList.length-1] : '' | ||||
|       this.instance.post(`/app/appsessionarchivekeywordrecord/statistics1?departmentId=${totalDepartmentId}`).then(res => { | ||||
|         if (res?.data) { | ||||
|           console.log(res) | ||||
| @@ -345,7 +345,7 @@ export default { | ||||
|         map[item.id] = item; | ||||
|       }); | ||||
|       data.forEach(item => { | ||||
|         let parent = map[item.parentGirdId]; | ||||
|         let parent = map[item.parentid]; | ||||
|         if (parent) { | ||||
|           (parent.children || (parent.children = [])).push(item); | ||||
|         } else { | ||||
| @@ -355,10 +355,9 @@ export default { | ||||
|       return result; | ||||
|     }, | ||||
|     totalDeptSelect(val) { | ||||
|       console.log(123) | ||||
|       this.totalDeptList = val | ||||
|       this.$refs.cascader1.dropDownVisible = false; | ||||
|       this.getStatisticsToatl() | ||||
|       if(!val) { | ||||
|         this.getStatisticsToatl() | ||||
|       } | ||||
|     }, | ||||
|     deptSelect(val) { | ||||
|       this.deptList = val | ||||
|   | ||||
		Reference in New Issue
	
	Block a user