update 增加复杂网关

This commit is contained in:
LiuHao 2024-02-01 15:17:48 +08:00
parent 4934bb3a17
commit ed67a79951

View File

@ -1,7 +1,7 @@
<template> <template>
<div ref="propertyPanel"> <div ref="propertyPanel">
<div v-if="nodeName" class="node-name">{{ nodeName }}</div> <div v-if="nodeName" class="node-name">{{ nodeName }}</div>
<component :is="component" v-if="element" :element="element" :modeler="modeler" :users="users" :groups="groups" /> <component :is="component" v-if="element" :element="element" />
</div> </div>
</template> </template>
<script setup lang="ts" name="PropertyPanel"> <script setup lang="ts" name="PropertyPanel">
@ -11,7 +11,8 @@ import ProcessPanel from './panel/ProcessPanel.vue';
import StartEndPanel from './panel/StartEndPanel.vue'; import StartEndPanel from './panel/StartEndPanel.vue';
import GatewayPanel from './panel/GatewayPanel.vue'; import GatewayPanel from './panel/GatewayPanel.vue';
import SequenceFlowPanel from './panel/SequenceFlowPanel.vue'; import SequenceFlowPanel from './panel/SequenceFlowPanel.vue';
import { Modeler, Modeling, Element } from 'bpmn'; import { Modeler, Element } from 'bpmn';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
interface propsType { interface propsType {
users: Array<any>; users: Array<any>;
groups: Array<any>; groups: Array<any>;
@ -34,7 +35,7 @@ const taskType = [
'bpmn:ScriptTask' 'bpmn:ScriptTask'
]; ];
const sequenceType = ['bpmn:SequenceFlow']; const sequenceType = ['bpmn:SequenceFlow'];
const gatewayType = ['bpmn:InclusiveGateway', 'bpmn:ExclusiveGateway', 'bpmn:ParallelGateway', 'bpmn:EventBasedGateway']; const gatewayType = ['bpmn:InclusiveGateway', 'bpmn:ExclusiveGateway', 'bpmn:ParallelGateway', 'bpmn:EventBasedGateway', 'bpmn:ComplexGateway'];
const processType = ['bpmn:Process']; const processType = ['bpmn:Process'];
// //
@ -46,7 +47,7 @@ const component = computed(() => {
if (sequenceType.includes(type)) return SequenceFlowPanel; if (sequenceType.includes(type)) return SequenceFlowPanel;
if (gatewayType.includes(type)) return GatewayPanel; if (gatewayType.includes(type)) return GatewayPanel;
if (processType.includes(type)) return ProcessPanel; if (processType.includes(type)) return ProcessPanel;
return console.error('no ' + type + ' type panel'); return proxy?.$modal.msgWarning('面板开发中....');
}); });
const nodeName = computed(() => { const nodeName = computed(() => {