梁旭颖 1 vuosi sitten
vanhempi
commit
8b14e9c893
76 muutettua tiedostoa jossa 415 lisäystä ja 488 poistoa
  1. 0 1
      library/build/vuePlugins/components.d.ts
  2. 1 1
      production/index.html
  3. 0 0
      production/service-worker.js
  4. 0 4
      production/static/css/278.e2607209.css
  5. 0 1
      production/static/css/518.2d17d5dc.css
  6. 4 0
      production/static/css/736.64e84789.css
  7. 1 1
      production/static/css/app.c0783d97.css
  8. 0 4
      production/static/css/vab-chunk-1ce32aae.3d1ba839.css
  9. 4 0
      production/static/css/vab-chunk-81b65d13.70508ae3.css
  10. 0 4
      production/static/css/vab-chunk-b74afb63.94e31fd7.css
  11. 0 5
      production/static/css/vab-plugins.ba54e6d9.css
  12. 4 0
      production/static/css/vab-plugins.c54cc8f9.css
  13. BIN
      production/static/img/403.0b4fa510.png
  14. BIN
      production/static/img/403.d6bd8853.png
  15. BIN
      production/static/img/404.0c0cb43f.png
  16. BIN
      production/static/img/404.f02775f8.png
  17. BIN
      production/static/img/background-1.3b338144.png
  18. BIN
      production/static/img/background.d7764eb5.jpg
  19. BIN
      production/static/img/bg.ac607731.jpeg
  20. BIN
      production/static/img/login.7ae58ae2.jpg
  21. BIN
      production/static/img/login_form.242d2e10.png
  22. BIN
      production/static/img/login_form.be4a23a8.png
  23. 0 0
      production/static/img/login_left.17b387c3.svg
  24. BIN
      production/static/img/middle.36444c8c.png
  25. BIN
      production/static/img/middle.fef19e15.png
  26. BIN
      production/static/img/quan_1.afef6b34.png
  27. BIN
      production/static/img/quan_1.cb0f2575.png
  28. BIN
      production/static/img/quan_2.e2a4a006.png
  29. BIN
      production/static/img/quan_2.f9b21c6c.png
  30. BIN
      production/static/img/quan_3.4129de5c.png
  31. BIN
      production/static/img/quan_3.a2f9e32c.png
  32. 0 0
      production/static/img/remixicon.95138f36.2b2ee314.svg
  33. BIN
      production/static/img/title.80ea53ea.png
  34. BIN
      production/static/img/title.a606f2c1.png
  35. 0 5
      production/static/js/278.6dbd5588.js
  36. 1 1
      production/static/js/518.28ea52b5.js
  37. 5 0
      production/static/js/736.f5748816.js
  38. 4 0
      production/static/js/app.01c1a9a7.js
  39. 0 4
      production/static/js/app.561c1f03.js
  40. 5 0
      production/static/js/vab-chunk-1ce32aae.c5dbf28b.js
  41. 0 5
      production/static/js/vab-chunk-1ce32aae.dbf09c39.js
  42. 0 5
      production/static/js/vab-chunk-2e7a54de.45f386ba.js
  43. 5 0
      production/static/js/vab-chunk-2e7a54de.491baf30.js
  44. 5 0
      production/static/js/vab-chunk-55f36e6d.0a3d88ce.js
  45. 1 1
      production/static/js/vab-chunk-6656d312.ea190a9a.js
  46. 5 0
      production/static/js/vab-chunk-81b65d13.3407e38c.js
  47. 0 5
      production/static/js/vab-chunk-a45e3559.b643fdff.js
  48. 1 1
      production/static/js/vab-chunk-adaa8b5b.b362ab01.js
  49. 0 5
      production/static/js/vab-chunk-b74afb63.c4515f41.js
  50. 5 0
      production/static/js/vab-chunk-bffabe46.5f4ac7f2.js
  51. 1 1
      production/static/js/vab-chunk-c117d123.5daa2d3f.js
  52. 1 1
      production/static/js/vab-chunk-c2cf684f.58093568.js
  53. 1 1
      production/static/js/vab-chunk-c89ca3ff.ee174e41.js
  54. 1 1
      production/static/js/vab-chunk-e6508ca2.807b9446.js
  55. 1 1
      production/static/js/vab-chunk-fb9e1e3f.55b5d853.js
  56. 15 0
      production/static/js/vab-plugins.afe30dc8.js
  57. 0 5
      production/static/js/vab-plugins.d53e2ce8.js
  58. 3 3
      src/api/remixIcon.ts
  59. 8 1
      src/api/router.ts
  60. 3 3
      src/config/setting.config.js
  61. 2 4
      src/plugins/VabIconSelector/index.vue
  62. 1 1
      src/router/index.ts
  63. 12 0
      src/store/modules/user.ts
  64. 1 1
      src/views/Infomation/index.vue
  65. 5 5
      src/views/setting/menuManagement/api/index.ts
  66. 10 10
      src/views/setting/menuManagement/components/MenuManagementEdit.vue
  67. 7 8
      src/views/setting/menuManagement/index.vue
  68. 3 3
      src/views/setting/personalCenter/api/index.ts
  69. 27 18
      src/views/setting/personalCenter/index.vue
  70. 3 3
      src/views/setting/roleManagement/api/index.ts
  71. 27 29
      src/views/setting/roleManagement/components/DataPermission.vue
  72. 9 9
      src/views/setting/userManagement/api/index.ts
  73. 54 100
      src/views/setting/userManagement/components/UserManagementEdit.vue
  74. 3 3
      src/views/setting/userManagement/components/changePwd.vue
  75. 163 222
      src/views/setting/userManagement/index.vue
  76. 3 2
      types/store.d.ts

+ 0 - 1
library/build/vuePlugins/components.d.ts

@@ -37,7 +37,6 @@ declare module '@vue/runtime-core' {
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
     ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
-    ElLink: typeof import('element-plus/es')['ElLink']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']

+ 1 - 1
production/index.html

@@ -1,4 +1,4 @@
-<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta content="IE=edge" http-equiv="X-UA-Compatible"/><meta content="webkit" name="renderer"/><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><link href="favicon.ico" rel="icon"/><title>希梦耐康图片合成系统</title><meta content="希梦耐康图片合成系统" name="keywords"/><meta content="vue-admin-better" name="author"/><link href="static/css/loading.css?random=2023-06-30 16:54:44-zh-mead" rel="stylesheet"/><script defer="defer" src="static/js/518.a5432fa3.js"></script><script defer="defer" src="static/js/app.561c1f03.js"></script><link href="static/css/518.1bd44f1a.css" rel="stylesheet"><link href="static/css/app.1ddd8039.css" rel="stylesheet"><!--[if IE]><link rel="icon" type="image/svg+xml" href="img/icons/favicon.svg"><![endif]--><link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png"><link rel="manifest" href="manifest.json"><meta name="theme-color" content="#ffffff"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-title" content="admin-plus"><link rel="apple-touch-icon" href="img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#ffffff"><meta name="msapplication-TileImage" content="img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#ffffff"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>希梦耐康图片合成系统</h1></div></div><script>if (window.location.hostname !== 'localhost') {
+<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta content="IE=edge" http-equiv="X-UA-Compatible"/><meta content="webkit" name="renderer"/><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><link href="favicon.ico" rel="icon"/><title>希梦耐康图片合成系统</title><meta content="希梦耐康图片合成系统" name="keywords"/><meta content="vue-admin-better" name="author"/><link href="static/css/loading.css?random=2023-07-01 16:51:47-zh-mead" rel="stylesheet"/><script defer="defer" src="static/js/518.28ea52b5.js"></script><script defer="defer" src="static/js/app.01c1a9a7.js"></script><link href="static/css/518.2d17d5dc.css" rel="stylesheet"><link href="static/css/app.c0783d97.css" rel="stylesheet"><!--[if IE]><link rel="icon" type="image/svg+xml" href="img/icons/favicon.svg"><![endif]--><link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png"><link rel="manifest" href="manifest.json"><meta name="theme-color" content="#ffffff"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-title" content="admin-plus"><link rel="apple-touch-icon" href="img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#ffffff"><meta name="msapplication-TileImage" content="img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#ffffff"></head><body><noscript></noscript><div id="app"><div class="first-loading-wrp"><div class="loading-wrp"><span class="dot dot-spin"><i></i> <i></i> <i></i> <i></i></span></div><h1>希梦耐康图片合成系统</h1></div></div><script>if (window.location.hostname !== 'localhost') {
         var _hmt = _hmt || []
         ;(function () {
           var hm = document.createElement('script')

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
production/service-worker.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4
production/static/css/278.e2607209.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
production/static/css/518.2d17d5dc.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 0
production/static/css/736.64e84789.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/css/app.c0783d97.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4
production/static/css/vab-chunk-1ce32aae.3d1ba839.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 0
production/static/css/vab-chunk-81b65d13.70508ae3.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4
production/static/css/vab-chunk-b74afb63.94e31fd7.css


+ 0 - 5
production/static/css/vab-plugins.ba54e6d9.css

@@ -1,5 +0,0 @@
-/*!
- *  build: Vue  Admin Plus
- *  copyright: vue-admin-beautiful.com
- *  time: 2023-06-30 16:54:44
- */[data-v-31da6e6f]:export{menu-color:hsla(0,0%,100%,.95);menu-color-active:hsla(0,0%,100%,.95);menu-background:#282c34;column-second-menu-background:#fff;vab-border-radius:2.5px}.vab-avatar-list[data-v-31da6e6f] .el-avatar{display:inline-block;margin-left:-15px;cursor:pointer;border:3px solid var(--el-color-white)}[data-v-2bb793ca]:export{menu-color:hsla(0,0%,100%,.95);menu-color-active:hsla(0,0%,100%,.95);menu-background:#282c34;column-second-menu-background:#fff;vab-border-radius:2.5px}.echarts[data-v-2bb793ca]{width:30vw;height:46vh}.title_1[data-v-2bb793ca]{padding-left:10px;color:#fff}.button-list[data-v-2bb793ca]{position:absolute;top:0;right:0;z-index:9999;color:#fff;display:flex}.button-list .button-list-item[data-v-2bb793ca]{flex:1;padding:5px;font-size:.8em;background:rgba(28,49,116,.847);cursor:pointer}.button-list .active2[data-v-2bb793ca],.button-list .active[data-v-2bb793ca]{background-color:#409eff!important}[data-v-8fe822ae]:export{menu-color:hsla(0,0%,100%,.95);menu-color-active:hsla(0,0%,100%,.95);menu-background:#282c34;column-second-menu-background:#fff;vab-border-radius:2.5px}.vab-tree-border[data-v-8fe822ae]{width:100%;height:250px;padding:20px;overflow-y:auto;border:1px solid #dcdfe6;border-radius:2.5px}.title[data-v-8fe822ae]{font-size:16px;font-weight:550;padding:8px 0}.content[data-v-8fe822ae]{line-height:26px;margin-bottom:20px;padding:5px;background-color:#f7f7f7;border-radius:5px}.people[data-v-8fe822ae]{margin-bottom:20px}.content1[data-v-8fe822ae]{line-height:26px;padding:5px;background-color:#f7f7f7;border-radius:5px}.time[data-v-8fe822ae]{margin-left:5px}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 0
production/static/css/vab-plugins.c54cc8f9.css


BIN
production/static/img/403.0b4fa510.png


BIN
production/static/img/403.d6bd8853.png


BIN
production/static/img/404.0c0cb43f.png


BIN
production/static/img/404.f02775f8.png


BIN
production/static/img/background-1.31e3a0ac.png → production/static/img/background-1.3b338144.png


BIN
production/static/img/background.2f742bae.jpg → production/static/img/background.d7764eb5.jpg


BIN
production/static/img/bg.b21cb5d7.jpeg → production/static/img/bg.ac607731.jpeg


BIN
production/static/img/login.fde69779.jpg → production/static/img/login.7ae58ae2.jpg


BIN
production/static/img/login_form.242d2e10.png


BIN
production/static/img/login_form.be4a23a8.png


+ 0 - 0
production/static/img/login_left.13e22b6d.svg → production/static/img/login_left.17b387c3.svg


BIN
production/static/img/middle.36444c8c.png


BIN
production/static/img/middle.fef19e15.png


BIN
production/static/img/quan_1.afef6b34.png


BIN
production/static/img/quan_1.cb0f2575.png


BIN
production/static/img/quan_2.e2a4a006.png


BIN
production/static/img/quan_2.f9b21c6c.png


BIN
production/static/img/quan_3.4129de5c.png


BIN
production/static/img/quan_3.a2f9e32c.png


+ 0 - 0
production/static/img/remixicon.95138f36.e931095f.svg → production/static/img/remixicon.95138f36.2b2ee314.svg


BIN
production/static/img/title.80ea53ea.png


BIN
production/static/img/title.a606f2c1.png


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 5
production/static/js/278.6dbd5588.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/518.28ea52b5.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
production/static/js/736.f5748816.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 0
production/static/js/app.01c1a9a7.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4
production/static/js/app.561c1f03.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
production/static/js/vab-chunk-1ce32aae.c5dbf28b.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 5
production/static/js/vab-chunk-1ce32aae.dbf09c39.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 5
production/static/js/vab-chunk-2e7a54de.45f386ba.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
production/static/js/vab-chunk-2e7a54de.491baf30.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
production/static/js/vab-chunk-55f36e6d.0a3d88ce.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-6656d312.ea190a9a.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
production/static/js/vab-chunk-81b65d13.3407e38c.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 5
production/static/js/vab-chunk-a45e3559.b643fdff.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-adaa8b5b.b362ab01.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 5
production/static/js/vab-chunk-b74afb63.c4515f41.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
production/static/js/vab-chunk-bffabe46.5f4ac7f2.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-c117d123.5daa2d3f.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-c2cf684f.58093568.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-c89ca3ff.ee174e41.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-e6508ca2.807b9446.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
production/static/js/vab-chunk-fb9e1e3f.55b5d853.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 15 - 0
production/static/js/vab-plugins.afe30dc8.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 5
production/static/js/vab-plugins.d53e2ce8.js


+ 3 - 3
src/api/remixIcon.ts

@@ -2,14 +2,14 @@
  * @FilePath: remixIcon.ts
  * @Author: 旭颖
  * @Date: 2022-10-31 14:56:49
- * @LastEditors:
- * @LastEditTime: 2022-12-02 15:47:38
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-07-01 16:49:00
  */
 import request from '@/utils/request'
 
 export function getIconList(params: any) {
   return request({
-    url: '/base/menu/icons',
+    url: '/sys/menu/icon',
     method: 'get',
     params,
   })

+ 8 - 1
src/api/router.ts

@@ -1,8 +1,15 @@
+/*
+ * @FilePath: router.ts
+ * @Author: 旭颖
+ * @Date: 2023-06-21 09:37:29
+ * @LastEditors: 
+ * @LastEditTime: 2023-07-01 14:04:28
+ */
 import request from '@/utils/request'
 
 export function getList() {
   return request({
-    url: '/base/menu/my-menus',
+    url: '/sys/my-menus',
     method: 'get',
   })
 }

+ 3 - 3
src/config/setting.config.js

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2022-10-31 14:56:49
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-06-21 15:32:05
+ * @LastEditTime: 2023-07-01 15:32:56
  */
 /**
  * @description 导出通用配置
@@ -60,13 +60,13 @@ module.exports = {
   // 是否开启登录RSA加密
   loginRSA: false,
   // intelligence(前端导出路由)和 all(后端导出路由)两种方式
-  authentication: 'intelligence',
+  authentication: 'all',
   // 是否支持游客模式,支持情况下,访问白名单,可查看所有asyncRoutes
   supportVisit: false,
   // 是否开启roles字段进行角色权限控制(如果是all模式后端完全处理角色并进行json组装,可设置false不处理路由中的roles字段)
   rolesControl: true,
   // vertical column comprehensive common布局时是否只保持一个子菜单的展开
-  uniqueOpened: true,
+  uniqueOpened: false,
   // vertical column comprehensive common布局时默认展开的菜单path,使用逗号隔开建议只展开一个,true全部展开,false/[]不展开
   defaultOpeneds: [
     '/vab',

+ 2 - 4
src/plugins/VabIconSelector/index.vue

@@ -10,9 +10,7 @@
     selectRows: '',
     queryIcon: [],
     queryForm: {
-      pageNo: 1,
-      pageSize: 16,
-      title: '',
+      keyword: '',
     },
   })
 
@@ -52,7 +50,7 @@
           <vab-query-form-top-panel>
             <el-form inline label-width="0" @submit.prevent>
               <el-form-item label="">
-                <el-input v-model="state.queryForm.title" />
+                <el-input v-model="state.queryForm.keyword" />
               </el-form-item>
               <el-form-item label-width="0">
                 <el-button

+ 1 - 1
src/router/index.ts

@@ -467,7 +467,7 @@ export const asyncRoutes: VabRouteRecord[] = [
         meta: {
           title: '修改密码',
           icon: 'map-pin-user-line',
-          // hidden: true,
+          hidden: true,
         },
       },
     ],

+ 12 - 0
src/store/modules/user.ts

@@ -18,6 +18,7 @@ export const useUserStore = defineStore('user', {
     token: getToken() as string,
     username: '游客',
     avatar: 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif',
+    id: '', //用户id
     department: '',
   }),
   getters: {
@@ -25,6 +26,7 @@ export const useUserStore = defineStore('user', {
     getUsername: (state) => state.username,
     getAvatar: (state) => state.avatar,
     getDepartment: (state) => state.department,
+    getId: (state) => state.id,
   },
   actions: {
     /**
@@ -52,6 +54,9 @@ export const useUserStore = defineStore('user', {
     setDepartment(department: string) {
       this.department = department
     },
+    setId(id: string) {
+      this.id = id
+    },
     /**
      * @description 登录拦截放行时,设置虚拟角色
      */
@@ -61,6 +66,8 @@ export const useUserStore = defineStore('user', {
       this.setUsername('admin(未开启登录拦截)')
       this.setAvatar('https://i.gtimg.cn/club/item/face/img/2/15922_100.gif')
       this.setDepartment('')
+      this.setId('')
+
     },
     /**
      * @description 设置token并发送提醒
@@ -122,6 +129,7 @@ export const useUserStore = defineStore('user', {
       const avatar = ''
       const roles = ''
       const permissions = ''
+      const id =data.id
       console.log(data, '----')
       /**
        * 检验返回数据是否正常,无对应参数,将使用默认用户名,头像,Roles和Permissions
@@ -143,6 +151,8 @@ export const useUserStore = defineStore('user', {
         const aclStore = useAclStore()
         // 如不使用username用户名,可删除以下代码
         if (username) this.setUsername(username)
+        if (id) this.setId(id)
+
         // // 如不使用avatar头像,可删除以下代码
         // if (avatar) this.setAvatar(avatar)
         // // 如不使用roles权限控制,可删除以下代码
@@ -170,6 +180,8 @@ export const useUserStore = defineStore('user', {
       this.setUsername('游客')
       this.setAvatar('https://i.gtimg.cn/club/item/face/img/2/15922_100.gif')
       this.setDepartment('')
+      this.setId('')
+
 
       const aclStore = useAclStore()
       const routesStore = useRoutesStore()

+ 1 - 1
src/views/Infomation/index.vue

@@ -249,7 +249,7 @@
         total: 10,
         queryForm: {
           page: 1,
-          limit: 10,
+          limit: 15,
         },
         statusList: [
           {

+ 5 - 5
src/views/setting/menuManagement/api/index.ts

@@ -3,14 +3,14 @@
  * @Author: 旭颖
  * @Date: 2022-12-01 15:23:44
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-12-02 16:55:47
+ * @LastEditTime: 2023-07-01 10:09:26
  */
 import request from '@/utils/request'
 
 //列表
 export function getList(params: any) {
   return request({
-    url: '/base/menus',
+    url: '/sys/menu/tree',
     method: 'get',
     params,
   })
@@ -19,7 +19,7 @@ export function getList(params: any) {
 //添加
 export function doAdd(data: any) {
   return request({
-    url: '/base/menu',
+    url: '/sys/menu/add',
     method: 'post',
     data,
   })
@@ -27,7 +27,7 @@ export function doAdd(data: any) {
 //编辑
 export function doEdit(data: any) {
   return request({
-    url: '/base/menu',
+    url: '/sys/menu/edit',
     method: 'put',
     data,
   })
@@ -36,7 +36,7 @@ export function doEdit(data: any) {
 //删除
 export function doDelete(params: any) {
   return request({
-    url: '/base/menu',
+    url: '/sys/menu/delete',
     method: 'delete',
     params,
   })

+ 10 - 10
src/views/setting/menuManagement/components/MenuManagementEdit.vue

@@ -107,7 +107,7 @@
 
 <script>
   import VabIconSelector from '@/plugins/VabIconSelector'
-  import { handleTree } from '@/utils/publicMethods' //将列表转坏为树形
+  // import { handleTree } from '@/utils/publicMethods' //将列表转坏为树形
   import { nextTick } from 'vue'
   import { doEdit, getList, doAdd } from '../api/index'
 
@@ -171,9 +171,7 @@
       //菜单列表
       const fetchData = async () => {
         state.listLoading = true
-        const {
-          data: { data },
-        } = await getList(state.queryForm)
+        const { data } = await getList(state.queryForm)
         //部门列表编辑回填处理
         if (state.form.id) {
           if (state.form.parent_id === 0) {
@@ -186,8 +184,8 @@
             })
           }
         }
-        const arr = handleTree(data, 'id', 'parent_id')
-        state.treeData = [{ id: 0, title: '顶级菜单' }].concat(arr)
+        // const arr = handleTree(data, 'id', 'parent_id')
+        state.treeData = [{ id: 0, title: '顶级菜单' }].concat(data)
         state.listLoading = false
       }
       //点击选择上级菜单
@@ -243,17 +241,19 @@
         state['formRef'].validate(async (valid) => {
           state.form.meta.title = state.form.title
           if (valid) {
+            state.form.meta = JSON.stringify(state.form.meta)
             //删除表单提交多余字段
             delete state.form.children
             delete state.form.parentName
+            state.form.parentId = state.form.parent_id
             if (state.form.id) {
-              const { message } = await doEdit(state.form)
-              $baseMessage(message, 'success', 'vab-hey-message-success')
+              const { msg } = await doEdit(state.form)
+              $baseMessage(msg, 'success', 'vab-hey-message-success')
               emit('fetch-data')
               close()
             } else {
-              const { message } = await doAdd(state.form)
-              $baseMessage(message, 'success', 'vab-hey-message-success')
+              const { msg } = await doAdd(state.form)
+              $baseMessage(msg, 'success', 'vab-hey-message-success')
               emit('fetch-data')
               close()
             }

+ 7 - 8
src/views/setting/menuManagement/index.vue

@@ -112,7 +112,7 @@
 </template>
 
 <script>
-  import { handleTree } from '@/utils/publicMethods' //将列表转坏为树形
+  // import { handleTree } from '@/utils/publicMethods' //将列表转坏为树形
   import { nextTick } from 'vue'
   import { doDelete, getList } from './api/index'
   import { Plus, Sort, Search, Refresh } from '@element-plus/icons-vue'
@@ -127,7 +127,6 @@
     setup() {
       const $baseConfirm = inject('$baseConfirm')
       const $baseMessage = inject('$baseMessage')
-
       const state = reactive({
         editRef: null,
         dataTreeList: null,
@@ -163,8 +162,8 @@
       }
       const handleDelete = (row) => {
         $baseConfirm('你确定要删除当前菜单吗', null, async () => {
-          const { message } = await doDelete({ id: row.id })
-          $baseMessage(message, 'success', 'vab-hey-message-success')
+          const { msg } = await doDelete({ id: row.id })
+          $baseMessage(msg, 'success', 'vab-hey-message-success')
           await fetchData()
         })
       }
@@ -183,10 +182,10 @@
       }
       const fetchData = async () => {
         state.listLoading = true
-        const {
-          data: { data },
-        } = await getList(state.queryForm)
-        state.list = handleTree(data, 'id', 'parent_id')
+        const { data } = await getList(state.queryForm)
+        console.log(data, '树形')
+        // state.list = handleTree(data, 'id', 'parent_id')
+        state.list = data
         state.listLoading = false
       }
       //排序方法

+ 3 - 3
src/views/setting/personalCenter/api/index.ts

@@ -2,8 +2,8 @@
  * @FilePath: index.ts
  * @Author: 旭颖
  * @Date: 2023-06-30 17:57:15
- * @LastEditors: 
- * @LastEditTime: 2023-06-30 18:12:10
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2023-07-01 15:16:53
  */
 import request from '@/utils/request'
 
@@ -11,7 +11,7 @@ import request from '@/utils/request'
 export function ChangePwd(data: any) {
   return request({
     url: '/sys/user/pwd',
-    method: 'post',
+    method: 'put',
     data,
   })
 }

+ 27 - 18
src/views/setting/personalCenter/index.vue

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2023-06-21 09:37:30
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-06-30 18:17:24
+ * @LastEditTime: 2023-07-01 16:21:14
 -->
 <template>
   <div>
@@ -22,11 +22,19 @@
             placeholder="请输入岗位编码"
           />
         </el-form-item>
-        <el-form-item label="原密码" prop="oldPwd">
-          <el-input v-model.tirm="form.oldPwd" placeholder="请输入原密码" />
+        <el-form-item label="新密码" prop="password">
+          <el-input
+            v-model.tirm="form.password"
+            password
+            placeholder="请输入新密码"
+          />
         </el-form-item>
-        <el-form-item label="新密码" prop="oldPwd">
-          <el-input v-model.tirm="form.newPwd" placeholder="请输入新密码" />
+        <el-form-item label="确认密码" prop="surePassword">
+          <el-input
+            v-model.tirm="form.surePassword"
+            password
+            placeholder="请输入确认密码"
+          />
         </el-form-item>
         <el-form-item>
           <el-button @click="close">取 消</el-button>
@@ -47,36 +55,35 @@
     setup() {
       const $baseMessage = inject('$baseMessage')
       const state = reactive({
-        editRef: null,
-        form: { username: '', oldPwd: '', newPwd: '' },
+        formRef: null,
+        form: { id: '', password: '', surePassword: '', username: '' },
         username: '', //用户名
         rules: {
-          oldPwd: [
-            { required: true, trigger: 'blur', message: '请输入密码' },
+          password: [
+            { required: true, trigger: 'blur', message: '请输入密码' },
           ],
-          newPwd: [
-            { required: true, trigger: 'blur', message: '请输入密码' },
+          surePassword: [
+            { required: true, trigger: 'blur', message: '请输入确认密码' },
           ],
         },
       })
       const close = () => {
-        state.form.oldPwd = ''
-        state.form.newPwd = ''
+        state.form.password = ''
+        state.form.surePassword = ''
       }
       const saveSbmit = () => {
         state['formRef'].validate(async (valid) => {
           if (valid) {
-            if (state.form.oldPwd == state.form.newPwd) {
+            if (state.form.password !== state.form.surePassword) {
               $baseMessage(
-                '您输入新密码和旧密码相同请更换!',
+                '您两次输入的密码不相同请确认!',
                 'error',
                 'vab-hey-message-error'
               )
               return
             }
-            const { message } = await ChangePwd(state.form)
-            $baseMessage(message, 'success', 'vab-hey-message-success')
-            emit('fetch-data')
+            const { msg } = await ChangePwd(state.form)
+            $baseMessage(msg, 'success', 'vab-hey-message-success')
             close()
           }
         })
@@ -84,6 +91,8 @@
       onMounted(() => {
         const userStore = useUserStore()
         state.form.username = userStore.username
+        console.log(userStore, 'userStore')
+        state.form.id = userStore.id
       })
       return {
         ...toRefs(state),

+ 3 - 3
src/views/setting/roleManagement/api/index.ts

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2022-12-01 15:23:44
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-12-05 17:34:28
+ * @LastEditTime: 2023-07-01 13:53:03
  */
 import request from '@/utils/request'
 
@@ -59,7 +59,7 @@ export function getApiList(params: any) {
 //获取当前角色permissions
 export function getRolePermissions(params: any) {
   return request({
-    url: '/base/role/permissions',
+    url: '/sys/role',
     method: 'get',
     params,
   })
@@ -68,7 +68,7 @@ export function getRolePermissions(params: any) {
 
 export function doAddMenuAuth(data: any) {
   return request({
-    url: '/base/role/save-menus',
+    url: '/sys/role/permission',
     method: 'post',
     data,
   })

+ 27 - 29
src/views/setting/roleManagement/components/DataPermission.vue

@@ -232,8 +232,8 @@
 
       const showEdit = async (row) => {
         await getMenu()
-        await getApi()
-        await getDepartment()
+        // await getApi()
+        // await getDepartment()
         await rolePermissions(row.id)
         state.role_id = row.id
         state.dialogFormVisible = true
@@ -251,10 +251,8 @@
       //菜单列表
       const getMenu = async () => {
         state.menuLoading = true
-        const {
-          data: { data },
-        } = await getMenuList()
-        state.menuList = handleTree(data, 'id', 'parent_id')
+        const { data } = await getMenuList()
+        state.menuList = data
         state.menuLoading = false
       }
       //api列表数据
@@ -305,26 +303,26 @@
       }
       //获取当前角色permissions
       const rolePermissions = async (id) => {
-        const data = await getRolePermissions({ id: id })
-        state.menuChecked = data.data.menus
-        state.apiChecked = data.data.apis
-        state.departmenChecked = data.data.data.departments
-          ? data.data.data.departments
-          : []
-        state.data_permission_type = data.data.data.type
+        const { data } = await getRolePermissions({ id: id })
+        state.menuChecked = data.permissions
+        // state.apiChecked = data.data.apis
+        // state.departmenChecked = data.data.data.departments
+        //   ? data.data.data.departments
+        //   : []
+        // state.data_permission_type = data.data.data.type
         setTimeout(() => {
           nextTick(() => {
             state['treeRef'].setCheckedKeys(state.menuChecked, true, false)
-            if (data.data.apis.length > 0) {
-              state['treeRefApi'].setCheckedKeys(state.apiChecked, true, false)
-            }
-            if (state.departmenChecked.length > 0) {
-              state['treeRefDepartment'].setCheckedKeys(
-                state.departmenChecked,
-                true,
-                false
-              )
-            }
+            // if (data.data.apis.length > 0) {
+            //   state['treeRefApi'].setCheckedKeys(state.apiChecked, true, false)
+            // }
+            // if (state.departmenChecked.length > 0) {
+            //   state['treeRefDepartment'].setCheckedKeys(
+            //     state.departmenChecked,
+            //     true,
+            //     false
+            //   )
+            // }
           })
         }, 500)
       }
@@ -348,11 +346,11 @@
           return
         }
         const data = {
-          id: state.role_id,
-          menus: arr,
+          roleId: state.role_id,
+          permissionIds: arr,
         }
-        const { message } = await doAddMenuAuth(data)
-        $baseMessage(message, 'success', 'vab-hey-message-success')
+        const { msg } = await doAddMenuAuth(data)
+        $baseMessage(msg, 'success', 'vab-hey-message-success')
         emit('fetch-data')
         close()
       }
@@ -373,8 +371,8 @@
           shops: [],
           factory: [],
         }
-        const { message } = await doAddDataAuth(data)
-        $baseMessage(message, 'success', 'vab-hey-message-success')
+        const { msg } = await doAddDataAuth(data)
+        $baseMessage(msg, 'success', 'vab-hey-message-success')
         emit('fetch-data')
         close()
       }

+ 9 - 9
src/views/setting/userManagement/api/index.ts

@@ -3,13 +3,13 @@
  * @Author: 旭颖
  * @Date: 2022-11-25 15:56:40
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-12-05 15:57:58
+ * @LastEditTime: 2023-07-01 15:16:45
  */
 import request from '@/utils/request'
 
 export function getList(params: any) {
   return request({
-    url: '/base/admins',
+    url: '/sys/users',
     method: 'get',
     params,
   })
@@ -17,7 +17,7 @@ export function getList(params: any) {
 //添加
 export function doAdd(data: any) {
   return request({
-    url: '/base/admin',
+    url: '/sys/user',
     method: 'post',
     data,
   })
@@ -25,7 +25,7 @@ export function doAdd(data: any) {
 //编辑
 export function doEdit(data: any) {
   return request({
-    url: '/base/admin',
+    url: '/sys/user',
     method: 'put',
     data,
   })
@@ -33,8 +33,8 @@ export function doEdit(data: any) {
 //删除
 export function doDelete(data: any) {
   return request({
-    url: '/base/admin/batch-delete',
-    method: 'post',
+    url: '/sys/user',
+    method: 'delete',
     data,
   })
 }
@@ -49,8 +49,8 @@ export function getAdminDetail(params: any) {
 //修改密码
 export function changeAdminPwd(data: any) {
   return request({
-    url: '/base/admin/reset-password',
-    method: 'post',
+    url: '/sys/user/pwd',
+    method: 'put',
     data,
   })
 }
@@ -65,7 +65,7 @@ export function getJobList(params: any) {
 //角色列表
 export function geRoleList(params: any) {
   return request({
-    url: '/base/role/select-options',
+    url: '/sys/roles',
     method: 'get',
     params,
   })

+ 54 - 100
src/views/setting/userManagement/components/UserManagementEdit.vue

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2022-10-31 14:56:49
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-04-24 15:59:22
+ * @LastEditTime: 2023-07-01 14:35:27
 -->
 <template>
   <el-drawer
@@ -17,8 +17,8 @@
       <el-form-item label="账号" prop="username">
         <el-input v-model.trim="form.username" placeholder="请输入账号" />
       </el-form-item>
-      <el-form-item label="姓名" prop="name">
-        <el-input v-model.trim="form.name" placeholder="请输入姓名" />
+      <el-form-item label="用户名" prop="nickName">
+        <el-input v-model.trim="form.nickName" placeholder="请输入用户名" />
       </el-form-item>
       <el-form-item label="性别" prop="sex">
         <el-radio-group v-model="form.sex" class="ml-4">
@@ -26,13 +26,13 @@
           <el-radio :label="2">女</el-radio>
         </el-radio-group>
       </el-form-item>
-      <el-form-item label="手机号" prop="mobile">
-        <el-input v-model.trim="form.mobile" placeholder="请输入手机号" />
+      <el-form-item label="手机号" prop="phone">
+        <el-input v-model.trim="form.phone" placeholder="请输入手机号" />
       </el-form-item>
       <el-form-item label="邮箱">
         <el-input v-model.trim="form.email" placeholder="请输入邮箱" />
       </el-form-item>
-      <el-form-item label="部门" prop="department_id">
+      <!-- <el-form-item label="部门" prop="department_id">
         <el-select
           ref="departmentSelect"
           v-model="form.department_id"
@@ -70,11 +70,11 @@
             :value="item.id"
           />
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
 
-      <el-form-item label="角色" prop="role_ids">
+      <el-form-item label="角色" prop="roleIds">
         <el-select
-          v-model="form.role_ids"
+          v-model="form.roleIds"
           multiple
           :multiple-limit="1"
           placeholder="请选择角色"
@@ -83,7 +83,7 @@
           <el-option
             v-for="item in roleList"
             :key="item.id"
-            :label="item.nickname"
+            :label="item.name"
             :value="item.id"
           />
         </el-select>
@@ -95,7 +95,7 @@
           type="password"
         />
       </el-form-item>
-      <el-form-item
+      <!-- <el-form-item
         v-if="title == '添加'"
         label="确认密码"
         prop="password_confirmation"
@@ -105,26 +105,6 @@
           placeholder="请输入确认密码"
           type="password"
         />
-      </el-form-item>
-      <!-- <el-form-item label="是否查看用户隐私" prop="is_view_user_info">
-        <el-radio-group v-model="form.is_view_user_info" class="ml-4">
-          <el-radio :label="0">关闭</el-radio>
-          <el-radio :label="1">开启</el-radio>
-        </el-radio-group>
-      </el-form-item> -->
-      <!-- <el-form-item label="归属公司" prop="company_id">
-        <el-select
-          v-model="form.company_id"
-          placeholder="请选择归属公司"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="item in gongsiList"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id"
-          />
-        </el-select>
       </el-form-item> -->
       <el-form-item label="状态" prop="status">
         <el-radio-group v-model="form.status" class="ml-4">
@@ -168,46 +148,39 @@
         },
         departmentName: '',
         form: {
-          role_ids: [],
-          password_confirmation: '',
-          password: '',
           username: '',
-          name: '',
+          password: '',
+          nickName: '',
+          sex: 1,
+          phone: '',
           email: '',
-          mobile: '',
           status: 1,
-          sex: 1,
-          job_id: '',
-          department_id: '',
-          departmentName: '',
-          is_view_user_info: 0,
+          roleIds: [],
         },
         rules: {
           username: [
             { required: true, trigger: 'blur', message: '请输入账号' },
           ],
-          name: [{ required: true, trigger: 'blur', message: '请输入姓名' }],
+          nickName: [
+            { required: true, trigger: 'blur', message: '请输入姓名' },
+          ],
           password: [
             { required: true, trigger: 'blur', message: '请输入密码' },
           ],
           department_id: [
             { required: true, trigger: 'blur', message: '请选择部门' },
           ],
-          password_confirmation: [
-            { required: true, trigger: 'blur', message: '请输入确认密码' },
-          ],
+          // password_confirmation: [
+          //   { required: true, trigger: 'blur', message: '请输入确认密码' },
+          // ],
           // email: [{ required: true, trigger: 'blur', message: '请输入邮箱' }],
-          mobile: [
-            { required: true, trigger: 'blur', message: '请输入手机号' },
-          ],
+          phone: [{ required: true, trigger: 'blur', message: '请输入手机号' }],
           roles: [{ required: true, trigger: 'blur', message: '请选择角色' }],
           status: [
             { required: true, trigger: 'change', message: '请选择状态' },
           ],
           // job_id: [{ required: true, trigger: 'blur', message: '请选择岗位' }],
-          role_ids: [
-            { required: true, trigger: 'blur', message: '请选择角色' },
-          ],
+          roleIds: [{ required: true, trigger: 'blur', message: '请选择角色' }],
           company_id: [
             { required: true, trigger: 'blur', message: '请选择归属公司' },
           ],
@@ -225,52 +198,39 @@
       })
 
       const showEdit = async (row) => {
-        await getJob()
+        // await getJob()
         await getRole()
-        await getDepartment()
+        // await getDepartment()
         if (!row) {
           state.title = '添加'
         } else {
           state.title = '编辑'
-          // getDetail(row.id)
-          // state.form = JSON.parse(JSON.stringify(row))
-          const arr = []
-          row.roles.map((item) => {
-            arr.push(item.id)
-          })
-          state.form.role_ids = arr
-          state.form.job_id = row.job ? (row.job.id ? row.job.id : '') : ''
-          state.form.department_id = row.department ? row.department.id : 0
-          state.departmentName = row.department ? row.department.name : ''
-          state.form.name = row.name
-          state.form.username = row.username
-          state.form.email = row.email
-          state.form.mobile = row.mobile
-          state.form.sex = row.sex
-          state.form.status = row.status
-          state.form.id = row.id
-          state.form.is_view_user_info = row.is_view_user_info
-          state.form.company_id = row.company.id
+          const data = Object.assign({}, row)
+
+          state.form = {
+            username: data.username,
+            nickName: data.nickName,
+            sex: data.sex,
+            phone: data.phone,
+            email: data.email,
+            status: data.status,
+            roleIds: data.roleIds,
+            id: data.id,
+          }
         }
-        const { data } = await getDepartmentList({ type: 1 })
-        state.gongsiList = data
         state.dialogFormVisible = true
       }
-
       const close = () => {
         state['formRef'].resetFields()
         state.form = {
-          role_ids: [],
-          password_confirmation: '',
+          roleIds: [],
           password: '',
           username: '',
-          name: '',
+          nickName: '',
           email: '',
-          mobile: '',
+          phone: '',
           status: 1,
-          job_id: '',
           sex: 1,
-          department_id: '',
         }
         state.dialogFormVisible = false
       }
@@ -282,7 +242,7 @@
           const pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])')
 
           if (valid) {
-            if (!myreg.test(state.form.mobile)) {
+            if (!myreg.test(state.form.phone)) {
               const message = '您输入的手机号格式错误!'
               $baseMessage(message, 'error', false, 'vab-hey-message-error')
               return
@@ -292,14 +252,9 @@
               $baseMessage(message, 'error', false, 'vab-hey-message-error')
               return
             }
-
-            // delete state.form.departmentName
-            if (!state.form.job_id) {
-              state.form.job_id = 0
-            }
             if (state.form.id) {
-              const { message } = await doEdit(state.form)
-              $baseMessage(message, 'success', 'vab-hey-message-success')
+              const { msg } = await doEdit(state.form)
+              $baseMessage(msg, 'success', 'vab-hey-message-success')
               emit('fetch-data')
               close()
             } else {
@@ -308,13 +263,13 @@
                 $baseMessage(message, 'error', false, 'vab-hey-message-error')
                 return
               }
-              if (state.form.password_confirmation !== state.form.password) {
-                const message = '两次输入的密码不一致'
-                $baseMessage(message, 'error', false, 'vab-hey-message-error')
-                return
-              }
-              const { message } = await doAdd(state.form)
-              $baseMessage(message, 'success', 'vab-hey-message-success')
+              // if (state.form.password_confirmation !== state.form.password) {
+              //   const message = '两次输入的密码不一致'
+              //   $baseMessage(message, 'error', false, 'vab-hey-message-error')
+              //   return
+              // }
+              const { msg } = await doAdd(state.form)
+              $baseMessage(msg, 'success', 'vab-hey-message-success')
               emit('fetch-data')
               close()
             }
@@ -336,12 +291,11 @@
       const getRole = async () => {
         const { data } = await geRoleList({
           status: 1,
-          sortedBy: 'desc',
-          orderBy: 'sort',
-          filter: 'id;nickname;sort;status',
+          limit: 50,
+          page: 1,
         })
 
-        state.roleList = data
+        state.roleList = data.records
       }
 
       //部门列表

+ 3 - 3
src/views/setting/userManagement/components/changePwd.vue

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2022-12-05 15:14:27
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-12-05 15:59:35
+ * @LastEditTime: 2023-07-01 16:23:08
 -->
 <template>
   <el-dialog
@@ -65,8 +65,8 @@
       const save = () => {
         state['formRef'].validate(async (valid) => {
           if (valid) {
-            const { message } = await changeAdminPwd(state.form)
-            $baseMessage(message, 'success', 'vab-hey-message-success')
+            const { msg } = await changeAdminPwd(state.form)
+            $baseMessage(msg, 'success', 'vab-hey-message-success')
             emit('fetch-data')
             close()
           }

+ 163 - 222
src/views/setting/userManagement/index.vue

@@ -1,215 +1,162 @@
 <template>
   <div>
-    <el-row :gutter="20">
-      <el-col :lg="6" :md="8" :sm="24" :xl="4" :xs="24">
-        <vab-card shadow="hover">
-          <el-tree
-            ref="departmentTree"
-            :data="department_list"
-            default-expand-all
-            highlight-current
-            node-key="id"
-            :props="defaultProps"
-            style="min-height: 80vh"
-            @node-click="handleNodeClick"
+    <div class="global-search">
+      <el-form inline :model="queryForm" @submit.prevent>
+        <el-form-item label="账号:">
+          <el-input
+            v-model.trim="queryForm.username"
+            clearable
+            placeholder="请输入账号"
           />
-        </vab-card>
-      </el-col>
-      <el-col :lg="18" :md="16" :sm="24" :xl="20" :xs="24">
-        <div class="global-search">
-          <el-form inline :model="queryForm" @submit.prevent>
-            <el-form-item label="账号:">
-              <el-input
-                v-model.trim="queryForm.username"
-                clearable
-                placeholder="请输入账号"
-              />
-            </el-form-item>
-            <el-form-item label="用户名:">
-              <el-input
-                v-model.trim="queryForm.name"
-                clearable
-                placeholder="请输入用户名"
-              />
-            </el-form-item>
-            <el-form-item label="手机号:">
-              <el-input
-                v-model.trim="queryForm.mobile"
-                clearable
-                placeholder="请输入手机号"
-              />
-            </el-form-item>
-            <el-form-item label="状态:">
-              <el-select
-                v-model="queryForm.status"
-                class="m-2"
-                clearable
-                placeholder="请选择岗位状态"
-              >
-                <el-option
-                  v-for="item in statusList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
-              </el-select>
-            </el-form-item>
+        </el-form-item>
+        <el-form-item label="用户名:">
+          <el-input
+            v-model.trim="queryForm.nickName"
+            clearable
+            placeholder="请输入用户名"
+          />
+        </el-form-item>
+        <el-form-item label="手机号:">
+          <el-input
+            v-model.trim="queryForm.phone"
+            clearable
+            placeholder="请输入手机号"
+          />
+        </el-form-item>
 
-            <el-form-item>
-              <el-button :icon="Search" type="primary" @click="queryData">
-                查询
-              </el-button>
-              <el-button :icon="Refresh" type="primary" @click="resetData">
-                重置
-              </el-button>
-            </el-form-item>
-          </el-form>
-        </div>
-        <div class="page-container">
-          <vab-query-form>
-            <vab-query-form-left-panel :span="24">
-              <el-button
-                :icon="Plus"
-                type="primary"
-                @click="handleEdit($event)"
-              >
-                添加
-              </el-button>
-              <el-button
-                :icon="Delete"
-                type="danger"
-                @click="handleDelete($event)"
-              >
-                批量删除
-              </el-button>
-            </vab-query-form-left-panel>
-          </vab-query-form>
+        <el-form-item>
+          <el-button :icon="Search" type="primary" @click="queryData">
+            查询
+          </el-button>
+          <el-button :icon="Refresh" type="primary" @click="resetData">
+            重置
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="page-container">
+      <vab-query-form>
+        <vab-query-form-left-panel :span="24">
+          <el-button :icon="Plus" type="primary" @click="handleEdit($event)">
+            添加
+          </el-button>
+          <el-button :icon="Delete" type="danger" @click="handleDelete($event)">
+            批量删除
+          </el-button>
+        </vab-query-form-left-panel>
+      </vab-query-form>
 
-          <el-table
-            v-loading="listLoading"
-            border
-            :data="list"
-            @selection-change="setSelectRows"
-            @sort-change="onSortChange"
-          >
-            <el-table-column
-              align="center"
-              show-overflow-tooltip
-              type="selection"
-            />
-            <el-table-column align="center" label="序号" width="55">
-              <template #default="{ $index }">
-                {{ $index + 1 }}
-              </template>
-            </el-table-column>
+      <el-table
+        v-loading="listLoading"
+        border
+        :data="list"
+        @selection-change="setSelectRows"
+        @sort-change="onSortChange"
+      >
+        <el-table-column
+          align="center"
+          show-overflow-tooltip
+          type="selection"
+        />
+        <el-table-column align="center" label="序号" width="55">
+          <template #default="{ $index }">
+            {{ $index + 1 }}
+          </template>
+        </el-table-column>
 
-            <el-table-column
-              align="center"
-              label="账号"
-              min-width="120"
-              prop="username"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="center"
-              label="用户名"
-              min-width="120"
-              prop="name"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="center"
-              :formatter="(row) => row.email || '--'"
-              label="邮箱"
-              min-width="150"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="center"
-              label="手机号"
-              min-width="120"
-              prop="mobile"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="center"
-              label="角色"
-              min-width="180"
-              show-overflow-tooltip
-            >
-              <template #default="{ row }">
-                <el-tag v-for="(item, index) in row.roles" :key="index">
-                  {{ item.nickname }}
-                </el-tag>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="状态" min-width="80">
-              <template #default="{ row }">
-                <el-tag v-if="row.status == 1">正常</el-tag>
-                <el-tag v-else type="danger">禁用</el-tag>
-              </template>
-            </el-table-column>
+        <el-table-column
+          align="center"
+          label="账号"
+          min-width="120"
+          prop="username"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="center"
+          label="用户名"
+          min-width="120"
+          prop="nickName"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="center"
+          :formatter="(row) => row.email || '--'"
+          label="邮箱"
+          min-width="150"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="center"
+          label="手机号"
+          min-width="120"
+          prop="phone"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="center"
+          label="角色"
+          min-width="180"
+          show-overflow-tooltip
+        >
+          <template #default="{ row }">
+            <el-tag v-for="(item, index) in row.roles" :key="index">
+              {{ item }}
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="状态" min-width="80">
+          <template #default="{ row }">
+            <el-tag v-if="row.status == 1">正常</el-tag>
+            <el-tag v-else type="danger">禁用</el-tag>
+          </template>
+        </el-table-column>
 
-            <el-table-column
-              align="center"
-              label="创建时间"
-              min-width="130"
-              prop="created_at"
-              show-overflow-tooltip
-              :sort-orders="['ascending', 'descending']"
-              sortable="custom"
-            />
-            <el-table-column
-              align="center"
-              label="归属公司"
-              min-width="180"
-              show-overflow-tooltip
-            >
-              <template #default="{ row }">
-                <div>{{ row.company.name }}</div>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              fixed="right"
-              label="操作"
-              show-overflow-tooltip
-              width="280"
-            >
-              <template #default="{ row }">
-                <el-button text type="primary" @click="handleDetail(row)">
-                  详情
-                </el-button>
-                <el-button text type="primary" @click="handleEdit(row)">
-                  编辑
-                </el-button>
-                <el-button text type="primary" @click="handleDelete(row)">
-                  删除
-                </el-button>
-                <el-button text type="primary" @click="handelResetPwd(row)">
-                  重置密码
-                </el-button>
-              </template>
-            </el-table-column>
-            <template #empty>
-              <el-empty class="vab-data-empty" description="暂无数据" />
-            </template>
-          </el-table>
-          <el-pagination
-            background
-            :current-page="queryForm.page"
-            :layout="layout"
-            :page-size="queryForm.per_page"
-            :total="total"
-            @current-change="handleCurrentChange"
-            @size-change="handleSizeChange"
-          />
-          <edit ref="editRef" @fetch-data="fetchData" />
-          <changePwd ref="changpwd" @fetch-data="fetchData" />
-          <Detail ref="details" />
-        </div>
-      </el-col>
-    </el-row>
+        <el-table-column
+          align="center"
+          label="创建时间"
+          min-width="130"
+          prop="createTime"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="center"
+          fixed="right"
+          label="操作"
+          show-overflow-tooltip
+          width="280"
+        >
+          <template #default="{ row }">
+            <!-- <el-button text type="primary" @click="handleDetail(row)">
+              详情
+            </el-button> -->
+            <el-button text type="primary" @click="handleEdit(row)">
+              编辑
+            </el-button>
+            <el-button text type="primary" @click="handleDelete(row)">
+              删除
+            </el-button>
+            <el-button text type="primary" @click="handelResetPwd(row)">
+              重置密码
+            </el-button>
+          </template>
+        </el-table-column>
+        <template #empty>
+          <el-empty class="vab-data-empty" description="暂无数据" />
+        </template>
+      </el-table>
+      <el-pagination
+        background
+        :current-page="queryForm.page"
+        :layout="layout"
+        :page-size="queryForm.per_page"
+        :total="total"
+        @current-change="handleCurrentChange"
+        @size-change="handleSizeChange"
+      />
+      <edit ref="editRef" @fetch-data="fetchData" />
+      <changePwd ref="changpwd" @fetch-data="fetchData" />
+      <Detail ref="details" />
+    </div>
   </div>
 </template>
 
@@ -251,9 +198,7 @@
         selectRows: '',
         queryForm: {
           page: 1,
-          per_page: 20,
-          sortedBy: 'desc',
-          orderBy: 'created_at',
+          limit: 15,
         },
         statusList: [
           {
@@ -296,16 +241,16 @@
       const handleDelete = (row) => {
         if (row.id) {
           $baseConfirm('你确定要删除当前用户吗', null, async () => {
-            const { message } = await doDelete({ ids: [row.id] })
-            $baseMessage(message, 'success', 'vab-hey-message-success')
+            const { msg } = await doDelete({ userIds: [row.id] })
+            $baseMessage(msg, 'success', 'vab-hey-message-success')
             await fetchData()
           })
         } else {
           if (state.selectRows.length > 0) {
             const ids = state.selectRows.map((item) => item.id)
             $baseConfirm('你确定要删除当前选中用户吗', null, async () => {
-              const { message } = await doDelete({ ids: ids })
-              $baseMessage(message, 'success', 'vab-hey-message-success')
+              const { msg } = await doDelete({ userIds: ids })
+              $baseMessage(msg, 'success', 'vab-hey-message-success')
               await fetchData()
             })
           } else {
@@ -315,7 +260,7 @@
       }
       //切换当前页数据条数
       const handleSizeChange = (val) => {
-        state.queryForm.per_page = val
+        state.queryForm.limit = val
         fetchData()
       }
       //切换页码
@@ -332,19 +277,15 @@
       const resetData = () => {
         state.queryForm = {
           page: 1,
-          per_page: 20,
-          sortedBy: 'desc',
-          orderBy: 'created_at',
+          limit: 15,
         }
         fetchData()
       }
       const fetchData = async () => {
         state.listLoading = true
-        const {
-          data: { data, meta },
-        } = await getList(state.queryForm)
-        state.list = data
-        state.total = meta.pagination.total
+        const { data } = await getList(state.queryForm)
+        state.list = data.records
+        state.total = data.total
         state.listLoading = false
       }
       //排序方法
@@ -376,7 +317,7 @@
       }
 
       onMounted(() => {
-        getDepartment()
+        // getDepartment()
         fetchData()
       })
 

+ 3 - 2
types/store.d.ts

@@ -3,7 +3,7 @@
  * @Author: 旭颖
  * @Date: 2022-10-31 14:56:49
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2023-04-19 15:46:46
+ * @LastEditTime: 2023-07-01 16:18:38
  */
 import { VabRouteMeta, VabRouteRecord } from '/#/router'
 
@@ -57,5 +57,6 @@ declare interface UserModuleType {
   token: string | boolean
   username: string
   avatar: string
-  department:any
+  department: any
+  id: string
 }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä