From 6b3de50c69f329fde8e46424460d3753657bbcc4 Mon Sep 17 00:00:00 2001 From: duxz Date: Thu, 25 May 2023 15:34:13 +0800 Subject: [PATCH 01/25] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=20window.bpmnIn?= =?UTF-8?q?stances=20=E6=9C=89=E6=97=B6=E5=80=99=E4=B8=BA=20undefined=20?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/penal/PropertiesPanel.vue | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue index 74d8b00a..17d0773e 100644 --- a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue +++ b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue @@ -110,18 +110,18 @@ const timer = ref() provide('prefix', props.prefix) provide('width', props.width) const bpmnInstances = () => (window as any)?.bpmnInstances -const initModels = () => { - // console.log(props, 'props') - // console.log(props.bpmnModeler, 'sakdjjaskdsajdkasdjkadsjk') - // 初始化 modeler 以及其他 moddle - // nextTick(() => { - if (!props.bpmnModeler) { + +// 监听 props.bpmnModeler 然后 initModels +const unwatchBpmn = watch( + () => props.bpmnModeler, + () => { // 避免加载时 流程图 并未加载完成 - timer.value = setTimeout(() => initModels(), 10) - return - } - if (timer.value) { - clearTimeout(timer.value) + if (!props.bpmnModeler) { + console.log('缺少props.bpmnModeler') + return + } + + console.log('props.bpmnModeler 有值了!!!') const w = window as any w.bpmnInstances = { modeler: props.bpmnModeler, @@ -134,12 +134,16 @@ const initModels = () => { replace: props.bpmnModeler.get('replace'), selection: props.bpmnModeler.get('selection') } - } - console.log(bpmnInstances(), 'window.bpmnInstances') - getActiveElement() - // }) -} + console.log(bpmnInstances(), 'window.bpmnInstances') + getActiveElement() + unwatchBpmn() + }, + { + immediate: true + } +) + const getActiveElement = () => { // 初始第一个选中元素 bpmn:Process initFormOnChanged(null) @@ -187,11 +191,7 @@ const initFormOnChanged = (element) => { ) formVisible.value = elementType.value === 'UserTask' || elementType.value === 'StartEvent' } -onMounted(() => { - setTimeout(() => { - initModels() - }, 100) -}) + onBeforeUnmount(() => { const w = window as any w.bpmnInstances = null From 69c4995b52e86d2a6ba57519e4deb0e8f71f21c3 Mon Sep 17 00:00:00 2001 From: nullcache <99305540+nullcache@users.noreply.github.com> Date: Tue, 27 Jun 2023 11:54:59 +0800 Subject: [PATCH 02/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8DuseTable=E5=9C=A8total?= =?UTF-8?q?=E4=B8=BA0=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useTable.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hooks/web/useTable.ts b/src/hooks/web/useTable.ts index 3f0d5055..361dd678 100644 --- a/src/hooks/web/useTable.ts +++ b/src/hooks/web/useTable.ts @@ -136,9 +136,7 @@ export const useTable = (config?: UseTableConfig) => { }) if (res) { tableObject.tableList = (res as unknown as ResponseType).list - if ((res as unknown as ResponseType).total) { - tableObject.total = (res as unknown as ResponseType).total as unknown as number - } + tableObject.total = (res as unknown as ResponseType).total ?? 0 } }, setProps: async (props: TableProps = {}) => { From 073679875b9c05b07573e0c0e5f2cbd960140c73 Mon Sep 17 00:00:00 2001 From: nullcache <13013389+nullcache@user.noreply.gitee.com> Date: Tue, 27 Jun 2023 04:06:01 +0000 Subject: [PATCH 03/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8DuseTable=E5=9C=A8total?= =?UTF-8?q?=E4=B8=BA0=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useTable.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hooks/web/useTable.ts b/src/hooks/web/useTable.ts index 3f0d5055..361dd678 100644 --- a/src/hooks/web/useTable.ts +++ b/src/hooks/web/useTable.ts @@ -136,9 +136,7 @@ export const useTable = (config?: UseTableConfig) => { }) if (res) { tableObject.tableList = (res as unknown as ResponseType).list - if ((res as unknown as ResponseType).total) { - tableObject.total = (res as unknown as ResponseType).total as unknown as number - } + tableObject.total = (res as unknown as ResponseType).total ?? 0 } }, setProps: async (props: TableProps = {}) => { From 540d8496b384b313a48c947793d190cb0ca44873 Mon Sep 17 00:00:00 2001 From: xingyu Date: Sat, 8 Jul 2023 11:13:28 +0800 Subject: [PATCH 04/25] chore: update deps --- package.json | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 940119db..d0394c29 100644 --- a/package.json +++ b/package.json @@ -32,9 +32,9 @@ "@element-plus/icons-vue": "^2.1.0", "@form-create/designer": "^3.1.0", "@form-create/element-ui": "^3.1.17", - "@iconify/iconify": "^3.1.0", + "@iconify/iconify": "^3.1.1", "@videojs-player/vue": "^1.0.0", - "@vueuse/core": "^10.2.0", + "@vueuse/core": "^10.2.1", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^3.0.2", @@ -45,18 +45,18 @@ "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", "crypto-js": "^4.1.1", - "dayjs": "^1.11.8", + "dayjs": "^1.11.9", "diagram-js": "^11.6.0", "echarts": "^5.4.2", "echarts-wordcloud": "^2.1.0", "element-plus": "2.3.7", - "fast-xml-parser": "^4.2.4", + "fast-xml-parser": "^4.2.5", "highlight.js": "^11.8.0", "intro.js": "^7.0.1", "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", "min-dash": "^4.1.1", - "mitt": "^3.0.0", + "mitt": "^3.0.1", "nprogress": "^0.2.0", "pinia": "^2.1.4", "qrcode": "^1.5.3", @@ -66,57 +66,57 @@ "video.js": "^8.3.0", "vue": "3.3.4", "vue-i18n": "9.2.2", - "vue-router": "^4.2.2", - "vue-types": "^5.0.4", + "vue-router": "^4.2.4", + "vue-types": "^5.1.0", "vuedraggable": "^4.1.0", "web-storage-cache": "^1.1.1", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.6.5", - "@commitlint/config-conventional": "^17.6.5", - "@iconify/json": "^2.2.80", - "@intlify/unplugin-vue-i18n": "^0.11.0", + "@commitlint/cli": "^17.6.6", + "@commitlint/config-conventional": "^17.6.6", + "@iconify/json": "^2.2.87", + "@intlify/unplugin-vue-i18n": "^0.12.1", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", "@types/lodash-es": "^4.17.7", - "@types/node": "^20.3.1", + "@types/node": "^20.4.1", "@types/nprogress": "^0.2.0", - "@types/qrcode": "^1.5.0", + "@types/qrcode": "^1.5.1", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.59.11", - "@typescript-eslint/parser": "^5.59.11", - "@vitejs/plugin-legacy": "^4.0.4", + "@typescript-eslint/eslint-plugin": "^5.61.0", + "@typescript-eslint/parser": "^5.61.0", + "@vitejs/plugin-legacy": "^4.1.0", "@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue-jsx": "^3.0.1", "autoprefixer": "^10.4.14", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", - "consola": "^3.1.0", - "eslint": "^8.43.0", + "consola": "^3.2.3", + "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", "eslint-define-config": "^1.21.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.15.0", - "lint-staged": "^13.2.2", - "postcss": "^8.4.24", + "eslint-plugin-vue": "^9.15.1", + "lint-staged": "^13.2.3", + "postcss": "^8.4.25", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", "prettier": "^2.8.8", "rimraf": "^5.0.1", - "rollup": "^3.25.1", - "sass": "^1.63.5", - "stylelint": "^15.8.0", - "stylelint-config-recommended": "^12.0.0", + "rollup": "^3.26.2", + "sass": "^1.63.6", + "stylelint": "^15.10.1", + "stylelint-config-recommended": "^13.0.0", "stylelint-config-recommended-vue": "^1.4.0", - "stylelint-config-standard": "^33.0.0", + "stylelint-config-standard": "^34.0.0", "stylelint-order": "^6.0.3", - "terser": "^5.18.1", - "typescript": "5.0.4", - "unplugin-auto-import": "^0.16.4", - "unplugin-element-plus": "^0.7.1", + "terser": "^5.18.2", + "typescript": "5.1.6", + "unplugin-auto-import": "^0.16.6", + "unplugin-element-plus": "^0.7.2", "unplugin-vue-components": "^0.25.1", - "vite": "4.3.9", + "vite": "4.4.2", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -125,7 +125,7 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-top-level-await": "^1.3.1", "vite-plugin-windicss": "^1.9.0", - "vue-tsc": "^1.8.1", + "vue-tsc": "^1.8.4", "windicss": "^3.5.6" }, "license": "MIT", From ba1254f397ca322e4a21d972d33a11b1f98496b4 Mon Sep 17 00:00:00 2001 From: xingyu Date: Sat, 8 Jul 2023 11:13:36 +0800 Subject: [PATCH 05/25] fix: eslint --- .../bpmnProcessDesigner/package/penal/PropertiesPanel.vue | 2 +- src/views/infra/build/index.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue index b686801e..377592f4 100644 --- a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue +++ b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue @@ -109,7 +109,7 @@ const elementBusinessObject = ref({}) // 元素 businessObject 镜像,提 const conditionFormVisible = ref(false) // 流转条件设置 const formVisible = ref(false) // 表单配置 const bpmnElement = ref() -const timer = ref() + provide('prefix', props.prefix) provide('width', props.width) const bpmnInstances = () => (window as any)?.bpmnInstances diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue index 14adf399..0b0a88cf 100644 --- a/src/views/infra/build/index.vue +++ b/src/views/infra/build/index.vue @@ -38,6 +38,7 @@ import hljs from 'highlight.js' // 导入代码高亮文件 import 'highlight.js/styles/github.css' // 导入代码高亮样式 import xml from 'highlight.js/lib/languages/java' import json from 'highlight.js/lib/languages/json' +import formCreate from '@form-create/element-ui' defineOptions({ name: 'InfraBuild' }) From 44efb13c0eb08d0b42c1bc62a6895538e05c582f Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 10 Jul 2023 11:16:42 +0800 Subject: [PATCH 06/25] fix: login error --- src/views/Login/components/LoginForm.vue | 2 +- src/views/Login/components/QrCodeForm.vue | 2 +- src/views/Login/components/SSOLogin.vue | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 323069b9..d0bbb57c 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -9,7 +9,7 @@ label-width="120px" size="large" > - + diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/Login/components/QrCodeForm.vue index ba62dcd9..fd184ff6 100644 --- a/src/views/Login/components/QrCodeForm.vue +++ b/src/views/Login/components/QrCodeForm.vue @@ -1,5 +1,5 @@