From 9ed3ae3fab3863ff15bcdae9adab94a8371991cb 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: Sun, 27 Oct 2024 23:29:36 +0800 Subject: [PATCH 01/73] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=86=85?= =?UTF-8?q?=E5=B5=8C=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E4=B8=8E=E5=A4=96=E9=83=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 86e0092..6c12791 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -103,7 +103,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ path: 'role/:userId(\\d+)', component: () => import('@/views/system/user/authRole.vue'), name: 'AuthRole', - meta: { title: '分配角色', activeMenu: '/system/user', icon: '' } + meta: { title: '分配角色', activeMenu: '/system/user', icon: '', noCache: true } } ] }, @@ -117,7 +117,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ path: 'user/:roleId(\\d+)', component: () => import('@/views/system/role/authUser.vue'), name: 'AuthUser', - meta: { title: '分配用户', activeMenu: '/system/role', icon: '' } + meta: { title: '分配用户', activeMenu: '/system/role', icon: '', noCache: true } } ] }, @@ -131,7 +131,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ path: 'index/:dictId(\\d+)', component: () => import('@/views/system/dict/data.vue'), name: 'Data', - meta: { title: '字典数据', activeMenu: '/system/dict', icon: '' } + meta: { title: '字典数据', activeMenu: '/system/dict', icon: '', noCache: true } } ] }, @@ -145,7 +145,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ path: 'index', component: () => import('@/views/system/oss/config.vue'), name: 'OssConfig', - meta: { title: '配置管理', activeMenu: '/system/oss', icon: '' } + meta: { title: '配置管理', activeMenu: '/system/oss', icon: '', noCache: true } } ] }, From fdfb556c8e1eb40c61e8867297109b7afea5de71 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: Tue, 5 Nov 2024 14:29:13 +0800 Subject: [PATCH 02/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20getTenantLi?= =?UTF-8?q?st=20=E6=8E=A5=E5=8F=A3=E5=8A=A8=E6=80=81=E5=86=B3=E5=AE=9A?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E4=BC=A0token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 4 ++-- src/layout/components/Navbar.vue | 2 +- src/views/login.vue | 2 +- src/views/register.vue | 2 +- src/views/system/user/index.vue | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index c7c291e..38b61a0 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -100,11 +100,11 @@ export function getInfo(): AxiosPromise { } // 获取租户列表 -export function getTenantList(): AxiosPromise { +export function getTenantList(isToken: boolean): AxiosPromise { return request({ url: '/auth/tenant/list', headers: { - isToken: false + isToken: isToken }, method: 'get' }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c2ed0b6..617c5da 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -142,7 +142,7 @@ const dynamicClearEvent = async () => { /** 租户列表 */ const initTenantList = async () => { - const { data } = await getTenantList(); + const { data } = await getTenantList(true); tenantEnabled.value = data.tenantEnabled === undefined ? true : data.tenantEnabled; if (tenantEnabled.value) { tenantList.value = data.voList; diff --git a/src/views/login.vue b/src/views/login.vue index db1fca6..71d5dcd 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -176,7 +176,7 @@ const getLoginData = () => { * 获取租户列表 */ const initTenantList = async () => { - const { data } = await getTenantList(); + const { data } = await getTenantList(false); tenantEnabled.value = data.tenantEnabled === undefined ? true : data.tenantEnabled; if (tenantEnabled.value) { tenantList.value = data.voList; diff --git a/src/views/register.vue b/src/views/register.vue index c3d1930..4e67a67 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -140,7 +140,7 @@ const getCode = async () => { }; const initTenantList = async () => { - const { data } = await getTenantList(); + const { data } = await getTenantList(false); tenantEnabled.value = data.tenantEnabled === undefined ? true : data.tenantEnabled; if (tenantEnabled.value) { tenantList.value = data.voList; diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 46bffd2..c53d41b 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -81,7 +81,7 @@ From b19c2805e100c0a7bbb5abb6b30f6f97f13fd98b 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: Tue, 5 Nov 2024 16:47:51 +0800 Subject: [PATCH 03/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=A0=A1?= =?UTF-8?q?=E6=A3=80=E6=96=87=E4=BB=B6=E5=90=8D=E6=98=AF=E5=90=A6=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileUpload/index.vue | 5 +++++ src/components/ImageUpload/index.vue | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index aaaa45c..b22d09a 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -121,6 +121,11 @@ const handleBeforeUpload = (file: any) => { return false; } } + // 校检文件名是否包含特殊字符 + if (file.name.includes(',')) { + proxy?.$modal.msgError('文件名不正确,不能包含英文逗号!'); + return false; + } // 校检文件大小 if (props.fileSize) { const isLt = file.size / 1024 / 1024 < props.fileSize; diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 1c6dcd1..0778121 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -139,6 +139,10 @@ const handleBeforeUpload = (file: any) => { proxy?.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join('/')}图片格式文件!`); return false; } + if (file.name.includes(',')) { + proxy?.$modal.msgError('文件名不正确,不能包含英文逗号!'); + return false; + } if (props.fileSize) { const isLt = file.size / 1024 / 1024 < props.fileSize; if (!isLt) { From 4310e5e049ceff181d7728d8223d14b356ebea61 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: Fri, 8 Nov 2024 00:33:23 +0800 Subject: [PATCH 04/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/sse.ts | 2 +- src/utils/websocket.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/sse.ts b/src/utils/sse.ts index 9174f0d..5234648 100644 --- a/src/utils/sse.ts +++ b/src/utils/sse.ts @@ -8,7 +8,7 @@ export const initSSE = (url: any) => { return; } - url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID + url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID; const { data, error diff --git a/src/utils/websocket.ts b/src/utils/websocket.ts index ade13ef..c9b394c 100644 --- a/src/utils/websocket.ts +++ b/src/utils/websocket.ts @@ -7,7 +7,7 @@ export const initWebSocket = (url: any) => { if (import.meta.env.VITE_APP_WEBSOCKET === 'false') { return; } - url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID + url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID; useWebSocket(url, { autoReconnect: { // 重连最大次数 @@ -16,14 +16,14 @@ export const initWebSocket = (url: any) => { delay: 1000, onFailed() { console.log('websocket重连失败'); - }, + } }, heartbeat: { - message: JSON.stringify({type: 'ping'}), + message: JSON.stringify({ type: 'ping' }), // 发送心跳的间隔 interval: 10000, // 接收到心跳response的超时时间 - pongTimeout: 2000, + pongTimeout: 2000 }, onConnected() { console.log('websocket已经连接'); From 9836d6d9bde266c1e79333d505e1f218567e7ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=A4=9C?= <768242801@qq.com> Date: Mon, 11 Nov 2024 15:10:24 +0800 Subject: [PATCH 05/73] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E7=BC=93=E5=AD=98=E4=BD=BF=E7=94=A8Map=E4=BB=A3?= =?UTF-8?q?=E6=9B=BFArray=EF=BC=8C=E6=9B=B4=E9=AB=98=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/dict.ts | 55 +++++++++++++++------------------------ 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 2f937b9..cd1a41d 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,29 +1,15 @@ export const useDictStore = defineStore('dict', () => { - const dict = ref< - Array<{ - key: string; - value: DictDataOption[]; - }> - >([]); + const dict = ref>(new Map()); /** * 获取字典 * @param _key 字典key */ const getDict = (_key: string): DictDataOption[] | null => { - if (_key == null && _key == '') { + if (!_key) { return null; } - try { - for (let i = 0; i < dict.value.length; i++) { - if (dict.value[i].key == _key) { - return dict.value[i].value; - } - } - } catch (e) { - return null; - } - return null; + return dict.value.get(_key) || null; }; /** @@ -32,11 +18,15 @@ export const useDictStore = defineStore('dict', () => { * @param _value 字典value */ const setDict = (_key: string, _value: DictDataOption[]) => { - if (_key !== null && _key !== '') { - dict.value.push({ - key: _key, - value: _value - }); + if (!_key) { + return false; + } + try { + dict.value.set(_key, _value); + return true; + } catch (e) { + console.error('Error in setDict:', e); + return false; } }; @@ -45,25 +35,22 @@ export const useDictStore = defineStore('dict', () => { * @param _key */ const removeDict = (_key: string): boolean => { - let bln = false; - try { - for (let i = 0; i < dict.value.length; i++) { - if (dict.value[i].key == _key) { - dict.value.splice(i, 1); - return true; - } - } - } catch (e) { - bln = false; + if (!_key) { + return false; + } + try { + return dict.value.delete(_key); + } catch (e) { + console.error('Error in removeDict:', e); + return false; } - return bln; }; /** * 清空字典 */ const cleanDict = (): void => { - dict.value = []; + dict.value.clear(); }; return { From 72ac227ecf97aa0921e9deafb8f6f5b1493e1548 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Thu, 14 Nov 2024 16:20:34 +0800 Subject: [PATCH 06/73] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97=E8=AF=A6=E6=83=85=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 +- src/views/monitor/operlog/index.vue | 57 +-------- .../monitor/operlog/oper-info-dialog.vue | 111 ++++++++++++++++++ 3 files changed, 120 insertions(+), 53 deletions(-) create mode 100644 src/views/monitor/operlog/oper-info-dialog.vue diff --git a/package.json b/package.json index e67d60f..40478ad 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "vue": "3.4.34", "vue-cropper": "1.1.1", "vue-i18n": "9.10.2", + "vue-json-pretty": "^2.4.0", "vue-router": "4.3.2", "vue-types": "5.1.1", "vxe-table": "4.5.22" @@ -66,10 +67,10 @@ "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-define-config": "2.1.0", + "eslint-plugin-import": "2.29.1", + "eslint-plugin-node": "11.1.0", "eslint-plugin-prettier": "5.1.3", "eslint-plugin-promise": "6.1.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-import": "2.29.1", "eslint-plugin-vue": "9.23.0", "fast-glob": "3.3.2", "postcss": "8.4.36", diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue index ed0d755..fcecab7 100644 --- a/src/views/monitor/operlog/index.vue +++ b/src/views/monitor/operlog/index.vue @@ -123,56 +123,14 @@ - - - - - {{ form.operName }} / {{ form.deptName }} / {{ form.operIp }} / {{ form.operLocation }} - - - {{ form.requestMethod }} {{ form.operUrl }} - - - {{ form.title }} / {{ typeFormat(form) }} - - - {{ form.method }} - - - {{ form.operParam }} - - - {{ form.jsonResult }} - - - -
正常
-
失败
-
-
- - {{ form.costTime }}毫秒 - - - {{ parseTime(form.operTime) }} - - - {{ form.errorMsg }} - -
-
- -
+ + + From cdbbca43c4466d36e9cef08b81cb0fe689c6da25 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Thu, 14 Nov 2024 16:23:16 +0800 Subject: [PATCH 07/73] =?UTF-8?q?chore:=20=E9=94=81=E5=AE=9Avue-json-prett?= =?UTF-8?q?y=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 40478ad..9eaf743 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "vue": "3.4.34", "vue-cropper": "1.1.1", "vue-i18n": "9.10.2", - "vue-json-pretty": "^2.4.0", + "vue-json-pretty": "2.4.0", "vue-router": "4.3.2", "vue-types": "5.1.1", "vxe-table": "4.5.22" From 5f582c09bab4565eea1d07bf63ab038d5f685fbc 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: Fri, 15 Nov 2024 09:56:27 +0800 Subject: [PATCH 08/73] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=85=B3?= =?UTF-8?q?=E9=97=ADsse=E5=8A=9F=E8=83=BD=20=E7=99=BB=E5=87=BA=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E4=BC=9A=E5=8F=91=E9=80=81sse=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index 38b61a0..35e6a4e 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -51,10 +51,12 @@ export function register(data: any) { * 注销 */ export function logout() { - request({ - url: '/resource/sse/close', - method: 'get' - }); + if (import.meta.env.VITE_APP_SSE === 'true') { + request({ + url: '/resource/sse/close', + method: 'get' + }); + } return request({ url: '/auth/logout', method: 'post' From ec0e6a167eaff834fdb54c3d042b93766d8d9cdb 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: Fri, 15 Nov 2024 16:28:00 +0800 Subject: [PATCH 09/73] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 010adb9..531f64b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ - 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [TS](https://www.typescriptlang.org/) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。 - 成员项目: 基于 vben(ant-design-vue) 的前端项目 [ruoyi-plus-vben](https://gitee.com/dapppp/ruoyi-plus-vben) +- 成员项目: 基于 vben5(ant-design-vue) 的前端项目 [ruoyi-plus-vben5](https://gitee.com/dapppp/ruoyi-plus-vben5) - 配套后端代码仓库地址 - [RuoYi-Vue-Plus 5.X(注意版本号)](https://gitee.com/dromara/RuoYi-Vue-Plus) - [RuoYi-Cloud-Plus 2.X(注意版本号)](https://gitee.com/dromara/RuoYi-Cloud-Plus) From 22e8a57b31acfcc8aa84b96b797a055a0445af41 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, 18 Nov 2024 23:47:14 +0800 Subject: [PATCH 10/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=B0=86?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=AD=97=E5=85=B8=E5=8A=9F=E8=83=BD=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E5=88=B0=E7=A7=9F=E6=88=B7=E7=AE=A1=E7=90=86=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/dict/index.vue | 14 +------------- src/views/system/tenant/index.vue | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 4ad70d0..9eead48 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -49,9 +49,6 @@ 刷新缓存 - - 同步租户字典 - @@ -112,15 +109,11 @@ From b61865f45fe8ec9f22edc18e2ae51052562a671b 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: Fri, 29 Nov 2024 18:30:19 +0800 Subject: [PATCH 39/73] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=20id=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=8D=E7=BB=9F=E4=B8=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UserSelect/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UserSelect/index.vue b/src/components/UserSelect/index.vue index e9865e5..4b93bb3 100644 --- a/src/components/UserSelect/index.vue +++ b/src/components/UserSelect/index.vue @@ -166,7 +166,7 @@ const confirm = () => { const computedIds = (data) => { if (data instanceof Array) { - return [...data]; + return data.map(item => String(item)); } else if (typeof data === 'string') { return data.split(','); } else if (typeof data === 'number') { From 00f7ab34efc17bf383eecf7bf81844b874ac1a8d 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: Tue, 3 Dec 2024 11:15:09 +0800 Subject: [PATCH 40/73] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=ADTags-Views?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=86=85=E9=93=BE=E9=A1=B5=E9=9D=A2=E6=89=93?= =?UTF-8?q?=E4=B8=8D=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/AppMain.vue | 15 +++++++++++++++ src/layout/components/TagsView/index.vue | 4 ---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 7f86ef4..9f8d706 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -20,6 +20,7 @@ import useTagsViewStore from '@/store/modules/tagsView'; import IframeToggle from './IframeToggle/index.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const route = useRoute(); const tagsViewStore = useTagsViewStore(); // 随机动画集合 @@ -37,6 +38,20 @@ watch( }, { immediate: true } ); + +onMounted(() => { + addIframe() +}) + +watch((route) => { + addIframe() +}) + +function addIframe() { + if (route.meta.link) { + useTagsViewStore().addIframeView(route) + } +} diff --git a/src/bpmn/panel/GatewayPanel.vue b/src/bpmn/panel/GatewayPanel.vue deleted file mode 100644 index 20cc134..0000000 --- a/src/bpmn/panel/GatewayPanel.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - diff --git a/src/bpmn/panel/ParticipantPanel.vue b/src/bpmn/panel/ParticipantPanel.vue deleted file mode 100644 index b1d42e6..0000000 --- a/src/bpmn/panel/ParticipantPanel.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - diff --git a/src/bpmn/panel/ProcessPanel.vue b/src/bpmn/panel/ProcessPanel.vue deleted file mode 100644 index 9e118e2..0000000 --- a/src/bpmn/panel/ProcessPanel.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/src/bpmn/panel/SequenceFlowPanel.vue b/src/bpmn/panel/SequenceFlowPanel.vue deleted file mode 100644 index eac8227..0000000 --- a/src/bpmn/panel/SequenceFlowPanel.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - diff --git a/src/bpmn/panel/StartEndPanel.vue b/src/bpmn/panel/StartEndPanel.vue deleted file mode 100644 index bde1212..0000000 --- a/src/bpmn/panel/StartEndPanel.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/src/bpmn/panel/SubProcessPanel.vue b/src/bpmn/panel/SubProcessPanel.vue deleted file mode 100644 index 3490fff..0000000 --- a/src/bpmn/panel/SubProcessPanel.vue +++ /dev/null @@ -1,193 +0,0 @@ - - - - diff --git a/src/bpmn/panel/TaskPanel.vue b/src/bpmn/panel/TaskPanel.vue deleted file mode 100644 index a42de8a..0000000 --- a/src/bpmn/panel/TaskPanel.vue +++ /dev/null @@ -1,491 +0,0 @@ - - - - diff --git a/src/bpmn/panel/index.vue b/src/bpmn/panel/index.vue deleted file mode 100644 index 445571a..0000000 --- a/src/bpmn/panel/index.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - diff --git a/src/bpmn/panel/property/DueDate.vue b/src/bpmn/panel/property/DueDate.vue deleted file mode 100644 index 882766b..0000000 --- a/src/bpmn/panel/property/DueDate.vue +++ /dev/null @@ -1,252 +0,0 @@ - - - diff --git a/src/bpmn/panel/property/ExecutionListener.vue b/src/bpmn/panel/property/ExecutionListener.vue deleted file mode 100644 index 3c584cb..0000000 --- a/src/bpmn/panel/property/ExecutionListener.vue +++ /dev/null @@ -1,308 +0,0 @@ - - - - diff --git a/src/bpmn/panel/property/ListenerParam.vue b/src/bpmn/panel/property/ListenerParam.vue deleted file mode 100644 index 21c6de1..0000000 --- a/src/bpmn/panel/property/ListenerParam.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - - - diff --git a/src/bpmn/panel/property/TaskListener.vue b/src/bpmn/panel/property/TaskListener.vue deleted file mode 100644 index 9a32c47..0000000 --- a/src/bpmn/panel/property/TaskListener.vue +++ /dev/null @@ -1,310 +0,0 @@ - - - - diff --git a/src/components/BpmnDesign/index.vue b/src/components/BpmnDesign/index.vue deleted file mode 100644 index 1f84516..0000000 --- a/src/components/BpmnDesign/index.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/src/components/BpmnView/index.vue b/src/components/BpmnView/index.vue deleted file mode 100644 index c5e0c7b..0000000 --- a/src/components/BpmnView/index.vue +++ /dev/null @@ -1,411 +0,0 @@ - - - - - diff --git a/src/components/Process/approvalRecord.vue b/src/components/Process/approvalRecord.vue index bb4ed91..baf86a7 100644 --- a/src/components/Process/approvalRecord.vue +++ b/src/components/Process/approvalRecord.vue @@ -2,39 +2,49 @@
- - + +
- - + + - + - - - - - + + + + + diff --git a/src/components/Process/processMeddle.vue b/src/components/Process/processMeddle.vue new file mode 100644 index 0000000..7224755 --- /dev/null +++ b/src/components/Process/processMeddle.vue @@ -0,0 +1,207 @@ + + diff --git a/src/components/Process/submitVerify.vue b/src/components/Process/submitVerify.vue index 09fc82e..4c2ea88 100644 --- a/src/components/Process/submitVerify.vue +++ b/src/components/Process/submitVerify.vue @@ -3,47 +3,47 @@ - 站内信 - 邮件 - 短信 + 站内信 + 邮件 + 短信 - - + + - {{ user.userName }} + {{ user.nickName }} - + @@ -54,14 +54,14 @@ - + - + - - + + @@ -83,6 +83,19 @@ + +
+ + + + + + + +
+
@@ -90,18 +103,17 @@ import { ref } from 'vue'; import { ComponentInternalInstance } from 'vue'; import { ElForm } from 'element-plus'; -import { completeTask, backProcess, getTaskById, transferTask, terminationTask, getTaskNodeList, delegateTask } from '@/api/workflow/task'; +import { completeTask, backProcess, getTask, taskOperation, terminationTask, getBackTaskNode, currentTaskAllUser } from '@/api/workflow/task'; import UserSelect from '@/components/UserSelect'; -import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue'; + const { proxy } = getCurrentInstance() as ComponentInternalInstance; import { UserVO } from '@/api/system/user/types'; -import { TaskVO } from '@/api/workflow/task/types'; +import { FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types'; + const userSelectCopyRef = ref>(); const transferTaskRef = ref>(); const delegateTaskRef = ref>(); - -//加签组件 -const multiInstanceUserRef = ref>(); +const multiInstanceUserRef = ref>(); const props = defineProps({ taskVariables: { @@ -119,65 +131,53 @@ const taskId = ref(''); const selectCopyUserList = ref([]); //抄送人id const selectCopyUserIds = ref(undefined); -// 驳回是否显示 +//可减签的人员 +const deleteUserList = ref([]); +//驳回是否显示 const backVisible = ref(false); const backLoading = ref(true); const backButtonDisabled = ref(true); // 可驳回得任务节点 const taskNodeList = ref([]); //任务 -const task = ref({ +const task = ref({ id: undefined, - name: undefined, - description: undefined, - priority: undefined, - owner: undefined, - assignee: undefined, - assigneeName: undefined, - processInstanceId: undefined, - executionId: undefined, - taskDefinitionId: undefined, - processDefinitionId: undefined, - endTime: undefined, - taskDefinitionKey: undefined, - dueDate: undefined, - category: undefined, - parentTaskId: undefined, + createTime: undefined, + updateTime: undefined, tenantId: undefined, - claimTime: undefined, - businessStatus: undefined, - businessStatusName: undefined, - processDefinitionName: undefined, - processDefinitionKey: undefined, - participantVo: undefined, - multiInstance: undefined, - businessKey: undefined, - wfNodeConfigVo: undefined + definitionId: undefined, + instanceId: undefined, + flowName: undefined, + businessId: undefined, + nodeCode: undefined, + nodeName: undefined, + flowCode: undefined, + flowStatus: undefined, + formCustom: undefined, + formPath: undefined, + nodeType: undefined, + nodeRatio: undefined }); -//加签 减签标题 -const title = ref(''); const dialog = reactive({ visible: false, title: '提示' }); - +//减签弹窗 +const deleteSignatureVisible = ref(false); const form = ref>({ taskId: undefined, message: undefined, variables: {}, messageType: ['1'], - wfCopyList: [] + flowCopyList: [] }); const backForm = ref>({ taskId: undefined, - targetActivityId: undefined, + nodeCode: undefined, message: undefined, variables: {}, messageType: ['1'] }); -const closeDialog = () => { - dialog.visible = false; -}; //打开弹窗 const openDialog = (id?: string) => { selectCopyUserIds.value = undefined; @@ -189,7 +189,7 @@ const openDialog = (id?: string) => { loading.value = true; buttonDisabled.value = true; nextTick(() => { - getTaskById(taskId.value).then((response) => { + getTask(taskId.value).then((response) => { task.value = response.data; loading.value = false; buttonDisabled.value = false; @@ -205,15 +205,15 @@ const handleCompleteTask = async () => { form.value.taskId = taskId.value; form.value.taskVariables = props.taskVariables; if (selectCopyUserList.value && selectCopyUserList.value.length > 0) { - let wfCopyList = []; + let flowCopyList = []; selectCopyUserList.value.forEach((e) => { let copyUser = { userId: e.userId, userName: e.nickName }; - wfCopyList.push(copyUser); + flowCopyList.push(copyUser); }); - form.value.wfCopyList = wfCopyList; + form.value.flowCopyList = flowCopyList; } await proxy?.$modal.confirm('是否确认提交?'); loading.value = true; @@ -236,11 +236,11 @@ const handleBackProcessOpen = async () => { backVisible.value = true; backLoading.value = true; backButtonDisabled.value = true; - let data = await getTaskNodeList(task.value.processInstanceId); + let data = await getBackTaskNode(task.value.definitionId, task.value.nodeCode); taskNodeList.value = data.data; backLoading.value = false; backButtonDisabled.value = false; - backForm.value.targetActivityId = taskNodeList.value[0].nodeId; + backForm.value.nodeCode = taskNodeList.value[0].nodeCode; }; /** 驳回流程 */ const handleBackProcess = async () => { @@ -249,7 +249,10 @@ const handleBackProcess = async () => { loading.value = true; backLoading.value = true; backButtonDisabled.value = true; - await backProcess(backForm.value).finally(() => (loading.value = false)); + await backProcess(backForm.value).finally(() => { + loading.value = false; + buttonDisabled.value = false; + }); dialog.visible = false; backLoading.value = false; backButtonDisabled.value = false; @@ -282,18 +285,48 @@ const handleCopyCloseTag = (user: UserVO) => { selectCopyUserIds.value = selectCopyUserList.value.map((item) => item.userId).join(','); }; //加签 -const addMultiInstanceUser = () => { - if (multiInstanceUserRef.value) { - title.value = '加签人员'; - multiInstanceUserRef.value.getAddMultiInstanceList(taskId.value, []); +const openMultiInstanceUser = async () => { + multiInstanceUserRef.value.open(); +}; +//加签 +const addMultiInstanceUser = async (data) => { + if (data && data.length > 0) { + const taskOperationBo = reactive({ + userIds: data.map((e) => e.userId), + taskId: taskId.value, + message: form.value.message + }); + await proxy?.$modal.confirm('是否确认提交?'); + loading.value = true; + buttonDisabled.value = true; + await taskOperation(taskOperationBo, 'addSignature').finally(() => { + loading.value = false; + buttonDisabled.value = false; + }); + dialog.visible = false; + emits('submitCallback'); + proxy?.$modal.msgSuccess('操作成功'); + } else { + proxy?.$modal.msgWarning('请选择用户!'); } }; //减签 -const deleteMultiInstanceUser = () => { - if (multiInstanceUserRef.value) { - title.value = '减签人员'; - multiInstanceUserRef.value.getDeleteMultiInstanceList(taskId.value); - } +const deleteMultiInstanceUser = async (row) => { + await proxy?.$modal.confirm('是否确认提交?'); + loading.value = true; + buttonDisabled.value = true; + const taskOperationBo = reactive({ + userIds: [row.userId], + taskId: taskId.value, + message: form.value.message + }); + await taskOperation(taskOperationBo, 'reductionSignature').finally(() => { + loading.value = false; + buttonDisabled.value = false; + }); + dialog.visible = false; + emits('submitCallback'); + proxy?.$modal.msgSuccess('操作成功'); }; //打开转办 const openTransferTask = () => { @@ -302,15 +335,18 @@ const openTransferTask = () => { //转办 const handleTransferTask = async (data) => { if (data && data.length > 0) { - let params = { - taskId: taskId.value, + const taskOperationBo = reactive({ userId: data[0].userId, - comment: form.value.message - }; + taskId: taskId.value, + message: form.value.message + }); await proxy?.$modal.confirm('是否确认提交?'); loading.value = true; buttonDisabled.value = true; - await transferTask(params).finally(() => (loading.value = false)); + await taskOperation(taskOperationBo, 'transferTask').finally(() => { + loading.value = false; + buttonDisabled.value = false; + }); dialog.visible = false; emits('submitCallback'); proxy?.$modal.msgSuccess('操作成功'); @@ -326,15 +362,18 @@ const openDelegateTask = () => { //委托 const handleDelegateTask = async (data) => { if (data && data.length > 0) { - let params = { - taskId: taskId.value, + const taskOperationBo = reactive({ userId: data[0].userId, - nickName: data[0].nickName - }; + taskId: taskId.value, + message: form.value.message + }); await proxy?.$modal.confirm('是否确认提交?'); loading.value = true; buttonDisabled.value = true; - await delegateTask(params).finally(() => (loading.value = false)); + await taskOperation(taskOperationBo, 'delegateTask').finally(() => { + loading.value = false; + buttonDisabled.value = false; + }); dialog.visible = false; emits('submitCallback'); proxy?.$modal.msgSuccess('操作成功'); @@ -343,7 +382,7 @@ const handleDelegateTask = async (data) => { } }; //终止任务 -const handleTerminationTask = async (data) => { +const handleTerminationTask = async () => { let params = { taskId: taskId.value, comment: form.value.message @@ -351,11 +390,24 @@ const handleTerminationTask = async (data) => { await proxy?.$modal.confirm('是否确认终止?'); loading.value = true; buttonDisabled.value = true; - await terminationTask(params).finally(() => (loading.value = false)); + await terminationTask(params).finally(() => { + loading.value = false; + buttonDisabled.value = false; + }); dialog.visible = false; emits('submitCallback'); proxy?.$modal.msgSuccess('操作成功'); }; +const handleTaskUser = async () => { + let data = await currentTaskAllUser(taskId.value); + deleteUserList.value = data.data; + if (deleteUserList.value && deleteUserList.value.length > 0) { + deleteUserList.value.forEach((e) => { + e.nodeName = task.value.nodeName; + }); + } + deleteSignatureVisible.value = true; +}; /** * 对外暴露子组件方法 diff --git a/src/components/UserSelect/index.vue b/src/components/UserSelect/index.vue index 4b93bb3..937a395 100644 --- a/src/components/UserSelect/index.vue +++ b/src/components/UserSelect/index.vue @@ -43,7 +43,7 @@ @@ -100,14 +100,14 @@ diff --git a/src/views/workflow/leave/index.vue b/src/views/workflow/leave/index.vue index 1708b64..64f0c57 100644 --- a/src/views/workflow/leave/index.vue +++ b/src/views/workflow/leave/index.vue @@ -31,7 +31,7 @@ - + @@ -56,38 +56,28 @@ - + @@ -99,7 +89,7 @@ diff --git a/src/views/workflow/processDefinition/components/processPreview.vue b/src/views/workflow/processDefinition/components/processPreview.vue deleted file mode 100644 index 19a95df..0000000 --- a/src/views/workflow/processDefinition/components/processPreview.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/src/views/workflow/processDefinition/design.vue b/src/views/workflow/processDefinition/design.vue new file mode 100644 index 0000000..cb11045 --- /dev/null +++ b/src/views/workflow/processDefinition/design.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index 6c686bf..38ba903 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -10,7 +10,7 @@ class="mt-2" node-key="id" :data="categoryOptions" - :props="{ label: 'categoryName', children: 'children' }" + :props="{ label: 'label', children: 'children' }" :expand-on-click-node="false" :filter-node-method="filterNode" highlight-current @@ -24,11 +24,11 @@
- - + + - - + + 搜索 @@ -41,94 +41,87 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - @@ -138,9 +131,9 @@
点击上传,选择BPMN流程文件
@@ -162,88 +155,35 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -251,53 +191,32 @@ diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue index 084cf13..140cdaf 100644 --- a/src/views/workflow/processInstance/index.vue +++ b/src/views/workflow/processInstance/index.vue @@ -10,7 +10,7 @@ class="mt-2" node-key="id" :data="categoryOptions" - :props="{ label: 'categoryName', children: 'children' }" + :props="{ label: 'label', children: 'children' }" :expand-on-click-node="false" :filter-node-method="filterNode" highlight-current @@ -20,23 +20,31 @@
-
- - - 运行中 - 已完成 - - -
+
- - - + + + + 选择申请人 + - - + + + + + + + + 搜索 @@ -55,66 +63,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -122,6 +138,7 @@ + @@ -133,42 +150,55 @@ - - - + + + + +
+ +
+
+
+ + + +
diff --git a/vite.config.ts b/vite.config.ts index 97c8d9d..e125e36 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -64,16 +64,6 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { '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', - 'tiny-svg', 'image-conversion', 'element-plus/es/components/**/css' ] From e0eed9c89aebd5a7c4f8b0cd302875d62eb0f40e 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, 13 Jan 2025 19:38:01 +0800 Subject: [PATCH 57/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/processDefinition/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index 38ba903..de55192 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -358,6 +358,7 @@ const handlePublish = async (row?: FlowDefinitionVo) => { loading.value = true; await publish(row.id).finally(() => (loading.value = false)); processDefinitionDialog.visible = false; + activeName.value = "0" await handleQuery(); proxy?.$modal.msgSuccess('发布成功'); }; @@ -404,6 +405,7 @@ const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest => .then(() => { uploadDialog.visible = false; proxy?.$modal.msgSuccess('部署成功'); + activeName.value = "1" handleQuery(); }) .finally(() => { From 2fc220f9d3ebd451ecaf874570b9a5e66b262d78 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: Wed, 15 Jan 2025 17:42:32 +0800 Subject: [PATCH 58/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=ACjson=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/processDefinition/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index de55192..a45e484 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -143,13 +143,13 @@ class="upload-demo" drag multiple - accept="application/zip,application/xml,.bpmn" + accept="application/json,application/text" :before-upload="handlerBeforeUpload" :http-request="handlerImportDefinition" > -
点击上传,选择BPMN流程文件
-
仅支持 .zip、.bpmn20.xml、bpmn 格式文件
+
点击上传,选择JSON流程文件
+
仅支持json格式文件
PS:如若部署请部署从本项目模型管理导出的数据
@@ -498,6 +498,6 @@ const handleCopyDef = async (row: FlowDefinitionVo) => { /** 导出按钮操作 */ const handleExportDef = () => { - proxy?.download(`/workflow/definition/exportDef/${ids.value[0]}`, {}, `${flowCodeList.value[0]}.xml`); + proxy?.download(`/workflow/definition/exportDef/${ids.value[0]}`, {}, `${flowCodeList.value[0]}.json`); }; From 71528c78acb8702c7de73ac0416f18642aa6e120 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: Wed, 15 Jan 2025 18:20:29 +0800 Subject: [PATCH 59/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E7=95=8C=E9=9D=A2=E5=B1=95=E7=A4=BA=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/processDefinition/design.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/views/workflow/processDefinition/design.vue b/src/views/workflow/processDefinition/design.vue index cb11045..7606690 100644 --- a/src/views/workflow/processDefinition/design.vue +++ b/src/views/workflow/processDefinition/design.vue @@ -1,17 +1,30 @@ - - From 3c2409169b9e9ce44fd8e20feb2b85e03df226b7 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Fri, 17 Jan 2025 21:59:11 +0800 Subject: [PATCH 65/73] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/processDefinition/design.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/workflow/processDefinition/design.vue b/src/views/workflow/processDefinition/design.vue index ead501a..3ec44f7 100644 --- a/src/views/workflow/processDefinition/design.vue +++ b/src/views/workflow/processDefinition/design.vue @@ -1,6 +1,6 @@ From 801700044c72187774396e1a4c5bffd180abfe20 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, 20 Jan 2025 10:08:58 +0800 Subject: [PATCH 66/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/enums/SettingTypeEnum.ts | 16 ---------------- src/enums/layout/LayoutEnum.ts | 4 ---- src/hooks/useDialog.ts | 31 ------------------------------- 3 files changed, 51 deletions(-) delete mode 100644 src/enums/SettingTypeEnum.ts delete mode 100644 src/enums/layout/LayoutEnum.ts delete mode 100644 src/hooks/useDialog.ts diff --git a/src/enums/SettingTypeEnum.ts b/src/enums/SettingTypeEnum.ts deleted file mode 100644 index bf4ec43..0000000 --- a/src/enums/SettingTypeEnum.ts +++ /dev/null @@ -1,16 +0,0 @@ -export enum SettingTypeEnum { - TITLE = 'title', - THEME = 'theme', - SIDE_THEME = 'sideTheme', - SHOW_SETTINGS = 'showSettings', - TOP_NAV = 'topNav', - TAGS_VIEW = 'tagsView', - FIXED_HEADER = 'fixedHeader', - SIDEBAR_LOGO = 'sidebarLogo', - DYNAMIC_TITLE = 'dynamicTitle', - ANIMATION_ENABLE = 'animationEnable', - LAYOUT = 'layout', - DARK = 'dark', - - LAYOUT_SETTING = 'layout-setting' -} diff --git a/src/enums/layout/LayoutEnum.ts b/src/enums/layout/LayoutEnum.ts deleted file mode 100644 index 0aa601b..0000000 --- a/src/enums/layout/LayoutEnum.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum ThemeEnum { - DARK = 'theme-dark', - LIGHT = 'theme-light' -} diff --git a/src/hooks/useDialog.ts b/src/hooks/useDialog.ts deleted file mode 100644 index 547f199..0000000 --- a/src/hooks/useDialog.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Ref } from 'vue'; - -interface Options { - title?: string; -} -interface Return { - title: Ref; - visible: Ref; - openDialog: () => void; - closeDialog: () => void; -} -export default (ops?: Options): Return => { - const visible = ref(false); - const title = ref(ops.title || ''); - - const openDialog = () => { - visible.value = true; - }; - - const closeDialog = () => { - visible.value = false; - }; - - return { - title, - visible, - - openDialog, - closeDialog - }; -}; From 8d398d2940df74723a07c6a8ec877b3f203fb428 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, 20 Jan 2025 10:16:27 +0800 Subject: [PATCH 67/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8json=20?= =?UTF-8?q?=E4=B9=A6=E5=86=99=E6=9B=B4=E6=96=B9=E4=BE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en_US.json | 81 ++++++++++++++++++++++++++++++++++++++++++ src/lang/en_US.ts | 85 --------------------------------------------- src/lang/index.ts | 4 +-- src/lang/zh_CN.json | 81 ++++++++++++++++++++++++++++++++++++++++++ src/lang/zh_CN.ts | 85 --------------------------------------------- 5 files changed, 164 insertions(+), 172 deletions(-) create mode 100644 src/lang/en_US.json delete mode 100644 src/lang/en_US.ts create mode 100644 src/lang/zh_CN.json delete mode 100644 src/lang/zh_CN.ts diff --git a/src/lang/en_US.json b/src/lang/en_US.json new file mode 100644 index 0000000..f465aa6 --- /dev/null +++ b/src/lang/en_US.json @@ -0,0 +1,81 @@ +{ + "route": { + "dashboard": "Dashboard", + "document": "Document" + }, + "login": { + "selectPlaceholder": "Please select/enter a company name", + "username": "Username", + "password": "Password", + "login": "Login", + "logging": "Logging...", + "code": "Verification Code", + "rememberPassword": "Remember me", + "switchRegisterPage": "Sign up now", + "rule": { + "tenantId": { + "required": "Please enter your tenant id" + }, + "username": { + "required": "Please enter your account" + }, + "password": { + "required": "Please enter your password" + }, + "code": { + "required": "Please enter a verification code" + } + }, + "social": { + "wechat": "Wechat Login", + "maxkey": "MaxKey Login", + "topiam": "TopIam Login", + "gitee": "Gitee Login", + "github": "Github Login" + } + }, + "register": { + "selectPlaceholder": "Please select/enter a company name", + "username": "Username", + "password": "Password", + "confirmPassword": "Confirm Password", + "register": "Register", + "registering": "Registering...", + "registerSuccess": "Congratulations, your {username} account has been registered!", + "code": "Verification Code", + "switchLoginPage": "Log in with an existing account", + "rule": { + "tenantId": { + "required": "Please enter your tenant id" + }, + "username": { + "required": "Please enter your account", + "length": "The length of the user account must be between {min} and {max}" + }, + "password": { + "required": "Please enter your password", + "length": "The user password must be between {min} and {max} in length", + "pattern": "Can't contain illegal characters: {strings}" + }, + "code": { + "required": "Please enter a verification code" + }, + "confirmPassword": { + "required": "Please enter your password again", + "equalToPassword": "The password entered twice is inconsistent" + } + } + }, + "navbar": { + "full": "Full Screen", + "language": "Language", + "dashboard": "Dashboard", + "document": "Document", + "message": "Message", + "layoutSize": "Layout Size", + "selectTenant": "Select Tenant", + "layoutSetting": "Layout Setting", + "personalCenter": "Personal Center", + "logout": "Logout" + } +} diff --git a/src/lang/en_US.ts b/src/lang/en_US.ts deleted file mode 100644 index b090d3e..0000000 --- a/src/lang/en_US.ts +++ /dev/null @@ -1,85 +0,0 @@ -export default { - // 路由国际化 - route: { - dashboard: 'Dashboard', - document: 'Document' - }, - // 登录页面国际化 - login: { - selectPlaceholder: 'Please select/enter a company name', - username: 'Username', - password: 'Password', - login: 'Login', - logging: 'Logging...', - code: 'Verification Code', - rememberPassword: 'Remember me', - switchRegisterPage: 'Sign up now', - rule: { - tenantId: { - required: 'Please enter your tenant id' - }, - username: { - required: 'Please enter your account' - }, - password: { - required: 'Please enter your password' - }, - code: { - required: 'Please enter a verification code' - } - }, - social: { - wechat: 'Wechat Login', - maxkey: 'MaxKey Login', - topiam: 'TopIam Login', - gitee: 'Gitee Login', - github: 'Github Login' - } - }, - // 注册页面国际化 - register: { - selectPlaceholder: 'Please select/enter a company name', - username: 'Username', - password: 'Password', - confirmPassword: 'Confirm Password', - register: 'Register', - registering: 'Registering...', - registerSuccess: 'Congratulations, your {username} account has been registered!', - code: 'Verification Code', - switchLoginPage: 'Log in with an existing account', - rule: { - tenantId: { - required: 'Please enter your tenant id' - }, - username: { - required: 'Please enter your account', - length: 'The length of the user account must be between {min} and {max}' - }, - password: { - required: 'Please enter your password', - length: 'The user password must be between {min} and {max} in length', - pattern: "Can't contain illegal characters: {strings}" - }, - code: { - required: 'Please enter a verification code' - }, - confirmPassword: { - required: 'Please enter your password again', - equalToPassword: 'The password entered twice is inconsistent' - } - } - }, - // 导航栏国际化 - navbar: { - full: 'Full Screen', - language: 'Language', - dashboard: 'Dashboard', - document: 'Document', - message: 'Message', - layoutSize: 'Layout Size', - selectTenant: 'Select Tenant', - layoutSetting: 'Layout Setting', - personalCenter: 'Personal Center', - logout: 'Logout' - } -}; diff --git a/src/lang/index.ts b/src/lang/index.ts index 4f8e74c..a6bf6b8 100644 --- a/src/lang/index.ts +++ b/src/lang/index.ts @@ -2,8 +2,8 @@ import { createI18n } from 'vue-i18n'; import { LanguageEnum } from '@/enums/LanguageEnum'; -import zh_CN from '@/lang/zh_CN'; -import en_US from '@/lang/en_US'; +import zh_CN from '@/lang/zh_CN.json'; +import en_US from '@/lang/en_US.json'; /** * 获取当前语言 diff --git a/src/lang/zh_CN.json b/src/lang/zh_CN.json new file mode 100644 index 0000000..14138b5 --- /dev/null +++ b/src/lang/zh_CN.json @@ -0,0 +1,81 @@ +{ + "route": { + "dashboard": "首页", + "document": "项目文档" + }, + "login": { + "selectPlaceholder": "请选择/输入公司名称", + "username": "用户名", + "password": "密码", + "login": "登 录", + "logging": "登 录 中...", + "code": "验证码", + "rememberPassword": "记住我", + "switchRegisterPage": "立即注册", + "rule": { + "tenantId": { + "required": "请输入您的租户编号" + }, + "username": { + "required": "请输入您的账号" + }, + "password": { + "required": "请输入您的密码" + }, + "code": { + "required": "请输入验证码" + } + }, + "social": { + "wechat": "微信登录", + "maxkey": "MaxKey登录", + "topiam": "TopIam登录", + "gitee": "Gitee登录", + "github": "Github登录" + } + }, + "register": { + "selectPlaceholder": "请选择/输入公司名称", + "username": "用户名", + "password": "密码", + "confirmPassword": "确认密码", + "register": "注 册", + "registering": "注 册 中...", + "registerSuccess": "恭喜你,您的账号 {username} 注册成功!", + "code": "验证码", + "switchLoginPage": "使用已有账户登录", + "rule": { + "tenantId": { + "required": "请输入您的租户编号" + }, + "username": { + "required": "请输入您的账号", + "length": "用户账号长度必须介于 {min} 和 {max} 之间" + }, + "password": { + "required": "请输入您的密码", + "length": "用户密码长度必须介于 {min} 和 {max} 之间", + "pattern": "不能包含非法字符:{strings}" + }, + "code": { + "required": "请输入验证码" + }, + "confirmPassword": { + "required": "请再次输入您的密码", + "equalToPassword": "两次输入的密码不一致" + } + } + }, + "navbar": { + "full": "全屏", + "language": "语言", + "dashboard": "首页", + "document": "项目文档", + "message": "消息", + "layoutSize": "布局大小", + "selectTenant": "选择租户", + "layoutSetting": "布局设置", + "personalCenter": "个人中心", + "logout": "退出登录" + } +} diff --git a/src/lang/zh_CN.ts b/src/lang/zh_CN.ts deleted file mode 100644 index 3cc9872..0000000 --- a/src/lang/zh_CN.ts +++ /dev/null @@ -1,85 +0,0 @@ -export default { - // 路由国际化 - route: { - dashboard: '首页', - document: '项目文档' - }, - // 登录页面国际化 - login: { - selectPlaceholder: '请选择/输入公司名称', - username: '用户名', - password: '密码', - login: '登 录', - logging: '登 录 中...', - code: '验证码', - rememberPassword: '记住我', - switchRegisterPage: '立即注册', - rule: { - tenantId: { - required: '请输入您的租户编号' - }, - username: { - required: '请输入您的账号' - }, - password: { - required: '请输入您的密码' - }, - code: { - required: '请输入验证码' - } - }, - social: { - wechat: '微信登录', - maxkey: 'MaxKey登录', - topiam: 'TopIam登录', - gitee: 'Gitee登录', - github: 'Github登录' - } - }, - // 注册页面国际化 - register: { - selectPlaceholder: '请选择/输入公司名称', - username: '用户名', - password: '密码', - confirmPassword: '确认密码', - register: '注 册', - registering: '注 册 中...', - registerSuccess: '恭喜你,您的账号 {username} 注册成功!', - code: '验证码', - switchLoginPage: '使用已有账户登录', - rule: { - tenantId: { - required: '请输入您的租户编号' - }, - username: { - required: '请输入您的账号', - length: '用户账号长度必须介于 {min} 和 {max} 之间' - }, - password: { - required: '请输入您的密码', - length: '用户密码长度必须介于 {min} 和 {max} 之间', - pattern: '不能包含非法字符:{strings}' - }, - code: { - required: '请输入验证码' - }, - confirmPassword: { - required: '请再次输入您的密码', - equalToPassword: '两次输入的密码不一致' - } - } - }, - // 导航栏国际化 - navbar: { - full: '全屏', - language: '语言', - dashboard: '首页', - document: '项目文档', - message: '消息', - layoutSize: '布局大小', - selectTenant: '选择租户', - layoutSetting: '布局设置', - personalCenter: '个人中心', - logout: '退出登录' - } -}; From 0d493f1c74da38550eb837325de16539f0a520d7 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, 20 Jan 2025 10:41:45 +0800 Subject: [PATCH 68/73] update vue-i18n 10.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 223af4f..1d6d5c1 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "screenfull": "6.0.2", "vue": "3.5.13", "vue-cropper": "1.1.1", - "vue-i18n": "9.10.2", + "vue-i18n": "10.0.5", "vue-json-pretty": "2.4.0", "vue-router": "4.4.5", "vue-types": "5.1.3", From 11e269546592fa32d8f6a91daf962895fc573687 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, 20 Jan 2025 10:57:45 +0800 Subject: [PATCH 69/73] =?UTF-8?q?Revert=20"update=20=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?json=20=E4=B9=A6=E5=86=99=E6=9B=B4=E6=96=B9=E4=BE=BF"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8d398d2940df74723a07c6a8ec877b3f203fb428. --- src/lang/en_US.json | 81 ------------------------------------------ src/lang/en_US.ts | 85 +++++++++++++++++++++++++++++++++++++++++++++ src/lang/index.ts | 4 +-- src/lang/zh_CN.json | 81 ------------------------------------------ src/lang/zh_CN.ts | 85 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 172 insertions(+), 164 deletions(-) delete mode 100644 src/lang/en_US.json create mode 100644 src/lang/en_US.ts delete mode 100644 src/lang/zh_CN.json create mode 100644 src/lang/zh_CN.ts diff --git a/src/lang/en_US.json b/src/lang/en_US.json deleted file mode 100644 index f465aa6..0000000 --- a/src/lang/en_US.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "route": { - "dashboard": "Dashboard", - "document": "Document" - }, - "login": { - "selectPlaceholder": "Please select/enter a company name", - "username": "Username", - "password": "Password", - "login": "Login", - "logging": "Logging...", - "code": "Verification Code", - "rememberPassword": "Remember me", - "switchRegisterPage": "Sign up now", - "rule": { - "tenantId": { - "required": "Please enter your tenant id" - }, - "username": { - "required": "Please enter your account" - }, - "password": { - "required": "Please enter your password" - }, - "code": { - "required": "Please enter a verification code" - } - }, - "social": { - "wechat": "Wechat Login", - "maxkey": "MaxKey Login", - "topiam": "TopIam Login", - "gitee": "Gitee Login", - "github": "Github Login" - } - }, - "register": { - "selectPlaceholder": "Please select/enter a company name", - "username": "Username", - "password": "Password", - "confirmPassword": "Confirm Password", - "register": "Register", - "registering": "Registering...", - "registerSuccess": "Congratulations, your {username} account has been registered!", - "code": "Verification Code", - "switchLoginPage": "Log in with an existing account", - "rule": { - "tenantId": { - "required": "Please enter your tenant id" - }, - "username": { - "required": "Please enter your account", - "length": "The length of the user account must be between {min} and {max}" - }, - "password": { - "required": "Please enter your password", - "length": "The user password must be between {min} and {max} in length", - "pattern": "Can't contain illegal characters: {strings}" - }, - "code": { - "required": "Please enter a verification code" - }, - "confirmPassword": { - "required": "Please enter your password again", - "equalToPassword": "The password entered twice is inconsistent" - } - } - }, - "navbar": { - "full": "Full Screen", - "language": "Language", - "dashboard": "Dashboard", - "document": "Document", - "message": "Message", - "layoutSize": "Layout Size", - "selectTenant": "Select Tenant", - "layoutSetting": "Layout Setting", - "personalCenter": "Personal Center", - "logout": "Logout" - } -} diff --git a/src/lang/en_US.ts b/src/lang/en_US.ts new file mode 100644 index 0000000..b090d3e --- /dev/null +++ b/src/lang/en_US.ts @@ -0,0 +1,85 @@ +export default { + // 路由国际化 + route: { + dashboard: 'Dashboard', + document: 'Document' + }, + // 登录页面国际化 + login: { + selectPlaceholder: 'Please select/enter a company name', + username: 'Username', + password: 'Password', + login: 'Login', + logging: 'Logging...', + code: 'Verification Code', + rememberPassword: 'Remember me', + switchRegisterPage: 'Sign up now', + rule: { + tenantId: { + required: 'Please enter your tenant id' + }, + username: { + required: 'Please enter your account' + }, + password: { + required: 'Please enter your password' + }, + code: { + required: 'Please enter a verification code' + } + }, + social: { + wechat: 'Wechat Login', + maxkey: 'MaxKey Login', + topiam: 'TopIam Login', + gitee: 'Gitee Login', + github: 'Github Login' + } + }, + // 注册页面国际化 + register: { + selectPlaceholder: 'Please select/enter a company name', + username: 'Username', + password: 'Password', + confirmPassword: 'Confirm Password', + register: 'Register', + registering: 'Registering...', + registerSuccess: 'Congratulations, your {username} account has been registered!', + code: 'Verification Code', + switchLoginPage: 'Log in with an existing account', + rule: { + tenantId: { + required: 'Please enter your tenant id' + }, + username: { + required: 'Please enter your account', + length: 'The length of the user account must be between {min} and {max}' + }, + password: { + required: 'Please enter your password', + length: 'The user password must be between {min} and {max} in length', + pattern: "Can't contain illegal characters: {strings}" + }, + code: { + required: 'Please enter a verification code' + }, + confirmPassword: { + required: 'Please enter your password again', + equalToPassword: 'The password entered twice is inconsistent' + } + } + }, + // 导航栏国际化 + navbar: { + full: 'Full Screen', + language: 'Language', + dashboard: 'Dashboard', + document: 'Document', + message: 'Message', + layoutSize: 'Layout Size', + selectTenant: 'Select Tenant', + layoutSetting: 'Layout Setting', + personalCenter: 'Personal Center', + logout: 'Logout' + } +}; diff --git a/src/lang/index.ts b/src/lang/index.ts index a6bf6b8..4f8e74c 100644 --- a/src/lang/index.ts +++ b/src/lang/index.ts @@ -2,8 +2,8 @@ import { createI18n } from 'vue-i18n'; import { LanguageEnum } from '@/enums/LanguageEnum'; -import zh_CN from '@/lang/zh_CN.json'; -import en_US from '@/lang/en_US.json'; +import zh_CN from '@/lang/zh_CN'; +import en_US from '@/lang/en_US'; /** * 获取当前语言 diff --git a/src/lang/zh_CN.json b/src/lang/zh_CN.json deleted file mode 100644 index 14138b5..0000000 --- a/src/lang/zh_CN.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "route": { - "dashboard": "首页", - "document": "项目文档" - }, - "login": { - "selectPlaceholder": "请选择/输入公司名称", - "username": "用户名", - "password": "密码", - "login": "登 录", - "logging": "登 录 中...", - "code": "验证码", - "rememberPassword": "记住我", - "switchRegisterPage": "立即注册", - "rule": { - "tenantId": { - "required": "请输入您的租户编号" - }, - "username": { - "required": "请输入您的账号" - }, - "password": { - "required": "请输入您的密码" - }, - "code": { - "required": "请输入验证码" - } - }, - "social": { - "wechat": "微信登录", - "maxkey": "MaxKey登录", - "topiam": "TopIam登录", - "gitee": "Gitee登录", - "github": "Github登录" - } - }, - "register": { - "selectPlaceholder": "请选择/输入公司名称", - "username": "用户名", - "password": "密码", - "confirmPassword": "确认密码", - "register": "注 册", - "registering": "注 册 中...", - "registerSuccess": "恭喜你,您的账号 {username} 注册成功!", - "code": "验证码", - "switchLoginPage": "使用已有账户登录", - "rule": { - "tenantId": { - "required": "请输入您的租户编号" - }, - "username": { - "required": "请输入您的账号", - "length": "用户账号长度必须介于 {min} 和 {max} 之间" - }, - "password": { - "required": "请输入您的密码", - "length": "用户密码长度必须介于 {min} 和 {max} 之间", - "pattern": "不能包含非法字符:{strings}" - }, - "code": { - "required": "请输入验证码" - }, - "confirmPassword": { - "required": "请再次输入您的密码", - "equalToPassword": "两次输入的密码不一致" - } - } - }, - "navbar": { - "full": "全屏", - "language": "语言", - "dashboard": "首页", - "document": "项目文档", - "message": "消息", - "layoutSize": "布局大小", - "selectTenant": "选择租户", - "layoutSetting": "布局设置", - "personalCenter": "个人中心", - "logout": "退出登录" - } -} diff --git a/src/lang/zh_CN.ts b/src/lang/zh_CN.ts new file mode 100644 index 0000000..3cc9872 --- /dev/null +++ b/src/lang/zh_CN.ts @@ -0,0 +1,85 @@ +export default { + // 路由国际化 + route: { + dashboard: '首页', + document: '项目文档' + }, + // 登录页面国际化 + login: { + selectPlaceholder: '请选择/输入公司名称', + username: '用户名', + password: '密码', + login: '登 录', + logging: '登 录 中...', + code: '验证码', + rememberPassword: '记住我', + switchRegisterPage: '立即注册', + rule: { + tenantId: { + required: '请输入您的租户编号' + }, + username: { + required: '请输入您的账号' + }, + password: { + required: '请输入您的密码' + }, + code: { + required: '请输入验证码' + } + }, + social: { + wechat: '微信登录', + maxkey: 'MaxKey登录', + topiam: 'TopIam登录', + gitee: 'Gitee登录', + github: 'Github登录' + } + }, + // 注册页面国际化 + register: { + selectPlaceholder: '请选择/输入公司名称', + username: '用户名', + password: '密码', + confirmPassword: '确认密码', + register: '注 册', + registering: '注 册 中...', + registerSuccess: '恭喜你,您的账号 {username} 注册成功!', + code: '验证码', + switchLoginPage: '使用已有账户登录', + rule: { + tenantId: { + required: '请输入您的租户编号' + }, + username: { + required: '请输入您的账号', + length: '用户账号长度必须介于 {min} 和 {max} 之间' + }, + password: { + required: '请输入您的密码', + length: '用户密码长度必须介于 {min} 和 {max} 之间', + pattern: '不能包含非法字符:{strings}' + }, + code: { + required: '请输入验证码' + }, + confirmPassword: { + required: '请再次输入您的密码', + equalToPassword: '两次输入的密码不一致' + } + } + }, + // 导航栏国际化 + navbar: { + full: '全屏', + language: '语言', + dashboard: '首页', + document: '项目文档', + message: '消息', + layoutSize: '布局大小', + selectTenant: '选择租户', + layoutSetting: '布局设置', + personalCenter: '个人中心', + logout: '退出登录' + } +}; From 25189f30525ea19844d2e8680e8bdb947a450879 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, 20 Jan 2025 11:06:19 +0800 Subject: [PATCH 70/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=20=E5=8F=98=E9=87=8F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 26 +++++++++++++------------- src/views/login.vue | 28 +++++++++++++++------------- src/views/register.vue | 18 ++++++++++-------- 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index f821448..01cc22e 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -13,7 +13,7 @@ clearable filterable reserve-keyword - :placeholder="$t('navbar.selectTenant')" + :placeholder="proxy.$t('navbar.selectTenant')" @change="dynamicTenantEvent" @clear="dynamicClearEvent" > @@ -29,7 +29,7 @@
- +
@@ -72,13 +72,13 @@ @@ -128,8 +128,8 @@ const dynamicTenantEvent = async (tenantId: string) => { await dynamicTenant(tenantId); dynamic.value = true; await proxy?.$router.push('/'); - await proxy?.$tab.closeAllPage(); - await proxy?.$tab.refreshPage(); + await proxy?.proxy.$tab.closeAllPage(); + await proxy?.proxy.$tab.refreshPage(); } }; @@ -137,8 +137,8 @@ const dynamicClearEvent = async () => { await dynamicClear(); dynamic.value = false; await proxy?.$router.push('/'); - await proxy?.$tab.closeAllPage(); - await proxy?.$tab.refreshPage(); + await proxy?.proxy.$tab.closeAllPage(); + await proxy?.proxy.$tab.refreshPage(); }; /** 租户列表 */ diff --git a/src/views/login.vue b/src/views/login.vue index ae70f75..cbc980c 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -6,13 +6,13 @@
- + - + @@ -22,7 +22,7 @@ type="password" size="large" auto-complete="off" - :placeholder="$t('login.password')" + :placeholder="proxy.$t('login.password')" @keyup.enter="handleLogin" > @@ -33,7 +33,7 @@ v-model="loginForm.code" size="large" auto-complete="off" - :placeholder="$t('login.code')" + :placeholder="proxy.$t('login.code')" style="width: 63%" @keyup.enter="handleLogin" > @@ -43,31 +43,31 @@ - {{ $t('login.rememberPassword') }} + {{ proxy.$t('login.rememberPassword') }} - + - + - + - + - + - {{ $t('login.login') }} - {{ $t('login.logging') }} + {{ proxy.$t('login.login') }} + {{ proxy.$t('login.logging') }}
- {{ $t('login.switchRegisterPage') }} + {{ proxy.$t('login.switchRegisterPage') }}
@@ -87,6 +87,8 @@ import { to } from 'await-to-js'; import { HttpStatus } from '@/enums/RespEnum'; import { useI18n } from 'vue-i18n'; +const { proxy } = getCurrentInstance() as ComponentInternalInstance; + const userStore = useUserStore(); const router = useRouter(); const { t } = useI18n(); diff --git a/src/views/register.vue b/src/views/register.vue index 9f76c70..f1d1e5a 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -6,13 +6,13 @@ - + - + @@ -22,7 +22,7 @@ type="password" size="large" auto-complete="off" - :placeholder="$t('register.password')" + :placeholder="proxy.$t('register.password')" @keyup.enter="handleRegister" > @@ -34,7 +34,7 @@ type="password" size="large" auto-complete="off" - :placeholder="$t('register.confirmPassword')" + :placeholder="proxy.$t('register.confirmPassword')" @keyup.enter="handleRegister" > @@ -45,7 +45,7 @@ v-model="registerForm.code" size="large" auto-complete="off" - :placeholder="$t('register.code')" + :placeholder="proxy.$t('register.code')" style="width: 63%" @keyup.enter="handleRegister" > @@ -57,11 +57,11 @@ - {{ $t('register.register') }} - {{ $t('register.registering') }} + {{ proxy.$t('register.register') }} + {{ proxy.$t('register.registering') }}
- {{ $t('register.switchLoginPage') }} + {{ proxy.$t('register.switchLoginPage') }}
@@ -78,6 +78,8 @@ import { RegisterForm, TenantVO } from '@/api/types'; import { to } from 'await-to-js'; import { useI18n } from 'vue-i18n'; +const { proxy } = getCurrentInstance() as ComponentInternalInstance; + const router = useRouter(); const { t } = useI18n(); From 4c12943e3ca84a78f9e8871cdb005a4e787573fd 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, 20 Jan 2025 11:18:10 +0800 Subject: [PATCH 71/73] =?UTF-8?q?update=20=E6=81=A2=E5=A4=8D=E8=AF=AF?= =?UTF-8?q?=E5=88=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useDialog.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/hooks/useDialog.ts diff --git a/src/hooks/useDialog.ts b/src/hooks/useDialog.ts new file mode 100644 index 0000000..547f199 --- /dev/null +++ b/src/hooks/useDialog.ts @@ -0,0 +1,31 @@ +import { Ref } from 'vue'; + +interface Options { + title?: string; +} +interface Return { + title: Ref; + visible: Ref; + openDialog: () => void; + closeDialog: () => void; +} +export default (ops?: Options): Return => { + const visible = ref(false); + const title = ref(ops.title || ''); + + const openDialog = () => { + visible.value = true; + }; + + const closeDialog = () => { + visible.value = false; + }; + + return { + title, + visible, + + openDialog, + closeDialog + }; +}; From bbe94610a28e72414df1fb2b36a6d11385873e54 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, 20 Jan 2025 11:30:16 +0800 Subject: [PATCH 72/73] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20parseTime?= =?UTF-8?q?=20=E6=8F=90=E7=A4=BA=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RoleSelect/index.vue | 2 +- src/views/monitor/logininfor/index.vue | 2 +- src/views/monitor/online/index.vue | 2 +- src/views/monitor/operlog/index.vue | 2 +- src/views/monitor/operlog/oper-info-dialog.vue | 2 +- src/views/system/config/index.vue | 2 +- src/views/system/dept/index.vue | 2 +- src/views/system/dict/data.vue | 2 +- src/views/system/dict/index.vue | 2 +- src/views/system/notice/index.vue | 2 +- src/views/system/oss/index.vue | 2 +- src/views/system/post/index.vue | 2 +- src/views/system/role/index.vue | 2 +- src/views/system/role/selectUser.vue | 2 +- src/views/system/tenant/index.vue | 2 +- src/views/system/user/authRole.vue | 2 +- src/views/system/user/profile/onlineDevice.vue | 2 +- src/views/workflow/leave/index.vue | 4 ++-- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/components/RoleSelect/index.vue b/src/components/RoleSelect/index.vue index 6ba2076..56a784b 100644 --- a/src/components/RoleSelect/index.vue +++ b/src/components/RoleSelect/index.vue @@ -53,7 +53,7 @@ diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue index ec4b8fe..d914544 100644 --- a/src/views/monitor/logininfor/index.vue +++ b/src/views/monitor/logininfor/index.vue @@ -94,7 +94,7 @@ diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue index eb12364..7a58bb7 100644 --- a/src/views/monitor/online/index.vue +++ b/src/views/monitor/online/index.vue @@ -42,7 +42,7 @@ diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue index 5bf8430..0c64af4 100644 --- a/src/views/monitor/operlog/index.vue +++ b/src/views/monitor/operlog/index.vue @@ -95,7 +95,7 @@ - +