This commit is contained in:
liuye
2023-09-06 13:36:05 +08:00
parent 27be7e63fc
commit f05e036bd0

View File

@@ -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