This commit is contained in:
liuye
2023-09-06 17:44:39 +08:00
parent 39ad7e3a2f
commit 8753f74791
2 changed files with 12 additions and 19 deletions

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" @visible-change="totalDeptSelect"></el-cascader>
:props="defaultProps" :show-all-levels="false" @change="totalDeptSelect"></el-cascader>
</el-row>
</template>
</ai-title>
@@ -34,7 +34,7 @@
<span class="shortcut" v-for="(item,i) in timeCheck" :key="i" :class="{active:type==i}"
@click="timeChange(i)" v-text="item"/>
<el-cascader ref="cascader2" clearable v-model="deptList" :options="deptOptions" placeholder="所属部门" size="small"
:props="defaultProps" :show-all-levels="false" @visible-change="deptSelect"></el-cascader>
:props="defaultProps" :show-all-levels="false" @change="deptSelect"></el-cascader>
</el-row>
</template>
</ai-title>
@@ -355,15 +355,11 @@ export default {
});
return result;
},
totalDeptSelect(val) {
if(!val) {
this.getTotal()
}
totalDeptSelect() {
this.getTotal()
},
deptSelect(val) {
if(!val) {
this.getStatistics()
}
deptSelect() {
this.getStatistics()
},
timeChange(index) {
this.type = index

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" @visible-change="totalDeptSelect"></el-cascader>
:props="defaultProps" :show-all-levels="false" @change="totalDeptSelect"></el-cascader>
</el-row>
</template>
</ai-title>
@@ -359,15 +359,12 @@ export default {
this.isTypeInit = true
this.getStatistics()
},
totalDeptSelect(val) {
if(!val) {
this.getTotal()
}
totalDeptSelect() {
this.getTotal()
},
deptSelect(val) {
if(!val) {
this.getStatistics()
}
deptSelect() {
this.getStatistics()
},
timeChange(index) {
this.type = index