Bläddra i källkod

添加流程创建时的mes校验

lph 1 år sedan
förälder
incheckning
217b231064
1 ändrade filer med 24 tillägg och 3 borttagningar
  1. 24 3
      zkqy-ui/src/views/system/bpmnPro/index.vue

+ 24 - 3
zkqy-ui/src/views/system/bpmnPro/index.vue

@@ -32,7 +32,7 @@
             filterable
           >
             <el-option
-              v-for="item in dict.type.bpm_type"
+              v-for="item in processTypeOptions"
               :key="item.value"
               :label="item.label"
               :value="item.value"
@@ -55,7 +55,7 @@
 <script>
 import BpmnDesigner from "./components/Designer";
 import BpmnSettings from "./components/Settings";
-import { mapGetters } from "vuex";
+import { mapGetters, mapState } from "vuex";
 import BpmnToolbar from "./components/Toolbar";
 import BpmnContextMenu from "./components/ContextMenu/ContextMenu";
 import BpmnPanel from "./components/Panel";
@@ -96,6 +96,7 @@ export default {
   },
   data() {
     return {
+      processTypeOptions: [],
       formData: undefined,
       xmlString: undefined,
       nodeData: undefined,
@@ -118,6 +119,7 @@ export default {
   },
   computed: {
     ...mapGetters(["getEditorConfig", "getModeler"]),
+    ...mapState(["user"]),
   },
   provide() {
     return {
@@ -246,14 +248,33 @@ export default {
       this.$tab.closePage();
       this.$router.back();
     },
+    processTypeOption() {
+      let tenantProfession = this.user.tenant.tenantProfession;
+
+      let isMES = tenantProfession.includes("MES");
+      if (isMES) {
+        //mes
+        this.processTypeOptions = this.dict.type.bpm_type;
+      } else {
+        //非MES
+        this.processTypeOptions = this.dict.type.bpm_type.filter((item) => {
+          return item.value != "0";
+        });
+      }
+      this.processForm.processType = this.processTypeOptions[0].value;
+    },
   },
-  async mounted() {
+  mounted() {
     document.body.addEventListener("contextmenu", this.Provence);
+
     this.getAllScriptList();
     this.getAllRoleList();
     this.getAllUserList();
     this.getAllDragFormList();
     this.getGroupDragFormList();
+    this.$nextTick(() => {
+      this.processTypeOption();
+    });
   },
   async created() {
     if (this.$route.query?.id) {