JayChou 2 weeks ago
commit 2ffb08972f
  1. 115
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java
  2. 16
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java
  3. 16
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/entity/ExpproVo.java
  4. 2
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java
  5. 90
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java
  6. 1136
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
  7. 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java
  8. 3
      jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts
  9. 10
      jeecgboot-vue3/src/views/dashboard/workbench/components/DynamicInfo.vue
  10. 86
      jeecgboot-vue3/src/views/dashboard/workbench/components/ProjectCard.vue
  11. 26
      jeecgboot-vue3/src/views/dashboard/workbench/components/QuickNav.vue
  12. 32
      jeecgboot-vue3/src/views/dashboard/workbench/components/api.ts
  13. 10
      jeecgboot-vue3/src/views/dashboard/workbench/components/data.ts
  14. 20
      jeecgboot-vue3/src/views/declarant/user.data.ts
  15. 7
      jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue
  16. 2
      jeecgboot-vue3/src/views/expert/adminback/Expert.api.ts
  17. 17
      jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue
  18. 4
      jeecgboot-vue3/src/views/system/depart/depart.api.ts
  19. 9
      jeecgboot-vue3/src/views/system/depart/depart.data.ts
  20. 9
      jeecgboot-vue3/src/views/system/departUser/depart.user.data.ts
  21. 19
      jeecgboot-vue3/src/views/system/loginmini/MiniRegister4faren.vue
  22. 25
      jeecgboot-vue3/src/views/system/loginmini/MiniRegister4shenbaoren.vue
  23. 1
      jeecgboot-vue3/types/store.d.ts

@ -29,6 +29,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.expproject.entity.Expandpro;
import org.jeecg.modules.demo.expproject.entity.ExpproVo;
import org.jeecg.modules.demo.expproject.entity.Expproject;
import org.jeecg.modules.demo.expproject.service.IExpandproService;
import org.jeecg.modules.demo.expproject.service.IExpprojectService;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysDepartService;
@ -69,6 +74,12 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
private ISysDepartService sysDepartService; private ISysDepartService sysDepartService;
@Autowired @Autowired
private IDisciplineFieidService disciplineFieidService; private IDisciplineFieidService disciplineFieidService;
@Autowired
private IExpprojectService expprojectService;
@Autowired
private IExpandproService expandproService;
/** /**
* 分页列表查询 * 分页列表查询
@ -88,6 +99,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
HttpServletRequest req) { HttpServletRequest req) {
//用于查看所有信息无论是否审核,无论哪个部门 //用于查看所有信息无论是否审核,无论哪个部门
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap());
queryWrapper.eq("isdone","Y");
Page<Expert> page = new Page<Expert>(pageNo, pageSize); Page<Expert> page = new Page<Expert>(pageNo, pageSize);
IPage<Expert> pageList = expertService.page(page, queryWrapper); IPage<Expert> pageList = expertService.page(page, queryWrapper);
pageList.getRecords().forEach(experttemp -> { pageList.getRecords().forEach(experttemp -> {
@ -109,6 +121,38 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
return Result.OK(pageList); return Result.OK(pageList);
} }
@ApiOperation(value="专家管理-分页列表查询/管理员角色", notes="专家管理-分页列表查询/管理员角色")
@GetMapping(value = "/listadminstatic")
public Result<IPage<Expert>> listadminstatic(Expert expert,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//用于查看所有信息无论是否审核,无论哪个部门
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap());
queryWrapper.eq("isdone","Y");
queryWrapper.eq("adminopen","2");
queryWrapper.eq("compopen","2");
Page<Expert> page = new Page<Expert>(pageNo, pageSize);
IPage<Expert> pageList = expertService.page(page, queryWrapper);
pageList.getRecords().forEach(experttemp -> {
//开始用于修改数据
SysUser sysUser = sysUserService.query().eq("username",experttemp.getSeusername()).one();
String depid = expertService.getdeps(sysUser.getId());
SysDepart sysDepart = sysDepartService.getById(depid);
experttemp.setRealname(sysUser.getRealname());
experttemp.setWorkon(sysUser.getWorkNo());
experttemp.setSex(sysUser.getSex());
experttemp.setTopPic(sysUser.getAvatar());
experttemp.setPhone(sysUser.getPhone());
experttemp.setEmails(sysUser.getEmail());
experttemp.setSsdep(sysDepart.getDepartName());
experttemp.setPsd(sysUser.getPassword());
experttemp.setSepsd(sysUser.getPassword());
});
return Result.OK(pageList);
}
@ApiOperation(value="专家管理-分页列表查询/县区管理员角色", notes="专家管理-分页列表查询/县区管理员角色") @ApiOperation(value="专家管理-分页列表查询/县区管理员角色", notes="专家管理-分页列表查询/县区管理员角色")
@GetMapping(value = "/listcounty") @GetMapping(value = "/listcounty")
public Result<IPage<Expert>> listcounty(Expert expert, public Result<IPage<Expert>> listcounty(Expert expert,
@ -138,6 +182,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
//用于查看本县区下面的专家信息无论是否审核,无论哪个部门 //用于查看本县区下面的专家信息无论是否审核,无论哪个部门
QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); QueryWrapper<Expert> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap());
queryWrapper.eq("isdone","Y");
queryWrapper.in("seusername",usernames); queryWrapper.in("seusername",usernames);
Page<Expert> page = new Page<Expert>(pageNo, pageSize); Page<Expert> page = new Page<Expert>(pageNo, pageSize);
IPage<Expert> pageList = expertService.page(page, queryWrapper); IPage<Expert> pageList = expertService.page(page, queryWrapper);
@ -687,6 +732,8 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
user.setDelFlag(CommonConstant.DEL_FLAG_0); user.setDelFlag(CommonConstant.DEL_FLAG_0);
sysUserService.saveUser(user, "1843478958968647681", ssdep, ""); sysUserService.saveUser(user, "1843478958968647681", ssdep, "");
Expert expert = new Expert(); Expert expert = new Expert();
expert.setAdminopen("1");
expert.setCompopen("1");
expert.setSeusername(username); expert.setSeusername(username);
expertService.save(expert); expertService.save(expert);
return Result.OK("注册成功"); return Result.OK("注册成功");
@ -764,6 +811,40 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
List<Expert> expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").list(); List<Expert> expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").list();
return Result.OK(expertList.size()); return Result.OK(expertList.size());
} }
@ApiOperation(value="管理员专家数据---异常专家数--请假", notes="管理员专家数据---异常专家数--请假")
@GetMapping(value = "/expdatanumberycxj")
public Result<Integer> expdatanumberycxj() {
List<Expert> expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").eq("errinfo","2").list();
return Result.OK(expertList.size());
}
@ApiOperation(value="管理员专家数据---异常专家数--出差", notes="管理员专家数据---异常专家数--出差")
@GetMapping(value = "/expdatanumberyccc")
public Result<Integer> expdatanumberyccc() {
List<Expert> expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").eq("errinfo","1").list();
return Result.OK(expertList.size());
}
@ApiOperation(value="管理员专家数据---异常专家数--其他", notes="管理员专家数据---异常专家数--其他")
@GetMapping(value = "/expdatanumberycqt")
public Result<Integer> expdatanumberycqt() {
List<Expert> expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("expsture","Y").eq("errinfo","3").list();
return Result.OK(expertList.size());
}
@ApiOperation(value="管理员专家数据---专家待提交/未审核", notes="管理员专家数据---专家待提交/未审核")
@GetMapping(value = "/expdatawtjsh")
public Result<Integer> expdatawtjsh() {
List<Expert> expertList = expertService.query().eq("adminopen","1").or().eq("compopen","1").or().eq("isdone","N").list();
return Result.OK(expertList.size());
}
@ApiOperation(value="管理员专家数据---专家已审核", notes="管理员专家数据---专家已审核")
@GetMapping(value = "/expdatayish")
public Result<Integer> expdatayish() {
List<Expert> expertList = expertService.query().eq("adminopen","2").eq("compopen","2").eq("isdone","Y").list();
return Result.OK(expertList.size());
}
@ApiOperation(value="管理员专家数据---不同的领域专家数", notes="管理员专家数据---不同的领域专家数") @ApiOperation(value="管理员专家数据---不同的领域专家数", notes="管理员专家数据---不同的领域专家数")
@GetMapping(value = "/expdatanumberdiffect") @GetMapping(value = "/expdatanumberdiffect")
@ -780,4 +861,38 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
return Result.OK(expdefVoList); return Result.OK(expdefVoList);
} }
//统计项目的总个数
@ApiOperation(value="管理员专家数据---查询项目个数", notes="管理员专家数据---查询项目个数")
@GetMapping(value = "/projectnumber")
public Result<?> projectnumber() {
List<Expproject> expprojectList = expprojectService.list();
return Result.OK(expprojectList.size());
}
@ApiOperation(value="管理员专家数据---查询项目和项目需要的专家", notes="管理员专家数据---查询项目和项目需要的专家")
@GetMapping(value = "/findprojectandnumber")
public Result<List<ExpproVo>> findprojectandnumber() {
List<ExpproVo> expproVos =new ArrayList<>();
List<Expproject> expprojectList = expprojectService.list();
for (Expproject expproject : expprojectList) {
ExpproVo expproVo = new ExpproVo();
expproVo.setCreateTime(expproject.getCreateTime());
expproVo.setProname(expproject.getProname());
expproVo.setNeedexp(expproject.getNeedexp());
expproVo.setExptype(disciplineFieidService.query().eq("id",expproject.getExptype()).one().getName());
List<Expandpro> expandpros =expandproService.query().eq("expprojectid",expproject.getId()).list();
if (!expandpros.isEmpty()){
expproVo.setExperts(expandpros.stream().map(Expandpro::getExpname).collect(Collectors.toList()));
}
expproVos.add(expproVo);
}
expproVos.sort(Comparator.comparing(ExpproVo::getCreateTime).reversed());
// 截取前 6 条数据
if (expproVos.size() > 6) {
expproVos = expproVos.subList(0, 6);
}
return Result.OK(expproVos);
}
} }

@ -2,7 +2,9 @@ package org.jeecg.modules.demo.expproject.controller;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.io.IOException; import java.io.IOException;
import java.math.BigInteger;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.security.SecureRandom;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -141,11 +143,16 @@ public class ExpprojectController {
public Result<String> add(@RequestBody ExpprojectPage expprojectPage) { public Result<String> add(@RequestBody ExpprojectPage expprojectPage) {
Expproject expproject = new Expproject(); Expproject expproject = new Expproject();
BeanUtils.copyProperties(expprojectPage, expproject); BeanUtils.copyProperties(expprojectPage, expproject);
if (expproject.getNeedexp()>=expprojectPage.getExpandproList().size()) { if (!expprojectPage.getExpandproList().isEmpty()) {
if (expproject.getNeedexp() >= expprojectPage.getExpandproList().size()) {
expprojectService.saveMain(expproject, expprojectPage.getExpandproList());
return Result.OK("添加成功!");
} else {
return Result.error("确定项目专家数量");
}
}else {
expprojectService.saveMain(expproject, expprojectPage.getExpandproList()); expprojectService.saveMain(expproject, expprojectPage.getExpandproList());
return Result.OK("添加成功!"); return Result.OK("添加成功!");
}else {
return Result.error("确定项目专家数量");
} }
} }
@ -241,9 +248,10 @@ public class ExpprojectController {
List<String> usernamelist = expandproService.getusernamelist(); List<String> usernamelist = expandproService.getusernamelist();
Collections.shuffle(usernamelist); Collections.shuffle(usernamelist);
List<String> randomUsers = getRandomUsers(usernamelist, a); List<String> randomUsers = getRandomUsers(usernamelist, a);
Expandpro expandpro =new Expandpro();
List<Expert> expertList = expertService.query().in("seusername",randomUsers).list(); List<Expert> expertList = expertService.query().in("seusername",randomUsers).list();
for (int i=0;i<expertList.size();i++){ for (int i=0;i<expertList.size();i++){
Expandpro expandpro =new Expandpro();
SysUser sysUser = sysUserService.query().eq("username",expertList.get(i).getSeusername()).one(); SysUser sysUser = sysUserService.query().eq("username",expertList.get(i).getSeusername()).one();
expandpro.setExpid(expertList.get(i).getSeusername()); expandpro.setExpid(expertList.get(i).getSeusername());
expandpro.setExpprojectid(id); expandpro.setExpprojectid(id);

@ -0,0 +1,16 @@
package org.jeecg.modules.demo.expproject.entity;
import lombok.Data;
import org.jeecg.modules.demo.expert.entity.Expert;
import java.util.Date;
import java.util.List;
@Data
public class ExpproVo {
private Date createTime;
private String proname;
private String exptype;
private Integer needexp;
private List<String> experts;
}

@ -205,7 +205,7 @@ public class InstrumentController extends JeecgController<Instrument, IInstrumen
IPage<Instrument> pageList = instrumentService.page(page, queryWrapper); IPage<Instrument> pageList = instrumentService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
if(loginUser.getRoleCode().indexOf("yuwukeshi_admin")!= -1){ if(loginUser.getRoleCode().indexOf("kejiju_admin")!= -1){
//市直业务科室管理员角色 //市直业务科室管理员角色
queryWrapper.in("state",2,3); queryWrapper.in("state",2,3);
queryWrapper.in("flag",0,2); queryWrapper.in("flag",0,2);

@ -4,10 +4,12 @@ import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.exceptions.ClientException; import com.aliyuncs.exceptions.ClientException;
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.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresRoles; import org.apache.shiro.authz.annotation.RequiresRoles;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
@ -21,10 +23,7 @@ import org.jeecg.common.util.*;
import org.jeecg.common.util.encryption.EncryptedString; import org.jeecg.common.util.encryption.EncryptedString;
import org.jeecg.config.JeecgBaseConfig; import org.jeecg.config.JeecgBaseConfig;
import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.entity.SysRoleIndex;
import org.jeecg.modules.system.entity.SysTenant;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.model.SysLoginModel; import org.jeecg.modules.system.model.SysLoginModel;
import org.jeecg.modules.system.service.*; import org.jeecg.modules.system.service.*;
import org.jeecg.modules.system.service.impl.SysBaseApiImpl; import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
@ -38,7 +37,6 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @Author scott * @Author scott
@ -68,6 +66,12 @@ public class LoginController {
@Autowired @Autowired
private JeecgBaseConfig jeecgBaseConfig; private JeecgBaseConfig jeecgBaseConfig;
@Autowired
private ISysUserRoleService sysUserRoleService;
@Autowired
private ISysRoleService sysRoleService;
private final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890"; private final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
@ApiOperation("登录接口") @ApiOperation("登录接口")
@ -99,7 +103,7 @@ public class LoginController {
result.setCode(HttpStatus.PRECONDITION_FAILED.value()); result.setCode(HttpStatus.PRECONDITION_FAILED.value());
return result; return result;
} }
// step.2 校验用户是否存在且有效 // step.2 校验用户是否存在且有效
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SysUser::getUsername,username); queryWrapper.eq(SysUser::getUsername,username);
@ -161,11 +165,19 @@ public class LoginController {
//update-begin---author:liusq ---date:2022-06-29 for:接口返回值修改,同步修改这里的判断逻辑----------- //update-begin---author:liusq ---date:2022-06-29 for:接口返回值修改,同步修改这里的判断逻辑-----------
//update-end---author:scott ---date::2022-06-20 for:vue3前端,支持自定义首页-------------- //update-end---author:scott ---date::2022-06-20 for:vue3前端,支持自定义首页--------------
log.info("2 获取用户信息耗时 (首页面配置)" + (System.currentTimeMillis() - start) + "毫秒"); log.info("2 获取用户信息耗时 (首页面配置)" + (System.currentTimeMillis() - start) + "毫秒");
List<SysUserRole> userRole = sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, sysUser.getId()));
if(ObjectUtils.isNotEmpty(userRole)){
String rollId = userRole.get(0).getRoleId();
SysRole sysRole = sysRoleService.getById(rollId);
if(ObjectUtils.isNotEmpty(sysRole)){
sysUser.setRoleCode(sysRole.getRoleCode());
}
}
obj.put("userInfo",sysUser); obj.put("userInfo",sysUser);
obj.put("sysAllDictItems", sysDictService.queryAllDictItems()); obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
log.info("3 获取用户信息耗时 (字典数据)" + (System.currentTimeMillis() - start) + "毫秒"); log.info("3 获取用户信息耗时 (字典数据)" + (System.currentTimeMillis() - start) + "毫秒");
result.setResult(obj); result.setResult(obj);
result.success(""); result.success("");
} }
@ -173,7 +185,7 @@ public class LoginController {
return result; return result;
} }
/** /**
* 退出登录 * 退出登录
* @param request * @param request
@ -207,7 +219,7 @@ public class LoginController {
return Result.error("Token无效!"); return Result.error("Token无效!");
} }
} }
/** /**
* 获取访问量 * 获取访问量
* @return * @return
@ -238,7 +250,7 @@ public class LoginController {
result.success("登录成功"); result.success("登录成功");
return result; return result;
} }
/** /**
* 获取访问量 * 获取访问量
* @return * @return
@ -259,8 +271,8 @@ public class LoginController {
result.setResult(oConvertUtils.toLowerCasePageList(list)); result.setResult(oConvertUtils.toLowerCasePageList(list));
return result; return result;
} }
/** /**
* 登陆成功选择用户当前部门 * 登陆成功选择用户当前部门
* @param user * @param user
@ -274,7 +286,7 @@ public class LoginController {
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
username = sysUser.getUsername(); username = sysUser.getUsername();
} }
//获取登录部门 //获取登录部门
String orgCode= user.getOrgCode(); String orgCode= user.getOrgCode();
//获取登录租户 //获取登录租户
@ -290,7 +302,7 @@ public class LoginController {
/** /**
* 短信登录接口 * 短信登录接口
* *
* @param jsonObject * @param jsonObject
* @return * @return
*/ */
@ -302,18 +314,18 @@ public class LoginController {
//手机号模式 登录模式: "2" 注册模式: "1" //手机号模式 登录模式: "2" 注册模式: "1"
String smsmode=jsonObject.get("smsmode").toString(); String smsmode=jsonObject.get("smsmode").toString();
log.info("-------- IP:{}, 手机号:{},获取绑定验证码", clientIp, mobile); log.info("-------- IP:{}, 手机号:{},获取绑定验证码", clientIp, mobile);
if(oConvertUtils.isEmpty(mobile)){ if(oConvertUtils.isEmpty(mobile)){
result.setMessage("手机号不允许为空!"); result.setMessage("手机号不允许为空!");
result.setSuccess(false); result.setSuccess(false);
return result; return result;
} }
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
String redisKey = CommonConstant.PHONE_REDIS_KEY_PRE+mobile; String redisKey = CommonConstant.PHONE_REDIS_KEY_PRE+mobile;
Object object = redisUtil.get(redisKey); Object object = redisUtil.get(redisKey);
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
if (object != null) { if (object != null) {
result.setMessage("验证码10分钟内,仍然有效!"); result.setMessage("验证码10分钟内,仍然有效!");
result.setSuccess(false); result.setSuccess(false);
@ -358,7 +370,7 @@ public class LoginController {
} }
return result; return result;
} }
/** /**
* smsmode 短信模板方式 0 .登录模板1.注册模板2.忘记密码模板 * smsmode 短信模板方式 0 .登录模板1.注册模板2.忘记密码模板
*/ */
@ -376,12 +388,12 @@ public class LoginController {
result.setSuccess(false); result.setSuccess(false);
return result; return result;
} }
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
//验证码10分钟内有效 //验证码10分钟内有效
redisUtil.set(redisKey, captcha, 600); redisUtil.set(redisKey, captcha, 600);
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
//update-begin--Author:scott Date:20190812 for:issues#391 //update-begin--Author:scott Date:20190812 for:issues#391
//result.setResult(captcha); //result.setResult(captcha);
//update-end--Author:scott Date:20190812 for:issues#391 //update-end--Author:scott Date:20190812 for:issues#391
@ -394,11 +406,11 @@ public class LoginController {
} }
return result; return result;
} }
/** /**
* 手机号登录接口 * 手机号登录接口
* *
* @param jsonObject * @param jsonObject
* @return * @return
*/ */
@ -418,7 +430,7 @@ public class LoginController {
if(!result.isSuccess()) { if(!result.isSuccess()) {
return result; return result;
} }
String smscode = jsonObject.getString("captcha"); String smscode = jsonObject.getString("captcha");
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
@ -469,7 +481,7 @@ public class LoginController {
//3.设置登录用户信息 //3.设置登录用户信息
obj.put("userInfo", sysUser); obj.put("userInfo", sysUser);
//4.设置登录部门 //4.设置登录部门
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId()); List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
obj.put("departs", departs); obj.put("departs", departs);
@ -496,7 +508,7 @@ public class LoginController {
obj.put("sysAllDictItems", sysDictService.queryAllDictItems()); obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
} }
//end-begin---author:scott ---date:2024-01-05 for:【QQYUN-7802】前端在登录时加载了两次数据字典,建议优化下,避免数据字典太多时可能产生的性能问题 #956--- //end-begin---author:scott ---date:2024-01-05 for:【QQYUN-7802】前端在登录时加载了两次数据字典,建议优化下,避免数据字典太多时可能产生的性能问题 #956---
result.setResult(obj); result.setResult(obj);
result.success("登录成功"); result.success("登录成功");
return result; return result;
@ -530,13 +542,13 @@ public class LoginController {
String code = RandomUtil.randomString(BASE_CHECK_CODES,4); String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
//存到redis中 //存到redis中
String lowerCaseCode = code.toLowerCase(); String lowerCaseCode = code.toLowerCase();
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可 // 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret(); String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret();
String realKey = Md5Util.md5Encode(origin, "utf-8"); String realKey = Md5Util.md5Encode(origin, "utf-8");
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906 //update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
redisUtil.set(realKey, lowerCaseCode, 60); redisUtil.set(realKey, lowerCaseCode, 60);
log.info("获取验证码,Redis key = {},checkCode = {}", realKey, code); log.info("获取验证码,Redis key = {},checkCode = {}", realKey, code);
//返回前端 //返回前端
@ -557,11 +569,11 @@ public class LoginController {
@RequiresRoles({"admin"}) @RequiresRoles({"admin"})
@GetMapping(value = "/switchVue3Menu") @GetMapping(value = "/switchVue3Menu")
public Result<String> switchVue3Menu(HttpServletResponse response) { public Result<String> switchVue3Menu(HttpServletResponse response) {
Result<String> res = new Result<String>(); Result<String> res = new Result<String>();
sysPermissionService.switchVue3Menu(); sysPermissionService.switchVue3Menu();
return res; return res;
} }
/** /**
* app登录 * app登录
* @param sysLoginModel * @param sysLoginModel
@ -574,7 +586,7 @@ public class LoginController {
String username = sysLoginModel.getUsername(); String username = sysLoginModel.getUsername();
String password = sysLoginModel.getPassword(); String password = sysLoginModel.getPassword();
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户 //update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
if(isLoginFailOvertimes(username)){ if(isLoginFailOvertimes(username)){
return result.error500("该用户登录失败次数过多,请于10分钟后再次登录!"); return result.error500("该用户登录失败次数过多,请于10分钟后再次登录!");
@ -586,7 +598,7 @@ public class LoginController {
if(!result.isSuccess()) { if(!result.isSuccess()) {
return result; return result;
} }
//2. 校验用户名或密码是否正确 //2. 校验用户名或密码是否正确
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt()); String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
String syspassword = sysUser.getPassword(); String syspassword = sysUser.getPassword();
@ -597,17 +609,17 @@ public class LoginController {
result.error500("用户名或密码错误"); result.error500("用户名或密码错误");
return result; return result;
} }
//3.设置登录部门 //3.设置登录部门
String orgCode = sysUser.getOrgCode(); String orgCode = sysUser.getOrgCode();
if(oConvertUtils.isEmpty(orgCode)) { if(oConvertUtils.isEmpty(orgCode)) {
//如果当前用户无选择部门 查看部门关联信息 //如果当前用户无选择部门 查看部门关联信息
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId()); List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
//update-begin-author:taoyan date:20220117 for: JTC-1068【app】新建用户,没有设置部门及角色,点击登录提示暂未归属部,一直在登录页面 使用手机号登录 可正常 //update-begin-author:taoyan date:20220117 for: JTC-1068【app】新建用户,没有设置部门及角色,点击登录提示暂未归属部,一直在登录页面 使用手机号登录 可正常
if (departs == null || departs.size() == 0) { if (departs == null || departs.size() == 0) {
/*result.error500("用户暂未归属部门,不可登录!"); /*result.error500("用户暂未归属部门,不可登录!");
return result;*/ return result;*/
}else{ }else{
orgCode = departs.get(0).getOrgCode(); orgCode = departs.get(0).getOrgCode();
@ -625,7 +637,7 @@ public class LoginController {
//5. 设置登录用户信息 //5. 设置登录用户信息
obj.put("userInfo", sysUser); obj.put("userInfo", sysUser);
//6. 生成token //6. 生成token
String token = JwtUtil.sign(username, syspassword); String token = JwtUtil.sign(username, syspassword);
// 设置超时时间 // 设置超时时间
@ -799,7 +811,7 @@ public class LoginController {
return result; return result;
} }
/** /**
* 图形验证码 * 图形验证码
* @param sysLoginModel * @param sysLoginModel
@ -824,5 +836,5 @@ public class LoginController {
redisUtil.removeAll(realKey); redisUtil.removeAll(realKey);
return Result.ok(); return Result.ok();
} }
} }

@ -222,4 +222,7 @@ public class SysUser implements Serializable {
*/ */
@TableField(exist = false) @TableField(exist = false)
private boolean izBindThird; private boolean izBindThird;
@TableField(exist = false)
private String roleCode;
} }

@ -89,13 +89,16 @@ export default {
// placeholder // placeholder
accountPlaceholder: '请输入账号', accountPlaceholder: '请输入账号',
passwordPlaceholder: '请输入密码', passwordPlaceholder: '请输入密码',
passwordPlaceholderNotReg: '密码格式不对(包含字母(大小写)数字以及特殊字符,至少8位)',
inputCodePlaceholder: '请输入验证码', inputCodePlaceholder: '请输入验证码',
smsPlaceholder: '请输入验证码', smsPlaceholder: '请输入验证码',
mobilePlaceholder: '请输入手机号码', mobilePlaceholder: '请输入手机号码',
mobilePlaceholderNotReg: '手机号格式不对',
mobileCorrectPlaceholder: '请输入正确的手机号码', mobileCorrectPlaceholder: '请输入正确的手机号码',
policyPlaceholder: '勾选后才能注册', policyPlaceholder: '勾选后才能注册',
diffPwd: '两次输入密码不一致', diffPwd: '两次输入密码不一致',
selectorgPlaceholder: '请选择所属单位', selectorgPlaceholder: '请选择所属单位',
selectorgPlaceholder4Kejiju: '请选择科技主管部门',
realNamePlaceholder: '请输入姓名', realNamePlaceholder: '请输入姓名',
workNoPlaceholder: '请输入工号', workNoPlaceholder: '请输入工号',

@ -1,5 +1,5 @@
<template> <template>
<Card title="单个领域专家个数" v-bind="$attrs"> <Card title="项目粗略信息" v-bind="$attrs">
<template #extra> <template #extra>
</template> </template>
@ -8,10 +8,10 @@
<ListItem> <ListItem>
<ListItemMeta> <ListItemMeta>
<template #description> <template #description>
{{ item.number }} 目评审专家: {{ item.experts.join(', ') }}
</template> </template>
<!-- eslint-disable-next-line --> <!-- eslint-disable-next-line -->
<template #title> {{ item.name }} <span v-html="item.desc"> </span> </template> <template #title> 项目名称{{ item.proname }} 需要的专家数{{item.needexp}} 需要的专家类型{{item.exptype}}<span v-html="item.desc"> </span> </template>
<template #avatar> <template #avatar>
<Icon :icon="item.avatar" :size="30" /> <Icon :icon="item.avatar" :size="30" />
</template> </template>
@ -23,7 +23,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Card, List } from 'ant-design-vue'; import { Card, List } from 'ant-design-vue';
import { expdatanumberdiffect } from './api'; import { findprojectandnumber } from './api';
/* import { dynamicInfoItems } from './data';*/ /* import { dynamicInfoItems } from './data';*/
import {getDataListApi, getDataListApiyc} from './api'; import {getDataListApi, getDataListApiyc} from './api';
import { Icon } from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
@ -33,7 +33,7 @@
const dynamicInfoItems= ref([]) const dynamicInfoItems= ref([])
function item03(){ function item03(){
expdatanumberdiffect().then(res => { findprojectandnumber().then(res => {
console.log("1919219191919",res) console.log("1919219191919",res)
res.forEach(item => { res.forEach(item => {
dynamicInfoItems.value.push(item); dynamicInfoItems.value.push(item);

@ -15,22 +15,53 @@
</CardGrid> </CardGrid>
<CardGrid class="!md:w-1/3 !w-full"> <CardGrid class="!md:w-1/3 !w-full">
<span class="flex"> <span class="flex">
<span class="text-lg ml-4">状态异常的专家数</span> <span class="text-lg ml-4">已审核状态异常的专家数</span>
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item3 }}</span>
</span> </span>
<div class="flex justify-between text-secondary"> <div class="flex justify-between text-secondary">
<span style="font-weight: bold; font-size: em; margin-left: auto; display: inline-block; width: fit-content;">请假{{ item5 }}</span>
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item3 }}</span> <span style="font-weight: bold; font-size: em; margin-left: auto; display: inline-block; width: fit-content;">出差{{ item6 }}</span>
<span style="font-weight: bold; font-size: em; margin-left: auto; display: inline-block; width: fit-content;">出差{{ item7 }}</span>
</div> </div>
</CardGrid> </CardGrid>
<CardGrid class="!md:w-1/3 !w-full"> <CardGrid class="!md:w-1/3 !w-full">
<span class="flex"> <span class="flex">
<span class="text-lg ml-4">状态正常的专家数</span> <span class="text-lg ml-4">已审核状态正常的专家数</span>
</span> </span>
<div class="flex justify-between text-secondary"> <div class="flex justify-between text-secondary">
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item2 }}</span> <span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item2 }}</span>
</div> </div>
</CardGrid> </CardGrid>
<CardGrid class="!md:w-1/3 !w-full">
<span class="flex">
<span class="text-lg ml-4">未提交/待审核专家数</span>
</span>
<div class="flex justify-between text-secondary">
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item8 }}</span>
</div>
</CardGrid>
<CardGrid class="!md:w-1/3 !w-full">
<span class="flex">
<span class="text-lg ml-4">已审核专家数</span>
</span>
<div class="flex justify-between text-secondary">
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item9 }}</span>
</div>
</CardGrid>
<CardGrid class="!md:w-1/3 !w-full">
<span class="flex">
<span class="text-lg ml-4">项目总个数</span>
</span>
<div class="flex justify-between text-secondary">
<span style="font-weight: bold; font-size: 2em; margin-left: auto; display: inline-block; width: fit-content;">{{ item4 }}</span>
</div>
</CardGrid>
<!-- </template>--> <!-- </template>-->
</Card> </Card>
@ -39,7 +70,7 @@
import { defineComponent, ref } from 'vue'; import { defineComponent, ref } from 'vue';
import { Card } from 'ant-design-vue'; import { Card } from 'ant-design-vue';
import { Icon } from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { getDataListApi,getDataListApizc,getDataListApiyc } from './api'; import { getDataListApi,getDataListApizc,getDataListApiyc,projectnumber,expdatanumberycxj,expdatanumberyccc,expdatanumberycqt,expdatawtjsh,expdatayish } from './api';
export default defineComponent({ export default defineComponent({
components: { Card, CardGrid: Card.Grid, Icon }, components: { Card, CardGrid: Card.Grid, Icon },
setup() { setup() {
@ -67,8 +98,51 @@
})} })}
item03(); item03();
const item4 = ref("0");
function item04(){
projectnumber().then(res => {
item4.value = res
})}
item04();
/*请假*/
const item5 = ref("0");
function item05(){
expdatanumberycxj().then(res => {
item5.value = res
})}
item05();
/*出差*/
const item6 = ref("0");
function item06(){
expdatanumberyccc().then(res => {
item6.value = res
})}
item06();
return {item1,item2,item3} /*其他*/
const item7 = ref("0");
function item07(){
expdatanumberycqt().then(res => {
item7.value = res
})}
item07();
/*未提交/待审核转家属*/
const item8 = ref("0");
function item08(){
expdatawtjsh().then(res => {
item8.value = res
})}
item08();
/*审核转家属*/
const item9 = ref("0");
function item09(){
expdatayish().then(res => {
item9.value = res
})}
item09();
return {item1,item2,item3,item4,item5,item6,item7,item8,item9}
}, },

@ -1,19 +1,33 @@
<template> <template>
<!-- <Card title="快捷导航" v-bind="$attrs"> <Card title="不同领域专家个数" v-bind="$attrs">
<template v-for="item in navItems" :key="item"> <template v-for="item in dynamicInfoItems" :key="item">
<CardGrid> <CardGrid>
<span class="flex flex-col items-center"> <span class="flex flex-col items-center">
<Icon :icon="item.icon" :color="item.color" size="20" /> <!-- <Icon :icon="item.icon" :color="item.color" size="20" />-->
<span class="text-md mt-2">{{ item.title }}</span> <span class="text-md mt-2">{{ item.name }}</span>
<span class="text-md mt-2">{{item.number}}</span>
</span> </span>
</CardGrid> </CardGrid>
</template> </template>
</Card>--> </Card>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Card } from 'ant-design-vue'; import { Card } from 'ant-design-vue';
import { navItems } from './data'; /*import { navItems } from './data';*/
import { Icon } from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import {ref} from "vue";
import {expdatanumberdiffect} from "@/views/dashboard/workbench/components/api";
const dynamicInfoItems= ref([])
function item03(){
expdatanumberdiffect().then(res => {
console.log("1919219191919",res)
res.forEach(item => {
dynamicInfoItems.value.push(item);
});
})}
item03();
const CardGrid = Card.Grid; const CardGrid = Card.Grid;
</script> </script>

@ -8,6 +8,13 @@ enum Api {
zclist = '/expert/expert/expdatanumberzc', zclist = '/expert/expert/expdatanumberzc',
lyzjlist = '/expert/expert/expdatanumberdiffect', lyzjlist = '/expert/expert/expdatanumberdiffect',
yclist= '/expert/expert/expdatanumberyc', yclist= '/expert/expert/expdatanumberyc',
pronumber= '/expert/expert/projectnumber',
findprojectandnumberapi= '/expert/expert/findprojectandnumber',
expdatanumberycxjapi= '/expert/expert/expdatanumberycxj',
expdatanumberycccapi= '/expert/expert/expdatanumberyccc',
expdatanumberycqtapi= '/expert/expert/expdatanumberycqt',
expdatawtjshapi= '/expert/expert/expdatawtjsh',
expdatayishapi= '/expert/expert/expdatayish',
} }
export function getDataListApi() { export function getDataListApi() {
@ -26,3 +33,28 @@ export function getDataListApiyc() {
export function expdatanumberdiffect() { export function expdatanumberdiffect() {
return defHttp.get({ url: Api.lyzjlist }); return defHttp.get({ url: Api.lyzjlist });
} }
export function projectnumber() {
return defHttp.get({ url: Api.pronumber });
}
export function findprojectandnumber() {
return defHttp.get({ url: Api.findprojectandnumberapi });
}
export function expdatanumberycxj() {
return defHttp.get({ url: Api.expdatanumberycxjapi });
}
export function expdatanumberyccc() {
return defHttp.get({ url: Api.expdatanumberycccapi });
}
export function expdatanumberycqt() {
return defHttp.get({ url: Api.expdatanumberycqtapi });
}
export function expdatawtjsh() {
return defHttp.get({ url: Api.expdatawtjshapi });
}
export function expdatayish() {
return defHttp.get({ url: Api.expdatayishapi });
}

@ -51,6 +51,16 @@ export const navItems: NavItem[] = [
icon: 'ion:bar-chart-outline', icon: 'ion:bar-chart-outline',
color: '#00d8ff', color: '#00d8ff',
}, },
{
title: '权限管理',
icon: 'ion:key-outline',
color: '#4daf1bc9',
},
{
title: '图表',
icon: 'ion:bar-chart-outline',
color: '#00d8ff',
},
]; ];
export const dynamicInfoItems: DynamicInfoItem[] = [ export const dynamicInfoItems: DynamicInfoItem[] = [

@ -175,7 +175,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
component: 'Input', component: 'Input',
}, },
{ /*{
label: '工号', label: '工号',
field: 'workNo', field: 'workNo',
required: true, required: true,
@ -190,7 +190,7 @@ export const formSchema: FormSchema[] = [
componentProps: { componentProps: {
labelKey: 'name', labelKey: 'name',
}, },
}, },*/
{ {
label: '角色', label: '角色',
field: 'selectedroles', field: 'selectedroles',
@ -234,7 +234,7 @@ export const formSchema: FormSchema[] = [
}; };
}, },
}, },
{ /*{
label: '租户', label: '租户',
field: 'relTenantIds', field: 'relTenantIds',
component: 'ApiSelect', component: 'ApiSelect',
@ -263,8 +263,8 @@ export const formSchema: FormSchema[] = [
}, },
}; };
}, },
}, },*/
{ /*{
label: '负责部门', label: '负责部门',
field: 'departIds', field: 'departIds',
component: 'Select', component: 'Select',
@ -272,7 +272,7 @@ export const formSchema: FormSchema[] = [
mode: 'multiple', mode: 'multiple',
}, },
ifShow: ({ values }) => values.userIdentity == 2, ifShow: ({ values }) => values.userIdentity == 2,
}, },*/
{ {
label: '头像', label: '头像',
field: 'avatar', field: 'avatar',
@ -320,13 +320,13 @@ export const formSchema: FormSchema[] = [
]; ];
}, },
}, },
{ /*{
label: '座机', label: '座机',
field: 'telephone', field: 'telephone',
component: 'Input', component: 'Input',
rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }], rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }],
}, },*/
{ /*{
label: '工作流引擎', label: '工作流引擎',
field: 'activitiSync', field: 'activitiSync',
defaultValue: 1, defaultValue: 1,
@ -336,7 +336,7 @@ export const formSchema: FormSchema[] = [
type: 'radio', type: 'radio',
stringToNumber: true, stringToNumber: true,
}, },
}, },*/
]; ];
export const formPasswordSchema: FormSchema[] = [ export const formPasswordSchema: FormSchema[] = [

@ -58,6 +58,8 @@ import {useMessage} from "@/hooks/web/useMessage";
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const checkedKeys = ref<Array<string | number>>([]); const checkedKeys = ref<Array<string | number>>([]);
const userStore = useUserStore(); const userStore = useUserStore();
// console.log("userStore.getUserInfo---",JSON.stringify(userStore.getUserInfo))
// console.log("userStore.getRoleList---",userStore.getRoleList)
const {createMessage, createConfirm} = useMessage(); const {createMessage, createConfirm} = useMessage();
//model //model
@ -180,7 +182,7 @@ function getTableAction(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, 0), confirm: handleFrozen.bind(null, record, 0),
@ -188,7 +190,7 @@ function getTableAction(record) {
}, },
{ {
label: '通过', label: '通过',
ifShow: record.status == 0, ifShow: userStore.getUserInfo.roleCode !='faren_admin' && record.status == 0,
popConfirm: { popConfirm: {
title: '确定通过吗?', title: '确定通过吗?',
confirm: handleFrozen.bind(null, record, 1), confirm: handleFrozen.bind(null, record, 1),
@ -196,6 +198,7 @@ function getTableAction(record) {
}, },
{ {
label: '删除', label: '删除',
ifShow: userStore.getUserInfo.roleCode !='faren_admin',
popConfirm: { popConfirm: {
title: '是否确认删除', title: '是否确认删除',
confirm: handleDelete.bind(null, record), confirm: handleDelete.bind(null, record),

@ -4,7 +4,7 @@ import { useMessage } from "/src/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/expert/expert/listadmin', list = '/expert/expert/listadminstatic',
save='/expert/expert/add', save='/expert/expert/add',
edit='/expert/expert/edit', edit='/expert/expert/edit',
deleteOne = '/expert/expert/delete', deleteOne = '/expert/expert/delete',

@ -3,9 +3,9 @@
<div class="j-table-operator" style="width: 100%"> <div class="j-table-operator" style="width: 100%">
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddDepart">新增</a-button> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddDepart">新增</a-button>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddChildDepart()">添加下级</a-button> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddChildDepart()">添加下级</a-button>
<a-upload name="file" :showUploadList="false" :customRequest="onImportXls"> <!-- <a-upload name="file" :showUploadList="false" :customRequest="onImportXls">
<a-button type="primary" preIcon="ant-design:import-outlined">导入</a-button> <a-button type="primary" preIcon="ant-design:import-outlined">导入</a-button>
</a-upload> </a-upload>-->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button>
<!-- <a-button type="primary" preIcon="ant-design:sync-outlined">同步企微?</a-button> <!-- <a-button type="primary" preIcon="ant-design:sync-outlined">同步企微?</a-button>
<a-button type="primary" preIcon="ant-design:sync-outlined">同步钉钉?</a-button>--> <a-button type="primary" preIcon="ant-design:sync-outlined">同步钉钉?</a-button>-->
@ -92,10 +92,11 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useMethods } from '/@/hooks/system/useMethods'; import { useMethods } from '/@/hooks/system/useMethods';
import { Api, deleteBatchDepart, queryDepartTreeSync } from '../depart.api'; import { Api, deleteBatchDepart, queryDepartTreeSync4ZhuGuanBuMen } from '../depart.api';
import { searchByKeywords } from '/@/views/system/departUser/depart.user.api'; import { searchByKeywords } from '/@/views/system/departUser/depart.user.api';
import DepartFormModal from '/@/views/system/depart/components/DepartFormModal.vue'; import DepartFormModal from '/@/views/system/depart/components/DepartFormModal.vue';
import { Popconfirm } from 'ant-design-vue'; import { Popconfirm } from 'ant-design-vue';
import {useUserStore} from "@/store/modules/user";
const prefixCls = inject('prefixCls'); const prefixCls = inject('prefixCls');
const emit = defineEmits(['select', 'rootTreeData']); const emit = defineEmits(['select', 'rootTreeData']);
@ -124,13 +125,16 @@
// modal // modal
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const userStore = useUserStore();
// //
async function loadRootTreeData() { async function loadRootTreeData() {
try { try {
loading.value = true; loading.value = true;
treeData.value = []; treeData.value = [];
const result = await queryDepartTreeSync(); const result = await queryDepartTreeSync4ZhuGuanBuMen({
parentOrgCode: userStore.getUserInfo.orgCode,
});
if (Array.isArray(result)) { if (Array.isArray(result)) {
treeData.value = result; treeData.value = result;
} }
@ -158,8 +162,9 @@
// //
async function loadChildrenTreeData(treeNode) { async function loadChildrenTreeData(treeNode) {
try { try {
const result = await queryDepartTreeSync({ const result = await queryDepartTreeSync4ZhuGuanBuMen({
pid: treeNode.dataRef.id, // pid: treeNode.dataRef.id,
parentOrgCode: treeNode.dataRef.orgCode,
}); });
if (result.length == 0) { if (result.length == 0) {
treeNode.dataRef.isLeaf = true; treeNode.dataRef.isLeaf = true;

@ -6,6 +6,7 @@ const { createConfirm } = useMessage();
export enum Api { export enum Api {
queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync', queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync',
queryDepartTreeSync4ZhuGuanBuMen = '/sys/sysDepart/queryDepartTreeSync4ZhuGuanBuMen',
save = '/sys/sysDepart/add', save = '/sys/sysDepart/add',
edit = '/sys/sysDepart/edit', edit = '/sys/sysDepart/edit',
delete = '/sys/sysDepart/delete', delete = '/sys/sysDepart/delete',
@ -31,6 +32,9 @@ export enum Api {
*/ */
export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params }); export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params });
// add by zhc 11.09
export const queryDepartTreeSync4ZhuGuanBuMen = (params?) => defHttp.get({ url: Api.queryDepartTreeSync4ZhuGuanBuMen, params });
/** /**
* 保存或者更新部门角色 * 保存或者更新部门角色
*/ */

@ -81,10 +81,13 @@ export function useBasicFormSchema() {
// //
export const orgCategoryOptions = { export const orgCategoryOptions = {
// //
root: [{ value: '1', label: '公司' }], // root: [{ value: '1', label: '' }],
root: [{ value: '1', label: '管理单位' }],
// //
child: [ child: [
{ value: '2', label: '部门' }, // { value: '2', label: '' },
{ value: '3', label: '岗位' }, { value: '2', label: '直属法人单位' },
// { value: '3', label: '' },
{ value: '3', label: '县区法人单位' },
], ],
}; };

@ -163,11 +163,14 @@ export function useBaseInfoForm(treeData: Ref<any[]>) {
label: '机构类型', label: '机构类型',
render(val) { render(val) {
if (val === '1') { if (val === '1') {
return '公司'; // return '';
return '管理单位';
} else if (val === '2') { } else if (val === '2') {
return '部门'; // return '';
return '直属法人单位';
} else if (val === '3') { } else if (val === '3') {
return '岗位'; // return '';
return '县区法人单位';
} }
return val; return val;
}, },

@ -3,9 +3,9 @@
<div class="aui-container"> <div class="aui-container">
<div class="aui-form"> <div class="aui-form">
<div class="aui-image"> <div class="aui-image">
<div class="aui-image-text"> <!-- <div class="aui-image-text">
<img :src="jeecgAdTextImg" alt="" /> <img :src="jeecgAdTextImg" alt="" />
</div> </div>-->
</div> </div>
<div class="aui-formBox"> <div class="aui-formBox">
<div class="aui-formWell"> <div class="aui-formWell">
@ -41,7 +41,7 @@
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<div class="aui-input-line"> <div class="aui-input-line">
<JSelectDept :placeholder="t('sys.login.selectorgPlaceholder')" v-model:value="formData.department" :multiple="false" /> <JSelectDept :placeholder="t('sys.login.selectorgPlaceholder4Kejiju')" v-model:value="formData.department" :multiple="false" />
</div> </div>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
@ -224,7 +224,7 @@
return; return;
} }
if (!formData.department) { if (!formData.department) {
createMessage.warn(t('sys.login.selectorgPlaceholder')); createMessage.warn(t('sys.login.selectorgPlaceholder4Kejiju'));
return; return;
} }
if (!formData.username) { if (!formData.username) {
@ -235,10 +235,21 @@
createMessage.warn(t('sys.login.mobilePlaceholder')); createMessage.warn(t('sys.login.mobilePlaceholder'));
return; return;
} }
const phoneRegex = /^1[3-9]\d{9}$/;
if (!phoneRegex.test(formData.mobile)) {
createMessage.warn(t('sys.login.mobilePlaceholderNotReg'));
return;
}
if (!formData.password) { if (!formData.password) {
createMessage.warn(t('sys.login.passwordPlaceholder')); createMessage.warn(t('sys.login.passwordPlaceholder'));
return; return;
} }
// 8
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$%^&+=!])(?=.{8,})$/;
if (!passwordRegex.test(formData.password)) {
createMessage.warn(t('sys.login.passwordPlaceholderNotReg'));
return;
}
// if (!formData.workno) { // if (!formData.workno) {
// createMessage.warn(t('sys.login.passwordPlaceholder')); // createMessage.warn(t('sys.login.passwordPlaceholder'));
// return; // return;

@ -3,13 +3,13 @@
<div class="aui-container"> <div class="aui-container">
<div class="aui-form"> <div class="aui-form">
<div class="aui-image"> <div class="aui-image">
<div class="aui-image-text"> <!-- <div class="aui-image-text">
<img :src="jeecgAdTextImg" alt="" /> <img :src="jeecgAdTextImg" alt="" />
</div> </div>-->
</div> </div>
<div class="aui-formBox"> <div class="aui-formBox">
<div class="aui-formWell"> <div class="aui-formWell">
<a-form ref="formRef" :model="formData"> <a-form ref="formRef" :model="formData" :rules="rules">
<div class="aui-flex aui-form-nav aui-clear-left" style="padding-bottom: 21px"> <div class="aui-flex aui-form-nav aui-clear-left" style="padding-bottom: 21px">
<div class="aui-flex-box activeNav on">{{t('sys.login.registerButton4shenbaoren')}}</div> <div class="aui-flex-box activeNav on">{{t('sys.login.registerButton4shenbaoren')}}</div>
</div> </div>
@ -42,7 +42,7 @@
<!-- </a-form-item>--> <!-- </a-form-item>-->
<a-form-item> <a-form-item>
<div class="aui-input-line"> <div class="aui-input-line">
<JSelectDept :placeholder="t('sys.login.selectorgPlaceholder')" v-model:value="formData.department" :multiple="false" /> <JSelectDept :placeholder="t('sys.login.selectorgPlaceholder4Kejiju')" v-model:value="formData.department" :multiple="false" />
</div> </div>
</a-form-item> </a-form-item>
@ -229,21 +229,28 @@
return; return;
} }
if (!formData.department) { if (!formData.department) {
createMessage.warn(t('sys.login.selectorgPlaceholder')); createMessage.warn(t('sys.login.selectorgPlaceholder4Kejiju'));
return; return;
} }
if (!formData.mobile) { if (!formData.mobile) {
createMessage.warn(t('sys.login.mobilePlaceholder')); createMessage.warn(t('sys.login.mobilePlaceholder'));
return; return;
} }
const phoneRegex = /^1[3-9]\d{9}$/;
if (!phoneRegex.test(formData.mobile)) {
createMessage.warn(t('sys.login.mobilePlaceholderNotReg'));
return;
}
if (!formData.password) { if (!formData.password) {
createMessage.warn(t('sys.login.passwordPlaceholder')); createMessage.warn(t('sys.login.passwordPlaceholder'));
return; return;
} }
// if (!formData.workno) { // 8
// createMessage.warn(t('sys.login.passwordPlaceholder')); const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$%^&+=!])(?=.{8,})$/;
// return; if (!passwordRegex.test(formData.password)) {
// } createMessage.warn(t('sys.login.passwordPlaceholderNotReg'));
return;
}
if (!formData.confirmPassword) { if (!formData.confirmPassword) {
createMessage.warn(t('sys.login.confirmPassword')); createMessage.warn(t('sys.login.confirmPassword'));
return; return;

@ -40,6 +40,7 @@ export interface UserInfo {
homePath?: string; homePath?: string;
tenantid?: string | number; tenantid?: string | number;
roles: RoleInfo[]; roles: RoleInfo[];
roleCode: string;
orgCode?: string; orgCode?: string;
} }

Loading…
Cancel
Save