roleslistdiglog.vue
4.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<template>
<Dialog
:title="title"
class="tableClass"
:show.sync="visible"
:width="'715px'"
@close="close()"
>
<template slot="content">
<lb-table
ref="multipleTable"
:pagination="false"
:column="tableData.column"
:data="tableData.data"
@selection-change="handleSelectionChange"
>
</lb-table>
</template>
<template slot="footer">
<el-button type="primary" class="save" @click="handleSaveMember()"
>保存</el-button
>
<el-button class="cancel-button" @click="close()">取消</el-button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@/components/Dialog/";
export default {
name: "",
components: { Dialog },
props: {},
data() {
return {
title: "人员配置",
visible: false,
hasSelectList: [
{
name: "管理员",
loginName: "admin1",
departmentName: "研发部",
jobLevel: null,
},
{
name: "测试账号",
loginName: "admin2",
departmentName: "研发部",
jobLevel: null,
},
], //已经选择的id组成的数组
tableData: {
column: [
{
type: "selection",
},
{
prop: "name",
label: "姓名",
},
{
prop: "loginName",
label: "用户名",
},
{
prop: "departmentName",
label: "部门",
},
{
prop: "jobLevel",
label: "职务",
},
],
data: [
{
id: "3127e455-43ba-45ff-9326-0e02ef89485e",
createdAt: null,
updatedAt: "2022-08-04T03:38:27.626+0000",
createdBy: null,
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 1,
name: "超级管理员",
loginName: "admin",
password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59",
passwordSalt: "5178114777136485",
email: null,
lastLoginTime: null,
mobilePhone: "18291003568",
status: "ACTIVE",
passwordChangeTime: "2021-12-10T08:01:01.569+0000",
idCard: "612725202111021521",
departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
sex: "0",
isDuty: true,
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
isLocked: false,
departmentName: "研发部",
_X_ROW_KEY: "row_276",
},
{
name: "管理员",
loginName: "admin1",
departmentName: "研发部",
jobLevel: null,
selectStatus: 0,
},
{
name: "测试账号",
loginName: "admin2",
departmentName: "研发部",
jobLevel: null,
selectStatus: 0,
},
],
},
multipleSelection: [],
};
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
adds() {
this.visible = true;
this.tableData.data.forEach((item, index) => {
if (item.selectStatus === 0) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(
this.tableData.data[index],
true
);
});
}
});
},
close() {
this.visible = false;
},
// 保存事件
handleSaveMember() {
// if (this.memberList.length === 0) {
// this.$message.warning("请添加待选人员");
// return false;
// }
// const idList = this.memberList.map(item => item.id)
// updateUser(this.roleId, idList).then(res => {
// if (res.status === 1) {
// this.$message.success({ message: '保存成功', showClose: true })
// this.showMemberConfigDialog = false
// this.$emit('setUsers', this.roleId)
// this.resetMemberConfig()
// } else this.$message.error({ message: res.message, showClose: true })
// })
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
},
};
</script>
<style scoped lang="scss">
/deep/.el-dialog__header{
text-align: center;
margin-bottom: 10px;
.el-dialog__title{
color: white;
}
}
</style>