From d155adacc0dabdb61e3383e883a3b11e10d3d77c Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 11:35:19 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ReferenceParameter/index.vue | 135 +++++++++++++++--- 1 file changed, 113 insertions(+), 22 deletions(-) diff --git a/jero-web/src/components/ReferenceParameter/index.vue b/jero-web/src/components/ReferenceParameter/index.vue index d73eaf0a2..94db39bf8 100644 --- a/jero-web/src/components/ReferenceParameter/index.vue +++ b/jero-web/src/components/ReferenceParameter/index.vue @@ -6,41 +6,76 @@ ref='ruleForm' :model='formInline' :rules='rules' - :label-col='labelCol' - :wrapper-col='wrapperCol' > - -
- * -
{{ $t('from') }}   
- - - +
+
+ * + {{$t('from')}} +
+ + + + {{ item.label }} -
    {{ $t('configure') }}
-
- +     {{ $t('configure') }} + + +
+ + + + + + + + + + + + + +
- -
- * -
{{ $t('ReferenceTo') }}   
- - - +
+
+ * + {{$t('ReferenceTo')}} +
+ + + + {{ item.label }} -
    {{ $t('configure') }}
-
- +     {{ $t('configure') }} + +
+ + + + + + + + + + + + + +
@@ -265,6 +300,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; +} \ No newline at end of file From bf68ee69c00b3d19561dc8fece1fbfea2bc21f37 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Sat, 2 Jul 2022 11:41:32 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=9C=88=E6=8A=A5?= =?UTF-8?q?=E5=A1=AB=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsMonthlyReportWriteEOController.java | 170 ++++++++++++++ .../NewOpinionTemplateEOController.java | 170 ++++++++++++++ .../NewStandardTemplateEOController.java | 170 ++++++++++++++ .../entity/LawsMonthlyReportWriteEO.java | 193 ++++++++++++++++ .../report/entity/NewOpinionTemplateEO.java | 91 ++++++++ .../report/entity/NewStandardTemplateEO.java | 98 ++++++++ .../report/enums/ContentTemplateEnum.java | 40 ++++ .../LawsMonthlyReportWriteEOMapper.java | 17 ++ .../mapper/NewOpinionTemplateEOMapper.java | 17 ++ .../mapper/NewStandardTemplateEOMapper.java | 17 ++ .../xml/LawsMonthlyReportWriteEOMapper.xml | 33 +++ .../mapper/xml/NewOpinionTemplateEOMapper.xml | 17 ++ .../xml/NewStandardTemplateEOMapper.xml | 18 ++ .../ILawsMonthlyReportWriteEOService.java | 72 ++++++ .../service/INewOpinionTemplateEOService.java | 61 +++++ .../INewStandardTemplateEOService.java | 61 +++++ .../LawsMonthlyReportWriteEOServiceImpl.java | 212 ++++++++++++++++++ .../impl/NewOpinionTemplateEOServiceImpl.java | 89 ++++++++ .../NewStandardTemplateEOServiceImpl.java | 89 ++++++++ 19 files changed, 1635 insertions(+) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewOpinionTemplateEOController.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewStandardTemplateEOController.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportWriteEO.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewOpinionTemplateEO.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewStandardTemplateEO.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportWriteEOMapper.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewOpinionTemplateEOMapper.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewStandardTemplateEOMapper.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportWriteEOMapper.xml create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewOpinionTemplateEOMapper.xml create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewStandardTemplateEOMapper.xml create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewOpinionTemplateEOService.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewStandardTemplateEOService.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewOpinionTemplateEOServiceImpl.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewStandardTemplateEOServiceImpl.java diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java new file mode 100644 index 000000000..ea0dc4d54 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java @@ -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 { + @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 queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportWriteEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lawsMonthlyReportWriteEOService.getPageInfo(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "月报填写-列表查询") + @ApiOperation(value="月报填写-列表查询", notes="月报填写-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List 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); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewOpinionTemplateEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewOpinionTemplateEOController.java new file mode 100644 index 000000000..af8e55437 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewOpinionTemplateEOController.java @@ -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 { + @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 queryWrapper = QueryGenerator.initQueryWrapper(newOpinionTemplateEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = newOpinionTemplateEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "新征求意见清单模板-列表查询") + @ApiOperation(value="新征求意见清单模板-列表查询", notes="新征求意见清单模板-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List 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); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewStandardTemplateEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewStandardTemplateEOController.java new file mode 100644 index 000000000..9dfdc1ded --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/NewStandardTemplateEOController.java @@ -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 { + @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 queryWrapper = QueryGenerator.initQueryWrapper(newStandardTemplateEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = newStandardTemplateEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "新发布标准清单模板-列表查询") + @ApiOperation(value="新发布标准清单模板-列表查询", notes="新发布标准清单模板-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List 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); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportWriteEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportWriteEO.java new file mode 100644 index 000000000..c7b84b430 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportWriteEO.java @@ -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 newOpinionTemplateEOList; + + //新发布标准清单模板 + @TableField(exist = false) + private List newStandardTemplateEOList; + + @TableField(exist = false) + private String cut; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewOpinionTemplateEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewOpinionTemplateEO.java new file mode 100644 index 000000000..fcd2ec8d8 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewOpinionTemplateEO.java @@ -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; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewStandardTemplateEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewStandardTemplateEO.java new file mode 100644 index 000000000..ca7363247 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/NewStandardTemplateEO.java @@ -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; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java new file mode 100644 index 000000000..08679a039 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java @@ -0,0 +1,40 @@ +package com.jero.modules.report.enums; + +import com.sun.tools.doclets.formats.html.resources.standard; + +/** + * @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; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportWriteEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportWriteEOMapper.java new file mode 100644 index 000000000..71197a5af --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportWriteEOMapper.java @@ -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 { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewOpinionTemplateEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewOpinionTemplateEOMapper.java new file mode 100644 index 000000000..441b6351d --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewOpinionTemplateEOMapper.java @@ -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 { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewStandardTemplateEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewStandardTemplateEOMapper.java new file mode 100644 index 000000000..33b248d73 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/NewStandardTemplateEOMapper.java @@ -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 { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportWriteEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportWriteEOMapper.xml new file mode 100644 index 000000000..17fc90742 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportWriteEOMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewOpinionTemplateEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewOpinionTemplateEOMapper.xml new file mode 100644 index 000000000..ddd0bdae5 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewOpinionTemplateEOMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewStandardTemplateEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewStandardTemplateEOMapper.xml new file mode 100644 index 000000000..c41c66e29 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/NewStandardTemplateEOMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java new file mode 100644 index 000000000..733f6d18f --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java @@ -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 { + + /** + * 保存 + * + * @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 ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsMonthlyReportWriteEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); + + /** + * 分页 + * @param page + * @param queryWrapper + * @return + */ + IPage getPageInfo(Page page, QueryWrapper queryWrapper); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewOpinionTemplateEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewOpinionTemplateEOService.java new file mode 100644 index 000000000..401a0c9f6 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewOpinionTemplateEOService.java @@ -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 { + + /** + * 保存 + * + * @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 ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + NewOpinionTemplateEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewStandardTemplateEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewStandardTemplateEOService.java new file mode 100644 index 000000000..357b739f4 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/INewStandardTemplateEOService.java @@ -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 { + + /** + * 保存 + * + * @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 ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + NewStandardTemplateEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java new file mode 100644 index 000000000..5cd7e09cd --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java @@ -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 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 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 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 newOpinionTemplateEOList = lawsMonthlyReportWriteEO.getNewOpinionTemplateEOList(); + iNewOpinionTemplateEOService.updateBatchById(newOpinionTemplateEOList); + + }else if (ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){ + //新发布标准清单模板 + List 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 ids) { + removeByIds(ids); + //删除新征求意见清单模板 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,ids); + iNewOpinionTemplateEOService.remove(wrapper); + + //删除新发布标准清单模板 + LambdaQueryWrapper 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 wrapper = new LambdaQueryWrapper<>(); + wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,id); + List newOpinionTemplateEOList = iNewOpinionTemplateEOService.list(wrapper); + lawsMonthlyReportWriteEO.setNewOpinionTemplateEOList(newOpinionTemplateEOList); + + }else if(ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){ + //新发布标准清单模板 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,id); + List newStandardTemplateEOList = iNewStandardTemplateEOService.list(queryWrapper); + lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(newStandardTemplateEOList); + } + return lawsMonthlyReportWriteEO; + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } + + @Override + public IPage getPageInfo(Page page, QueryWrapper queryWrapper) { + Page pageInfo = this.page(page, queryWrapper); + //法规月报id + List lawsMonthlyReportIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList()); + //获取章节目录 + List lawsMonthlyReportTitleTemplateEOList = lawsMonthlyReportTitleTemplateEOService.list(); + + //新征求意见清单模板 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportIdList); + List newOpinionTemplateEOList = iNewOpinionTemplateEOService.list(wrapper); + + //新发布标准清单模板 + LambdaQueryWrapper qrapperTemp = new LambdaQueryWrapper<>(); + qrapperTemp.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportIdList); + List newStandardTemplateEOList = iNewStandardTemplateEOService.list(qrapperTemp); + + for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : pageInfo.getRecords()) { + //处理章节目录 + if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapter())){ + List 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 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 collect = newStandardTemplateEOList.stream() + .filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList()); + lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(collect); + } + } + return pageInfo; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewOpinionTemplateEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewOpinionTemplateEOServiceImpl.java new file mode 100644 index 000000000..4774386de --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewOpinionTemplateEOServiceImpl.java @@ -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 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 ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public NewOpinionTemplateEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewStandardTemplateEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewStandardTemplateEOServiceImpl.java new file mode 100644 index 000000000..ed1bcb4b8 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/NewStandardTemplateEOServiceImpl.java @@ -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 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 ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public NewStandardTemplateEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } +} From 50003ad6f53eb1b45b0d75ccc84c9a79792b1fff Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 12:19:30 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tableCollection/index.vue | 24 +++++++++++-- .../ParameterItemCollectionList.vue | 34 +++++++++++++++---- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 5aec4838b..7ee83c1f0 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -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', @@ -266,6 +267,7 @@ } }, methods: { + ...mapGetters(['userInfo']), rowClassName(row, index) { if (row.changeFlag == '1') { return 'rowClassRedYellow' @@ -397,8 +399,26 @@ } 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) + }else{ + this.getTableList(result[0].value) + } + this.$emit('LoginUserType', result, this.currentPersonRole,res.result.userType) + } else { + } }) }, diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 9bc09aff5..2ee7d3388 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -363,6 +363,7 @@ import axios from 'axios' import { ACCESS_TOKEN } from '@/store/mutation-types' import Vue from 'vue' + import { mapGetters } from 'vuex' export default { name: 'ParameterItemCollectionList', @@ -506,14 +507,35 @@ document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList') }, 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 +814,13 @@ } return flag }, - LoginUserType(val, currentPersonRole) { + LoginUserType(val, currentPersonRole,userType) { this.RoleType = [] if (this.currentPersonRole == '') { this.currentPersonRole = val.length >= 1 ? 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 } }, // 表格所选中得行内容 From 140944f67bf33d247a9f851fe2f50b374908119d Mon Sep 17 00:00:00 2001 From: liyawei Date: Sat, 2 Jul 2022 12:46:10 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E5=88=87=E6=8D=A2=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=97=A5=E5=BF=97-=E7=BC=96=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParamsCollectManifestUserTypeLogEOServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java index 9d34288d8..1eb8f8523 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java @@ -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

Date: Sat, 2 Jul 2022 13:41:51 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jero/modules/report/enums/ContentTemplateEnum.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java index 08679a039..26fa31c6d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java @@ -1,6 +1,5 @@ package com.jero.modules.report.enums; -import com.sun.tools.doclets.formats.html.resources.standard; /** * @description From 0c7e693472f1e264397600c74bd742191599eac7 Mon Sep 17 00:00:00 2001 From: liyawei Date: Sat, 2 Jul 2022 13:45:49 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=B8=85=E5=8D=95-=E9=85=8D=E7=BD=AE=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/TaskParameterCollection.vue | 3 +- .../projectManagement/dialog/configure.vue | 53 +++++++++++-------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue index dda041031..941b85887 100644 --- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue +++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue @@ -275,9 +275,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 diff --git a/jero-web/src/views/projectManagement/dialog/configure.vue b/jero-web/src/views/projectManagement/dialog/configure.vue index b0ae4022b..71e7e0c24 100644 --- a/jero-web/src/views/projectManagement/dialog/configure.vue +++ b/jero-web/src/views/projectManagement/dialog/configure.vue @@ -95,7 +95,7 @@

- {{$t('addConfiguration')}} + {{$t('addConfiguration')}} {{$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 From 6d70cc7e905146f3edebb420d2d880fcfe156853 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 13:57:11 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tableCollection/index.vue | 35 ++++++++++++------- .../ParameterItemCollectionList.vue | 2 +- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 7ee83c1f0..cc7ae0aa4 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -261,7 +261,8 @@ watch: { currentPersonRole: { handler: function() { - this.getTableList(); + console.log(123) + this.getTableList() }, immediate: true } @@ -377,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() }) @@ -406,17 +407,19 @@ getAndUserId(result) { let query = { paramsManifestId: this.$route.query.id, - projectId:this.$route.query.projectId, + 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){ + if (res.result && res.result.userType) { this.getTableList(res.result.userType) - }else{ + console.log(11) + } else { + console.log(222) this.getTableList(result[0].value) } - this.$emit('LoginUserType', result, this.currentPersonRole,res.result.userType) + this.$emit('LoginUserType', result, this.currentPersonRole, res.result.userType) } else { } @@ -532,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 } @@ -616,7 +621,9 @@ this.selectedRowrowValue = [] this.$emit('value', this.selectedRowKeys) this.$emit('rowValue', this.selectedRowrowValue) - this.loading = false + setTimeout(() => { + this.loading = false + }, 500) } else { this.loading = false } @@ -638,7 +645,7 @@ detailClick(item, index) { // this.$emit('detailClick', item) } - }, + } } diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 2ee7d3388..ca847d402 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -817,7 +817,7 @@ 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 || userType || val[0].value From f163558c0c20e41131613b8680beb6036d6e0b32 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 14:19:03 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tableCollection/index.vue | 1 + .../ParameterItemCollectionList.vue | 66 ++++++++++++++++++- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index cc7ae0aa4..ffb6d6052 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -621,6 +621,7 @@ this.selectedRowrowValue = [] this.$emit('value', this.selectedRowKeys) this.$emit('rowValue', this.selectedRowrowValue) + this.$emit('getDataSource', this.dataSource) setTimeout(() => { this.loading = false }, 500) diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index ca847d402..2d1e8886f 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -130,6 +130,11 @@ {{$t('referenceparameter')}} + +
+ + {{$t('preservation')}} +
@@ -157,7 +162,9 @@
@@ -503,9 +510,15 @@ }, mounted() { this.GetgetLoginUserType() + this.time = setInterval(() => { + 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() { @@ -814,7 +827,7 @@ } return flag }, - LoginUserType(val, currentPersonRole,userType) { + LoginUserType(val, currentPersonRole, userType) { this.RoleType = [] if (this.currentPersonRole == '') { this.currentPersonRole = currentPersonRole || userType || val[0].value @@ -1001,6 +1014,55 @@ 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) { + postAction('/params/collectManifest/save', configDataList).then((res) => { + if (res.success) { + if (num && num == 1) { + _this.$message.success(_this.$t('OperationSuccessful')) + } + } else { + if (num && num == 1) { + _this.$message.warning(_this.$t('operationFailed')) + } + } + }) + } + }, // 提交数据 ishandleSubmit() { let _this = this From a1b453f82d962cef294d44fd08fabebe6b792c38 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 14:23:57 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CollectionType/index.vue | 28 ++++++++++++++----- .../ParameterItemCollectionList.vue | 7 ++++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index b1667ab35..6e8313cf6 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -99,7 +99,9 @@
- @@ -114,7 +116,9 @@
- @@ -141,7 +145,9 @@
- @@ -336,7 +342,9 @@
- @@ -453,7 +461,9 @@
- @@ -475,7 +485,9 @@
- @@ -497,7 +509,9 @@
- diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 2d1e8886f..e85d4ffaa 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -517,7 +517,7 @@ document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList') }, beforeDestroy() { - clearInterval(this.time); + clearInterval(this.time) }, methods: { ...mapGetters(['userInfo']), @@ -1050,14 +1050,19 @@ } 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 } } }) From 614d99a5e1006d1e7aba44165caa6768b93656a8 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 15:23:43 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/AssignedBy/index.vue | 4 + .../components/ReferenceParameter/index.vue | 3 + .../SynchronousSubmissionLibrary/index.vue | 4 + .../src/components/TaskCutOffTime/index.vue | 3 + jero-web/src/main.js | 3 +- jero-web/src/utils/socketVuexOne.js | 116 ++++++++++++++++++ .../ParameterItemCollectionList.vue | 4 +- .../components/TaskParameterCollection.vue | 26 +++- 8 files changed, 157 insertions(+), 6 deletions(-) create mode 100644 jero-web/src/utils/socketVuexOne.js diff --git a/jero-web/src/components/AssignedBy/index.vue b/jero-web/src/components/AssignedBy/index.vue index 90bcdd144..7d6973111 100644 --- a/jero-web/src/components/AssignedBy/index.vue +++ b/jero-web/src/components/AssignedBy/index.vue @@ -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); }); } diff --git a/jero-web/src/components/ReferenceParameter/index.vue b/jero-web/src/components/ReferenceParameter/index.vue index 94db39bf8..0e2ca7182 100644 --- a/jero-web/src/components/ReferenceParameter/index.vue +++ b/jero-web/src/components/ReferenceParameter/index.vue @@ -231,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 } }) }}) diff --git a/jero-web/src/components/SynchronousSubmissionLibrary/index.vue b/jero-web/src/components/SynchronousSubmissionLibrary/index.vue index 7edd7ad05..a3f002ce2 100644 --- a/jero-web/src/components/SynchronousSubmissionLibrary/index.vue +++ b/jero-web/src/components/SynchronousSubmissionLibrary/index.vue @@ -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 }); } } diff --git a/jero-web/src/components/TaskCutOffTime/index.vue b/jero-web/src/components/TaskCutOffTime/index.vue index 7ca73d419..e1e570155 100644 --- a/jero-web/src/components/TaskCutOffTime/index.vue +++ b/jero-web/src/components/TaskCutOffTime/index.vue @@ -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 } }) }, diff --git a/jero-web/src/main.js b/jero-web/src/main.js index f0bdff612..171fe1fb7 100644 --- a/jero-web/src/main.js +++ b/jero-web/src/main.js @@ -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' diff --git a/jero-web/src/utils/socketVuexOne.js b/jero-web/src/utils/socketVuexOne.js new file mode 100644 index 000000000..5e1e6a4ae --- /dev/null +++ b/jero-web/src/utils/socketVuexOne.js @@ -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) + } + } +}) \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index e85d4ffaa..5a9322ba1 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -511,7 +511,9 @@ mounted() { this.GetgetLoginUserType() this.time = setInterval(() => { - this.handlePreservation() + if (this.currentPersonRole == "dre"){ + this.handlePreservation() + } }, 10000) this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest')) document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList') diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue index 941b85887..0c1b447f0 100644 --- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue +++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue @@ -65,7 +65,8 @@ {{$t('configure')}} {{$t('edit')}} - {{$t('deleteLib')}} + {{$t('deleteLib')}} {{$t('historicalVersion')}} @@ -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() }, @@ -276,7 +294,7 @@ configure(item) { this.itemId = item.id this.itemRow = item - this.$refs.configureRef.addModel(item.id,item) + this.$refs.configureRef.addModel(item.id, item) }, handleCancel(val) { this.areaVisible = val From 0dda7f354b94439881364f296f6717d12d777555 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Sat, 2 Jul 2022 15:27:19 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameter/ParameterTemplate/index.vue | 2 + .../parameter/escalationlibrary/index.vue | 576 +++++++++--------- .../views/parameter/parameterexport/index.vue | 2 + .../views/parameter/parameterlist/index.vue | 2 + 4 files changed, 297 insertions(+), 285 deletions(-) diff --git a/jero-web/src/views/parameter/ParameterTemplate/index.vue b/jero-web/src/views/parameter/ParameterTemplate/index.vue index 3929a5a96..0cd0284c7 100644 --- a/jero-web/src/views/parameter/ParameterTemplate/index.vue +++ b/jero-web/src/views/parameter/ParameterTemplate/index.vue @@ -1,6 +1,7 @@