1
This commit is contained in:
parent
08ddb6c625
commit
d1bbd97d7f
@ -155,7 +155,7 @@ const ProjectGroupList: React.FC = () => {
|
||||
{
|
||||
accessorKey: 'projectGroupCode',
|
||||
header: '项目组编码',
|
||||
size: 120,
|
||||
size: 180,
|
||||
},
|
||||
{
|
||||
accessorKey: 'projectGroupName',
|
||||
@ -168,21 +168,41 @@ const ProjectGroupList: React.FC = () => {
|
||||
size: 200,
|
||||
},
|
||||
{
|
||||
accessorKey: 'type',
|
||||
id: 'type',
|
||||
header: '项目组类型',
|
||||
size: 150,
|
||||
size: 120,
|
||||
cell: ({row}) => {
|
||||
const typeInfo = getProjectTypeInfo(row.original.type);
|
||||
return (
|
||||
<Badge variant="outline">
|
||||
<span className="flex items-center gap-1">
|
||||
{typeInfo.icon}
|
||||
{typeInfo.label}
|
||||
</span>
|
||||
<Badge variant="outline" className="flex items-center gap-1">
|
||||
{typeInfo.icon}
|
||||
{typeInfo.label}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'totalEnvironments',
|
||||
header: '环境数量',
|
||||
size: 100,
|
||||
cell: ({row}) => (
|
||||
<div className="flex items-center gap-1">
|
||||
<EnvironmentOutlined/>
|
||||
<span>{row.original.totalEnvironments}</span>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'totalApplications',
|
||||
header: '项目数量',
|
||||
size: 100,
|
||||
cell: ({row}) => (
|
||||
<div className="flex items-center gap-1">
|
||||
<TeamOutlined/>
|
||||
<span>{row.original.totalApplications}</span>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'enabled',
|
||||
header: '状态',
|
||||
@ -193,28 +213,6 @@ const ProjectGroupList: React.FC = () => {
|
||||
</Badge>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'totalEnvironments',
|
||||
header: '环境数量',
|
||||
size: 100,
|
||||
cell: ({row}) => (
|
||||
<span className="flex items-center gap-1">
|
||||
<EnvironmentOutlined/>
|
||||
{row.original.totalEnvironments || 0}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'totalApplications',
|
||||
header: '项目数量',
|
||||
size: 100,
|
||||
cell: ({row}) => (
|
||||
<span className="flex items-center gap-1">
|
||||
<TeamOutlined/>
|
||||
{row.original.totalApplications || 0}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'sort',
|
||||
header: '排序',
|
||||
@ -282,19 +280,19 @@ const ProjectGroupList: React.FC = () => {
|
||||
<div className="flex items-center gap-4">
|
||||
<Input
|
||||
placeholder="项目组编码"
|
||||
value={form.getValues('projectGroupCode')}
|
||||
value={form.watch('projectGroupCode')}
|
||||
onChange={(e) => form.setValue('projectGroupCode', e.target.value)}
|
||||
className="max-w-[200px]"
|
||||
/>
|
||||
<Input
|
||||
placeholder="项目组名称"
|
||||
value={form.getValues('projectGroupName')}
|
||||
value={form.watch('projectGroupName')}
|
||||
onChange={(e) => form.setValue('projectGroupName', e.target.value)}
|
||||
className="max-w-[200px]"
|
||||
/>
|
||||
<Select
|
||||
value={form.getValues('type')}
|
||||
onValueChange={(value) => form.setValue('type', value)}
|
||||
value={form.watch('type')}
|
||||
onValueChange={(value) => form.setValue('type', value as ProjectGroupTypeEnum)}
|
||||
>
|
||||
<SelectTrigger className="max-w-[200px]">
|
||||
<SelectValue placeholder="项目组类型"/>
|
||||
@ -305,7 +303,7 @@ const ProjectGroupList: React.FC = () => {
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Select
|
||||
value={form.getValues('enabled')?.toString()}
|
||||
value={form.watch('enabled')?.toString()}
|
||||
onValueChange={(value) => form.setValue('enabled', value === 'true')}
|
||||
>
|
||||
<SelectTrigger className="max-w-[200px]">
|
||||
@ -319,8 +317,7 @@ const ProjectGroupList: React.FC = () => {
|
||||
<Button variant="outline" onClick={() => form.reset()}>
|
||||
重置
|
||||
</Button>
|
||||
<Button variant="ghost" onClick={() => handleSearch(form.getValues())}>
|
||||
<SearchOutlined className="mr-1"/>
|
||||
<Button onClick={() => loadData(form.getValues())}>
|
||||
搜索
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user