master^2
Gitea 1 week ago
parent cc5d80fd16
commit d260049f2d
  1. 1
      jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 21
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
  3. 16
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/vo/QuXianDepartVo.java
  4. 17
      jeecgboot-vue3/src/api/sys/user.ts
  5. 47
      jeecgboot-vue3/src/views/declarant/declarantList.vue
  6. 5
      jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue
  7. 2
      jeecgboot-vue3/src/views/declarantUnit/depart.user.data.ts
  8. 29
      jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue

@ -182,6 +182,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync", "anon");//申报人注册时,选择部门列表 filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync", "anon");//申报人注册时,选择部门列表
filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync4FaRen", "anon");//法人注册时,选择部门列表 filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync4FaRen", "anon");//法人注册时,选择部门列表
filterChainDefinitionMap.put("/sys/sysDepart/getDepartList4Quxian", "anon");//法人注册时,获取区县级别部门列表

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; 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.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserDepartService; import org.jeecg.modules.system.service.ISysUserDepartService;
import org.jeecg.modules.system.service.ISysUserService; 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.SysDepartExportVo;
import org.jeecg.modules.system.vo.lowapp.ExportDepartVo; import org.jeecg.modules.system.vo.lowapp.ExportDepartVo;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -198,6 +200,21 @@ public class SysDepartController {
return result; return result;
} }
@ApiOperation(value = "法人注册时,获取区县级别部门", notes = "法人注册时,获取区县级别部门")
@GetMapping(value = "/getDepartList4Quxian")
public Result<List<QuXianDepartVo>> getDepartList4Quxian() {
SysDepart sysDepart = sysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getDelFlag, "0").eq(SysDepart::getParentId, ""));
List<SysDepart> departList4Quxian = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getParentId, sysDepart.getId()));
List<QuXianDepartVo> 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 * 获取某个部门的所有父级部门的ID
* *
@ -247,8 +264,8 @@ public class SysDepartController {
} else if ("quxian_admin".equals(user.getRoleCode())) { } else if ("quxian_admin".equals(user.getRoleCode())) {
queryWrapper.eq("parent_id", user.getOrgId()); queryWrapper.eq("parent_id", user.getOrgId());
} else if ("kejiju_admin".equals(user.getRoleCode())) {// 查询所有法人级部门 } else if ("kejiju_admin".equals(user.getRoleCode())) {// 查询所有法人级部门
queryWrapper.ne("depart_name_abbr","null"); queryWrapper.ne("depart_name_abbr", "null");
queryWrapper.ne("depart_name_abbr",""); queryWrapper.ne("depart_name_abbr", "");
} }
return sysDepartService.queryPageList(req, queryWrapper, pageSize, pageNo); return sysDepartService.queryPageList(req, queryWrapper, pageSize, pageNo);

@ -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;
}

@ -31,6 +31,8 @@ enum Api {
userRegister4Shenbaoren = '/sys/user/userRegister4Shenbaoren', userRegister4Shenbaoren = '/sys/user/userRegister4Shenbaoren',
// //
userRegister4Faren = '/sys/user/userRegister4Faren', userRegister4Faren = '/sys/user/userRegister4Faren',
//
userRegisterexp = '/expert/expert/userRegisterexp',
// //
checkOnlyUser = '/sys/user/checkOnlyUser', checkOnlyUser = '/sys/user/checkOnlyUser',
//SSO //SSO
@ -47,6 +49,8 @@ enum Api {
getLoginQrcode = '/sys/getLoginQrcode', getLoginQrcode = '/sys/getLoginQrcode',
// //
getQrcodeToken = '/sys/getQrcodeToken', 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}); return defHttp.post({url: Api.userRegister4Faren, params}, {isReturnNativeResponse: true});
} }
export function registerexp(params) {
return defHttp.post({url: Api.userRegisterexp, params}, {isReturnNativeResponse: true});
}
/** /**
* @description: 获取短信验证码 * @description: 获取短信验证码
*/ */
@ -233,3 +241,12 @@ export async function validateCasLogin(params) {
let url = Api.validateCasLogin; let url = Api.validateCasLogin;
return defHttp.get({ url: url, params }); 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 });
}

@ -4,11 +4,11 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection"> <BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<!-- <a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleCreate"> 新增</a-button>--> <!-- <a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleCreate"> 新增</a-button>-->
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" :disabled="isDisabledAuth('system:user:export')"> 导出</a-button>--> <!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" :disabled="isDisabledAuth('system:user:export')"> 导出</a-button>-->
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>--> <!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
<!-- <a-button type="primary" @click="openModal(true, {})" preIcon="ant-design:hdd-outlined"> 回收站</a-button>--> <!-- <a-button type="primary" @click="openModal(true, {})" preIcon="ant-design:hdd-outlined"> 回收站</a-button>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
<a-menu> <a-menu>
<a-menu-item key="1" @click="batchHandleDelete"> <a-menu-item key="1" @click="batchHandleDelete">
@ -33,7 +33,7 @@
</template> </template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" /> <TableAction :actions="getTableAction(record)"/>
</template> </template>
</BasicTable> </BasicTable>
<!--用户抽屉--> <!--用户抽屉-->
@ -69,7 +69,9 @@
import { columns, searchFormSchema } from './user.data'; import { columns, searchFormSchema } from './user.data';
import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch} from './user.api'; import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch} from './user.api';
import {usePermission} from "/@/hooks/web/usePermission"; 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 { createMessage, createConfirm } = useMessage();
const { isDisabledAuth } = usePermission(); const { isDisabledAuth } = usePermission();
//drawer //drawer
@ -84,7 +86,6 @@
const [registerQuitAgentModal, { openModal: openQuitAgentModal }] = useModal(); const [registerQuitAgentModal, { openModal: openQuitAgentModal }] = useModal();
//model //model
const [registerQuitModal, { openModal: openQuitModal }] = useModal(); const [registerQuitModal, { openModal: openQuitModal }] = useModal();
// //
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
designScope: 'user-list', designScope: 'user-list',
@ -233,7 +234,7 @@
/** /**
* 操作栏 * 操作栏
*/ */
function getTableAction(record): ActionItem[] { /*function getTableAction(record): ActionItem[] {
return [ return [
{ {
label: '编辑', label: '编辑',
@ -241,31 +242,25 @@
// ifShow: () => hasPermission('system:user:edit'), // ifShow: () => hasPermission('system:user:edit'),
}, },
]; ];
} }*/
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
function getDropDownAction(record): ActionItem[] { // function getDropDownAction(record): ActionItem[] {
function getTableAction(record): ActionItem[] {
return [ return [
{ {
label: '详情', label: '详情',
onClick: handleDetail.bind(null, record), onClick: handleDetail.bind(null, record),
}, },
{ /*{
label: '密码', label: '密码',
//auth: 'user:changepwd', //auth: 'user:changepwd',
onClick: handleChangePassword.bind(null, record.username), onClick: handleChangePassword.bind(null, record.username),
}, },*/
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
{ {
label: '驳回', label: '驳回',
ifShow: record.status == 1, ifShow: userStore.getUserInfo.roleCode =='faren_admin' && record.status == 1,
popConfirm: { popConfirm: {
title: '确定驳回吗?', title: '确定驳回吗?',
confirm: handleFrozen.bind(null, record, 2), confirm: handleFrozen.bind(null, record, 2),
@ -273,12 +268,20 @@
}, },
{ {
label: '通过', label: '通过',
ifShow: record.status == 2, ifShow: userStore.getUserInfo.roleCode =='faren_admin' && record.status == 2,
popConfirm: { popConfirm: {
title: '确定通过吗?', title: '确定通过吗?',
confirm: handleFrozen.bind(null, record, 1), confirm: handleFrozen.bind(null, record, 1),
}, },
}, },
{
label: '删除',
ifShow: userStore.getUserInfo.roleCode != 'shenbaoren_role',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
// { // {
// label: '', // label: '',
// onClick: handleAgentSettings.bind(null, record.username), // onClick: handleAgentSettings.bind(null, record.username),

@ -196,6 +196,11 @@
confirm: handleFrozen.bind(null, record, 1), confirm: handleFrozen.bind(null, record, 1),
}, },
}, },
{
ifShow: userStore.getUserInfo.roleCode =='faren_admin',
label: '编辑',
onClick: handleEdit.bind(null, record),
},
{ {
label: '删除', label: '删除',
ifShow: userStore.getUserInfo.roleCode !='faren_admin', ifShow: userStore.getUserInfo.roleCode !='faren_admin',

@ -92,6 +92,7 @@ export const formSchema: FormSchema[] = [
componentProps:{ componentProps:{
dictCode:"depart_status" dictCode:"depart_status"
}, },
dynamicDisabled: true,
}, },
{ {
label: '名称', label: '名称',
@ -107,6 +108,7 @@ export const formSchema: FormSchema[] = [
label: '编码', label: '编码',
field: 'orgCode', field: 'orgCode',
component: 'Input', component: 'Input',
dynamicDisabled: true,
}, },
{ {
label: '手机号', label: '手机号',

@ -39,10 +39,16 @@
<a-input class="fix-auto-fill" type="text" :placeholder="t('请输法人身份证号')" v-model:value="formData.idNo" /> <a-input class="fix-auto-fill" type="text" :placeholder="t('请输法人身份证号')" v-model:value="formData.idNo" />
</div> </div>
</a-form-item> </a-form-item>
<a-form-item> <!-- <a-form-item>
<div class="aui-input-line"> <div class="aui-input-line">
<JSelectDept4FaRen :placeholder="t('sys.login.selectorgPlaceholder4Kejiju')" v-model:value="formData.department" :multiple="false" /> <JSelectDept4FaRen :placeholder="t('sys.login.selectorgPlaceholder4Kejiju')" v-model:value="formData.department" :multiple="false" />
</div> </div>
</a-form-item>-->
<a-form-item>
<div class="aui-input-line">
<j-search-select :placeholder="t('sys.login.selectorgPlaceholder4Kejiju')" v-model:value="formData.department" :dictOptions="dictOptions" />
{{ selectValue }}
</div>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<div class="aui-input-line"> <div class="aui-input-line">
@ -118,7 +124,7 @@
<script lang="ts" setup name="mini-register"> <script lang="ts" setup name="mini-register">
import { ref, reactive, unref, toRaw,onMounted } from 'vue'; import { ref, reactive, unref, toRaw,onMounted } from 'vue';
import { getCaptcha, registerFaren, getCodeInfo } from '/@/api/sys/user'; import {getCaptcha, registerFaren, getCodeInfo, departList4Quxian} from '/@/api/sys/user';
import { SmsEnum } from '/@/views/sys/login/useLogin'; import { SmsEnum } from '/@/views/sys/login/useLogin';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png'; import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png';
@ -129,7 +135,7 @@
import JSelectDept4FaRen from '/@/components/Form/src/jeecg/components/JSelectDept4FaRen.vue'; import JSelectDept4FaRen from '/@/components/Form/src/jeecg/components/JSelectDept4FaRen.vue';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import codeImg from '/@/assets/images/checkcode.png'; import codeImg from '/@/assets/images/checkcode.png';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
const { t } = useI18n(); const { t } = useI18n();
const { notification, createErrorModal, createMessage } = useMessage(); const { notification, createErrorModal, createMessage } = useMessage();
const emit = defineEmits(['go-back', 'success', 'register']); const emit = defineEmits(['go-back', 'success', 'register']);
@ -157,6 +163,21 @@
const pwdIndex = ref<string>('close'); const pwdIndex = ref<string>('close');
// //
const confirmPwdIndex = ref<string>('close'); const confirmPwdIndex = ref<string>('close');
const selectValue=ref('');
const dictOptions=ref([]);
//
function getDepartList4Quxian(){
departList4Quxian().then(res => {
console.log(res,"res")
dictOptions.value = res.map(item => {
return {text:item.depName,value:item.depId}
})
console.log(dictOptions.value,"dictOptions")
})}
getDepartList4Quxian();
/** /**
* 返回 * 返回
@ -246,7 +267,7 @@
return; return;
} }
// 8 // 8
const passwordRegex = /^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[._~!@#$^&*])[A-Za-z0-9._~!@#$^&*]{8,20}$/; const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])[A-Za-z\d!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{8,20}$/;
if (!passwordRegex.test(formData.password)) { if (!passwordRegex.test(formData.password)) {
createMessage.warn(t('sys.login.passwordPlaceholderNotReg')); createMessage.warn(t('sys.login.passwordPlaceholderNotReg'));
return; return;

Loading…
Cancel
Save