|
@@ -12,7 +12,7 @@
|
|
|
class="filter-view-item"
|
|
class="filter-view-item"
|
|
|
v-model="filter.pageVo.userType"
|
|
v-model="filter.pageVo.userType"
|
|
|
placeholder="User Type"
|
|
placeholder="User Type"
|
|
|
- @change="handleFilter"
|
|
|
|
|
|
|
+ @change="changeUserType"
|
|
|
clearable>
|
|
clearable>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in userTypeOptions"
|
|
v-for="item in userTypeOptions"
|
|
@@ -20,6 +20,19 @@
|
|
|
:label="item"
|
|
:label="item"
|
|
|
:value="item" />
|
|
:value="item" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ class="filter-view-item group-select"
|
|
|
|
|
+ :class="{hide: groupOptions.length == 0}"
|
|
|
|
|
+ v-model="filter.pageVo.groupPk"
|
|
|
|
|
+ placeholder="Group Name"
|
|
|
|
|
+ @change="handleFilter"
|
|
|
|
|
+ clearable>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="(item,index) in groupOptions"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.value"/>
|
|
|
|
|
+ </el-select>
|
|
|
<el-select
|
|
<el-select
|
|
|
class="filter-view-item"
|
|
class="filter-view-item"
|
|
|
v-model="filter.pageVo.filter"
|
|
v-model="filter.pageVo.filter"
|
|
@@ -251,11 +264,13 @@ export default {
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
pageVo: {
|
|
pageVo: {
|
|
|
filter: "",
|
|
filter: "",
|
|
|
|
|
+ groupPk: "",
|
|
|
criteria: "",
|
|
criteria: "",
|
|
|
userType: "",
|
|
userType: "",
|
|
|
dateRange: [],
|
|
dateRange: [],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ groupOptions: [],
|
|
|
filterOptions: [],
|
|
filterOptions: [],
|
|
|
userTypeOptions: [],
|
|
userTypeOptions: [],
|
|
|
listLoading: true,
|
|
listLoading: true,
|
|
@@ -291,6 +306,34 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ changeUserType() {
|
|
|
|
|
+ this.filter.pageVo.groupPk = "";
|
|
|
|
|
+ this.getGroupOptions();
|
|
|
|
|
+ },
|
|
|
|
|
+ getGroupOptions() {
|
|
|
|
|
+ if (this.filter.pageVo.userType == "") {
|
|
|
|
|
+ this.groupOptions = [];
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.listLoading = true;
|
|
|
|
|
+ apiUser.getGroupByType(this.filter.pageVo.userType).then(res => {
|
|
|
|
|
+ if (res.data) {
|
|
|
|
|
+ this.groupOptions = res.data
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.groupOptions = []
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: err,
|
|
|
|
|
+ type: 'error'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.groupOptions = []
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ }, 100)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getUserTypeOption() {
|
|
getUserTypeOption() {
|
|
|
apiUser.getUserTypeOptions().then(res => {
|
|
apiUser.getUserTypeOptions().then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
@@ -387,4 +430,13 @@ export default {
|
|
|
color: #0000FF;
|
|
color: #0000FF;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
|
|
+ .group-select {
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ transition: all .3s;
|
|
|
|
|
+ }
|
|
|
|
|
+ .group-select.hide {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ max-width: 0;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|