This commit is contained in:
@@ -2,10 +2,10 @@ import type {
|
||||
ProColumns,
|
||||
ProFormColumnsType,
|
||||
} from '@ant-design/pro-components';
|
||||
import { DatePicker, Modal, Popconfirm } from 'antd';
|
||||
import { FormInstance } from 'antd/lib';
|
||||
import { Tag } from 'antd';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import { deleteTenant, type TenantVO } from '@/services/system/tenant/list';
|
||||
import type { TenantVO } from '@/services/system/tenant/list';
|
||||
import { getTenantPackageList } from '@/services/system/tenant/package';
|
||||
|
||||
export const baseTenantColumns: ProColumns<TenantVO>[] = [
|
||||
@@ -29,8 +29,22 @@ export const baseTenantColumns: ProColumns<TenantVO>[] = [
|
||||
request: async () => {
|
||||
const packageList: { id: number; name: string }[] =
|
||||
await getTenantPackageList();
|
||||
packageList.map((item) => ({ label: item.name, value: item.id }));
|
||||
return packageList.map((item) => ({ label: item.name, value: item.id }));
|
||||
const newData = packageList.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
const defData = [{ value: 0, label: '系统' }];
|
||||
return [...defData, ...newData];
|
||||
},
|
||||
render: (dom, record) => {
|
||||
return (
|
||||
<Tag
|
||||
key={record.id}
|
||||
color={record.packageId === 0 ? 'error' : 'success'}
|
||||
>
|
||||
{dom}
|
||||
</Tag>
|
||||
);
|
||||
},
|
||||
// valueEnum: {
|
||||
// all: { text: "全部", status: "Default" },
|
||||
|
||||
Reference in New Issue
Block a user