From 3d2331c2e7ed3aa2935c0abba7c65a4ae4af1dcb Mon Sep 17 00:00:00 2001 From: fmm <1442620801@qq.com> Date: Wed, 21 Aug 2024 20:00:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20vue=E7=94=A8=E6=88=B7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=92=8C=E6=B7=BB=E5=8A=A0=E4=BC=98=E5=8C=96=E4=B8=BA?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pro/template/tinyvue/src/locale/zh-CN.ts | 2 +- .../userManager/info/components/info-tab.vue | 83 +++- .../views/userManager/info/locale/zh-CN.ts | 4 +- .../userManager/setting/components/head.vue | 164 ------- .../setting/components/set-from.vue | 266 ---------- .../src/views/userManager/setting/index.vue | 462 +++++++++--------- .../views/userManager/setting/locale/en-US.ts | 2 + .../src/views/userManager/useradd/index.vue | 422 ++++++++-------- 8 files changed, 525 insertions(+), 880 deletions(-) delete mode 100644 packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/components/head.vue delete mode 100644 packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/components/set-from.vue diff --git a/packages/toolkits/pro/template/tinyvue/src/locale/zh-CN.ts b/packages/toolkits/pro/template/tinyvue/src/locale/zh-CN.ts index 12874bec..cb95a8dc 100644 --- a/packages/toolkits/pro/template/tinyvue/src/locale/zh-CN.ts +++ b/packages/toolkits/pro/template/tinyvue/src/locale/zh-CN.ts @@ -58,7 +58,7 @@ export default { 'menu.menuPage.third': '菜单demo页', 'menu.user': '个人中心', 'menu.userManager': '用户管理', - 'menu.userManager.info': '所有用户', + 'menu.userManager.info': '查看用户', 'menu.userManager.setting': '修改信息', 'menu.userManager.useradd': '添加用户', 'menu.permission': '权限管理', diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/info/components/info-tab.vue b/packages/toolkits/pro/template/tinyvue/src/views/userManager/info/components/info-tab.vue index 911a99a7..1adca8e0 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/info/components/info-tab.vue +++ b/packages/toolkits/pro/template/tinyvue/src/views/userManager/info/components/info-tab.vue @@ -1,6 +1,14 @@ @@ -313,6 +348,8 @@ updatePwdUser, } from '@/api/user'; import { useRouter } from 'vue-router'; + import UserAdd from '../../useradd/index.vue'; + import UserSetting from '../../setting/index.vue'; const router = useRouter(); @@ -324,13 +361,19 @@ tableData: any; pageData: any; isPwdUpdate: boolean; + isUserAdd: boolean; + isUserUpdate: boolean; pwdData: any; + email: string; }>({ loading: null, tableData: [] as any, pageData: [] as any, isPwdUpdate: false, + isUserAdd: false, + isUserUpdate: false, pwdData: {} as any, + email: '', }); // 变量设置 @@ -405,12 +448,8 @@ }; const handleUpdate = (email: string) => { - router.push({ - name: 'AllSetting', - query: { - email, - }, - }); + state.isUserUpdate = true; + state.email = email; }; const handlePwdUpdate = (email: string) => { @@ -423,6 +462,10 @@ state.pwdData = {} as any; }; + const handleAddUser = () => { + state.isUserAdd = true; + }; + async function handlePwdUpdateSubmit() { let data = state.pwdData; let newTemp = { @@ -458,6 +501,10 @@ - - diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/components/set-from.vue b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/components/set-from.vue deleted file mode 100644 index 122e6b8d..00000000 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/components/set-from.vue +++ /dev/null @@ -1,266 +0,0 @@ - - - - - diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue index 9a35fd85..f5757cd3 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue +++ b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue @@ -1,33 +1,28 @@ diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/locale/en-US.ts b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/locale/en-US.ts index 4d5d2626..1d2f33c2 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/locale/en-US.ts +++ b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/locale/en-US.ts @@ -14,4 +14,6 @@ export default { 'userSetting.name': 'UserName', 'userSetting.address': 'Address', 'userSetting.status': 'Status', + 'userInfo.modal.title.add': 'Add User', + 'userInfo.modal.title.update': 'Update User', }; diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue b/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue index 27f85385..f927ddaa 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue +++ b/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue @@ -1,6 +1,5 @@ From 567e853225fd6b5f9012aff677b52a255651edf7 Mon Sep 17 00:00:00 2001 From: fmm <1442620801@qq.com> Date: Wed, 21 Aug 2024 20:01:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20nest=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=88=A0=E9=99=A4=E4=BF=AE=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=92=8C=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/nestJs/src/menu/init/menuData.ts | 20 ------------------- .../server/nestJs/src/menu/menu.service.ts | 6 ++---- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/packages/toolkits/pro/template/server/nestJs/src/menu/init/menuData.ts b/packages/toolkits/pro/template/server/nestJs/src/menu/init/menuData.ts index de5aa83d..20bab9da 100644 --- a/packages/toolkits/pro/template/server/nestJs/src/menu/init/menuData.ts +++ b/packages/toolkits/pro/template/server/nestJs/src/menu/init/menuData.ts @@ -299,26 +299,6 @@ export const menuData = [ path: 'allInfo', locale: 'menu.userManager.info', }, - { - name: 'AllSetting', - order: 1, - parentId: null, - menuType: 'admin', - icon: '', - component: 'userManager/setting/index', - path: 'allSetting', - locale: 'menu.userManager.setting', - }, - { - name: 'UserAdd', - order: 1, - parentId: null, - menuType: 'admin', - icon: '', - component: 'userManager/useradd/index', - path: 'userAdd', - locale: 'menu.userManager.useradd', - }, { name: 'MenuPage', order: 9, diff --git a/packages/toolkits/pro/template/server/nestJs/src/menu/menu.service.ts b/packages/toolkits/pro/template/server/nestJs/src/menu/menu.service.ts index 8f2a96f8..abdaf7e5 100644 --- a/packages/toolkits/pro/template/server/nestJs/src/menu/menu.service.ts +++ b/packages/toolkits/pro/template/server/nestJs/src/menu/menu.service.ts @@ -127,10 +127,8 @@ export class MenuService { menu[25].parentId = menuId[24]; menu[27].parentId = menuId[26]; menu[29].parentId = menuId[28]; - menu[30].parentId = menuId[28]; - menu[31].parentId = menuId[28]; - menu[33].parentId = menuId[32]; - menu[34].parentId = menuId[33]; + menu[31].parentId = menuId[30]; + menu[32].parentId = menuId[31]; } for (const item of menu) { await this.menu.update(item.id, { parentId: item.parentId }); From 91383bc6a58705671db90dbe7f5bebc5918ac5e0 Mon Sep 17 00:00:00 2001 From: fmm <1442620801@qq.com> Date: Wed, 21 Aug 2024 20:34:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/tinyvue/src/views/userManager/setting/index.vue | 3 --- .../template/tinyvue/src/views/userManager/useradd/index.vue | 3 --- 2 files changed, 6 deletions(-) diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue index f5757cd3..ecc26385 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue +++ b/packages/toolkits/pro/template/tinyvue/src/views/userManager/setting/index.vue @@ -379,9 +379,6 @@ } } - //.margin-bottom { - // margin: 15px 0; - //} .col { padding: 4px 0; color: #fff; diff --git a/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue b/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue index f927ddaa..f5d2f29f 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue +++ b/packages/toolkits/pro/template/tinyvue/src/views/userManager/useradd/index.vue @@ -380,9 +380,6 @@ } } - //.margin-bottom { - // margin: 15px 0; - //} .col { padding: 4px 0; color: #fff;