From d817601437043a5c8f139aaa5af540ff4ef7bbd3 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 3 Dec 2025 13:25:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20base=20=E4=BC=98=E5=8C=96=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE=E7=9A=84=E5=8F=82=E4=B8=8E?= =?UTF-8?q?=E4=BA=BA=E9=80=89=E6=8B=A9=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/wf.js | 8 +++ src/views/wf/state.vue | 105 ++++++++++++++++++++----------------- src/views/wf/transform.vue | 22 ++++++-- 3 files changed, 83 insertions(+), 52 deletions(-) diff --git a/src/api/model/wf.js b/src/api/model/wf.js index dc51f6a8..bbdd04dc 100644 --- a/src/api/model/wf.js +++ b/src/api/model/wf.js @@ -85,6 +85,14 @@ export default { } } }, + state: { + item: { + name: "节点详情", + req: async function(id){ + return await http.get(`${config.API_URL}/wf/state/${id}/`); + } + }, + }, ticket: { list: { url: `${config.API_URL}/wf/ticket/`, diff --git a/src/views/wf/state.vue b/src/views/wf/state.vue index 6571fafe..1eddd3e8 100644 --- a/src/views/wf/state.vue +++ b/src/views/wf/state.vue @@ -9,7 +9,7 @@ > - + @@ -32,14 +31,14 @@ @@ -53,7 +52,7 @@ {{ options2_[scope.row.distribute_type] }} - + @@ -136,7 +135,17 @@ prop="participant" v-if="addForm.participant_type == 1" > - + + + + + - + + + + + - - - - + + - - - - + + + { + this.type = "edit"; + this.editId = row.id; + this.dialogVisible = true; + this.addForm = Object.assign({}, res); + }) }, handleDelete(row) { this.$API.wf.state.delete.req(row.id).then((res) => { diff --git a/src/views/wf/transform.vue b/src/views/wf/transform.vue index 4ef12482..a61812ca 100644 --- a/src/views/wf/transform.vue +++ b/src/views/wf/transform.vue @@ -9,12 +9,24 @@ - + + + - + @@ -167,7 +179,6 @@ }, mounted() { this.getList(); - this.getStateList(); }, methods: { onJsonChange (value) { @@ -187,10 +198,12 @@ } }, handleAdd() { + this.getStateList(); this.type = 'add'; this.dialogVisible = true; }, handleEdit(row) { + this.getStateList(); this.type = 'edit'; this.editId = row.id; this.dialogVisible = true; @@ -208,7 +221,6 @@ }, async getStateList() { let res = await this.$API.wf.workflow.states.req(this.id); - console.log(res); this.stateList = res; }, async submitHandle(){