diff --git a/frontend/src/api/auth/index.ts b/frontend/src/api/auth/index.ts index 2a98388..7fddb58 100644 --- a/frontend/src/api/auth/index.ts +++ b/frontend/src/api/auth/index.ts @@ -34,3 +34,113 @@ export function getCaptcha(): AxiosPromise { method: 'get' }); } + +/** + * 用户注册 + */ +export function registerUser(data: any): AxiosPromise { + return request({ + url: '/sms/register', + method: 'post', + data + }); +} + +/** + * 获取流域列表 + * @param companyId 公司ID(可选),如果传入则根据公司获取流域列表 + */ +export function getBasinList(): AxiosPromise { + return request({ + url: '/env/hbrv/regDropdown', + method: 'get', + // params: baseid ? { baseid } : {} + }); +} + +/** + * 获取集团列表(无参数,获取全量集团) + */ +export function getGroupList(): AxiosPromise { + return request({ + url: '/env/hycd/regDropdown', + method: 'get', + params:{lx:1} + }); +} + +/** + * 根据集团获取公司列表 + */ +export function getCompanyList(): AxiosPromise { + return request({ + url: '/env/hycd/regDropdown', + method: 'get', + params: { lx:2 } + }); +} + +/** + * 根据流域获取电站列表 + */ +export function getStationList(params:any): AxiosPromise { + return request({ + url: '/env/engInfo/regDropdown', + method: 'post', + data: params + }); +} + +/** + * 发送短信验证码 + * @param phone 手机号 + * @param type 验证码类型:1-注册 2-找回密码 + */ +export function sendSmsCode(phone: string, type: number = 1): AxiosPromise { + return request({ + url: '/sms/sendCode', + method: 'post', + data: { phone, type } + }); +} + +/** + * 验证短信验证码 + * @param phone 手机号 + * @param code 验证码 + * @param type 验证码类型:1-注册 2-找回密码 + */ +export function verifySmsCode(phone: string, code: string, type: number = 1): AxiosPromise { + return request({ + url: '/sms/verifyCode', + method: 'post', + data: { phone, code, type } + }); +} + +/** + * 短信验证码登录 + * @param phone 手机号 + * @param code 验证码 + */ +export function smsLoginApi(phone: string, code: string): AxiosPromise { + return request({ + url: '/sms/login', + method: 'post', + data: { phone, code } + }); +} + +/** + * 重置密码 + * @param phone 手机号 + * @param code 验证码 + * @param password 新密码 + */ +export function resetPassword(phone: string, code: string, password: string): AxiosPromise { + return request({ + url: '/sms/resetPassword', + method: 'post', + data: { phone, code, password } + }); +} diff --git a/frontend/src/api/user/index.ts b/frontend/src/api/user/index.ts index 1a7ab4a..6de151f 100644 --- a/frontend/src/api/user/index.ts +++ b/frontend/src/api/user/index.ts @@ -17,6 +17,14 @@ export function gettableData(queryParams:any) { params: queryParams }); } +// 审核用户列表 +export function queryPendingAuditUsers(queryParams:any) { + return request({ + url: '/system/user/queryPendingAuditUsers', + method: 'get', + params: queryParams + }); +} //用户-禁用,启用 export function DataStatus (queryParams:any) { return request({ @@ -105,7 +113,7 @@ export function updatePassword (queryParams:any) { //获取过鱼设施权限树 export function getFishtree(queryParams:any) { return request({ - url: '/env/tree/rvcdEng', + url: '/env/tree/hbrvEng', method: 'get', params: queryParams }); @@ -127,6 +135,15 @@ export function getuserdata(queryParams:any) { }); } +// 审计用户(审批通过/驳回) +export function auditUser(data: any) { + return request({ + url: '/system/user/auditUser', + method: 'post', + data + }); +} + /** * 登录成功后获取用户信息(昵称、头像、权限集合和角色集合) */ diff --git a/frontend/src/assets/components/shenpibohui.png b/frontend/src/assets/components/shenpibohui.png new file mode 100644 index 0000000..28147e6 Binary files /dev/null and b/frontend/src/assets/components/shenpibohui.png differ diff --git a/frontend/src/assets/components/shenpitongguo.png b/frontend/src/assets/components/shenpitongguo.png new file mode 100644 index 0000000..de9621c Binary files /dev/null and b/frontend/src/assets/components/shenpitongguo.png differ diff --git a/frontend/src/assets/components/审批通过.png b/frontend/src/assets/components/审批通过.png new file mode 100644 index 0000000..53cecf2 Binary files /dev/null and b/frontend/src/assets/components/审批通过.png differ diff --git a/frontend/src/permission.ts b/frontend/src/permission.ts index 4f9ddba..f18e04e 100644 --- a/frontend/src/permission.ts +++ b/frontend/src/permission.ts @@ -9,7 +9,7 @@ NProgress.configure({ showSpinner: false }); const permissionStore = usePermissionStoreHook(); // 白名单路由 -const whiteList = ['/login']; //login +const whiteList = ['/login','/register']; //login // 查找第一个可用路由 function findFirstAvailableRoute(routes: any[]): string | undefined { diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index eda82d7..b07315d 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -26,6 +26,11 @@ export const constantRoutes: RouteRecordRaw[] = [ component: () => import('@/views/login-sjtb/index.vue'), meta: { hidden: true } }, + { + path: '/register', + component: () => import('@/views/register/index.vue'), + meta: { hidden: true } + }, { path: '/404', component: () => import('@/views/error-page/404.vue'), diff --git a/frontend/src/views/login-sjtb/index.vue b/frontend/src/views/login-sjtb/index.vue index 47c86b9..fb41c60 100644 --- a/frontend/src/views/login-sjtb/index.vue +++ b/frontend/src/views/login-sjtb/index.vue @@ -25,14 +25,9 @@ - + - + @@ -41,23 +36,13 @@
- +