Merge fixes and improvements (#1910)

Co-authored-by: tristanliu <tristanliu@tencent.com>
This commit is contained in:
Jun Zhang
2024-11-16 13:57:54 +08:00
committed by GitHub
parent 5e22b412c6
commit ba1938f04b
40 changed files with 1382 additions and 2784 deletions

View File

@@ -172,6 +172,7 @@ const ClassDimensionTable: React.FC<Props> = ({}) => {
dataIndex: 'isTag',
title: '是否标签',
// width: 90,
hideInTable: !!!process.env.SHOW_TAG,
render: (isTag) => {
switch (isTag) {
case 0:
@@ -324,66 +325,69 @@ const ClassDimensionTable: React.FC<Props> = ({}) => {
headerTitle={
<div style={{ marginLeft: 15 }}>
<TableHeaderFilter
components={[
{
label: '维度搜索',
component: (
<Input.Search
style={{ width: 280 }}
placeholder="请输入ID/维度名称/英文名称"
onSearch={(value) => {
setFilterParams((preState) => {
return {
...preState,
key: value,
};
});
}}
/>
),
},
{
label: '敏感度',
component: (
<Select
style={{ width: 140 }}
options={SENSITIVE_LEVEL_OPTIONS}
placeholder="请选择敏感度"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
sensitiveLevel: value,
};
});
}}
/>
),
},
{
label: '是否为标签',
component: (
<Select
style={{ width: 145 }}
placeholder="请选择标签状态"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
isTag: value,
};
});
}}
options={[
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]}
/>
),
},
]}
components={
[
{
label: '维度搜索',
component: (
<Input.Search
style={{ width: 280 }}
placeholder="请输入ID/维度名称/英文名称"
onSearch={(value) => {
setFilterParams((preState) => {
return {
...preState,
key: value,
};
});
}}
/>
),
},
{
label: '敏感度',
component: (
<Select
style={{ width: 140 }}
options={SENSITIVE_LEVEL_OPTIONS}
placeholder="请选择敏感度"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
sensitiveLevel: value,
};
});
}}
/>
),
},
{
label: '是否为标签',
hidden: !!!process.env.SHOW_TAG,
component: (
<Select
style={{ width: 145 }}
placeholder="请选择标签状态"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
isTag: value,
};
});
}}
options={[
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]}
/>
),
},
].filter((item) => !!!item.hidden) as any
}
/>
</div>
}