fix: 跟踪任务编号的传入获取信息

This commit is contained in:
TsMask
2025-07-02 15:25:34 +08:00
parent bea6f032ac
commit 93b600affb
4 changed files with 12 additions and 8 deletions

View File

@@ -31,6 +31,8 @@ const wk = new wkUtil.WK();
/**跟踪编号 */
const traceId = ref<string>(route.query.traceId as string);
/**任务编号 */
const id = ref<string>(route.query.id as string);
/**关闭跳转 */
function fnClose() {
@@ -588,7 +590,7 @@ onBeforeUnmount(() => {
<strong>{{ traceId }}</strong>
</span>
<!-- 任务信息 -->
<TaskInfoIcon :trace-id="traceId" />
<TaskInfoIcon :id="id" />
</a-space>
</template>

View File

@@ -9,7 +9,7 @@ const { t } = useI18n();
const { getDict } = useDictStore();
const props = defineProps({
traceId: {
id: {
type: [String, Number],
required: true,
},
@@ -50,7 +50,7 @@ onMounted(() => {
})
.finally(() => {
// 获取信息
fnGetTaskInfo(props.traceId);
fnGetTaskInfo(props.id);
});
});
</script>

View File

@@ -23,6 +23,8 @@ const route = useRoute();
/**跟踪编号 */
const traceId = ref<string>(route.query.traceId as string);
/**任务编号 */
const id = ref<string>(route.query.id as string);
/**关闭跳转 */
function fnClose() {
@@ -431,7 +433,7 @@ onMounted(() => {
<strong>{{ traceId }}</strong>
</span>
<!-- 任务信息 -->
<TaskInfoIcon :trace-id="traceId" />
<TaskInfoIcon :id="id" />
</a-space>
</template>

View File

@@ -592,10 +592,10 @@ function fnModalCancel() {
}
/**跳转内嵌详情页面 */
function fnRecordView(traceId: any, type: 'analyze' | 'data') {
function fnRecordView(record: any, type: 'analyze' | 'data') {
router.push({
path: `${route.path}${MENU_PATH_INLINE}/${type}`,
query: { traceId },
query: { traceId: record.traceId, id: record.id },
});
}
@@ -809,7 +809,7 @@ onMounted(() => {
</template>
<a-button
type="link"
@click.prevent="fnRecordView(record.traceId, 'data')"
@click.prevent="fnRecordView(record, 'data')"
>
<template #icon><ContainerOutlined /></template>
</a-button>
@@ -822,7 +822,7 @@ onMounted(() => {
</template>
<a-button
type="link"
@click.prevent="fnRecordView(record.traceId, 'analyze')"
@click.prevent="fnRecordView(record, 'analyze')"
>
<template #icon><BarsOutlined /></template>
</a-button>