diff --git a/src/pages/workbench/component-center/process-management/designer/index.vue b/src/pages/workbench/component-center/process-management/designer/index.vue index c121282e5dc9ee9ba7ce695ebbb9fd784ea7e450..87c1050bf3dfba98ab70a95b57c78d292fef7c48 100644 --- a/src/pages/workbench/component-center/process-management/designer/index.vue +++ b/src/pages/workbench/component-center/process-management/designer/index.vue @@ -136,6 +136,7 @@ export default { (filter.states && filter.states.map((item) => item.value).join(",")) || "", + filter_by: filter.keyword, page: filter.page, page_size: filter.size, }; @@ -308,10 +309,10 @@ export default { this.dialogInfo.cancelText = "取消"; this.dialogInfo.sunbmitText = "发布"; this.dialogInfo.submit = () => { - console.log(`发布${item.name}`); + this.$router.push(`/fwzc/fwcs?process=${item.workflows_id}`); }; this.showDialog(); - }, // TODO: 发布流程 + }, cancelPublishItem(item) { this.dialogInfo.title = "提示"; this.dialogInfo.msg = `取消发布后,该流程服务将从服务超市下架,仅部署在工作区域${item.workarea_name}中,是否取消发布流程服务“${item.name}”?`; @@ -341,7 +342,7 @@ export default { console.log(`取消部署${item.name}`); }; this.showDialog(); - }, // TODO: 取消流程 + }, // TODO: 取消部署流程 copyItem(item) { this.copyTempItem = { ...item, @@ -355,13 +356,29 @@ export default { submitCopyProcess() { this.$refs.detail_form.validate((valid) => { if (valid) { - console.log(this.copyTempItem); - this.copyProcessHide(); + this.$http + .post("/apaas/serviceapp/v3/workflows/copy", { + id: this.copyTempItem.workflows_id, + name: this.copyTempItem.newName, + }) + .then(({ data }) => { + if (data.success === 1) { + this.$message.success(data.errMsg || "复制成功"); + this.copyProcessHide(); + this.refreshPage(); + } else { + this.$message.error(data.errMsg || "复制失败"); + } + }) + .catch((error) => { + console.log(error); + this.$message.error("复制失败"); + }); } else { return false; } }); - }, // TODO: 复制流程-确定 + }, deleteItem(item) { this.dialogInfo.title = "提示"; this.dialogInfo.msg = `您确定要删除流程服务“${item.name}”吗?`;