|
|
|
@ -33,7 +33,10 @@ const ComponentEnv = () => {
|
|
|
|
const [selectedArch, setSelectedArch] = useState(null); // 选中的架构类型
|
|
|
|
const [selectedArch, setSelectedArch] = useState(null); // 选中的架构类型
|
|
|
|
const [searchText, setSearchText] = useState(''); // 搜索文本
|
|
|
|
const [searchText, setSearchText] = useState(''); // 搜索文本
|
|
|
|
const [addItem, setAddItem] = useState(null); // 点击环境配置按钮时记录当前信息
|
|
|
|
const [addItem, setAddItem] = useState(null); // 点击环境配置按钮时记录当前信息
|
|
|
|
const [loadingActions, setLoadingActions] = useState<{ id: number | null; action: string | null }>({ id: null, action: null }); // 按钮loading状态
|
|
|
|
const [loadingActions, setLoadingActions] = useState<{ id: number | null; action: string | null }>({
|
|
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
|
|
action: null
|
|
|
|
|
|
|
|
}); // 按钮loading状态
|
|
|
|
|
|
|
|
|
|
|
|
const columns: TableColumnProps[] = [
|
|
|
|
const columns: TableColumnProps[] = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -87,13 +90,36 @@ const ComponentEnv = () => {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '测试状态',
|
|
|
|
|
|
|
|
dataIndex: 'available',
|
|
|
|
|
|
|
|
render: (_, record: any) => (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{record.available == '0' && (
|
|
|
|
|
|
|
|
<Tag color="gray">
|
|
|
|
|
|
|
|
未测试
|
|
|
|
|
|
|
|
</Tag>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{record.available == '1' && (
|
|
|
|
|
|
|
|
<Tag color="green">
|
|
|
|
|
|
|
|
测试通过
|
|
|
|
|
|
|
|
</Tag>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{record.available == '-1' && (
|
|
|
|
|
|
|
|
<Tag color="red">
|
|
|
|
|
|
|
|
测试失败
|
|
|
|
|
|
|
|
</Tag>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '操作',
|
|
|
|
title: '操作',
|
|
|
|
width: 230,
|
|
|
|
width: 230,
|
|
|
|
align: 'center',
|
|
|
|
align: 'center',
|
|
|
|
render: (_, record: any) => (
|
|
|
|
render: (_, record: any) => (
|
|
|
|
<Space>
|
|
|
|
<Space>
|
|
|
|
{record.isEnable === 'NOT_EXIST' && (
|
|
|
|
{record.isEnable === 'NOT_EXIST' && record.available == '1' && (
|
|
|
|
<Button type="text" onClick={() => {
|
|
|
|
<Button type="text" onClick={() => {
|
|
|
|
setAddItem(record);
|
|
|
|
setAddItem(record);
|
|
|
|
setVisible1(true);
|
|
|
|
setVisible1(true);
|
|
|
|
|