|
@@ -29,10 +29,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import UserTask from './task-components/UserTask.vue'
|
|
|
-import ServiceTask from './task-components/ServiceTask.vue'
|
|
|
-import ScriptTask from './task-components/ScriptTask.vue'
|
|
|
-import ReceiveTask from './task-components/ReceiveTask.vue'
|
|
|
+import { installedComponent } from './data'
|
|
|
|
|
|
defineOptions({ name: 'ElementTaskConfig' })
|
|
|
|
|
@@ -46,15 +43,7 @@ const taskConfigForm = ref({
|
|
|
exclusive: false
|
|
|
})
|
|
|
const witchTaskComponent = ref()
|
|
|
-const installedComponent = ref({
|
|
|
- // 手工任务与普通任务一致,不需要其他配置
|
|
|
- // 接收消息任务,需要在全局下插入新的消息实例,并在该节点下的 messageRef 属性绑定该实例
|
|
|
- // 发送任务、服务任务、业务规则任务共用一个相同配置
|
|
|
- UserTask: 'UserTask', // 用户任务配置
|
|
|
- ServiceTask: 'ServiceTask', // 服务任务配置
|
|
|
- ScriptTask: 'ScriptTask', // 脚本任务配置
|
|
|
- ReceiveTask: 'ReceiveTask' // 消息接收任务
|
|
|
-})
|
|
|
+
|
|
|
const bpmnElement = ref()
|
|
|
|
|
|
const bpmnInstances = () => (window as any).bpmnInstances
|
|
@@ -80,18 +69,8 @@ watch(
|
|
|
watch(
|
|
|
() => props.type,
|
|
|
() => {
|
|
|
- // witchTaskComponent.value = installedComponent.value[props.type]
|
|
|
- if (props.type == installedComponent.value.UserTask) {
|
|
|
- witchTaskComponent.value = UserTask
|
|
|
- }
|
|
|
- if (props.type == installedComponent.value.ServiceTask) {
|
|
|
- witchTaskComponent.value = ServiceTask
|
|
|
- }
|
|
|
- if (props.type == installedComponent.value.ScriptTask) {
|
|
|
- witchTaskComponent.value = ScriptTask
|
|
|
- }
|
|
|
- if (props.type == installedComponent.value.ReceiveTask) {
|
|
|
- witchTaskComponent.value = ReceiveTask
|
|
|
+ if (props.type) {
|
|
|
+ witchTaskComponent.value = installedComponent[props.type].componet
|
|
|
}
|
|
|
},
|
|
|
{ immediate: true }
|