|
@@ -187,6 +187,16 @@
|
|
|
>修改</el-button
|
|
|
></el-dropdown-item
|
|
|
>
|
|
|
+ <el-dropdown-item
|
|
|
+ ><el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="backupProcess(scope.row)"
|
|
|
+ v-hasPermi="['system:user:edit']"
|
|
|
+ >备份流程图</el-button
|
|
|
+ ></el-dropdown-item
|
|
|
+ >
|
|
|
<el-dropdown-item
|
|
|
><el-button
|
|
|
size="mini"
|
|
@@ -287,6 +297,7 @@ import {
|
|
|
delProcess,
|
|
|
addProcess,
|
|
|
updateProcess,
|
|
|
+ bpmBackups,
|
|
|
} from "@/api/bpmprocess/process";
|
|
|
|
|
|
export default {
|
|
@@ -337,6 +348,9 @@ export default {
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
+ activated() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
methods: {
|
|
|
/** 查询流程定义列表 */
|
|
|
getList() {
|
|
@@ -421,6 +435,57 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ // 备份流程图
|
|
|
+ backupProcess(row) {
|
|
|
+ this.$prompt("请输入备份描述:", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ beforeClose: async (action, instance, done) => {
|
|
|
+ if (action === "confirm") {
|
|
|
+ if (instance.inputValue?.trim().length) {
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
+ instance.confirmButtonText = "保存中...";
|
|
|
+
|
|
|
+ try {
|
|
|
+ let data = {
|
|
|
+ processId: row.processId,
|
|
|
+ note: instance.inputValue.trim(),
|
|
|
+ };
|
|
|
+ let res = await bpmBackups(data);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("备份成功");
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.confirmButtonText = "确定";
|
|
|
+ done();
|
|
|
+ } else {
|
|
|
+ this.$message.error("备份失败");
|
|
|
+ }
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.confirmButtonText = "确定";
|
|
|
+ } catch (error) {
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.confirmButtonText = "确定";
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "备份描述不能为空",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then(({ value }) => {})
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "取消备份",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|