From de33d4aaee80c1333564f54ad7ed63cabbbf9412 Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail.com> Date: 星期五, 08 三月 2024 14:16:27 +0800 Subject: [PATCH] update 保存增加loading、增加预编译 --- vite.config.ts | 3 +++ src/components/BpmnDesign/index.vue | 6 ++++-- src/views/workflow/model/design.vue | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/BpmnDesign/index.vue b/src/components/BpmnDesign/index.vue index 1568a3e..abc4c08 100644 --- a/src/components/BpmnDesign/index.vue +++ b/src/components/BpmnDesign/index.vue @@ -1,6 +1,6 @@ <template> <div class="containers"> - <div class="app-containers"> + <div v-loading="loading" class="app-containers"> <el-container class="h-full"> <el-container style="align-items: stretch"> <el-header> @@ -112,6 +112,7 @@ const perviewSVGShow = ref(false); const xmlStr = ref(''); const svgData = ref(''); +const loading = ref(false); const panelBarClick = () => { // 寤惰繜鎵ц锛屽惁鍒欎細瀵艰嚧闈㈡澘鏀惰捣鏃讹紝灞炴�ч潰鏉夸笉鏄剧ず @@ -285,7 +286,8 @@ xml: xml, svg: svg, key: process.id, - name: process.name + name: process.name, + loading: loading }; emit('saveCallBack', data); }; diff --git a/src/views/workflow/model/design.vue b/src/views/workflow/model/design.vue index 0f6b118..78b104f 100644 --- a/src/views/workflow/model/design.vue +++ b/src/views/workflow/model/design.vue @@ -33,6 +33,7 @@ //淇濆瓨妯″瀷 const saveCallBack = async (data) => { await proxy?.$modal.confirm('鏄惁纭淇濆瓨锛�'); + data.loading.value = true; modelForm.value.id = modelId.value; modelForm.value.xml = data.xml; modelForm.value.svg = data.svg; @@ -45,6 +46,7 @@ emit('closeCallBack', data); } }); + data.loading.value = false; }; /** diff --git a/vite.config.ts b/vite.config.ts index 99ea8e8..e1e2951 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -65,9 +65,12 @@ 'echarts', 'vue-i18n', '@vueup/vue-quill', + 'bpmn-js/lib/Viewer', 'bpmn-js/lib/Modeler.js', 'bpmn-js-properties-panel', 'min-dash', + 'diagram-js/lib/navigation/movecanvas', + 'diagram-js/lib/navigation/zoomscroll', 'bpmn-js/lib/features/palette/PaletteProvider', 'bpmn-js/lib/features/context-pad/ContextPadProvider', 'diagram-js/lib/draw/BaseRenderer', -- Gitblit v1.9.3