Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zyx.net
2022-07-02 15:33:05 +08:00
35 changed files with 2398 additions and 362 deletions
@@ -1,5 +1,6 @@
package com.jero.modules.cert.collect.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.cert.collect.entity.ParamsCollectManifestUserTypeLogEO;
import com.jero.modules.cert.collect.mapper.ParamsCollectManifestUserTypeLogEOMapper;
@@ -41,6 +42,14 @@ public class ParamsCollectManifestUserTypeLogEOServiceImpl extends ServiceImpl<P
*/
@Override
public void editById(ParamsCollectManifestUserTypeLogEO paramsCollectManifestUserTypeLogEO) {
String projectId = paramsCollectManifestUserTypeLogEO.getProjectId();
String paramsManifestId = paramsCollectManifestUserTypeLogEO.getParamsManifestId();
String userId = paramsCollectManifestUserTypeLogEO.getUserId();
ParamsCollectManifestUserTypeLogEO oldEO = queryCurrentType(projectId, paramsManifestId, userId);
if (ObjectUtil.isNotEmpty(oldEO)) {
paramsCollectManifestUserTypeLogEO.setId(oldEO.getId());
}
Date now = new Date();
paramsCollectManifestUserTypeLogEO.setUpdateTime(now);
saveOrUpdate(paramsCollectManifestUserTypeLogEO);
@@ -0,0 +1,170 @@
package com.jero.modules.report.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
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 com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
* @Description: 月报填写
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Api(tags="月报填写")
@RestController
@RequestMapping("/report/lawsMonthlyReportWriteEO")
@Slf4j
public class LawsMonthlyReportWriteEOController extends JeroController<LawsMonthlyReportWriteEO, ILawsMonthlyReportWriteEOService> {
@Autowired
private ILawsMonthlyReportWriteEOService lawsMonthlyReportWriteEOService;
/**
* 分页列表查询
*
* @param lawsMonthlyReportWriteEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "月报填写-分页列表查询")
@ApiOperation(value="月报填写-分页列表查询", notes="月报填写-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportWriteEO, req.getParameterMap());
Page<LawsMonthlyReportWriteEO> page = new Page<LawsMonthlyReportWriteEO>(pageNo, pageSize);
IPage<LawsMonthlyReportWriteEO> pageList = lawsMonthlyReportWriteEOService.getPageInfo(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "月报填写-列表查询")
@ApiOperation(value="月报填写-列表查询", notes="月报填写-列表查询")
@GetMapping(value = "/list")
public Result<List<LawsMonthlyReportWriteEO>> queryList() {
List<LawsMonthlyReportWriteEO> list = lawsMonthlyReportWriteEOService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param lawsMonthlyReportWriteEO
* @return
*/
@AutoLog(value = "月报填写-添加")
@ApiOperation(value="月报填写-添加", notes="月报填写-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
lawsMonthlyReportWriteEOService.add(lawsMonthlyReportWriteEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param lawsMonthlyReportWriteEO
* @return
*/
@AutoLog(value = "月报填写-编辑")
@ApiOperation(value="月报填写-编辑", notes="月报填写-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
lawsMonthlyReportWriteEOService.editById(lawsMonthlyReportWriteEO);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "月报填写-通过id删除")
@ApiOperation(value="月报填写-通过id删除", notes="月报填写-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
lawsMonthlyReportWriteEOService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "月报填写-批量删除")
@ApiOperation(value="月报填写-批量删除", notes="月报填写-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.lawsMonthlyReportWriteEOService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "月报填写-通过id查询")
@ApiOperation(value="月报填写-通过id查询", notes="月报填写-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO = lawsMonthlyReportWriteEOService.queryById(id);
if(lawsMonthlyReportWriteEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(lawsMonthlyReportWriteEO);
}
/**
* 导出excel
*
* @param request
* @param lawsMonthlyReportWriteEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
return super.exportXls(request, lawsMonthlyReportWriteEO, LawsMonthlyReportWriteEO.class, "月报填写");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, LawsMonthlyReportWriteEO.class);
}
}
@@ -0,0 +1,170 @@
package com.jero.modules.report.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.report.entity.NewOpinionTemplateEO;
import com.jero.modules.report.service.INewOpinionTemplateEOService;
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 com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
* @Description: 新征求意见清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Api(tags="新征求意见清单模板")
@RestController
@RequestMapping("/report/newOpinionTemplateEO")
@Slf4j
public class NewOpinionTemplateEOController extends JeroController<NewOpinionTemplateEO, INewOpinionTemplateEOService> {
@Autowired
private INewOpinionTemplateEOService newOpinionTemplateEOService;
/**
* 分页列表查询
*
* @param newOpinionTemplateEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "新征求意见清单模板-分页列表查询")
@ApiOperation(value="新征求意见清单模板-分页列表查询", notes="新征求意见清单模板-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(NewOpinionTemplateEO newOpinionTemplateEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<NewOpinionTemplateEO> queryWrapper = QueryGenerator.initQueryWrapper(newOpinionTemplateEO, req.getParameterMap());
Page<NewOpinionTemplateEO> page = new Page<NewOpinionTemplateEO>(pageNo, pageSize);
IPage<NewOpinionTemplateEO> pageList = newOpinionTemplateEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "新征求意见清单模板-列表查询")
@ApiOperation(value="新征求意见清单模板-列表查询", notes="新征求意见清单模板-列表查询")
@GetMapping(value = "/list")
public Result<List<NewOpinionTemplateEO>> queryList() {
List<NewOpinionTemplateEO> list = newOpinionTemplateEOService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param newOpinionTemplateEO
* @return
*/
@AutoLog(value = "新征求意见清单模板-添加")
@ApiOperation(value="新征求意见清单模板-添加", notes="新征求意见清单模板-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody NewOpinionTemplateEO newOpinionTemplateEO) {
newOpinionTemplateEOService.add(newOpinionTemplateEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param newOpinionTemplateEO
* @return
*/
@AutoLog(value = "新征求意见清单模板-编辑")
@ApiOperation(value="新征求意见清单模板-编辑", notes="新征求意见清单模板-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody NewOpinionTemplateEO newOpinionTemplateEO) {
newOpinionTemplateEOService.editById(newOpinionTemplateEO);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "新征求意见清单模板-通过id删除")
@ApiOperation(value="新征求意见清单模板-通过id删除", notes="新征求意见清单模板-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
newOpinionTemplateEOService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "新征求意见清单模板-批量删除")
@ApiOperation(value="新征求意见清单模板-批量删除", notes="新征求意见清单模板-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.newOpinionTemplateEOService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "新征求意见清单模板-通过id查询")
@ApiOperation(value="新征求意见清单模板-通过id查询", notes="新征求意见清单模板-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
NewOpinionTemplateEO newOpinionTemplateEO = newOpinionTemplateEOService.queryById(id);
if(newOpinionTemplateEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(newOpinionTemplateEO);
}
/**
* 导出excel
*
* @param request
* @param newOpinionTemplateEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, NewOpinionTemplateEO newOpinionTemplateEO) {
return super.exportXls(request, newOpinionTemplateEO, NewOpinionTemplateEO.class, "新征求意见清单模板");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, NewOpinionTemplateEO.class);
}
}
@@ -0,0 +1,170 @@
package com.jero.modules.report.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.report.entity.NewStandardTemplateEO;
import com.jero.modules.report.service.INewStandardTemplateEOService;
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 com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
* @Description: 新发布标准清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Api(tags="新发布标准清单模板")
@RestController
@RequestMapping("/report/newStandardTemplateEO")
@Slf4j
public class NewStandardTemplateEOController extends JeroController<NewStandardTemplateEO, INewStandardTemplateEOService> {
@Autowired
private INewStandardTemplateEOService newStandardTemplateEOService;
/**
* 分页列表查询
*
* @param newStandardTemplateEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "新发布标准清单模板-分页列表查询")
@ApiOperation(value="新发布标准清单模板-分页列表查询", notes="新发布标准清单模板-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(NewStandardTemplateEO newStandardTemplateEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<NewStandardTemplateEO> queryWrapper = QueryGenerator.initQueryWrapper(newStandardTemplateEO, req.getParameterMap());
Page<NewStandardTemplateEO> page = new Page<NewStandardTemplateEO>(pageNo, pageSize);
IPage<NewStandardTemplateEO> pageList = newStandardTemplateEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "新发布标准清单模板-列表查询")
@ApiOperation(value="新发布标准清单模板-列表查询", notes="新发布标准清单模板-列表查询")
@GetMapping(value = "/list")
public Result<List<NewStandardTemplateEO>> queryList() {
List<NewStandardTemplateEO> list = newStandardTemplateEOService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param newStandardTemplateEO
* @return
*/
@AutoLog(value = "新发布标准清单模板-添加")
@ApiOperation(value="新发布标准清单模板-添加", notes="新发布标准清单模板-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody NewStandardTemplateEO newStandardTemplateEO) {
newStandardTemplateEOService.add(newStandardTemplateEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param newStandardTemplateEO
* @return
*/
@AutoLog(value = "新发布标准清单模板-编辑")
@ApiOperation(value="新发布标准清单模板-编辑", notes="新发布标准清单模板-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody NewStandardTemplateEO newStandardTemplateEO) {
newStandardTemplateEOService.editById(newStandardTemplateEO);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "新发布标准清单模板-通过id删除")
@ApiOperation(value="新发布标准清单模板-通过id删除", notes="新发布标准清单模板-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
newStandardTemplateEOService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "新发布标准清单模板-批量删除")
@ApiOperation(value="新发布标准清单模板-批量删除", notes="新发布标准清单模板-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.newStandardTemplateEOService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "新发布标准清单模板-通过id查询")
@ApiOperation(value="新发布标准清单模板-通过id查询", notes="新发布标准清单模板-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
NewStandardTemplateEO newStandardTemplateEO = newStandardTemplateEOService.queryById(id);
if(newStandardTemplateEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(newStandardTemplateEO);
}
/**
* 导出excel
*
* @param request
* @param newStandardTemplateEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, NewStandardTemplateEO newStandardTemplateEO) {
return super.exportXls(request, newStandardTemplateEO, NewStandardTemplateEO.class, "新发布标准清单模板");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, NewStandardTemplateEO.class);
}
}
@@ -0,0 +1,193 @@
package com.jero.modules.report.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
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 lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 月报填写
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Data
@TableName("laws_monthly_report_write")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="laws_monthly_report_write对象", description="月报填写")
public class LawsMonthlyReportWriteEO implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**月份*/
@Excel(name = "月份", width = 15)
@ApiModelProperty(value = "月份")
private java.lang.String month;
/**章节目录*/
@Excel(name = "章节目录", width = 15)
@ApiModelProperty(value = "章节目录")
private java.lang.String memoriesChapter;
//章节目录名称
@TableField(exist = false)
private java.lang.String memoriesChapterName;
/**内容模板*/
@Excel(name = "内容模板", width = 15)
@ApiModelProperty(value = "内容模板")
private java.lang.String contentTemplate;
/**中文标题*/
@Excel(name = "中文标题", width = 15)
@ApiModelProperty(value = "中文标题")
private java.lang.String titleCn;
/**英文标题*/
@Excel(name = "英文标题", width = 15)
@ApiModelProperty(value = "英文标题")
private java.lang.String titleEn;
/**相关领域*/
@Excel(name = "相关领域", width = 15)
@ApiModelProperty(value = "相关领域")
private java.lang.String technologyTerritory;
/**适用车型*/
@Excel(name = "适用车型", width = 15)
@ApiModelProperty(value = "适用车型")
private java.lang.String applyCar;
/**适用范围*/
@Excel(name = "适用范围", width = 15)
@ApiModelProperty(value = "适用范围")
private java.lang.String applyScope;
/**状态*/
@Excel(name = "状态", width = 15)
@ApiModelProperty(value = "状态")
private java.lang.String state;
/**用法*/
@Excel(name = "用法", width = 15)
@ApiModelProperty(value = "用法")
private java.lang.String useMethod;
/**实施车型*/
@Excel(name = "实施车型", width = 15)
@ApiModelProperty(value = "实施车型")
private java.lang.String implementCar;
/**发布日期*/
@Excel(name = "发布日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "发布日期")
private java.util.Date issueTime;
/**新车型实施日期*/
@Excel(name = "新车型实施日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "新车型实施日期")
private java.util.Date newCarImplementTime;
/**在产车实施日期*/
@Excel(name = "在产车实施日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "在产车实施日期")
private java.util.Date productionCarImplementTime;
/**主要内容中文*/
@Excel(name = "主要内容中文", width = 15)
@ApiModelProperty(value = "主要内容中文")
private java.lang.String contentCn;
/**主要内容英文*/
@Excel(name = "主要内容英文", width = 15)
@ApiModelProperty(value = "主要内容英文")
private java.lang.String contentEn;
/**NIO工作进展中文*/
@Excel(name = "NIO工作进展中文", width = 15)
@ApiModelProperty(value = "NIO工作进展中文")
private java.lang.String workProgressCn;
/**NIO工作进展英文*/
@Excel(name = "NIO工作进展英文", width = 15)
@ApiModelProperty(value = "NIO工作进展英文")
private java.lang.String workProgressEn;
/**法规联系人*/
@Excel(name = "法规联系人", width = 15)
@ApiModelProperty(value = "法规联系人")
private java.lang.String lawsContact;
/**链接*/
@Excel(name = "链接", width = 15)
@ApiModelProperty(value = "链接")
private java.lang.String link;
/**导出状态*/
@ApiModelProperty(value = "导出状态")
private java.lang.String exportState;
//新征求意见清单模板
@TableField(exist = false)
private List<NewOpinionTemplateEO> newOpinionTemplateEOList;
//新发布标准清单模板
@TableField(exist = false)
private List<NewStandardTemplateEO> newStandardTemplateEOList;
@TableField(exist = false)
private String cut;
}
@@ -0,0 +1,91 @@
package com.jero.modules.report.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 新征求意见清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Data
@TableName("new_opinion_template")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="new_opinion_template对象", description="新征求意见清单模板")
public class NewOpinionTemplateEO implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**月报填写表id*/
@Excel(name = "月报填写表id", width = 15)
@ApiModelProperty(value = "月报填写表id")
private java.lang.String lawsMonthlyReportWriteId;
/**计划号中文*/
@Excel(name = "计划号中文", width = 15)
@ApiModelProperty(value = "计划号中文")
private java.lang.String planNumberCn;
/**标准名称中文*/
@Excel(name = "标准名称中文", width = 15)
@ApiModelProperty(value = "标准名称中文")
private java.lang.String standardNameCn;
/**标准名称英文*/
@Excel(name = "标准名称英文", width = 15)
@ApiModelProperty(value = "标准名称英文")
private java.lang.String standardNameEn;
/**征求意见截止日期*/
@Excel(name = "征求意见截止日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "征求意见截止日期")
private java.util.Date expirationDate;
}
@@ -0,0 +1,98 @@
package com.jero.modules.report.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 新发布标准清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Data
@TableName("new_standard_template")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="new_standard_template对象", description="新发布标准清单模板")
public class NewStandardTemplateEO implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**月报填写表id*/
@Excel(name = "月报填写表id", width = 15)
@ApiModelProperty(value = "月报填写表id")
private java.lang.String lawsMonthlyReportWriteId;
/**标准编号*/
@Excel(name = "标准编号", width = 15)
@ApiModelProperty(value = "标准编号")
private java.lang.String standardNumber;
/**标准名称中文*/
@Excel(name = "标准名称中文", width = 15)
@ApiModelProperty(value = "标准名称中文")
private java.lang.String standardNameCn;
/**标准名称英文*/
@Excel(name = "标准名称英文", width = 15)
@ApiModelProperty(value = "标准名称英文")
private java.lang.String standardNameEn;
/**发布日期*/
@Excel(name = "发布日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "发布日期")
private java.util.Date issueTime;
/**实施日期*/
@Excel(name = "实施日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "实施日期")
private java.util.Date implementTime;
}
@@ -0,0 +1,39 @@
package com.jero.modules.report.enums;
/**
* @description
* @date 2022/1/21 15:22
* @auth zhn
*/
public enum ContentTemplateEnum {
DEFAULT_TEMPLATE("Content template","1"),
NEW_REQUEST_LIST_TEMPLATE("新征求意见清单模板","2"),
NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE("新发布标准清单模板","3");
String name;
String value;
private ContentTemplateEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -0,0 +1,17 @@
package com.jero.modules.report.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 月报填写
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
public interface LawsMonthlyReportWriteEOMapper extends BaseMapper<LawsMonthlyReportWriteEO> {
}
@@ -0,0 +1,17 @@
package com.jero.modules.report.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.report.entity.NewOpinionTemplateEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 新征求意见清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
public interface NewOpinionTemplateEOMapper extends BaseMapper<NewOpinionTemplateEO> {
}
@@ -0,0 +1,17 @@
package com.jero.modules.report.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.report.entity.NewStandardTemplateEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 新发布标准清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
public interface NewStandardTemplateEOMapper extends BaseMapper<NewStandardTemplateEO> {
}
@@ -0,0 +1,33 @@
<?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="com.jero.modules.report.mapper.LawsMonthlyReportWriteEOMapper">
<resultMap id="LawsMonthlyReportWriteEOResultMap" type="com.jero.modules.report.entity.LawsMonthlyReportWriteEO">
<id column="id" property="id" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="sys_org_code" property="sysOrgCode" />
<result column="month" property="month" />
<result column="memories_chapter" property="memoriesChapter" />
<result column="content_template" property="contentTemplate" />
<result column="title_cn" property="titleCn" />
<result column="title_en" property="titleEn" />
<result column="technology_territory" property="technologyTerritory" />
<result column="apply_car" property="applyCar" />
<result column="apply_scope" property="applyScope" />
<result column="state" property="state" />
<result column="use_method" property="useMethod" />
<result column="implement_car" property="implementCar" />
<result column="issue_time" property="issueTime" />
<result column="new_car_implement_time" property="newCarImplementTime" />
<result column="production_car_implement_time" property="productionCarImplementTime" />
<result column="content_cn" property="contentCn" />
<result column="content_en" property="contentEn" />
<result column="work_progress_cn" property="workProgressCn" />
<result column="work_progress_en" property="workProgressEn" />
<result column="laws_contact" property="lawsContact" />
<result column="link" property="link" />
<result column="export_state" property="exportState" />
</resultMap>
</mapper>
@@ -0,0 +1,17 @@
<?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="com.jero.modules.report.mapper.NewOpinionTemplateEOMapper">
<resultMap id="NewOpinionTemplateEOResultMap" type="com.jero.modules.report.entity.NewOpinionTemplateEO">
<id column="id" property="id" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="sys_org_code" property="sysOrgCode" />
<result column="laws_monthly_report_write_id" property="lawsMonthlyReportWriteId" />
<result column="plan_number_cn" property="planNumberCn" />
<result column="standard_name_cn" property="standardNameCn" />
<result column="standard_name_en" property="standardNameEn" />
<result column="expiration_date" property="expirationDate" />
</resultMap>
</mapper>
@@ -0,0 +1,18 @@
<?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="com.jero.modules.report.mapper.NewStandardTemplateEOMapper">
<resultMap id="NewStandardTemplateEOResultMap" type="com.jero.modules.report.entity.NewStandardTemplateEO">
<id column="id" property="id" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="sys_org_code" property="sysOrgCode" />
<result column="laws_monthly_report_write_id" property="lawsMonthlyReportWriteId" />
<result column="standard_number" property="standardNumber" />
<result column="standard_name_cn" property="standardNameCn" />
<result column="standard_name_en" property="standardNameEn" />
<result column="issue_time" property="issueTime" />
<result column="implement_time" property="implementTime" />
</resultMap>
</mapper>
@@ -0,0 +1,72 @@
package com.jero.modules.report.service;
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.jero.modules.report.entity.LawsMonthlyReportWriteEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 月报填写
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
public interface ILawsMonthlyReportWriteEOService extends IService<LawsMonthlyReportWriteEO> {
/**
* 保存
*
* @param lawsMonthlyReportWriteEO
* @return
*/
void add(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO);
/**
* 编辑
*
* @param lawsMonthlyReportWriteEO
* @return
*/
void editById(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
LawsMonthlyReportWriteEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<LawsMonthlyReportWriteEO> queryList();
/**
* 分页
* @param page
* @param queryWrapper
* @return
*/
IPage<LawsMonthlyReportWriteEO> getPageInfo(Page<LawsMonthlyReportWriteEO> page, QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper);
}
@@ -0,0 +1,61 @@
package com.jero.modules.report.service;
import com.jero.modules.report.entity.NewOpinionTemplateEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 新征求意见清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
public interface INewOpinionTemplateEOService extends IService<NewOpinionTemplateEO> {
/**
* 保存
*
* @param newOpinionTemplateEO
* @return
*/
void add(NewOpinionTemplateEO newOpinionTemplateEO);
/**
* 更新
*
* @param newOpinionTemplateEO
* @return
*/
void editById(NewOpinionTemplateEO newOpinionTemplateEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
NewOpinionTemplateEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<NewOpinionTemplateEO> queryList();
}
@@ -0,0 +1,61 @@
package com.jero.modules.report.service;
import com.jero.modules.report.entity.NewStandardTemplateEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 新发布标准清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
public interface INewStandardTemplateEOService extends IService<NewStandardTemplateEO> {
/**
* 保存
*
* @param newStandardTemplateEO
* @return
*/
void add(NewStandardTemplateEO newStandardTemplateEO);
/**
* 更新
*
* @param newStandardTemplateEO
* @return
*/
void editById(NewStandardTemplateEO newStandardTemplateEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
NewStandardTemplateEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<NewStandardTemplateEO> queryList();
}
@@ -0,0 +1,212 @@
package com.jero.modules.report.service.impl;
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.jero.common.constant.enums.CutEnum;
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
import com.jero.modules.report.entity.NewOpinionTemplateEO;
import com.jero.modules.report.entity.NewStandardTemplateEO;
import com.jero.modules.report.enums.ContentTemplateEnum;
import com.jero.modules.report.mapper.LawsMonthlyReportWriteEOMapper;
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
import com.jero.modules.report.service.INewOpinionTemplateEOService;
import com.jero.modules.report.service.INewStandardTemplateEOService;
import com.jero.modules.system.util.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import java.util.UUID;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 月报填写
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Service
public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthlyReportWriteEOMapper, LawsMonthlyReportWriteEO> implements ILawsMonthlyReportWriteEOService {
@Autowired
private INewOpinionTemplateEOService iNewOpinionTemplateEOService;
@Autowired
private INewStandardTemplateEOService iNewStandardTemplateEOService;
@Autowired
private ILawsMonthlyReportTitleTemplateEOService lawsMonthlyReportTitleTemplateEOService;
/**
* 保存
*
* @param lawsMonthlyReportWriteEO
* @return
*/
@Override
public void add(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
Date now = new Date();
lawsMonthlyReportWriteEO.setCreateTime(now);
lawsMonthlyReportWriteEO.setUpdateTime(now);
save(lawsMonthlyReportWriteEO);
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新征求意见清单模板
List<NewOpinionTemplateEO> newOpinionTemplateEOList = lawsMonthlyReportWriteEO.getNewOpinionTemplateEOList();
for (NewOpinionTemplateEO newOpinionTemplateEO : newOpinionTemplateEOList) {
newOpinionTemplateEO.setLawsMonthlyReportWriteId(lawsMonthlyReportWriteEO.getId());
}
iNewOpinionTemplateEOService.saveBatch(newOpinionTemplateEOList);
}else if (ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新发布标准清单模板
List<NewStandardTemplateEO> newStandardTemplateEOList = lawsMonthlyReportWriteEO.getNewStandardTemplateEOList();
for (NewStandardTemplateEO newStandardTemplateEO : newStandardTemplateEOList) {
newStandardTemplateEO.setLawsMonthlyReportWriteId(lawsMonthlyReportWriteEO.getId());
}
iNewStandardTemplateEOService.saveBatch(newStandardTemplateEOList);
}
}
/**
* 编辑
*
* @param lawsMonthlyReportWriteEO
* @return
*/
@Override
public void editById(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
Date now = new Date();
lawsMonthlyReportWriteEO.setUpdateTime(now);
saveOrUpdate(lawsMonthlyReportWriteEO);
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新征求意见清单模板
List<NewOpinionTemplateEO> newOpinionTemplateEOList = lawsMonthlyReportWriteEO.getNewOpinionTemplateEOList();
iNewOpinionTemplateEOService.updateBatchById(newOpinionTemplateEOList);
}else if (ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新发布标准清单模板
List<NewStandardTemplateEO> newStandardTemplateEOList = lawsMonthlyReportWriteEO.getNewStandardTemplateEOList();
iNewStandardTemplateEOService.updateBatchById(newStandardTemplateEOList);
}
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
//删除新征求意见清单模板
LambdaQueryWrapper<NewOpinionTemplateEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,ids);
iNewOpinionTemplateEOService.remove(wrapper);
//删除新发布标准清单模板
LambdaQueryWrapper<NewStandardTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,ids);
iNewStandardTemplateEOService.remove(queryWrapper);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public LawsMonthlyReportWriteEO queryById(String id) {
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO = getById(id);
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新征求意见清单模板
LambdaQueryWrapper<NewOpinionTemplateEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,id);
List<NewOpinionTemplateEO> newOpinionTemplateEOList = iNewOpinionTemplateEOService.list(wrapper);
lawsMonthlyReportWriteEO.setNewOpinionTemplateEOList(newOpinionTemplateEOList);
}else if(ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新发布标准清单模板
LambdaQueryWrapper<NewStandardTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,id);
List<NewStandardTemplateEO> newStandardTemplateEOList = iNewStandardTemplateEOService.list(queryWrapper);
lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(newStandardTemplateEOList);
}
return lawsMonthlyReportWriteEO;
}
/**
* 列表查询
*
* @return
*/
@Override
public List<LawsMonthlyReportWriteEO> queryList() {
return list();
}
@Override
public IPage<LawsMonthlyReportWriteEO> getPageInfo(Page<LawsMonthlyReportWriteEO> page, QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper) {
Page<LawsMonthlyReportWriteEO> pageInfo = this.page(page, queryWrapper);
//法规月报id
List<String> lawsMonthlyReportIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
//获取章节目录
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOList = lawsMonthlyReportTitleTemplateEOService.list();
//新征求意见清单模板
LambdaQueryWrapper<NewOpinionTemplateEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportIdList);
List<NewOpinionTemplateEO> newOpinionTemplateEOList = iNewOpinionTemplateEOService.list(wrapper);
//新发布标准清单模板
LambdaQueryWrapper<NewStandardTemplateEO> qrapperTemp = new LambdaQueryWrapper<>();
qrapperTemp.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportIdList);
List<NewStandardTemplateEO> newStandardTemplateEOList = iNewStandardTemplateEOService.list(qrapperTemp);
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : pageInfo.getRecords()) {
//处理章节目录
if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapter())){
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOList.stream()
.filter(e -> lawsMonthlyReportWriteEO.getMemoriesChapter().equals(e.getId())).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEO.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleCn());
}else if(CutEnum.EN.getValue().equals(lawsMonthlyReportWriteEO.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleEn());
}
}
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新征求意见清单模板
List<NewOpinionTemplateEO> collect = newOpinionTemplateEOList.stream()
.filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList());
lawsMonthlyReportWriteEO.setNewOpinionTemplateEOList(collect);
}else if(ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新发布标准清单模板
List<NewStandardTemplateEO> collect = newStandardTemplateEOList.stream()
.filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList());
lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(collect);
}
}
return pageInfo;
}
}
@@ -0,0 +1,89 @@
package com.jero.modules.report.service.impl;
import com.jero.modules.report.entity.NewOpinionTemplateEO;
import com.jero.modules.report.mapper.NewOpinionTemplateEOMapper;
import com.jero.modules.report.service.INewOpinionTemplateEOService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 新征求意见清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Service
public class NewOpinionTemplateEOServiceImpl extends ServiceImpl<NewOpinionTemplateEOMapper, NewOpinionTemplateEO> implements INewOpinionTemplateEOService {
/**
* 保存
*
* @param newOpinionTemplateEO
* @return
*/
@Override
public void add(NewOpinionTemplateEO newOpinionTemplateEO) {
Date now = new Date();
newOpinionTemplateEO.setCreateTime(now);
newOpinionTemplateEO.setUpdateTime(now);
save(newOpinionTemplateEO);
}
/**
* 更新
*
* @param newOpinionTemplateEO
* @return
*/
@Override
public void editById(NewOpinionTemplateEO newOpinionTemplateEO) {
Date now = new Date();
newOpinionTemplateEO.setUpdateTime(now);
saveOrUpdate(newOpinionTemplateEO);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public NewOpinionTemplateEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<NewOpinionTemplateEO> queryList() {
return list();
}
}
@@ -0,0 +1,89 @@
package com.jero.modules.report.service.impl;
import com.jero.modules.report.entity.NewStandardTemplateEO;
import com.jero.modules.report.mapper.NewStandardTemplateEOMapper;
import com.jero.modules.report.service.INewStandardTemplateEOService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 新发布标准清单模板
* @Author: jero-boot
* @Date: 2022-07-02
* @Version: V1.0
*/
@Service
public class NewStandardTemplateEOServiceImpl extends ServiceImpl<NewStandardTemplateEOMapper, NewStandardTemplateEO> implements INewStandardTemplateEOService {
/**
* 保存
*
* @param newStandardTemplateEO
* @return
*/
@Override
public void add(NewStandardTemplateEO newStandardTemplateEO) {
Date now = new Date();
newStandardTemplateEO.setCreateTime(now);
newStandardTemplateEO.setUpdateTime(now);
save(newStandardTemplateEO);
}
/**
* 更新
*
* @param newStandardTemplateEO
* @return
*/
@Override
public void editById(NewStandardTemplateEO newStandardTemplateEO) {
Date now = new Date();
newStandardTemplateEO.setUpdateTime(now);
saveOrUpdate(newStandardTemplateEO);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public NewStandardTemplateEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<NewStandardTemplateEO> queryList() {
return list();
}
}
@@ -178,6 +178,7 @@ export default {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
let param = {ids: this.selectedRowKeysArray, paramsManifestId:this.$route.query.id ,projectId: this.$route.query.projectId, dre:this.selectedRowKeysDate[0].username }
this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/updateDreBatch',
method: 'post',
@@ -199,14 +200,17 @@ export default {
_this.$message.success(_this.$t('OperationSuccessful'))
// 填写人
// 获取当前登陆人
this.confirmLoading = false
this.$emit('GetgetLoginUserType')
this.$emit('GetgetTableList')
this.$emit('areaVisibleAssignedbyflag', false)
}else{
this.confirmLoading = false
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch( (error) =>{
this.confirmLoading = false
console.log(error);
});
}
@@ -99,7 +99,9 @@
<div v-else-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
@@ -114,7 +116,9 @@
<div v-else-if='detailDate.controlType === "3"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
@@ -141,7 +145,9 @@
<div v-else-if='detailDate.controlType === "5"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
@@ -336,7 +342,9 @@
</div>
</div>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
@@ -453,7 +461,9 @@
<div v-else-if='detailDate.controlType === "8"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
@@ -475,7 +485,9 @@
<div v-else-if='detailDate.controlType === "9"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
@@ -497,7 +509,9 @@
<div v-else-if='detailDate.controlType === "10"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
<a-select v-model="item.dataValue"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" class="itemOption" :title=" itemin.label ">
@@ -6,41 +6,76 @@
ref='ruleForm'
:model='formInline'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='24'>
<a-form-model-item style='line-height: 31.9999px;' prop='sourceConfigId' class='aform'>
<div style='display: flex; justify-content: center'>
<span class="Requireditem">*</span>
<div style='width: 107px;line-height: 29px;'>{{ $t('from') }}&nbsp;&nbsp;&nbsp;</div>
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.sourceConfigId" allowClear style='width: 140%'>
<a-select-option v-for="(item, key) in fromDate" :key="key" :value="item.value" style='width: 140%'>
<span style="display: inline-block;width: 140%" :title=" item.label ">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('from')">{{$t('from')}}</span>
</div>
<a-form-model-item class="itemModel" prop="sourceConfigId">
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')"
style="width: calc(100% - 90px)"
v-model="formInline.sourceConfigId" allowClear>
<a-select-option v-for="(item, key) in fromDate" :key="key" :value="item.value">
<span :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
<div style='width: 90px;line-height: 29px;'>&nbsp;&nbsp;&nbsp;&nbsp;{{ $t('configure') }}</div>
</div>
</a-form-model-item>
<span style='width: 90px;line-height: 29px;margin-top: 8px'>&nbsp;&nbsp;&nbsp;&nbsp;{{ $t('configure') }}</span>
</a-form-model-item>
</div>
<!-- <a-form-model-item style='line-height: 31.9999px;' prop='sourceConfigId' class='aform'>-->
<!-- <div style='display: flex; justify-content: center'>-->
<!-- <span class="Requireditem">*</span>-->
<!-- <div style='width: 107px;line-height: 29px;'>{{ $t('from') }}&nbsp;&nbsp;&nbsp;</div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.sourceConfigId" allowClear style='width: 140%'>-->
<!-- <a-select-option v-for="(item, key) in fromDate" :key="key" :value="item.value" style='width: 140%'>-->
<!-- <span style="display: inline-block;width: 140%" :title=" item.label ">-->
<!-- {{ item.label }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <div style='width: 90px;line-height: 29px;'>&nbsp;&nbsp;&nbsp;&nbsp;{{ $t('configure') }}</div>-->
<!-- </div>-->
<!-- </a-form-model-item>-->
</a-col>
<a-col :span='24'>
<a-form-model-item style='line-height: 31.9999px;' prop='targetConfigIds' class='aform'>
<div style='display: flex;justify-content: center'>
<span class="Requireditem">*</span>
<div style='line-height: 29px;width: 107px'>{{ $t('ReferenceTo') }}&nbsp;&nbsp;&nbsp;</div>
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.targetConfigIds" allowClear mode="multiple" style='width: 140%'>
<a-select-option v-for="(item, key) in fromDateTo" :key="key" :value="item.value" style='width: 140%'>
<span style="display: inline-block;width: 140%" :title=" item.label ">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('ReferenceTo')">{{$t('ReferenceTo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="targetConfigIds">
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')"
style="width: calc(100% - 90px)"
v-model="formInline.targetConfigIds" allowClear mode="multiple">
<a-select-option v-for="(item, key) in fromDateTo" :key="key" :value="item.value">
<span class="itemOption" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
<div style='width: 90px;line-height: 29px;'>&nbsp;&nbsp;&nbsp;&nbsp;{{ $t('configure') }}</div>
</div>
</a-form-model-item>
<span style='width: 90px;line-height: 29px;float: right'>&nbsp;&nbsp;&nbsp;&nbsp;{{ $t('configure') }}</span>
</a-form-model-item>
</div>
<!-- <a-form-model-item style='line-height: 31.9999px;' prop='targetConfigIds' class='aform'>-->
<!-- <span class="Requireditem">*</span>-->
<!-- <span style='line-height: 29px;width: 107px;display: inline-block'>{{ $t('ReferenceTo') }}&nbsp;&nbsp;&nbsp;</span>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')"-->
<!-- style="width: calc(100%);display: inline-block"-->
<!-- v-model="formInline.targetConfigIds" allowClear mode="multiple">-->
<!-- <a-select-option v-for="(item, key) in fromDateTo" :key="key" :value="item.value">-->
<!-- <span class="itemOption" :title=" item.label ">-->
<!-- {{ item.label }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <span style='width: 90px;line-height: 29px;display: inline-block'>&nbsp;&nbsp;&nbsp;&nbsp;{{ $t('configure') }}</span>-->
<!-- </a-form-model-item>-->
</a-col>
</a-row>
</a-form-model>
@@ -196,13 +231,16 @@ export default {
this.formInline.targetConfigIds = this.formInline.targetConfigIds.join(',')
}
let param = {ids: this.selectedRowKeysArray, ...this.formInline }
this.confirmLoading = true
postAction('params/collectManifest/referParams', param).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('areaVisibleAssignedbyflag', false)
this.$emit('GetgetTableList')
this.confirmLoading = false
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}})
@@ -265,6 +303,14 @@ export default {
display: flex;
justify-content: center;
}
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
</style>
<style lang='less'>
.area-module {
@@ -287,4 +333,52 @@ export default {
color: red;
line-height: 24px;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.itemModel-text {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
</style>
@@ -92,6 +92,7 @@ export default {
handleSubmit() {
let _this = this
let param = {ids: this.selectedRowKeysArray, paramsManifestId: this.paramsManifest.id }
this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/syncReport',
method: 'post',
@@ -114,12 +115,15 @@ export default {
_this.$message.success(_this.$t('OperationSuccessful'))
this.$emit('areaVisibsynchronous', false)
this.$emit('GetgetTableList')
this.confirmLoading = false
}else{
_this.$message.warning(_this.$t('operationFailed'))
this.confirmLoading = false
}
})
.catch( (error) =>{
console.log(error);
this.confirmLoading = false
});
}
}
@@ -107,12 +107,15 @@ export default {
handleSubmit() {
let _this = this
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
this.confirmLoading = true
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
if (res.success) {
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$message.success(res.message)
this.confirmLoading = false
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
},
@@ -139,6 +139,7 @@
import axios from 'axios'
import Vue from 'vue'
import VueDraggableResizable from 'vue-draggable-resizable'
import { mapGetters } from 'vuex'
export default {
name: 'index',
@@ -260,12 +261,14 @@
watch: {
currentPersonRole: {
handler: function() {
this.getTableList();
console.log(123)
this.getTableList()
},
immediate: true
}
},
methods: {
...mapGetters(['userInfo']),
rowClassName(row, index) {
if (row.changeFlag == '1') {
return 'rowClassRedYellow'
@@ -375,7 +378,7 @@
this.areaVisible = true
// this.$refs.ruleForm.clearValidate()
this.$nextTick(() => {
this.Dateline = {...this.Dateline}
this.Dateline = { ...this.Dateline }
this.getquerySdtList(record)
this.$refs.ruleForm.clearValidate()
})
@@ -397,8 +400,28 @@
}
getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) {
this.getTableList(res.result[0].value)
this.$emit('LoginUserType', res.result, this.currentPersonRole)
this.getAndUserId(res.result)
}
})
},
getAndUserId(result) {
let query = {
paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
getAction('/params/userTypeLog/queryCurrentType', query).then((res) => {
if (res.success) {
if (res.result && res.result.userType) {
this.getTableList(res.result.userType)
console.log(11)
} else {
console.log(222)
this.getTableList(result[0].value)
}
this.$emit('LoginUserType', result, this.currentPersonRole, res.result.userType)
} else {
}
})
},
@@ -512,7 +535,9 @@
this.dataSource = tt
this.total = res.result.total
this.selectedRowKeys = []
this.loading = false
setTimeout(() => {
this.loading = false
}, 500)
} else {
this.loading = false
}
@@ -596,7 +621,10 @@
this.selectedRowrowValue = []
this.$emit('value', this.selectedRowKeys)
this.$emit('rowValue', this.selectedRowrowValue)
this.loading = false
this.$emit('getDataSource', this.dataSource)
setTimeout(() => {
this.loading = false
}, 500)
} else {
this.loading = false
}
@@ -618,7 +646,7 @@
detailClick(item, index) {
// this.$emit('detailClick', item)
}
},
}
}
</script>
<style lang='less'>
@@ -714,10 +742,12 @@
transform: none !important;
bottom: 0;
}
.rowClassRed{
background: #f3d9de;
.rowClassRed {
background: #f3d9de;
}
.rowClassRedYellow{
background: yellow;
.rowClassRedYellow {
background: yellow;
}
</style>
+2 -1
View File
@@ -50,9 +50,10 @@ import {
import config from '@/defaultSettings'
//引入
import socketPublic from '@/utils/socketVuex.js'
import socketPublicOne from '@/utils/socketVuexOne.js'
//挂载
Vue.prototype.$socketPublic = socketPublic
Vue.prototype.$socketPublicOne = socketPublicOne
import JDictSelectTag from './components/dict/index.js'
import hasPermission from '@/utils/hasPermission'
import vueBus from '@/utils/vueBus'
+116
View File
@@ -0,0 +1,116 @@
import Vue from 'vue'
import Vuex from 'vuex'
import store from '@/store/'
Vue.use(Vuex)
// console.log(window._CONFIG['domianWebSocketURL'])
export default new Vuex.Store({
state: {
ws: null, //建立的连接
lockReconnect: false, //是否真正建立连接
timeout: 15000, //15秒一次心跳
timeoutObj: null, //心跳心跳倒计时
serverTimeoutObj: null, //心跳倒计时
timeoutnum: null, //断开 重连倒计时
msg: null //接收到的信息
},
getters: {
// 获取接收的信息
socketMsgs: state => {
return state.msg
}
},
mutations: {
//初始化ws 用户登录后调用
webSocketInit(state) {
let that = this
//this 创建一个state.ws对象【发送、接收、关闭socket都由这个对象操作】
const userId = store.getters.userInfo.id
state.ws = new WebSocket(window._CONFIG['domianWebSocketURL'].replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/socketServer')
state.ws.onopen = function(res) {
console.log('Connection success...')
/**
* 启动心跳检测
*/
that.commit('start')
}
state.ws.onmessage = function(res) {
if (res.data === 'heartCheck') {
// 收到服务器信息,心跳重置
that.commit('reset')
} else {
state.msg = res
}
}
state.ws.onclose = function(res) {
//重连
that.commit('reconnect')
}
state.ws.onerror = function(res) {
//重连
that.commit('reconnect')
}
},
reconnect(state) {
//重新连接
let that = this
if (state.lockReconnect) {
return
}
state.lockReconnect = true
//没连接上会一直重连,30秒重试请求重连,设置延迟避免请求过多
state.timeoutnum &&
clearTimeout(state.timeoutnum)
state.timeoutnum = setTimeout(() => {
//新连接
that.commit('webSocketInit')
state.lockReconnect = false
}, 5000)
},
reset(state) {
//重置心跳
let that = this
//清除时间
clearTimeout(state.timeoutObj)
clearTimeout(state.serverTimeoutObj)
//重启心跳
that.commit('start')
},
start(state) {
//开启心跳
var self = this
state.timeoutObj &&
clearTimeout(state.timeoutObj)
state.serverTimeoutObj &&
clearTimeout(state.serverTimeoutObj)
state.timeoutObj = setTimeout(() => {
//这里发送一个心跳,后端收到后,返回一个心跳消息,
if (state.ws.readyState === 1) {
//如果连接正常
state.ws.send('heartCheck')
} else {
//否则重连
self.commit('reconnect')
}
state.serverTimeoutObj = setTimeout(function() {
//超时关闭
state.ws.close()
}, state.timeout)
}, state.timeout)
}
},
actions: {
webSocketInit({
commit
}, url) {
commit('webSocketInit', url)
},
webSocketSend({
commit
}, p) {
commit('webSocketSend', p)
}
}
})
@@ -1,6 +1,7 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
@@ -29,6 +30,7 @@
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text" v-has="'params:template:add'">
@@ -1,32 +1,34 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('entryName')">
<span>{{$t('entryName')}}</span>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('entryName')">
<span>{{$t('entryName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.projectName"></a-input>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.projectName"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('ListTitle')">
<span>{{$t('ListTitle')}}</span>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('ListTitle')">
<span>{{$t('ListTitle')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ListTitle')"
v-model="queryParam.title"></a-input>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ListTitle')"
v-model="queryParam.title"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-row>
</a-form>
</div>
<div>
<a-table
@@ -70,290 +72,294 @@
</template>
<script>
import ExportHistory from '@/components/exporthistory/index'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '../../../common/event'
import Vue from 'vue'
export default {
name: 'index',
components: {
ExportHistory
},
data() {
return {
token:Vue.ls.get(ACCESS_TOKEN),
loading: false,
toggleSearchStatus: false,
selectedRowKeys: [],
selectedRowKeysArray: '',
formInline: {},
rules: {
paramsTemplateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('templateName'), trigger: 'change' },
],
},
visible: false,
dataSource: [],
confirmLoading: false,
url: {
list: 'params/report/page',
},
total: 0,
pageSize: 10,
pageNo: 1,
title: '新增',
columns: [
{
title: this.$t('entryName'),
align: 'center',
width: '10%',
dataIndex: 'projectName',
},
{
title: this.$t('ListTitle'),
align: 'center',
dataIndex: 'title',
},
{
title: this.$t('Version'),
align: 'center',
dataIndex: 'version',
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
}
],
queryParam: {},
areaVisible:false,
paramsTemplateName: '',
drawerVisible: false,
titleTag: '导出历史'
}
},
mounted() {
this.getList()
},
methods: {
handleCancel() {
this.areaVisible=false
},
handleSubmit() {
if( this.formInline.paramsTemplateName !== undefined) {
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}&paramsTemplateName=${this.formInline.paramsTemplateName}`, {}).then((res) => {
if (res.success) {
this.areaVisible = false
this.$message.success(res.message)
this.selectedRowKeys = []
this.getList()
} else {
this.$message.warning(res.message)
}
})
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
onSelectChange(value) {
this.selectedRowKeys = value
this.selectedRowKeysArray = this.selectedRowKeys.join(',')
},
// 复制
handlecody(){
this.drawerVisible=true
},
hideModal(){
this.visible = false;
},
//编辑
edit(item) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
deleteLib(val) {
let newUrl = this.$router.resolve({
path: '/managementdetails',
query: val
})
window.open(newUrl.href, '_blank')
},
//虚拟清单名称事件
entryNameClick(item) {
this.$router.push({
path: '/ParameterTemplateList',
query: item
})
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.getList()
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
addModelList() {
this.pageNo = 1
this.getList()
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getList()
return
}
this.dataSource = res.result.records || []
import ExportHistory from '@/components/exporthistory/index'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '../../../common/event'
import Vue from 'vue'
this.total = res.result.total
this.loading = false
} else {
this.loading = false
export default {
name: 'index',
components: {
ExportHistory
},
data() {
return {
token: Vue.ls.get(ACCESS_TOKEN),
loading: false,
toggleSearchStatus: false,
selectedRowKeys: [],
selectedRowKeysArray: '',
formInline: {},
rules: {
paramsTemplateName: [
{ required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' }
]
},
visible: false,
dataSource: [],
confirmLoading: false,
url: {
list: 'params/report/page'
},
total: 0,
pageSize: 10,
pageNo: 1,
title: '新增',
columns: [
{
title: this.$t('entryName'),
align: 'center',
width: '10%',
dataIndex: 'projectName'
},
{
title: this.$t('ListTitle'),
align: 'center',
dataIndex: 'title'
},
{
title: this.$t('Version'),
align: 'center',
dataIndex: 'version'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
}
],
queryParam: {},
areaVisible: false,
paramsTemplateName: '',
drawerVisible: false,
titleTag: '导出历史'
}
},
mounted() {
this.getList()
},
methods: {
handleCancel() {
this.areaVisible = false
},
handleSubmit() {
if (this.formInline.paramsTemplateName !== undefined) {
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
}
})
this.$refs.ruleForm.validate(valid => {
if (valid) {
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}&paramsTemplateName=${this.formInline.paramsTemplateName}`, {}).then((res) => {
if (res.success) {
this.areaVisible = false
this.$message.success(res.message)
this.selectedRowKeys = []
this.getList()
} else {
this.$message.warning(res.message)
}
})
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
onSelectChange(value) {
this.selectedRowKeys = value
this.selectedRowKeysArray = this.selectedRowKeys.join(',')
},
// 复制
handlecody() {
this.drawerVisible = true
},
hideModal() {
this.visible = false
},
//编辑
edit(item) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
deleteLib(val) {
let newUrl = this.$router.resolve({
path: '/managementdetails',
query: val
})
window.open(newUrl.href, '_blank')
},
//虚拟清单名称事件
entryNameClick(item) {
this.$router.push({
path: '/ParameterTemplateList',
query: item
})
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.getList()
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
addModelList() {
this.pageNo = 1
this.getList()
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getList()
return
}
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.add-input{
width: 82%;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.text-operation {
margin-right: 8px;
}
.add-input {
width: 82%;
}
.page {
text-align: right;
margin-top: 20px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.box-title-text-add {
line-height: 1.4;
display: flex;
}
.text-operation {
margin-right: 8px;
}
.title-text-add {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
margin-top: 3px;
}
.page {
text-align: right;
margin-top: 20px;
}
.box-input-add {
display: inline-block;
height: 38px;
width: 100%;
}
.box-title-text-add {
line-height: 1.4;
display: flex;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-add {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
margin-top: 3px;
}
.Required {
color: red;
margin-right: 4px;
}
.box-input-add {
display: inline-block;
height: 38px;
width: 100%;
}
.title-text-text {
margin-top: 9px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index:100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.add-text-text{
margin-top: -14px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.add-text-text {
margin-top: -14px;
}
</style>
@@ -1,6 +1,7 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
@@ -18,6 +19,7 @@
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text" v-has="'params:template:add'">
@@ -1,6 +1,7 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
@@ -38,6 +39,7 @@
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text" v-has="'params:paramsInfo:add'">
@@ -130,6 +130,11 @@
<a-icon type="plus"/>
{{$t('referenceparameter')}}
</div>
<!-- 保存-->
<div @click="handlePreservation(1)" class="operator-text" v-if='currentPersonRole == "dre"'>
<a-icon type="check-circle"/>
{{$t('preservation')}}
</div>
<!-- 提交-->
<div @click="handleSubmit" class="operator-text" v-if='currentPersonRole == "dre"'>
<a-icon type="check-circle"/>
@@ -157,7 +162,9 @@
<div style="width: 100%">
<!-- 表格-10控件-->
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
:formInline='formInline' :currentPersonRole='currentPersonRole' @value='value'
:formInline='formInline' :currentPersonRole='currentPersonRole'
@getDataSource="getDataSource"
@value='value'
@listReset='listReset' @LoginUserType='LoginUserType'/>
</div>
</a-card>
@@ -363,6 +370,7 @@
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import { mapGetters } from 'vuex'
export default {
name: 'ParameterItemCollectionList',
@@ -502,18 +510,47 @@
},
mounted() {
this.GetgetLoginUserType()
this.time = setInterval(() => {
if (this.currentPersonRole == "dre"){
this.handlePreservation()
}
}, 10000)
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
},
beforeDestroy() {
clearInterval(this.time)
},
methods: {
...mapGetters(['userInfo']),
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
handleOkRoleSwitching() {
this.visibleRoleSwitching = false
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.selectedRowKeysValue = []
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
let query = {
userType: this.formInlineRoleSwitching.roleSwitchingCode,
paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
this.confirmLoadingRoleSwitching = true
postAction('/params/userTypeLog/edit', query).then((res) => {
if (res.success) {
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.selectedRowKeysValue = []
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
@@ -792,13 +829,13 @@
}
return flag
},
LoginUserType(val, currentPersonRole) {
LoginUserType(val, currentPersonRole, userType) {
this.RoleType = []
if (this.currentPersonRole == '') {
this.currentPersonRole = val.length >= 1 ? val[0].value : ''
this.currentPersonRole = currentPersonRole || userType || val[0].value
}
this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || val[0].value
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
},
// 表格所选中得行内容
@@ -979,6 +1016,60 @@
this.NoEngineer = 1
}
},
getDataSource(data) {
this.dataSource = data
},
handlePreservation(num) {
let _this = this
let postDate = []
let data = JSON.parse(JSON.stringify(this.dataSource))
let selectedRowKeysValue = []
data.forEach(res => {
if (res.state == 'Wait Fill' || res.state == '待填写') {
selectedRowKeysValue.push(res)
}
})
for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
}
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
}
}
}
}
}
postDateobj.id = selectedRowKeysValue[i].id
postDate.push(postDateobj)
}
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
if (num && num == 1) {
this.textLoading = true
}
postAction('/params/collectManifest/save', configDataList).then((res) => {
if (res.success) {
if (num && num == 1) {
_this.$message.success(_this.$t('OperationSuccessful'))
this.textLoading = false
}
} else {
if (num && num == 1) {
_this.$message.warning(_this.$t('operationFailed'))
this.textLoading = false
}
}
})
}
},
// 提交数据
ishandleSubmit() {
let _this = this
@@ -65,7 +65,8 @@
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)" v-has="'params:config:list'">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)" v-has="'params:manifest:edit'">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteLib(record)" v-has="'params:manifest:delete'">{{$t('deleteLib')}}</a>
<a class="text-operation" @click="deleteLib(record)"
v-has="'params:manifest:delete'">{{$t('deleteLib')}}</a>
<a class="text-operation" @click="historicalVersion(record)" v-has="'params:manifest:history'">{{$t('historicalVersion')}}</a>
</span>
</a-table>
@@ -114,6 +115,7 @@
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '@/common/event'
import store from '@/store/'
export default {
name: 'TaskParameterCollection',
@@ -199,7 +201,7 @@
conList: 'params/config/list',
changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig',
configurelist:'params/manifest/getConfigFlag',
configurelist: 'params/manifest/getConfigFlag'
},
loading: false,
dataSource: [],
@@ -215,7 +217,7 @@
version: 0,
itemId: '', // 配置id
itemRow: {}, // 配置一行数据
configFlag:'',
configFlag: '',
historicalVisible: false,
historicalRow: {}, // 历史版本得数据
drawerVisible: false,
@@ -224,6 +226,22 @@
selectedRowKeysvalArray: []
}
},
created() {
if (store.getters.userInfo) {
this.$socketPublicOne.dispatch('webSocketInit')//初始化ws
}
},
watch: {
'$socketPublicOne.state.msg': {
//处理接收到的消息
handler: function(res) {
let that = this
if (res.data == '1'){
this.getlist()
}
}
}
},
mounted() {
this.getlist()
},
@@ -275,9 +293,8 @@
// 配置
configure(item) {
this.itemId = item.id
this.itemRow = item
this.$refs.configureRef.addModel(item.id)
this.$refs.configureRef.addModel(item.id, item)
},
handleCancel(val) {
this.areaVisible = val
@@ -95,7 +95,7 @@
<div class="title-text">
<!-- <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>-->
</div>
<a-button style="margin-right: .8rem" @click="addConfiguration(index)" v-has="'params:config:add'">{{$t('addConfiguration')}}
<a-button style="margin-right: .8rem" @click="addConfiguration(index)" :loading="loading" v-has="'params:config:add'">{{$t('addConfiguration')}}
</a-button>
<a-button @click="deleteConfiguration(item.id,index)" v-has="'params:config:delete'" type="primary" :loading="confirmLoading">
{{$t('deleteConfiguration')}}
@@ -146,6 +146,7 @@
formInline: {},
confirmLoading: false,
visible: false,
loading:false,
rules: {
// nioNumber:[
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
@@ -155,7 +156,7 @@
projectNameList: [],
title: '',
stateOne: '',
configFlag:'',
conFlag:'',
contentList: [],
paramsConfigEOList: [
{
@@ -187,19 +188,13 @@
}
})
},
addModel(id) {
addModel(id,item) {
this.paramsConfigEOList = []
this.visible = true
this.title = this.$t('MaintainConfigureInfo')
this.formInline = {}
this.getconList(id)
getAction(this.url.configurelist, { paramsManifestId: this.itemRow.id }).then((res) => {
if (res.success) {
this.configFlag = res.result
} else {
this.$message.warning(res.message)
}
})
},
getconList(id) {
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
@@ -226,19 +221,29 @@
})
},
addConfiguration(item) {
console.log(this.configFlag)
if (this.configFlag == true) {
this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
id: '',
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '' // 电机
})
} else {
this.$message.warning(this.$t('Theselectedconfiguration'))
}
this.loading = true
getAction(this.url.configurelist, { paramsManifestId: this.itemRow.id }).then((res) => {
if (res.success) {
this.conFlag = res.result
if (this.conFlag == true) {
this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
id: '',
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '' // 电机
})
this.loading = false
} else {
this.loading = false
this.$message.warning(this.$t('Theselectedconfiguration'))
}
} else {
this.$message.warning(res.message)
}
})
},
deleteConfiguration(displaySeq, index) {
if (this.paramsConfigEOList.length === 1) {
@@ -262,6 +267,8 @@
},
handleCancel() {
this.visible = false
this.$refs.ruleForm.clearValidate()
this.conFlag = ''
},
handleSubmit() {
let flag = 1