ysy 1 anno fa
parent
commit
3957fc6f7d

+ 33 - 29
src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue

@@ -1,48 +1,52 @@
 <template>
   <div class="my-process-palette">
-    <div class="test-button" @click="addTask" @mousedown="addTask">测试任务</div>
+    <div class="test-button" @click="addTask" @mousedown="addTask"
+      >测试任务</div
+    >
     <div class="test-container" id="palette-container">1</div>
   </div>
 </template>
 
 <script>
-import { assign } from "min-dash";
+  import { assign } from 'min-dash';
 
-export default {
-  name: "MyProcessPalette",
-  data() {
-    return {};
-  },
-  mounted() {},
-  methods: {
-    addTask(event, options = {}) {
-      const ElementFactory = window.bpmnInstances.elementFactory;
-      const create = window.bpmnInstances.modeler.get("create");
+  export default {
+    name: 'MyProcessPalette',
+    data() {
+      return {};
+    },
+    mounted() {},
+    methods: {
+      addTask(event, options = {}) {
+        const ElementFactory = window.bpmnInstances.elementFactory;
+        const create = window.bpmnInstances.modeler.get('create');
 
-      console.log(ElementFactory, create);
+        console.log(ElementFactory, create);
 
-      const shape = ElementFactory.createShape(assign({ type: "bpmn:UserTask" }, options));
+        const shape = ElementFactory.createShape(
+          assign({ type: 'bpmn:UserTask' }, options)
+        );
 
-      if (options) {
-        shape.businessObject.di.isExpanded = options.isExpanded;
-      }
+        if (options) {
+          shape.businessObject.di.isExpanded = options.isExpanded;
+        }
 
-      create.start(event, shape);
+        create.start(event, shape);
+      }
     }
-  }
-};
+  };
 </script>
 
 <style scoped lang="scss">
-.my-process-palette {
-  box-sizing: border-box;
-  padding: 80px 20px 20px 20px;
-  .test-button {
+  .my-process-palette {
     box-sizing: border-box;
-    padding: 8px 16px;
-    border-radius: 4px;
-    border: 1px solid rgba(24, 144, 255, 0.8);
-    cursor: pointer;
+    padding: 80px 20px 20px 20px;
+    .test-button {
+      box-sizing: border-box;
+      padding: 8px 16px;
+      border-radius: 4px;
+      border: 1px solid rgba(24, 144, 255, 0.8);
+      cursor: pointer;
+    }
   }
-}
 </style>

+ 2 - 1
src/views/material/BOMmanage/detailsPop.vue

@@ -133,7 +133,7 @@
               提交发布
             </el-button>
 
-            <el-button type="primary" size="mini" @click="handleSave">
+            <el-button type="primary" size="mini" @click="handleSave"   v-if="currentNodeData.status != 1">
               保存
             </el-button>
           </div>
@@ -507,6 +507,7 @@
         if (id) {
           getBomGetById(id).then((res) => {
             this.currentNodeData = res.data;
+            this.searchObj.versions =  this.currentNodeData.versions
             this.$forceUpdate();
           });
         } else {