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