From 0c39b593ce6c001500850cb9fd3ca8f1d32757d5 Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail.com>
Date: 星期一, 18 三月 2024 14:18:30 +0800
Subject: [PATCH] update 优化面板类型

---
 src/types/bpmn/panel.d.ts                            |   16 ++++++++++++++++
 src/components/BpmnDesign/panel/ParticipantPanel.vue |    9 +++++----
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/components/BpmnDesign/panel/ParticipantPanel.vue b/src/components/BpmnDesign/panel/ParticipantPanel.vue
index cf32fc6..24cb9dc 100644
--- a/src/components/BpmnDesign/panel/ParticipantPanel.vue
+++ b/src/components/BpmnDesign/panel/ParticipantPanel.vue
@@ -13,10 +13,10 @@
         <div>
           <el-form ref="formRef" :model="formData" :rules="formRules" label-width="90px">
             <el-form-item prop="id" label="鑺傜偣 ID">
-              <el-input v-model="formData.id" @change="idChange"> </el-input>
+              <el-input v-model="formData.id" @change="idChange"></el-input>
             </el-form-item>
             <el-form-item prop="name" label="鑺傜偣鍚嶇О">
-              <el-input v-model="formData.name" @change="nameChange"> </el-input>
+              <el-input v-model="formData.name" @change="nameChange"></el-input>
             </el-form-item>
           </el-form>
         </div>
@@ -42,11 +42,12 @@
 import useParseElement from '@/components/BpmnDesign/hooks/useParseElement';
 import usePanel from '@/components/BpmnDesign/hooks/usePanel';
 import { ModdleElement } from 'bpmn';
-import { StartEndPanel } from 'bpmnDesign';
+import { ParticipantPanel } from 'bpmnDesign';
 
 interface PropType {
   element: ModdleElement;
 }
+
 const props = withDefaults(defineProps<PropType>(), {});
 const { nameChange, idChange } = usePanel({
   element: toRaw(props.element)
@@ -55,7 +56,7 @@
   element: toRaw(props.element)
 });
 
-const formData = ref(parseData<StartEndPanel>());
+const formData = ref(parseData<ParticipantPanel>());
 const currentCollapseItem = ref(['1', '2']);
 const formRules = ref<ElFormRules>({
   id: [{ required: true, message: '璇疯緭鍏�', trigger: 'blur' }],
diff --git a/src/types/bpmn/panel.d.ts b/src/types/bpmn/panel.d.ts
index 0d0cac4..fc5fbe5 100644
--- a/src/types/bpmn/panel.d.ts
+++ b/src/types/bpmn/panel.d.ts
@@ -72,4 +72,20 @@
     conditionExpressionValue: string;
     skipExpression: string;
   }
+
+  export interface ParticipantPanel extends BasePanel {}
+  export interface SubProcessPanel extends BasePanel {
+    multiInstanceType: MultiInstanceTypeEnum;
+    collection?: string;
+    elementVariable?: string;
+    completionCondition?: string;
+    loopCharacteristics?: {
+      collection: string;
+      elementVariable: string;
+      isSequential: boolean;
+      completionCondition: {
+        body: string;
+      };
+    };
+  }
 }

--
Gitblit v1.9.3