|
|
@ -193,11 +193,29 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="白名单"
|
|
|
|
|
|
|
|
key="whiteList"
|
|
|
|
|
|
|
|
v-if="columns[6].visible"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template v-slot="scope">
|
|
|
|
|
|
|
|
<el-switch
|
|
|
|
|
|
|
|
v-model="scope.row.whiteList"
|
|
|
|
|
|
|
|
active-color="#13ce66"
|
|
|
|
|
|
|
|
inactive-color="#ff4949"
|
|
|
|
|
|
|
|
:active-value="0"
|
|
|
|
|
|
|
|
:inactive-value="1"
|
|
|
|
|
|
|
|
@change="handleWhiteListChange(scope.row)"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
label="创建时间"
|
|
|
|
label="创建时间"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
prop="createTime"
|
|
|
|
prop="createTime"
|
|
|
|
v-if="columns[6].visible"
|
|
|
|
v-if="columns[7].visible"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template v-slot="scope">
|
|
|
|
<template v-slot="scope">
|
|
|
@ -464,6 +482,7 @@
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
addUser,
|
|
|
|
addUser,
|
|
|
|
changeUserStatus,
|
|
|
|
changeUserStatus,
|
|
|
|
|
|
|
|
changeUserWhiteList,
|
|
|
|
delUser,
|
|
|
|
delUser,
|
|
|
|
exportUser,
|
|
|
|
exportUser,
|
|
|
|
getUser,
|
|
|
|
getUser,
|
|
|
@ -543,6 +562,7 @@ export default {
|
|
|
|
username: undefined,
|
|
|
|
username: undefined,
|
|
|
|
mobile: undefined,
|
|
|
|
mobile: undefined,
|
|
|
|
status: undefined,
|
|
|
|
status: undefined,
|
|
|
|
|
|
|
|
whiteList: undefined,
|
|
|
|
deptId: undefined,
|
|
|
|
deptId: undefined,
|
|
|
|
createTime: [],
|
|
|
|
createTime: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -554,7 +574,8 @@ export default {
|
|
|
|
{ key: 3, label: `部门`, visible: true },
|
|
|
|
{ key: 3, label: `部门`, visible: true },
|
|
|
|
{ key: 4, label: `手机号码`, visible: true },
|
|
|
|
{ key: 4, label: `手机号码`, visible: true },
|
|
|
|
{ key: 5, label: `状态`, visible: true },
|
|
|
|
{ key: 5, label: `状态`, visible: true },
|
|
|
|
{ key: 6, label: `创建时间`, visible: true },
|
|
|
|
{ key: 6, label: `白名单`, visible: true },
|
|
|
|
|
|
|
|
{ key: 7, label: `创建时间`, visible: true },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
@ -676,6 +697,27 @@ export default {
|
|
|
|
: CommonStatusEnum.ENABLE;
|
|
|
|
: CommonStatusEnum.ENABLE;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 白名单状态修改
|
|
|
|
|
|
|
|
handleWhiteListChange(row) {
|
|
|
|
|
|
|
|
let text = row.whiteList === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
|
|
|
|
|
|
|
this.$modal
|
|
|
|
|
|
|
|
.confirm(
|
|
|
|
|
|
|
|
'确认要"' + text + '""' + row.username + '"用户的token白名单吗?'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.then(function () {
|
|
|
|
|
|
|
|
return changeUserWhiteList(row.id, row.whiteList);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("token白名单"+text + "成功");
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(function () {
|
|
|
|
|
|
|
|
row.whiteList =
|
|
|
|
|
|
|
|
row.whiteList === CommonStatusEnum.ENABLE
|
|
|
|
|
|
|
|
? CommonStatusEnum.DISABLE
|
|
|
|
|
|
|
|
: CommonStatusEnum.ENABLE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
@ -698,6 +740,7 @@ export default {
|
|
|
|
email: undefined,
|
|
|
|
email: undefined,
|
|
|
|
sex: undefined,
|
|
|
|
sex: undefined,
|
|
|
|
status: "0",
|
|
|
|
status: "0",
|
|
|
|
|
|
|
|
whiteList: "0",
|
|
|
|
remark: undefined,
|
|
|
|
remark: undefined,
|
|
|
|
postIds: [],
|
|
|
|
postIds: [],
|
|
|
|
roleIds: [],
|
|
|
|
roleIds: [],
|
|
|
|