Compare commits

..

No commits in common. '9ac5ee17f571cf9ec24f018128862b30ceda671c' and '2ad32ae2a54021d7aee78ae21b9b0c4763ff9b71' have entirely different histories.

@ -1,30 +1,13 @@
package com.bs.ct.controller; package com.bs.ct.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.bs.cm.domain.CmAttach;
import com.bs.cm.service.ICmAttachService;
import com.bs.common.core.domain.entity.SysDept;
import com.bs.common.core.domain.entity.SysUser; import com.bs.common.core.domain.entity.SysUser;
import com.bs.common.exception.UtilException;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.domain.CtTaskInfo;
import com.bs.ct.service.ICtTaskFeedbackService;
import com.bs.ct.service.ICtTaskInfoService;
import com.bs.ct.vo.CtTaskBranchVO;
import com.bs.ct.vo.MyTaskVO;
import com.bs.system.service.ISysDeptService;
import com.bs.system.service.ISysUserService; import com.bs.system.service.ISysUserService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -61,14 +44,6 @@ public class CtTaskBranchController extends BaseController {
private ICtTaskBranchService ctTaskBranchService; private ICtTaskBranchService ctTaskBranchService;
@Autowired @Autowired
private ISysUserService userService; private ISysUserService userService;
@Resource
private ICtTaskInfoService ctTaskInfoService;
@Autowired
private ISysDeptService deptService;
@Autowired
private ICtTaskFeedbackService ctTaskFeedbackService;
@Resource
private ICmAttachService cmAttachService;
/** /**
* *
*/ */
@ -82,285 +57,6 @@ public class CtTaskBranchController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@ApiOperation("分页查询任务机构信息列表")
@GetMapping("/pageListByBranch")
public TableDataInfo pageListByBranch(CtTaskBranch ctTaskBranch) {
Integer pageNum = ctTaskBranch.getPageNum() != null ? ctTaskBranch.getPageNum() : 1;
Integer pageSize = ctTaskBranch.getPageSize() != null ? ctTaskBranch.getPageSize() : 10;
List<Long> ownerDeptIds = deptService.getOwnerDeptIds();
if (ownerDeptIds.isEmpty()) {
ownerDeptIds.add(0L);
}
Long userId = getUserId();
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctTaskBranch);
if ((!ownerDeptIds.isEmpty() && ownerDeptIds.size() > 0) && 1 != userId && "1".equals(ctTaskBranch.getIsTask())) {
queryWrapper.in(CtTaskBranch::getBranchCode,ownerDeptIds);
}
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
setAll(list);
//过滤
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
Integer start = (pageNum - 1) * pageSize;
List<CtTaskBranch> result = ctTaskBranches.stream()
.skip(start) // 跳过前4条数据
.limit(pageSize) // 最多取6条数据
.collect(Collectors.toList());
TableDataInfo data = getDataTable(result);
data.setTotal(ctTaskBranches.size());
return data;
}
private List<CtTaskBranch> filterCtTaskBranchList(List<CtTaskBranch> list, CtTaskBranch filterParams) {
List<CtTaskBranch> filteredList = new ArrayList<>(list);
if (filterParams.getTaskType() != null && !filterParams.getTaskType().isEmpty()) {
filteredList = filteredList.stream()
.filter(item -> filterParams.getTaskType().equals(item.getTaskType()))
.collect(Collectors.toList());
}
if (filterParams.getTaskTitle() != null && !filterParams.getTaskTitle().isEmpty()) {
filteredList = filteredList.stream()
.filter(item -> item.getTaskTitle() != null && item.getTaskTitle().contains(filterParams.getTaskTitle()))
.collect(Collectors.toList());
}
if (filterParams.getTaskContent() != null && !filterParams.getTaskContent().isEmpty()) {
filteredList = filteredList.stream()
.filter(item -> item.getTaskContent() != null && item.getTaskContent().contains(filterParams.getTaskContent()))
.collect(Collectors.toList());
}
if (filterParams.getTaskStatus() != null && !filterParams.getTaskStatus().isEmpty()) {
filteredList = filteredList.stream()
.filter(item -> item.getTaskStatus() != null && item.getTaskStatus().contains(filterParams.getTaskStatus()))
.collect(Collectors.toList());
}
// 修改为使用 startDate 和 endDate 过滤
Date paramStartDate = filterParams.getStartDate();
Date paramEndDate = filterParams.getEndDate();
if (paramStartDate != null && paramEndDate != null) {
filteredList = filteredList.stream()
.filter(item -> {
Date itemStartDate = item.getStartDate();
Date itemEndDate = item.getEndDate();
return itemStartDate != null && itemEndDate != null
&&!itemStartDate.before(paramStartDate)
&&!itemEndDate.after(paramEndDate);
})
.collect(Collectors.toList());
}
return filteredList;
}
/**
*
*/
@ApiOperation("导出任务交办列表")
@Log(title = "任务交办导出", businessType = BusinessType.EXPORT)
@PostMapping("/exportByAssigned")
public void exportByAssigned(HttpServletResponse response, CtTaskBranch ctTaskBranch) {
List<Long> ownerDeptIds = deptService.getOwnerDeptIds();
if (ownerDeptIds.isEmpty()) {
ownerDeptIds.add(0L);
}
Long userId = getUserId();
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctTaskBranch);
if ((!ownerDeptIds.isEmpty() && ownerDeptIds.size() > 0) && 1 != userId && "1".equals(ctTaskBranch.getIsTask())) {
queryWrapper.in(CtTaskBranch::getBranchCode,ownerDeptIds);
}
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
setAll(list);
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
List<CtTaskBranchVO> ctTaskBranchVOs = new ArrayList<>();
for (CtTaskBranch branch : ctTaskBranches) {
CtTaskBranchVO ctTaskBranchVO = new CtTaskBranchVO();
BeanUtils.copyProperties(branch,ctTaskBranchVO);
ctTaskBranchVOs.add(ctTaskBranchVO);
}
ExcelUtil<CtTaskBranchVO> util = new ExcelUtil<CtTaskBranchVO>(CtTaskBranchVO. class);
util.exportExcel(response, ctTaskBranchVOs, "任务交办数据");
}
/**
*
*/
@ApiOperation("分页查询任务机构信息列表")
@GetMapping("/pageListByUser")
public TableDataInfo pageListByUser(CtTaskBranch ctTaskBranch) {
Integer pageNum = ctTaskBranch.getPageNum() != null ? ctTaskBranch.getPageNum() : 1;
Integer pageSize = ctTaskBranch.getPageSize() != null ? ctTaskBranch.getPageSize() : 10;
String userId = String.valueOf(getUserId());
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctTaskBranch);
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
String inSqlConditionByUserId = "SELECT task_id FROM ct_task_branch WHERE del_flag = '0' and type = '人员' and user_id =" + userId;
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
queryWrapper.inSql(CtTaskBranch::getId, inSqlConditionByUserId);
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
setAll(list);
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
Integer start = (pageNum - 1) * pageSize;
List<CtTaskBranch> result = ctTaskBranches.stream()
.skip(start) // 跳过前4条数据
.limit(pageSize) // 最多取6条数据
.collect(Collectors.toList());
TableDataInfo data = getDataTable(result);
data.setTotal(ctTaskBranches.size());
return data;
}
/**
*
*/
@ApiOperation("导出任务交办列表")
@Log(title = "任务交办导出", businessType = BusinessType.EXPORT)
@PostMapping("/exportByUser")
public void exportByUser(HttpServletResponse response, CtTaskBranch ctTaskBranch) {
String userId = String.valueOf(getUserId());
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctTaskBranch);
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
String inSqlConditionByUserId = "SELECT task_id FROM ct_task_branch WHERE del_flag = '0' and type = '人员' and user_id =" + userId;
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
queryWrapper.inSql(CtTaskBranch::getId, inSqlConditionByUserId);
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
setAll(list);
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
List<MyTaskVO> ctTaskBranchVOs = new ArrayList<>();
for (CtTaskBranch branch : ctTaskBranches) {
MyTaskVO ctTaskBranchVO = new MyTaskVO();
BeanUtils.copyProperties(branch,ctTaskBranchVO);
ctTaskBranchVOs.add(ctTaskBranchVO);
}
ExcelUtil<MyTaskVO> util = new ExcelUtil<MyTaskVO>(MyTaskVO. class);
util.exportExcel(response, ctTaskBranchVOs, "我的任务");
}
private void setAll(List<CtTaskBranch> list) {
List<SysDept> depts = deptService.selectDeptList(new SysDept());
Map<Long, String> deptMap = depts.stream()
.collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
Map<Long, Long> deptMapByParent = depts.stream()
.collect(Collectors.toMap(SysDept::getDeptId, SysDept::getParentId));
for (CtTaskBranch taskOtherBranch : list) {
Long branchCode = Long.valueOf(taskOtherBranch.getBranchCode());
Long branchCodeParent = deptMapByParent.get(branchCode);
String branchNameParent = deptMap.get(branchCodeParent);
taskOtherBranch.setBranchNameParent(branchNameParent);
CtTaskInfo byId = ctTaskInfoService.getById(taskOtherBranch.getTaskId());
if (null != byId) {
taskOtherBranch.setStatus(byId.getStatus());
taskOtherBranch.setTaskType(byId.getTaskType());
taskOtherBranch.setTaskTitle(byId.getTaskTitle());
taskOtherBranch.setTaskContent(byId.getTaskContent());
taskOtherBranch.setTaskDate(byId.getTaskDate());
taskOtherBranch.setSdTaskOther(byId);
}
List<CtTaskFeedback> feedbackListByCreateTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
.eq(CtTaskFeedback::getTaskBranchId, taskOtherBranch.getId())
.ne(CtTaskFeedback::getStatus, 0)
.orderByDesc(CtTaskFeedback::getCreateTime));
// 如果根据创建时间查询到的反馈列表不为空且至少有一个元素
if (!feedbackListByCreateTime.isEmpty() && feedbackListByCreateTime.size() > 0) {
// 将该列表中的第一个元素(因为是倒序排列,所以是最新的一条)设置到当前 SdTaskOtherBranch 对象中
taskOtherBranch.setSdTaskOtherFeedbackByCreate(feedbackListByCreateTime.get(0));
}
List<CtTaskFeedback> feedbackListByFeedbackTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
.eq(CtTaskFeedback::getTaskId, taskOtherBranch.getId())
.eq(CtTaskFeedback::getStatus, 1)
.orderByDesc(CtTaskFeedback::getFeedbackTime));
// 如果根据反馈时间查询到的反馈列表不为空且至少有一个元素
if (!feedbackListByFeedbackTime.isEmpty() && feedbackListByFeedbackTime.size() > 0) {
// 将该列表中的第一个元素(因为是倒序排列,所以是最新的一条)设置到当前 SdTaskOtherBranch 对象中
taskOtherBranch.setSdTaskOtherFeedbackByFeedback(feedbackListByFeedbackTime.get(0));
}
}
for (CtTaskBranch taskInfo : list) {
if (null != taskInfo.getSdTaskOther()) {
CtTaskInfo sdTaskOther = taskInfo.getSdTaskOther();
List<CmAttach> cmAttachList = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId,sdTaskOther.getFileId()));
taskInfo.setTaskInitiator(sdTaskOther.getTaskInitiator());
sdTaskOther.setFile(cmAttachList);
Date startDate = sdTaskOther.getStartDate();
Date endDate = sdTaskOther.getEndDate();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
// 转换日期为字符串
String startDateStr = sdf.format(startDate);
String endDateStr = sdf.format(endDate);
taskInfo.setStartDate(startDate);
taskInfo.setEndDate(endDate);
taskInfo.setStartToEndDate(startDateStr + "-" + endDateStr);
String deptName = deptMap.get(sdTaskOther.getDeptId());
taskInfo.setDeptName(deptName);
if ("1".equals(taskInfo.getStatus()) || "0".equals(taskInfo.getStatus())) {
//未完成0
taskInfo.setTaskStatus("0");
// 获取当前日期
Date currentDate = new Date();
if (endDate.compareTo(currentDate) < 0) {
//已逾期1
taskInfo.setTaskStatus("1");
}
} else if ("2".equals(taskInfo.getStatus())) {
//已完成
taskInfo.setTaskStatus("2");
}
}
List<CtTaskBranch> ctTaskBranches = ctTaskBranchService.list(new LambdaQueryWrapper<CtTaskBranch>()
.eq(CtTaskBranch::getTaskId,taskInfo.getId())
.eq(CtTaskBranch::getType,"人员"));
String transactDeptNames = "";
String transactInitiator = "";
String transactBranchNames = "";
if (null != ctTaskBranches) {
List<String> deptNameList = new ArrayList<>();
List<String> parentDeptNameList = new ArrayList<>();
List<String> userNameList = new ArrayList<>();
List<String> userIdList = new ArrayList<>();
for (CtTaskBranch ctTaskBranchesItem : ctTaskBranches) {
String deptNameVo = deptMap.get(Long.valueOf(ctTaskBranchesItem.getBranchCode()));
Long parentTaskId = deptMapByParent.get(Long.valueOf(ctTaskBranchesItem.getBranchCode()));
String parentDeptName = deptMap.get(parentTaskId);
String userName = ctTaskBranchesItem.getUserName();
String userId = ctTaskBranchesItem.getUserId();
if (deptNameVo != null) {
deptNameList.add(deptNameVo);
}
if (parentDeptName != null) {
parentDeptNameList.add(parentDeptName);
}
if (userName != null) {
userNameList.add(userName);
}
if (null != userId) {
userIdList.add(userId);
}
}
transactDeptNames = String.join(",", deptNameList);
transactInitiator = String.join(",", userNameList);
transactBranchNames = String.join(",", parentDeptNameList);
taskInfo.setTransactDeptName(transactDeptNames);
taskInfo.setTransactInitiator(transactInitiator);
taskInfo.setTransactBranchName(transactBranchNames);
taskInfo.setUserIds(userIdList);
}
}
}
/** /**
* *
*/ */
@ -452,17 +148,6 @@ public class CtTaskBranchController extends BaseController {
private boolean isTaskUserCombinationExists(Long taskId, String userId) { private boolean isTaskUserCombinationExists(Long taskId, String userId) {
CtTaskBranch branchServiceById = ctTaskBranchService.getById(taskId);
if (null != branchServiceById) {
Long taskIdVo = branchServiceById.getTaskId();
CtTaskInfo ctTaskInfoServiceById = ctTaskInfoService.getById(taskIdVo);
if (null != ctTaskInfoServiceById) {
String status = ctTaskInfoServiceById.getStatus();
if ("0".equals(status)) {
throw new UtilException("该任务还未发布");
}
}
}
List<CtTaskBranch> list = ctTaskBranchService.list(new LambdaQueryWrapper<CtTaskBranch>() List<CtTaskBranch> list = ctTaskBranchService.list(new LambdaQueryWrapper<CtTaskBranch>()
.eq(CtTaskBranch::getTaskId, taskId) .eq(CtTaskBranch::getTaskId, taskId)
.eq(CtTaskBranch::getType,"人员") .eq(CtTaskBranch::getType,"人员")
@ -526,9 +211,9 @@ public class CtTaskBranchController extends BaseController {
} }
//任务状态 //任务状态
// if(Validator.isNotEmpty(ctTaskBranch.getTaskStatus())){ if(Validator.isNotEmpty(ctTaskBranch.getTaskStatus())){
// queryWrapper.eq(CtTaskBranch::getTaskStatus,ctTaskBranch.getTaskStatus()); queryWrapper.eq(CtTaskBranch::getTaskStatus,ctTaskBranch.getTaskStatus());
// } }
//备注 //备注
if(Validator.isNotEmpty(ctTaskBranch.getRemarks())){ if(Validator.isNotEmpty(ctTaskBranch.getRemarks())){

@ -75,21 +75,6 @@ public class CtTaskInfoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@ApiOperation("分页查询任务信息列表")
@GetMapping("/pageListByBranch")
public TableDataInfo pageListByBranch(CtTaskInfo ctTaskInfo) {
startPage();
LambdaQueryWrapper<CtTaskInfo> queryWrapper = new LambdaQueryWrapper();
ctTaskInfo.setStatus("1");
condition(queryWrapper,ctTaskInfo);
List<CtTaskInfo> list = ctTaskInfoService.list(queryWrapper);
setAll(list);
return getDataTable(list);
}
/** /**
* *
*/ */
@ -115,7 +100,7 @@ public class CtTaskInfoController extends BaseController {
// 2. status 不等于 0 // 2. status 不等于 0
// 3. 按照创建时间CreateTime倒序排列 // 3. 按照创建时间CreateTime倒序排列
List<CtTaskFeedback> feedbackListByCreateTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>() List<CtTaskFeedback> feedbackListByCreateTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
.eq(CtTaskFeedback::getTaskBranchId, taskOtherBranch.getId()) .eq(CtTaskFeedback::getTaskId, taskOtherBranch.getId())
.ne(CtTaskFeedback::getStatus, 0) .ne(CtTaskFeedback::getStatus, 0)
.orderByDesc(CtTaskFeedback::getCreateTime)); .orderByDesc(CtTaskFeedback::getCreateTime));
// 如果根据创建时间查询到的反馈列表不为空且至少有一个元素 // 如果根据创建时间查询到的反馈列表不为空且至少有一个元素
@ -292,7 +277,19 @@ public class CtTaskInfoController extends BaseController {
util.exportExcel(response, list, "任务信息数据"); util.exportExcel(response, list, "任务信息数据");
} }
/**
*
*/
@ApiOperation("导出任务交办列表")
@Log(title = "任务交办导出", businessType = BusinessType.EXPORT)
@PostMapping("/exportByAssigned")
public void exportByAssigned(HttpServletResponse response, CtTaskInfo ctTaskInfo) {
LambdaQueryWrapper<CtTaskInfo> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctTaskInfo);
List<CtTaskInfo> list = ctTaskInfoService.list(queryWrapper);
ExcelUtil<CtTaskInfo> util = new ExcelUtil<CtTaskInfo>(CtTaskInfo. class);
util.exportExcel(response, list, "任务交办数据");
}
/** /**
* *

@ -1,15 +1,16 @@
package com.bs.ct.domain; package com.bs.ct.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.bs.common.annotation.Excel; import com.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity; import com.bs.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -61,13 +62,6 @@ public class CtTaskBranch extends BaseEntity{
@ApiModelProperty(value = "机构名称") @ApiModelProperty(value = "机构名称")
private String branchName; private String branchName;
/** 机构名称 */
@Excel(name = "上级机构名称")
@ApiModelProperty(value = "上级机构名称")
@TableField(exist = false)
private String branchNameParent;
/** 机构代码 */ /** 机构代码 */
@Excel(name = "用户Id") @Excel(name = "用户Id")
@ -87,7 +81,7 @@ public class CtTaskBranch extends BaseEntity{
@ApiModelProperty(value = "用户名称") @ApiModelProperty(value = "用户名称")
private String userName; private String userName;
/** 任务状态 0未完成 1已逾期 2已完成 */ /** 任务状态 */
@Excel(name = "任务状态") @Excel(name = "任务状态")
@ApiModelProperty(value = "任务状态") @ApiModelProperty(value = "任务状态")
@ -99,110 +93,7 @@ public class CtTaskBranch extends BaseEntity{
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remarks; private String remarks;
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByCreate;
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByFeedback;
@TableField(exist = false)
private CtTaskInfo sdTaskOther;
/** 任务要求 */
@Excel(name = "任务内容")
@ApiModelProperty(value = "任务内容")
@TableField(exist = false)
private String taskContent;
/** 完成状态 */
@Excel(name = "完成状态")
@ApiModelProperty(value = "完成状态")
@TableField(exist = false)
private String status;
/** 任务类型 */
@Excel(name = "任务类型")
@ApiModelProperty(value = "任务类型")
@TableField(exist = false)
private String taskType;
/** 任务标题 */
@Excel(name = "任务标题")
@ApiModelProperty(value = "任务标题")
@TableField(exist = false)
private String taskTitle;
@ApiModelProperty(value = "任务期限")
@TableField(exist = false)
private String startToEndDate;
/** 任务发起部门 */
@Excel(name = "任务发起部门")
@ApiModelProperty(value = "任务发起部门")
@TableField(exist = false)
private String deptName;
@Excel(name = "办理单位")
@ApiModelProperty(value = "办理单位")
@TableField(exist = false)
private String transactBranchName;
@Excel(name = "办理部门")
@ApiModelProperty(value = "办理部门")
@TableField(exist = false)
private String transactDeptName;
@Excel(name = "办理人")
@ApiModelProperty(value = "办理人")
@TableField(exist = false)
private String transactInitiator;
/** 任务发起人 */
@Excel(name = "任务发起人")
@ApiModelProperty(value = "任务发起人")
@TableField(exist = false)
private String taskInitiator;
/** 是否为交办任务 1是 0否 */
@Excel(name = "是否为交办任务")
@ApiModelProperty(value = "是否为交办任务")
@TableField(exist = false)
private String isTask;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "开始时间")
@TableField(exist = false)
private Date startDate;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "结束时间")
@TableField(exist = false)
private Date endDate;
/** 任务发布日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "任务发布日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "任务发布日期")
@TableField(exist = false)
private Date taskDate;
@TableField(exist = false)
private Integer pageNum;
@TableField(exist = false)
private Integer pageSize;
} }

@ -1,101 +0,0 @@
package com.bs.ct.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.domain.CtTaskInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
/**
* ct_task_branch
*
* @author bs
* @date 2025-02-22
*/
@Data
public class CtTaskBranchVO extends BaseEntity{
/** 任务标题 */
@Excel(name = "任务名称")
@ApiModelProperty(value = "任务名称")
private String taskTitle;
/** 任务类型 */
@Excel(name = "任务类型",dictType = "task_type")
@ApiModelProperty(value = "任务类型")
private String taskType;
/** 任务要求 */
@Excel(name = "任务内容")
@ApiModelProperty(value = "任务内容")
private String taskContent;
/** 发布单位 */
@Excel(name = "发布单位")
@ApiModelProperty(value = "发布单位")
@TableField(exist = false)
private String branchNameParent;
/** 发布部门 */
@Excel(name = "发布部门")
@ApiModelProperty(value = "发布部门")
private String branchName;
/** 发布人 */
@Excel(name = "发布人")
@ApiModelProperty(value = "发布人")
private String taskInitiator;
@Excel(name = "任务期限")
@ApiModelProperty(value = "任务期限")
private String startToEndDate;
@Excel(name = "办理单位")
@ApiModelProperty(value = "办理单位")
private String transactBranchName;
@Excel(name = "办理部门")
@ApiModelProperty(value = "办理部门")
private String transactDeptName;
@Excel(name = "办理人")
@ApiModelProperty(value = "办理人")
private String transactInitiator;
/** 任务状态 */
@Excel(name = "任务状态")
@ApiModelProperty(value = "任务状态")
private String taskStatus;
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByCreate;
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByFeedback;
@TableField(exist = false)
private CtTaskInfo sdTaskOther;
}

@ -23,6 +23,28 @@ import java.util.List;
@Data @Data
public class CtTaskTemplateVO extends BaseEntity{ public class CtTaskTemplateVO extends BaseEntity{
/** 创建单位 */
@Excel(name = "创建单位")
@ApiModelProperty(value = "创建单位")
@TableField(exist = false)
private String createByBranch;
/** 创建部门 */
@Excel(name = "创建部门")
@ApiModelProperty(value = "创建部门")
@TableField(exist = false)
private String createByDeptName;
/** 创建人 */
@Excel(name = "创建人")
@ApiModelProperty(value = "创建人")
@TableField(exist = false)
private String createByUserName;
/** 模板名称 */ /** 模板名称 */
@Excel(name = "模板名称") @Excel(name = "模板名称")
@ -31,7 +53,7 @@ public class CtTaskTemplateVO extends BaseEntity{
/** 任务类型 */ /** 任务类型 */
@Excel(name = "任务类型",dictType = "task_type") @Excel(name = "任务类型")
@ApiModelProperty(value = "任务类型") @ApiModelProperty(value = "任务类型")
private String taskType; private String taskType;
@ -54,29 +76,6 @@ public class CtTaskTemplateVO extends BaseEntity{
@TableField(exist = false) @TableField(exist = false)
private String tagNames; private String tagNames;
/** 创建单位 */
@Excel(name = "创建单位")
@ApiModelProperty(value = "创建单位")
@TableField(exist = false)
private String createByBranch;
/** 创建部门 */
@Excel(name = "创建部门")
@ApiModelProperty(value = "创建部门")
@TableField(exist = false)
private String createByDeptName;
/** 创建人 */
@Excel(name = "创建人")
@ApiModelProperty(value = "创建人")
@TableField(exist = false)
private String createByUserName;
@Excel(name = "创建时间") @Excel(name = "创建时间")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@TableField(exist = false) @TableField(exist = false)

@ -1,80 +0,0 @@
package com.bs.ct.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.domain.CtTaskInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* ct_task_branch
*
* @author bs
* @date 2025-02-22
*/
@Data
public class MyTaskVO extends BaseEntity{
/** 任务标题 */
@Excel(name = "任务名称")
@ApiModelProperty(value = "任务名称")
private String taskTitle;
/** 任务类型 */
@Excel(name = "任务类型",dictType = "task_type")
@ApiModelProperty(value = "任务类型")
private String taskType;
/** 任务要求 */
@Excel(name = "任务内容")
@ApiModelProperty(value = "任务内容")
private String taskContent;
/** 发布单位 */
@Excel(name = "发布单位")
@ApiModelProperty(value = "发布单位")
@TableField(exist = false)
private String branchNameParent;
/** 发布部门 */
@Excel(name = "发布部门")
@ApiModelProperty(value = "发布部门")
private String branchName;
/** 发布人 */
@Excel(name = "发布人")
@ApiModelProperty(value = "发布人")
private String taskInitiator;
@Excel(name = "任务期限")
@ApiModelProperty(value = "任务期限")
private String startToEndDate;
/** 任务状态 */
@Excel(name = "任务状态")
@ApiModelProperty(value = "任务状态")
private String taskStatus;
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByCreate;
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByFeedback;
@TableField(exist = false)
private CtTaskInfo sdTaskOther;
}

@ -121,6 +121,4 @@ public interface ISysDeptService
* @return * @return
*/ */
public int deleteDeptById(Long deptId); public int deleteDeptById(Long deptId);
public List<Long> getOwnerDeptIds();
} }

@ -21,8 +21,6 @@ import com.bs.system.mapper.SysDeptMapper;
import com.bs.system.mapper.SysRoleMapper; import com.bs.system.mapper.SysRoleMapper;
import com.bs.system.service.ISysDeptService; import com.bs.system.service.ISysDeptService;
import static com.bs.common.utils.SecurityUtils.getDeptId;
/** /**
* *
* *
@ -337,38 +335,4 @@ public class SysDeptServiceImpl implements ISysDeptService
{ {
return getChildList(list, t).size() > 0; return getChildList(list, t).size() > 0;
} }
/**
*
*
* @return
*/
@Override
public List<Long> getOwnerDeptIds()
{
Long deptId = getDeptId();
List<Long> parentId = new ArrayList<>();
parentId.add(deptId);
SysDept sysDept = new SysDept();
sysDept.setParentId(deptId);
List<SysDept> depts = deptMapper.selectDeptListAll();
List<SysDept> sysDepts = filterDeptsByParentId(depts, parentId);
List<Long> deptIds = new ArrayList<>();
for (SysDept dept : sysDepts) {
deptIds.add(dept.getDeptId());
}
List<SysDept> deptsByParentId = filterDeptsByParentId(depts, deptIds);
for (SysDept dept : deptsByParentId) {
deptIds.add(dept.getDeptId());
}
deptIds.add(deptId);
return deptIds;
}
public static List<SysDept> filterDeptsByParentId(List<SysDept> depts, List<Long> deptIds) {
return depts.stream()
.filter(dept -> dept.getParentId() != null && deptIds.contains(dept.getParentId()))
.collect(Collectors.toList());
}
} }

@ -9,24 +9,6 @@ export function pageListBranch(query) {
}) })
} }
// 分页查询任务机构信息列表
export function pageListByBranch(query) {
return request({
url: '/task/branch/pageListByBranch',
method: 'get',
params: query
})
}
// 分页查询任务机构信息列表
export function pageListByUser(query) {
return request({
url: '/task/branch/pageListByUser',
method: 'get',
params: query
})
}
// 查询任务机构信息列表 // 查询任务机构信息列表
export function listBranch(query) { export function listBranch(query) {
return request({ return request({

@ -9,15 +9,6 @@ export function pageListInfo(query) {
}) })
} }
// 根据部门分页查询任务信息列表
export function pageListByBranch(query) {
return request({
url: '/task/info/pageListByBranch',
method: 'get',
params: query
})
}
// 分页查询任务信息列表 // 分页查询任务信息列表
export function pageListByUser(query) { export function pageListByUser(query) {
return request({ return request({

@ -14,19 +14,12 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="任务类型"> <el-form-item label="任务类型">
<el-select <el-input
v-model="query.taskType" v-model="query.taskType"
placeholder="请选择" placeholder="请输入"
maxlength="32"
clearable clearable
filterable />
>
<el-option
v-for="dict in dict.type.task_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="任务内容"> <el-form-item label="任务内容">
<el-input <el-input
@ -36,29 +29,15 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="任务状态">-->
<!-- <el-input-->
<!-- v-model="query.status"-->
<!-- placeholder="请输入"-->
<!-- maxlength="32"-->
<!-- clearable-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="任务状态"> <el-form-item label="任务状态">
<el-select <el-input
v-model="query.taskStatus" v-model="query.status"
placeholder="请选择" placeholder="请输入"
maxlength="32"
clearable clearable
filterable />
>
<el-option
v-for="dict in dict.type.task_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="任务期限"> <el-form-item label="任务期限">
<el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" placeholder="选择日期" <el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" placeholder="选择日期"
@change="dateRangeChange" style="width: 220px;" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> @change="dateRangeChange" style="width: 220px;" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
@ -129,11 +108,13 @@
min-width="160" min-width="160"
prop="taskTitle" prop="taskTitle"
/> />
<el-table-column label="任务类型" align="center" prop="taskType" sortable='custom' min-width="100"> <el-table-column
<template slot-scope="scope"> align="center"
<dict-tag :options="dict.type.task_type" :value="scope.row.taskType"/> label="任务类型"
</template> show-overflow-tooltip
</el-table-column> min-width="160"
prop="taskType"
/>
<el-table-column <el-table-column
align="center" align="center"
label="任务内容" label="任务内容"
@ -141,28 +122,12 @@
min-width="160" min-width="160"
prop="taskContent" prop="taskContent"
/> />
<!-- <el-table-column-->
<!-- align="center"-->
<!-- label="发布单位"-->
<!-- show-overflow-tooltip-->
<!-- min-width="160"-->
<!-- prop="branchName"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- label="发布部门"-->
<!-- show-overflow-tooltip-->
<!-- min-width="160"-->
<!-- prop="deptName"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column <el-table-column
align="center" align="center"
label="发布单位" label="发布单位"
show-overflow-tooltip show-overflow-tooltip
min-width="160" min-width="160"
prop="branchNameParent" prop="branchName"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -170,7 +135,7 @@
label="发布部门" label="发布部门"
show-overflow-tooltip show-overflow-tooltip
min-width="160" min-width="160"
prop="branchName" prop="deptName"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -213,14 +178,9 @@
prop="transactInitiator" prop="transactInitiator"
> >
</el-table-column> </el-table-column>
<el-table-column label="任务状态" align="center" prop="taskStatus" sortable='custom' min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.task_status" :value="scope.row.taskStatus"/>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="状态" label="任务状态"
show-overflow-tooltip show-overflow-tooltip
min-width="90" min-width="90"
> >
@ -248,16 +208,16 @@
<el-tag v-else type="info">未反馈</el-tag> <el-tag v-else type="info">未反馈</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="80px" align="center" label="操作" fixed="right"> <!-- <el-table-column width="80px" align="center" label="操作" fixed="right">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-link <!-- <el-link-->
class="table-opretar" <!-- class="table-opretar"-->
type="primary" <!-- type="primary"-->
@click="toEdit(scope.row)" <!-- @click="toEdit(scope.row)"-->
>{{ getRowEditTitle(scope.row) }}</el-link <!-- >{{ getRowEditTitle(scope.row) }}</el-link-->
> <!-- >-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<!-- 表格页脚 --> <!-- 表格页脚 -->
<pagination <pagination
@ -276,8 +236,8 @@
<script> <script>
import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog"; import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog";
import TableMixin from "@/mixins/table-mixin"; import TableMixin from "@/mixins/table-mixin";
import { pageListByBranch } from "@/api/task/branch"; import { pageListInfo } from "@/api/task/info";
import AssignTaskDialog from "./components/AssignTaskDialog"; import AssignTaskDialog from "./components/AssignTaskDialog"; //
import { addByUser, deleteByUser } from "@/api/task/branch"; import { addByUser, deleteByUser } from "@/api/task/branch";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
@ -287,11 +247,12 @@ export default {
AuditDialog, AuditDialog,
AssignTaskDialog, AssignTaskDialog,
}, },
dicts: ['task_type','task_status'],
mixins: [TableMixin], mixins: [TableMixin],
pageInfo: { pageInfo: {
title: "机构任务", title: "机构任务",
pageListApi: pageListByBranch, //exportUrl: "/task/info/export",
pageListApi: pageListInfo,
// deleteApi: delOther,
defaultQuery: { defaultQuery: {
isPublish: "1", isPublish: "1",
taskId: "", taskId: "",
@ -302,6 +263,7 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
//
isPublish: { isPublish: {
type: Boolean, type: Boolean,
default: true, default: true,
@ -310,10 +272,6 @@ export default {
type: [Number, String], type: [Number, String],
default: "", default: "",
}, },
isComponentCall: {
type: Boolean,
default: false,
}
}, },
watch: { watch: {
taskId(val) { taskId(val) {
@ -328,24 +286,23 @@ export default {
data() { data() {
return { return {
dateRange: [], dateRange: [],
selectrows: [], selectrows: [], //
}; };
}, },
methods: { methods: {
// isMe(row) {
// return row.userId === this.$store.getters?.userInfo?.userId;
// },
dateRangeChange(val) { dateRangeChange(val) {
this.query.startDate = val?.[0]; this.query.startDate = val?.[0];
this.query.endDate = val?.[1]; this.query.endDate = val?.[1];
}, },
MXCreated() { MXCreated() {
this.$options.pageInfo.defaultQuery.taskId = null; this.$options.pageInfo.defaultQuery.taskId = null,
this.query.taskId = null; this.query.taskId = null;
this.$options.pageInfo.customLoad = this.customLoad; this.$options.pageInfo.customLoad = this.customLoad;
this.$options.pageInfo.defaultQuery.isPublish = this.isPublish ? "1" : ""; this.$options.pageInfo.defaultQuery.isPublish = this.isPublish ? "1" : "";
this.query.isPublish = this.$options.pageInfo.defaultQuery.isPublish; this.query.isPublish = this.$options.pageInfo.defaultQuery.isPublish;
// isTask
this.$options.pageInfo.defaultQuery.isTask = this.isComponentCall ? "0" : "1";
this.query.isTask = this.$options.pageInfo.defaultQuery.isTask;
}, },
getRowEditTitle(row) { getRowEditTitle(row) {
if (row.sdTaskOther && row.sdTaskOther.status === '2') { if (row.sdTaskOther && row.sdTaskOther.status === '2') {
@ -366,13 +323,14 @@ export default {
} }
return "查看"; return "查看";
}, },
/** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/task/branch/exportByAssigned', { this.download('/task/info/export', {
...this.queryParams ...this.queryParams
}, `任务交办_${new Date().getTime()}.xlsx`) }, `任务交办_${new Date().getTime()}.xlsx`)
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.selectrows = selection; this.selectrows = selection; //
}, },
openAssignTaskDialog() { openAssignTaskDialog() {
const taskIds = this.selectrows.map(row => row.id); const taskIds = this.selectrows.map(row => row.id);
@ -396,8 +354,5 @@ export default {
} }
} }
}, },
created() {
this.MXCreated();
}
}; };
</script> </script>

@ -1,3 +1,4 @@
<template> <template>
<el-dialog <el-dialog
:close-on-click-modal="false" :close-on-click-modal="false"
@ -6,19 +7,19 @@
:title="`其他任务${isAudit ? '审核':'反馈'}`" :title="`其他任务${isAudit ? '审核':'反馈'}`"
width="80%" width="80%"
> >
<div style="height: 70vh;width:100%;overflow-y: scroll;overflow-x: hidden;" v-loading="loading"> <div style="height: 70vh;width:100%;overflow-y: scroll;overflow-x: hidden;" v-loading="loading">
<SectionTitle title="基本信息" desc="" extra=""></SectionTitle> <SectionTitle title="基本信息" desc="" extra=""></SectionTitle>
<Detail :info="info" style="margin-top: 10px;"></Detail> <Detail :info="info" style="margin-top: 10px;"></Detail>
<SectionTitle title="反馈信息" icon="el-icon-s-comment" :desc="`共${auditList.length}条反馈`" extra=""></SectionTitle> <SectionTitle title="反馈信息" icon="el-icon-s-comment" :desc="`共${auditList.length}条反馈`" extra=""></SectionTitle>
<el-timeline v-if="auditList.length > 0" style="margin-top: 20px;"> <el-timeline v-if="auditList.length > 0" style="margin-top: 20px;">
<el-timeline-item v-for="(item, index) in auditList" :key="getKey(item, index)" :timestamp="itemDate(item)" placement="top"> <el-timeline-item v-for="(item, index) in auditList" :key="getKey(item, index)" :timestamp="itemDate(item)" placement="top">
<el-card> <el-card>
<AuditItem :info="info" :item="item" @refresh="auditChange"></AuditItem> <AuditItem :info="info" :item="item" @refresh="auditChange"></AuditItem>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="closeVisible"></el-button> <el-button @click="closeVisible"></el-button>
@ -31,7 +32,7 @@ import SectionTitle from "@/views/task-distribut/components/SectionTitle.vue";
import Detail from './Detail.vue'; import Detail from './Detail.vue';
import AuditItem from './AuditItem.vue'; import AuditItem from './AuditItem.vue';
import { listFeedback } from "@/api/task/feedback"; import { listFeedback } from "@/api/task/feedback";
import moment from'moment'; // import { getDateStr } from "@/utils/util";
export default { export default {
name: 'AuditDialog', name: 'AuditDialog',
@ -130,16 +131,10 @@ export default {
this.getList(); this.getList();
}, },
itemDate(item) { itemDate(item) {
let date = null;
if (item.status === '0' || item.status === '1') { if (item.status === '0' || item.status === '1') {
date = item.feedbackTime; return item.feedbackTime;
} else {
date = item.checkDate;
}
if (date) {
return moment(date).format('YYYY-MM-DD'); // 使 YYYY-MM-DD
} }
return ''; return item.checkDate;
} }
} }
} }

@ -23,28 +23,15 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务类型" prop="taskType"> <el-form-item label="任务类型" prop="taskType">
<el-select <el-input v-model="dialogForm.taskType" placeholder="请输入">
v-model="dialogForm.taskType" <el-button
placeholder="请选择任务类型" slot="append"
clearable type="primary"
filterable icon="el-icon-search"
style="width: calc(100% - 125px); display: inline-block;" @click="openTemplateDialog"
> >选择模板
<el-option </el-button>
v-for="dict in dict.type.task_type" </el-input>
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="openTemplateDialog"
style="width: 120px; margin-left: 5px;"
>
选择模板
</el-button>
</el-form-item> </el-form-item>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
@ -182,11 +169,7 @@
> >
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="模板名称" align="center" prop="templateName"/> <el-table-column label="模板名称" align="center" prop="templateName"/>
<el-table-column label="任务类型" align="center" prop="taskType" sortable='custom'> <el-table-column label="任务类型" align="center" prop="taskType"/>
<template slot-scope="scope">
<dict-tag :options="dict.type.task_type" :value="scope.row.taskType"/>
</template>
</el-table-column>
<el-table-column label="任务要求" align="center" > <el-table-column label="任务要求" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="scope.row.taskContent"></div> <div v-html="scope.row.taskContent"></div>
@ -226,7 +209,6 @@ export default {
BranchCascaderDialog, BranchCascaderDialog,
}, },
mixins: [TableEditMixin], mixins: [TableEditMixin],
dicts: ['task_type'], //
pageInfo: { pageInfo: {
defaultForm: { defaultForm: {
status: "0", // 01 2/ status: "0", // 01 2/
@ -245,7 +227,7 @@ export default {
{min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur"} {min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur"}
], ],
taskType: [ taskType: [
{required: true, message: "请选择任务类型", trigger: "change"} {required: true, message: "请输入任务类型", trigger: "blur"},
], ],
startDate: [ startDate: [
{required: true, message: "请输入开始时间", trigger: "change"} {required: true, message: "请输入开始时间", trigger: "change"}

@ -1,245 +1,237 @@
<!-- 其他任务 --> <!-- 其他任务 -->
<template> <template>
<div v-loading="tableLoading"> <div v-loading="tableLoading">
<el-card class="query-container" shadow="never"> <el-card class="query-container" shadow="never">
<!-- 表格查询条件 --> <!-- 表格查询条件 -->
<div> <div>
<div :span="24"> <div :span="24">
<el-form ref="seachForm" :inline="true" class="demo-form-inline"> <el-form ref="seachForm" :inline="true" class="demo-form-inline">
<el-form-item label="任务名称"> <el-form-item label="任务名称">
<el-input <el-input
v-model="query.taskTitle" v-model="query.taskTitle"
placeholder="请输入" placeholder="请输入"
maxlength="32" maxlength="32"
clearable clearable
/>
</el-form-item>
<el-form-item label="任务类型">
<el-select
v-model="query.taskType"
placeholder="请选择"
clearable
filterable
>
<el-option
v-for="dict in dict.type.task_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/> />
</el-select> </el-form-item>
</el-form-item> <el-form-item label="任务类型">
<el-form-item label="发布单位"> <el-input
<el-input v-model="query.taskType"
v-model="query.branchName" placeholder="请输入"
placeholder="请输入" maxlength="32"
maxlength="32" clearable
clearable />
/> </el-form-item>
</el-form-item> <el-form-item label="发布单位">
<el-form-item label="发布部门"> <el-input
<el-input v-model="query.branchName"
v-model="query.deptName" placeholder="请输入"
placeholder="请输入" maxlength="32"
maxlength="32" clearable
clearable />
/> </el-form-item>
</el-form-item> <el-form-item label="发布部门">
<el-form-item label="发布人"> <el-input
<el-input v-model="query.deptName"
v-model="query.taskInitiator" placeholder="请输入"
placeholder="请输入" maxlength="32"
maxlength="32" clearable
clearable />
/> </el-form-item>
</el-form-item> <el-form-item label="发布人">
<el-form-item label="任务期限"> <el-input
<el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" placeholder="选择日期" v-model="query.taskInitiator"
@change="dateRangeChange" style="width: 220px;" start-placeholder="开始日期" placeholder="请输入"
end-placeholder="结束日期"></el-date-picker> maxlength="32"
</el-form-item> clearable
<el-form-item> />
<el-button </el-form-item>
type="primary" <el-form-item label="任务期限">
icon="el-icon-search" <el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" placeholder="选择日期"
@click="queryTable" @change="dateRangeChange" style="width: 220px;" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
> </el-form-item>
查询 <el-form-item>
</el-button> <el-button
<el-button type="primary"
type="reset" icon="el-icon-search"
icon="el-icon-refresh" @click="queryTable"
@click="resetQueryTable" >
> 查询
重置 </el-button>
</el-button> <el-button
<el-button type="reset"
type="reset" icon="el-icon-refresh"
icon="el-icon-download" @click="resetQueryTable"
@click="exportData" >
>导出 重置
</el-button> </el-button>
</el-form-item> <el-button
</el-form> type="reset"
icon="el-icon-download"
@click="exportData"
>导出
</el-button>
</el-form-item>
</el-form>
</div>
</div> </div>
</div> </el-card>
</el-card>
<el-card class="el-row-main-container box-card box-card--table"> <el-card class="el-row-main-container box-card box-card--table">
<div class="table-top-opretar"> <div class="table-top-opretar">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="toAdd" @click="toAdd"
>新增 >新增
</el-button> </el-button>
<el-button <el-button
type="reset" type="reset"
:disabled="selectrows.length === 0" :disabled="selectrows.length === 0"
icon="el-icon-delete" icon="el-icon-delete"
@click="toMultDelete" @click="toMultDelete"
>删除 >删除
</el-button> </el-button>
<el-button <el-button
type="reset" type="reset"
:disabled="selectrows.length === 0" :disabled="selectrows.length === 0"
icon="el-icon-upload" icon="el-icon-upload"
@click="toPublish" @click="toPublish"
>发布 >发布
</el-button> </el-button>
</div> </div>
<!-- 表格主体 --> <!-- 表格主体 -->
<el-table <el-table
ref="multipleTable" ref="multipleTable"
tooltip-effect="dark" tooltip-effect="dark"
:data="tableData" :data="tableData"
class="w100p" class="w100p"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
border border
@sort-change="sortChange" @sort-change="sortChange"
:default-sort="tableSort" :default-sort="tableSort"
header-cell-class-name="duojibiaotou" header-cell-class-name="duojibiaotou"
highlight-current-row highlight-current-row
@row-click="rowClick" @row-click="rowClick"
>
<el-table-column type="selection" width="50" fixed/>
<el-table-column
align="center"
label="任务名称"
show-overflow-tooltip
min-width="160"
prop="taskTitle"
/>
<el-table-column label="任务类型" align="center" prop="taskType" sortable='custom' min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.task_type" :value="scope.row.taskType"/>
</template>
</el-table-column>
<el-table-column
align="center"
label="任务内容"
show-overflow-tooltip
min-width="160"
prop="taskContent"
/>
<!-- <el-table-column-->
<!-- align="center"-->
<!-- label="发起单位代码"-->
<!-- show-overflow-tooltip-->
<!-- min-width="90"-->
<!-- prop="branchCode"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
align="center"
label="发布单位"
show-overflow-tooltip
min-width="180"
prop="branchName"
>
</el-table-column>
<el-table-column
align="center"
label="发布部门"
show-overflow-tooltip
min-width="180"
prop="deptName"
>
</el-table-column>
<el-table-column
align="center"
label="发布人"
show-overflow-tooltip
min-width="180"
prop="taskInitiator"
>
</el-table-column>
<el-table-column
align="center"
label="任务期限"
show-overflow-tooltip
min-width="200"
prop="startToEndDate"
>
</el-table-column>
<el-table-column
align="center"
label="任务状态"
show-overflow-tooltip
min-width="90"
prop="taskStatus"
>
<template v-slot="{ row }">
<el-tag v-if="row.taskStatus === '已逾期'" type="danger"></el-tag>
<el-tag v-else-if="row.taskStatus === ''" type="success">已完成</el-tag>
<el-tag v-else type="info">未完成</el-tag>
</template>
</el-table-column>
<el-table-column
align="center"
label="状态"
show-overflow-tooltip
min-width="90"
prop="status"
>
<template v-slot="{ row }">
<el-tag v-if="row.status === '1'"></el-tag>
<el-tag v-else-if="row.status === '2'">已办结</el-tag>
<el-tag v-else type="info">未发布</el-tag>
</template>
</el-table-column>
<el-table-column
width="130px"
align="center"
label="操作"
fixed="right"
> >
<template slot-scope="scope"> <el-table-column type="selection" width="50" fixed />
<div class="link-container"> <el-table-column
<el-link class="table-opretar" type="primary" @click="toEdit(scope.row)"> align="center"
{{ scope.row.status === '0' && isMe(scope.row) ? '编辑' : '查看' }} label="任务名称"
</el-link> show-overflow-tooltip
<el-link v-if="scope.row.status === '1' && isMe(scope.row)" class="table-opretar" type="primary" min-width="160"
@click="toWithdraw(scope.row)"> prop="taskTitle"
撤回 />
</el-link> <el-table-column
</div> align="center"
</template> label="任务类型"
</el-table-column> show-overflow-tooltip
</el-table> min-width="160"
<!-- 表格页脚 --> prop="taskType"
<pagination />
v-show="total > 0" <el-table-column
:total="total" align="center"
:pageSizes="[5, 10, 20, 50]" label="任务内容"
:page.sync="page.pageNum" show-overflow-tooltip
:limit.sync="page.pageSize" min-width="160"
@pagination="getTableList" prop="taskContent"
/> />
</el-card> <!-- <el-table-column-->
<BranchOtherTask customLoad :isPublish="false" :taskId="selectTask.id" :isComponentCall="true" :isTask="0"></BranchOtherTask> <!-- align="center"-->
<EditDialog ref="editDialog" @refresh="getTableList"></EditDialog> <!-- label="发起单位代码"-->
<RemarkDialog ref="remarkDialog" @refresh="getTableList"></RemarkDialog> <!-- show-overflow-tooltip-->
<!-- min-width="90"-->
<!-- prop="branchCode"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
align="center"
label="发布单位"
show-overflow-tooltip
min-width="180"
prop="branchName"
>
</el-table-column>
<el-table-column
align="center"
label="发布部门"
show-overflow-tooltip
min-width="180"
prop="deptName"
>
</el-table-column>
<el-table-column
align="center"
label="发布人"
show-overflow-tooltip
min-width="180"
prop="taskInitiator"
>
</el-table-column>
<el-table-column
align="center"
label="任务期限"
show-overflow-tooltip
min-width="200"
prop="startToEndDate"
>
</el-table-column>
<el-table-column
align="center"
label="任务状态"
show-overflow-tooltip
min-width="90"
prop="taskStatus"
>
<template v-slot="{ row }">
<el-tag v-if="row.taskStatus === '已逾期'" type="danger"></el-tag>
<el-tag v-else-if="row.taskStatus === ''" type="success">已完成</el-tag>
<el-tag v-else type="info">未完成</el-tag>
</template>
</el-table-column>
<el-table-column
align="center"
label="状态"
show-overflow-tooltip
min-width="90"
prop="status"
>
<template v-slot="{ row }">
<el-tag v-if="row.status === '1'"></el-tag>
<el-tag v-else-if="row.status === '2'">已办结</el-tag>
<el-tag v-else type="info">未发布</el-tag>
</template>
</el-table-column>
<el-table-column
width="130px"
align="center"
label="操作"
fixed="right"
>
<template slot-scope="scope">
<div class="link-container">
<el-link class="table-opretar" type="primary" @click="toEdit(scope.row)">
{{scope.row.status === '0' && isMe(scope.row) ? '编辑':'查看'}}
</el-link>
<el-link v-if="scope.row.status === '1' && isMe(scope.row)" class="table-opretar" type="primary" @click="toWithdraw(scope.row)">
撤回
</el-link>
</div>
</template>
</el-table-column>
</el-table>
<!-- 表格页脚 -->
<pagination
v-show="total > 0"
:total="total"
:pageSizes="[10, 20, 50]"
:page.sync="page.pageNum"
:limit.sync="page.pageSize"
@pagination="getTableList"
/>
</el-card>
<EditDialog ref="editDialog" @refresh="getTableList"></EditDialog>
<RemarkDialog ref="remarkDialog" @refresh="getTableList"></RemarkDialog>
</div> </div>
</template> </template>
@ -248,7 +240,7 @@
import EditDialog from "./components/EditDialog"; import EditDialog from "./components/EditDialog";
import RemarkDialog from "./components/RemarkDialog"; import RemarkDialog from "./components/RemarkDialog";
import TableMixin from "@/mixins/table-mixin"; import TableMixin from "@/mixins/table-mixin";
import {pageListInfo, delInfo, withdrawOther, publishOther} from "@/api/task/info"; import { pageListInfo, delInfo, withdrawOther,publishOther } from "@/api/task/info";
import BranchOtherTask from '@/views/task-distribut/feedback/other-task'; import BranchOtherTask from '@/views/task-distribut/feedback/other-task';
import { import {
getAllTree, getAllTree,
@ -260,7 +252,6 @@ export default {
BranchOtherTask, BranchOtherTask,
RemarkDialog RemarkDialog
}, },
dicts: ['task_type'], //
mixins: [TableMixin], mixins: [TableMixin],
pageInfo: { pageInfo: {
title: '其他任务', title: '其他任务',
@ -314,7 +305,7 @@ export default {
MXDefaultPage() { MXDefaultPage() {
return { return {
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 10,
}; };
}, },
toRemark(row) { toRemark(row) {

@ -14,19 +14,12 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="任务类型"> <el-form-item label="任务类型">
<el-select <el-input
v-model="query.taskType" v-model="query.taskType"
placeholder="请选择" placeholder="请输入"
maxlength="32"
clearable clearable
filterable />
>
<el-option
v-for="dict in dict.type.task_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="任务内容"> <el-form-item label="任务内容">
<el-input <el-input
@ -37,20 +30,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="任务状态"> <el-form-item label="任务状态">
<el-select <el-input
v-model="query.taskStatus" v-model="query.status"
placeholder="请选择" placeholder="请输入"
maxlength="32"
clearable clearable
filterable />
>
<el-option
v-for="dict in dict.type.task_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="任务期限"> <el-form-item label="任务期限">
<el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" placeholder="选择日期" <el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" placeholder="选择日期"
@change="dateRangeChange" style="width: 220px;" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> @change="dateRangeChange" style="width: 220px;" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
@ -103,11 +90,13 @@
min-width="160" min-width="160"
prop="taskTitle" prop="taskTitle"
/> />
<el-table-column label="任务类型" align="center" prop="taskType" sortable='custom' min-width="100"> <el-table-column
<template slot-scope="scope"> align="center"
<dict-tag :options="dict.type.task_type" :value="scope.row.taskType"/> label="任务类型"
</template> show-overflow-tooltip
</el-table-column> min-width="160"
prop="taskType"
/>
<el-table-column <el-table-column
align="center" align="center"
label="任务内容" label="任务内容"
@ -147,24 +136,19 @@
prop="startToEndDate" prop="startToEndDate"
> >
</el-table-column> </el-table-column>
<el-table-column label="任务状态" align="center" prop="taskStatus" sortable='custom' min-width="100"> <el-table-column
<template slot-scope="scope"> align="center"
<dict-tag :options="dict.type.task_status" :value="scope.row.taskStatus"/> label="任务状态"
show-overflow-tooltip
min-width="90"
prop="taskStatus"
>
<template v-slot="{ row }">
<el-tag v-if="row.taskStatus === '已逾期'" type="danger"></el-tag>
<el-tag v-else-if="row.taskStatus === ''" type="success">已完成</el-tag>
<el-tag v-else type="info">未完成</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- align="center"-->
<!-- label="任务状态"-->
<!-- show-overflow-tooltip-->
<!-- min-width="90"-->
<!-- prop="taskStatus"-->
<!-- >-->
<!-- <template v-slot="{ row }">-->
<!-- <el-tag v-if="row.taskStatus === '已逾期'" type="danger"></el-tag>-->
<!-- <el-tag v-else-if="row.taskStatus === ''" type="success">已完成</el-tag>-->
<!-- <el-tag v-else type="info">未完成</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column <el-table-column
align="center" align="center"
label="状态" label="状态"
@ -222,8 +206,7 @@
<script> <script>
import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog"; import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog";
import TableMixin from "@/mixins/table-mixin"; import TableMixin from "@/mixins/table-mixin";
// import { pageListInfo,pageListByUser } from "@/api/task/info"; import { pageListInfo,pageListByUser } from "@/api/task/info";
import { pageListByUser } from "@/api/task/branch";
import { addByUser, deleteByUser } from "@/api/task/branch"; import { addByUser, deleteByUser } from "@/api/task/branch";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
@ -232,7 +215,6 @@ export default {
components: { components: {
AuditDialog, AuditDialog,
}, },
dicts: ['task_type','task_status'], //
mixins: [TableMixin], mixins: [TableMixin],
pageInfo: { pageInfo: {
title: "机构任务", title: "机构任务",
@ -311,7 +293,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/task/branch/exportByUser', { this.download('/task/info/export', {
...this.queryParams ...this.queryParams
}, `我的任务_${new Date().getTime()}.xlsx`) }, `我的任务_${new Date().getTime()}.xlsx`)
}, },

@ -40,25 +40,17 @@
</el-form-item> </el-form-item>
<!-- 任务类型 --> <!-- 任务类型 -->
<el-form-item label="任务类型" prop="taskType"> <el-form-item label="任务类型" prop="taskType">
<el-select <el-input
v-model="queryParams.taskType" v-model="queryParams.taskType"
placeholder="请选择任务类型" placeholder="请输入任务类型"
clearable clearable
filterable />
>
<el-option
v-for="dict in dict.type.task_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<!-- 任务标签 --> <!-- 标签名称 -->
<el-form-item label="任务标签" prop="tagNames"> <el-form-item label="标签名称" prop="tagNames">
<el-input <el-input
v-model="queryParams.tagNames" v-model="queryParams.tagNames"
placeholder="请输入任务标签" placeholder="请输入标签名称"
clearable clearable
/> />
</el-form-item> </el-form-item>
@ -121,12 +113,11 @@
<el-table v-loading="loading" :data="templateList" @sort-change="handleSortChange" <el-table v-loading="loading" :data="templateList" @sort-change="handleSortChange"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="创建单位" align="center" prop="createByBranch" />
<el-table-column label="创建部门" align="center" prop="createByDeptName" />
<el-table-column label="创建人" align="center" prop="createByUserName" />
<el-table-column label="模板名称" align="center" prop="templateName" /> <el-table-column label="模板名称" align="center" prop="templateName" />
<el-table-column label="任务类型" align="center" prop="taskType" sortable='custom'> <el-table-column label="任务类型" align="center" prop="taskType" />
<template slot-scope="scope">
<dict-tag :options="dict.type.task_type" :value="scope.row.taskType"/>
</template>
</el-table-column>
<el-table-column label="任务标题" align="center" prop="taskTitle" /> <el-table-column label="任务标题" align="center" prop="taskTitle" />
<el-table-column label="任务要求" align="center" > <el-table-column label="任务要求" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -134,9 +125,6 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务标签" align="center" prop="tagNames" /> <el-table-column label="任务标签" align="center" prop="tagNames" />
<el-table-column label="创建单位" align="center" prop="createByBranch" />
<el-table-column label="创建部门" align="center" prop="createByDeptName" />
<el-table-column label="创建人" align="center" prop="createByUserName" />
<el-table-column label="创建时间" align="center" prop="createTimeVo" /> <el-table-column label="创建时间" align="center" prop="createTimeVo" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -180,21 +168,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="任务类型" prop="taskType"> <el-form-item label="任务类型" prop="taskType">
<el-select <el-input v-model="form.taskType" placeholder="请输入任务类型" :disabled="!isEditMode" />
v-model="form.taskType"
placeholder="请选择任务类型"
:disabled="!isEditMode"
clearable
filterable
style="width: 100%;"
>
<el-option
v-for="dict in dict.type.task_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -251,7 +225,6 @@ export default {
components: { components: {
TagTable TagTable
}, },
dicts: ['task_type'], //
data() { data() {
return { return {
// //
@ -451,7 +424,7 @@ export default {
handleExport() { handleExport() {
this.download('task/template/export', { this.download('task/template/export', {
...this.queryParams ...this.queryParams
}, `任务模板_${new Date().getTime()}.xlsx`) }, `template_${new Date().getTime()}.xlsx`)
} }
} }
}; };

Loading…
Cancel
Save