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

This commit is contained in:
TsMask
2025-07-02 15:27:45 +08:00
parent 2181d51999
commit e3f70640b8
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 traceId = ref<string>(route.query.traceId as string);
/**任务编号 */
const id = ref<string>(route.query.id as string);
/**关闭跳转 */ /**关闭跳转 */
function fnClose() { function fnClose() {
@@ -588,7 +590,7 @@ onBeforeUnmount(() => {
<strong>{{ traceId }}</strong> <strong>{{ traceId }}</strong>
</span> </span>
<!-- 任务信息 --> <!-- 任务信息 -->
<TaskInfoIcon :trace-id="traceId" /> <TaskInfoIcon :id="id" />
</a-space> </a-space>
</template> </template>

View File

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

View File

@@ -23,6 +23,8 @@ const route = useRoute();
/**跟踪编号 */ /**跟踪编号 */
const traceId = ref<string>(route.query.traceId as string); const traceId = ref<string>(route.query.traceId as string);
/**任务编号 */
const id = ref<string>(route.query.id as string);
/**关闭跳转 */ /**关闭跳转 */
function fnClose() { function fnClose() {
@@ -431,7 +433,7 @@ onMounted(() => {
<strong>{{ traceId }}</strong> <strong>{{ traceId }}</strong>
</span> </span>
<!-- 任务信息 --> <!-- 任务信息 -->
<TaskInfoIcon :trace-id="traceId" /> <TaskInfoIcon :id="id" />
</a-space> </a-space>
</template> </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({ router.push({
path: `${route.path}${MENU_PATH_INLINE}/${type}`, path: `${route.path}${MENU_PATH_INLINE}/${type}`,
query: { traceId }, query: { traceId: record.traceId, id: record.id },
}); });
} }
@@ -795,7 +795,7 @@ onMounted(() => {
</template> </template>
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordView(record.traceId, 'data')" @click.prevent="fnRecordView(record, 'data')"
> >
<template #icon><ContainerOutlined /></template> <template #icon><ContainerOutlined /></template>
</a-button> </a-button>
@@ -808,7 +808,7 @@ onMounted(() => {
</template> </template>
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordView(record.traceId, 'analyze')" @click.prevent="fnRecordView(record, 'analyze')"
> >
<template #icon><BarsOutlined /></template> <template #icon><BarsOutlined /></template>
</a-button> </a-button>