Commit fea2f4bf authored by 徐一鸣's avatar 徐一鸣

流程管理调试

parent 46b7b896
...@@ -108,16 +108,8 @@ export default { ...@@ -108,16 +108,8 @@ export default {
copyTempItem: null, copyTempItem: null,
copyTempItem_rules: { copyTempItem_rules: {
newName: [ newName: [
{ { required: true, message: "请输入流程名称", trigger: "blur" },
required: true, { max: 16, message: "不能超过16个字符", trigger: "blur" },
message: "请输入流程名称",
trigger: "blur",
},
{
max: 16,
message: "长度小于16个字符",
trigger: "blur",
},
], ],
}, },
}), }),
...@@ -319,48 +311,99 @@ export default { ...@@ -319,48 +311,99 @@ export default {
this.dialogInfo.cancelText = "暂不"; this.dialogInfo.cancelText = "暂不";
this.dialogInfo.sunbmitText = "取消发布"; this.dialogInfo.sunbmitText = "取消发布";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
console.log(`取消发布${item.name}`); this.$http
.delete("/apaas/serviceapp/v3/workflows/cancelPublish", {
params: {
id: item.workflows_id,
},
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success(data.errMsg || "取消发布成功");
this.refreshPage();
} else {
this.$message.error(data.errMsg || "取消发布失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("取消发布失败");
});
}; };
this.showDialog(); this.showDialog();
}, // TODO: 取消发布流程 },
deployItem(item) { deployItem(item) {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = `部署流程后,流程将部署到工作区域,但不会上架到服务超市,是否部署该流程?`; this.dialogInfo.msg = `部署流程后,流程将部署到工作区域,但不会上架到服务超市,是否部署该流程?`;
this.dialogInfo.cancelText = "取消"; this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "部署"; this.dialogInfo.sunbmitText = "部署";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
console.log(`部署${item.name}`); let form = new FormData();
form.append("id", item.workflows_id);
this.$http
.post("/apaas/serviceapp/v3/workflows/deploy", form)
.then(({ data }) => {
if (data.success === 1) {
this.$message.success(data.errMsg || "部署成功");
this.refreshPage();
} else {
this.$message.error(data.errMsg || "部署失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("部署失败");
});
}; };
this.showDialog(); this.showDialog();
}, // TODO: 部署流程 },
cancelDeployItem(item) { cancelDeployItem(item) {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = `取消部署后,该流程服务不能通过链接访问,是否取消部署流程服务“${item.name}”?`; this.dialogInfo.msg = `取消部署后,该流程服务不能通过链接访问,是否取消部署流程服务“${item.name}”?`;
this.dialogInfo.cancelText = "取消"; this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "取消部署"; this.dialogInfo.sunbmitText = "取消部署";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
console.log(`取消部署${item.name}`); this.$http
.delete("/apaas/serviceapp/v3/workflows/cancelDeploy", {
params: {
id: item.workflows_id,
},
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success(data.errMsg || "取消部署成功");
this.refreshPage();
} else {
this.$message.error(data.errMsg || "取消部署失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("取消部署失败");
});
}; };
this.showDialog(); this.showDialog();
}, // TODO: 取消部署流程 },
copyItem(item) { copyItem(item) {
this.copyTempItem = { this.copyTempItem = {
...item, ...item,
newName: "", newName: "",
}; };
this.copyProcessShow(); this.copyProcessShow();
}, // 复制流程 },
cancelCopyProcess() { cancelCopyProcess() {
this.copyProcessHide(); this.copyProcessHide();
}, // 复制流程-取消 },
submitCopyProcess() { submitCopyProcess() {
this.$refs.detail_form.validate((valid) => { this.$refs.detail_form.validate((valid) => {
if (valid) { if (valid) {
let form = new FormData();
form.append("id", this.copyTempItem.workflows_id);
form.append("name", this.copyTempItem.newName);
this.$http this.$http
.post("/apaas/serviceapp/v3/workflows/copy", { .post("/apaas/serviceapp/v3/workflows/copy", form)
id: this.copyTempItem.workflows_id,
name: this.copyTempItem.newName,
})
.then(({ data }) => { .then(({ data }) => {
if (data.success === 1) { if (data.success === 1) {
this.$message.success(data.errMsg || "复制成功"); this.$message.success(data.errMsg || "复制成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment