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

View File

@@ -5,7 +5,7 @@
<template #rightBtn> <template #rightBtn>
<el-row type="flex" align="middle"> <el-row type="flex" align="middle">
<el-cascader ref="cascader1" clearable v-model="totalDeptList" :options="deptOptions" placeholder="所属部门" size="small" <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> </el-row>
</template> </template>
</ai-title> </ai-title>
@@ -359,15 +359,12 @@ export default {
this.isTypeInit = true this.isTypeInit = true
this.getStatistics() this.getStatistics()
}, },
totalDeptSelect(val) { totalDeptSelect() {
if(!val) {
this.getTotal() this.getTotal()
}
}, },
deptSelect(val) { deptSelect() {
if(!val) {
this.getStatistics() this.getStatistics()
}
}, },
timeChange(index) { timeChange(index) {
this.type = index this.type = index