From d260049f2d0c941a088fd0e3e6ad24bbaaf02fda Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 13 Nov 2024 16:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E6=96=B0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/config/shiro/ShiroConfig.java | 1 + .../controller/SysDepartController.java | 21 ++++- .../modules/system/vo/QuXianDepartVo.java | 16 ++++ jeecgboot-vue3/src/api/sys/user.ts | 17 ++++ .../src/views/declarant/declarantList.vue | 89 ++++++++++--------- .../views/declarantUnit/declarantUnitList.vue | 5 ++ .../views/declarantUnit/depart.user.data.ts | 2 + .../system/loginmini/MiniRegister4faren.vue | 29 +++++- 8 files changed, 131 insertions(+), 49 deletions(-) create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/vo/QuXianDepartVo.java diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 8e08868..33c609e 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -182,6 +182,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync", "anon");//申报人注册时,选择部门列表 filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync4FaRen", "anon");//法人注册时,选择部门列表 + filterChainDefinitionMap.put("/sys/sysDepart/getDepartList4Quxian", "anon");//法人注册时,获取区县级别部门列表 diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java index 9880192..b6e1dfb 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; @@ -25,6 +26,7 @@ import org.jeecg.modules.system.model.SysDepartTreeModel; import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysUserDepartService; import org.jeecg.modules.system.service.ISysUserService; +import org.jeecg.modules.system.vo.QuXianDepartVo; import org.jeecg.modules.system.vo.SysDepartExportVo; import org.jeecg.modules.system.vo.lowapp.ExportDepartVo; import org.jeecgframework.poi.excel.ExcelImportUtil; @@ -198,6 +200,21 @@ public class SysDepartController { return result; } + @ApiOperation(value = "法人注册时,获取区县级别部门", notes = "法人注册时,获取区县级别部门") + @GetMapping(value = "/getDepartList4Quxian") + public Result> getDepartList4Quxian() { + SysDepart sysDepart = sysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getDelFlag, "0").eq(SysDepart::getParentId, "")); + List departList4Quxian = sysDepartService.list(new LambdaQueryWrapper().eq(SysDepart::getParentId, sysDepart.getId())); + List quXianDepartVos = new ArrayList<>(); + Optional.ofNullable(departList4Quxian).orElse(new LinkedList<>()).stream().forEach(depart -> { + QuXianDepartVo vo = new QuXianDepartVo(); + vo.setDepName(depart.getDepartName()); + vo.setDepId(depart.getId()); + quXianDepartVos.add(vo); + }); + return Result.OK(quXianDepartVos); + } + /** * 获取某个部门的所有父级部门的ID * @@ -247,8 +264,8 @@ public class SysDepartController { } else if ("quxian_admin".equals(user.getRoleCode())) { queryWrapper.eq("parent_id", user.getOrgId()); } else if ("kejiju_admin".equals(user.getRoleCode())) {// 查询所有法人级部门 - queryWrapper.ne("depart_name_abbr","null"); - queryWrapper.ne("depart_name_abbr",""); + queryWrapper.ne("depart_name_abbr", "null"); + queryWrapper.ne("depart_name_abbr", ""); } return sysDepartService.queryPageList(req, queryWrapper, pageSize, pageNo); diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/vo/QuXianDepartVo.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/vo/QuXianDepartVo.java new file mode 100644 index 0000000..aca01e3 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/vo/QuXianDepartVo.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.system.vo; + +import lombok.Data; + +/** + * @Description: TODO + * @Author: Z.H.C + * @CreateTime: 2024-11-12 11:20 + * @Version: 1.0 + */ + +@Data +public class QuXianDepartVo { + private String depId; + private String depName; +} diff --git a/jeecgboot-vue3/src/api/sys/user.ts b/jeecgboot-vue3/src/api/sys/user.ts index e28bcc3..76c4e1e 100644 --- a/jeecgboot-vue3/src/api/sys/user.ts +++ b/jeecgboot-vue3/src/api/sys/user.ts @@ -31,6 +31,8 @@ enum Api { userRegister4Shenbaoren = '/sys/user/userRegister4Shenbaoren', // 申报人注册接口 userRegister4Faren = '/sys/user/userRegister4Faren', + // 专家注册接口 + userRegisterexp = '/expert/expert/userRegisterexp', //校验用户接口 checkOnlyUser = '/sys/user/checkOnlyUser', //SSO登录校验 @@ -47,6 +49,8 @@ enum Api { getLoginQrcode = '/sys/getLoginQrcode', //监控二维码扫描状态 getQrcodeToken = '/sys/getQrcodeToken', + getdepdataapi= '/expert/expert/getdepdata', + getDepartList4Quxian = '/sys/sysDepart/getDepartList4Quxian', } /** @@ -127,6 +131,10 @@ export function registerFaren(params) { return defHttp.post({url: Api.userRegister4Faren, params}, {isReturnNativeResponse: true}); } +export function registerexp(params) { + return defHttp.post({url: Api.userRegisterexp, params}, {isReturnNativeResponse: true}); +} + /** * @description: 获取短信验证码 */ @@ -233,3 +241,12 @@ export async function validateCasLogin(params) { let url = Api.validateCasLogin; return defHttp.get({ url: url, params }); } + +export async function getdepdata(params) { + let url = Api.getdepdataapi; + return defHttp.get({ url: url, params }); + + +}export async function departList4Quxian(params) { + return defHttp.get({ url: Api.getDepartList4Quxian, params }); +} diff --git a/jeecgboot-vue3/src/views/declarant/declarantList.vue b/jeecgboot-vue3/src/views/declarant/declarantList.vue index a8a724d..e084a1c 100644 --- a/jeecgboot-vue3/src/views/declarant/declarantList.vue +++ b/jeecgboot-vue3/src/views/declarant/declarantList.vue @@ -4,36 +4,36 @@ @@ -69,7 +69,9 @@ import { columns, searchFormSchema } from './user.data'; import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch} from './user.api'; import {usePermission} from "/@/hooks/web/usePermission"; - + import {useUserStore} from "@/store/modules/user"; + const userStore = useUserStore(); + console.log("the current user role:",userStore.getUserInfo.roleCode); const { createMessage, createConfirm } = useMessage(); const { isDisabledAuth } = usePermission(); //注册drawer @@ -84,7 +86,6 @@ const [registerQuitAgentModal, { openModal: openQuitAgentModal }] = useModal(); //离职用户列表model const [registerQuitModal, { openModal: openQuitModal }] = useModal(); - // 列表页面公共参数、方法 const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ designScope: 'user-list', @@ -233,7 +234,7 @@ /** * 操作栏 */ - function getTableAction(record): ActionItem[] { + /*function getTableAction(record): ActionItem[] { return [ { label: '编辑', @@ -241,31 +242,25 @@ // ifShow: () => hasPermission('system:user:edit'), }, ]; - } + }*/ /** * 下拉操作栏 */ - function getDropDownAction(record): ActionItem[] { + // function getDropDownAction(record): ActionItem[] { + function getTableAction(record): ActionItem[] { return [ { label: '详情', onClick: handleDetail.bind(null, record), }, - { + /*{ label: '密码', //auth: 'user:changepwd', onClick: handleChangePassword.bind(null, record.username), - }, - { - label: '删除', - popConfirm: { - title: '是否确认删除', - confirm: handleDelete.bind(null, record), - }, - }, + },*/ { label: '驳回', - ifShow: record.status == 1, + ifShow: userStore.getUserInfo.roleCode =='faren_admin' && record.status == 1, popConfirm: { title: '确定驳回吗?', confirm: handleFrozen.bind(null, record, 2), @@ -273,12 +268,20 @@ }, { label: '通过', - ifShow: record.status == 2, + ifShow: userStore.getUserInfo.roleCode =='faren_admin' && record.status == 2, popConfirm: { title: '确定通过吗?', confirm: handleFrozen.bind(null, record, 1), }, }, + { + label: '删除', + ifShow: userStore.getUserInfo.roleCode != 'shenbaoren_role', + popConfirm: { + title: '是否确认删除', + confirm: handleDelete.bind(null, record), + }, + }, // { // label: '代理人', // onClick: handleAgentSettings.bind(null, record.username), diff --git a/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue b/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue index 7670268..305430b 100644 --- a/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue +++ b/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue @@ -196,6 +196,11 @@ confirm: handleFrozen.bind(null, record, 1), }, }, + { + ifShow: userStore.getUserInfo.roleCode =='faren_admin', + label: '编辑', + onClick: handleEdit.bind(null, record), + }, { label: '删除', ifShow: userStore.getUserInfo.roleCode !='faren_admin', diff --git a/jeecgboot-vue3/src/views/declarantUnit/depart.user.data.ts b/jeecgboot-vue3/src/views/declarantUnit/depart.user.data.ts index 850434c..bc370c8 100644 --- a/jeecgboot-vue3/src/views/declarantUnit/depart.user.data.ts +++ b/jeecgboot-vue3/src/views/declarantUnit/depart.user.data.ts @@ -92,6 +92,7 @@ export const formSchema: FormSchema[] = [ componentProps:{ dictCode:"depart_status" }, + dynamicDisabled: true, }, { label: '名称', @@ -107,6 +108,7 @@ export const formSchema: FormSchema[] = [ label: '编码', field: 'orgCode', component: 'Input', + dynamicDisabled: true, }, { label: '手机号', diff --git a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue index 41c4d23..b3ec210 100644 --- a/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue +++ b/jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue @@ -39,9 +39,15 @@ +
- + + {{ selectValue }}
@@ -118,7 +124,7 @@