diff --git a/packages/ui/certd-client/src/views/certd/pipeline/detail.vue b/packages/ui/certd-client/src/views/certd/pipeline/detail.vue index 273f683b..6649b360 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/detail.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/detail.vue @@ -1,6 +1,6 @@ @@ -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); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue index 074c1692..111c20b1 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue @@ -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]); } diff --git a/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts b/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts index 8643cc80..545a7556 100644 --- a/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts +++ b/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts @@ -86,7 +86,7 @@ export class HistoryController extends CrudController { return this.ok([]); } const buildQuery = qb => { - qb.limit(10); + qb.limit(20); }; const listRet = await this.getService().list({ query: body,