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