diff --git a/src/apis/system/dept.ts b/src/apis/system/dept.ts new file mode 100644 index 0000000..873babf --- /dev/null +++ b/src/apis/system/dept.ts @@ -0,0 +1,29 @@ +import http from '@/utils/http' +import type * as System from './type' + +const BASE_URL = '/system/dept' + +/** @desc 查询部门列表 */ +export function listDept(query: System.DeptQuery) { + return http.get(`${BASE_URL}/tree`, query) +} + +/** @desc 查询部门详情 */ +export function getDept(id: string) { + return http.get(`${BASE_URL}/${id}`) +} + +/** @desc 新增部门 */ +export function addDept(data: any) { + return http.post(`${BASE_URL}`, data) +} + +/** @desc 修改部门 */ +export function updateDept(data: any, id: string) { + return http.put(`${BASE_URL}/${id}`, data) +} + +/** @desc 删除部门 */ +export function deleteDept(id: string) { + return http.del(`${BASE_URL}/${id}`) +} diff --git a/src/apis/system/index.ts b/src/apis/system/index.ts index 1f9f80b..236debc 100644 --- a/src/apis/system/index.ts +++ b/src/apis/system/index.ts @@ -1 +1,3 @@ +export * from './dept' export * from './log' +export * from './storage' diff --git a/src/apis/system/storage.ts b/src/apis/system/storage.ts new file mode 100644 index 0000000..7b44840 --- /dev/null +++ b/src/apis/system/storage.ts @@ -0,0 +1,29 @@ +import http from '@/utils/http' +import type * as System from './type' + +const BASE_URL = '/system/storage' + +/** @desc 查询存储列表 */ +export function listStorage(query: System.StorageQuery) { + return http.get>(`${BASE_URL}`, query) +} + +/** @desc 查询存储详情 */ +export function getStorage(id: string) { + return http.get(`${BASE_URL}/${id}`) +} + +/** @desc 新增存储 */ +export function addStorage(data: any) { + return http.post(`${BASE_URL}`, data) +} + +/** @desc 修改存储 */ +export function updateStorage(data: any, id: string) { + return http.put(`${BASE_URL}/${id}`, data) +} + +/** @desc 删除存储 */ +export function deleteStorage(id: string) { + return http.del(`${BASE_URL}/${id}`) +} diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index 536c2f8..f7cc7fa 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -1,3 +1,24 @@ +/** 系统部门类型 */ +export interface DeptResp { + id: string + name: string + sort: number + status: 1 | 2 + isSystem: boolean + description: string + createUserString: string + createTime: string + updateUserString: string + updateTime: string + parentId: string + children: DeptResp[] +} +export interface DeptQuery { + description?: string + status?: number + sort?: Array +} + /** 系统日志类型 */ export interface LogResp { id: string @@ -31,3 +52,28 @@ export interface LogQuery extends PageQuery { createTime?: string status?: number } + +/** 系统存储类型 */ +export type StorageResp = { + id: string + name: string + code: string + type: number + accessKey: string + secretKey: string + endpoint: string + bucketName: string + domain: string + description: string + isDefault: boolean + sort: number + status: number + createUserString: string + createTime: string + updateUserString: string + updateTime: string +} +export interface StorageQuery extends PageQuery { + description?: string + status?: number +} \ No newline at end of file diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 12f41e2..a006fce 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -37,5 +37,6 @@ declare module 'vue' { ParentView: typeof import('./../components/ParentView/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + TextCopy: typeof import('./../components/TextCopy/index.vue')['default'] } } diff --git a/src/views/system/dept/AddDeptModal.vue b/src/views/system/dept/AddDeptModal.vue new file mode 100644 index 0000000..72d4f2b --- /dev/null +++ b/src/views/system/dept/AddDeptModal.vue @@ -0,0 +1,151 @@ + + + diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue new file mode 100644 index 0000000..aebe163 --- /dev/null +++ b/src/views/system/dept/index.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/views/system/dept/type.ts b/src/views/system/dept/type.ts new file mode 100644 index 0000000..50cb7c2 --- /dev/null +++ b/src/views/system/dept/type.ts @@ -0,0 +1,7 @@ +export interface DeptReq { + parentId: string + name: string + sort: number + description: string + status: 1 | 2 +} diff --git a/src/views/system/storage/AddStorageModal.vue b/src/views/system/storage/AddStorageModal.vue new file mode 100644 index 0000000..0ff961a --- /dev/null +++ b/src/views/system/storage/AddStorageModal.vue @@ -0,0 +1,166 @@ + + + diff --git a/src/views/system/storage/index.vue b/src/views/system/storage/index.vue new file mode 100644 index 0000000..29ea166 --- /dev/null +++ b/src/views/system/storage/index.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/views/system/storage/type.ts b/src/views/system/storage/type.ts new file mode 100644 index 0000000..d329730 --- /dev/null +++ b/src/views/system/storage/type.ts @@ -0,0 +1,14 @@ +export interface StorageReq { + name: string + code: string + type: number + accessKey: string + secretKey: string + endpoint: string + bucketName: string + domain: string + sort: number + description: string + isDefault: boolean + status: 1 | 2 +}