diff --git a/flowable-engine-web/src/api/processDefinition.js b/flowable-engine-web/src/api/processDefinition.js
index 9464c66..1ef3313 100644
--- a/flowable-engine-web/src/api/processDefinition.js
+++ b/flowable-engine-web/src/api/processDefinition.js
@@ -35,6 +35,13 @@ export function getHistoryVersion(processDefinitionKey) {
})
}
+export function deleteHistoryVersion(deploymentId) {
+ return request({
+ url: "/workflow/process/definition/" + deploymentId,
+ method: "delete",
+ })
+}
+
export function suspendProcessDefinition(processDefinitionId) {
return request({
url: "/workflow/process/definition/suspend",
@@ -158,5 +165,5 @@ export function updateFormDetail(param) {
export default {
getFormGroups, groupItemsSort, createForm, getFormDetail,
- updateGroup, getGroup, updateForm, updateFormDetail,getHistoryVersion
+ updateGroup, getGroup, updateForm, updateFormDetail,getHistoryVersion,deleteHistoryVersion
}
diff --git a/flowable-engine-web/src/views/admin/FormsPanel.vue b/flowable-engine-web/src/views/admin/FormsPanel.vue
index 72021a0..3c3f1da 100644
--- a/flowable-engine-web/src/views/admin/FormsPanel.vue
+++ b/flowable-engine-web/src/views/admin/FormsPanel.vue
@@ -40,8 +40,8 @@
{{ item.remark }}
启用
- 停用
- {{ item.version }}
+ 停用
+ {{ item.version }}
最后更新时间:{{ item.updateTime }}
@@ -50,9 +50,10 @@
编辑
设计
- 历史版本
+ 历史版本
-
{{ item.state !== "1" ? "启用" : "停用" }}
@@ -87,11 +88,16 @@
:data="historyVersionList"
border
style="width: 100%"
+ v-loading="loading"
>
+ width="180"
+ >
+
+
+
-
-
+
+ 启用
+ 停用
+
+ label="版本"
+ width="180"
+ >
+
+ {{ scope.row.version }}
+
+
+
+
+
+ {{ scope.row.state == "1" ? "挂起" : "启用" }}
+
+
+ 删除
+
+
+ 复制
+
+
@@ -127,7 +157,9 @@ import draggable from "vuedraggable";
import {
activateProcessDefinition,
getProcessDefinitionList,
- suspendProcessDefinition,getHistoryVersion
+ suspendProcessDefinition,
+ getHistoryVersion,
+ deleteHistoryVersion
} from "@/api/processDefinition";
export default {
@@ -135,6 +167,7 @@ export default {
components: {draggable},
data() {
return {
+ loading: true,
openhistory: false,
moveSelect: "",
visible: false,
@@ -241,22 +274,59 @@ export default {
//查看历史版本
viewHistoricalVersion(item) {
getHistoryVersion(item.processDefinitionKey).then(res => {
- console.log('历史版本数据==',res.data);
- let groupItems =res.data.rows
- groupItems.forEach(item => {
+ this.loading = false;
+ console.log("历史版本数据==", res.data);
+ res.data.forEach(item => {
item.logo = JSON.parse(item.logo);
});
- this.historyVersionList.push(groupItems)
- // groupItem.items = res.data.rows;
- // groupItem.items.forEach(item => {
- // item.logo = JSON.parse(item.logo);
- // });
- // this.historyVersionList.push(groupItem);
+ this.historyVersionList = res.data;
}).catch(err => {
this.$message.error(err.response.data);
});
this.openhistory = true;
},
+ //启用,挂起历史版本
+ // suspendOrActivateHistoryView(row) {
+ // let tip = row.state === "1" ? " 您正在停用 [ " + row.deploymentName + " ] 流程,是否继续?" : " 您正在激活 [ " + row.deploymentName + " ] 流程,是否继续?";
+ // this.$confirm(tip, "提示", {
+ // confirmButtonText: "确定",
+ // cancelButtonText: "取消",
+ // type: "warning"
+ // }).then(() => {
+ //
+ // // let processDefinitionId = row.processDefinitionId;
+ // if (row.state === "1") {
+ // //停用
+ // suspendProcessDefinition( row.processDefinitionId).then(res => {
+ // console.log(res);
+ // this.viewHistoricalVersion(row)
+ // this.$message.success(res.msg);
+ //
+ // });
+ // } else {
+ // //启用
+ // activateProcessDefinition(row.processDefinitionId).then(res => {
+ // this.viewHistoricalVersion(row)
+ // this.$message.success(res.msg);
+ //
+ // });
+ // }
+ // });
+ // },
+
+ //删除工作流历史版本
+ deleteHistoryVersion(row) {
+ this.$confirm("您确定要删除表单 " + row.deploymentName + " 吗,删除后无法恢复,是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ deleteHistoryVersion(row.deploymentId).then(res => {
+ console.log('删除工作流历史版本',res);
+ })
+ });
+ },
+
suspendOrActivateProcessDefinition(item) {
let tip = item.state === "1" ? " 您正在停用 [ " + item.deploymentName + " ] 流程,是否继续?" : " 您正在激活 [ " + item.deploymentName + " ] 流程,是否继续?";
this.$confirm(tip, "提示", {
@@ -281,6 +351,7 @@ export default {
}
});
},
+
moveFrom(item) {
if (item.isStop) {
this.$confirm("您确定要删除表单 " + item.name + " 吗,删除后无法恢复,是否继续?", "提示", {
@@ -311,6 +382,18 @@ body {
background: #ffffff !important;
}
+/deep/ .el-dialog {
+ width: 70%;
+}
+
+.logo_icon {
+ border-radius: 10px;
+ padding: 7px;
+ font-size: 20px;
+ color: #ffffff;
+ margin-right: 10px;
+}
+
.undrag {
background: #ebecee !important;
}
@@ -333,6 +416,7 @@ body {
//height: 100vh;
}
+
.choose {
background: #e9ebee;
}