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 9d7ec6c..37da5a6 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 @@ -191,6 +191,8 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/sysDepart/queryDepartTreeSync4FaRen", "anon");//法人注册时,选择部门列表 + filterChainDefinitionMap.put("/sys/sysDepart/getDepartList4Quxian", "anon");//法人注册时,获取区县级别部门列表 + diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/appointmentrecord/controller/AppointmentRecordController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/appointmentrecord/controller/AppointmentRecordController.java index d7da315..8f60bbb 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/appointmentrecord/controller/AppointmentRecordController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/appointmentrecord/controller/AppointmentRecordController.java @@ -116,6 +116,34 @@ public class AppointmentRecordController extends JeecgController> queryPageList2(AppointmentRecord appointmentRecord, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + //LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("status", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(appointmentRecord, req.getParameterMap(),customeRuleMap); + //queryWrapper.eq("affiliated_unit",loginUser.getOrgId()); + Page page = new Page(pageNo, pageSize); + IPage pageList = appointmentRecordService.page(page, queryWrapper); + return Result.OK(pageList); + } + /** * 添加 * diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java index 4636ece..3d7e852 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java @@ -73,6 +73,19 @@ public class CmsArticleController extends JeecgController> queryPlistJSJLNEWageList(CmsArticle cmsArticle, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap()); + queryWrapper.eq("column_id","1855427069138923522"); + Page page = new Page(pageNo, pageSize); + IPage pageList = cmsArticleService.page(page, queryWrapper); + return Result.OK(pageList); + } + /** @@ -134,6 +147,43 @@ public class CmsArticleController extends JeecgController addJSJLNEW(@RequestBody CmsArticle cmsArticle) { + LoginUser principal = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + cmsArticle.setCreateBy(principal.getUsername()); + /*CmsColumn cmsColumn = cmsColumnService.getById(cmsArticle.getColumnId());*/ + /*cmsArticle.setColumnName(cmsColumn.getName());*/ +// if (StringUtils.equals("1", cmsArticle.getStatus())) { + cmsArticle.setPublishTime(new Date()); + cmsArticle.setStatus("1"); + cmsArticle.setColumnId("1855427069138923522"); + cmsArticle.setColumnName("技术交流"); +// } + /*QueryWrapper subwesideQueryWrapper = new QueryWrapper<>(); + subwesideQueryWrapper.in("compadminid", principal.getId()); + List subwesideList = subwesideService.list(subwesideQueryWrapper); + if (!subwesideList.isEmpty()) { + List subnames = subwesideList.stream() + .map(Subweside::getSubname) // 将每个Subweside对象映射到其subname字段 + .collect(Collectors.toList()); // 收集结果到List + String joinedString = String.join(", ", subnames); + cmsArticle.setSource("来自子站:"+joinedString); + }else { + cmsArticle.setSource(""); + }*/ + cmsArticleService.save(cmsArticle); + return Result.OK("添加成功!"); + } @ApiOperation(value = "文章管理-发布/取消发布", notes = "文章管理-发布/取消发布") @PostMapping(value = "/operationStatus") public Result operationStatus(@RequestBody CmsArticle cmsArticle) { diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java index 942098d..e741d62 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java @@ -120,16 +120,19 @@ public class DepsbnczController extends JeecgController depsbnczs=depsbnczService.query().eq("annualid",annual.getId()).eq("depid",depiid).list(); - if (depsbnczs.size()>0){ + if (depiid == null || depiid.isEmpty()){ + return Result.error("请确定自己的单位信息是否完整"); + } + List depsbnczList =depsbnczService.query().eq("annualid",depsbncz.getAnnualid()).eq("depid",depiid).list(); + int a=0; + if (depsbnczList == null || depsbnczList.isEmpty()) { + + } else { + a=depsbnczList.size(); + } + if (a>0){ return Result.error("本年度已经添加过了"); }else { - depsbncz.setAnnualid(annual.getId()); depsbncz.setDepid(depiid); depsbnczService.save(depsbncz); return Result.OK("添加成功!"); @@ -146,6 +149,18 @@ public class DepsbnczController extends JeecgController edit(@RequestBody Depsbncz depsbncz) { + + List depsbnczList =depsbnczService.query().eq("annualid",depsbncz.getAnnualid()).eq("depid",depsbncz.getDepid()).list(); + int a=0; + if (depsbnczList == null || depsbnczList.isEmpty()) { + + } else { + a=depsbnczList.size(); + } + if (a>0){ + return Result.error("每年度仅可添加一次"); + } + depsbnczService.updateById(depsbncz); return Result.OK("编辑成功!"); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java index 86d98f5..b26cfda 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java @@ -173,7 +173,12 @@ public class ExpertController extends JeecgController { //开始对比两个List获取相同部分,获取的交叉id就是需要的id List commonElements = userdepids.stream().filter(userbyrole::contains).collect(Collectors.toList()); //根据查询的userid去获取username - List sysUserList = sysUserService.query().in("id",commonElements).list(); + List sysUserList =new ArrayList<>(); + if(commonElements!=null && !commonElements.isEmpty()) { + sysUserList = sysUserService.query().in("id", commonElements).list(); + } else{ + return Result.error("目前没有专家注册。"); + } //根据查询的结果获取username的list List usernames = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java index 9416b57..61be0f0 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java @@ -60,5 +60,5 @@ public interface ExpertMapper extends BaseMapper { void handlebackcount(String id); @Update("UPDATE sys_user SET sex = #{sex} , avatar = #{topPic} WHERE username = #{seusername}") - void updateuser(String topPic, Integer sex, String seusername); + void updateuser(@Param("topPic") String topPic, @Param("sex") Integer sex,@Param("seusername") String seusername); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java index 043981c..62f3811 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java @@ -126,7 +126,7 @@ public class ExpprojectController { IPage pageList = expprojectService.page(page, queryWrapper); return Result.OK(pageList); } else { - return Result.error("未发现数据"); + return Result.error("您还没参加项目。"); } } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java index 142518f..d495f3e 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java @@ -228,8 +228,12 @@ public class InstrumentController extends JeecgController add(@RequestBody Instrument instrument) { LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + SysDepart sysDepart = sysDepartService.getById(loginUser.getOrgId()); + if(sysDepart.getStatus().equals("0")){ + return Result.error("该用户单位冻结,无法申请"); + } instrument.setDeclarationUnit(loginUser.getOrgId()); - if(sysDepartService.getById(loginUser.getOrgId()).getOrgCategory().equals("3")){ + if(sysDepart.getOrgCategory().equals("3")){ instrument.setFlag("1"); }else{ instrument.setFlag("0"); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java index a68e2e6..c117481 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java @@ -124,7 +124,7 @@ public class ProjectController extends JeecgController /** * @description: 申报列表,不同角色可见数据 * @param: [project, pageNo, pageSize, req] - * @return: org.jeecg.common.api.vo.Result> + * @return: org.jeecg.common.api.vo.Result> * @author: z.h.c * @date: 24/11/7 14:56 */ @@ -303,11 +303,10 @@ public class ProjectController extends JeecgController queryWrapper.in("project_status", 12); } if ("kejiju_admin".equals(loginUser.getRoleCode())) { - queryWrapper.in("budget_status", 11,12); + queryWrapper.in("budget_status", 11, 12); } - IPage pageList = projectService.page(page, queryWrapper); return Result.OK(pageList); } @@ -357,7 +356,7 @@ public class ProjectController extends JeecgController queryWrapper.in("project_status", 13); } if ("kejiju_admin".equals(loginUser.getRoleCode())) { - queryWrapper.in("budget_status", 12,13); + queryWrapper.in("budget_status", 12, 13); } IPage pageList = projectService.page(page, queryWrapper); @@ -420,7 +419,7 @@ public class ProjectController extends JeecgController ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); - SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode,project.getSysOrgCode())); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); @@ -434,7 +433,8 @@ public class ProjectController extends JeecgController ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); - SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); +// SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode,project.getSysOrgCode())); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); @@ -519,11 +519,15 @@ public class ProjectController extends JeecgController .eq(DepartExt::getDepartId, sysDepart.getId()) .eq(DepartExt::getProjectId, para.getId()) ); - Depadminlx depadminlx = iDepadminlxService.getOne(new LambdaQueryWrapper().eq(Depadminlx::getDepid, project.getSysOrgCode())); + Depadminlx depadminlx = iDepadminlxService.getOne(new LambdaQueryWrapper().eq(Depadminlx::getSysOrgCode, project.getSysOrgCode())); DepartExtDto2 dto = new DepartExtDto2(); BeanUtils.copyProperties(sysDepart, dto); - BeanUtils.copyProperties(departExt, dto); - BeanUtils.copyProperties(depadminlx, dto); + if (ObjectUtil.isNotEmpty(departExt)) { + BeanUtils.copyProperties(departExt, dto); + } + if (ObjectUtil.isNotEmpty(depadminlx)) { + BeanUtils.copyProperties(depadminlx, dto); + } ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); dto.setAnnualName(projectType.getAnnualName()); List dictModels = sysBaseApi.queryDictItemsByCode("depart_type"); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java index a41dab5..153608c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java @@ -106,7 +106,7 @@ public class ProjectServiceImpl extends ServiceImpl impl BeanUtils.copyProperties(dto, sysDepart); BeanUtils.copyProperties(dto, userExt); BeanUtils.copyProperties(dto, project); - project.setSysOrgCode(loginUser.getOrgId()); + project.setSysOrgCode(loginUser.getOrgCode()); this.updateById(project); userExt.setUserId(loginUser.getId()); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java index edfbd16..60fd44c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java @@ -154,9 +154,9 @@ public class ProjectAnnualBudgetController extends JeecgController queryByProjectId(@PathVariable("projectId") String projectId) { ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getOne(new LambdaQueryWrapper().eq(ProjectAnnualBudget::getProjectId,projectId)); - if (projectAnnualBudget == null) { - return Result.error("未找到对应数据"); - } + /*if (projectAnnualBudget == null) { + return Result.error("暂无数据"); + }*/ return Result.OK(projectAnnualBudget); } 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 94d75ba..e97c8a3 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/controller/SysUserController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index 1c2c097..83a7360 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -2024,6 +2024,7 @@ public class SysUserController { user.setSalt(salt); user.setUsername(username); user.setWorkNo(workon); + user.setOrgCode(depart.getOrgCode()); user.setRealname(realname); user.setPassword(passwordEncode); //user.setEmail(email); 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 1e64eec..76c4e1e 100644 --- a/jeecgboot-vue3/src/api/sys/user.ts +++ b/jeecgboot-vue3/src/api/sys/user.ts @@ -50,6 +50,7 @@ enum Api { //监控二维码扫描状态 getQrcodeToken = '/sys/getQrcodeToken', getdepdataapi= '/expert/expert/getdepdata', + getDepartList4Quxian = '/sys/sysDepart/getDepartList4Quxian', } /** @@ -244,4 +245,8 @@ export async function validateCasLogin(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/appointmentrecord/AppointmentRecord.api.ts b/jeecgboot-vue3/src/views/appointmentrecord/AppointmentRecord.api.ts index 2efa0db..5ed5693 100644 --- a/jeecgboot-vue3/src/views/appointmentrecord/AppointmentRecord.api.ts +++ b/jeecgboot-vue3/src/views/appointmentrecord/AppointmentRecord.api.ts @@ -6,6 +6,7 @@ const { createConfirm } = useMessage(); enum Api { list = '/appointmentrecord/appointmentRecord/list', list1 = '/appointmentrecord/appointmentRecord/list1', + list2 = '/appointmentrecord/appointmentRecord/list2', save='/appointmentrecord/appointmentRecord/add', edit='/appointmentrecord/appointmentRecord/edit', edit1='/appointmentrecord/appointmentRecord/edit1', @@ -53,6 +54,8 @@ export const list = (params) => defHttp.get({ url: Api.list, params }); */ export const list1 = (params) => defHttp.get({ url: Api.list1, params }); +export const list2 = (params) => defHttp.get({ url: Api.list2, params }); + /** * 删除单个 * @param params diff --git a/jeecgboot-vue3/src/views/appointmentrecord/AppointmentRecordList2.vue b/jeecgboot-vue3/src/views/appointmentrecord/AppointmentRecordList2.vue new file mode 100644 index 0000000..a1f800b --- /dev/null +++ b/jeecgboot-vue3/src/views/appointmentrecord/AppointmentRecordList2.vue @@ -0,0 +1,302 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle.api.ts b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle.api.ts new file mode 100644 index 0000000..79a45c2 --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle.api.ts @@ -0,0 +1,77 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + listzwh = '/cms/cmsArticle/listzwh', + list = '/cms/cmsArticle/listJSJLNEW', + save='/cms/cmsArticle/addJSJLNEW', + edit='/cms/cmsArticle/edit', + deleteOne = '/cms/cmsArticle/delete', + deleteBatch = '/cms/cmsArticle/deleteBatch', + importExcel = '/cms/cmsArticle/importExcel', + exportXls = '/cms/cmsArticle/exportXls', + operationStatus = '/cms/cmsArticle/operationStatus', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +export const updateStatus = (params) => defHttp.post({url: Api.operationStatus, params}); + +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + + +/** + * 列表接口 + * @param params + */ +export const listzwh = (params) => + defHttp.get({url: Api.listzwh, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle.data.ts b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle.data.ts new file mode 100644 index 0000000..905fb6b --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle.data.ts @@ -0,0 +1,173 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +// import { rules} from '/@/utils/helper/validator'; +// import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '所属栏目', + align: "center", + dataIndex: 'columnName' + }, + { + title: '文章标题', + align: "center", + dataIndex: 'title', + // slots: {customRender: 'htmlSlot'}, + }, + { + title: '作者', + align: "center", + dataIndex: 'createBy_dictText' + }, + { + title: '来源', + align: "center", + dataIndex: 'source' + }, + { + title: '状态', + align: "center", + dataIndex: 'status_dictText' + }, + { + title: '发布时间', + align: "center", + dataIndex: 'publishTime' + }, + // { + // title: '源url', + // align: "center", + // dataIndex: 'originUrl' + // }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "所属栏目", + field: 'columnId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "cms_column,name,id" + }, + colProps: {span: 6}, + }, + { + label: "文章标题", + field: 'title', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "是否发布", + field: 'status', + component: 'JDictSelectTag', + componentProps: { + dictCode: "captain_code" + }, + colProps: {span: 3}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '文章标题', + field: 'title', + component: 'Input', + dynamicRules: ({model, schema}) => { + return [ + {required: true, message: '请输入文章标题!'}, + ]; + }, + }, +/* { + label: '所属栏目', + field: 'columnId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "cms_column,name,id" + + }, + dynamicRules: ({model, schema}) => { + return [ + {required: true, message: '请输入所属栏目!'}, + ]; + }, + },*/ + { + label: '文章内容', + field: 'content', + component: 'JEditor', + }, + // { + // label: '所属栏目名称', + // field: 'columnName', + // component: 'Input', + // }, + { + label: '发布时间', + field: 'publishTime', + component: 'DatePicker', + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss' + }, + }, + { + label: '来源', + field: 'source', + component: 'Input', + }, + { + label: '源url', + field: 'originUrl', + component: 'Input', + }, + + { + label: '文章图片', + field: 'comimg', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '文章文件', + field: 'comfile', + component: 'JUpload', + componentProps:{ + }, + }, + + { + label: '简介', + field: 'info', + component: 'InputTextArea', + }, +/* { + label: '文章来源', + field: 'artfrom', + component: 'JSearchSelect', + componentProps:{ + dict: "subweside,subname,id" + }, + },*/ + + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + +/** + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticleList.vue b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticleList.vue new file mode 100644 index 0000000..986a66a --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticleList.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticleListzwh.vue b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticleListzwh.vue new file mode 100644 index 0000000..f3df9c8 --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticleListzwh.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle_menu_insert.sql b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle_menu_insert.sql new file mode 100644 index 0000000..0e34975 --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/CmsArticle_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/cms文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2023101212013790550', NULL, '文章', '/cms/cmsArticleList', 'cms/CmsArticleList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023101212013790551', '2023101212013790550', '添加文章', NULL, NULL, 0, NULL, NULL, 2, 'cms:cms_article:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023101212013790552', '2023101212013790550', '编辑文章', NULL, NULL, 0, NULL, NULL, 2, 'cms:cms_article:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023101212013790553', '2023101212013790550', '删除文章', NULL, NULL, 0, NULL, NULL, 2, 'cms:cms_article:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023101212013790554', '2023101212013790550', '批量删除文章', NULL, NULL, 0, NULL, NULL, 2, 'cms:cms_article:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023101212013790555', '2023101212013790550', '导出excel_文章', NULL, NULL, 0, NULL, NULL, 2, 'cms:cms_article:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2023101212013790556', '2023101212013790550', '导入excel_文章', NULL, NULL, 0, NULL, NULL, 2, 'cms:cms_article:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-12 12:01:55', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/components/CmsArticleForm.vue b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/components/CmsArticleForm.vue new file mode 100644 index 0000000..aeab99d --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/components/CmsArticleForm.vue @@ -0,0 +1,70 @@ + + + diff --git a/jeecgboot-vue3/src/views/cms/admin/articelJSJL/components/CmsArticleModal.vue b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/components/CmsArticleModal.vue new file mode 100644 index 0000000..d338f6e --- /dev/null +++ b/jeecgboot-vue3/src/views/cms/admin/articelJSJL/components/CmsArticleModal.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/declarant/declarantList.vue b/jeecgboot-vue3/src/views/declarant/declarantList.vue index a8a724d..6e23854 100644 --- a/jeecgboot-vue3/src/views/declarant/declarantList.vue +++ b/jeecgboot-vue3/src/views/declarant/declarantList.vue @@ -33,7 +33,7 @@ @@ -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 15a5a14..5e389c6 100644 --- a/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue +++ b/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue @@ -196,6 +196,11 @@ function getTableAction(record) { 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 843810a..d724b4c 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/depsbncz/DepsbnczList.vue b/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue index a9aa5ee..3407a05 100644 --- a/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue +++ b/jeecgboot-vue3/src/views/depsbncz/DepsbnczList.vue @@ -4,6 +4,24 @@
+ + + + + + + + + + 查询 + 重置 + + {{ toggleSearchStatus ? '收起' : '展开' }} + + + + +
diff --git a/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue b/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue index b600b31..a275b60 100644 --- a/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue +++ b/jeecgboot-vue3/src/views/depsbncz/components/DepsbnczForm.vue @@ -4,6 +4,11 @@