|
@@ -202,10 +202,10 @@
|
|
|
<el-table-column
|
|
|
label="状态"
|
|
|
align="center"
|
|
|
- prop="state"
|
|
|
+ prop="status"
|
|
|
:show-overflow-tooltip="true"
|
|
|
:formatter="stateFormat"
|
|
|
- v-if="uncheckList.state"
|
|
|
+ v-if="uncheckList.status"
|
|
|
/>
|
|
|
<!-- <el-table-column
|
|
|
label="状态"
|
|
@@ -286,6 +286,7 @@
|
|
|
>删除</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
+ v-if="scope.row.status == '0' "
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-key"
|
|
@@ -293,6 +294,15 @@
|
|
|
v-hasPermi="['system:user:resetPwd']"
|
|
|
>重置</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.status != '0' "
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-key"
|
|
|
+ @click="handleStatusChange(scope.row)"
|
|
|
+ v-hasPermi="['system:user:statusChange']"
|
|
|
+ >解冻</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -325,7 +335,7 @@
|
|
|
<el-form-item label="手机号" prop="userName">
|
|
|
<el-input
|
|
|
v-model="form.userName"
|
|
|
- placeholder="请输入登录手机号"
|
|
|
+ placeholder="请输入手机号"
|
|
|
maxlength="11"
|
|
|
:disabled="isUpdate"
|
|
|
/>
|
|
@@ -657,7 +667,7 @@ export default {
|
|
|
value: "部门",
|
|
|
},
|
|
|
{
|
|
|
- label: "state",
|
|
|
+ label: "status",
|
|
|
value: "状态",
|
|
|
},
|
|
|
{
|
|
@@ -715,7 +725,7 @@ export default {
|
|
|
userName: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "登陆名称不能为空",
|
|
|
+ message: "手机号不能为空",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
{
|
|
@@ -730,6 +740,11 @@ export default {
|
|
|
message: "用户姓名不能为空",
|
|
|
trigger: ["blur", "change"],
|
|
|
},
|
|
|
+ {
|
|
|
+ pattern: /^[A-Za-z\u4e00-\u9fa5]+$/,
|
|
|
+ message: "用户姓名不能带有特殊字符",
|
|
|
+ trigger: ["blur","change"]
|
|
|
+ }
|
|
|
],
|
|
|
deptId: [
|
|
|
{
|
|
@@ -891,6 +906,7 @@ export default {
|
|
|
},
|
|
|
/** 查询用户列表 */
|
|
|
getList() {
|
|
|
+ this.loading = true;
|
|
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
|
|
(response) => {
|
|
|
this.userList = response.rows;
|
|
@@ -923,20 +939,30 @@ export default {
|
|
|
},
|
|
|
// 用户状态修改
|
|
|
handleStatusChange(row) {
|
|
|
- let text = row.status === "0" ? "解冻" : "冻结";
|
|
|
- this.$confirm("确认要" + text + '"' + row.userName + '"用户吗?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
+ const userId = row.userId || this.ids;
|
|
|
+ const nickNames = row.nickName || this.ids;
|
|
|
+ const status = '0';
|
|
|
+ this.$confirm(
|
|
|
+ '是否确认解冻用户姓名为"' + nickNames + '"的数据项?',
|
|
|
+ "警告",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
.then(function () {
|
|
|
- return changeUserStatus(row.userId, row.status);
|
|
|
+ return changeUserStatus(userId, status);
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.msgSuccess(text + "成功");
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("解冻成功");
|
|
|
})
|
|
|
- .catch(function () {
|
|
|
- row.status = row.status === "0" ? "1" : "0";
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "已取消解冻",
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
// 取消按钮
|