From b06f6a316b6a8293bb8aba6bfff33336b66c032a Mon Sep 17 00:00:00 2001 From: ahaos <8406649+lhailgl@user.noreply.gitee.com> Date: Wed, 13 Dec 2023 01:01:52 +0000 Subject: [PATCH 001/134] =?UTF-8?q?!64=20=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=20*=20Merge=20branch=20'dev'=20of=20gitee.com:JavaLio?= =?UTF-8?q?nLi/plus-ui=20into=20ts=20*=20=E5=8D=87=E7=BA=A7=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=20*=20!61=20fix:=20=E5=88=A0=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8FElUploadInstance?= =?UTF-8?q?=20*=20fix:=20=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8D=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8FElUploadInstance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 2 +- .eslintrc.js | 23 +- .prettierrc | 20 ++ package.json | 63 ++-- src/App.vue | 10 +- src/api/tool/gen/index.ts | 4 +- src/components/Breadcrumb/index.vue | 39 +- src/components/BuildCode/index.vue | 69 ++-- src/components/BuildCode/render.vue | 67 ++-- src/components/DictTag/index.vue | 60 ++-- src/components/Editor/index.vue | 158 ++++---- src/components/FileUpload/index.vue | 240 +++++++------ src/components/Hamburger/index.vue | 8 +- src/components/HeaderSearch/index.vue | 96 ++--- src/components/IconSelect/index.vue | 24 +- src/components/ImagePreview/index.vue | 18 +- src/components/ImageUpload/index.vue | 239 +++++++------ src/components/LangSelect/index.vue | 7 +- src/components/Pagination/index.vue | 94 ++--- src/components/RightToolbar/index.vue | 50 ++- src/components/RuoYiDoc/index.vue | 2 +- src/components/RuoYiGit/index.vue | 2 +- src/components/SizeSelect/index.vue | 12 +- src/components/SvgIcon/index.vue | 20 +- src/components/TopNav/index.vue | 98 ++--- src/components/TreeSelect/index.vue | 123 +++---- src/components/iFrame/index.vue | 12 +- src/directive/permission/index.ts | 4 +- src/layout/components/AppMain.vue | 21 +- src/layout/components/IframeToggle/index.vue | 12 +- src/layout/components/InnerLink/index.vue | 13 +- src/layout/components/Navbar.vue | 91 ++--- src/layout/components/Settings/index.vue | 176 ++++----- src/layout/components/Sidebar/Link.vue | 44 +-- src/layout/components/Sidebar/Logo.vue | 26 +- src/layout/components/Sidebar/SidebarItem.vue | 122 +++---- src/layout/components/Sidebar/index.vue | 41 ++- .../components/SocialCallback/index.vue | 5 +- src/layout/components/TagsView/ScrollPane.vue | 110 +++--- src/layout/components/TagsView/index.vue | 337 +++++++++--------- src/layout/components/TopBar/search.vue | 187 +++++----- src/layout/components/notice/index.vue | 23 +- src/layout/index.vue | 66 ++-- src/permission.ts | 5 +- src/plugins/tab.ts | 18 +- src/router/index.ts | 6 +- src/store/modules/notice.ts | 2 +- src/store/modules/permission.ts | 65 ++-- src/store/modules/settings.ts | 38 +- src/store/modules/tagsView.ts | 22 +- src/types/element.d.ts | 6 +- src/types/env.d.ts | 5 +- src/types/global.d.ts | 73 +++- src/types/router.d.ts | 46 ++- src/types/setting.d.ts | 70 ---- src/utils/propTypes.ts | 1 + src/utils/request.ts | 2 - src/utils/websocket.ts | 4 +- src/views/demo/demo/index.vue | 104 +++--- src/views/demo/tree/index.vue | 123 +++---- src/views/error/401.vue | 4 +- src/views/error/404.vue | 8 +- src/views/index.vue | 12 +- src/views/login.vue | 55 +-- src/views/monitor/cache/index.vue | 74 ++-- src/views/monitor/logininfor/index.vue | 142 ++++---- src/views/monitor/online/index.vue | 18 +- src/views/monitor/operlog/index.vue | 73 ++-- src/views/redirect/index.vue | 8 +- src/views/register.vue | 65 ++-- src/views/system/client/index.vue | 124 +++---- src/views/system/config/index.vue | 94 ++--- src/views/system/dept/index.vue | 126 ++++--- src/views/system/dict/data.vue | 119 ++++--- src/views/system/dict/index.vue | 91 ++--- src/views/system/menu/index.vue | 132 +++---- src/views/system/notice/index.vue | 76 ++-- src/views/system/oss/config.vue | 153 ++++---- src/views/system/oss/index.vue | 132 ++++--- src/views/system/post/index.vue | 82 +++-- src/views/system/role/authUser.vue | 57 ++- src/views/system/role/index.vue | 252 ++++++------- src/views/system/role/selectUser.vue | 35 +- src/views/system/tenant/index.vue | 128 +++---- src/views/system/tenantPackage/index.vue | 93 ++--- src/views/system/user/authRole.vue | 26 +- src/views/system/user/index.vue | 288 ++++++++------- src/views/system/user/profile/index.vue | 50 +-- src/views/system/user/profile/resetPwd.vue | 44 ++- src/views/system/user/profile/thirdParty.vue | 39 +- src/views/system/user/profile/userAvatar.vue | 40 +-- src/views/system/user/profile/userInfo.vue | 33 +- src/views/tool/gen/basicInfoForm.vue | 22 +- src/views/tool/gen/editTable.vue | 32 +- src/views/tool/gen/genInfoForm.vue | 49 +-- src/views/tool/gen/importTable.vue | 40 +-- src/views/tool/gen/index.vue | 74 ++-- tsconfig.json | 8 +- 98 files changed, 3183 insertions(+), 3143 deletions(-) create mode 100644 .prettierrc delete mode 100644 src/types/setting.d.ts diff --git a/.eslintignore b/.eslintignore index c4d771a1..9858f3eb 100644 --- a/.eslintignore +++ b/.eslintignore @@ -14,4 +14,4 @@ dist .eslintrc.js prettier.config.js src/assets -tailwind.config.js \ No newline at end of file +tailwind.config.js diff --git a/.eslintrc.js b/.eslintrc.js index a1b32e39..3fab2db0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,28 +1,35 @@ module.exports = { env: { browser: true, - es2021: true, - node: true + node: true, + es6: true }, parser: 'vue-eslint-parser', extends: [ - 'eslint:recommended', - 'plugin:vue/vue3-essential', - 'plugin:@typescript-eslint/recommended', + 'plugin:vue/vue3-recommended', './.eslintrc-auto-import.json', - 'plugin:prettier/recommended' + 'plugin:@typescript-eslint/recommended', + "prettier", + 'plugin:prettier/recommended', ], parserOptions: { ecmaVersion: '2020', sourceType: 'module', + project: "./tsconfig.*?.json", parser: '@typescript-eslint/parser' }, - plugins: ['vue', '@typescript-eslint'], + plugins: ['vue', '@typescript-eslint', 'import', 'promise', 'node', 'prettier'], rules: { - 'vue/multi-word-component-names': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-explicit-any': 'off', + + // vue + 'vue/multi-word-component-names': 'off', + 'vue/valid-define-props': 'off', 'vue/no-v-model-argument': 'off', + 'prefer-rest-params': 'off', + // prettier + 'prettier/prettier': 'error', '@typescript-eslint/ban-types': [ 'error', { diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0b008904 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,20 @@ +{ + "printWidth": 150, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "bracketSameLine": false, + "trailingComma": "none", + "bracketSpacing": true, + "embeddedLanguageFormatting": "auto", + "arrowParens": "always", + "requirePragma": false, + "insertPragma": false, + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css", + "vueIndentScriptAndStyle": false, + "endOfLine": "auto" +} diff --git a/package.json b/package.json index 13e0f926..95cd2a13 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,10 @@ "license": "MIT", "scripts": { "dev": "vite serve --mode development", - "build:prod": "vite build --mode production &&vue-tsc --noEmit", + "build:prod": "vite build --mode production", + "build:dev": "vite build --mode development", "preview": "vite preview", - "lint": "eslint src/**/*.{ts,js,vue} --fix", + "lint:eslint": "eslint --fix --ext .ts,.js,.vue ./src ", "prepare": "husky install", "prettier": "prettier --write ." }, @@ -19,28 +20,28 @@ "dependencies": { "@element-plus/icons-vue": "2.1.0", "@vueup/vue-quill": "1.2.0", - "@vueuse/core": "9.5.0", + "@vueuse/core": "10.7.0", "animate.css": "4.1.1", "await-to-js": "^3.0.0", "axios": "^1.3.4", + "crypto-js": "^4.1.1", "echarts": "5.4.0", - "element-plus": "2.2.27", + "element-plus": "2.4.3", "file-saver": "2.0.5", "fuse.js": "6.6.2", "js-cookie": "3.0.1", "jsencrypt": "3.3.1", - "crypto-js": "^4.1.1", "nprogress": "0.2.0", "path-browserify": "1.0.1", "path-to-regexp": "6.2.0", - "pinia": "2.0.22", + "pinia": "2.1.7", "screenfull": "6.0.0", "vform3-builds": "3.0.8", - "vue": "3.2.45", + "vue": "3.3.11", "vue-cropper": "1.0.3", "vue-i18n": "9.2.2", - "vue-router": "4.1.4", - "vue-types": "^5.0.3" + "vue-router": "4.2.5", + "vue-types": "5.1.1" }, "devDependencies": { "@iconify/json": "^2.2.40", @@ -51,34 +52,38 @@ "@types/node": "18.14.2", "@types/nprogress": "0.2.0", "@types/path-browserify": "^1.0.0", - "@typescript-eslint/eslint-plugin": "5.56.0", - "@typescript-eslint/parser": "5.56.0", - "@unocss/preset-attributify": "^0.50.6", - "@unocss/preset-icons": "^0.50.6", - "@unocss/preset-uno": "^0.50.6", - "@vitejs/plugin-vue": "4.0.0", + "@typescript-eslint/eslint-plugin": "6.14.0", + "@typescript-eslint/parser": "6.14.0", + "@unocss/preset-attributify": "^0.58.0", + "@unocss/preset-icons": "^0.58.0", + "@unocss/preset-uno": "^0.58.0", "@vue/compiler-sfc": "3.2.45", + "@vitejs/plugin-vue": "4.5.2", "autoprefixer": "10.4.14", - "eslint": "8.36.0", - "eslint-config-prettier": "8.8.0", - "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-vue": "9.9.0", + "eslint": "8.55.0", + "eslint-config-prettier": "9.1.0", + "eslint-define-config": "2.0.0", + "eslint-plugin-prettier": "5.0.1", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-import": "2.29.0", + "eslint-plugin-vue": "9.19.2", "fast-glob": "^3.2.11", "husky": "7.0.4", "postcss": "^8.4.21", - "prettier": "2.8.6", + "prettier": "3.1.1", "sass": "1.56.1", - "typescript": "4.9.5", - "unocss": "^0.50.6", - "unplugin-auto-import": "0.13.0", - "unplugin-icons": "0.15.1", - "unplugin-vue-components": "0.23.0", - "vite": "4.3.1", + "typescript": "5.2.2", + "unocss": "^0.58.0", + "unplugin-auto-import": "0.17.2", + "unplugin-icons": "0.18.1", + "unplugin-vue-components": "0.26.0", + "unplugin-vue-setup-extend-plus": "0.4.9", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", - "unplugin-vue-setup-extend-plus": "0.4.9", "vitest": "^0.29.7", - "vue-eslint-parser": "9.1.0", - "vue-tsc": "0.35.0" + "vue-eslint-parser": "9.3.2", + "vue-tsc": "0.35.0", + "vite": "5.0.4" } } diff --git a/src/App.vue b/src/App.vue index 41ffdd4d..0b058d75 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,8 +5,8 @@ diff --git a/src/api/tool/gen/index.ts b/src/api/tool/gen/index.ts index b91df6ac..efe079cf 100644 --- a/src/api/tool/gen/index.ts +++ b/src/api/tool/gen/index.ts @@ -28,7 +28,7 @@ export const getGenTable = (tableId: string | number): AxiosPromise }; // 修改代码生成信息 -export const updateGenTable = (data: DbTableForm) => { +export const updateGenTable = (data: DbTableForm): AxiosPromise => { return request({ url: '/tool/gen', method: 'put', @@ -37,7 +37,7 @@ export const updateGenTable = (data: DbTableForm) => { }; // 导入表 -export const importTable = (data: { tables: string; dataName: string }) => { +export const importTable = (data: { tables: string; dataName: string }): AxiosPromise => { return request({ url: '/tool/gen/importTable', method: 'post', diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index b96829af..57a30ace 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -2,8 +2,7 @@ - {{ - item.meta?.title }} + {{ item.meta?.title }} {{ item.meta?.title }} @@ -11,42 +10,42 @@ diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index be99ac03..67abaabf 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -1,6 +1,7 @@ diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 489ac43e..f9f5e623 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -1,5 +1,5 @@ diff --git a/src/components/ImagePreview/index.vue b/src/components/ImagePreview/index.vue index 723ccdb2..349c4435 100644 --- a/src/components/ImagePreview/index.vue +++ b/src/components/ImagePreview/index.vue @@ -15,11 +15,11 @@ const props = defineProps({ src: propTypes.string.def(''), width: { type: [Number, String], - default: "" + default: '' }, height: { type: [Number, String], - default: "" + default: '' } }); @@ -27,7 +27,7 @@ const realSrc = computed(() => { if (!props.src) { return; } - let real_src = props.src.split(",")[0]; + let real_src = props.src.split(',')[0]; return real_src; }); @@ -35,21 +35,17 @@ const realSrcList = computed(() => { if (!props.src) { return; } - let real_src_list = props.src.split(","); + let real_src_list = props.src.split(','); let srcList: string[] = []; - real_src_list.forEach(item => { + real_src_list.forEach((item) => { return srcList.push(item); }); return srcList; }); -const realWidth = computed(() => - typeof props.width == "string" ? props.width : `${props.width}px` -); +const realWidth = computed(() => (typeof props.width == 'string' ? props.width : `${props.width}px`)); -const realHeight = computed(() => - typeof props.height == "string" ? props.height : `${props.height}px` -); +const realHeight = computed(() => (typeof props.height == 'string' ? props.height : `${props.height}px`)); diff --git a/src/components/LangSelect/index.vue b/src/components/LangSelect/index.vue index a30a2f69..f5ae8e8b 100644 --- a/src/components/LangSelect/index.vue +++ b/src/components/LangSelect/index.vue @@ -20,16 +20,15 @@ import { useAppStore } from '@/store/modules/app'; const appStore = useAppStore(); const { locale } = useI18n(); - const message: any = { zh_CN: '切换语言成功!', - en_US: 'Switch Language Successful!', -} + en_US: 'Switch Language Successful!' +}; const handleLanguageChange = (lang: string) => { locale.value = lang; appStore.changeLanguage(lang); ElMessage.success(message[lang] || '切换语言成功!'); -} +}; diff --git a/src/layout/components/notice/index.vue b/src/layout/components/notice/index.vue index ef4a6a9a..e43b2b8c 100644 --- a/src/layout/components/notice/index.vue +++ b/src/layout/components/notice/index.vue @@ -1,12 +1,12 @@ - +

请升级您的浏览器,以便我们更好的为您提供服务!

您正在使用 Internet Explorer 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。


diff --git a/index.html b/index.html index c0dab512..aa1c86d9 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -9,7 +9,7 @@ RuoYi-Vue-Plus多租户管理系统 diff --git a/src/api/system/config/index.ts b/src/api/system/config/index.ts index e52a2566..1e4842d5 100644 --- a/src/api/system/config/index.ts +++ b/src/api/system/config/index.ts @@ -20,7 +20,7 @@ export function getConfig(configId: string | number): AxiosPromise { } // 根据参数键名查询参数值 -export function getConfigKey(configKey: string): AxiosPromise { +export function getConfigKey(configKey: string): AxiosPromise { return request({ url: '/system/config/configKey/' + configKey, method: 'get' diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 48865fba..bdf9b032 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -14,7 +14,14 @@ body { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; + font-family: + Helvetica Neue, + Helvetica, + PingFang SC, + Hiragino Sans GB, + Microsoft YaHei, + Arial, + sans-serif; } label { diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index d47a2bd5..d85da554 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -28,7 +28,10 @@ // reset element-ui css .horizontal-collapse-transition { - transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; + transition: + 0s width ease-in-out, + 0s padding-left ease-in-out, + 0s padding-right ease-in-out; } .scrollbar-wrapper { @@ -106,7 +109,6 @@ } } - & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title, & .theme-dark .el-sub-menu .el-menu-item { background-color: $base-sub-menu-background !important; diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index 8d9fb400..e5dd57dd 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -2,16 +2,20 @@
-- Gitee From d3b630076af2b25603fba7c3adcf2c5313c3bd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=93=E8=9B=99=E5=B8=88?= <770492966@qq.com> Date: Fri, 5 Jan 2024 14:50:27 +0000 Subject: [PATCH 028/134] =?UTF-8?q?update=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E9=94=99=E4=B9=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 抓蛙师 <770492966@qq.com> --- src/components/Editor/index.vue | 38 ++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index d2467f16..be7f24af 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -2,7 +2,6 @@
+
@@ -64,18 +64,30 @@ const options = ref({ debug: 'warn', modules: { // 工具栏配置 - toolbar: [ - ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 - ['blockquote', 'code-block'], // 引用 代码块 - [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表 - [{ indent: '-1' }, { indent: '+1' }], // 缩进 - [{ size: ['small', false, 'large', 'huge'] }], // 字体大小 - [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 - [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 - [{ align: [] }], // 对齐方式 - ['clean'], // 清除文本格式 - ['link', 'image', 'video'] // 链接、图片、视频 - ] + toolbar: { + container: [ + ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 + ["blockquote", "code-block"], // 引用 代码块 + [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表 + [{ indent: "-1" }, { indent: "+1" }], // 缩进 + [{ size: ["small", false, "large", "huge"] }], // 字体大小 + [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 + [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 + [{ align: [] }], // 对齐方式 + ["clean"], // 清除文本格式 + ["link", "image", "video"] // 链接、图片、视频 + ], + handlers: { + image: function (value: any) { + if (value) { + // 调用element图片上传 + proxy?.$refs.uploadRef.click(); + } else { + Quill.format("image", true); + } + }, + }, + } }, placeholder: '请输入内容', readOnly: props.readOnly -- Gitee From 31da01bdd1e4fe8fb8eec41f401d73bcf6cc18b7 Mon Sep 17 00:00:00 2001 From: ahao Date: Sat, 6 Jan 2024 17:27:01 +0800 Subject: [PATCH 029/134] fix https://gitee.com/dromara/RuoYi-Vue-Plus/issues/I8TMAI --- src/components/Editor/index.vue | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index be7f24af..fc30c85e 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -57,6 +57,7 @@ const upload = reactive({ url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' }); const quillEditorRef = ref(); +const uploadRef = ref(); const options = ref({ theme: 'snow', @@ -66,27 +67,27 @@ const options = ref({ // 工具栏配置 toolbar: { container: [ - ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 - ["blockquote", "code-block"], // 引用 代码块 - [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表 - [{ indent: "-1" }, { indent: "+1" }], // 缩进 - [{ size: ["small", false, "large", "huge"] }], // 字体大小 - [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 - [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 - [{ align: [] }], // 对齐方式 - ["clean"], // 清除文本格式 - ["link", "image", "video"] // 链接、图片、视频 + ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 + ['blockquote', 'code-block'], // 引用 代码块 + [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表 + [{ indent: '-1' }, { indent: '+1' }], // 缩进 + [{ size: ['small', false, 'large', 'huge'] }], // 字体大小 + [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 + [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 + [{ align: [] }], // 对齐方式 + ['clean'], // 清除文本格式 + ['link', 'image', 'video'] // 链接、图片、视频 ], handlers: { - image: function (value: any) { + image: (value: boolean) => { if (value) { // 调用element图片上传 - proxy?.$refs.uploadRef.click(); + uploadRef.value.click(); } else { - Quill.format("image", true); + Quill.format('image', true); } - }, - }, + } + } } }, placeholder: '请输入内容', @@ -107,7 +108,7 @@ const styles = computed(() => { const content = ref(''); watch( () => props.modelValue, - (v) => { + (v: string) => { if (v !== content.value) { content.value = v === undefined ? '

' : v; } @@ -129,7 +130,7 @@ const handleUploadSuccess = (res: any) => { quill.setSelection(length + 1); proxy?.$modal.closeLoading(); } else { - proxy?.$modal.msgError("图片插入失败"); + proxy?.$modal.msgError('图片插入失败'); proxy?.$modal.closeLoading(); } }; -- Gitee From 075c02b8c380ce3b565837358d1b2f32cfa6ef94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sat, 6 Jan 2024 20:58:54 +0800 Subject: [PATCH 030/134] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=BF=BB=E8=AF=91=E6=B3=A8=E8=A7=A3=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9F=A5=E8=AF=A2=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/types.ts | 3 +-- src/views/system/user/index.vue | 9 +-------- src/views/system/user/profile/index.vue | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 77e9c320..3488e9f1 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -1,4 +1,3 @@ -import { DeptVO } from './../dept/types'; import { RoleVO } from '@/api/system/role/types'; import { PostVO } from '@/api/system/post/types'; @@ -40,7 +39,7 @@ export interface UserVO extends BaseEntity { loginIp: string; loginDate: string; remark: string; - dept: DeptVO; + deptName: string; roles: RoleVO[]; roleIds: any; postIds: any; diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index df8b1926..3ea28643 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -101,14 +101,7 @@ - + - + @@ -69,7 +69,7 @@ \ No newline at end of file + diff --git a/src/components/Process/sys-user.vue b/src/components/Process/selectSysUser.vue similarity index 98% rename from src/components/Process/sys-user.vue rename to src/components/Process/selectSysUser.vue index dc100f3f..619ad65b 100644 --- a/src/components/Process/sys-user.vue +++ b/src/components/Process/selectSysUser.vue @@ -85,7 +85,7 @@ \ No newline at end of file + diff --git a/src/components/UserSelect/index.vue b/src/components/UserSelect/index.vue index f2ef014e..7f8b1851 100644 --- a/src/components/UserSelect/index.vue +++ b/src/components/UserSelect/index.vue @@ -47,7 +47,7 @@ - @@ -101,15 +104,31 @@ + + + +
+ 流程定义名称:{{processDefinitionName}} +
+
+ + + {{v.value}} + + +
+
+
+
-- Gitee From 2cb9b3ea47e444d7594c12392b5c75a3f4dc7754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 11 Mar 2024 10:45:08 +0800 Subject: [PATCH 063/134] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=A0=87=E7=AD=BE=E6=94=B9=E4=B8=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmnDesign/panel/property/ExecutionListener.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/BpmnDesign/panel/property/ExecutionListener.vue b/src/components/BpmnDesign/panel/property/ExecutionListener.vue index ecd50345..547e8135 100644 --- a/src/components/BpmnDesign/panel/property/ExecutionListener.vue +++ b/src/components/BpmnDesign/panel/property/ExecutionListener.vue @@ -290,9 +290,9 @@ const typeSelect = [ { id: '4b8135ab-6bc3-4a0f-80be-22f58bc6c5fd', label: '委托表达式', value: 'delegateExpression' } ]; const eventSelect = [ - { id: 'e6e0a51a-2d5d-4dc4-b847-b5c14f43a6ab', label: 'start', value: 'start' }, - { id: '6da97c1e-15fc-4445-8943-75d09f49778e', label: 'end', value: 'end' }, - { id: '6a2cbcec-e026-4f11-bef7-fff0b5c871e2', label: 'take', value: 'take' } + { id: 'e6e0a51a-2d5d-4dc4-b847-b5c14f43a6ab', label: '开始', value: 'start' }, + { id: '6da97c1e-15fc-4445-8943-75d09f49778e', label: '结束', value: 'end' }, + { id: '6a2cbcec-e026-4f11-bef7-fff0b5c871e2', label: '启用', value: 'take' } ]; -- Gitee From 71047fdbfd11c09866197ca0cafc0ae07b3c4501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 11 Mar 2024 10:58:51 +0800 Subject: [PATCH 064/134] update copyright 2024 --- src/views/login.vue | 2 +- src/views/register.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index d8c79b00..060703b4 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -56,7 +56,7 @@
diff --git a/src/views/register.vue b/src/views/register.vue index 99ca62f3..a27a72ac 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -50,7 +50,7 @@ -- Gitee From fb94a4d79c0883a543ce42379c5e6998c3cf5e6f Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Mon, 11 Mar 2024 21:03:00 +0800 Subject: [PATCH 065/134] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E5=B7=B2?= =?UTF-8?q?=E5=8A=9E=E5=88=97=E8=A1=A8=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E8=AE=B0=E5=BD=95=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Process/approvalRecord.vue | 3 ++- src/views/workflow/task/taskFinish.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Process/approvalRecord.vue b/src/components/Process/approvalRecord.vue index 5da0a568..2ef5d73a 100644 --- a/src/components/Process/approvalRecord.vue +++ b/src/components/Process/approvalRecord.vue @@ -5,7 +5,7 @@ - +
@@ -67,6 +67,7 @@ const bpmnViewRef = ref(); const init = async (instanceId: string) => { visible.value = true; loading.value = true; + tabActiveName.value = 'bpmn' historyList.value = []; processApi.getHistoryRecord(instanceId).then((resp) => { historyList.value = resp.data.historyRecordList; diff --git a/src/views/workflow/task/taskFinish.vue b/src/views/workflow/task/taskFinish.vue index 0b092ea9..fd9ce6ec 100644 --- a/src/views/workflow/task/taskFinish.vue +++ b/src/views/workflow/task/taskFinish.vue @@ -41,7 +41,7 @@ - + - + + @@ -71,9 +74,9 @@ 设计流程 - + @@ -324,8 +327,8 @@ const clickDesign = async (id: string) => { await designRef.value.open(id); }; // 导出流程模型 -const clickExportZip = (data: any) => { - proxy?.$download.zip('/workflow/model/export/zip/' + data.id, data.name + '-' + data.key); +const clickExportZip = () => { + proxy?.$download.zip('/workflow/model/export/zip/' + ids.value, "模型"); }; /** 查询流程分类下拉树结构 */ const getTreeselect = async () => { -- Gitee From ade0b3e29e6aa92ab5ce7ce1fef7c730ec954123 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Sat, 16 Mar 2024 22:02:45 +0800 Subject: [PATCH 072/134] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=AF=BC=E5=87=BA=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/model/index.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/views/workflow/model/index.vue b/src/views/workflow/model/index.vue index c8cfda07..26550c39 100644 --- a/src/views/workflow/model/index.vue +++ b/src/views/workflow/model/index.vue @@ -74,9 +74,9 @@ 设计流程 - + + 删除 + @@ -84,9 +84,6 @@ 流程部署 - - 删除 - -- Gitee From 00a7a8ce23c041e08b60a0ea7f81a951122326c4 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Sun, 17 Mar 2024 18:26:22 +0800 Subject: [PATCH 073/134] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=87=AA=E7=94=B1=E9=A9=B3=E5=9B=9E=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/task/index.ts | 11 ++++ src/components/Process/submitVerify.vue | 68 ++++++++++++++++++++++--- 2 files changed, 73 insertions(+), 6 deletions(-) diff --git a/src/api/workflow/task/index.ts b/src/api/workflow/task/index.ts index aabdd152..07b183d9 100644 --- a/src/api/workflow/task/index.ts +++ b/src/api/workflow/task/index.ts @@ -215,3 +215,14 @@ export const getInstanceVariable = (taskId: string) => { method: 'get' }); }; + +/** + * 获取可驳回得任务节点 + * @returns + */ +export const getTaskNodeList = (processInstanceId: string) => { + return request({ + url: `/workflow/task/getTaskNodeList/${processInstanceId}`, + method: 'get' + }); +}; diff --git a/src/components/Process/submitVerify.vue b/src/components/Process/submitVerify.vue index ead353bc..0d7e4138 100644 --- a/src/components/Process/submitVerify.vue +++ b/src/components/Process/submitVerify.vue @@ -28,7 +28,7 @@ 加签 减签 终止 - 退回 + 退回 取消 @@ -38,6 +38,39 @@ + + + + + + + + + + + + 站内信 + 邮件 + 短信 + + + + + + + + + @@ -45,7 +78,7 @@ import { ref } from 'vue'; import { ComponentInternalInstance } from 'vue'; import { ElForm } from 'element-plus'; -import { completeTask, backProcess, getTaskById,transferTask,terminationTask } from '@/api/workflow/task'; +import { completeTask, backProcess, getTaskById,transferTask,terminationTask,getTaskNodeList } from '@/api/workflow/task'; import UserSelect from '@/components/UserSelect'; import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -74,7 +107,11 @@ const selectCopyUserList = ref([]); const selectCopyUserIds = ref(undefined); //是否多选人员 const userMultiple = ref(false); - +// 驳回是否显示 +const backVisible = ref(false); +const backLoading = ref(true); +// 可驳回得任务节点 +const taskNodeList = ref([]); //任务 const task = ref({ id: undefined, @@ -116,6 +153,13 @@ const form = ref>({ messageType: ['1'], wfCopyList: [] }); +const backForm = ref>({ + taskId: undefined, + targetActivityId: undefined, + message: undefined, + variables: {}, + messageType: ['1'] +}); const closeDialog = () => { dialog.visible = false } @@ -165,14 +209,26 @@ const handleCompleteTask = async () => { proxy?.$modal.msgSuccess('操作成功'); }; +/** 驳回弹窗打开 */ +const handleBackProcessOpen = async () => { + backForm.value = {} + backForm.value.messageType = ['1'] + backVisible.value = true + backLoading.value = true + let data = await getTaskNodeList(task.value.processInstanceId) + taskNodeList.value = data.data + backLoading.value = false + backForm.value.targetActivityId = taskNodeList.value[0].nodeId +} /** 驳回流程 */ const handleBackProcess = async () => { - form.value.taskId = taskId.value; + backForm.value.taskId = taskId.value; await proxy?.$modal.confirm('是否确认驳回到申请人?'); loading.value = true; - buttonLoading.value = true; - await backProcess(form.value).finally(() => (loading.value = false)); + backLoading.value = true; + await backProcess(backForm.value).finally(() => (loading.value = false)); dialog.visible = false; + backLoading.value = false emits('submitCallback'); proxy?.$modal.msgSuccess('操作成功'); }; -- Gitee From 1c0e614d7da8f62ac52080a60b364f419c0d6795 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 10:44:21 +0800 Subject: [PATCH 074/134] =?UTF-8?q?update=20=E6=96=B0=E5=A2=9E=E6=B1=A0/?= =?UTF-8?q?=E5=8F=82=E4=B8=8E=E8=80=85=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BpmnDesign/assets/lang/zh.ts | 10 +++- .../BpmnDesign/assets/style/index.scss | 51 +++++++++++++++++++ .../BpmnDesign/panel/ParticipantPanel.vue | 40 +++++++++++++++ src/components/BpmnDesign/panel/index.vue | 2 + 4 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 src/components/BpmnDesign/panel/ParticipantPanel.vue diff --git a/src/components/BpmnDesign/assets/lang/zh.ts b/src/components/BpmnDesign/assets/lang/zh.ts index 61921a5d..44e2c866 100644 --- a/src/components/BpmnDesign/assets/lang/zh.ts +++ b/src/components/BpmnDesign/assets/lang/zh.ts @@ -16,7 +16,12 @@ export const NodeName = { 'bpmn:ParallelGateway': '并行网关', 'bpmn:InclusiveGateway': '相容网关', 'bpmn:ComplexGateway': '复杂网关', - 'bpmn:EventBasedGateway': '事件网关' + 'bpmn:EventBasedGateway': '事件网关', + 'bpmn:Participant': '池/参与者', + 'bpmn:SubProcess': '子流程', + 'bpmn:DataObjectReference': '数据对象引用', + 'bpmn:DataStoreReference': '数据存储引用', + 'bpmn:Group': '组' }; export default { @@ -114,5 +119,6 @@ export default { 'Append message intermediate catch event': '追加中间消息捕获事件', 'Append timer intermediate catch event': '追加中间定时捕获事件', 'Append conditional intermediate catch event': '追加中间条件捕获事件', - 'Append signal intermediate catch event': '追加中间信号捕获事件' + 'Append signal intermediate catch event': '追加中间信号捕获事件', + 'flow elements must be children of pools/participants': '流程元素必须是池/参与者的子元素' }; diff --git a/src/components/BpmnDesign/assets/style/index.scss b/src/components/BpmnDesign/assets/style/index.scss index d3ce3797..130b842a 100644 --- a/src/components/BpmnDesign/assets/style/index.scss +++ b/src/components/BpmnDesign/assets/style/index.scss @@ -227,4 +227,55 @@ opacity: 0.8; } } + .bpmn-icon-data-object { + &:hover { + &:after { + content: '创建数据对象'; + position: absolute; + left: 45px; + width: 120px; + font-size: 15px; + font-weight: bold; + color: #3a84de; + border-radius: 2px; + border: 1px solid #cccccc; + background-color: #fafafa; + opacity: 0.8; + } + } + } + .bpmn-icon-data-store { + &:hover { + &:after { + content: '创建数据存储'; + position: absolute; + left: 100px; + width: 120px; + font-size: 15px; + font-weight: bold; + color: #3a84de; + border-radius: 2px; + border: 1px solid #cccccc; + background-color: #fafafa; + opacity: 0.8; + } + } + } + .bpmn-icon-group { + &:hover { + &:after { + content: '创建分组'; + position: absolute; + left: 100px; + width: 100px; + font-size: 15px; + font-weight: bold; + color: #3a84de; + border-radius: 2px; + border: 1px solid #cccccc; + background-color: #fafafa; + opacity: 0.8; + } + } + } } diff --git a/src/components/BpmnDesign/panel/ParticipantPanel.vue b/src/components/BpmnDesign/panel/ParticipantPanel.vue new file mode 100644 index 00000000..7dd5474a --- /dev/null +++ b/src/components/BpmnDesign/panel/ParticipantPanel.vue @@ -0,0 +1,40 @@ + + + + diff --git a/src/components/BpmnDesign/panel/index.vue b/src/components/BpmnDesign/panel/index.vue index 6c2d1466..6ba7fee8 100644 --- a/src/components/BpmnDesign/panel/index.vue +++ b/src/components/BpmnDesign/panel/index.vue @@ -11,6 +11,7 @@ import ProcessPanel from './ProcessPanel.vue'; import StartEndPanel from './StartEndPanel.vue'; import GatewayPanel from './GatewayPanel.vue'; import SequenceFlowPanel from './SequenceFlowPanel.vue'; +import ParticipantPanel from './ParticipantPanel.vue'; import { Modeler, ModdleElement } from 'bpmn'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; interface propsType { @@ -45,6 +46,7 @@ const component = computed(() => { if (sequenceType.includes(type)) return SequenceFlowPanel; if (gatewayType.includes(type)) return GatewayPanel; if (processType.includes(type)) return ProcessPanel; + if (type === 'bpmn:Participant') return ParticipantPanel; //return proxy?.$modal.msgWarning('面板开发中....'); }); -- Gitee From a9cd5684b288013767a96754b3c3a8b6733089b9 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 10:56:12 +0800 Subject: [PATCH 075/134] =?UTF-8?q?update=20=E6=96=B0=E5=A2=9E=E9=A2=84?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=92=8C=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BpmnDesign/assets/lang/zh.ts | 2 ++ vite.config.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/components/BpmnDesign/assets/lang/zh.ts b/src/components/BpmnDesign/assets/lang/zh.ts index 44e2c866..ee0c5de3 100644 --- a/src/components/BpmnDesign/assets/lang/zh.ts +++ b/src/components/BpmnDesign/assets/lang/zh.ts @@ -62,6 +62,8 @@ export default { 'Event-based gateway': '事件网关', 'Exclusive gateway': '互斥网关', 'Empty pool/participant (removes content)': '清空池/参与者 (删除内容)', + 'Empty pool/participant': '清空池/参与者', + 'Expanded pool/participant': '展开池/参与者', 'Inclusive gateway': '相容网关', 'Intermediate throw event': '中间抛出事件', 'Loop': '循环', diff --git a/vite.config.ts b/vite.config.ts index e1e29511..060054a6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -76,6 +76,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { 'diagram-js/lib/draw/BaseRenderer', 'tiny-svg', + 'element-plus/es/components/text/style/css', 'element-plus/es/components/collapse-item/style/css', 'element-plus/es/components/collapse/style/css', 'element-plus/es/components/space/style/css', -- Gitee From 5dcfee4c071d22aba34b31923dc63c47cfb8d7cc Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 11:52:44 +0800 Subject: [PATCH 076/134] =?UTF-8?q?update=20=E6=B5=81=E7=A8=8B=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=94=AF=E6=8C=81=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/processDefinition/index.ts | 6 ++- .../workflow/processDefinition/index.vue | 46 ++++++++++++------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/api/workflow/processDefinition/index.ts b/src/api/workflow/processDefinition/index.ts index 23951e27..605012a3 100644 --- a/src/api/workflow/processDefinition/index.ts +++ b/src/api/workflow/processDefinition/index.ts @@ -93,7 +93,10 @@ export function deployProcessFile(data: any) { return request({ url: '/workflow/processDefinition/deployByFile', method: 'post', - data: data + data: data, + headers: { + repeatSubmit: false + } }); } @@ -109,4 +112,3 @@ export const migrationDefinition = (currentProcessDefinitionId: string, fromProc method: 'put' }); }; - diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index 6a04f8ac..df630dcb 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -138,11 +138,18 @@ style="width: 240px" />
- - -
点击上传,选择BPMN流程文件
-
仅支持 .zip、.bpmn20.xml、bpmn 格式文件
-
PS:如若部署请部署从本项目模型管理导出的数据
+ + +
点击上传,选择BPMN流程文件
+
仅支持 .zip、.bpmn20.xml、bpmn 格式文件
+
PS:如若部署请部署从本项目模型管理导出的数据
@@ -394,25 +401,32 @@ const handleConvertToModel = async (row: ProcessDefinitionVO) => { proxy?.$modal.msgSuccess('操作成功'); }; -//部署文件 -const handerDeployProcessFile = (data: UploadRequestOptions): XMLHttpRequest => { - let formData = new FormData(); +//上传文件前的钩子 +const handlerBeforeUpload = () => { if (selectCategory.value === 'ALL') { proxy?.$modal.msgError('顶级节点不可作为分类!'); - return; + return false; } if (!selectCategory.value) { proxy?.$modal.msgError('请选择左侧要上传的分类!'); - return; + return false; } +}; +//部署文件 +const handerDeployProcessFile = (data: UploadRequestOptions): XMLHttpRequest => { + let formData = new FormData(); uploadDialogLoading.value = true; formData.append('file', data.file); formData.append('categoryCode', selectCategory.value); - deployProcessFile(formData).then(() => { - uploadDialog.visible = false; - proxy?.$modal.msgSuccess('部署成功'); - uploadDialogLoading.value = false; - handleQuery(); - }); + deployProcessFile(formData) + .then(() => { + uploadDialog.visible = false; + proxy?.$modal.msgSuccess('部署成功'); + handleQuery(); + }) + .finally(() => { + uploadDialogLoading.value = false; + }); + return; }; -- Gitee From bc4358f4eb2af57a6bf3d6f03f01f71b962adfad Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 12:19:52 +0800 Subject: [PATCH 077/134] =?UTF-8?q?update=20=E6=B5=81=E7=A8=8B=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=94=AF=E6=8C=81=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/module/Palette/CustomPaletteProvider.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/components/BpmnDesign/assets/module/Palette/CustomPaletteProvider.ts b/src/components/BpmnDesign/assets/module/Palette/CustomPaletteProvider.ts index 38f1cea4..8556d9b9 100644 --- a/src/components/BpmnDesign/assets/module/Palette/CustomPaletteProvider.ts +++ b/src/components/BpmnDesign/assets/module/Palette/CustomPaletteProvider.ts @@ -22,17 +22,7 @@ class CustomPaletteProvider extends PaletteProvider { private readonly _translate: any; constructor(palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) { - super( - palette, - create, - elementFactory, - spaceTool, - lassoTool, - handTool, - globalConnect, - translate - // 2000 - ); + super(palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate); this._palette = palette; this._create = create; this._elementFactory = elementFactory; -- Gitee From b6415c21be85643f05fc01425f6cc37800d8a1f4 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 13:55:57 +0800 Subject: [PATCH 078/134] =?UTF-8?q?update=20=E6=96=B0=E5=A2=9E=E5=AD=90?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmnDesign/panel/SubProcessPanel.vue | 66 +++++++++++++++++++ src/components/BpmnDesign/panel/index.vue | 2 + 2 files changed, 68 insertions(+) create mode 100644 src/components/BpmnDesign/panel/SubProcessPanel.vue diff --git a/src/components/BpmnDesign/panel/SubProcessPanel.vue b/src/components/BpmnDesign/panel/SubProcessPanel.vue new file mode 100644 index 00000000..cf32fc6d --- /dev/null +++ b/src/components/BpmnDesign/panel/SubProcessPanel.vue @@ -0,0 +1,66 @@ + + + + diff --git a/src/components/BpmnDesign/panel/index.vue b/src/components/BpmnDesign/panel/index.vue index 6ba7fee8..c282723d 100644 --- a/src/components/BpmnDesign/panel/index.vue +++ b/src/components/BpmnDesign/panel/index.vue @@ -12,6 +12,7 @@ import StartEndPanel from './StartEndPanel.vue'; import GatewayPanel from './GatewayPanel.vue'; import SequenceFlowPanel from './SequenceFlowPanel.vue'; import ParticipantPanel from './ParticipantPanel.vue'; +import SubProcessPanel from './SubProcessPanel.vue'; import { Modeler, ModdleElement } from 'bpmn'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; interface propsType { @@ -47,6 +48,7 @@ const component = computed(() => { if (gatewayType.includes(type)) return GatewayPanel; if (processType.includes(type)) return ProcessPanel; if (type === 'bpmn:Participant') return ParticipantPanel; + if (type === 'bpmn:SubProcess') return SubProcessPanel; //return proxy?.$modal.msgWarning('面板开发中....'); }); -- Gitee From 12458177beca5e17d68d74935751bf7add47f31b Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 13:56:16 +0800 Subject: [PATCH 079/134] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E9=9D=A2=E6=9D=BF=E5=92=8C=E6=B3=B3=E9=81=93=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmnDesign/panel/ParticipantPanel.vue | 48 ++++++++++++++----- .../BpmnDesign/panel/StartEndPanel.vue | 48 ++++++++++++++----- 2 files changed, 74 insertions(+), 22 deletions(-) diff --git a/src/components/BpmnDesign/panel/ParticipantPanel.vue b/src/components/BpmnDesign/panel/ParticipantPanel.vue index 7dd5474a..cf32fc6d 100644 --- a/src/components/BpmnDesign/panel/ParticipantPanel.vue +++ b/src/components/BpmnDesign/panel/ParticipantPanel.vue @@ -1,15 +1,41 @@ -- Gitee From 0c39b593ce6c001500850cb9fd3ca8f1d32757d5 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 14:18:30 +0800 Subject: [PATCH 082/134] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmnDesign/panel/ParticipantPanel.vue | 9 +++++---- src/types/bpmn/panel.d.ts | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/BpmnDesign/panel/ParticipantPanel.vue b/src/components/BpmnDesign/panel/ParticipantPanel.vue index cf32fc6d..24cb9dc4 100644 --- a/src/components/BpmnDesign/panel/ParticipantPanel.vue +++ b/src/components/BpmnDesign/panel/ParticipantPanel.vue @@ -13,10 +13,10 @@
- + - +
@@ -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(), {}); const { nameChange, idChange } = usePanel({ element: toRaw(props.element) @@ -55,7 +56,7 @@ const { parseData } = useParseElement({ element: toRaw(props.element) }); -const formData = ref(parseData()); +const formData = ref(parseData()); const currentCollapseItem = ref(['1', '2']); const formRules = ref({ id: [{ required: true, message: '请输入', trigger: 'blur' }], diff --git a/src/types/bpmn/panel.d.ts b/src/types/bpmn/panel.d.ts index 0d0cac45..fc5fbe55 100644 --- a/src/types/bpmn/panel.d.ts +++ b/src/types/bpmn/panel.d.ts @@ -72,4 +72,20 @@ declare module 'bpmnDesign' { 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; + }; + }; + } } -- Gitee From 4253b2afbb0307a9a92e0a053b0e4757558252e1 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 18 Mar 2024 14:19:30 +0800 Subject: [PATCH 083/134] =?UTF-8?q?update=20=E5=A2=9E=E5=8A=A0=E5=AD=90?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=A4=9A=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BpmnDesign/panel/SubProcessPanel.vue | 190 +++++++++++++++--- 1 file changed, 158 insertions(+), 32 deletions(-) diff --git a/src/components/BpmnDesign/panel/SubProcessPanel.vue b/src/components/BpmnDesign/panel/SubProcessPanel.vue index cf32fc6d..03100726 100644 --- a/src/components/BpmnDesign/panel/SubProcessPanel.vue +++ b/src/components/BpmnDesign/panel/SubProcessPanel.vue @@ -1,62 +1,188 @@ diff --git a/src/views/workflow/model/index.vue b/src/views/workflow/model/index.vue index 26550c39..c738e782 100644 --- a/src/views/workflow/model/index.vue +++ b/src/views/workflow/model/index.vue @@ -57,18 +57,18 @@ - + - + - - - + + + - + - - - - + + + + @@ -71,14 +71,14 @@ {{ scope.row.diagramResourceName }} - + - + @@ -158,8 +166,8 @@ - - + + @@ -208,6 +216,29 @@ + + + + + + + + + + + + + + + + @@ -224,8 +255,10 @@ import { } from '@/api/workflow/processDefinition'; import ProcessPreview from './components/processPreview.vue'; import { listCategory } from '@/api/workflow/category'; +import { getByDefId,saveOrUpdate } from '@/api/workflow/formDefinition'; import { CategoryVO } from '@/api/workflow/category/types'; import { ProcessDefinitionQuery, ProcessDefinitionVO } from '@/api/workflow/processDefinition/types'; +import { FormDefinitionForm } from '@/api/workflow/formDefinition/types'; import { UploadRequestOptions } from 'element-plus'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -254,6 +287,7 @@ const categoryOptions = ref([]); const categoryName = ref(''); /** 部署文件分类选择 */ const selectCategory = ref(); +const formDefinitionForm = ref({}); const uploadDialog = reactive({ visible: false, @@ -265,6 +299,11 @@ const processDefinitionDialog = reactive({ title: '历史版本' }); +const formDialog = reactive({ + visible: false, + title: '表单配置' +}); + // 查询参数 const queryParams = ref({ pageNum: 1, @@ -429,4 +468,28 @@ const handerDeployProcessFile = (data: UploadRequestOptions): XMLHttpRequest => }); return; }; +//打开表单配置 +const handleFormOpen = async (row: ProcessDefinitionVO) => { + formDialog.visible = true + formDefinitionForm.value.processKey = row.key + formDefinitionForm.value.definitionId = row.id + const resp = await getByDefId(row.id) + if(resp.data){ + formDefinitionForm.value = resp.data + }else{ + formDefinitionForm.value.path = undefined + formDefinitionForm.value.remark = undefined + } +} +//保存表单 +const handlerSaveForm = async () => { + await proxy?.$modal.confirm('是否确认保存?'); + saveOrUpdate(formDefinitionForm.value).then(resp=>{ + if(resp.code === 200){ + proxy?.$modal.msgSuccess('操作成功'); + formDialog.visible = false + getList(); + } + }) +} diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue index eafc609b..19e57f78 100644 --- a/src/views/workflow/processInstance/index.vue +++ b/src/views/workflow/processInstance/index.vue @@ -56,12 +56,11 @@ - + - - - - + + + @@ -127,7 +126,7 @@ - + diff --git a/src/views/workflow/task/allTaskWaiting.vue b/src/views/workflow/task/allTaskWaiting.vue index dfaf7c9d..8d5836f7 100644 --- a/src/views/workflow/task/allTaskWaiting.vue +++ b/src/views/workflow/task/allTaskWaiting.vue @@ -39,9 +39,9 @@ - + - + diff --git a/src/views/workflow/task/myDocument.vue b/src/views/workflow/task/myDocument.vue index 4597a2a7..1e71f1fd 100644 --- a/src/views/workflow/task/myDocument.vue +++ b/src/views/workflow/task/myDocument.vue @@ -42,9 +42,9 @@ - + - + diff --git a/src/views/workflow/task/taskCopyList.vue b/src/views/workflow/task/taskCopyList.vue index 112c95bb..5d22b0b6 100644 --- a/src/views/workflow/task/taskCopyList.vue +++ b/src/views/workflow/task/taskCopyList.vue @@ -28,9 +28,9 @@ - + - + diff --git a/src/views/workflow/task/taskFinish.vue b/src/views/workflow/task/taskFinish.vue index fd9ce6ec..8bc870fb 100644 --- a/src/views/workflow/task/taskFinish.vue +++ b/src/views/workflow/task/taskFinish.vue @@ -28,9 +28,9 @@ - + - + diff --git a/src/views/workflow/task/taskWaiting.vue b/src/views/workflow/task/taskWaiting.vue index a6443bda..8ef3c039 100644 --- a/src/views/workflow/task/taskWaiting.vue +++ b/src/views/workflow/task/taskWaiting.vue @@ -28,9 +28,9 @@ - + - + @@ -54,22 +54,14 @@ - + @@ -81,22 +73,13 @@ @pagination="handleQuery" /> - - - - -- Gitee From 66a31b620bab3defbdb336bceb1f3e37a902ac90 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Thu, 21 Mar 2024 21:20:42 +0800 Subject: [PATCH 094/134] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E5=B7=B2?= =?UTF-8?q?=E5=8A=9E=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/task/taskFinish.vue | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/views/workflow/task/taskFinish.vue b/src/views/workflow/task/taskFinish.vue index 8bc870fb..6869dfd7 100644 --- a/src/views/workflow/task/taskFinish.vue +++ b/src/views/workflow/task/taskFinish.vue @@ -42,9 +42,9 @@ - + @@ -56,17 +56,13 @@ @pagination="handleQuery" /> - - -- Gitee From ad8565d29aae8b8333b8615e7db76643df234cde Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Thu, 21 Mar 2024 21:49:34 +0800 Subject: [PATCH 095/134] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E6=88=91?= =?UTF-8?q?=E7=9A=84=E5=8F=91=E8=B5=B7=EF=BC=8C=E6=B5=81=E7=A8=8B=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/leave/leaveEdit.vue | 2 +- .../workflow/processDefinition/index.vue | 3 + src/views/workflow/task/myDocument.vue | 72 ++++++++++--------- 3 files changed, 43 insertions(+), 34 deletions(-) diff --git a/src/views/workflow/leave/leaveEdit.vue b/src/views/workflow/leave/leaveEdit.vue index 61909ea8..6569e933 100644 --- a/src/views/workflow/leave/leaveEdit.vue +++ b/src/views/workflow/leave/leaveEdit.vue @@ -5,7 +5,7 @@
暂存 提 交 diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index a99478f4..6dfee4f1 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -211,6 +211,9 @@ 转换模型 + + 表单配置 + diff --git a/src/views/workflow/task/myDocument.vue b/src/views/workflow/task/myDocument.vue index 1e71f1fd..4a4300be 100644 --- a/src/views/workflow/task/myDocument.vue +++ b/src/views/workflow/task/myDocument.vue @@ -64,28 +64,36 @@ - + @@ -99,8 +107,6 @@ - -
@@ -108,15 +114,9 @@ -- Gitee From 31f4219f3d7fc041ba6ec2d11084e7e0f61ffdb8 Mon Sep 17 00:00:00 2001 From: songgaoshuai <1742057357@qq.com> Date: Fri, 22 Mar 2024 11:32:58 +0800 Subject: [PATCH 096/134] =?UTF-8?q?fix=E4=BF=AE=E5=A4=8D=E5=B7=B2=E5=8A=9E?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=A0=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/task/taskFinish.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/workflow/task/taskFinish.vue b/src/views/workflow/task/taskFinish.vue index 6869dfd7..67fd3c09 100644 --- a/src/views/workflow/task/taskFinish.vue +++ b/src/views/workflow/task/taskFinish.vue @@ -44,7 +44,7 @@ @@ -115,7 +115,7 @@ const getFinishList = () => { /** 查看按钮操作 */ const handleView = (row) => { proxy.$tab.closePage(proxy.$route); - proxy.$router.push(`/demo/leaveEdit/index/${row.id}/view`); + proxy.$router.push(`/demo/leaveEdit/index/${row.businessKey}/view`); }; onMounted(() => { -- Gitee From d186c800f041e1f9c7e9ca8356544ce41f9673e2 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Fri, 22 Mar 2024 23:42:30 +0800 Subject: [PATCH 097/134] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=9E=E4=BE=8B=EF=BC=8C=E5=85=A8=E9=83=A8=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E8=A1=A8=E5=8D=95=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/processInstance/index.vue | 68 ++++++++++---------- src/views/workflow/task/allTaskWaiting.vue | 45 +++++++------ src/views/workflow/task/taskCopyList.vue | 10 ++- src/views/workflow/task/taskFinish.vue | 10 ++- 4 files changed, 76 insertions(+), 57 deletions(-) diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue index 19e57f78..8a4ba4a6 100644 --- a/src/views/workflow/processInstance/index.vue +++ b/src/views/workflow/processInstance/index.vue @@ -77,17 +77,21 @@ - + @@ -146,8 +146,6 @@ - -
@@ -160,12 +158,10 @@ import { deleteRunInstance } from '@/api/workflow/processInstance'; import { getListByKey, migrationDefinition } from '@/api/workflow/processDefinition'; -import ApprovalRecord from '@/components/Process/approvalRecord.vue'; import { listCategory } from '@/api/workflow/category'; import { CategoryVO } from '@/api/workflow/category/types'; import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types'; //审批记录组件 -const approvalRecordRef = ref>(); const { proxy } = getCurrentInstance() as ComponentInternalInstance; const queryFormRef = ref(); const categoryTreeRef = ref(); @@ -213,11 +209,6 @@ const queryParams = ref({ categoryCode: undefined }); -onMounted(() => { - getProcessInstanceRunningList(); - getTreeselect(); -}); - /** 节点单击事件 */ const handleNodeClick = (data: CategoryVO) => { queryParams.value.categoryCode = data.categoryCode; @@ -250,12 +241,6 @@ const getTreeselect = async () => { categoryOptions.value.push(data); }; -//审批记录 -const handleApprovalRecord = (row: any) => { - if (approvalRecordRef.value) { - approvalRecordRef.value.init(row.id); - } -}; /** 搜索按钮操作 */ const handleQuery = () => { if ('running' === tab.value) { @@ -312,6 +297,7 @@ const handleDelete = async (row: any) => { proxy?.$modal.msgSuccess('删除成功'); }; const changeTab = async (data: string) => { + processInstanceList.value = [] queryParams.value.pageNum = 1; if ('running' === data) { getProcessInstanceRunningList(); @@ -359,4 +345,20 @@ const handleChange = async (id: string) => { loading.value = false; }); }; +/** 查看按钮操作 */ +const handleView = (row) => { + if(row.wfFormDefinitionVo){ + proxy.$tab.closePage(proxy.$route); + proxy.$router.push({ + path: `${row.wfFormDefinitionVo.path}/${row.businessKey}/view` + }) + }else{ + proxy?.$modal.msgError('请到流程定义菜单配置路由!'); + } +}; + +onMounted(() => { + getProcessInstanceRunningList(); + getTreeselect(); +}); diff --git a/src/views/workflow/task/allTaskWaiting.vue b/src/views/workflow/task/allTaskWaiting.vue index 8d5836f7..009c7973 100644 --- a/src/views/workflow/task/allTaskWaiting.vue +++ b/src/views/workflow/task/allTaskWaiting.vue @@ -72,20 +72,22 @@
- + @@ -99,8 +101,6 @@ @pagination="handleQuery" /> - - @@ -126,12 +126,10 @@ diff --git a/src/views/workflow/task/taskCopyList.vue b/src/views/workflow/task/taskCopyList.vue index db7e22f8..0902294b 100644 --- a/src/views/workflow/task/taskCopyList.vue +++ b/src/views/workflow/task/taskCopyList.vue @@ -127,8 +127,14 @@ const getTaskCopyList = () => { /** 查看按钮操作 */ const handleView = (row) => { - proxy.$tab.closePage(proxy.$route); - proxy.$router.push(`/demo/leaveEdit/index/${row.id}/view`); + if(row.wfFormDefinitionVo){ + proxy.$tab.closePage(proxy.$route); + proxy.$router.push({ + path: `${row.wfFormDefinitionVo.path}/${row.businessKey}/view` + }) + }else{ + proxy?.$modal.msgError('请到流程定义菜单配置路由!'); + } }; diff --git a/src/views/workflow/task/taskFinish.vue b/src/views/workflow/task/taskFinish.vue index 67fd3c09..8be09d1f 100644 --- a/src/views/workflow/task/taskFinish.vue +++ b/src/views/workflow/task/taskFinish.vue @@ -114,8 +114,14 @@ const getFinishList = () => { }; /** 查看按钮操作 */ const handleView = (row) => { - proxy.$tab.closePage(proxy.$route); - proxy.$router.push(`/demo/leaveEdit/index/${row.businessKey}/view`); + if(row.wfFormDefinitionVo){ + proxy.$tab.closePage(proxy.$route); + proxy.$router.push({ + path: `${row.wfFormDefinitionVo.path}/${row.businessKey}/view` + }) + }else{ + proxy?.$modal.msgError('请到流程定义菜单配置路由!'); + } }; onMounted(() => { -- Gitee From cd129aa949dff285cda41080523eb89b1f7b68be Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Sun, 24 Mar 2024 15:13:05 +0800 Subject: [PATCH 098/134] =?UTF-8?q?update=20=E8=B7=AF=E7=94=B1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 2 +- src/views/workflow/leave/index.vue | 22 ++++++++++- src/views/workflow/leave/leaveEdit.vue | 41 ++++++++++---------- src/views/workflow/processInstance/index.vue | 6 ++- src/views/workflow/task/allTaskWaiting.vue | 6 ++- src/views/workflow/task/myDocument.vue | 6 ++- src/views/workflow/task/taskCopyList.vue | 6 ++- src/views/workflow/task/taskFinish.vue | 6 ++- src/views/workflow/task/taskWaiting.vue | 4 +- 9 files changed, 69 insertions(+), 30 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index e028834c..45bb1e6d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -170,7 +170,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ permissions: ['demo:leave:edit'], children: [ { - path: 'index/:id/:type', + path: 'index', component: () => import('@/views/workflow/leave/leaveEdit.vue'), name: 'leaveEdit', meta: { title: '请假申请', activeMenu: '/demo/leave',noCache:true }, diff --git a/src/views/workflow/leave/index.vue b/src/views/workflow/leave/index.vue index c7baae2c..4f7c8e11 100644 --- a/src/views/workflow/leave/index.vue +++ b/src/views/workflow/leave/index.vue @@ -175,18 +175,36 @@ const handleSelectionChange = (selection: LeaveVO[]) => { const handleAdd = () => { proxy.$tab.closePage(proxy.$route); proxy.$router.push(`/demo/leaveEdit/index/add/add`); + proxy.$router.push({ + path: `/demo/leaveEdit/index`, + query: { + type: 'add' + } + }) }; /** 修改按钮操作 */ const handleUpdate = (row?: LeaveVO) => { proxy.$tab.closePage(proxy.$route); - proxy.$router.push(`/demo/leaveEdit/index/${row.id}/update`);; + proxy.$router.push({ + path: `/demo/leaveEdit/index`, + query: { + id: row.id, + type: 'update' + } + }) }; /** 查看按钮操作 */ const handleView = (row?: LeaveVO) => { proxy.$tab.closePage(proxy.$route); - proxy.$router.push(`/demo/leaveEdit/index/${row.id}/view`); + proxy.$router.push({ + path: `/demo/leaveEdit/index`, + query: { + id: row.id, + type: 'view' + } + }) }; /** 删除按钮操作 */ diff --git a/src/views/workflow/leave/leaveEdit.vue b/src/views/workflow/leave/leaveEdit.vue index 6569e933..58934a49 100644 --- a/src/views/workflow/leave/leaveEdit.vue +++ b/src/views/workflow/leave/leaveEdit.vue @@ -1,25 +1,23 @@ @@ -129,6 +129,8 @@ import { getPageByAllTaskWait, getPageByAllTaskFinish, updateAssignee, getInstan import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue'; import UserSelect from '@/components/UserSelect'; import { TaskQuery, TaskVO, VariableVo } from '@/api/workflow/task/types'; +import workflowCommon from '@/api/workflow/workflowCommon'; +import { RouterJumpVo } from '@/api/workflow/workflowCommon/types'; //审批记录组件 //加签组件 const multiInstanceUserRef = ref>(); @@ -260,18 +262,14 @@ const handleInstanceVariable = async (row: TaskVO) => { }; /** 查看按钮操作 */ const handleView = (row) => { - if(row.wfFormDefinitionVo){ - proxy.$tab.closePage(proxy.$route); - proxy.$router.push({ - path: `${row.wfFormDefinitionVo.path}`, - query: { - id: row.businessKey, - type: 'view' - } - }) - }else{ - proxy?.$modal.msgError('请到流程定义菜单配置路由!'); - } + const routerJumpVo = reactive({ + wfDefinitionConfigVo: row.wfDefinitionConfigVo, + wfNodeConfigVo: row.wfNodeConfigVo, + businessKey: row.businessKey, + taskId: row.id, + type: 'view' + }); + workflowCommon.routerJump(routerJumpVo,proxy) }; onMounted(() => { getWaitingList(); diff --git a/src/views/workflow/task/myDocument.vue b/src/views/workflow/task/myDocument.vue index 9328934b..8ccb3a5e 100644 --- a/src/views/workflow/task/myDocument.vue +++ b/src/views/workflow/task/myDocument.vue @@ -117,6 +117,8 @@ import { getPageByCurrent, deleteRunAndHisInstance, cancelProcessApply } from '@ import { listCategory } from '@/api/workflow/category'; import { CategoryVO } from '@/api/workflow/category/types'; import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types'; +import workflowCommon from '@/api/workflow/workflowCommon'; +import { RouterJumpVo } from '@/api/workflow/workflowCommon/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const queryFormRef = ref(); const categoryTreeRef = ref(); @@ -250,17 +252,13 @@ const handleCancelProcessApply = async (processInstanceId: string) => { //办理 const handleOpen = async (row,type) => { - if(row.wfFormDefinitionVo){ - proxy.$tab.closePage(proxy.$route); - proxy.$router.push({ - path: `${row.wfFormDefinitionVo.path}`, - query: { - id: row.businessKey, - type: type - } - }) - }else{ - proxy?.$modal.msgError('请到流程定义菜单配置路由!'); - } + const routerJumpVo = reactive({ + wfDefinitionConfigVo: row.wfDefinitionConfigVo, + wfNodeConfigVo: row.wfNodeConfigVo, + businessKey: row.businessKey, + taskId: row.id, + type: type + }); + workflowCommon.routerJump(routerJumpVo,proxy) }; diff --git a/src/views/workflow/task/taskCopyList.vue b/src/views/workflow/task/taskCopyList.vue index 54e8f1e4..73939997 100644 --- a/src/views/workflow/task/taskCopyList.vue +++ b/src/views/workflow/task/taskCopyList.vue @@ -43,7 +43,7 @@ @@ -73,6 +73,8 @@ diff --git a/src/components/BpmnDesign/panel/GatewayPanel.vue b/src/bpmn/panel/GatewayPanel.vue similarity index 89% rename from src/components/BpmnDesign/panel/GatewayPanel.vue rename to src/bpmn/panel/GatewayPanel.vue index 46c67b58..5931539e 100644 --- a/src/components/BpmnDesign/panel/GatewayPanel.vue +++ b/src/bpmn/panel/GatewayPanel.vue @@ -39,11 +39,11 @@ - diff --git a/src/views/workflow/model/design.vue b/src/views/workflow/model/design.vue deleted file mode 100644 index 78b104f0..00000000 --- a/src/views/workflow/model/design.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/src/views/workflow/model/index.vue b/src/views/workflow/model/index.vue index c8c92715..4c70c30e 100644 --- a/src/views/workflow/model/index.vue +++ b/src/views/workflow/model/index.vue @@ -138,7 +138,7 @@