From 274ce44dfe09af1d085c7be998b844191f79b606 Mon Sep 17 00:00:00 2001 From: ailanyin Date: Thu, 1 Jun 2023 17:33:23 +0800 Subject: [PATCH] page select 9/10 --- package.json | 1 + src/api/login.js | 13 +- src/api/system/dict/data.js | 44 +- src/api/system/dict/type.js | 50 +-- src/api/tenant/tenant.js | 50 +-- src/components/PagedSelect/index.vue | 306 +++++++++++++ src/router/index.js | 16 +- src/views/login.vue | 50 ++- src/views/system/config/index.vue | 1 + src/views/system/dict/data.vue | 468 ++++++++++++-------- src/views/system/dict/index.vue | 450 +++++++++++-------- src/views/tenant/index.vue | 628 +++++++++++++++------------ 12 files changed, 1330 insertions(+), 747 deletions(-) create mode 100644 src/components/PagedSelect/index.vue diff --git a/package.json b/package.json index 3356148..8405c68 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "nprogress": "0.2.0", "pinia": "2.0.22", "pinia-plugin-persistedstate": "^3.1.0", + "v3-infinite-loading": "^1.2.2", "vue": "3.2.45", "vue-cropper": "1.0.3", "vue-router": "4.1.4" diff --git a/src/api/login.js b/src/api/login.js index 1aa42d3..aeac26d 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,6 +1,4 @@ import request from "@/utils/request"; -import usePermissionStore from "@/store/modules/permission"; -import useUserStore from "@/store/modules/user"; // 登录方法 export function login(username, password, code, uuid) { @@ -77,3 +75,14 @@ export const getRouters = () => { method: "get", }); }; + +export const getTenantNormalList = (query) => { + return request({ + url: "/tenant/normal-list", + headers: { + isToken: false, + }, + params: query, + method: "get", + }); +}; diff --git a/src/api/system/dict/data.js b/src/api/system/dict/data.js index 6c9eb79..3fd149f 100644 --- a/src/api/system/dict/data.js +++ b/src/api/system/dict/data.js @@ -1,52 +1,52 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询字典数据列表 export function listData(query) { return request({ - url: '/system/dict/data/list', - method: 'get', - params: query - }) + url: "/system/dict/data/list", + method: "get", + params: query, + }); } // 查询字典数据详细 export function getData(dictCode) { return request({ - url: '/system/dict/data/' + dictCode, - method: 'get' - }) + url: "/system/dict/data/" + dictCode, + method: "get", + }); } // 根据字典类型查询字典数据信息 export function getDicts(dictType) { return request({ - url: '/system/dict/data/type/' + dictType, - method: 'get' - }) + url: "/system/dict/data/type/" + dictType, + method: "get", + }); } // 新增字典数据 export function addData(data) { return request({ - url: '/system/dict/data', - method: 'post', - data: data - }) + url: "/system/dict/data", + method: "post", + data: data, + }); } // 修改字典数据 export function updateData(data) { return request({ - url: '/system/dict/data', - method: 'put', - data: data - }) + url: "/system/dict/data", + method: "put", + data: data, + }); } // 删除字典数据 export function delData(dictCode) { return request({ - url: '/system/dict/data/' + dictCode, - method: 'delete' - }) + url: "/system/dict/data/" + dictCode, + method: "delete", + }); } diff --git a/src/api/system/dict/type.js b/src/api/system/dict/type.js index a0254ba..a0c99f6 100644 --- a/src/api/system/dict/type.js +++ b/src/api/system/dict/type.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询字典类型列表 export function listType(query) { return request({ - url: '/system/dict/type/list', - method: 'get', - params: query - }) + url: "/system/dict/type/list", + method: "get", + params: query, + }); } // 查询字典类型详细 export function getType(dictId) { return request({ - url: '/system/dict/type/' + dictId, - method: 'get' - }) + url: "/system/dict/type/" + dictId, + method: "get", + }); } // 新增字典类型 export function addType(data) { return request({ - url: '/system/dict/type', - method: 'post', - data: data - }) + url: "/system/dict/type", + method: "post", + data: data, + }); } // 修改字典类型 export function updateType(data) { return request({ - url: '/system/dict/type', - method: 'put', - data: data - }) + url: "/system/dict/type", + method: "put", + data: data, + }); } // 删除字典类型 export function delType(dictId) { return request({ - url: '/system/dict/type/' + dictId, - method: 'delete' - }) + url: "/system/dict/type/" + dictId, + method: "delete", + }); } // 刷新字典缓存 export function refreshCache() { return request({ - url: '/system/dict/type/refreshCache', - method: 'delete' - }) + url: "/system/dict/type/refreshCache", + method: "delete", + }); } // 获取字典选择框列表 export function optionselect() { return request({ - url: '/system/dict/type/optionselect', - method: 'get' - }) + url: "/system/dict/type/optionselect", + method: "get", + }); } diff --git a/src/api/tenant/tenant.js b/src/api/tenant/tenant.js index 6efbd09..5e044fc 100644 --- a/src/api/tenant/tenant.js +++ b/src/api/tenant/tenant.js @@ -1,44 +1,44 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 查询租户列表 export function listTenant(query) { - return request({ - url: '/tenant/list', - method: 'get', - params: query - }) + return request({ + url: "/tenant/list", + method: "get", + params: query, + }); } // 查询租户详细 export function getTenant(tenantId) { - return request({ - url: '/tenant/' + tenantId, - method: 'get' - }) + return request({ + url: "/tenant/" + tenantId, + method: "get", + }); } // 新增租户 export function addTenant(data) { - return request({ - url: '/tenant', - method: 'post', - data: data - }) + return request({ + url: "/tenant", + method: "post", + data: data, + }); } // 修改租户 export function updateTenant(data) { - return request({ - url: '/tenant', - method: 'put', - data: data - }) + return request({ + url: "/tenant", + method: "put", + data: data, + }); } // 删除租户 export function delTenant(tenantId) { - return request({ - url: '/tenant/' + tenantId, - method: 'delete' - }) -} \ No newline at end of file + return request({ + url: "/tenant/" + tenantId, + method: "delete", + }); +} diff --git a/src/components/PagedSelect/index.vue b/src/components/PagedSelect/index.vue new file mode 100644 index 0000000..e87dd82 --- /dev/null +++ b/src/components/PagedSelect/index.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 75ffdd3..a5a655c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,18 +117,18 @@ export const dynamicRoutes = [ ], }, { - path: '/system/dict-data', + path: "/system/dict-data", component: Layout, hidden: true, - permissions: ['system:dict:list'], + permissions: ["system:dict:list"], children: [ { - path: 'index/:dictId(\\d+)', - component: () => import('@/views/system/dict/data'), - name: 'Data', - meta: { title: '字典数据', activeMenu: '/system/dict' } - } - ] + path: "index/:dictId(\\d+)", + component: () => import("@/views/system/dict/data"), + name: "Data", + meta: { title: "字典数据", activeMenu: "/system/dict" }, + }, + ], }, ]; diff --git a/src/views/login.vue b/src/views/login.vue index a198bee..ee1903c 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -8,17 +8,33 @@ >

若依后台管理系统

- - - + /> + + + + + + + + + + + 记住密码 + >记住密码 +
立即注册 + >立即注册 +
@@ -98,10 +114,11 @@ diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index 844af74..6f085fc 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -71,6 +71,7 @@ - - - - - - - - - - - 搜索 - 重置 - - +
+ + + + + + + + + + + 搜索 + 重置 + + - - - 新增 - - - 修改 - - - 删除 - - - 导出 - - - 关闭 - - - + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + 关闭 + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - {{ dict.label }} - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ dict.label }} + + + + + + + + + \ No newline at end of file +getList(); +