Feat: optimized code

This commit is contained in:
alongw 2023-09-17 00:06:14 +08:00
parent 6d9885b459
commit 94cf34f09b
2 changed files with 6 additions and 7 deletions

View File

@ -38,7 +38,7 @@ const columns = [
{
title: t("字节流编码"),
dataIndex: "ie",
customRender: (e: any) => {
customRender: (e: { text: string; record: { oe: string; ie: string } }) => {
return `${e.text}/${e.record.oe}`;
}
},
@ -69,7 +69,7 @@ const getInstanceList = async () => {
});
};
const operate = (e: any) => {
const operate = (e: { serviceUuid: string; instanceUuid: string }) => {
router.push({
path: "/instances/terminal",
query: {

View File

@ -37,19 +37,18 @@ const computedStatusList = computed(() => {
{
type: "instance_running",
title: t("实例正在运行中的数量"),
value: state.value.instances.filter((e: any) => e.status == 3).length
value: state.value.instances.filter((e) => e.status == 3).length
},
{
type: "instance_stop",
title: t("实例未处于运行中的数量"),
value: state.value.instances.filter((e: any) => e.status == 0).length
value: state.value.instances.filter((e) => e.status == 0).length
},
{
type: "instance_error",
title: t("暂时不可使用的实例数"),
value: state.value.instances.filter(
(e: any) => e.status == -1 || e.status == 1 || e.status == 2
).length
value: state.value.instances.filter((e) => e.status == -1 || e.status == 1 || e.status == 2)
.length
}
];
});