|
@@ -1,13 +1,13 @@
|
|
|
-import { ManagerItem } from '/@/api/sys/model/managerModel'
|
|
|
+import { ComputedRef } from 'vue'
|
|
|
+import { ManagerItem, PermGroupItem } from '/@/api/sys/model/managerModel'
|
|
|
import Icon from '/@/components/Icon'
|
|
|
import { BasicColumn } from '/@/components/Table/src/types/table'
|
|
|
import { formatToDateTime } from '/@/utils/dateUtil'
|
|
|
-export function getTableColumns(fn: (item: ManagerItem) => void): BasicColumn[] {
|
|
|
+export function getTableColumns(
|
|
|
+ fn: (item: ManagerItem) => void,
|
|
|
+ permGroupList: ComputedRef<PermGroupItem[]>
|
|
|
+): BasicColumn[] {
|
|
|
return [
|
|
|
- // {
|
|
|
- // dataIndex: 'id',
|
|
|
- // title: 'Id'
|
|
|
- // },
|
|
|
{
|
|
|
dataIndex: 'username',
|
|
|
title: '用户名 (CLD)'
|
|
@@ -29,7 +29,7 @@ export function getTableColumns(fn: (item: ManagerItem) => void): BasicColumn[]
|
|
|
{
|
|
|
dataIndex: 'groupId',
|
|
|
title: '用户组',
|
|
|
- customRender: ({ text }) => <span>{text === 1 ? '超级管理员' : '管理员改'}</span>
|
|
|
+ customRender: ({ text }) => <span>{permGroupList.value.find(item => item.id === text)?.name}</span>
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'opreate',
|