报告管理-权限:增加全选
This commit is contained in:
@@ -341,8 +341,13 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="权限:" required>
|
<el-form-item label="权限:" required>
|
||||||
<el-select v-model="reportF.reportUserIdList" class="icon-auth" multiple collapse-tags
|
<el-select v-model="reportF.reportUserIdList"
|
||||||
|
class="icon-auth"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
@change="changeSelect"
|
||||||
placeholder="请选择">
|
placeholder="请选择">
|
||||||
|
<el-checkbox class="check-all" v-model="checked" @change='selectAll'>全选</el-checkbox>
|
||||||
<template v-for="item in userList">
|
<template v-for="item in userList">
|
||||||
<el-option :label="item.ACCOUNT" :value="item.USID" :key="item.USID"></el-option>
|
<el-option :label="item.ACCOUNT" :value="item.USID" :key="item.USID"></el-option>
|
||||||
</template>
|
</template>
|
||||||
@@ -474,10 +479,27 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
yearList: [],
|
yearList: [],
|
||||||
dialogPreview: false,
|
dialogPreview: false,
|
||||||
content: ''
|
content: '',
|
||||||
|
/* 权限全选 */
|
||||||
|
checked: false,
|
||||||
|
mulSelecteds: [], // 已选中选项
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/* 权限全选 */
|
||||||
|
selectAll() {
|
||||||
|
this.reportF.reportUserIdList = [];
|
||||||
|
if (this.checked) {
|
||||||
|
this.userList.forEach((item) => { this.reportF.reportUserIdList.push(item.USID )});
|
||||||
|
} else {
|
||||||
|
this.reportF.reportUserIdList = [];
|
||||||
|
}
|
||||||
|
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
|
||||||
|
},
|
||||||
|
changeSelect(val) {
|
||||||
|
this.checked = val.length === this.userList.length;
|
||||||
|
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
|
||||||
|
},
|
||||||
init() {
|
init() {
|
||||||
this.labelList();
|
this.labelList();
|
||||||
this.reset();
|
this.reset();
|
||||||
@@ -978,6 +1000,10 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.check-all {
|
||||||
|
text-align: right;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
.report-manager {
|
.report-manager {
|
||||||
.title {
|
.title {
|
||||||
border-bottom: 1px solid #EBEEF5;
|
border-bottom: 1px solid #EBEEF5;
|
||||||
|
|||||||
Reference in New Issue
Block a user