significative 3 months ago
commit f97967a920
  1. 1152
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 64
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/entity/AnnualCompPoint.java
  3. 18
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java
  4. 28
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/PersonalCompScoreServiceImpl.java
  5. 130
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java
  6. 351
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/seteacher/controller/SeteacherController.java
  7. 102
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/seteacher/entity/Seteacher.java
  8. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/seteacher/mapper/SeteacherMapper.java
  9. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/seteacher/mapper/xml/SeteacherMapper.xml
  10. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/seteacher/service/ISeteacherService.java
  11. 19
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/seteacher/service/impl/SeteacherServiceImpl.java
  12. 22
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/controller/TeamSeqController.java
  13. 61
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/entity/TeamSeq.java
  14. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/ITeamSeqService.java
  15. 23
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/teamseq/service/impl/TeamSeqServiceImpl.java
  16. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/controller/UpfileGroupController.java
  17. 38
      jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  18. 347
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/components/AnnualCompPointForm.vue
  19. 6
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts
  20. 16
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue
  21. 2
      jeecgboot-vue3-master/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue
  22. 42
      jeecgboot-vue3-master/src/views/system/userTEA/PasswordModal.vue
  23. 45
      jeecgboot-vue3-master/src/views/system/userTEA/UserAgentModal.vue
  24. 184
      jeecgboot-vue3-master/src/views/system/userTEA/UserDrawer.vue
  25. 68
      jeecgboot-vue3-master/src/views/system/userTEA/UserQuitAgentModal.vue
  26. 110
      jeecgboot-vue3-master/src/views/system/userTEA/UserQuitModal.vue
  27. 138
      jeecgboot-vue3-master/src/views/system/userTEA/UserRecycleBinModal.vue
  28. 277
      jeecgboot-vue3-master/src/views/system/userTEA/index.vue
  29. 301
      jeecgboot-vue3-master/src/views/system/userTEA/user.api.ts
  30. 604
      jeecgboot-vue3-master/src/views/system/userTEA/user.data.ts
  31. 54
      jeecgboot-vue3-master/src/views/system/userTEA/userDetails.vue
  32. 272
      jeecgboot-vue3-master/src/views/system/userTEA/userZJ.api.ts
  33. 771
      jeecgboot-vue3-master/src/views/system/userTEA/userZJ.data.ts

@ -273,68 +273,20 @@ public class AnnualCompPoint implements Serializable {
/**
* 第1序
* 位次
*/
@ApiModelProperty(value = "第1序号")
@TableField(exist = false)
private Integer teamSeqFirst;
/**
* 第1序号比值
*/
@TableField(exist = false)
@ApiModelProperty(value = "第1序号比值")
private Integer teamSeqFirstVal;
/**
* 第2序号
*/
@TableField(exist = false)
@ApiModelProperty(value = "第1序号")
private Integer teamSeqSecond;
/**
* 第2序号比值
*/
@ApiModelProperty(value = "第2序号比值")
@TableField(exist = false)
private Integer teamSeqSecondVal;
/**
* 第3序号
*/
@ApiModelProperty(value = "第3序号")
@TableField(exist = false)
private Integer teamSeqThird;
/**
* 第3序号比值
*/
@ApiModelProperty(value = "第3序号比值")
@TableField(exist = false)
private Integer teamSeqThirdVal;
@Excel(name = "队员在队伍中的位次序号", width = 15)
@ApiModelProperty(value = "队员在队伍中的位次序号")
private Integer teamSeq;
/**
* 第4序号
*/
@ApiModelProperty(value = "第4序号")
@TableField(exist = false)
private Integer teamSeqFourth;
/**
* 第4序号比值
* 位次号比值
*/
@ApiModelProperty(value = "第4序号比值")
@TableField(exist = false)
private Integer teamSeqFourthVal;
/**
* 第5序号
*/
@ApiModelProperty(value = "第5序号")
@TableField(exist = false)
private Integer teamSeqFifth;
/**
* 第5序号比值
*/
@ApiModelProperty(value = "第5序号比值")
@TableField(exist = false)
private Integer teamSeqFifthVal;
@Excel(name = "队员在队伍中的位次序号比值", width = 15)
@ApiModelProperty(value = "队员在队伍中的位次序号比值")
private Integer teamSeqVal;
}

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
@ -14,15 +13,15 @@ import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.impl.AnnualCompServiceImpl;
import org.jeecg.modules.demo.annualcompaward.entity.AnnualCompAward;
import org.jeecg.modules.demo.annualcompaward.mapper.AnnualCompAwardMapper;
import org.jeecg.modules.demo.objLevel.entity.ObjLevel;
import org.jeecg.modules.demo.objLevel.service.impl.ObjLevelServiceImpl;
import org.jeecg.modules.demo.projectlevel.entity.Projectlevel;
import org.jeecg.modules.demo.projectlevel.service.IProjectlevelService;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.util.List;
@ -55,9 +54,6 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
@Autowired
private AnnualCompAwardMapper annualCompAwardMapper;
@Autowired
private ITeamSeqService teamSeqService;
/**
* 年度比赛项目 添加
*/
@ -268,17 +264,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
AnnualCompAward annualCompAward=new AnnualCompAward();
annualCompAward.setAnnucompid(annualCompPoint.getId());
annualCompAwardMapper.insert(annualCompAward);
//保存团队赛队员积分计算配置 add by zhc 8.22
teamSeqService.saveOrUpdate4TeamSeq(annualCompPoint);
return Result.OK("新增成功");
}
@Override
public Result<IPage<AnnualCompPoint>> pageList(AnnualCompPoint annualCompPoint, Integer pageNo, Integer pageSize, HttpServletRequest req) {
List<Projectlevel> levelList = projectlevelService.list();

@ -39,6 +39,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
* @Description: 个人比赛积分
@ -174,7 +175,8 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
}*/
//modify by zhc 8.23
score.set(ComputeUtils.mul2(baseScore, this.covertVal(annualCompPoint, e)));
List<TeamSeq> seqList = iTeamSeqService.list(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId, annualCompPoint.getId()));
score.set(ComputeUtils.mul2(baseScore, this.covertVal(seqList, e)));
PersonalCompScore bean = new PersonalCompScore();
bean.setAnnualCompId(annualCompId);
bean.setAnnualCompP(annualCompPoint.getId());
@ -228,27 +230,11 @@ public class PersonalCompScoreServiceImpl extends ServiceImpl<PersonalCompScoreM
* @author: z.h.c
* @date: 24/8/23 10:00
*/
double covertVal(AnnualCompPoint annualCompPoint, TeamManagement en) {
TeamSeq teamSeq = iTeamSeqService.getById(annualCompPoint.getId());
double covertVal(List<TeamSeq> teamSeq, TeamManagement en) {
Integer weightVal = 100;
if (!ObjectUtils.isEmpty(teamSeq)) {
switch (en.getTeamSeq()) {
case 1:
weightVal = teamSeq.getTeamSeqFifthVal();
break;
case 2:
weightVal = teamSeq.getTeamSeqSecondVal();
break;
case 3:
weightVal = teamSeq.getTeamSeqThirdVal();
break;
case 4:
weightVal = teamSeq.getTeamSeqFourthVal();
break;
case 5:
weightVal = teamSeq.getTeamSeqFifthVal();
break;
}
if (!ObjectUtils.isEmpty(teamSeq) && !ObjectUtils.isEmpty(en.getTeamSeq())) {
List<TeamSeq> seqSet = teamSeq.stream().filter(b -> b.getTeamSeq() == en.getTeamSeq()).collect(Collectors.toList());
weightVal = seqSet.get(0).getTeamSeqVal();
}
double val = ComputeUtils.div2(new Double(weightVal), ONE_HUNDRED);
return val;

@ -15,6 +15,10 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.anncomgrotop.entity.AnnComGroTop;
import org.jeecg.modules.demo.anncomgrotop.service.IAnnComGroTopService;
import org.jeecg.modules.demo.anncomgrotopp.entity.AnnComGroTopP;
import org.jeecg.modules.demo.anncomgrotopp.service.IAnnComGroTopPService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
@ -28,10 +32,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.chooseTopicPersion.entity.ChaoseTopicPersion;
import org.jeecg.modules.demo.chooseTopicPersion.service.IChaoseTopicPersionService;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.demo.scoresta.entity.ScoreSta;
import org.jeecg.modules.demo.scoresta.service.IScoreStaService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -75,6 +83,18 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
@Autowired
private IAnnualCompPointService annualCompPointService;
@Autowired
private IAnnComGroTopPService annComGroTopPService;
@Autowired
private IUpfilePersionService upfilePersionService;
@Autowired
private IChaoseTopicPersionService chaoseTopicPersionService;
@Autowired
private IAnnComGroTopService annComGroTopService;
/**
* 分页列表查询
@ -311,4 +331,114 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
return super.importExcel(request, response, AnnualCompGroup.class);
}
/**
* 自动分配作品
*
* @return
*/
@ApiOperation(value="自动分配作品", notes="自动分配作品")
@GetMapping(value = "/zdfpzp")
public Result<?> zdfpzp(AnnualCompGroup annualCompGroup, HttpServletRequest req) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<Comp> queryWrappercomp = new QueryWrapper<>();
queryWrappercomp.eq("comp_admin", user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if (list.size() == 0) {
return Result.error("分配失败,该用户无负责比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in("compid", ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if (listAnnual.size() == 0) {
return Result.error("分配失败,该用户无负责年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AnnualCompGroup> queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, req.getParameterMap());
queryWrapper.in(annualIds.size() != 0, "annal_comp", annualIds);
QueryWrapper<AnnualCompPoint> queryWrapperacp = new QueryWrapper<>();
queryWrapperacp.in("annual_comp_id", annualIds);
queryWrapperacp.eq("annual_comp_switch", "Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if (listacp.size() == 0) {
return Result.error("分配失败,该用户无负责年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size() != 0, "ann_comp_p", acpIds);
List<AnnualCompGroup> pageList = annualCompGroupService.list(queryWrapper);
if (pageList.size() == 0) {
return Result.error("分配失败,无可分配的专家组");
}
List<String> annualids = pageList.stream().map(AnnualCompGroup::getAnnal).collect(Collectors.toList());
List<String> annualcpids = pageList.stream().map(AnnualCompGroup::getAnnCompP).collect(Collectors.toList());
QueryWrapper<UpfilePersion> queryWrapperup = new QueryWrapper<>();
queryWrapperup.in("annual_id", annualids);
queryWrapperup.in("annual_comp_point_id", annualcpids);
queryWrapperup.eq("status", "0");
QueryWrapper<AnnComGroTopP> queryWrapperagt = new QueryWrapper<>();
//queryWrapperagt.eq("ann_com_gro_topid",xmtmid);
queryWrapperagt.in("annid", annualids);
queryWrapperagt.in("ann_com_p", annualcpids);
List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt);
String str = "";
for (int i = 0; i < listact.size(); i++) {
str = str + listact.get(i).getBmcode() + ",";
}
if (str != "") {
queryWrapperup.notIn("apply_code", str.split(","));
}
List<UpfilePersion> listup = upfilePersionService.list(queryWrapperup);
//作品的年度比赛项目必须和组的年度比赛项目相同才可以分配作品
for (int o = 0; o < listup.size(); o++) {
QueryWrapper<ChaoseTopicPersion> queryWrapperctp1 = new QueryWrapper<>();
queryWrapperctp1.eq("bmcode", listup.get(o).getApplyCode());
List<ChaoseTopicPersion> listctp1 = chaoseTopicPersionService.list(queryWrapperctp1);
if (listctp1.size() == 0) {
return Result.error(listup.get(o).getTopicName() + "未选题,绑定失败!");
}
}
//List<String> acgids = pageList.stream().map(AnnualCompGroup::getId).collect(Collectors.toList());
int upsum = listup.size();
int acgsum = pageList.size();
int pjz = upsum / acgsum;
int syz = upsum % acgsum;
for (int y = 0; y < pageList.size(); y++) {
QueryWrapper<AnnComGroTop> queryWrapperatp = new QueryWrapper<>();
queryWrapperatp.eq("ann_com_p_g", pageList.get(y).getId());
List<AnnComGroTop> listtop = annComGroTopService.list(queryWrapperatp);
int upnum = 0;
for (int i = 0; i < listup.size(); i++) {
if(upnum==pjz&&pjz!=0&&listup.size()>syz){
break;
}
for (int k = 0; k < listtop.size(); k++) {
QueryWrapper<ChaoseTopicPersion> queryWrapperctp = new QueryWrapper<>();
queryWrapperctp.eq("bmcode", listup.get(i).getApplyCode());
List<ChaoseTopicPersion> listctp = chaoseTopicPersionService.list(queryWrapperctp);
if (listtop.get(k).getTopid().equals(listctp.get(0).getTimul())) {
AnnComGroTopP annComGroTopP = new AnnComGroTopP();
annComGroTopP.setAnnComGroTopid(listtop.get(k).getId());
annComGroTopP.setBmcode(listup.get(i).getApplyCode());
annComGroTopP.setAnnid(listtop.get(k).getAnnid());
annComGroTopP.setAnnComP(listtop.get(k).getAnnComP());
annComGroTopP.setAnnComPG(listtop.get(k).getAnnComPG());
annComGroTopP.setTopicName(listup.get(i).getTopicName());
annComGroTopP.setTopid(listtop.get(k).getTopid());
annComGroTopPService.save(annComGroTopP);
listup.remove(i);
upnum++;
i=-1;
break;
}
}
}
}
return Result.OK("自动分配作品成功");
}
}

@ -0,0 +1,351 @@
package org.jeecg.modules.demo.seteacher.controller;
import java.util.*;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.PasswordUtil;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.demo.compexp.entity.CompExp;
import org.jeecg.modules.demo.expert.entity.Expert;
import org.jeecg.modules.demo.seteacher.entity.Seteacher;
import org.jeecg.modules.demo.seteacher.service.ISeteacherService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.service.ISysDictService;
import org.jeecg.modules.system.service.ISysRoleService;
import org.jeecg.modules.system.service.ISysUserRoleService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: seteacher
* @Author: jeecg-boot
* @Date: 2024-08-23
* @Version: V1.0
*/
@Api(tags="seteacher")
@RestController
@RequestMapping("/seteacher/seteacher")
@Slf4j
public class SeteacherController extends JeecgController<Seteacher, ISeteacherService> {
@Autowired
private ISeteacherService seteacherService;
@Autowired
private BaseCommonService baseCommonService;
@Autowired
private ISysUserService sysUserService;
@Autowired
private ISysUserRoleService sysUserRoleService;
@Autowired
private ISysRoleService sysRoleService;
@Autowired
private ISysDictService sysDictService;
/**
* 分页列表查询
*
* @param seteacher
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "seteacher-分页列表查询")
@ApiOperation(value="seteacher-分页列表查询", notes="seteacher-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<Seteacher>> queryPageList(Seteacher seteacher,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Seteacher> queryWrapper = QueryGenerator.initQueryWrapper(seteacher, req.getParameterMap());
Page<Seteacher> page = new Page<Seteacher>(pageNo, pageSize);
IPage<Seteacher> pageList = seteacherService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加教师信息
*
* @param seteacher
* @return
*/
@AutoLog(value = "seteacher-添加")
@ApiOperation(value="seteacher-添加", notes="seteacher-添加")
@RequiresPermissions("seteacher:seteacher:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody Seteacher seteacher) {
seteacherService.save(seteacher);
return Result.OK("添加成功!");
}
@RequestMapping(value = "/addTEA", method = RequestMethod.POST)
public Result<SysUser> addZJ(@RequestBody JSONObject jsonObject) {
LoginUser userss= (LoginUser) SecurityUtils.getSubject().getPrincipal();
//设置部门
String selectedDeparts ="";
//根据user查找角色
String roles = getRoleByUserId(userss.getId());
//如果是学校管理员就就找到当前设置的院系,如果是院系管理员就直接获取所在院系
if (roles.equals("superAdmin")){
selectedDeparts = jsonObject.getString("selecteddeparts");
}else{
String roleid =findroles(userss);
selectedDeparts = roleid;
}
Result<SysUser> result = new Result<SysUser>();
// String selectedRoles = jsonObject.getString("selectedroles");
String selectedRoles = "1731948288626339844";
String expSc = jsonObject.getString("expSc");
String expResume = jsonObject.getString("expResume");//简介
String expTitle = jsonObject.getString("expTitle");
String teamajor = jsonObject.getString("teamajor");//专业
String expXw = jsonObject.getString("expXw");//学位
String expZc = jsonObject.getString("expZc");//职称
String expYjfx = jsonObject.getString("expYjfx");//研究方向
String expCsgz = jsonObject.getString("expCsgz");//从事工作
try {
SysUser user = JSON.parseObject(jsonObject.toJSONString(), SysUser.class);
user.setCreateTime(new Date());//设置创建时间
String salt = oConvertUtils.randomGen(8);
user.setSalt(salt);
String passwordEncode = PasswordUtil.encrypt(user.getUsername(), user.getPassword(), salt);
user.setPassword(passwordEncode);
user.setStatus(1);
user.setDelFlag(CommonConstant.DEL_FLAG_0);
//用户表字段org_code不能在这里设置他的值
user.setOrgCode(null);
// 保存用户走一个service 保证事务
//获取租户ids
String relTenantIds = jsonObject.getString("relTenantIds");
sysUserService.saveUser(user, selectedRoles, selectedDeparts, relTenantIds);
baseCommonService.addLog("添加专家用户,username: " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
Seteacher expert = new Seteacher();
expert.setUserId(user.getId());
expert.setExpImg(user.getAvatar());
expert.setExpSc(expSc);
expert.setExpResume(expResume);
expert.setExpTitle(expTitle);
expert.setName(user.getRealname());
expert.setExpXw(expXw);//学位
expert.setExpZc(expZc);//职称
expert.setExpYjfx(expYjfx);//研究方向
expert.setExpCsgz(expCsgz);//从事工作
expert.setTeamajor(teamajor);//专业
seteacherService.save(expert);
result.success("添加成功!");
} catch (Exception e) {
log.error(e.getMessage(), e);
result.error500("操作失败");
}
return result;
}
//用于当前登录信息的部门设置
private String findroles(LoginUser userss) {
SysDict sysDict = sysDictService.query().eq("org_code",userss.getOrgCode()).one();
return sysDict.getId();
}
/**
* 1.2根据用户id获取用户角色信息
*
* @param userId
* @return
*/
public String getRoleByUserId(String userId) {
SysUserRole userRoleList = sysUserRoleService.query().eq("user_id", userId).one();
SysRole sysRole = sysRoleService.getById(userRoleList.getRoleId());
return sysRole.getRoleCode();
}
@RequestMapping(value = "/editTEA", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<SysUser> editZJ(@RequestBody JSONObject jsonObject,HttpServletRequest req) {
Result<SysUser> result = new Result<SysUser>();
try {
SysUser sysUser = sysUserService.getById(jsonObject.getString("id"));
baseCommonService.addLog("编辑用户,username: " +sysUser.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
if(sysUser==null) {
result.error500("未找到对应实体");
}else {
SysUser user = JSON.parseObject(jsonObject.toJSONString(), SysUser.class);
user.setUpdateTime(new Date());
//String passwordEncode = PasswordUtil.encrypt(user.getUsername(), user.getPassword(), sysUser.getSalt());
user.setPassword(sysUser.getPassword());
String roles = "1731948288626339844";
String departs = jsonObject.getString("selecteddeparts");
String expSc = jsonObject.getString("expSc");
String expResume = jsonObject.getString("expResume");
String expTitle = jsonObject.getString("expTitle");
String teamajor =jsonObject.getString("teamajor");
String expXw = jsonObject.getString("expXw");//学位
String expZc = jsonObject.getString("expZc");//职称
String expYjfx = jsonObject.getString("expYjfx");//研究方向
String expCsgz = jsonObject.getString("expCsgz");//从事工作
if(oConvertUtils.isEmpty(departs)){
//vue3.0前端只传递了departIds
departs=user.getDepartIds();
}
//用户表字段org_code不能在这里设置他的值
user.setOrgCode(null);
// 修改用户走一个service 保证事务
//获取租户ids
String relTenantIds = jsonObject.getString("relTenantIds");
sysUserService.editUser(user, roles, departs, relTenantIds);
Seteacher expert = new Seteacher();
QueryWrapper<Seteacher> queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap());
queryWrapper.eq("user_id",user.getId());
List<Seteacher> listex = seteacherService.list(queryWrapper);
expert = listex.get(0);
expert.setUserId(user.getId());
expert.setExpImg(user.getAvatar());
expert.setExpSc(expSc);
expert.setExpResume(expResume);
expert.setExpTitle(expTitle);
expert.setName(user.getRealname());
expert.setExpXw(expXw);//学位
expert.setTeamajor(teamajor);//专业
expert.setExpZc(expZc);//职称
expert.setExpYjfx(expYjfx);//研究方向
expert.setExpCsgz(expCsgz);//从事工作
seteacherService.updateById(expert);
result.success("修改成功!");
}
} catch (Exception e) {
log.error(e.getMessage(), e);
result.error500("操作失败");
}
return result;
}
/**
* 编辑
*
* @param seteacher
* @return
*/
@AutoLog(value = "seteacher-编辑")
@ApiOperation(value="seteacher-编辑", notes="seteacher-编辑")
@RequiresPermissions("seteacher:seteacher:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody Seteacher seteacher) {
seteacherService.updateById(seteacher);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "seteacher-通过id删除")
@ApiOperation(value="seteacher-通过id删除", notes="seteacher-通过id删除")
@RequiresPermissions("seteacher:seteacher:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
seteacherService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "seteacher-批量删除")
@ApiOperation(value="seteacher-批量删除", notes="seteacher-批量删除")
@RequiresPermissions("seteacher:seteacher:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.seteacherService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "seteacher-通过id查询")
@ApiOperation(value="seteacher-通过id查询", notes="seteacher-通过id查询")
@GetMapping(value = "/queryById")
public Result<Seteacher> queryById(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
Seteacher seteacher = new Seteacher();
QueryWrapper<Seteacher> queryWrapper = QueryGenerator.initQueryWrapper(seteacher, req.getParameterMap());
queryWrapper.eq("user_id",id);
seteacher=seteacherService.getOne(queryWrapper);
if(seteacher==null) {
return Result.error("未找到对应数据");
}
return Result.OK(seteacher);
}
/**
* 导出excel
*
* @param request
* @param seteacher
*/
@RequiresPermissions("seteacher:seteacher:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Seteacher seteacher) {
return super.exportXls(request, seteacher, Seteacher.class, "seteacher");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("seteacher:seteacher:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Seteacher.class);
}
}

@ -0,0 +1,102 @@
package org.jeecg.modules.demo.seteacher.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: seteacher
* @Author: jeecg-boot
* @Date: 2024-08-23
* @Version: V1.0
*/
@Data
@TableName("seteacher")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="seteacher对象", description="seteacher")
public class Seteacher implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**用户id*/
@Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id")
private String userId;
/**专家照片*/
@Excel(name = "专家照片", width = 15)
@ApiModelProperty(value = "专家照片")
private String expImg;
/**专家毕业院校*/
@Excel(name = "专家毕业院校", width = 15)
@ApiModelProperty(value = "专家毕业院校")
private String expSc;
/**简介*/
@Excel(name = "简介", width = 15)
@ApiModelProperty(value = "简介")
private String expResume;
/**专家学历*/
@Excel(name = "专家学历", width = 15)
@ApiModelProperty(value = "专家学历")
private String expTitle;
/**学位*/
@Excel(name = "学位", width = 15)
@ApiModelProperty(value = "学位")
private String expXw;
/**职称*/
@Excel(name = "职称", width = 15)
@ApiModelProperty(value = "职称")
private String expZc;
/**研究方向*/
@Excel(name = "研究方向", width = 15)
@ApiModelProperty(value = "研究方向")
private String expYjfx;
/**从事工作*/
@Excel(name = "从事工作", width = 15)
@ApiModelProperty(value = "从事工作")
private String expCsgz;
/**专家名称*/
@Excel(name = "专家名称", width = 15)
@ApiModelProperty(value = "专家名称")
private String name;
/**专业*/
@Excel(name = "专业", width = 15)
@ApiModelProperty(value = "专业")
private String teamajor;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.seteacher.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.seteacher.entity.Seteacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: seteacher
* @Author: jeecg-boot
* @Date: 2024-08-23
* @Version: V1.0
*/
public interface SeteacherMapper extends BaseMapper<Seteacher> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.seteacher.mapper.SeteacherMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.seteacher.service;
import org.jeecg.modules.demo.seteacher.entity.Seteacher;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: seteacher
* @Author: jeecg-boot
* @Date: 2024-08-23
* @Version: V1.0
*/
public interface ISeteacherService extends IService<Seteacher> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.seteacher.service.impl;
import org.jeecg.modules.demo.seteacher.entity.Seteacher;
import org.jeecg.modules.demo.seteacher.mapper.SeteacherMapper;
import org.jeecg.modules.demo.seteacher.service.ISeteacherService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: seteacher
* @Author: jeecg-boot
* @Date: 2024-08-23
* @Version: V1.0
*/
@Service
public class SeteacherServiceImpl extends ServiceImpl<SeteacherMapper, Seteacher> implements ISeteacherService {
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.teamseq.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -20,6 +21,9 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 团队赛队员积分计算配置
@ -57,6 +61,15 @@ public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService>
return Result.OK(pageList);
}
@ApiOperation(value = "团队赛队员积分计算配置-分页列表查询", notes = "团队赛队员积分计算配置-分页列表查询")
@GetMapping(value = "/listByPointId")
public Result<Object> queryPageList(String pointId) {
List<TeamSeq> list = teamSeqService.list(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId, pointId));
Map<String,Object> map = new LinkedHashMap<>();
map.put("records",list);
return Result.OK(map);
}
/**
* 添加
*
@ -72,6 +85,15 @@ public class TeamSeqController extends JeecgController<TeamSeq, ITeamSeqService>
return Result.OK("添加成功!");
}
@AutoLog(value = "团队赛队员积分计算配置-添加")
@ApiOperation(value = "团队赛队员积分计算配置-添加", notes = "团队赛队员积分计算配置-添加")
// @RequiresPermissions("teamseq:team_seq:add")
@PostMapping(value = "/saveOrUpdate4TeamSeq")
public Result<String> saveOrUpdate4TeamSeq(@RequestBody List<TeamSeq> seqList) {
teamSeqService.saveOrUpdate4TeamSeq(seqList);
return Result.OK("添加成功!");
}
/**
* 编辑
*

@ -68,61 +68,16 @@ public class TeamSeq implements Serializable {
@ApiModelProperty(value = "年度比赛项目id")
private String pointId;
/**
* 第1序号
*/
@Excel(name = "第1序号", width = 15)
@ApiModelProperty(value = "第1序号")
private Integer teamSeqFirst;
/**
* 第1序号比值
*/
@Excel(name = "第1序号比值", width = 15)
@ApiModelProperty(value = "第1序号比值")
private Integer teamSeqFirstVal;
/**
* 第2序号
*/
@ApiModelProperty(value = "第1序号")
private Integer teamSeqSecond;
/**
* 第2序号比值
*/
@ApiModelProperty(value = "第2序号比值")
private Integer teamSeqSecondVal;
/**
* 第3序号
*/
@ApiModelProperty(value = "第3序号")
private Integer teamSeqThird;
/**
* 第3序号比值
*/
@ApiModelProperty(value = "第3序号比值")
private Integer teamSeqThirdVal;
/**
* 第4序号
*/
@ApiModelProperty(value = "第4序号")
private Integer teamSeqFourth;
/**
* 第4序号比值
*/
@ApiModelProperty(value = "第4序号比值")
private Integer teamSeqFourthVal;
/**
* 第5序
* 位次号
*/
@ApiModelProperty(value = "第5序号")
private Integer teamSeqFifth;
@Excel(name = "队员在队伍中的位次序号", width = 15)
@ApiModelProperty(value = "队员在队伍中的位次序号")
private Integer teamSeq;
/**
* 第5序号比值
* 位次号比值
*/
@ApiModelProperty(value = "第5序号比值")
private Integer teamSeqFifthVal;
@Excel(name = "队员在队伍中的位次序号比值", width = 15)
@ApiModelProperty(value = "队员在队伍中的位次序号比值")
private Integer teamSeqVal;
}

@ -4,6 +4,8 @@ import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ITeamSeqService extends IService<TeamSeq> {
void saveOrUpdate4TeamSeq(AnnualCompPoint point);
void saveOrUpdate4TeamSeq(List<TeamSeq> list);
}

@ -1,7 +1,7 @@
package org.jeecg.modules.demo.teamseq.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.teamseq.entity.TeamSeq;
import org.jeecg.modules.demo.teamseq.mapper.TeamSeqMapper;
import org.jeecg.modules.demo.teamseq.service.ITeamSeqService;
@ -9,25 +9,26 @@ import org.jeecg.modules.demo.teamseq.vo.TeamSeqVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 团队赛队员积分计算配置
* @Author: jeecg-boot
* @Date: 2024-08-22
* @Date: 2024-08-22
* @Version: V1.0
*/
@Service
public class TeamSeqServiceImpl extends ServiceImpl<TeamSeqMapper, TeamSeq> implements ITeamSeqService {
@Override
public void saveOrUpdate4TeamSeq(AnnualCompPoint point) {
this.remove(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId,point.getId()));
TeamSeqVo vo = new TeamSeqVo();
BeanUtils.copyProperties(point,vo);
vo.setPointId(point.getId());
TeamSeq teamSeq = new TeamSeq();
BeanUtils.copyProperties(vo,teamSeq);
this.save(teamSeq);
public void saveOrUpdate4TeamSeq(List<TeamSeq> list) {
String pointId = list.get(0).getPointId();
this.remove(new LambdaQueryWrapper<TeamSeq>().eq(TeamSeq::getPointId, pointId));
// TeamSeqVo vo = new TeamSeqVo();
// BeanUtils.copyProperties(point, vo);
// vo.setPointId(point.getId());
// TeamSeq teamSeq = new TeamSeq();
// BeanUtils.copyProperties(vo, teamSeq);
this.saveBatch(list);
}
}

@ -25,6 +25,7 @@ import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService;
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup;
import org.jeecg.modules.demo.annualcompgroup.service.IAnnualCompGroupService;
import org.jeecg.modules.demo.chooseTopicPersion.entity.ChaoseTopicPersion;
import org.jeecg.modules.demo.chooseTopicPersion.service.IChaoseTopicPersionService;
import org.jeecg.modules.demo.comp.entity.Comp;
@ -96,6 +97,9 @@ public class UpfileGroupController extends JeecgController<UpfileGroup, IUpfileG
@Autowired
private IAnnComGroTopPService annComGroTopPService;
@Autowired
private IAnnualCompGroupService annualCompGroupService;
/**
* 分页列表查询
*
@ -215,9 +219,10 @@ public class UpfileGroupController extends JeecgController<UpfileGroup, IUpfileG
//去除已绑定作品id
List<String> zpidslisttemp = new ArrayList<>();
zpidslisttemp.addAll(zpidslist);
String ndbsxmid = annualCompGroupService.getById(xmtmid).getAnnCompP();
for (int h = 0 ; h < zpidslisttemp.size() ; h++){
QueryWrapper<AnnComGroTopP> queryWrappertpp = new QueryWrapper<>();
queryWrappertpp.eq("ann_com_p_g",xmtmid);
queryWrappertpp.eq("ann_com_p",ndbsxmid);
List<AnnComGroTopP> listtopp = annComGroTopPService.list(queryWrappertpp);
for (int r = 0 ; r < listtopp.size() ; r++){
if(listtopp.get(r).getBmcode().equals(upfilePersionService.getById(zpidslisttemp.get(h)).getApplyCode())){

@ -192,6 +192,44 @@ public class SysUserController {
return result;
}
/**
* 用于教师库管理
*
* @param user
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@RequiresPermissions("system:user:listAll")
@RequestMapping(value = "/listTEAAll", method = RequestMethod.GET)
public Result<IPage<SysUser>> listTEAAll(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
// String roleId = req.getParameter("roleId");
String roleId = "1731948288626339844";
String username = req.getParameter("username");
IPage<SysUser> pageList = sysUserService.getUserByRoleId(page,roleId,username);
//批量查询用户的所属部门
//step.1 先拿到全部的 useids
//step.2 通过 useids,一次性查询用户的所属部门名字
List<String> userIds = pageList.getRecords().stream().map(SysUser::getId).collect(Collectors.toList());
if (userIds != null && userIds.size() > 0) {
Map<String, String> useDepNames = sysUserService.getDepNamesByUserIds(userIds);
pageList.getRecords().forEach(item ->
{
item.setOrgCodeTxt(useDepNames.get(item.getId()));
});
}
result.setSuccess(true);
result.setResult(pageList);
return result;
}
/**
* 获取系统用户数据查询全部用户不做租户隔离
*

@ -44,9 +44,13 @@
</a-form-item>
</a-col>
<a-col :span="16">
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol" :wrapperCol="wrapperCol7">
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol"
:wrapperCol="wrapperCol7">
<a-radio-group v-model:value="formData.objLevel">
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{ item.name }}</a-radio>
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{
item.name
}}
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
@ -66,18 +70,21 @@
<a-col :span="11">
<a-form-item label="参与形式" v-bind="validateInfos.entryForm" :labelCol="labelCol"
:wrapperCol="wrapperCol8">
<j-dict-select-tag type="radio" v-model:value="formData.entryForm" placeholder="请选择参与形式" dict-code="joinType" />
<j-dict-select-tag type="radio" v-model:value="formData.entryForm"
placeholder="请选择参与形式" dict-code="joinType"/>
</a-form-item>
</a-col>
<a-col :span="6" v-if="formData.entryForm==='Y'">
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader" :labelCol="labelCol3"
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader"
:labelCol="labelCol3"
:wrapperCol="wrapperCol3">
<j-switch v-model:value="formData.requireLeader" :disabled="disabled"></j-switch>
</a-form-item>
</a-col>
<a-col :span="7" v-if="formData.entryForm==='Y'">
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName" :labelCol="labelCol3"
:wrapperCol="wrapperCol3" >
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName"
:labelCol="labelCol3"
:wrapperCol="wrapperCol3">
<j-switch type='radio' v-model:value="formData.requireTeamName" dictCode=""
placeholder="请选择是否需要队伍名称" :disabled="disabled"/>
</a-form-item>
@ -85,98 +92,22 @@
</a-row>
<a-row>
<a-col :span="12" v-if="formData.entryForm==='Y'">
<a-form-item label="队伍人数" v-bind="validateInfos.teamNumber">
<a-input-number v-model:value="formData.teamNumber" placeholder="请输入队伍人数"
style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.entryForm==='Y'">
<a-form-item label="指导老师人数" v-bind="validateInfos.teacherNumber">
<a-input-number v-model:value="formData.teacherNumber" placeholder="请输入指导老师人数"
style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第1编号" >
<a-input-number v-model:value="formData.teamSeqFirst" placeholder="请输入队伍第1编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第1编号比值" v-bind="formData.teamSeqFirstVal">
<a-input-number v-model:value="formData.teamSeqFirstVal" placeholder="请输入第1编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第2编号" v-bind="formData.teamSeqSecond">
<a-input-number v-model:value="formData.teamSeqSecond" placeholder="请输入队伍第2编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第2编号比值" v-bind="formData.teamSeqSecondVal">
<a-input-number v-model:value="formData.teamSeqSecondVal" placeholder="请输入第2编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第3编号" v-bind="formData.teamSeqThird">
<a-input-number v-model:value="formData.teamSeqThird" placeholder="请输入队伍第3编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第3编号比值" v-bind="formData.teamSeqThirdVal">
<a-input-number v-model:value="formData.teamSeqThirdVal" placeholder="请输入第3编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第4编号" v-bind="formData.teamSeqFourth">
<a-input-number v-model:value="formData.teamSeqFourth" placeholder="请输入队伍第4编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第4编号比值" v-bind="formData.teamSeqFourthVal">
<a-input-number v-model:value="formData.teamSeqFourthVal" placeholder="请输入第4编号比值"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.entryForm ==='Y'">
<a-col :span="12">
<a-form-item label="队伍第5编号" v-bind="formData.teamSeqFifth">
<a-input-number v-model:value="formData.teamSeqFifth" placeholder="请输入队伍第5编号" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="第5编号比值" v-bind="formData.teamSeqFifthVal">
<a-input-number v-model:value="formData.teamSeqFifthVal" placeholder="请输入第5编号比值"
style="width: 100%" />
<a-col :span="12" v-if="formData.entryForm==='Y'">
<a-form-item label="队伍人数" v-bind="validateInfos.teamNumber">
<a-input-number v-model:value="formData.teamNumber" placeholder="请输入队伍人数"
style="width: 100%" :disabled="disabled"/>
<a-button @click="showModel" type="primary">配置队伍位次比值</a-button>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="5">
<a-form-item label="是否报名" v-bind="validateInfos.requireApply" :labelCol="labelCol4"
:wrapperCol="wrapperCol4">
@ -186,7 +117,8 @@
<a-col :span="9" v-if="formData.requireApply==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.applyStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime" showTime
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -194,7 +126,8 @@
<a-col :span="9" v-if="formData.requireApply==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.applyEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime" showTime
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -212,7 +145,8 @@
<a-col :span="9" v-if="formData.requireTopic==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.topicStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime" showTime
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -220,7 +154,8 @@
<a-col :span="9" v-if="formData.requireTopic==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.topicEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime" showTime
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -229,7 +164,8 @@
<a-row>
<a-col :span="5">
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks" :labelCol="labelCol4"
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4">
<j-switch v-model:value="formData.requireUploadWorks" :disabled="disabled"></j-switch>
</a-form-item>
@ -238,7 +174,8 @@
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.uploadStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择上传作品开始时间" v-model:value="formData.uploadStartTime"
<a-date-picker placeholder="请选择上传作品开始时间"
v-model:value="formData.uploadStartTime"
showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -246,16 +183,19 @@
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.uploadEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择上传作品结束时间" v-model:value="formData.uploadEndTime" showTime
<a-date-picker placeholder="请选择上传作品结束时间"
v-model:value="formData.uploadEndTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24" v-if="formData.requireUploadWorks==='Y'">
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType" :labelCol="labelCol6"
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType"
:labelCol="labelCol6"
:wrapperCol="wrapperCol6">
<j-select-multiple type="list_multi" v-model:value="formData.uploadWorksType"
dictCode="updateWorksType" placeholder="请选择上传作品类型" :disabled="disabled"
dictCode="updateWorksType" placeholder="请选择上传作品类型"
:disabled="disabled"
:triggerChange="false"/>
</a-form-item>
</a-col>
@ -270,7 +210,8 @@
<a-col :span="9" v-if="formData.requireScore==='Y'">
<a-form-item label="开始时间" v-bind="validateInfos.scoreStartTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime" showTime
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -278,7 +219,8 @@
<a-col :span="9" v-if="formData.requireScore==='Y'">
<a-form-item label="结束时间" v-bind="validateInfos.scoreEndTime" :labelCol="labelCol5"
:wrapperCol="wrapperCol5">
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime" showTime
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime"
showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"
:disabled="disabled"/>
</a-form-item>
@ -296,10 +238,42 @@
</a-row>
</a-form>
</a-spin>
<BasicModal
v-bind="$attrs"
@register="register"
title="比值配置"
:height="800"
:width="800"
:footer="null"
>
<!-- <div v-for="(item,index) in num" :key="index">-->
<!-- <a-input-number v-model="item.index"></a-input-number>-->
<!-- <a-input-number v-model="item.value"></a-input-number>-->
<!-- <a-button @click="delNum(index)">删除</a-button>-->
<!-- </div>-->
<!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>-->
<!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>-->
<JVxeTable
toolbar
:toolbarConfig="toolbarConfig"
rowNumber
rowSelection
keepSource
asyncRemove
:height="340"
:loading="loading"
:columns="columns"
:dataSource="dataSource"
@save="handleTableSave"
@removed="handleTableRemove"
/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted} from 'vue';
import {BasicModal, useModal} from '/@/components/Modal';
import {computed, defineExpose, defineProps, nextTick, onMounted, reactive, ref} from 'vue';
import {defHttp} from '/@/utils/http/axios';
import {useMessage} from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
@ -307,8 +281,146 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
import {getValueType} from '/@/utils';
import {saveOrUpdate, getProjectlevel} from '../AnnualCompPoint.api';
import {getProjectlevel, saveOrUpdate} from '../AnnualCompPoint.api';
import {Form} from 'ant-design-vue';
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const realForm = ref();
import {JVxeTable} from '/@/components/jeecg/JVxeTable';
import {JVxeColumn, JVxeTypes} from '/@/components/jeecg/JVxeTable/types';
import {result} from "lodash-es";
//
const loading = ref(false);
//
const selectedRows = ref<Recordable[]>([]);
//
const dataSource = ref<Recordable[]>([]);
//
const toolbarConfig = reactive({
// add remove clearSelection
btn: ['add', 'save', 'remove', 'clearSelection'],
});
//
const columns = ref<JVxeColumn[]>([
// { key: 'num', title: '', width: 80, type: JVxeTypes.normal },
// { key: 'pointId', title: 'id', width: 80, type: JVxeTypes.hidden,},
{ key: 'teamSeq', title: '位次号', width: 180, type: JVxeTypes.inputNumber,
placeholder: '请输入${title}',
validateRules: [
{
required: true, //
message: '请输入${title}', //
}
],
},
{
title: '比值',
key: 'teamSeqVal',
type: JVxeTypes.inputNumber,
width: 180,
defaultValue: 100,
placeholder: '请输入${title}',
validateRules: [
{
required: true, //
message: '请输入${title}', //
}
],
},
])
// url
enum Api {
getData = '/teamSeq/listByPointId',
//
saveRow = '/mock/vxe/immediateSaveRow',
//
saveAll = '/teamSeq/saveOrUpdate4TeamSeq',
}
//
function loadData() {
// alert(formData.id)
// loading.value = true;
//
defHttp.get({
//
url: Api.getData,
// //
params: {
pointId: formData.id
// pageNo: pagination.current,
// pageSize: pagination.pageSize,
},
}).then((result) => {
// total
// pagination.total = result.total;
// dataSource
dataSource.value = result.records;
//
selectedRows.value = [];
}).finally(() => {
// loading
loading.value = false;
});
}
function handleTableSave({$table, target}) {
//
$table.validate().then((errMap) => {
//
if (!errMap) {
//
let tableData = target.getTableData();
// console.log('$table', $table);
// console.log('target', target);
console.log('当前保存的数据(tableData)是:', JSON.stringify(tableData));
tableData.forEach(item => {
item.pointId = formData.id
})
//
// let newData = target.getNewData();
// console.log('-- ', newData);
// for (let itemindex = 0; itemindex < newData.length; itemindex++) {
// this.$set(jsonObject, newData[itemindex].key+"", newData[itemindex].value+"");
// }
//
// loading.value = true;
defHttp
.post({
url: Api.saveAll,
params: tableData,
})
.then(() => {
// createMessage.success(``);
})
.finally(() => {
// loading.value = false;
});
}
});
}
//
function handleTableRemove(event) {
// event.deleteRows
console.log('待删除的数据: ', event.deleteRows);
// IDID
let deleteIds = event.deleteRows.map((row) => row.id);
console.log('待删除的数据ids: ', deleteIds);
//
loading.value = true;
window.setTimeout(() => {
loading.value = false;
createMessage.success('删除成功');
// confirmRemove()
event.confirmRemove();
}, 1000);
}
const props = defineProps({
// objLevelll: { type: Array, default: () => [] },
formDisabled: {type: Boolean, default: false},
@ -318,11 +430,30 @@ const props = defineProps({
},
formBpm: {type: Boolean, default: true}
});
const [register, {openModal}] = useModal();
// const [register, { closeModal, setModalProps,openModal }] = useModalInner();
const showModel = () => {
loadData();
openModal()
}
let num = ref([
{
value: '',
index: 1
}
])
const addNum = () => {
num.value.push({value: '', index: num.value.length})
}
const delNum = (index) => {
num.value.splice(index, 1)
}
const objLevelll = ref([])
const getProjectlevelEvent = async() => {
const getProjectlevelEvent = async () => {
const res = await getProjectlevel()
objLevelll.value = res
console.log(res,'2222')
console.log(res, '2222')
}
getProjectlevelEvent()
const formRef = ref();
@ -356,16 +487,6 @@ const formData = reactive<Record<string, any>>({
uploadEndTime: '',
scoreStartTime: '',
scoreEndTime: '',
teamSeqFirst: 1,
teamSeqSecond: 2,
teamSeqThird: 3,
teamSeqFourth: 4,
teamSeqFifth: 5,
teamSeqFifthVal: '',
teamSeqFourthVal: '',
teamSeqThirdVal: '',
teamSeqSecondVal: '',
teamSeqFirstVal: '',
});
const {createMessage} = useMessage();
const labelCol = ref<any>({xs: {span: 24}, sm: {span: 6}});
@ -421,7 +542,7 @@ function add() {
if (props.objLevelll.length !== 0) {
formData.objLevel = props.objLevelll[0].id;
}
edit({ ...formData });
edit({...formData});
}
/**

@ -13,6 +13,12 @@ enum Api {
exportXls = '/annualcompgroup/annualCompGroup/exportXls',
queryCompId = '/annualcompgroup/annualCompGroup/queryCompId',
saveTop = '/topic/topic/szadd',
zdfpzp = '/annualcompgroup/annualCompGroup/zdfpzp',
}
export const zdfpzp = () => {
let url = Api.zdfpzp;
return defHttp.get({ url: url}, { isTransformResponse: false });
}
/**

@ -36,6 +36,7 @@
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
<a-button type="primary" @click="zdfpzpbu" preIcon="ant-design:plus-outlined"> 自动分配作品</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -78,18 +79,20 @@
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './AnnualCompGroup.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,saveOrUpdateTop } from './AnnualCompGroup.api';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,saveOrUpdateTop,zdfpzp } from './AnnualCompGroup.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import AnnualCompGroupModal from './components/AnnualCompGroupModal.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
import {saveOrUpdate} from "/@/views/anncomgrotop/components/Topic.api";
import {defHttp} from "/@/utils/http/axios";
import {useMessage} from "../../hooks/web/useMessage";
const router = useRouter();
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const { createMessage } = useMessage();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
@ -134,6 +137,17 @@
registerModal.value.add();
}
function zdfpzpbu() {
zdfpzp()
.then((res) => {
if (res.success) {
createMessage.success(res.message);
} else {
createMessage.warning(res.message);
}
});
}
/**
* 编辑事件
*/

@ -59,7 +59,7 @@
const dataSource = ref<Recordable[]>([]);
//
const columns = ref<JVxeColumn[]>([
{ key: 'num', title: '序号', width: 80, type: JVxeTypes.normal },
{ key: 'num', title: '序号22', width: 80, type: JVxeTypes.normal },
{
// key
key: 'ship_name',

@ -0,0 +1,42 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" title="修改密码" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" name="PassWordModal" setup>
import { ref, computed, unref } from 'vue';
import { BasicModal, useModalInner } from '/src/components/Modal';
import { BasicForm, useForm } from '/src/components/Form';
import { formPasswordSchema } from './user.data';
import { changePassword } from './user.api';
// Emits
const emit = defineEmits(['success', 'register']);
//
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
schemas: formPasswordSchema,
showActionButtonGroup: false,
});
//
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({ confirmLoading: false });
//
await setFieldsValue({ ...data });
});
//
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
//
await changePassword(values);
//
closeModal();
//
emit('success');
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>

@ -0,0 +1,45 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :width="800" title="用户代理" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue';
import { BasicModal, useModalInner } from '/src/components/Modal';
import { BasicForm, useForm } from '/src/components/Form';
import { formAgentSchema } from './user.data';
import { getUserAgent, saveOrUpdateAgent } from './user.api';
// Emits
const emit = defineEmits(['success', 'register']);
//
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
schemas: formAgentSchema,
showActionButtonGroup: false,
});
//
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({ confirmLoading: false });
//
const res = await getUserAgent({ userName: data.userName });
data = res.result ? res.result : data;
//
await setFieldsValue({ ...data });
});
//
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
//
await saveOrUpdateAgent(values);
//
closeModal();
//
emit('success');
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>

@ -0,0 +1,184 @@
<template>
<BasicDrawer
v-bind="$attrs"
@register="registerDrawer"
:title="getTitle"
:width="adaptiveWidth"
@ok="handleSubmit"
:showFooter="showFooter"
destroyOnClose
>
<BasicForm @register="registerForm" />
</BasicDrawer>
</template>
<script lang="ts" setup>
import { defineComponent, ref, computed, unref, useAttrs } from 'vue';
import { BasicForm, useForm } from '/src/components/Form';
import { formSchema } from './user.data';
import { BasicDrawer, useDrawerInner } from '/src/components/Drawer';
import { saveOrUpdateUser, getUserRoles, getUserDepartList, getAllRolesListNoByExcludeTenant, getAllRolesList } from './user.api';
import { useDrawerAdaptiveWidth } from '/src/hooks/jeecg/useAdaptiveWidth';
import { getTenantId } from "/src/utils/auth";
import {saveOrUpdateUserZJ} from "./userZJ.api";
import {queryExpertById} from "./userZJ.api";
// Emits
const emit = defineEmits(['success', 'register']);
const attrs = useAttrs();
const isUpdate = ref(true);
const rowId = ref('');
const departOptions = ref([]);
//
const [registerForm, { setProps, resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 90,
schemas: formSchema,
showActionButtonGroup: false,
});
// TODO [VUEN-527] https://www.teambition.com/task/6239beb894b358003fe93626
const showFooter = ref(true);
//
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
await resetFields();
showFooter.value = data?.showFooter ?? true;
setDrawerProps({ confirmLoading: false, showFooter: showFooter.value });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
rowId.value = data.record.id;
//
if (data.record.relTenantIds && !Array.isArray(data.record.relTenantIds)) {
data.record.relTenantIds = data.record.relTenantIds.split(',');
} else {
//issues/I56C5I
//data.record.relTenantIds = [];
}
////try catch
try {
const userRoles = await getUserRoles({ userid: data.record.id });
if (userRoles && userRoles.length > 0) {
data.record.selectedroles = userRoles;
}
} catch (error) {}
try {
const Expert = await queryExpertById({ id: data.record.id });
console.log(Expert);
if (Expert!=null) {
data.record.expSc = Expert.expSc;
data.record.expResume = Expert.expResume;
data.record.expTitle = Expert.expTitle;
data.record.compid = Expert.compid;
data.record.compName = Expert.compName;
data.record.stat = Expert.stat;
data.record.teamajor = Expert.teamajor;
data.record.expXw = Expert.expXw;
data.record.expZc = Expert.expZc;
data.record.expYjfx = Expert.expYjfx;
data.record.expCsgz = Expert.expCsgz;
}
} catch (error) {}
///
const userDepart = await getUserDepartList({ userId: data.record.id });
if (userDepart && userDepart.length > 0) {
data.record.selecteddeparts = userDepart;
let selectDepartKeys = Array.from(userDepart, ({ key }) => key);
data.record.selecteddeparts = selectDepartKeys.join(',');
departOptions.value = userDepart.map((item) => {
return { label: item.title, value: item.key };
});
}
///
data.record.departIds && !Array.isArray(data.record.departIds) && (data.record.departIds = data.record.departIds.split(','));
//update-begin---author:zyf Date:20211210 for------------
data.record.departIds = data.record.departIds == '' ? [] : data.record.departIds;
//update-begin---author:zyf Date:20211210 for------------
}
//()
data.selectedroles && (await setFieldsValue({ selectedroles: data.selectedroles }));
////
updateSchema([
{
field: 'password',
show: !unref(isUpdate),
},
{
field: 'confirmPassword',
ifShow: !unref(isUpdate),
},
// {
// field: 'selectedroles',
// show: !data.isRole,
// },
{
field: 'departIds',
componentProps: { options: departOptions },
},
{
field: 'selecteddeparts',
show: !data?.departDisabled ?? false,
},
// {
// field: 'selectedroles',
// show:false,
// },
{
field: 'selectedroles',
show: !data?.departDisabled ?? false,
//update-begin---author:wangshuai ---date:20230424 forissues/4844------------
//
componentProps:{
api: data.tenantSaas?getAllRolesList:getAllRolesListNoByExcludeTenant
}
//update-end---author:wangshuai ---date:20230424 forissues/4844------------
},
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------
{
field: 'relTenantIds',
componentProps:{
disabled: !!data.tenantSaas,
},
},
//update-end---author:wangshuai ---date:20230522 forissues/4935------------
]);
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------
if(!unref(isUpdate) && data.tenantSaas){
await setFieldsValue({ relTenantIds: getTenantId().toString() })
}
//update-end---author:wangshuai ---date:20230522 forissues/4935------------
//
if (typeof data.record === 'object') {
setFieldsValue({
...data.record,
});
}
//
//update-begin-author:taoyan date:2022-5-24 for: VUEN-1117issue0523
setProps({ disabled: !showFooter.value });
//update-end-author:taoyan date:2022-5-24 for: VUEN-1117issue0523
});
//
const getTitle = computed(() => (!unref(isUpdate) ? '新增用户' : '编辑用户'));
const { adaptiveWidth } = useDrawerAdaptiveWidth();
//
async function handleSubmit() {
try {
let values = await validate();
setDrawerProps({ confirmLoading: true });
values.userIdentity === 1 && (values.departIds = '');
let isUpdateVal = unref(isUpdate);
//
await saveOrUpdateUserZJ(values, isUpdateVal);
//
closeDrawer();
//
emit('success',{isUpdateVal ,values});
} finally {
setDrawerProps({ confirmLoading: false });
}
}
</script>

@ -0,0 +1,68 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :width="800" title="离职交接" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="user-quit-agent-modal">
import { BasicModal, useModalInner } from '/src/components/Modal';
import { BasicForm, useForm } from '/src/components/Form';
import { formQuitAgentSchema } from './user.data';
import { getUserAgent, userQuitAgent } from './user.api';
import dayjs from 'dayjs';
// Emits
const emit = defineEmits(['success', 'register']);
//
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate }] = useForm({
schemas: formQuitAgentSchema,
showActionButtonGroup: false,
});
//
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({ confirmLoading: false });
setModalProps({ confirmLoading: false });
//
const res = await getUserAgent({ userName: data.userName });
data = res.result ? res.result : data;
let date = new Date();
if (!data.startTime) {
data.startTime = dayjs(date).format('YYYY-MM-DD HH:mm:ss');
}
if (!data.endTime) {
data.endTime = getYear(date);
}
//
await setFieldsValue({ ...data });
});
//
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
//
await userQuitAgent(values);
//
closeModal();
//
emit('success');
} finally {
setModalProps({ confirmLoading: false });
}
}
/**
* 获取后30年
*/
function getYear(date) {
//update-begin---author:wangshuai ---date:20221207 for[QQYUN-3285] ------------
//
let y = date.getFullYear() + 30;
let m = dayjs(date).format('MM');
let d = dayjs(date).format('DD');
let hour = dayjs(date).format('HH:mm:ss');
console.log('年月日', y + '-' + m + '-' + d);
return dayjs(y + '-' + m + '-' + d + ' ' + hour).format('YYYY-MM-DD HH:mm:ss');
//update-end---author:wangshuai ---date:20221207 for[QQYUN-3285] --------------
}
</script>

@ -0,0 +1,110 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" title="离职人员信息" :showOkBtn="false" width="1000px" destroyOnClose>
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleRevert">
<Icon icon="ant-design:redo-outlined"></Icon>
批量取消
</a-menu-item>
</a-menu>
</template>
<a-button
>批量操作
<Icon icon="ant-design:down-outlined"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
</BasicModal>
</template>
<script lang="ts" setup name="user-quit-modal">
import { ref, toRaw, unref } from 'vue';
import { BasicModal, useModalInner } from '/src/components/Modal';
import { BasicTable, useTable, TableAction } from '/src/components/Table';
import { recycleColumns } from './user.data';
import { getQuitList, putCancelQuit, deleteRecycleBin } from './user.api';
import { useMessage } from '/src/hooks/web/useMessage';
import { useListPage } from '/src/hooks/system/useListPage';
import { Modal } from 'ant-design-vue';
import { defHttp } from '/src/utils/http/axios';
const { createConfirm } = useMessage();
// Emits
const emit = defineEmits(['success', 'register']);
const checkedKeys = ref<Array<string | number>>([]);
const [registerModal] = useModalInner(() => {
checkedKeys.value = [];
});
//table
const { prefixCls, tableContext } = useListPage({
tableProps: {
api: getQuitList,
columns: recycleColumns,
rowKey: 'id',
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
},
},
});
//table
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
/**
* 取消离职事件
* @param record
*/
async function handleCancelQuit(record) {
await putCancelQuit({ userIds: record.id, usernames: record.username }, reload);
emit('success');
}
/**
* 批量取消离职事件
*/
function batchHandleRevert() {
Modal.confirm({
title: '取消离职',
content: '取消离职交接人也会清空',
okText: '确认',
cancelText: '取消',
onOk: () => {
let rowValue = selectedRows.value;
let rowData: any = [];
for (const value of rowValue) {
rowData.push(value.username);
}
handleCancelQuit({ id: toRaw(unref(selectedRowKeys)).join(','), username: rowData.join(',') });
},
});
}
//
function getTableAction(record) {
return [
{
label: '取消离职',
icon: 'ant-design:redo-outlined',
popConfirm: {
title: '是否取消离职,取消离职交接人也会清空',
confirm: handleCancelQuit.bind(null, record),
},
},
];
}
</script>
<style scoped lang="less">
:deep(.ant-popover-inner-content){
width: 185px !important;
}
</style>

@ -0,0 +1,138 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" title="用户回收站" :showOkBtn="false" width="1000px" destroyOnClose>
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
批量删除
</a-menu-item>
<a-menu-item key="1" @click="batchHandleRevert">
<Icon icon="ant-design:redo-outlined"></Icon>
批量还原
</a-menu-item>
</a-menu>
</template>
<a-button
>批量操作
<Icon icon="ant-design:down-outlined"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction :actions="getTableAction(record)" />
</template>
</template>
</BasicTable>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, toRaw, unref } from 'vue';
import { BasicModal, useModalInner } from '/src/components/Modal';
import { BasicTable, useTable, TableAction } from '/src/components/Table';
import { recycleColumns } from './user.data';
import { getRecycleBinList, putRecycleBin, deleteRecycleBin } from './user.api';
import { useMessage } from '/src/hooks/web/useMessage';
const { createConfirm } = useMessage();
// Emits
const emit = defineEmits(['success', 'register']);
const checkedKeys = ref<Array<string | number>>([]);
const [registerModal] = useModalInner(() => {
checkedKeys.value = [];
});
//table
const [registerTable, { reload }] = useTable({
api: getRecycleBinList,
columns: recycleColumns,
rowKey: 'id',
striped: true,
useSearchForm: false,
showTableSetting: false,
clickToRowSelect: false,
bordered: true,
showIndexColumn: false,
pagination: true,
tableSetting: { fullScreen: true },
canResize: false,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
// slots: { customRender: 'action' },
fixed: undefined,
},
});
/**
* 选择列配置
*/
const rowSelection = {
type: 'checkbox',
columnWidth: 50,
selectedRowKeys: checkedKeys,
onChange: onSelectChange,
};
/**
* 选择事件
*/
function onSelectChange(selectedRowKeys: (string | number)[]) {
checkedKeys.value = selectedRowKeys;
}
/**
* 还原事件
*/
async function handleRevert(record) {
await putRecycleBin({ userIds: record.id }, reload);
emit('success');
}
/**
* 批量还原事件
*/
function batchHandleRevert() {
handleRevert({ id: toRaw(unref(checkedKeys)).join(',') });
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteRecycleBin({ userIds: record.id }, reload);
}
/**
* 批量删除事件
*/
function batchHandleDelete() {
createConfirm({
iconType: 'warning',
title: '删除',
content: '确定要永久删除吗?删除后将不可恢复!',
onOk: () => handleDelete({ id: toRaw(unref(checkedKeys)).join(',') }),
onCancel() {},
});
}
//
function getTableAction(record) {
return [
{
label: '取回',
icon: 'ant-design:redo-outlined',
popConfirm: {
title: '是否确认还原',
confirm: handleRevert.bind(null, record),
},
},
{
label: '彻底删除',
icon: 'ant-design:scissor-outlined',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
];
}
</script>

@ -0,0 +1,277 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleCreate"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls" >导入</j-upload-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXlsMb"> 导入模板</a-button>
<JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" />
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
<a-menu-item key="2" @click="batchFrozen(2)">
<Icon icon="ant-design:lock-outlined"></Icon>
冻结
</a-menu-item>
<a-menu-item key="3" @click="batchFrozen(1)">
<Icon icon="ant-design:unlock-outlined"></Icon>
解冻
</a-menu-item>
</a-menu>
</template>
<a-button
>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template>
</BasicTable>
<!--用户抽屉-->
<UserDrawer @register="registerDrawer" @success="handleSuccess" />
<!--修改密码-->
<PasswordModal @register="registerPasswordModal" @success="reload" />
</div>
</template>
<script lang="ts" name="system-user" setup>
//ts
import { ref, computed, unref } from 'vue';
import { BasicTable, TableAction, ActionItem } from '/src/components/Table';
import UserDrawer from './UserDrawer.vue';
import UserRecycleBinModal from './UserRecycleBinModal.vue';
import PasswordModal from './PasswordModal.vue';
import JThirdAppButton from '/src/components/jeecg/thirdApp/JThirdAppButton.vue';
import { useDrawer } from '/src/components/Drawer';
import { useListPage } from '/src/hooks/system/useListPage';
import { useModal } from '/src/components/Modal';
import { useMessage } from '/src/hooks/web/useMessage';
import { columns, searchFormSchema } from './user.data';
import { listZjNoCareTenant, deleteUser, batchDeleteUser, getZjImportUrl, getExportZjUrl, frozenBatch, syncUser,queryByUserId,getExportZjUrlMb } from './user.api';
import {usePermission} from "/src/hooks/web/usePermission";
import {defHttp} from "../../../utils/http/axios";
const { createMessage, createConfirm } = useMessage();
const { isDisabledAuth } = usePermission();
//drawer
const [registerDrawer, { openDrawer }] = useDrawer();
//model
const [registerPasswordModal, { openModal: openPasswordModal }] = useModal();
//
const { prefixCls, tableContext, onExportXls, onImportXls,onExportXlsMb } = useListPage({
designScope: 'user-list',
tableProps: {
title: '用户列表',
api: listZjNoCareTenant,
columns: columns,
size: 'small',
formConfig: {
// labelWidth: 200,
schemas: searchFormSchema,
},
actionColumn: {
width: 120,
},
beforeFetch: (params) => {
return Object.assign({ column: 'createTime', order: 'desc' }, params);
},
},
exportConfig: {
name: '专家列表',
url: getExportZjUrl,
},
/* exportConfigMb: {
name: "导入模板",
url: getExportZjUrlMb,
params: null,
},*/
importConfig: {
url: getZjImportUrl,
},
});
//table
const [registerTable, { reload, updateTableDataRecord }, { rowSelection, selectedRows, selectedRowKeys }] = tableContext;
/**
* 新增事件
*/
function handleCreate() {
openDrawer(true, {
isUpdate: false,
showFooter: true,
tenantSaas: false,
});
}
/**
* 编辑事件
*/
async function handleEdit(record: Recordable) {
await queryByUserId({ id: record.id }).then(res => {
openDrawer(true, {
record,
isUpdate: true,
showFooter: true,
tenantSaas: false,
});
});
}
/**
* 详情
*/
async function handleDetail(record: Recordable) {
await queryByUserId({ id: record.id }).then(res => {
openDrawer(true, {
record,
isUpdate: true,
showFooter: false,
tenantSaas: false,
});
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
if ('admin' == record.username) {
createMessage.warning('管理员账号不允许此操作!');
return;
}
await deleteUser({ id: record.id }, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
let hasAdmin = unref(selectedRows).filter((item) => item.username == 'admin');
if (unref(hasAdmin).length > 0) {
createMessage.warning('管理员账号不允许此操作!');
return;
}
await batchDeleteUser({ ids: selectedRowKeys.value }, () => {
selectedRowKeys.value = [];
reload();
});
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 打开修改密码弹窗
*/
function handleChangePassword(username) {
openPasswordModal(true, { username });
}
/**
* 冻结解冻
*/
async function handleFrozen(record, status) {
if ('admin' == record.username) {
createMessage.warning('管理员账号不允许此操作!');
return;
}
await frozenBatch({ ids: record.id, status: status }, reload);
}
/**
* 批量冻结解冻
*/
function batchFrozen(status) {
let hasAdmin = selectedRows.value.filter((item) => item.username == 'admin');
if (unref(hasAdmin).length > 0) {
createMessage.warning('管理员账号不允许此操作!');
return;
}
createConfirm({
iconType: 'warning',
title: '确认操作',
content: '是否' + (status == 1 ? '解冻' : '冻结') + '选中账号?',
onOk: async () => {
await frozenBatch({ ids: unref(selectedRowKeys).join(','), status: status }, reload);
},
});
}
/**
* 操作栏
*/
function getTableAction(record): ActionItem[] {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
// ifShow: () => hasPermission('system:user:edit'),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(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,
popConfirm: {
title: '确定冻结吗?',
confirm: handleFrozen.bind(null, record, 2),
},
},
{
label: '解冻',
ifShow: record.status == 2,
popConfirm: {
title: '确定解冻吗?',
confirm: handleFrozen.bind(null, record, 1),
},
},
];
}
</script>
<style scoped></style>

@ -0,0 +1,301 @@
import { defHttp } from '/src/utils/http/axios';
import { Modal } from 'ant-design-vue';
enum Api {
listNoCareTenant = '/sys/user/listAll',
listZjNoCareTenant = '/sys/user/listTEAAll',
listzdzx = '/sys/user/listzdzx',
list = '/sys/user/list',
save = '/sys/user/add',
edit = '/sys/user/edit',
saveZJ = '/seteacher/seteacher/addTEA',
editZJ = '/expert/expert/editZJ',
queryExpertById = '/expert/expert/queryById',
agentSave = '/sys/sysUserAgent/add',
agentEdit = '/sys/sysUserAgent/edit',
getUserRole = '/sys/user/queryUserRole',
duplicateCheck = '/sys/duplicate/check',
deleteUser = '/sys/user/delete',
deleteBatch = '/sys/user/deleteBatch',
importExcel = '/sys/user/importExcel',
exportXls = '/sys/user/exportXls',
recycleBinList = '/sys/user/recycleBin',
putRecycleBin = '/sys/user/putRecycleBin',
deleteRecycleBin = '/sys/user/deleteRecycleBin',
allRolesList = '/sys/role/queryall',
allRolesListNoByTenant = '/sys/role/queryallNoByTenant',
allRolesListExcludeByTenant = '/sys/role/queryallExcludeByTenant',
allTenantList = '/sys/tenant/queryList',
allPostList = '/sys/position/list',
userDepartList = '/sys/user/userDepartList',
changePassword = '/sys/user/changePassword',
frozenBatch = '/sys/user/frozenBatch',
getUserAgent = '/sys/sysUserAgent/queryByUserName',
syncUser = '/act/process/extActProcess/doSyncUser',
userQuitAgent = '/sys/user/userQuitAgent',
getQuitList = '/sys/user/getQuitList',
putCancelQuit = '/sys/user/putCancelQuit',
updateUserTenantStatus='/sys/tenant/updateUserTenantStatus',
getUserTenantPageList='/sys/tenant/getUserTenantPageList',
exportXlsMb = '/sys/user/exportXlsMb',
//导出专家
exportZjXls = '/expert/expert/exportXls',
//导出专家模板
exportZjXlsMb = '/expert/expert/exportXlsMb',
//导入专家
getZjImportUrl = '/expert/expert/importExcel',
queryByUserId = '/expert/expert/queryByUserId',
}
/**
* userid判断是否为专家
* @param params
*/
export const queryByUserId = (params) => {
return defHttp.get({ url: Api.queryByUserId, params },{ successMessageMode: 'none' });
};
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
export const getExportUrlMb = Api.exportXlsMb;
/**
*
*/
export const getExportZjUrl = Api.exportZjXls;
/**
*
*/
export const getExportZjUrlMb = Api.exportZjXlsMb;
/**
*
*/
export const getZjImportUrl = Api.getZjImportUrl;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
* ()
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
* ()
* @param params
*/
export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params });
/**
* ()
* @param params
*/
export const listZjNoCareTenant = (params) => defHttp.get({ url: Api.listZjNoCareTenant, params });
/**
* ()
*
* @param params
*/
export const listzdzx = (params) => defHttp.get({ url: Api.listzdzx, params });
/**
*
* @param params
*/
export const getUserRoles = (params) => defHttp.get({ url: Api.getUserRole, params }, { errorMessageMode: 'none' });
/**
*
* @param params
*/
export const queryExpertById = (params) => defHttp.get({ url: Api.queryExpertById, params }, { successMessageMode: 'none' });
/**
*
*/
export const deleteUser = (params, handleSuccess) => {
return defHttp.delete({ url: Api.deleteUser, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const batchDeleteUser = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
},
});
};
/**
*
* @param params
*/
export const saveOrUpdateUser = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
*/
export const saveOrUpdateUserZJ = (params, isUpdate) => {
let url = isUpdate ? Api.editZJ : Api.saveZJ;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
*/
export const duplicateCheck = (params) => defHttp.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false });
/**
*
* @param params
*/
export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params });
/**
*
* @param params
*/
export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params });
/**
*
* @param params
*/
export const getAllRolesListNoByExcludeTenant = (params) => defHttp.get({ url: Api.allRolesListExcludeByTenant, params });
/**
*
*/
export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params });
/**
*
*/
export const getUserDepartList = (params) => defHttp.get({ url: Api.userDepartList, params }, { successMessageMode: 'none' });
/**
*
*/
export const getAllPostList = (params) => {
return new Promise((resolve) => {
defHttp.get({ url: Api.allPostList, params }).then((res) => {
resolve(res.records);
});
});
};
/**
*
* @param params
*/
export const getRecycleBinList = (params) => defHttp.get({ url: Api.recycleBinList, params });
/**
*
* @param params
*/
export const putRecycleBin = (params, handleSuccess) => {
return defHttp.put({ url: Api.putRecycleBin, params }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const deleteRecycleBin = (params, handleSuccess) => {
return defHttp.delete({ url: Api.deleteRecycleBin, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const changePassword = (params) => {
return defHttp.put({ url: Api.changePassword, params });
};
/**
*
* @param params
*/
export const frozenBatch = (params, handleSuccess) => {
return defHttp.put({ url: Api.frozenBatch, params }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const getUserAgent = (params) => defHttp.get({ url: Api.getUserAgent, params }, { isTransformResponse: false });
/**
*
* @param params
*/
export const saveOrUpdateAgent = (params) => {
let url = params.id ? Api.agentEdit : Api.agentSave;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
*/
export const syncUser = () => defHttp.put({ url: Api.syncUser });
/**
* ()
* @param params
*/
export const userQuitAgent = (params) => {
return defHttp.put({ url: Api.userQuitAgent, params });
};
/**
*
* @param params
*/
export const getQuitList = (params) => {
return defHttp.get({ url: Api.getQuitList, params });
};
/**
*
* @param params
*/
export const putCancelQuit = (params, handleSuccess) => {
return defHttp.put({ url: Api.putCancelQuit, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
*/
export const getUserTenantPageList = (params)=>{
return defHttp.get({url:Api.getUserTenantPageList,params})
}
/**
*
* @param params
*/
export const updateUserTenantStatus = (params)=>{
return defHttp.put({ url: Api.updateUserTenantStatus, params }, { joinParamsToUrl: true,isTransformResponse: false });
}

@ -0,0 +1,604 @@
import { BasicColumn } from '/src/components/Table';
import { FormSchema } from '/src/components/Table';
import { getAllRolesListNoByTenant,getAllRolesListNoByExcludeTenant, getAllTenantList } from './user.api';
import { rules } from '/src/utils/helper/validator';
import { render } from '/src/utils/common/renderUtils';
export const columns: BasicColumn[] = [
{
title: '用户账号',
dataIndex: 'username',
width: 120,
},
{
title: '用户姓名',
dataIndex: 'realname',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 120,
customRender: render.renderAvatar,
},
/*{
title: '性别',
dataIndex: 'sex',
width: 80,
sorter: true,
customRender: ({ text }) => {
return render.renderDict(text, 'sex');
},
},
{
title: '生日',
dataIndex: 'birthday',
width: 100,
},*/
{
title: '手机号',
dataIndex: 'phone',
width: 100,
},
{
title: '院系/部门',
width: 150,
dataIndex: 'orgCodeTxt',
},
/* {
title: '负责部门',
width: 150,
dataIndex: 'departIds_dictText',
},*/
{
title: '状态',
dataIndex: 'status_dictText',
width: 80,
},
];
export const recycleColumns: BasicColumn[] = [
{
title: '用户账号',
dataIndex: 'username',
width: 100,
},
{
title: '用户姓名',
dataIndex: 'realname',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 80,
customRender: render.renderAvatar,
},
{
title: '性别',
dataIndex: 'sex',
width: 80,
sorter: true,
customRender: ({ text }) => {
return render.renderDict(text, 'sex');
},
},
];
export const searchFormSchema: FormSchema[] = [
/* {
label: '账号',
field: 'username',
component: 'JInput',
colProps: { span: 6 },
},*/
{
label: '名字',
field: 'realname',
component: 'JInput',
colProps: { span: 6 },
},
/*{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
colProps: { span: 6 },
},*/
{
label: '手机号码',
field: 'phone',
component: 'Input',
colProps: { span: 6 },
},
{
label: '用户状态',
field: 'status',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'user_status',
placeholder: '请选择状态',
stringToNumber: true,
},
colProps: { span: 6 },
},
];
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '专家账号',
field: 'username',
component: 'Input',
dynamicDisabled: ({ values }) => {
return !!values.id;
},
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'username', model, schema, true),
},
{
label: '登录密码',
field: 'password',
component: 'StrengthMeter',
rules: [
{
required: true,
message: '请输入登录密码',
},
],
},
{
label: '确认密码',
field: 'confirmPassword',
component: 'InputPassword',
dynamicRules: ({ values }) => rules.confirmPassword(values, true),
},
{
label: '用户姓名',
field: 'realname',
required: true,
component: 'Input',
},
{
label: '工号',
field: 'workNo',
required: true,
component: 'Input',
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'work_no', model, schema, true),
},
/*{
label: '职务',
field: 'post',
required: false,
component: 'JSelectPosition',
componentProps: {
rowKey: 'code',
labelKey: 'name',
},
},*/
/* {
label: '角色',
field: 'selectedroles',
dynamicDisabled: ({ values }) => {
return !!values.id;
},
component: 'ApiSelect',
componentProps: {
api: getAllRolesListNoByExcludeTenant,
labelField: 'roleName',
valueField: 'id',
},
},*/
{
label: '所属部门',
field: 'selecteddeparts',
component: 'JSelectDept',
componentProps: ({ formActionType, formModel }) => {
return {
sync: false,
checkStrictly: true,
defaultExpandLevel: 2,
multiple:false,
onSelect: (options, values) => {
const { updateSchema } = formActionType;
//所属部门修改后更新负责部门下拉框数据
updateSchema([
{
field: 'departIds',
componentProps: { options },
},
]);
//所属部门修改后更新负责部门数据
formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1));
},
};
},
},
/*{
label: '租户',
field: 'relTenantIds',
component: 'ApiSelect',
componentProps: {
mode: 'multiple',
api: getAllTenantList,
numberToString: true,
labelField: 'name',
valueField: 'id',
},
},*/
/*{
label: '身份',
field: 'userIdentity',
component: 'RadioGroup',
defaultValue: 1,
componentProps: ({ formModel }) => {
return {
options: [
{ label: '普通用户', value: 1, key: '1' },
{ label: '上级', value: 2, key: '2' },
],
onChange: () => {
formModel.userIdentity == 1 && (formModel.departIds = []);
},
};
},
},*/
/* {
label: '负责部门',
field: 'departIds',
component: 'Select',
componentProps: {
mode: 'multiple',
},
ifShow: ({ values }) => values.userIdentity == 2,
},*/
{
label: '头像',
field: 'avatar',
component: 'JImageUpload',
componentProps: {
fileMax: 1,
},
},
{
label: '生日',
field: 'birthday',
component: 'DatePicker',
},
{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
},
{
label: '邮箱',
field: 'email',
component: 'Input',
},
{
label: '手机号码',
field: 'phone',
component: 'Input',
},
/*{
label: '座机',
field: 'telephone',
component: 'Input',
rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }],
},
{
label: '工作流引擎',
field: 'activitiSync',
defaultValue: 1,
component: 'JDictSelectTag',
componentProps: {
dictCode: 'activiti_sync',
type: 'radio',
stringToNumber: true,
},
},*/
{
label: '学历',
field: 'expTitle',
component: 'Input',
},
{
label: '专业',
field: 'teamajor',
component: 'Input',
},
{
label: '学位',
field: 'expXw',
component: 'Input',
},
{
label: '职称',
field: 'expZc',
component: 'Input',
},
{
label: '研究方向',
field: 'expYjfx',
component: 'Input',
},
{
label: '从事工作',
field: 'expCsgz',
component: 'Input',
},
{
label: '毕业院校',
field: 'expSc',
component: 'Input',
},
{
label: '简介',
field: 'expResume',
component: 'InputTextArea',
},
/*{
label: '比赛',
field: 'compid',
component: 'Input',
show: false,
},*/
/*{
label: '比赛名称',
field: 'compName',
component: 'JPopup',
componentProps: ({ formActionType }) => {
const {setFieldsValue} = formActionType;
return{
setFieldsValue:setFieldsValue,
code:"comp_select",
fieldConfig: [
{ source: 'id', target: 'compid' },
{ source: 'comp_name', target: 'compName' },
],
multi:true
}
},
},*/
/* {
label: '比赛状态',
field: 'stat',
component: 'JSwitch',
defaultValue: 'Y',
componentProps: {},
},*/
];
export const formPasswordSchema: FormSchema[] = [
{
label: '用户账号',
field: 'username',
component: 'Input',
componentProps: { readOnly: true },
},
{
label: '登录密码',
field: 'password',
component: 'StrengthMeter',
componentProps: {
placeholder: '请输入登录密码',
},
rules: [
{
required: true,
message: '请输入登录密码',
},
],
},
{
label: '确认密码',
field: 'confirmPassword',
component: 'InputPassword',
dynamicRules: ({ values }) => rules.confirmPassword(values, true),
},
];
export const formAgentSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
field: 'userName',
label: '用户名',
component: 'Input',
componentProps: {
readOnly: true,
allowClear: false,
},
},
{
field: 'agentUserName',
label: '代理人用户名',
required: true,
component: 'JSelectUser',
componentProps: {
rowKey: 'username',
labelKey: 'realname',
maxSelectCount: 10,
},
},
{
field: 'startTime',
label: '代理开始时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择代理开始时间',
},
},
{
field: 'endTime',
label: '代理结束时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择代理结束时间',
},
},
{
field: 'status',
label: '状态',
component: 'JDictSelectTag',
defaultValue: '1',
componentProps: {
dictCode: 'valid_status',
type: 'radioButton',
},
},
];
export const formQuitAgentSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
field: 'userName',
label: '用户名',
component: 'Input',
componentProps: {
readOnly: true,
allowClear: false,
},
},
{
field: 'agentUserName',
label: '交接人员',
required: true,
component: 'JSelectUser',
componentProps: {
rowKey: 'username',
labelKey: 'realname',
maxSelectCount: 1,
},
},
{
field: 'startTime',
label: '交接开始时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择交接开始时间',
getPopupContainer: () => document.body,
},
},
{
field: 'endTime',
label: '交接结束时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择交接结束时间',
getPopupContainer: () => document.body,
},
},
{
field: 'status',
label: '状态',
component: 'JDictSelectTag',
defaultValue: '1',
componentProps: {
dictCode: 'valid_status',
type: 'radioButton',
},
},
];
//租户用户列表
export const userTenantColumns: BasicColumn[] = [
{
title: '用户账号',
dataIndex: 'username',
width: 120,
},
{
title: '用户姓名',
dataIndex: 'realname',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 120,
customRender: render.renderAvatar,
},
{
title: '手机号',
dataIndex: 'phone',
width: 100,
},
{
title: '部门',
width: 150,
dataIndex: 'orgCodeTxt',
},
{
title: '状态',
dataIndex: 'status',
width: 80,
customRender: ({ text }) => {
if (text === '1') {
return '正常';
} else if (text === '3') {
return '审批中';
} else {
return '已拒绝';
}
},
},
];
//用户租户搜索表单
export const userTenantFormSchema: FormSchema[] = [
{
label: '账号',
field: 'username',
component: 'Input',
colProps: { span: 6 },
},
{
label: '名字',
field: 'realname',
component: 'Input',
colProps: { span: 6 },
},
{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
colProps: { span: 6 },
},
];

@ -0,0 +1,54 @@
<template>
<Description @register="register" class="mt-4" />
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { Description, DescItem, useDescription } from '/src/components/Description';
const mockData = {
username: 'test',
nickName: 'VB',
age: '123',
phone: '15695909xxx',
email: '190848757@qq.com',
addr: '厦门市思明区',
sex: '男',
certy: '3504256199xxxxxxxxx',
tag: 'orange',
};
const schema: DescItem[] = [
{
field: 'username',
label: '用户名',
},
{
field: 'nickName',
label: '昵称',
render: (curVal, data) => {
return `${data.username}-${curVal}`;
},
},
{
field: 'phone',
label: '联系电话',
},
{
field: 'email',
label: '邮箱',
},
{
field: 'addr',
label: '地址',
},
];
export default defineComponent({
components: { Description },
setup() {
const [register] = useDescription({
title: 'useDescription',
data: mockData,
schema: schema,
});
return { mockData, schema, register };
},
});
</script>

@ -0,0 +1,272 @@
import { defHttp } from '/src/utils/http/axios';
import { Modal } from 'ant-design-vue';
enum Api {
listNoCareTenant = '/sys/user/listAll',
listzdzx = '/sys/user/listzdzx',
list = '/sys/user/list',
save = '/sys/user/add',
edit = '/sys/user/edit',
saveZJ = '/seteacher/seteacher/addTEA',
editZJ = '/seteacher/seteacher/editTEA',
queryExpertById = '/seteacher/seteacher/queryById',
agentSave = '/sys/sysUserAgent/add',
agentEdit = '/sys/sysUserAgent/edit',
getUserRole = '/sys/user/queryUserRole',
duplicateCheck = '/sys/duplicate/check',
deleteUser = '/sys/user/delete',
deleteBatch = '/sys/user/deleteBatch',
importExcel = '/sys/user/importExcel',
exportXls = '/sys/user/exportXls',
recycleBinList = '/sys/user/recycleBin',
putRecycleBin = '/sys/user/putRecycleBin',
deleteRecycleBin = '/sys/user/deleteRecycleBin',
allRolesList = '/sys/role/queryall',
allRolesListNoByTenant = '/sys/role/queryallNoByTenant',
allRolesListExcludeByTenant = '/sys/role/queryallExcludeByTenant',
allTenantList = '/sys/tenant/queryList',
allPostList = '/sys/position/list',
userDepartList = '/sys/user/userDepartList',
changePassword = '/sys/user/changePassword',
frozenBatch = '/sys/user/frozenBatch',
getUserAgent = '/sys/sysUserAgent/queryByUserName',
syncUser = '/act/process/extActProcess/doSyncUser',
userQuitAgent = '/sys/user/userQuitAgent',
getQuitList = '/sys/user/getQuitList',
putCancelQuit = '/sys/user/putCancelQuit',
updateUserTenantStatus='/sys/tenant/updateUserTenantStatus',
getUserTenantPageList='/sys/tenant/getUserTenantPageList',
exportXlsMb = '/sys/user/exportXlsMb',
queryByUserId = '/expert/expert/queryByUserId',
}
/**
* userid判断是否为专家
* @param params
*/
export const queryByUserId = (params) => {
return defHttp.get({ url: Api.queryByUserId, params },{ successMessageMode: 'none' });
};
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
export const getExportUrlMb = Api.exportXlsMb;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
* ()
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
* ()
* @param params
*/
export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params });
/**
* ()
*
* @param params
*/
export const listzdzx = (params) => defHttp.get({ url: Api.listzdzx, params });
/**
*
* @param params
*/
export const getUserRoles = (params) => defHttp.get({ url: Api.getUserRole, params }, { errorMessageMode: 'none' });
/**
*
* @param params
*/
export const queryExpertById = (params) => defHttp.get({ url: Api.queryExpertById, params }, { successMessageMode: 'none' });
/**
*
*/
export const deleteUser = (params, handleSuccess) => {
return defHttp.delete({ url: Api.deleteUser, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const batchDeleteUser = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
},
});
};
/**
*
* @param params
*/
export const saveOrUpdateUser = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
*/
export const saveOrUpdateUserZJ = (params, isUpdate) => {
let url = isUpdate ? Api.editZJ : Api.saveZJ;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
*/
export const duplicateCheck = (params) => defHttp.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false });
/**
*
* @param params
*/
export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params });
/**
*
* @param params
*/
export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params });
/**
*
* @param params
*/
export const getAllRolesListNoByExcludeTenant = (params) => defHttp.get({ url: Api.allRolesListExcludeByTenant, params });
/**
*
*/
export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params });
/**
*
*/
export const getUserDepartList = (params) => defHttp.get({ url: Api.userDepartList, params }, { successMessageMode: 'none' });
/**
*
*/
export const getAllPostList = (params) => {
return new Promise((resolve) => {
defHttp.get({ url: Api.allPostList, params }).then((res) => {
resolve(res.records);
});
});
};
/**
*
* @param params
*/
export const getRecycleBinList = (params) => defHttp.get({ url: Api.recycleBinList, params });
/**
*
* @param params
*/
export const putRecycleBin = (params, handleSuccess) => {
return defHttp.put({ url: Api.putRecycleBin, params }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const deleteRecycleBin = (params, handleSuccess) => {
return defHttp.delete({ url: Api.deleteRecycleBin, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const changePassword = (params) => {
return defHttp.put({ url: Api.changePassword, params });
};
/**
*
* @param params
*/
export const frozenBatch = (params, handleSuccess) => {
return defHttp.put({ url: Api.frozenBatch, params }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
*/
export const getUserAgent = (params) => defHttp.get({ url: Api.getUserAgent, params }, { isTransformResponse: false });
/**
*
* @param params
*/
export const saveOrUpdateAgent = (params) => {
let url = params.id ? Api.agentEdit : Api.agentSave;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
*/
export const syncUser = () => defHttp.put({ url: Api.syncUser });
/**
* ()
* @param params
*/
export const userQuitAgent = (params) => {
return defHttp.put({ url: Api.userQuitAgent, params });
};
/**
*
* @param params
*/
export const getQuitList = (params) => {
return defHttp.get({ url: Api.getQuitList, params });
};
/**
*
* @param params
*/
export const putCancelQuit = (params, handleSuccess) => {
return defHttp.put({ url: Api.putCancelQuit, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
*/
export const getUserTenantPageList = (params)=>{
return defHttp.get({url:Api.getUserTenantPageList,params})
}
/**
*
* @param params
*/
export const updateUserTenantStatus = (params)=>{
return defHttp.put({ url: Api.updateUserTenantStatus, params }, { joinParamsToUrl: true,isTransformResponse: false });
}

@ -0,0 +1,771 @@
import { BasicColumn } from '/src/components/Table';
import { FormSchema } from '/src/components/Table';
import { getAllRolesListNoByTenant,getAllRolesListNoByExcludeTenant, getAllTenantList } from './userZJ.api';
import { rules } from '/src/utils/helper/validator';
import { render } from '/src/utils/common/renderUtils';
export const columns: BasicColumn[] = [
{
title: '用户账号',
dataIndex: 'username',
width: 120,
},
{
title: '用户姓名',
dataIndex: 'realname',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 120,
customRender: render.renderAvatar,
},
/* {
title: '性别',
dataIndex: 'sex',
width: 80,
sorter: true,
customRender: ({ text }) => {
return render.renderDict(text, 'sex');
},
},
{
title: '生日',
dataIndex: 'birthday',
width: 100,
},*/
{
title: '手机号',
dataIndex: 'phone',
width: 100,
},
{
title: '部门',
width: 150,
dataIndex: 'orgCodeTxt',
},
{
title: '负责部门',
width: 150,
dataIndex: 'departIds_dictText',
},
{
title: '状态',
dataIndex: 'status_dictText',
width: 80,
},
];
export const recycleColumns: BasicColumn[] = [
{
title: '用户账号',
dataIndex: 'username',
width: 100,
},
{
title: '用户姓名',
dataIndex: 'realname',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 80,
customRender: render.renderAvatar,
},
{
title: '性别',
dataIndex: 'sex',
width: 80,
sorter: true,
customRender: ({ text }) => {
return render.renderDict(text, 'sex');
},
},
];
export const searchFormSchema: FormSchema[] = [
{
label: '账号',
field: 'username',
component: 'JInput',
colProps: { span: 6 },
},
{
label: '名字',
field: 'realname',
component: 'JInput',
colProps: { span: 6 },
},
{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
colProps: { span: 6 },
},
{
label: '手机号码',
field: 'phone',
component: 'Input',
colProps: { span: 6 },
},
{
label: '用户状态',
field: 'status',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'user_status',
placeholder: '请选择状态',
stringToNumber: true,
},
colProps: { span: 6 },
},
];
export const formSchemaZJ: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '专家账号',
field: 'username',
component: 'Input',
dynamicDisabled: ({ values }) => {
return !!values.id;
},
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'username', model, schema, true),
},
{
label: '登录密码',
field: 'password',
component: 'StrengthMeter',
rules: [
{
required: true,
message: '请输入登录密码',
},
],
},
{
label: '确认密码',
field: 'confirmPassword',
component: 'InputPassword',
dynamicRules: ({ values }) => rules.confirmPassword(values, true),
},
{
label: '用户姓名',
field: 'realname',
required: true,
component: 'Input',
},
{
label: '工号',
field: 'workNo',
required: true,
component: 'Input',
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'work_no', model, schema, true),
},
/*{
label: '职务',
field: 'post',
required: false,
component: 'JSelectPosition',
componentProps: {
rowKey: 'code',
labelKey: 'name',
},
},*/
{
label: '角色',
field: 'selectedroles',
component: 'ApiSelect',
componentProps: {
api: getAllRolesListNoByExcludeTenant,
labelField: 'roleName',
valueField: 'id',
},
},
{
label: '所属部门',
field: 'selecteddeparts',
component: 'JSelectDept',
componentProps: ({ formActionType, formModel }) => {
return {
sync: false,
checkStrictly: true,
defaultExpandLevel: 2,
onSelect: (options, values) => {
const { updateSchema } = formActionType;
//所属部门修改后更新负责部门下拉框数据
updateSchema([
{
field: 'departIds',
componentProps: { options },
},
]);
//所属部门修改后更新负责部门数据
formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1));
},
};
},
},
/*{
label: '租户',
field: 'relTenantIds',
component: 'ApiSelect',
componentProps: {
mode: 'multiple',
api: getAllTenantList,
numberToString: true,
labelField: 'name',
valueField: 'id',
},
},*/
/*{
label: '身份',
field: 'userIdentity',
component: 'RadioGroup',
defaultValue: 1,
componentProps: ({ formModel }) => {
return {
options: [
{ label: '普通用户', value: 1, key: '1' },
{ label: '上级', value: 2, key: '2' },
],
onChange: () => {
formModel.userIdentity == 1 && (formModel.departIds = []);
},
};
},
},*/
/* {
label: '负责部门',
field: 'departIds',
component: 'Select',
componentProps: {
mode: 'multiple',
},
ifShow: ({ values }) => values.userIdentity == 2,
},*/
{
label: '头像',
field: 'avatar',
component: 'JImageUpload',
componentProps: {
fileMax: 1,
},
},
{
label: '生日',
field: 'birthday',
component: 'DatePicker',
},
{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
},
{
label: '邮箱',
field: 'email',
component: 'Input',
},
{
label: '手机号码',
field: 'phone',
component: 'Input',
},
/*{
label: '座机',
field: 'telephone',
component: 'Input',
rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }],
},
{
label: '工作流引擎',
field: 'activitiSync',
defaultValue: 1,
component: 'JDictSelectTag',
componentProps: {
dictCode: 'activiti_sync',
type: 'radio',
stringToNumber: true,
},
},*/
{
label: '专家毕业院校',
field: 'expSc',
component: 'Input',
},
{
label: '专家履历',
field: 'expResume',
component: 'InputTextArea',
},
{
label: '专家学历',
field: 'expTitle',
component: 'Input',
},
{
label: '比赛',
field: 'compid',
component: 'Input',
show: false,
},
{
label: '比赛名称',
field: 'compName',
component: 'JPopup',
componentProps: ({ formActionType }) => {
const {setFieldsValue} = formActionType;
return{
setFieldsValue:setFieldsValue,
code:"comp_select",
fieldConfig: [
{ source: 'id', target: 'compid' },
{ source: 'comp_name', target: 'compName' },
],
multi:true
}
},
},
{
label: '状态',
field: 'stat',
component: 'JSwitch',
componentProps:{
},
},
];
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '用户账号',
field: 'username',
component: 'Input',
dynamicDisabled: ({ values }) => {
return !!values.id;
},
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'username', model, schema, true),
},
{
label: '登录密码',
field: 'password',
component: 'StrengthMeter',
rules: [
{
required: true,
message: '请输入登录密码',
},
],
},
{
label: '确认密码',
field: 'confirmPassword',
component: 'InputPassword',
dynamicRules: ({ values }) => rules.confirmPassword(values, true),
},
{
label: '用户姓名',
field: 'realname',
required: true,
component: 'Input',
},
{
label: '工号',
field: 'workNo',
required: true,
component: 'Input',
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'work_no', model, schema, true),
},
{
label: '职务',
field: 'post',
required: false,
component: 'JSelectPosition',
componentProps: {
rowKey: 'code',
labelKey: 'name',
},
},
{
label: '角色',
field: 'selectedroles',
component: 'ApiSelect',
componentProps: {
mode: 'multiple',
api: getAllRolesListNoByTenant,
labelField: 'roleName',
valueField: 'id',
},
},
{
label: '所属部门',
field: 'selecteddeparts',
component: 'JSelectDept',
componentProps: ({ formActionType, formModel }) => {
return {
sync: false,
checkStrictly: true,
defaultExpandLevel: 2,
onSelect: (options, values) => {
const { updateSchema } = formActionType;
//所属部门修改后更新负责部门下拉框数据
updateSchema([
{
field: 'departIds',
componentProps: { options },
},
]);
//所属部门修改后更新负责部门数据
formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1));
},
};
},
},
{
label: '租户',
field: 'relTenantIds',
component: 'ApiSelect',
componentProps: {
mode: 'multiple',
api: getAllTenantList,
numberToString: true,
labelField: 'name',
valueField: 'id',
},
},
{
label: '身份',
field: 'userIdentity',
component: 'RadioGroup',
defaultValue: 1,
componentProps: ({ formModel }) => {
return {
options: [
{ label: '普通用户', value: 1, key: '1' },
{ label: '上级', value: 2, key: '2' },
],
onChange: () => {
formModel.userIdentity == 1 && (formModel.departIds = []);
},
};
},
},
{
label: '负责部门',
field: 'departIds',
component: 'Select',
componentProps: {
mode: 'multiple',
},
ifShow: ({ values }) => values.userIdentity == 2,
},
{
label: '头像',
field: 'avatar',
component: 'JImageUpload',
componentProps: {
fileMax: 1,
},
},
{
label: '生日',
field: 'birthday',
component: 'DatePicker',
},
{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
},
{
label: '邮箱',
field: 'email',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ ...rules.duplicateCheckRule('sys_user', 'email', model, schema, true)[0] },
{ ...rules.rule('email', false)[0] },
];
},
},
{
label: '手机号码',
field: 'phone',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ ...rules.duplicateCheckRule('sys_user', 'phone', model, schema, true)[0] },
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
];
},
},
{
label: '座机',
field: 'telephone',
component: 'Input',
rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }],
},
// {
// label: '工作流引擎',
// field: 'activitiSync',
// defaultValue: 1,
// component: 'JDictSelectTag',
// componentProps: {
// dictCode: 'activiti_sync',
// type: 'radio',
// stringToNumber: true,
// },
// },
];
export const formPasswordSchema: FormSchema[] = [
{
label: '用户账号',
field: 'username',
component: 'Input',
componentProps: { readOnly: true },
},
{
label: '登录密码',
field: 'password',
component: 'StrengthMeter',
componentProps: {
placeholder: '请输入登录密码',
},
rules: [
{
required: true,
message: '请输入登录密码',
},
],
},
{
label: '确认密码',
field: 'confirmPassword',
component: 'InputPassword',
dynamicRules: ({ values }) => rules.confirmPassword(values, true),
},
];
export const formAgentSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
field: 'userName',
label: '用户名',
component: 'Input',
componentProps: {
readOnly: true,
allowClear: false,
},
},
{
field: 'agentUserName',
label: '代理人用户名',
required: true,
component: 'JSelectUser',
componentProps: {
rowKey: 'username',
labelKey: 'realname',
maxSelectCount: 10,
},
},
{
field: 'startTime',
label: '代理开始时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择代理开始时间',
},
},
{
field: 'endTime',
label: '代理结束时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择代理结束时间',
},
},
{
field: 'status',
label: '状态',
component: 'JDictSelectTag',
defaultValue: '1',
componentProps: {
dictCode: 'valid_status',
type: 'radioButton',
},
},
];
export const formQuitAgentSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
field: 'userName',
label: '用户名',
component: 'Input',
componentProps: {
readOnly: true,
allowClear: false,
},
},
{
field: 'agentUserName',
label: '交接人员',
required: true,
component: 'JSelectUser',
componentProps: {
rowKey: 'username',
labelKey: 'realname',
maxSelectCount: 1,
},
},
{
field: 'startTime',
label: '交接开始时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择交接开始时间',
getPopupContainer: () => document.body,
},
},
{
field: 'endTime',
label: '交接结束时间',
component: 'DatePicker',
required: true,
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择交接结束时间',
getPopupContainer: () => document.body,
},
},
{
field: 'status',
label: '状态',
component: 'JDictSelectTag',
defaultValue: '1',
componentProps: {
dictCode: 'valid_status',
type: 'radioButton',
},
},
];
//租户用户列表
export const userTenantColumns: BasicColumn[] = [
{
title: '用户账号',
dataIndex: 'username',
width: 120,
},
{
title: '用户姓名',
dataIndex: 'realname',
width: 100,
},
{
title: '头像',
dataIndex: 'avatar',
width: 120,
customRender: render.renderAvatar,
},
{
title: '手机号',
dataIndex: 'phone',
width: 100,
},
{
title: '部门',
width: 150,
dataIndex: 'orgCodeTxt',
},
{
title: '状态',
dataIndex: 'status',
width: 80,
customRender: ({ text }) => {
if (text === '1') {
return '正常';
} else if (text === '3') {
return '审批中';
} else {
return '已拒绝';
}
},
},
];
//用户租户搜索表单
export const userTenantFormSchema: FormSchema[] = [
{
label: '账号',
field: 'username',
component: 'Input',
colProps: { span: 6 },
},
{
label: '名字',
field: 'realname',
component: 'Input',
colProps: { span: 6 },
},
{
label: '性别',
field: 'sex',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'sex',
placeholder: '请选择性别',
stringToNumber: true,
},
colProps: { span: 6 },
},
];
Loading…
Cancel
Save