From 48c45a99cabde7504dbbd40e5d1033bd1c120414 Mon Sep 17 00:00:00 2001 From: hlinx <327159425@qq.com> Date: Thu, 12 Sep 2024 10:22:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E5=8D=95=E6=8D=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E8=BD=AE=E8=AF=A2=E6=97=B6=E5=8F=96=E6=B6=88=20loadin?= =?UTF-8?q?g=20=E6=95=88=E6=9E=9C=20#6877=20#=20Reviewed,=20transaction=20?= =?UTF-8?q?id:=2018182?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/sqlserver/table/Index.vue | 2 +- .../demand-factory/components/DemandInfo.vue | 2 +- .../demand-factory/sqlserver/HaApply.vue | 23 ++++++++++--------- .../demand-factory/sqlserver/SingleApply.vue | 2 ++ .../my-tickets/components/details/Index.vue | 13 ++++------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dbm-ui/frontend/src/components/instance-selector/components/sqlserver/table/Index.vue b/dbm-ui/frontend/src/components/instance-selector/components/sqlserver/table/Index.vue index 7b8d07363d..0748dfa4dc 100644 --- a/dbm-ui/frontend/src/components/instance-selector/components/sqlserver/table/Index.vue +++ b/dbm-ui/frontend/src/components/instance-selector/components/sqlserver/table/Index.vue @@ -305,7 +305,7 @@ }, { immediate: true, deep: true }); watch(() => props.clusterId, () => { - fetchResources(); + fetchResources(); }); const triggerChange = () => { diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/components/DemandInfo.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/components/DemandInfo.vue index 7d715f93f6..885d7422e4 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/components/DemandInfo.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/components/DemandInfo.vue @@ -55,7 +55,7 @@ } interface Props { - data: TicketDetails; + data: TicketDetails; config: DemandInfoConfig[]; } diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/HaApply.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/HaApply.vue index 266e68460f..8f719ae0ef 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/HaApply.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/HaApply.vue @@ -147,20 +147,21 @@ ), }) } - - config[2].list.splice(3, 0, { + if (nodes){ + config[2].list.splice(3, 0, { label: t('集群设置'), isTable: true, render: () => ( - - ), - }) + + ), + }) + } const cityName = ref('--'); diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/SingleApply.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/SingleApply.vue index 3f8d6f075b..15ae939ac7 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/SingleApply.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/sqlserver/SingleApply.vue @@ -129,6 +129,7 @@ }) } + if (nodes){ config[2].list.splice(3, 0, { label: t('集群设置'), isTable: true, @@ -142,6 +143,7 @@ nodeList={nodes[ClusterTypes.SQLSERVER_SINGLE]} /> ), }) + } const cityName = ref('--'); diff --git a/dbm-ui/frontend/src/views/tickets/my-tickets/components/details/Index.vue b/dbm-ui/frontend/src/views/tickets/my-tickets/components/details/Index.vue index 21d934ce4f..94216c49b7 100644 --- a/dbm-ui/frontend/src/views/tickets/my-tickets/components/details/Index.vue +++ b/dbm-ui/frontend/src/views/tickets/my-tickets/components/details/Index.vue @@ -28,9 +28,7 @@ :class="{ 'tickets-main-is-fullscreen': isFullscreen }" mode="collapse" :title="t('需求信息')"> - +
{{ t('备注') }}: {{ ticketData.remark || '--' }} @@ -86,19 +84,17 @@ const isFullscreen = ref(Boolean(route.query.isFullscreen)); const demandCollapse = ref(false); + const isLoading = ref(true); const flowInfoRef = ref>(); - const { - run: fetchTicketDetails, - data: ticketData, - loading: isLoading, - } = useRequest( + const { run: fetchTicketDetails, data: ticketData } = useRequest( (params: ServiceParameters) => getTicketDetails(params, { permission: 'catch', }), { onSuccess(_, params) { + isLoading.value = false; if (params[0].id !== props.ticketId) { return; } @@ -117,6 +113,7 @@ () => props.ticketId, () => { if (props.ticketId) { + isLoading.value = true; ticketData.value = undefined; fetchTicketDetails({ id: props.ticketId,