From 6f15c2f6696a46cf2daac55de716284f2e32fba6 Mon Sep 17 00:00:00 2001 From: sheng <15292050171@163.com> Date: Tue, 10 Oct 2023 15:44:13 +0800 Subject: [PATCH 01/40] =?UTF-8?q?feat(=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?):=20=E9=87=8D=E8=AE=BE=E5=AF=86=E7=A0=81=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.env.development | 2 +- .../system/dept/components/DeptUserCom/api.ts | 16 +++-- .../dept/components/DeptUserCom/crud.tsx | 1 + .../dept/components/DeptUserCom/index.vue | 67 ++++++++++++++++++- 4 files changed, 78 insertions(+), 8 deletions(-) diff --git a/web/.env.development b/web/.env.development index 1c3ca5db3..c200ba42c 100644 --- a/web/.env.development +++ b/web/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # 本地环境接口地址 -VITE_API_URL = 'http://127.0.0.1:8000' +VITE_API_URL = 'http://huge-dream.natapp1.cc/' # 是否启用按钮权限 VITE_PM_ENABLED = true diff --git a/web/src/views/system/dept/components/DeptUserCom/api.ts b/web/src/views/system/dept/components/DeptUserCom/api.ts index 561fa1044..28602c720 100644 --- a/web/src/views/system/dept/components/DeptUserCom/api.ts +++ b/web/src/views/system/dept/components/DeptUserCom/api.ts @@ -1,13 +1,13 @@ import { request, downloadFile } from '/@/utils/service'; import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; -type GetListType = PageQuery & { show_all: string } +type GetListType = PageQuery & { show_all: string }; export const apiPrefix = '/api/system/user/'; export function GetDept(query: PageQuery) { return request({ - url: "/api/system/dept/dept_lazy_tree/", + url: '/api/system/dept/dept_lazy_tree/', method: 'get', params: query, }); @@ -55,8 +55,8 @@ export function exportData(params: any) { return downloadFile({ url: apiPrefix + 'export_data/', params: params, - method: 'get' - }) + method: 'get', + }); } export function getDeptInfoById(id: string, type: string) { @@ -65,3 +65,11 @@ export function getDeptInfoById(id: string, type: string) { method: 'get', }); } + +export function resetPwd(id: number, data: { [key: string]: string }) { + return request({ + url: `/api/system/user/${id}/reset_password/`, + method: 'put', + data, + }); +} diff --git a/web/src/views/system/dept/components/DeptUserCom/crud.tsx b/web/src/views/system/dept/components/DeptUserCom/crud.tsx index 36bc11ba1..fb2e155af 100644 --- a/web/src/views/system/dept/components/DeptUserCom/crud.tsx +++ b/web/src/views/system/dept/components/DeptUserCom/crud.tsx @@ -103,6 +103,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp }, click: (ctx: any) => { const { row } = ctx; + context?.handleResetPwdOpen(row); }, }, }, diff --git a/web/src/views/system/dept/components/DeptUserCom/index.vue b/web/src/views/system/dept/components/DeptUserCom/index.vue index d05522d68..922a8fb23 100644 --- a/web/src/views/system/dept/components/DeptUserCom/index.vue +++ b/web/src/views/system/dept/components/DeptUserCom/index.vue @@ -43,16 +43,31 @@ 导入 + + +
+ + +
+ +
- - diff --git a/web/src/views/system/role/components/PermissionComCopy/api.ts b/web/src/views/system/role/components/PermissionComCopy/api.ts deleted file mode 100644 index 9d4c59002..000000000 --- a/web/src/views/system/role/components/PermissionComCopy/api.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { request } from "/@/utils/service"; - -export function getDataPermissionRange() { - return request({ - url: '/api/system/role_menu_button_permission/data_scope/', - method: 'get', - }) -} -export function getDataPermissionDept() { - return request({ - url: '/api/system/role_menu_button_permission/role_to_dept_all/', - method: 'get' - }) -} - -export function getDataPermissionMenu() { - return request({ - url: '/api/system/role_menu_button_permission/get_role_permissions/', - method: 'get' - }) -} \ No newline at end of file diff --git a/web/src/views/system/role/components/PermissionComCopy/index.vue b/web/src/views/system/role/components/PermissionComCopy/index.vue deleted file mode 100644 index 1d08e995c..000000000 --- a/web/src/views/system/role/components/PermissionComCopy/index.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - diff --git a/web/src/views/system/role/components/PermissionComCopy/types.ts b/web/src/views/system/role/components/PermissionComCopy/types.ts deleted file mode 100644 index 6abb63da1..000000000 --- a/web/src/views/system/role/components/PermissionComCopy/types.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface DataPermissionRangeType { - label: string; - value: number; -} - -export interface CustomDataPermissionDeptType { - id: number; - name: string; - patent: number; - children: CustomDataPermissionDeptType[] -} - -export interface CustomDataPermissionMenuType { - id: number; - name: string; - is_catalog: boolean; - menuPermission: { id: number; name: string; value: string }[] | null; - columns: { id: number; name: string; title: string }[] | null; - children: CustomDataPermissionMenuType[] -} \ No newline at end of file diff --git a/web/src/views/system/role/components/PermissionComNew/index.vue b/web/src/views/system/role/components/PermissionComNew/index.vue index 0e5d159ff..db6f332f9 100644 --- a/web/src/views/system/role/components/PermissionComNew/index.vue +++ b/web/src/views/system/role/components/PermissionComNew/index.vue @@ -1,6 +1,8 @@
- +