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 1/2] =?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 1c3ca5d..c200ba4 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 561fa10..28602c7 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 36bc11b..fb2e155 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 d05522d..922a8fb 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 @@
导入
+
+
+
+
+
+
+
+
+
+