fix: update

This commit is contained in:
Fine 2023-06-12 11:47:45 +08:00
parent a7a9fdaf59
commit f28bca5db3

View File

@ -30,7 +30,7 @@ limitations under the License. -->
<template #default="scope"> <template #default="scope">
<span <span
:class="config.processDashboardName ? 'link' : ''" :class="config.processDashboardName ? 'link' : ''"
@click="viewProcessDashboard(scope, props.row)" @click="viewProcessDashboard(scope.row, props.row)"
> >
{{ scope.row.name }} {{ scope.row.name }}
</span> </span>
@ -49,7 +49,7 @@ limitations under the License. -->
</el-table-column> </el-table-column>
<el-table-column prop="name" label="Name"> <el-table-column prop="name" label="Name">
<template #default="scope"> <template #default="scope">
<span :class="config.instanceDashboardName ? 'link' : ''" @click="viewInstanceDashboard(scope)"> <span :class="config.instanceDashboardName ? 'link' : ''" @click="viewInstanceDashboard(scope.row)">
{{ scope.row.name }} {{ scope.row.name }}
</span> </span>
</template> </template>
@ -118,21 +118,21 @@ limitations under the License. -->
}); });
const currentInstances = ref<MonitorInstance[]>([]); const currentInstances = ref<MonitorInstance[]>([]);
function viewProcessDashboard(scope: any, instance: MonitorInstance) { function viewProcessDashboard(process: MonitorProcess, instance: MonitorInstance) {
if (!props.config.processDashboardName) { if (!props.config.processDashboardName) {
return; return;
} }
router.push( router.push(
`/dashboard/${dashboardStore.layerId}/${EntityType[8].value}/${selectorStore.currentService.id}/${instance.id}/${scope.row.id}/${props.config.processDashboardName}`, `/dashboard/${dashboardStore.layerId}/${EntityType[8].value}/${selectorStore.currentService.id}/${instance.id}/${process.id}/${props.config.processDashboardName}`,
); );
} }
function viewInstanceDashboard(scope: any) { function viewInstanceDashboard(instance: MonitorInstance) {
if (!props.config.instanceDashboardName) { if (!props.config.instanceDashboardName) {
return; return;
} }
router.push( router.push(
`/dashboard/${dashboardStore.layerId}/${EntityType[3].value}/${selectorStore.currentService.id}/${scope.row.id}/${props.config.instanceDashboardName}`, `/dashboard/${dashboardStore.layerId}/${EntityType[3].value}/${selectorStore.currentService.id}/${instance.id}/${props.config.instanceDashboardName}`,
); );
} }