diff --git a/dashboard/components.d.ts b/dashboard/components.d.ts index 990f1edbbae2aa74f40dc1f9039e3873604a22d9..206cc70aafdac8a4bd3642e531b298da0864588c 100644 --- a/dashboard/components.d.ts +++ b/dashboard/components.d.ts @@ -21,6 +21,7 @@ declare module '@vue/runtime-core' { LayConfigProvider: typeof import('@layui/layui-vue')['LayConfigProvider'] LayContainer: typeof import('@layui/layui-vue')['LayContainer'] LayCountUp: typeof import('@layui/layui-vue')['LayCountUp'] + LayDatePicker: typeof import('@layui/layui-vue')['LayDatePicker'] LayDropdown: typeof import('@layui/layui-vue')['LayDropdown'] LayDropdownMenu: typeof import('@layui/layui-vue')['LayDropdownMenu'] LayDropdownMenuItem: typeof import('@layui/layui-vue')['LayDropdownMenuItem'] @@ -42,6 +43,7 @@ declare module '@vue/runtime-core' { LayProgress: typeof import('@layui/layui-vue')['LayProgress'] LayQrcode: typeof import('@layui/layui-vue')['LayQrcode'] LayResult: typeof import('@layui/layui-vue')['LayResult'] + LayRipple: typeof import('@layui/layui-vue')['LayRipple'] LayRow: typeof import('@layui/layui-vue')['LayRow'] LayScroll: typeof import('@layui/layui-vue')['LayScroll'] LaySelect: typeof import('@layui/layui-vue')['LaySelect'] diff --git a/dashboard/package.json b/dashboard/package.json index 9e8dc7bf83dcafa070db242fd97cd5ed2a659e66..895897027d35ced40e031149b5ca2ae81a989e1d 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -8,7 +8,7 @@ "serve": "vite preview" }, "dependencies": { - "@layui/layui-vue": "1.10.0", + "@layui/layui-vue": "1.11.4", "axios": "^1.2.1", "chart.js": "^4.2.1", "echarts": "^5.4.1", diff --git a/dashboard/src/api/module/api.ts b/dashboard/src/api/module/api.ts index 1762052da4db86bbef076a3c20a1e6d1cea7d2f2..e9a258ee994573fa6c52a89dfaa223871d32ba9c 100644 --- a/dashboard/src/api/module/api.ts +++ b/dashboard/src/api/module/api.ts @@ -30,3 +30,8 @@ export const subscriptions_subscription = function (query: {}) { export const subscriptions_topics = function (query: {}) { return Http.post('/subscriptions/topics', query) } + +export const system_user_list = function (query: {}) { + return Http.post('/system/user/list', query) +} + diff --git a/dashboard/src/layouts/BaseLayout.vue b/dashboard/src/layouts/BaseLayout.vue index ff1be79b2b5a704476d22314d1107518266d1d81..5932778c7776fa2aa48d6bc4d9de8cda539c4906 100644 --- a/dashboard/src/layouts/BaseLayout.vue +++ b/dashboard/src/layouts/BaseLayout.vue @@ -1,168 +1,179 @@ diff --git a/dashboard/src/mockjs/user.ts b/dashboard/src/mockjs/user.ts index 26d8805984417e4de20dab826226975a7cb5f9a1..6969196fd5a92c7ee023495545c87bdb7afba11f 100644 --- a/dashboard/src/mockjs/user.ts +++ b/dashboard/src/mockjs/user.ts @@ -52,6 +52,23 @@ const menus = [ icon: "layui-icon-senior", title: "ChatMQTT" }, + { + id: "/system", + icon: "layui-icon-set", + title: "系统设置", + children:[ + { + id: "/system/user", + title: "用户", + icon:"layui-icon-group" + }, + { + id: "/system/setting", + title: "设置", + icon: "layui-icon-set-sm" + } + ] + }, // { // // id: "/chatGPT", diff --git a/dashboard/src/router/module/base-routes.ts b/dashboard/src/router/module/base-routes.ts index ee358685cc0c9635e1954a51c8f386aa214dfbb3..4047a9df0cfdce3d752651cb7d388c88a9c2e1f3 100644 --- a/dashboard/src/router/module/base-routes.ts +++ b/dashboard/src/router/module/base-routes.ts @@ -74,6 +74,24 @@ export default [ }, ] }, + { + path: '/system', + // redirect: "/dashboard/overview", + component: BaseLayout, + children: [ + { + path: '/system/user', + component: () => import('../../views/System/user.vue'), + meta: {title: '用户', requireAuth: true}, + }, + { + path: '/system/setting', + component: () => import('../../views/System/setting.vue'), + meta: {title: '设置', requireAuth: true}, + }, + ] + + }, // { // path: '/chatGPT', // component: BaseLayout, diff --git a/dashboard/src/views/Dashboard/overview.vue b/dashboard/src/views/Dashboard/overview.vue index 58b949531bd965e0783115d03256ca502b0406e2..a5eddb9e163d3ea171b039f8c981d902d8cdeb2c 100644 --- a/dashboard/src/views/Dashboard/overview.vue +++ b/dashboard/src/views/Dashboard/overview.vue @@ -1,9 +1,4 @@