From 6e61b49f9cddbda65bad95af5d6300265384c37f Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 28 十月 2025 09:28:35 +0800
Subject: [PATCH] 页面
---
admin/src/views/system/user.vue | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/system/user.vue b/admin/src/views/system/user.vue
index 1e69dc9..8a27ad8 100644
--- a/admin/src/views/system/user.vue
+++ b/admin/src/views/system/user.vue
@@ -81,6 +81,25 @@
</ul>
</template>
</el-table-column>
+ <el-table-column prop="prohibitStatus" label="绂佹鐧诲綍" min-width="160px" class-name="table-column-strings">
+ <template slot-scope="{row}">
+ <el-switch
+ v-model="row.prohibitStatus"
+ @change="changeStatus($event, row.id)"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ :active-value="0"
+ :inactive-value="1">
+ </el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column prop="prohibitRemark" label="绂佺敤澶囨敞" min-width="100px"></el-table-column>
+ <el-table-column label="鍒濆鍖栧瘑鐮�" min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.needChangePwd === 0">{{row.firstPassword}}</span>
+ <span v-else>-</span>
+ </template>
+ </el-table-column>
<el-table-column prop="createUser" label="鍒涘缓浜�" min-width="100px">
<template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template>
</el-table-column>
@@ -128,6 +147,7 @@
import DepartmentSelect from '@/components/common/DepartmentSelect'
import PositionSelect from '@/components/common/PositionSelect'
import { fetchAll as fetchAllRoles, fetchAll } from '@/api/system/role'
+import { updUserProhibitStatus } from '@/api/system/user'
export default {
name: 'SystemUser',
extends: BaseTable,
@@ -165,6 +185,18 @@
.catch(e => {
this.$tip.apiFailed(e)
})
+ },
+ methods: {
+ changeStatus(prohibitStatus, id) {
+ console.log(id)
+ console.log(prohibitStatus)
+ updUserProhibitStatus({
+ prohibitStatus,
+ id
+ }).then(res => {
+ this.search()
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3