Browse Source

修改流程文件

lph 1 year ago
parent
commit
d2531502b1

+ 6 - 3
ruoyi-ui/src/views/bpmprocess/index.vue

@@ -395,9 +395,12 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加流程定义";
+      this.$router.push({
+        path: "/processModeling/bpmnPro",
+      });
+      // this.reset();
+      // this.open = true;
+      // this.title = "添加流程定义";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {

+ 10 - 0
ruoyi-ui/src/views/system/bpmnPro/components/Toolbar/tools/Save.vue

@@ -133,6 +133,16 @@ export default {
         };
         if (_this.$route.query?.id) {
           data.bpmProcess.processId = _this.$route.query.id;
+          var file = new File([processXmlContent], processKey + ".bpmn", {
+            type: "text/xml",
+          });
+          const formData = new FormData();
+          formData.append("fileXML", file);
+          formData.append("processKey", processKey);
+          formData.append("processName", processName);
+          formData.append("processType", processType);
+          formData.append("processId", _this.$route.query.id);
+          formData.append("processJson", JSON.stringify(processJsonObj));
           updateProcess(data).then((res) => {
             if (res.code == 200) {
               _this.$message.success("修改成功");