diff --git a/src/api/flow/flow.js b/src/api/flow/flow.js index f8e7878..572a89b 100644 --- a/src/api/flow/flow.js +++ b/src/api/flow/flow.js @@ -9,6 +9,26 @@ export function flowDeploy(data) { }) } +export function flowSaveDraft(data) { + return request({ url: '/flow/draft', method: 'put', data }) +} + +export function flowVersionList(itemId) { + return request({ url: `/flow/versions/${itemId}`, method: 'get' }) +} + +export function flowVersionDetail(versionId) { + return request({ url: `/flow/version/${versionId}`, method: 'get' }) +} + +export function flowRestoreDraft(versionId, data) { + return request({ url: `/flow/version/${versionId}/restore-draft`, method: 'post', data }) +} + +export function flowRollbackVersion(versionId, data) { + return request({ url: `/flow/version/${versionId}/rollback`, method: 'post', data }) +} + export function flowExecute(data) { return request({ url: '/flow/execute', diff --git a/src/views/flow/index.vue b/src/views/flow/index.vue index 2df0c93..76f4bb2 100644 --- a/src/views/flow/index.vue +++ b/src/views/flow/index.vue @@ -12,8 +12,14 @@ {{ stateMap[flowState] }} + + 当前发布 V{{ publishedVersionNo }} + + + 正在查看 V{{ previewingVersionNo }} + -
+
{{ totalRunningTime }}ms @@ -47,6 +53,16 @@
+ + 保存 + + + 发布记录 +
+
+ 退出预览 +
@@ -310,6 +329,33 @@
+ + +
+ +
+
+
+ V{{ version.versionNo }} + 当前发布 + 回退版本 +
+
+ {{ version.createBy || '未知用户' }} · {{ version.createTime || '-' }} +
+
{{ version.publishNote }}
+
+
+ 查看 + 恢复为草稿 + + 回退 + +
+
+
+
+