|
@@ -101,6 +101,17 @@
|
|
|
v-hasPermi="['system:user:add']"
|
|
|
>批量新增</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleStatusChangeSh"
|
|
|
+ v-hasPermi="['system:user:edit']"
|
|
|
+ >批量审核</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="success"
|
|
@@ -175,6 +186,14 @@
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
<template slot-scope="scope" v-if="scope.row.userId !== 1">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.deptId == 110 && scope.row.status == '1'"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleStatusChangeSh(scope.row)"
|
|
|
+ v-hasPermi="['system:user:edit']"
|
|
|
+ >通过审核</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -550,13 +569,30 @@ export default {
|
|
|
handleStatusChange(row) {
|
|
|
let text = row.status === "0" ? "启用" : "停用";
|
|
|
this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
|
|
|
- return changeUserStatus(row.userId, row.status);
|
|
|
+ const ids = [];
|
|
|
+ ids.push(row.userId);
|
|
|
+ return changeUserStatus(ids, row.status);
|
|
|
}).then(() => {
|
|
|
this.$modal.msgSuccess(text + "成功");
|
|
|
}).catch(function() {
|
|
|
row.status = row.status === "0" ? "1" : "0";
|
|
|
});
|
|
|
},
|
|
|
+ handleStatusChangeSh(row) {
|
|
|
+ let ids = [];
|
|
|
+ if (row.userId) {
|
|
|
+ ids.push(row.userId)
|
|
|
+ } else {
|
|
|
+ ids = this.ids;
|
|
|
+ }
|
|
|
+ const text = "审核通过";
|
|
|
+ this.$modal.confirm('确认要"' + text + '""' + (row.userName ? row.userName : '选中的') + '"用户吗?').then(function() {
|
|
|
+ return changeUserStatus(ids, "0");
|
|
|
+ }).then(() => {
|
|
|
+ this.$modal.msgSuccess("审核成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|