From 161303516b19449c300ec56920a3336820d50f5c Mon Sep 17 00:00:00 2001
From: ni ziyi <310925901@qq.com>
Date: Tue, 13 Jan 2026 10:42:54 +0800
Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A7=9F=E6=88=B7=E9=80=89=E6=8B=A9):=20?=
=?UTF-8?q?=E5=9C=A8=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E4=B8=AD=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E7=A7=9F=E6=88=B7=E7=9A=84=E4=B8=8B=E6=8B=89=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=EF=BC=8C=E8=8B=A5=E4=B8=8D=E9=80=89=E6=8B=A9=E7=A7=9F?=
=?UTF-8?q?=E6=88=B7=E5=88=99=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2=E6=89=80?=
=?UTF-8?q?=E6=9C=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/user/index.vue | 34 +++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 1118839..c65eb54 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -62,6 +62,11 @@
+
+
+ {{ getTenantName(scope.row.tenantId) }}
+
+
@@ -117,11 +122,21 @@
+
+
+
+
+
+
+
+
+
+
@@ -217,6 +232,7 @@
import { getToken } from "@/utils/auth"
import useAppStore from '@/store/modules/app'
import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect } from "@/api/system/user"
+import { listTenant } from "@/api/business/tenant"
import { Splitpanes, Pane } from "splitpanes"
import "splitpanes/dist/splitpanes.css"
@@ -241,6 +257,7 @@ const enabledDeptOptions = ref(undefined)
const initPassword = ref(undefined)
const postOptions = ref([])
const roleOptions = ref([])
+const tenantOptions = ref([])
/*** 用户导入参数 */
const upload = reactive({
// 是否显示弹出层(用户导入)
@@ -262,6 +279,7 @@ const columns = ref({
userName: { label: '用户名称', visible: true },
nickName: { label: '用户昵称', visible: true },
deptName: { label: '部门', visible: true },
+ tenantName: { label: '所属租户', visible: true },
phonenumber: { label: '手机号码', visible: true },
status: { label: '状态', visible: true },
createTime: { label: '创建时间', visible: true }
@@ -317,6 +335,20 @@ function getDeptTree() {
})
}
+/** 查询租户列表 */
+function getTenantList() {
+ listTenant({ status: '0' }).then(response => {
+ tenantOptions.value = response.rows || []
+ })
+}
+
+/** 获取租户名称 */
+function getTenantName(tenantId) {
+ if (!tenantId) return '平台管理员'
+ const tenant = tenantOptions.value.find(t => t.tenantId === tenantId)
+ return tenant ? tenant.tenantName : '-'
+}
+
/** 过滤禁用的部门 */
function filterDisabledDept(deptList) {
return deptList.filter(dept => {
@@ -480,6 +512,7 @@ function reset() {
form.value = {
userId: undefined,
deptId: undefined,
+ tenantId: undefined,
userName: undefined,
nickName: undefined,
password: undefined,
@@ -551,6 +584,7 @@ function submitForm() {
onMounted(() => {
getDeptTree()
+ getTenantList()
getList()
proxy.getConfigKey("sys.user.initPassword").then(response => {
initPassword.value = response.msg