perf: 历史记录查看详情,可以切换到对应的历史记录日志上去

pull/361/head
xiaojunnuo 2025-03-11 00:46:51 +08:00
parent efa9c748c5
commit 082802e119
3 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<fs-page class="fs-pipeline-detail">
<pipeline-edit v-model:edit-mode="editMode" :pipeline-id="pipelineId" :options="pipelineOptionsRef"></pipeline-edit>
<pipeline-edit v-model:edit-mode="editMode" :pipeline-id="pipelineId" :history-id="historyId" :options="pipelineOptionsRef"></pipeline-edit>
<a-tour v-bind="tour" v-model:current="tour.current" />
</fs-page>
</template>
@ -22,7 +22,7 @@ defineOptions({
});
const route = useRoute();
const pipelineId: Ref = ref(route.query.id);
const historyId = ref(route.query.historyId);
const pipelineOptions: PipelineOptions = {
async getPipelineDetail({ pipelineId }) {
const detail = await api.GetDetail(pipelineId);

View File

@ -274,6 +274,10 @@ export default defineComponent({
type: [Number, String],
default: 0
},
historyId: {
type: [Number, String],
default: 0
},
editMode: {
type: Boolean,
default: false
@ -333,6 +337,16 @@ export default defineComponent({
histories.value = historyList;
if (historyList.length > 0) {
if (props.historyId > 0) {
const found = historyList.find((item) => {
//==int
return item.id == props.historyId;
});
if (found) {
await changeCurrentHistory(found);
return true;
}
}
if (historyList[0].pipeline?.version === pipeline.value.version) {
await changeCurrentHistory(historyList[0]);
}

View File

@ -86,7 +86,7 @@ export class HistoryController extends CrudController<HistoryService> {
return this.ok([]);
}
const buildQuery = qb => {
qb.limit(10);
qb.limit(20);
};
const listRet = await this.getService().list({
query: body,