Merge remote-tracking branch 'origin/dev_20230526_Mobile'

# Conflicts:
#	jero-web/src/common/lang/en-us.js
#	jero-web/src/common/lang/zh-cn.js
#	jero-web/src/components/tools/UserMenu.vue
This commit is contained in:
高嵩
2023-06-25 22:28:26 +08:00
133 changed files with 11279 additions and 133 deletions
@@ -647,3 +647,16 @@ ALTER TABLE `project_task_planning`
-- 工作流数据库-增加固定数据 2023-05-17 未同步生产环境 -- 工作流数据库-增加固定数据 2023-05-17 未同步生产环境
INSERT INTO `t_form`(`OBJECT_ID`, `CODE`, `CREATE_TIME`, `WIDGET_JSON`, `JSON`, `NAME`, `SHOW_KEY`, `IS_DELETED`, `MODEL_ID`, `JSON_EVAL`, `HTML`, `RUN_TYPE`, `CATEGORY_ID`, `HTML_READONLY`) VALUES ('xgjfwlc', '0007', '2023-05-17 13:52:26', NULL, NULL, '修改交付物流程', NULL, 0, '15007', NULL, NULL, 'json', '4bdf0b396b4aa6ea10dd5e19956a1e22', NULL); INSERT INTO `t_form`(`OBJECT_ID`, `CODE`, `CREATE_TIME`, `WIDGET_JSON`, `JSON`, `NAME`, `SHOW_KEY`, `IS_DELETED`, `MODEL_ID`, `JSON_EVAL`, `HTML`, `RUN_TYPE`, `CATEGORY_ID`, `HTML_READONLY`) VALUES ('xgjfwlc', '0007', '2023-05-17 13:52:26', NULL, NULL, '修改交付物流程', NULL, 0, '15007', NULL, NULL, 'json', '4bdf0b396b4aa6ea10dd5e19956a1e22', NULL);
-- 最近浏览表 2023-06-08 未同步生产环境
CREATE TABLE `recent_browse` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
`browse_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览类型',
`browse_data_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览数据id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近浏览' ROW_FORMAT = Dynamic;
@@ -4,6 +4,7 @@ public enum DictCodeEnum {
DUTY_TERRITORY("责任领域","duty_territory"), DUTY_TERRITORY("责任领域","duty_territory"),
BRAND("品牌","brand"), BRAND("品牌","brand"),
STATE("文档库-状态","state"),
; ;
String name; String name;
String value; String value;
@@ -56,6 +56,9 @@ import com.jero.modules.message.websocket.WebSocket;
import com.jero.modules.ocr.service.IOcrRecordEOService; import com.jero.modules.ocr.service.IOcrRecordEOService;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.phone.entity.RecentBrowse;
import com.jero.modules.phone.enums.BrowseTypeEnum;
import com.jero.modules.phone.service.IRecentBrowseService;
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum; import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
import com.jero.modules.split.common.FileUnZip; import com.jero.modules.split.common.FileUnZip;
import com.jero.modules.split.entity.SarFileSplitInfoEO; import com.jero.modules.split.entity.SarFileSplitInfoEO;
@@ -195,6 +198,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
private OnlCgformSubscribeMapper onlCgformSubscribeMapper; private OnlCgformSubscribeMapper onlCgformSubscribeMapper;
@Autowired @Autowired
private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService; private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
@Autowired
private IRecentBrowseService recentBrowseService;
@Value(value = "${jero.path.upload}") @Value(value = "${jero.path.upload}")
private String uploadpath; private String uploadpath;
@@ -214,6 +219,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
@Override @Override
public void deleteById(String id) { public void deleteById(String id) {
removeById(id); removeById(id);
// 删除文档库浏览记录表信息.
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.WDK.getValue(),Arrays.asList(id.split(",")));
} }
/** /**
@@ -352,6 +359,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
e.printStackTrace(); e.printStackTrace();
log.error("文档库删除es失败"); log.error("文档库删除es失败");
} }
// 删除文档库浏览记录表信息.
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.WDK.getValue(),ids);
} }
private void updateDeletedDate(List<String> ids) { private void updateDeletedDate(List<String> ids) {
@@ -2657,6 +2666,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
stringMapCn.put(onlCgformField.getDbFieldName(), s); stringMapCn.put(onlCgformField.getDbFieldName(), s);
stringMapEn.put(onlCgformField.getDbFieldName(), s); stringMapEn.put(onlCgformField.getDbFieldName(), s);
mapBaseDateCn.put(onlCgformField.getDbFieldName(),s);
mapBaseDateEn.put(onlCgformField.getDbFieldName(),s);
} }
} }
@@ -0,0 +1,163 @@
package com.jero.modules.phone.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.modules.phone.entity.RecentBrowse;
import com.jero.modules.phone.service.IRecentBrowseService;
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: 2023-06-08
* @Version: V1.0
*/
@Api(tags="最近浏览表")
@RestController
@RequestMapping("/phone/recentBrowse")
@Slf4j
public class RecentBrowseController extends JeroController<RecentBrowse, IRecentBrowseService> {
@Autowired
private IRecentBrowseService recentBrowseService;
/**
* 分页列表查询
*
* @param recentBrowse
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "最近浏览表-分页列表查询")
@ApiOperation(value="最近浏览表-分页列表查询", notes="最近浏览表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(RecentBrowse recentBrowse,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
return this.recentBrowseService.queryPageList(recentBrowse,pageNo,pageSize,req);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "最近浏览表-列表查询")
@ApiOperation(value="最近浏览表-列表查询", notes="最近浏览表-列表查询")
@GetMapping(value = "/list")
public Result<List<RecentBrowse>> queryList() {
List<RecentBrowse> list = recentBrowseService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param recentBrowse
* @return
*/
@AutoLog(value = "最近浏览表-添加")
@ApiOperation(value="最近浏览表-添加", notes="最近浏览表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody RecentBrowse recentBrowse) {
recentBrowseService.add(recentBrowse);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param recentBrowse
* @return
*/
@AutoLog(value = "最近浏览表-编辑")
@ApiOperation(value="最近浏览表-编辑", notes="最近浏览表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody RecentBrowse recentBrowse) {
recentBrowseService.editById(recentBrowse);
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) {
recentBrowseService.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.recentBrowseService.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) {
RecentBrowse recentBrowse = recentBrowseService.queryById(id);
if(recentBrowse==null) {
return Result.error("未找到对应数据");
}
return Result.OK(recentBrowse);
}
/**
* 导出excel
*
* @param request
* @param recentBrowse
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, RecentBrowse recentBrowse) {
return super.exportXls(request, recentBrowse, RecentBrowse.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, RecentBrowse.class);
}
}
@@ -0,0 +1,44 @@
package com.jero.modules.phone.controller;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.modules.phone.service.ISearchCenterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@Api(tags = "手机端-搜索中心")
@RestController
@RequestMapping("/phone/search")
public class SearchCenterController {
@Autowired
private ISearchCenterService searchCenterService;
@AutoLog(value = "手机端-搜索-获取数据总数")
@ApiOperation(value = "手机端-搜索-获取数据总数", notes = "手机端-搜索-获取数据总数")
@GetMapping(value = "/getDataCount")
public Result<Map<String, Object>> getDataCount() {
return this.searchCenterService.getDataCount();
}
@AutoLog(value = "手机端-搜索-根据用户获取文档库订阅和收藏信息")
@ApiOperation(value = "手机端-搜索-根据用户获取文档库订阅和收藏信息", notes = "手机端-搜索-根据用户获取文档库订阅和收藏信息")
@GetMapping(value = "/getWdkCollectAndSubscribeInfoByUser")
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(@RequestParam Map<String,Object> params) {
return this.searchCenterService.getWdkCollectAndSubscribeInfoByUser(params);
}
@AutoLog(value = "手机端-搜索-查询文档库搜索中心数据")
@ApiOperation(value = "手机端-搜索-查询文档库搜索中心数据", notes = "手机端-搜索-查询文档库搜索中心数据")
@GetMapping(value = "/getWdkPage")
public Result<?> getWdkPage(@RequestParam Map<String,Object> params) {
return this.searchCenterService.getWdkPage(params);
}
}
@@ -0,0 +1,29 @@
package com.jero.modules.phone.controller;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.modules.phone.service.ITaskStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@Api(tags = "手机端-任务统计")
@RestController
@RequestMapping("/phone/taskStatistics")
public class TaskStatisticsController {
@Autowired
private ITaskStatisticsService taskStatisticsService;
@AutoLog(value = "手机端-任务统计-获取待办任务总数")
@ApiOperation(value = "手机端-任务统计-获取待办任务总数", notes = "手机端-任务统计-获取待办任务总数")
@GetMapping(value = "/getRegulatoryCertificationProcessDataCount")
public Result<Map<String, Object>> getRegulatoryCertificationProcessDataCount() {
return this.taskStatisticsService.getRegulatoryCertificationProcessDataCount();
}
}
@@ -0,0 +1,49 @@
package com.jero.modules.phone.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.modules.phone.service.IToDoCenterService;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@Api(tags = "手机端-待办中心")
@RestController
@RequestMapping("/phone/toDoCenter")
public class ToDoCenterController {
@Autowired
private IToDoCenterService toDoCenterService;
@AutoLog(value = "手机端-待办中心-查询待办任务分页列表")
@ApiOperation(value = "手机端-待办中心-查询待办任务分页列表", notes = "手机端-待办中心-查询待办任务分页列表")
@GetMapping(value = "/queryTodoTaskPage")
public Result<?> queryTodoTaskPage(@RequestParam Map<String,Object> params) {
IPage page = this.toDoCenterService.queryTodoTaskPage(params);
return Result.OK(page);
}
@AutoLog(value = "手机端-待办中心-查询待办任务-Prehomo数据分页列表")
@ApiOperation(value = "手机端-待办中心-查询待办任务-Prehomo数据分页列表", notes = "手机端-待办中心-查询待办任务-Prehomo数据分页列表")
@GetMapping(value = "/queryPreHomoPage")
public Result<?> queryPreHomoPage(@RequestParam Map<String,Object> params) {
String cut = (String) params.get("cut");
IPage<ProjectCertificationInventoryEO> page = this.toDoCenterService.queryPreHomoPage(params);
return Result.OK(cut,page);
}
@AutoLog(value = "手机端-待办中心-根据id查询认证清单详情")
@ApiOperation(value = "手机端-待办中心-根据id查询认证清单详情", notes = "手机端-待办中心-根据id查询认证清单详情")
@GetMapping(value = "/queryProjectCertificationInventoryById")
public Result<?> queryProjectCertificationInventoryById(@RequestParam Map<String,Object> params) {
return this.toDoCenterService.queryProjectCertificationInventoryById(params);
}
}
@@ -0,0 +1,89 @@
package com.jero.modules.phone.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
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: 2023-06-08
* @Version: V1.0
*/
@Data
@TableName("recent_browse")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="recent_browse对象", description="最近浏览表")
public class RecentBrowse 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 browseType;
/**浏览数据id*/
@Excel(name = "浏览数据id", width = 15)
@ApiModelProperty(value = "浏览数据id")
private java.lang.String browseDataId;
// 展示标题
@TableField(exist = false)
private String title;
// 浏览类型展示字段
@TableField(exist = false)
private String browseTypeName;
@TableField(exist = false)
private String cut;
// 法规月报专用
@TableField(exist = false)
private String fileId;
}
@@ -0,0 +1,63 @@
package com.jero.modules.phone.enums;
import com.jero.common.constant.enums.CutEnum;
import com.jero.modules.system.util.StringUtils;
/**
* 浏览类型枚举类
*/
public enum BrowseTypeEnum {
WDK("Document Library", "文档库", "Document Library"),
ZSFX("Knowledge sharing", "知识分享", "Knowledge sharing"),
FGYB("Regulatory Monthly Report", "法规月报", "Regulatory Monthly Report"),
;
String cnName;
String enName;
String value;
private BrowseTypeEnum(String value, String cnName, String enName) {
this.value = value;
this.cnName = cnName;
this.enName = enName;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getCnName() {
return cnName;
}
public void setCnName(String cnName) {
this.cnName = cnName;
}
public String getEnName() {
return enName;
}
public void setEnName(String enName) {
this.enName = enName;
}
public static String getTextByValue(String value, String cut) {
BrowseTypeEnum[] values = values();
for (BrowseTypeEnum taskStatusEnum : values) {
if (taskStatusEnum.value.equals(value)) {
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
return taskStatusEnum.cnName;
} else {
return taskStatusEnum.enName;
}
}
}
return null;
}
}
@@ -0,0 +1,17 @@
package com.jero.modules.phone.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.phone.entity.RecentBrowse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 最近浏览表
* @Author: jero-boot
* @Date: 2023-06-08
* @Version: V1.0
*/
public interface RecentBrowseMapper extends BaseMapper<RecentBrowse> {
}
@@ -0,0 +1,14 @@
<?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.phone.mapper.RecentBrowseMapper">
<resultMap id="RecentBrowseResultMap" type="com.jero.modules.phone.entity.RecentBrowse">
<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="browse_type" property="browseType" />
<result column="browse_data_id" property="browseDataId" />
</resultMap>
</mapper>
@@ -0,0 +1,73 @@
package com.jero.modules.phone.service;
import com.jero.common.api.vo.Result;
import com.jero.modules.phone.entity.RecentBrowse;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Description: 最近浏览表
* @Author: jero-boot
* @Date: 2023-06-08
* @Version: V1.0
*/
public interface IRecentBrowseService extends IService<RecentBrowse> {
/**
* 保存
*
* @param recentBrowse
* @return
*/
void add(RecentBrowse recentBrowse);
/**
* 更新
*
* @param recentBrowse
* @return
*/
void editById(RecentBrowse recentBrowse);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
RecentBrowse queryById(String id);
/**
* 列表查询
*
* @return
*/
List<RecentBrowse> queryList();
Result<?> queryPageList(RecentBrowse recentBrowse, Integer pageNo, Integer pageSize, HttpServletRequest req);
/**
* 根据浏览类型和浏览数据id删除数据
* @param browseType
* @param browseDataIdList
*/
void deleteByBrowseTypeAndBrowseDataIdList(String browseType, List<String> browseDataIdList);
}
@@ -0,0 +1,14 @@
package com.jero.modules.phone.service;
import com.jero.common.api.vo.Result;
import java.util.Map;
public interface ISearchCenterService {
Result<Map<String, Object>> getDataCount();
Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params);
Result<?> getWdkPage(Map<String, Object> params);
}
@@ -0,0 +1,9 @@
package com.jero.modules.phone.service;
import com.jero.common.api.vo.Result;
import java.util.Map;
public interface ITaskStatisticsService {
Result<Map<String, Object>> getRegulatoryCertificationProcessDataCount();
}
@@ -0,0 +1,15 @@
package com.jero.modules.phone.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jero.common.api.vo.Result;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import java.util.Map;
public interface IToDoCenterService {
IPage queryTodoTaskPage(Map<String, Object> params);
IPage<ProjectCertificationInventoryEO> queryPreHomoPage(Map<String,Object> params);
Result<?> queryProjectCertificationInventoryById(Map<String, Object> params);
}
@@ -0,0 +1,227 @@
package com.jero.modules.phone.service.impl;
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.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.BrowserType;
import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.phone.entity.RecentBrowse;
import com.jero.modules.phone.enums.BrowseTypeEnum;
import com.jero.modules.phone.mapper.RecentBrowseMapper;
import com.jero.modules.phone.service.IRecentBrowseService;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
/**
* @Description: 最近浏览表
* @Author: jero-boot
* @Date: 2023-06-08
* @Version: V1.0
*/
@Service
public class RecentBrowseServiceImpl extends ServiceImpl<RecentBrowseMapper, RecentBrowse> implements IRecentBrowseService {
@Autowired
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
@Autowired
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
@Autowired
private ILawsMonthlyReportManageEOService lawsMonthlyReportManageEOService;
/**
* 保存
*
* @param recentBrowse
* @return
*/
@Override
public void add(RecentBrowse recentBrowse) {
Date now = new Date();
recentBrowse.setCreateTime(now);
recentBrowse.setUpdateTime(now);
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 添加时,只保留最新的一条浏览记录 将之前的浏览记录删掉。
QueryWrapper<RecentBrowse> rbRemoveWrap = new QueryWrapper<>();
rbRemoveWrap.lambda().eq(RecentBrowse::getCreateBy, currentUser.getUsername());
rbRemoveWrap.lambda().eq(RecentBrowse::getBrowseType, recentBrowse.getBrowseType());
rbRemoveWrap.lambda().eq(RecentBrowse::getBrowseDataId, recentBrowse.getBrowseDataId());
this.remove(rbRemoveWrap);
this.save(recentBrowse);
}
/**
* 更新
*
* @param recentBrowse
* @return
*/
@Override
public void editById(RecentBrowse recentBrowse) {
Date now = new Date();
recentBrowse.setUpdateTime(now);
saveOrUpdate(recentBrowse);
}
/**
* 通过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 RecentBrowse queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<RecentBrowse> queryList() {
return list();
}
@Override
public Result<?> queryPageList(RecentBrowse recentBrowse, Integer pageNo, Integer pageSize, HttpServletRequest req) {
QueryWrapper<RecentBrowse> queryWrapper = QueryGenerator.initQueryWrapper(recentBrowse, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<RecentBrowse> page = new Page<RecentBrowse>(pageNo, pageSize);
IPage<RecentBrowse> pageList = this.page(page, queryWrapper);
this.disposeData(recentBrowse, pageList.getRecords());
return Result.OK(pageList);
}
public void disposeData(RecentBrowse recentBrowse, List<RecentBrowse> datas) {
if (CollectionUtils.isNotEmpty(datas)) {
String cut = recentBrowse.getCut();
List<String> wdkIdList = datas.stream().filter(data -> {
boolean flag = (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.WDK.getValue()));
return flag;
}).map(RecentBrowse::getBrowseDataId).distinct().collect(Collectors.toList());
List<BussDocumentLibraryEO> bdlEoList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(wdkIdList)) {
QueryWrapper<BussDocumentLibraryEO> bdlQueryWrap = new QueryWrapper<>();
bdlQueryWrap.lambda().in(BussDocumentLibraryEO::getId, wdkIdList);
bdlEoList = this.bussDocumentLibraryEOService.list(bdlQueryWrap);
}
List<String> zsfxIdList = datas.stream().filter(data -> {
boolean flag = (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.ZSFX.getValue()));
return flag;
}).map(RecentBrowse::getBrowseDataId).distinct().collect(Collectors.toList());
List<ProblemKnowledgeBaseEO> pkbEoList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(zsfxIdList)) {
QueryWrapper<ProblemKnowledgeBaseEO> pkbQueryWrap = new QueryWrapper<>();
pkbQueryWrap.lambda().in(ProblemKnowledgeBaseEO::getId, zsfxIdList);
pkbEoList = this.problemKnowledgeBaseEOService.list(pkbQueryWrap);
}
List<String> fgybIdList = datas.stream().filter(data -> {
boolean flag = (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.FGYB.getValue()));
return flag;
}).map(RecentBrowse::getBrowseDataId).distinct().collect(Collectors.toList());
List<LawsMonthlyReportManageEO> lmrEoList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(fgybIdList)) {
QueryWrapper<LawsMonthlyReportManageEO> lmrQueryWrap = new QueryWrapper<>();
lmrQueryWrap.lambda().in(LawsMonthlyReportManageEO::getId, fgybIdList);
lmrEoList = this.lawsMonthlyReportManageEOService.list(lmrQueryWrap);
}
for (RecentBrowse data : datas) {
StringBuilder titleSb = new StringBuilder();
if (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.WDK.getValue())) {
List<BussDocumentLibraryEO> bdlEos = bdlEoList.stream().filter(bdlEo -> {
boolean flag = (StringUtils.equals(bdlEo.getId(), data.getBrowseDataId()));
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(bdlEos)) {
BussDocumentLibraryEO bdlEo = bdlEos.get(0);
String title = bdlEo.getTitle();
if (StringUtils.equals(cut, CutEnum.EN.getValue())) {
title = bdlEo.getTitleEn();
}
titleSb.append(title).append(" ").append(bdlEo.getSerialNumber());
}
} else if (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.ZSFX.getValue())) {
List<ProblemKnowledgeBaseEO> pkbEos = pkbEoList.stream().filter(pkbEo -> {
boolean flag = (StringUtils.equals(pkbEo.getId(), data.getBrowseDataId()));
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(pkbEos)) {
ProblemKnowledgeBaseEO pkbEo = pkbEos.get(0);
titleSb.append(pkbEo.getTitle());
}
} else if (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.FGYB.getValue())) {
List<LawsMonthlyReportManageEO> lmrEos = lmrEoList.stream().filter(lmrEo -> {
boolean flag = (StringUtils.equals(lmrEo.getId(), data.getBrowseDataId()));
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(lmrEos)) {
LawsMonthlyReportManageEO lmrEo = lmrEos.get(0);
titleSb.append(lmrEo.getName());
data.setFileId(lmrEo.getFileId());
}
}
data.setTitle(titleSb.toString());
data.setBrowseTypeName(BrowseTypeEnum.getTextByValue(data.getBrowseType(), cut));
}
}
}
@Override
public void deleteByBrowseTypeAndBrowseDataIdList(String browseType, List<String> browseDataIdList) {
QueryWrapper<RecentBrowse> rbRemoveWrap = new QueryWrapper<>();
rbRemoveWrap.lambda().eq(RecentBrowse::getBrowseType, browseType);
rbRemoveWrap.lambda().in(RecentBrowse::getBrowseDataId, browseDataIdList);
this.remove(rbRemoveWrap);
}
}
@@ -0,0 +1,396 @@
package com.jero.modules.phone.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
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.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.es.JeroElasticsearchTemplate;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.DateUtils;
import com.jero.modules.collection.entity.OnlCgformCollection;
import com.jero.modules.collection.service.IOnlCgformCollectionService;
import com.jero.modules.document.enums.SearchEnum;
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.phone.service.ISearchCenterService;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class SearchCenterServiceImpl implements ISearchCenterService {
@Autowired
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
@Autowired
private ISysUserService sysUserService;
@Autowired
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
@Autowired
private ILawsMonthlyReportManageEOService lawsMonthlyReportManageEOService;
@Autowired
private IOnlCgformCollectionService onlCgformCollectionService;
@Autowired
private IOnlCgformSubscribeService onlCgformSubscribeService;
@Autowired
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
public static final String SEARCH_FLAG = "";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
@Autowired
private SysDictItemServiceImpl sysDictItemServiceImpl;
@Override
public Result<Map<String, Object>> getDataCount() {
Map<String, Object> result = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("cut", CutEnum.CN.getValue());
params.put("pageNo", "1");
params.put("pageSize", "10");
IPage documentLibraryInfoPage = this.bussDocumentLibraryEOService.getInfoPage(params);
long documentLibraryCount = documentLibraryInfoPage.getTotal();
int pageNo = 1;
int pageSize = 10;
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = new ProblemKnowledgeBaseEO();
boolean administrator = this.sysUserService.isAdministrator();
//如果当前登录人是超级管理员角色,进入到管理发布页面时,查询所有的数据,其它用户只能查询自己创建的数据。
if (administrator) {
problemKnowledgeBaseEO.setCreateBy(null);
} else {
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
problemKnowledgeBaseEO.setCreateBy(currentUser.getUsername());
}
QueryWrapper<ProblemKnowledgeBaseEO> pkbQueryWrap = new QueryWrapper<>();
pkbQueryWrap.lambda().eq(ProblemKnowledgeBaseEO::getReleaseStatus, ReleaseStatusEnum.HAVE_RELEASED.getValue());
this.problemKnowledgeBaseEOService.createQueryPermission(pkbQueryWrap, problemKnowledgeBaseEO);
Page<ProblemKnowledgeBaseEO> pkbPage = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
IPage<ProblemKnowledgeBaseEO> problemKnowledgeBaseInfoPage = this.problemKnowledgeBaseEOService.page(pkbPage, pkbQueryWrap);
long problemKnowledgeBaseCount = problemKnowledgeBaseInfoPage.getTotal();
QueryWrapper<LawsMonthlyReportManageEO> lmrmQueryWrap = new QueryWrapper<>();
Page<LawsMonthlyReportManageEO> lmrmPage = new Page<LawsMonthlyReportManageEO>(pageNo, pageSize);
IPage<LawsMonthlyReportManageEO> lawsMonthlyReportManageInfoPage = this.lawsMonthlyReportManageEOService.getPageInfo(lmrmPage, lmrmQueryWrap);
long lawsMonthlyReportManageCount = lawsMonthlyReportManageInfoPage.getTotal();
result.put("documentLibraryCount", documentLibraryCount);
result.put("problemKnowledgeBaseCount", problemKnowledgeBaseCount);
result.put("lawsMonthlyReportManageCount", lawsMonthlyReportManageCount);
return Result.OK(result);
}
@Override
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params) {
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Map<String, Object> result = new HashMap<>();
String id = (String) params.get("id");
QueryWrapper<OnlCgformCollection> collectionQueryWrap = new QueryWrapper<>();
collectionQueryWrap.lambda().eq(OnlCgformCollection::getDocumentId, id);
collectionQueryWrap.lambda().eq(OnlCgformCollection::getCreateBy, currentUser.getUsername());
List<OnlCgformCollection> collectionList = this.onlCgformCollectionService.list(collectionQueryWrap);
QueryWrapper<OnlCgformSubscribe> subscribeQueryWrap = new QueryWrapper();
subscribeQueryWrap.lambda().eq(OnlCgformSubscribe::getDocumentId, id);
subscribeQueryWrap.lambda().eq(OnlCgformSubscribe::getCreateBy, currentUser.getUsername());
List<OnlCgformSubscribe> subscribeList = this.onlCgformSubscribeService.list(subscribeQueryWrap);
result.put("subscribeList", subscribeList);
result.put("collectionList", collectionList);
return Result.OK(result);
}
@Override
public Result<?> getWdkPage(Map<String, Object> params) {
boolean indexExistsFlag = true;
String cut = (String) params.get("cut");
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_CN.getValue());
} else if (StringUtils.equals(cut, CutEnum.EN.getValue())) {
indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_EN.getValue());
}
if (!indexExistsFlag) {
Page page = new Page(pageNo, pageSize);
return Result.OK(page);
}
// 定义需要查询的字段数组
List<String> fieldList = new ArrayList<>();
fieldList.add("serial_number");
if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
fieldList.add("title_en");
} else if (StringUtils.equals(cut,CutEnum.CN.getValue())){
fieldList.add("title");
}
fieldList.add("content");
fieldList.add("flag");
JSONArray queryMapJsonAll = new JSONArray();
JSONArray queryJsonMustNot = new JSONArray();
JSONArray queryMapInputJson = new JSONArray();
Map<String, Object> mapHighlight = new HashMap<>();
Map<String, Object> mapHighlight1 = new HashMap<>();
String selectValue = (String) params.get("selectValue");
if(StringUtils.isNotBlank(selectValue)){
Map<String,Object> map = new HashMap<>();
Map<String,Object> map1 = new HashMap<>();
Map<String,Object> map2 = new HashMap<>();
map.put("query",SEARCH_FLAG);
map1.put("flag",map);
map2.put("match",map1);
queryJsonMustNot.add(map2);
}else {
selectValue = SEARCH_FLAG;
}
if (StringUtils.isNotBlank(selectValue)) {
for (String field : fieldList) {
this.setQueryMapJson(queryMapInputJson, selectValue, field);
//高亮
if(!"flag".equals(field)){
this.wdkHighlight(mapHighlight, field);
} else {
// query_string查询
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("fields", fieldList.toArray());
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
map45.put("query_string", map25);
queryMapInputJson.add(map45);
}
}
mapHighlight1.put("fields", mapHighlight);
if (CollectionUtils.isNotEmpty(queryMapInputJson)) {
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapInputJson);
queryMapJsonAll.add(jsonObject);
}
}
//指定module_type_flag= WDK
JSONArray moduleTypeFlagQueryJsonArrMust = new JSONArray();
Map<String, Object> moduleTypeFlagValueMap = new HashMap<>();
Map<String, Object> moduleTypeFlagFieldMap = new HashMap<>();
Map<String, Object> moduleTypeFlagMatchMap = new HashMap<>();
moduleTypeFlagValueMap.put("query", "WDK");
moduleTypeFlagFieldMap.put("module_type_flag", moduleTypeFlagValueMap);
moduleTypeFlagMatchMap.put("match", moduleTypeFlagFieldMap);
moduleTypeFlagQueryJsonArrMust.add(moduleTypeFlagMatchMap);
JSONObject moduleTypeFlagQueryJson = jeroElasticsearchTemplate.buildBoolQuery(moduleTypeFlagQueryJsonArrMust, null, null);
queryMapJsonAll.add(moduleTypeFlagQueryJson);
JSONObject querySort = new JSONObject();
if (StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue, SEARCH_FLAG)) {
Map<String, Object> createTime = new HashMap<>();
Map<String, Object> createTime1 = new HashMap<>();
createTime.put("order", "desc");
createTime1.put("create_time", createTime);
querySort.putAll(createTime1);
} else {
Map<String, Object> score = new HashMap<>();
Map<String, Object> score1 = new HashMap<>();
score.put("order", "desc");
score1.put("_score", score);
querySort.putAll(score1);
}
IPage page = this.getWdkPage(
queryMapJsonAll,
mapHighlight1,
pageNo,
pageSize,
cut,
querySort,
queryJsonMustNot,
null
);
return Result.OK(page);
}
@NotNull
private IPage getWdkPage(JSONArray queryMapJson,
Map<String,Object> highlightMap,
Integer pageNo,
Integer pageSize,
String cut,
JSONObject querySort,
JSONArray queryMustNot,
JSONArray queryShould) {
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
JSONArray jsonArraySort = new JSONArray();
jsonArraySort.add(querySort);
//1. 条件,分页
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(
null,
jsonObject,
highlightMap,
jsonArraySort,
pageNo - 1,
pageSize
);
//2. 数据查询
JSONObject search = new JSONObject();
if (CutEnum.CN.getValue().equals(cut)) {
search = jeroElasticsearchTemplate.search(
SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
queryObject
);
} else {
search = jeroElasticsearchTemplate.search(
SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
queryObject
);
}
List<SysDictItem> stateSysDictItems = this.sysDictItemServiceImpl.selectItemsByDictCode(DictCodeEnum.STATE.getValue());
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
List<Map<String, Object>> mapList = new ArrayList<>();
for (Map<String, Object> map : list) {
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
if(ObjectUtils.isNotEmpty(mapHighlight)){
for (Map.Entry<String, Object> entry : mapHighlight.entrySet()) {
String key = entry.getKey();
List<String> value = (List<String>) entry.getValue();
String fieldConyent= "";
for (String s : value) {
fieldConyent += s;
}
mapSource.put(key,fieldConyent);
}
}
String state = (String) mapSource.get("state");
String state_dictText = "";
for (SysDictItem dictItem : stateSysDictItems) {
if (StringUtils.equals(dictItem.getItemValue(), state)) {
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
state_dictText = dictItem.getItemText();
} else {
state_dictText = dictItem.getEnName();
}
break;
}
}
mapSource.put("state_dictText", state_dictText);
String create_time_str = "";
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
}
mapSource.put("create_time_str",create_time_str);
// 处理中英文切换的时候 展示的标题
if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
mapSource.put("title",mapSource.get("title_en"));
}
mapList.add(mapSource);
}
//处理分页
IPage page = new Page(pageNo, pageSize);
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
page.setRecords(mapList);
return page;
}
/**
* 设置文档库高亮字段
* @param mapHighlight
* @param key
*/
private void wdkHighlight(Map<String, Object> mapHighlight, String key) {
Map<String, Object> mapTemp = new HashMap<>();
List<String> list = new ArrayList<>();
list.add("<text class='highlight-class'>");
List<String> list1 = new ArrayList<>();
list1.add("</text>");
mapTemp.put("pre_tags", list);
mapTemp.put("post_tags", list1);
mapTemp.put("fragment_size", 320);
mapTemp.put("number_of_fragments", 1);
mapTemp.put("type", "plain");
mapHighlight.put(key, mapTemp);
}
private void setQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
// 前缀匹配 缺点是前缀一定不能断开
// 情况举例:用户只记得前面那段字
Map<String, Object> map21 = new HashMap<>();
Map<String, Object> map31 = new HashMap<>();
Map<String, Object> map41 = new HashMap<>();
if ("title".equals(field)) {
map31.put("boost", 10);
} else if ("content".equals(field)) {
map31.put("boost", 0.01);
}
map31.put("value", selectValue);
map21.put(field + ".keyword", map31);
map41.put("prefix", map21);
queryMapJson.add(map41);
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
Map<String, Object> map22 = new HashMap<>();
Map<String, Object> map32 = new HashMap<>();
Map<String, Object> map42 = new HashMap<>();
if ("title".equals(field)) {
map32.put("boost", 10);
} else if ("content".equals(field)) {
map32.put("boost", 0.01);
}
map32.put("query", selectValue);
map22.put(field, map32);
map42.put("match_phrase_prefix", map22);
queryMapJson.add(map42);
// match分词匹配查询
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
Map<String, Object> map23 = new HashMap<>();
Map<String, Object> map33 = new HashMap<>();
Map<String, Object> map43 = new HashMap<>();
if ("title".equals(field)) {
map33.put("boost", 10);
} else if ("content".equals(field)) {
map33.put("boost", 0.01);
}
map33.put("query", selectValue);
map23.put(field, map33);
map43.put("match", map23);
queryMapJson.add(map43);
// wildcard模糊查询
// 情况举例:用户只记得中间那段字
Map<String, Object> map24 = new HashMap<>();
Map<String, Object> map44 = new HashMap<>();
map24.put(field, "*" + selectValue + "*");
map44.put("wildcard", map24);
queryMapJson.add(map44);
}
}
@@ -0,0 +1,135 @@
package com.jero.modules.phone.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.phone.service.ITaskStatisticsService;
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
import com.jero.modules.project.enums.TaskStatusEnum;
import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class TaskStatisticsServiceImpl implements ITaskStatisticsService {
@Autowired
private IProcessInfoEOService processInfoEOService;
@Autowired
private IProcessInfoDetailEOService processInfoDetailEOService;
@Override
public Result<Map<String, Object>> getRegulatoryCertificationProcessDataCount() {
Map<String, Object> result = new HashMap<>();
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ProcessInfoDetailEO> pidQueryWrap = new QueryWrapper<>();
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getUserId, currentUser.getId());
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getStatus, TaskStatusEnum.NOT_DONE.getValue());
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidQueryWrap);
int publishingCount = 0;
int designCount = 0;
int verifyCount = 0;
int preHomoCount = 0;
int technologyEvaluationCount = 0;
int opinionCollectionCount = 0;
if (CollectionUtils.isNotEmpty(pidEoList)) {
List<String> processInfoIdList = pidEoList.stream().map(ProcessInfoDetailEO::getProcessInfoId).distinct().collect(Collectors.toList());
QueryWrapper<ProcessInfoEO> piQueryWrap = new QueryWrapper<>();
piQueryWrap.lambda().in(ProcessInfoEO::getId, processInfoIdList);
List<ProcessInfoEO> piEoList = this.processInfoEOService.list(piQueryWrap);
if (CollectionUtils.isNotEmpty(piEoList)) {
List<ProcessInfoEO> publishingList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.QDQR.getValue());
}).collect(Collectors.toList());
publishingCount = publishingList.size();
List<ProcessInfoEO> designList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue());
}).collect(Collectors.toList());
designCount = designList.size();
List<ProcessInfoEO> verifyList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.YZFHXSCLC.getValue());
}).collect(Collectors.toList());
verifyCount = verifyList.size();
List<ProcessInfoEO> preHomoList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(preHomoList)) {
preHomoCount = this.getPreHomoCount(pidEoList, preHomoList);
}
List<ProcessInfoEO> technologyEvaluationList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.FGJSPG.getValue());
}).collect(Collectors.toList());
technologyEvaluationCount = technologyEvaluationList.size();
List<ProcessInfoEO> opinionCollectionList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.FGYJSJLC.getValue());
}).collect(Collectors.toList());
opinionCollectionCount = opinionCollectionList.size();
}
}
result.put("publishingCount", publishingCount);
result.put("designCount", designCount);
result.put("verifyCount", verifyCount);
result.put("preHomoCount", preHomoCount);
result.put("technologyEvaluationCount", technologyEvaluationCount);
result.put("opinionCollectionCount", opinionCollectionCount);
return Result.OK(result);
}
private int getPreHomoCount(List<ProcessInfoDetailEO> pidEoList, List<ProcessInfoEO> preHomoList) {
int preHomoCount = 0;
for (ProcessInfoEO piEo : preHomoList) {
List<ProcessInfoDetailEO> pidEosTemp = pidEoList.stream().filter(pidEo -> {
boolean flag = false;
if (StringUtils.equals(piEo.getId(), pidEo.getProcessInfoId())) {
flag = true;
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(pidEosTemp)) {
List<ProcessInfoDetailEO> zrrjsrwPidEos = pidEosTemp.stream().filter(pidEo -> {
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJSRW.getKey());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(zrrjsrwPidEos)) {
preHomoCount += 1;
}
List<ProcessInfoDetailEO> rzgcsscPidEos = pidEosTemp.stream().filter(pidEo -> {
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSSC.getKey());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(rzgcsscPidEos)) {
preHomoCount += 1;
}
List<ProcessInfoDetailEO> zrrtjrwPidEos = pidEosTemp.stream().filter(pidEo -> {
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRTJRW.getKey());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(zrrtjrwPidEos)) {
preHomoCount += 1;
}
}
}
return preHomoCount;
}
}
@@ -0,0 +1,486 @@
package com.jero.modules.phone.service.impl;
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.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.DateUtils;
import com.jero.modules.phone.service.IToDoCenterService;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO;
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
import com.jero.modules.project.enums.TaskStatusEnum;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.enums.ProjectRoleEnum;
import com.jero.modules.system.service.ISysCategoryService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.enums.DesignComplianceFlowNodeKeyEnum;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.enums.VerifyComplianceFlowNodeKeyEnum;
import com.jero.modules.todoCenter.mapper.ProcessInfoEOMapper;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class ToDoCenterServiceImpl implements IToDoCenterService {
@Autowired
private ProcessInfoEOMapper processInfoEOMapper;
@Autowired
private IProcessInfoEOService processInfoEOService;
@Autowired
private IProcessInfoDetailEOService processInfoDetailEOService;
@Autowired
private IProjectTaskInventoryDetailEOService projectTaskInventoryDetailEOService;
@Autowired
private ISysUserService sysUserService;
@Autowired
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
@Autowired
private ISysCategoryService sysCategoryService;
@Autowired
private SysDictItemServiceImpl sysDictItemServiceImpl;
@Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
@Override
public IPage queryTodoTaskPage(Map<String, Object> params) {
String cut = (String) params.get("cut");
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
String mobileProcessing = (String) params.get("mobileProcessing");
Integer monthNum = Integer.parseInt((String) params.get("selectModel"));
if(monthNum > 0){
// 创建一个Calendar对象,表示当前时间
Calendar calendar = Calendar.getInstance();
// 往后推算日期
calendar.add(Calendar.MONTH, monthNum);
// 将时间设置为0点0分0秒
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
// 将日期格式化为字符串并输出
String frontEndTime = DateUtils.date_sdf.get().format(new Date());
String afterEndTime = DateUtils.date_sdf.get().format(calendar.getTime());
params.put("frontEndTime",frontEndTime);
params.put("afterEndTime",afterEndTime);
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> flowTypeList = new ArrayList<>();
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
params.put("flowTypeList", flowTypeList);
params.put("taskStatus", TaskStatusEnum.NOT_DONE.getValue());
params.put("currentUserId", currentUser.getId());
List<String> qdqrFlowTypeValue = new ArrayList<>();
if(StringUtils.equals(mobileProcessing,YesOrNoEnum.NO.getValue()) || StringUtils.isEmpty(mobileProcessing)){
qdqrFlowTypeValue.add(FlowTypeEnum.QDQR.getValue());
}
qdqrFlowTypeValue.add(FlowTypeEnum.CERTIFICATION_LC.getValue());
params.put("qdqrFlowTypeValue", qdqrFlowTypeValue);
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.processInfoEOMapper.queryPhoneTodoTaskListList(page, params);
List<ProcessInfoVO> datas = result.getRecords();
this.disposeData(cut, datas);
return result;
}
private void disposeData(String cut, List<ProcessInfoVO> datas) {
if (CollectionUtils.isNotEmpty(datas)) {
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ProcessInfoDetailEO> pidQueryWrap = new QueryWrapper<>();
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getFlowType, FlowTypeEnum.CERTIFICATION_LC.getValue());
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getUserId, currentUser.getId());
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getStatus, TaskStatusEnum.NOT_DONE.getValue());
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidQueryWrap);
Iterator<ProcessInfoVO> datasIt = datas.iterator();
List<ProcessInfoVO> datasTemp = new ArrayList<>();
while (datasIt.hasNext()) {
ProcessInfoVO data = datasIt.next();
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue())) {
List<ProcessInfoDetailEO> pidEos = pidEoList.stream().filter(pidEo -> {
boolean flag = StringUtils.equals(pidEo.getProcessInfoId(), data.getId());
return flag;
}).collect(Collectors.toList());
// 判断当前用户在这个认证流程中 有几个任务。 责任人 接受、责任人 提交交付物、认证工程审批
if (CollectionUtils.isNotEmpty(pidEos)) {
List<ProcessInfoDetailEO> zrrjsrwPidEos = pidEos.stream().filter(pidEo -> {
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJSRW.getKey());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(zrrjsrwPidEos)) {
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
BeanUtils.copyProperties(data, processInfoVOTemp);
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey());
datasTemp.add(processInfoVOTemp);
}
List<ProcessInfoDetailEO> rzgcsscPidEos = pidEos.stream().filter(pidEo -> {
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSSC.getKey());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(rzgcsscPidEos)) {
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
BeanUtils.copyProperties(data, processInfoVOTemp);
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.TASK_REVIEW.getKey());
datasTemp.add(processInfoVOTemp);
}
List<ProcessInfoDetailEO> zrrtjrwPidEos = pidEos.stream().filter(pidEo -> {
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRTJRW.getKey());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(zrrtjrwPidEos)) {
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
BeanUtils.copyProperties(data, processInfoVOTemp);
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.TASK_HANDLING.getKey());
datasTemp.add(processInfoVOTemp);
}
}
datasIt.remove();
}
}
datas.addAll(datasTemp);
this.disposeData(datas, cut, TaskStatusEnum.NOT_DONE.getValue());
}
}
public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus) {
if (CollectionUtils.isNotEmpty(datas)) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
try {
currentDate = sdf.parse(sdf.format(currentDate));
} catch (ParseException e) {
e.printStackTrace();
}
List<String> processInfoIdList = datas.stream().map(ProcessInfoVO::getId).distinct().collect(Collectors.toList());
QueryWrapper<ProcessInfoDetailEO> processInfoDetailQueryWrap = new QueryWrapper<>();
processInfoDetailQueryWrap.lambda().in(ProcessInfoDetailEO::getProcessInfoId, processInfoIdList);
List<ProcessInfoDetailEO> processInfoDetailEOList = this.processInfoDetailEOService.list(processInfoDetailQueryWrap);
Map<String, List<ProcessInfoDetailEO>> lastAssigneeDetailMap = processInfoDetailEOList.stream().filter(processInfoDetailEO -> {
boolean flag = false;
if (StringUtils.equals(processInfoDetailEO.getStatus(), TaskStatusEnum.HAVE_DONE.getValue()) && processInfoDetailEO.getSubmitTime() != null) {
flag = true;
}
return flag;
}).collect(Collectors.groupingBy(ProcessInfoDetailEO::getProcessInfoId));
Map<String, List<ProcessInfoDetailEO>> assigneeDetailMap = processInfoDetailEOList.stream().filter(processInfoDetailEO -> {
boolean flag = false;
if (StringUtils.equals(processInfoDetailEO.getStatus(), TaskStatusEnum.NOT_DONE.getValue()) && processInfoDetailEO.getSubmitTime() == null) {
flag = true;
}
return flag;
}).collect(Collectors.groupingBy(ProcessInfoDetailEO::getProcessInfoId));
//设置责任人反馈意见
this.processInfoEOService.setPersonChargeFeedback(datas);
List<String> userIdList = new ArrayList<>();
datas.forEach(data -> {
String standardInfo = data.getStandardInfo();
if (StringUtils.isNotBlank(standardInfo)) {
String standardInfoTemp = standardInfo.replaceAll("", " ");
data.setStandardInfo(standardInfoTemp);
}
//设置上一个操作人。
for (Map.Entry<String, List<ProcessInfoDetailEO>> detailMap : lastAssigneeDetailMap.entrySet()) {
if (StringUtils.equals(data.getId(), detailMap.getKey())) {
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
Collections.sort(detailEOList, new Comparator<ProcessInfoDetailEO>() {
@Override
public int compare(ProcessInfoDetailEO o1, ProcessInfoDetailEO o2) {
return o2.getSubmitTime().compareTo(o1.getSubmitTime());
}
});
String userId = detailEOList.get(0).getUserId();
userIdList.add(userId);
data.setLastAssignee(userId);
break;
}
}
//设置当前操作人
for (Map.Entry<String, List<ProcessInfoDetailEO>> detailMap : assigneeDetailMap.entrySet()) {
if (StringUtils.equals(data.getId(), detailMap.getKey())) {
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
data.setAssignee(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.joining(",")));
userIdList.addAll(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList()));
// 如果上一操作人是空,则证明该流程当前处理人也是上一个操作人。
if (StringUtils.isEmpty(data.getLastAssignee())) {
List<String> collect = detailEOList.stream().filter(detailEO -> {
return (StringUtils.equals(detailEO.getTaskDefinitionKey(), DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey())
|| StringUtils.equals(detailEO.getTaskDefinitionKey(), DesignComplianceNodeEnum.SPONSOR_REVIEW.getKey()));
}).map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)) {
data.setLastAssignee(collect.get(0));
}
}
break;
}
}
});
List<String> taskIdList = datas.stream().map(ProcessInfoVO::getTaskId).distinct().collect(Collectors.toList());
List<ProjectTaskInventoryDetailEO> taskInventoryDetailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(taskIdList)) {
QueryWrapper<ProjectTaskInventoryDetailEO> taskInventoryDetailQueryWrap = new QueryWrapper<>();
taskInventoryDetailQueryWrap.lambda().in(ProjectTaskInventoryDetailEO::getTaskId, taskIdList);
taskInventoryDetailList = this.projectTaskInventoryDetailEOService.list(taskInventoryDetailQueryWrap);
}
List<ProjectTaskInventoryDetailEO> finalTaskInventoryDetailList = taskInventoryDetailList;
List<SysUser> sysUserList = this.sysUserService.querySysUserListByIdList(userIdList);
Date finalCurrentDate = currentDate;
datas.forEach(data -> {
if (StringUtils.isNotEmpty(data.getFlowType())) {
data.setFlowTypeShow(FlowTypeEnum.getTextByValue(data.getFlowType(), cut));
}
if (StringUtils.isNotEmpty(data.getStatus())) {
data.setStatusShow(TodoCenterStatusEnum.getTextByValue(data.getStatus(), cut));
}
if (CollectionUtils.isNotEmpty(sysUserList)) {
if (StringUtils.isNotEmpty(data.getLastAssignee())) {
String lastUserName = sysUserList.stream().filter(sysUser -> {
boolean flag = false;
if (StringUtils.equals(data.getLastAssignee(), sysUser.getId())) {
flag = true;
}
return flag;
}).map(SysUser::getUsername).collect(Collectors.joining(","));
data.setLastAssigneeName(lastUserName);
}
//如果流程没有结束,才可以展示当前处理人。
if (!StringUtils.equals(data.getStatus(), TodoCenterStatusEnum.COMPLETED.getValue())) {
if (StringUtils.isNotEmpty(data.getAssignee())) {
String[] assigneeArr = data.getAssignee().split(",");
String currentUserName = sysUserList.stream().filter(sysUser -> {
boolean flag = false;
for (String assignee : assigneeArr) {
if (StringUtils.equals(assignee, sysUser.getId())) {
flag = true;
}
}
return flag;
}).map(SysUser::getUsername).collect(Collectors.joining(","));
data.setAssigneeName(currentUserName);
}
}
}
//设置任务清单明细表id
if (CollectionUtils.isNotEmpty(finalTaskInventoryDetailList)) {
String primaryKeyId = finalTaskInventoryDetailList.stream().filter(taskInventoryDetail -> {
boolean flag = false;
if (StringUtils.equals(data.getTaskId(), taskInventoryDetail.getTaskId())) {
flag = true;
}
return flag;
}).map(ProjectTaskInventoryDetailEO::getId).collect(Collectors.joining(","));
data.setPrimaryKeyId(primaryKeyId);
}
//判断当前任务是否过期
Date endTime = data.getEndTime();
if (ObjectUtils.isNotEmpty(endTime)) {
try {
endTime = sdf.parse(sdf.format(endTime));
} catch (ParseException e) {
e.printStackTrace();
}
if (finalCurrentDate.after(endTime) || finalCurrentDate.equals(endTime)) {
data.setEndTimePastDueFlag(true);
}
}
});
List<String> createByUserIdList = datas.stream().map(ProcessInfoVO::getCreateBy).distinct().collect(Collectors.toList());
List<SysUser> createByUserList = this.sysUserService.querySysUserListByIdList(createByUserIdList);
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> projectLawsInventoryIdList = datas.stream().filter(data -> {
boolean flag = false;
if (StringUtils.isNotEmpty(data.getProjectLawsInventoryId())) {
flag = true;
}
return flag;
}).map(ProcessInfoVO::getProjectLawsInventoryId).collect(Collectors.toList());
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(projectLawsInventoryIdList)) {
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrapper = new QueryWrapper<>();
lawsInventoryEOQueryWrapper.lambda().in(ProjectLawsInventoryEO::getId, projectLawsInventoryIdList);
projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrapper);
}
List<SysCategory> categoryList = this.sysCategoryService.list();
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
for (ProcessInfoVO data : datas) {
if (CollectionUtils.isNotEmpty(projectLawsInventoryEOList)) {
// 处理展示的交付物类型信息
String projectLawsInventoryId = data.getProjectLawsInventoryId();
String deliverableTypeName = this.projectLawsInventoryEOService.getDeliverableTypeNameById(projectLawsInventoryId, cut, data.getFlowType(), projectLawsInventoryEOList, categoryList);
data.setDeliverableTypeName(deliverableTypeName);
// 处理责任领域展示信息
String dutyTerritoryName = this.projectLawsInventoryEOService.getDutyTerritoryNameById(projectLawsInventoryId, cut, projectLawsInventoryEOList, sysDictItems, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
data.setDutyTerritoryName(dutyTerritoryName);
}
}
datas.forEach(data -> {
// 设置发起人的名称
if (CollectionUtils.isNotEmpty(createByUserList) && StringUtils.isNotEmpty(data.getCreateBy())) {
String createBy = createByUserList.stream().filter(createByUser -> {
boolean flag = false;
if (StringUtils.equals(createByUser.getId(), data.getCreateBy())) {
flag = true;
}
return flag;
}).map(SysUser::getUsername).distinct().collect(Collectors.joining(","));
data.setCreateBy(createBy);
}
if (!StringUtils.equals(data.getFlowType(), FlowTypeEnum.QDQR.getValue()) && !StringUtils.equals(data.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue())) {
// 获取当前用户所拥有的待办任务信息
List<ProcessInfoDetailEO> currentUserProcessInfoDetailInfos = processInfoDetailEOList.stream().filter(detail -> {
boolean flag = false;
if (StringUtils.isNotEmpty(taskStatus)) {
flag = (StringUtils.equals(detail.getProcessInfoId(), data.getId()) && StringUtils.equals(detail.getUserId(), currentUser.getId()) && StringUtils.equals(taskStatus, detail.getStatus()));
} else {
flag = (StringUtils.equals(detail.getProcessInfoId(), data.getId()) && StringUtils.equals(detail.getUserId(), currentUser.getId()));
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(currentUserProcessInfoDetailInfos)) {
// 设置taskId
data.setTaskId(currentUserProcessInfoDetailInfos.get(0).getTaskId());
// 设置taskDefinitionKey
data.setTaskDefinitionKey(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey());
String taskDefinitionKeyName = "";
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())) {
taskDefinitionKeyName = DesignComplianceFlowNodeKeyEnum.getTextByValue(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey(), cut);
} else if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.YZFHXSCLC.getValue())) {
taskDefinitionKeyName = VerifyComplianceFlowNodeKeyEnum.getTextByValue(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey(), cut);
}
data.setTaskDefinitionKeyName(taskDefinitionKeyName);
}
}
// 如果是清单确认流程,将任务节点设置为 清单校核:Checklist verification
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.QDQR.getValue())) {
String taskDefinitionKeyName = "清单校核";
if (StringUtils.equals(cut, CutEnum.EN.getValue())) {
taskDefinitionKeyName = "Checklist verification";
}
data.setTaskDefinitionKeyName(taskDefinitionKeyName);
}
// 如果是Pre-Homo流程
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue()) && data.getEndTime() != null) {
data.setTaskDefinitionKeyName(CertificationFlowNodeEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
}
});
}
}
@Override
public IPage<ProjectCertificationInventoryEO> queryPreHomoPage(Map<String,Object> params) {
ProjectCertificationInventoryEO pciEo = new ProjectCertificationInventoryEO();
String cut = (String) params.get("cut");
String projectLibraryId = (String) params.get("projectLibraryId");
String taskDefinitionKey = (String) params.get("taskDefinitionKey");
Integer pageNo = Integer.parseInt((String) params.get("pageNo"));
Integer pageSize = Integer.parseInt((String) params.get("pageSize"));
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId, projectLibraryId);
queryWrapper.orderByDesc("create_time");
if (StringUtils.equals(taskDefinitionKey, CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey())) {
pciEo.setRoleCode(ProjectRoleEnum.PERSON_LIABLE.getValue());
queryWrapper.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
} else if (StringUtils.equals(taskDefinitionKey, CertificationFlowNodeEnum.TASK_HANDLING.getKey())) {
pciEo.setRoleCode(ProjectRoleEnum.PERSON_LIABLE.getValue());
queryWrapper.and(queryWrap -> {
queryWrap.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue());
queryWrap.or().lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue());
});
} else if (StringUtils.equals(taskDefinitionKey, CertificationFlowNodeEnum.TASK_REVIEW.getKey())) {
pciEo.setRoleCode(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
queryWrapper.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue());
}
Page<ProjectCertificationInventoryEO> page = new Page<ProjectCertificationInventoryEO>(pageNo, pageSize);
IPage<ProjectCertificationInventoryEO> pageList = this.projectCertificationInventoryEOService.queryPage(queryWrapper, page, pciEo, cut);
return pageList;
}
@Override
public Result<?> queryProjectCertificationInventoryById(Map<String, Object> params) {
String id = (String) params.get("id");
String cut = (String) params.get("cut");
if (StringUtils.isEmpty(id)) {
throw new JeroBootException("id不能为空,请检查!");
}
ProjectCertificationInventoryEO pciEo = this.projectCertificationInventoryEOService.getById(id);
if (ObjectUtils.isEmpty(pciEo)) {
return Result.error("未找到对应数据");
}
List<ProjectCertificationInventoryEO> pciEoList = new ArrayList<>();
pciEoList.add(pciEo);
this.projectCertificationInventoryEOService.disposeData(pciEoList, cut);
return Result.OK(pciEoList.get(0));
}
}
@@ -23,6 +23,8 @@ import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.message.websocket.WebSocket; import com.jero.modules.message.websocket.WebSocket;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.phone.enums.BrowseTypeEnum;
import com.jero.modules.phone.service.IRecentBrowseService;
import com.jero.modules.problemKnowledgeBase.entity.*; import com.jero.modules.problemKnowledgeBase.entity.*;
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum; import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum; import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
@@ -41,6 +43,7 @@ import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.util.StringUtils; import com.jero.modules.system.util.StringUtils;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
@@ -98,6 +101,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
private ISysDepartService sysDepartService; private ISysDepartService sysDepartService;
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired
private IRecentBrowseService recentBrowseService;
public static final String SEARCH_FLAG = ""; public static final String SEARCH_FLAG = "";
@@ -129,6 +134,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId()); problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
problemKnowledgeBaseEO.setReleaseTime(now); problemKnowledgeBaseEO.setReleaseTime(now);
problemKnowledgeBaseEO.setCreateBy(currentUser.getUsername());
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO); this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
} }
save(problemKnowledgeBaseEO); save(problemKnowledgeBaseEO);
@@ -428,6 +434,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle()); convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent()); convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
convertAfterMap.put("create_time",new Date()); convertAfterMap.put("create_time",new Date());
convertAfterMap.put("create_by",problemKnowledgeBaseEO.getCreateBy());
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions()); convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
} }
} }
@@ -470,6 +477,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
@Override @Override
public void deleteById(String id) { public void deleteById(String id) {
removeById(id); removeById(id);
// 删除知识分享浏览记录表信息.
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.ZSFX.getValue(),Arrays.asList(id.split(",")));
} }
/** /**
@@ -494,6 +504,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper); this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
// 删除知识分享浏览记录表信息.
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.ZSFX.getValue(),ids);
for (String problemKnowledgeBaseId : ids) { for (String problemKnowledgeBaseId : ids) {
this.deleteElasticsearchData(problemKnowledgeBaseId); this.deleteElasticsearchData(problemKnowledgeBaseId);
} }
@@ -509,7 +522,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
public ProblemKnowledgeBaseEO queryById(String id,String cut) { public ProblemKnowledgeBaseEO queryById(String id,String cut) {
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = getById(id); ProblemKnowledgeBaseEO problemKnowledgeBaseEO = getById(id);
List<ProblemKnowledgeBaseEO> problemKnowledgeBaseEOList = new ArrayList<>(); List<ProblemKnowledgeBaseEO> problemKnowledgeBaseEOList = new ArrayList<>();
problemKnowledgeBaseEOList.add(problemKnowledgeBaseEO); if (ObjectUtils.isNotEmpty(problemKnowledgeBaseEO)) {
problemKnowledgeBaseEOList.add(problemKnowledgeBaseEO);
}
this.disposeData(problemKnowledgeBaseEOList,cut); this.disposeData(problemKnowledgeBaseEOList,cut);
if (CollectionUtils.isNotEmpty(problemKnowledgeBaseEOList)) { if (CollectionUtils.isNotEmpty(problemKnowledgeBaseEOList)) {
problemKnowledgeBaseEO = problemKnowledgeBaseEOList.get(0); problemKnowledgeBaseEO = problemKnowledgeBaseEOList.get(0);
@@ -1220,7 +1220,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detail.setTaskDefinitionKey(taskDefinitionKey); detail.setTaskDefinitionKey(taskDefinitionKey);
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue()); detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
detail.setCreateTime(new Date()); detail.setCreateTime(new Date());
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
}); });
List<String> userIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getUserId).distinct().collect(Collectors.toList()); List<String> userIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getUserId).distinct().collect(Collectors.toList());
@@ -1228,6 +1227,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId); removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList); removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey); removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey);
if(!StringUtils.equals(taskDefinitionKey,CertificationFlowNodeEnum.RZGCSSC.getKey())){
List<String> dataIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getProjectLawsInventoryId).distinct().collect(Collectors.toList());
removeWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,dataIdList);
}
// 删除用户在这个认证清单流程中其它的待办任务 // 删除用户在这个认证清单流程中其它的待办任务
this.processInfoDetailEOService.remove(removeWrap); this.processInfoDetailEOService.remove(removeWrap);
@@ -2016,6 +2019,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRTJRW.getKey()); detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRTJRW.getKey());
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList); detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateTime,new Date());
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateBy,currentUser.getUsername());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
// 给认证工程师分配待办中心的任务 认证工程师审查 // 给认证工程师分配待办中心的任务 认证工程师审查
@@ -2102,6 +2107,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey()); detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList); detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateTime,new Date());
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateBy,currentUser.getUsername());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
// 给责任人分配待办中心的任务 (待提交) // 给责任人分配待办中心的任务 (待提交)
@@ -2217,6 +2224,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey()); detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList); detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateTime,new Date());
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateBy,currentUser.getUsername());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
this.certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(projectCertificationInventoryEOList); this.certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(projectCertificationInventoryEOList);
@@ -16,6 +16,8 @@ import com.jero.modules.document.utils.ReadWordUtil;
import com.jero.modules.dummy.enums.InventoryStateEnum; import com.jero.modules.dummy.enums.InventoryStateEnum;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.phone.enums.BrowseTypeEnum;
import com.jero.modules.phone.service.IRecentBrowseService;
import com.jero.modules.report.entity.LawsMonthlyReportManageEO; import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
import com.jero.modules.report.mapper.LawsMonthlyReportManageEOMapper; import com.jero.modules.report.mapper.LawsMonthlyReportManageEOMapper;
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService; import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
@@ -52,6 +54,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
public static final String SEARCH_FLAG = "";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据) public static final String SEARCH_FLAG = "";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
@Autowired
private IRecentBrowseService recentBrowseService;
/** /**
* 保存 * 保存
@@ -90,6 +94,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
@Override @Override
public void deleteById(String id) { public void deleteById(String id) {
removeById(id); removeById(id);
// 删除法规月报浏览记录表信息.
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.FGYB.getValue(),Arrays.asList(id.split(",")));
} }
/** /**
@@ -101,6 +107,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
@Override @Override
public void deleteByIds(List<String> ids) { public void deleteByIds(List<String> ids) {
removeByIds(ids); removeByIds(ids);
// 删除法规月报浏览记录表信息.
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.FGYB.getValue(),ids);
} }
/** /**
@@ -192,20 +200,20 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
//文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG //文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG
putMap(id, "法规月报", putMap(id, "法规月报",
fileText, monthlyReportManageEO.getName(), fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG); ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG,monthlyReportManageEO);
//文件相关封装英文的全文内容(es) //文件相关封装英文的全文内容(es)
putMap(id, "monthly report", putMap(id, "monthly report",
fileText, monthlyReportManageEO.getName(), fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG); ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG,monthlyReportManageEO);
//文件相关封装中文的全文内容(es) 搜索条件下的: flag---null //文件相关封装中文的全文内容(es) 搜索条件下的: flag---null
putMap(id + monthlyReportManageEO.getFileId(), "法规月报", putMap(id + monthlyReportManageEO.getFileId(), "法规月报",
fileText, monthlyReportManageEO.getName(), fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null); ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null,monthlyReportManageEO);
//文件相关封装英文的全文内容(es) //文件相关封装英文的全文内容(es)
putMap(id + monthlyReportManageEO.getFileId(), "monthly report", putMap(id + monthlyReportManageEO.getFileId(), "monthly report",
fileText, monthlyReportManageEO.getName(), fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null); ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null,monthlyReportManageEO);
mapListTempCn.add(stringMapCn); mapListTempCn.add(stringMapCn);
mapListTempCn.add(stringMapCnForSearch); mapListTempCn.add(stringMapCnForSearch);
@@ -250,7 +258,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
String content, String title , String content, String title ,
String fileName, String fileId, Date issueTime, String cut, String fileName, String fileId, Date issueTime, String cut,
Map<String, Object> stringMap, Map<String, Object> stringMap,
String flag){ String flag,
LawsMonthlyReportManageEO monthlyReportManageEO){
stringMap.put("id", id); stringMap.put("id", id);
stringMap.put("module_type", moduleType); stringMap.put("module_type", moduleType);
stringMap.put("module_type_flag", ModuleTypeFlagEnum.LAWS_MONTHLY_REPORT.getValue()); // 默认法规月报标识 stringMap.put("module_type_flag", ModuleTypeFlagEnum.LAWS_MONTHLY_REPORT.getValue()); // 默认法规月报标识
@@ -259,6 +268,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
stringMap.put("file_name", fileName); stringMap.put("file_name", fileName);
stringMap.put("file_id", fileId); stringMap.put("file_id", fileId);
stringMap.put("create_time", issueTime); stringMap.put("create_time", issueTime);
stringMap.put("create_by", monthlyReportManageEO.getCreateBy());
stringMap.put("cut",cut); stringMap.put("cut",cut);
stringMap.put("flag",flag); stringMap.put("flag",flag);
@@ -12,6 +12,7 @@ import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.constant.enums.YesOrNoEnum; import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.es.JeroElasticsearchTemplate; import com.jero.common.es.JeroElasticsearchTemplate;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.DateUtils;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.collection.entity.OnlCgformCollection; import com.jero.modules.collection.entity.OnlCgformCollection;
@@ -20,6 +21,7 @@ import com.jero.modules.document.enums.FieldTypeEnum;
import com.jero.modules.document.enums.SearchEnum; import com.jero.modules.document.enums.SearchEnum;
import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO; import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
@@ -681,6 +683,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits")); List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
List<SysDictItem> stateSysDictItems = this.sysDictItemServiceImpl.selectItemsByDictCode(DictCodeEnum.STATE.getValue());
for (Map<String, Object> map : list) { for (Map<String, Object> map : list) {
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source"); Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight"); Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
@@ -700,6 +703,28 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
mapSource.put("file_text",""); mapSource.put("file_text","");
} }
} }
String state = (String) mapSource.get("state");
String state_dictText = "";
for (SysDictItem dictItem : stateSysDictItems) {
if (StringUtils.equals(dictItem.getItemValue(), state)) {
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
state_dictText = dictItem.getItemText();
} else {
state_dictText = dictItem.getEnName();
}
break;
}
}
mapSource.put("state_dictText", state_dictText);
String create_time_str = "";
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
}
mapSource.put("create_time_str",create_time_str);
mapList.add(mapSource); mapList.add(mapSource);
} }
@@ -1442,6 +1467,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
mapSource.put("content",""); mapSource.put("content","");
}*/ }*/
} }
String create_time_str = "";
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
}
mapSource.put("create_time_str",create_time_str);
mapList.add(mapSource); mapList.add(mapSource);
} }
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.es.JeroElasticsearchTemplate; import com.jero.common.es.JeroElasticsearchTemplate;
import com.jero.common.util.DateUtils;
import com.jero.modules.document.enums.SearchEnum; import com.jero.modules.document.enums.SearchEnum;
import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService; import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService;
import com.jero.modules.searchcenter.vo.SearchVO; import com.jero.modules.searchcenter.vo.SearchVO;
@@ -211,6 +212,11 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
mapSource.put(key,fieldConyent); mapSource.put(key,fieldConyent);
} }
} }
String create_time_str = "";
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
}
mapSource.put("create_time_str",create_time_str);
mapList.add(mapSource); mapList.add(mapSource);
} }
@@ -37,4 +37,11 @@ public interface ProcessInfoEOMapper extends BaseMapper<ProcessInfoEO> {
* @return * @return
*/ */
IPage<ProcessInfoVO> queryLawsAssessPageList(IPage page, Map<String, Object> params); IPage<ProcessInfoVO> queryLawsAssessPageList(IPage page, Map<String, Object> params);
/**
* 手机端-查询待办任务数据
* @param params
* @return
*/
IPage<ProcessInfoVO> queryPhoneTodoTaskListList(IPage page, Map<String, Object> params);
} }
@@ -33,11 +33,29 @@
and temp.standard_info like CONCAT(CONCAT('%',#{params.standardInfo}),'%') and temp.standard_info like CONCAT(CONCAT('%',#{params.standardInfo}),'%')
</if> </if>
<if test="params.flowType != null and params.flowType !=''"> <if test="params.flowType != null and params.flowType !=''">
and temp.flow_type = #{params.flowType} and temp.flow_type in
<foreach collection="params.flowType.split(',')" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if> </if>
<if test="params.status != null and params.status !=''"> <if test="params.status != null and params.status !=''">
and temp.status = #{params.status} and temp.status = #{params.status}
</if> </if>
<if test="params.frontEndTime != null and params.frontEndTime !=''">
and (
temp.end_time &gt;= #{params.frontEndTime}
<if test="params.afterEndTime != null and params.afterEndTime !=''">
and temp.end_time &lt;= #{params.afterEndTime}
</if>
)
</if>
<!-- 手机端查询参数,根据phoneQueryValue查询 标准信息、项目名称 -->
<if test="params.phoneQueryValue != null and params.phoneQueryValue !=''">
and (
temp.standard_info like CONCAT(CONCAT('%',#{params.phoneQueryValue}),'%')
or temp.project_name like CONCAT(CONCAT('%',#{params.phoneQueryValue}),'%')
)
</if>
</where> </where>
</sql> </sql>
@@ -374,4 +392,161 @@
order by temp.end_time desc order by temp.end_time desc
</if> </if>
</select> </select>
<select id="queryPhoneTodoTaskListList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
select
temp.*,
(case temp.flow_type when '10' THEN '1' when '21' THEN '2' when '2' THEN '3' when '4' THEN '4' END) as flow_type_show_order_by
from (
SELECT
pi.id,
pi.project_library_id,
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
concat(
pni.project_name,
'-',
pyni.year_name,
'-',
(
SELECT
<if test="params.cut == 'cn'">
CASE WHEN GROUP_CONCAT( item_text SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( item_text SEPARATOR ',' ) END AS item_text
</if>
<if test="params.cut == 'en'">
CASE WHEN GROUP_CONCAT( en_name SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( en_name SEPARATOR ',' ) END AS item_text
</if>
FROM
sys_dict_item
WHERE
FIND_IN_SET( item_value, plb.target_market ) > 0
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
) ,
'-',
plb.project_version
) AS project_name,
pyni.year_name,
pli.serial_number,
pli.title,
bdl.title_en,
<if test="params.cut == 'cn'">
concat(pli.serial_number,' ',pli.title) as standard_info,
</if>
<if test="params.cut == 'en'">
concat(pli.serial_number,' ',bdl.title_en) as standard_info,
</if>
(case pi.flow_type when '32' THEN '2' when '34' THEN '4' else pi.flow_type END) as flow_type,
pi.create_by,
pi.end_time,
pi.STATUS,
pi.prc_num,
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
where (
pi.id IN (
SELECT
pid.process_info_id
FROM
process_info_detail pid
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
)
)
AND pi.flow_type IN
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
union
SELECT
pi.id,
pi.project_library_id,
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
concat(
pni.project_name,
'-',
pyni.year_name,
'-',
(
SELECT
<if test="params.cut == 'cn'">
CASE WHEN GROUP_CONCAT( item_text SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( item_text SEPARATOR ',' ) END AS item_text
</if>
<if test="params.cut == 'en'">
CASE WHEN GROUP_CONCAT( en_name SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( en_name SEPARATOR ',' ) END AS item_text
</if>
FROM
sys_dict_item
WHERE
FIND_IN_SET( item_value, plb.target_market ) > 0
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
) ,
'-',
plb.project_version
) AS project_name,
pyni.year_name,
'--' as serial_number,
'--' as standard_info,
'' as title,
'' as title_en,
pi.flow_type,
pi.create_by,
(
select
pid.end_time
from
process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' and pid.end_time is not null order by pid.end_time asc limit 1
) as end_time,
pi.STATUS,
pi.prc_num,
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
WHERE (
pi.id IN (
SELECT
pid.process_info_id
FROM
process_info_detail pid
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
)
)
AND pi.flow_type IN
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)temp
<include refid="BaseQuerySql"/>
order by
temp.end_time IS NULL,
temp.end_time,
temp.project_name IS NULL,
temp.project_name,
standard_info IS NULL,
standard_info,
flow_type_show_order_by
ASC
</select>
</mapper> </mapper>
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.modules.todoCenter.entity.ProcessInfoEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -126,4 +128,8 @@ public interface IProcessInfoEOService extends IService<ProcessInfoEO> {
* @return * @return
*/ */
Result<?> complianceDataMigration(Map<String, Object> params); Result<?> complianceDataMigration(Map<String, Object> params);
void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus);
public void setPersonChargeFeedback(List<ProcessInfoVO> datas);
} }
@@ -528,6 +528,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
* @param datas * @param datas
* @param cut * @param cut
*/ */
@Override
public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus){ public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus){
if(CollectionUtils.isNotEmpty(datas)){ if(CollectionUtils.isNotEmpty(datas)){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -847,6 +848,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
* 设置符合性流程中责任人反馈意见 * 设置符合性流程中责任人反馈意见
* @param datas * @param datas
*/ */
@Override
public void setPersonChargeFeedback(List<ProcessInfoVO> datas){ public void setPersonChargeFeedback(List<ProcessInfoVO> datas){
//符合性流程实例id //符合性流程实例id
List<String> complianceProcessPrcIdList = datas.stream().filter(data -> { List<String> complianceProcessPrcIdList = datas.stream().filter(data -> {
+73 -10
View File
@@ -11,6 +11,7 @@
"@antv/data-set": "^0.11.4", "@antv/data-set": "^0.11.4",
"@tinymce/tinymce-vue": "^2.1.0", "@tinymce/tinymce-vue": "^2.1.0",
"@toast-ui/editor": "^2.1.2", "@toast-ui/editor": "^2.1.2",
"amfe-flexible": "^2.2.1",
"ant-design-vue": "^1.7.2", "ant-design-vue": "^1.7.2",
"area-data": "^5.0.6", "area-data": "^5.0.6",
"axios": "^0.21.1", "axios": "^0.21.1",
@@ -33,6 +34,7 @@
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"tinymce": "^5.3.2", "tinymce": "^5.3.2",
"v-viewer": "^1.6.4", "v-viewer": "^1.6.4",
"vant": "^2.12.54",
"viser-vue": "^2.4.8", "viser-vue": "^2.4.8",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-area-linkage": "^5.1.0", "vue-area-linkage": "^5.1.0",
@@ -1337,7 +1339,6 @@
"version": "7.12.5", "version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
"dev": true,
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }
@@ -1718,11 +1719,20 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"node_modules/@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"node_modules/@vue/babel-helper-vue-jsx-merge-props": { "node_modules/@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==", "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
"dev": true
}, },
"node_modules/@vue/babel-plugin-transform-vue-jsx": { "node_modules/@vue/babel-plugin-transform-vue-jsx": {
"version": "1.2.1", "version": "1.2.1",
@@ -2957,6 +2967,11 @@
"node": ">=0.4.2" "node": ">=0.4.2"
} }
}, },
"node_modules/amfe-flexible": {
"version": "2.2.1",
"resolved": "https://registry.npmmirror.com/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
"integrity": "sha512-L2VfvDzoETBjhRptg5u/IUuzHSuxm22JpSRb404p/TBGeRfwWmmNEbB+TFPIP/sS/+pbM18bCFH9QnMojLuPNw=="
},
"node_modules/ansi-colors": { "node_modules/ansi-colors": {
"version": "3.2.4", "version": "3.2.4",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
@@ -16596,8 +16611,7 @@
"node_modules/regenerator-runtime": { "node_modules/regenerator-runtime": {
"version": "0.13.7", "version": "0.13.7",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
"dev": true
}, },
"node_modules/regenerator-transform": { "node_modules/regenerator-transform": {
"version": "0.10.1", "version": "0.10.1",
@@ -19224,6 +19238,21 @@
"spdx-expression-parse": "^3.0.0" "spdx-expression-parse": "^3.0.0"
} }
}, },
"node_modules/vant": {
"version": "2.12.54",
"resolved": "https://registry.npmmirror.com/vant/-/vant-2.12.54.tgz",
"integrity": "sha512-t7DCiLxNosDrg0Jm5EY9p0A5cAMo5OadmizbYtPEc0ru+OJKEa3kcfxtKIK5on7ZPqoOkyYJt8e6BQ1VDMPsrg==",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
},
"peerDependencies": {
"vue": ">= 2.6.0"
}
},
"node_modules/vary": { "node_modules/vary": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -19401,6 +19430,11 @@
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz",
"integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A==" "integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A=="
}, },
"node_modules/vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"node_modules/vue-loader": { "node_modules/vue-loader": {
"version": "15.9.6", "version": "15.9.6",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.6.tgz", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.6.tgz",
@@ -22253,7 +22287,6 @@
"version": "7.12.5", "version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
"dev": true,
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }
@@ -22602,11 +22635,20 @@
} }
} }
}, },
"@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"@vue/babel-helper-vue-jsx-merge-props": { "@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==", "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
"dev": true
}, },
"@vue/babel-plugin-transform-vue-jsx": { "@vue/babel-plugin-transform-vue-jsx": {
"version": "1.2.1", "version": "1.2.1",
@@ -23666,6 +23708,11 @@
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
}, },
"amfe-flexible": {
"version": "2.2.1",
"resolved": "https://registry.npmmirror.com/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
"integrity": "sha512-L2VfvDzoETBjhRptg5u/IUuzHSuxm22JpSRb404p/TBGeRfwWmmNEbB+TFPIP/sS/+pbM18bCFH9QnMojLuPNw=="
},
"ansi-colors": { "ansi-colors": {
"version": "3.2.4", "version": "3.2.4",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
@@ -35155,8 +35202,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.7", "version": "0.13.7",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
"dev": true
}, },
"regenerator-transform": { "regenerator-transform": {
"version": "0.10.1", "version": "0.10.1",
@@ -37319,6 +37365,18 @@
"spdx-expression-parse": "^3.0.0" "spdx-expression-parse": "^3.0.0"
} }
}, },
"vant": {
"version": "2.12.54",
"resolved": "https://registry.npmmirror.com/vant/-/vant-2.12.54.tgz",
"integrity": "sha512-t7DCiLxNosDrg0Jm5EY9p0A5cAMo5OadmizbYtPEc0ru+OJKEa3kcfxtKIK5on7ZPqoOkyYJt8e6BQ1VDMPsrg==",
"requires": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
}
},
"vary": { "vary": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -37470,6 +37528,11 @@
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz",
"integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A==" "integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A=="
}, },
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"vue-loader": { "vue-loader": {
"version": "15.9.6", "version": "15.9.6",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.6.tgz", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.6.tgz",
+2
View File
@@ -13,6 +13,7 @@
"@antv/data-set": "^0.11.4", "@antv/data-set": "^0.11.4",
"@tinymce/tinymce-vue": "^2.1.0", "@tinymce/tinymce-vue": "^2.1.0",
"@toast-ui/editor": "^2.1.2", "@toast-ui/editor": "^2.1.2",
"amfe-flexible": "^2.2.1",
"ant-design-vue": "^1.7.2", "ant-design-vue": "^1.7.2",
"area-data": "^5.0.6", "area-data": "^5.0.6",
"axios": "^0.21.1", "axios": "^0.21.1",
@@ -35,6 +36,7 @@
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"tinymce": "^5.3.2", "tinymce": "^5.3.2",
"v-viewer": "^1.6.4", "v-viewer": "^1.6.4",
"vant": "^2.12.54",
"viser-vue": "^2.4.8", "viser-vue": "^2.4.8",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-area-linkage": "^5.1.0", "vue-area-linkage": "^5.1.0",
+2 -1
View File
@@ -4,7 +4,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1, user-scalable=no">
<title>蔚来全球法规平台</title> <title>蔚来全球法规平台</title>
<!--<link rel="icon" href="<%= BASE_URL %>logo.png">--> <!--<link rel="icon" href="<%= BASE_URL %>logo.png">-->
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script> <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 2.16699C1 1.89085 1.22386 1.66699 1.5 1.66699H14.5C14.7761 1.66699 15 1.89085 15 2.16699V11.8337C15 12.1098 14.7761 12.3337 14.5 12.3337H1.5C1.22386 12.3337 1 12.1098 1 11.8337V2.16699ZM2 11.3337H14V2.66699H2V11.3337Z" fill="#040B29"/>
<path d="M12 13.3337H4C4 13.8859 4.48842 14.3337 5.09091 14.3337H10.9091C11.5116 14.3337 12 13.8859 12 13.3337Z" fill="#040B29"/>
</svg>

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

+45
View File
@@ -1851,4 +1851,49 @@ module.exports = {
operationguide:'Project operation guide', operationguide:'Project operation guide',
copyLink:'Copy link', copyLink:'Copy link',
successfulReplication:'Successful replication', successfulReplication:'Successful replication',
//手机端
myCollection:'My Collection',
recentBrowsing:'Recent Browsing',
mySubscription:'My Subscription',
languageSwitching:'Language Switching',
phoneSearch:'search',
taskStatistics:'Task Statistics',
mine:'Mine',
regulatoryCertificationProcess:'Regulatory certification process',
authenticationParameterCollection:'Authentication parameter collection',
regulatoryCertificationProcessData:'Regulatory Certification Process Data',
regulationListIssuance:'Regulation list issuance',
designTheComplianceProcess:'Design the compliance process',
verifyComplianceProcess:'Verify compliance process',
thePreHomeProcess:'Pre-Home Process',
technicalAssessmentOfRegulations:'Technical Assessment Regulations',
legalOpinionCollection:'Legal Opinion Collection',
authenticationParameterCollectionData:'Authentication parameter collection data',
phoneRelatedItems:'Related items',
listHeading:'List heading',
phoneVersionNumber:'Version number',
node:'Node',
goToCheck:'View',
stored:'Stored',
individual:'a ',
document:'document',
treatmentMode:'Treatment Mode',
onlyMobilePhoneAreDisplayed:'Only the tasks that can be handled by the mobile phone are displayed',
phoneReset:'Reset',
noMore:'No More',
loading:'Loading...',
howAboutComment:'How about a comment',
send:'Send',
pleaseProcessThePC:'Please process it on the PC',
clickAndSelect:'Click and select',
phoneCreationTime:'Creation Time',
theCurrentFormatSupportPreview:'The current format does not support preview',
nearlyMonth:'Nearly a month',
nearlyThreeMonths:'Nearly Three Months',
nearlySixMonths:'Nearly Six Months',
nearlyYear:'Nearly a Year',
browsingTime:'Browsing Time',
pleaseViewOnPc:'Please view on PC',
taskHandling:'Task Handling',
} }
File diff suppressed because it is too large Load Diff
@@ -31,7 +31,7 @@
</div> </div>
</a-spin> </a-spin>
<!-- <div class='drawer-bootom-button'>--> <!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>--> <!-- <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>--> <!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>--> <!-- </div>-->
<!-- 错误数据提示--> <!-- 错误数据提示-->
+1 -1
View File
@@ -55,7 +55,7 @@
/> />
</div> </div>
<div class='drawer-bootom-button'> <div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button> <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button> <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div> </div>
</div> </div>
@@ -55,7 +55,7 @@
/> />
</div> </div>
<div class='drawer-bootom-button'> <div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button> <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button> <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div> </div>
</div> </div>
@@ -74,7 +74,7 @@
</span> </span>
</a-table> </a-table>
<div class='drawer-bootom-button'> <div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button> <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button> <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div> </div>
</div> </div>
@@ -82,7 +82,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class='drawer-bootom-button' style="margin-top: 4px"> <div class='drawer-bootom-button' style="margin-top: 4px">
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button> <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('confirm') }}</a-button> <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('confirm') }}</a-button>
</div> </div>
</div> </div>
@@ -18,7 +18,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class='drawer-bootom-button' style='margin-top: 20px'> <div class='drawer-bootom-button' style='margin-top: 20px'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button> <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button> <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div> </div>
</div> </div>
@@ -46,7 +46,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<!-- <div class='drawer-bootom-button'>--> <!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>--> <!-- <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>--> <!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>--> <!-- </div>-->
<!-- 错误数据提示--> <!-- 错误数据提示-->
@@ -46,7 +46,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<!-- <div class='drawer-bootom-button'>--> <!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>--> <!-- <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>--> <!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>--> <!-- </div>-->
<!-- 错误数据提示--> <!-- 错误数据提示-->
@@ -62,7 +62,7 @@
/> />
</div> </div>
<!-- <div class='drawer-bootom-button'>--> <!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>--> <!-- <a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>--> <!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>--> <!-- </div>-->
</div> </div>
@@ -72,7 +72,7 @@
</div> </div>
</div> </div>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -10,18 +10,18 @@
<!-- <span id="p-company">HEZHONGWEILAI</span>--> <!-- <span id="p-company">HEZHONGWEILAI</span>-->
</div> </div>
</div> </div>
<div v-if="mobile"> <!-- <div v-if="mobile">-->
<span class="top-bg"><img src="~/@assets/mobileBg.png" alt=""></span> <!-- <span class="top-bg"><img src="~/@assets/mobileBg.png" alt=""></span>-->
<span class="btm-bg"><img src="~/@assets/mobileHome.png" alt=""></span> <!-- <span class="btm-bg"><img src="~/@assets/mobileHome.png" alt=""></span>-->
</div> <!-- </div>-->
<div v-if="mobile" class="mobile"> <div v-if="mobile" class="mobile">
<div class="logo"> <div class="logo">
<img src="~@/assets/logo.png" alt=""> <img src="~@/assets/logo.png" alt="">
</div> </div>
<div class="company"> <!-- <div class="company">-->
<span>合众未来</span> <!-- <span>合众未来</span>-->
<span>HEZHONGWEILAI</span> <!-- <span>HEZHONGWEILAI</span>-->
</div> <!-- </div>-->
</div> </div>
<div class="illustration" v-if="!mobile"> <div class="illustration" v-if="!mobile">
<img src="@/assets/home.png" alt=""> <img src="@/assets/home.png" alt="">
@@ -174,7 +174,7 @@
height: 100%; height: 100%;
.mobile{ .mobile{
position: absolute; position: absolute;
top: 6rem; top: 3rem;
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
+8 -14
View File
@@ -31,18 +31,11 @@
<!-- <a-icon type="question-circle-o"></a-icon>--> <!-- <a-icon type="question-circle-o"></a-icon>-->
<!-- </a>--> <!-- </a>-->
<!-- </span>--> <!-- </span>-->
<!-- <div class="action" @click="Jumpflybook">--> <div class="action" @click="Jumpflybook">
<!-- <span class="header-notice">--> <span class="header-notice">
<!-- <a-tooltip placement="bottomRight" :title="$t('userManual')" overlayClassName="tooltipColor">--> <a-tooltip placement="bottomRight" :title="$t('userManual')" overlayClassName="tooltipColor">
<!-- <a-icon style="font-size: 16px; padding: 4px; color: #000000A6" type="question-circle"/>--> <a-icon style="font-size: 16px; padding: 4px; color: #000000A6" type="question-circle"/>
<!-- </a-tooltip>--> </a-tooltip>
<!-- </span>-->
<!-- </div>-->
<a-dropdown>
<span class="action action-full ant-dropdown-link user-dropdown-menu">
<!-- <a-avatar class="avatar" size="small" :src="getAvatar()"/>-->
<!-- <span v-if="isDesktop()">welcome,{{ userInfo().username }}</span>-->
<a-icon style="font-size: 16px; padding: 4px; color: #000000A6" type="question-circle"/>
</span> </span>
<a-menu slot="overlay" class="user-dropdown-menu-wrapper"> <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
<a-menu-item key="5" @click="Jumpflybook"> <a-menu-item key="5" @click="Jumpflybook">
@@ -231,8 +224,8 @@
hiddenClick() { hiddenClick() {
this.shows = false this.shows = false
}, },
Jumpflybook(){ Jumpflybook() {
window.open('https://eicgyqr5mc.feishu.cn/docx/doxcnY2GbQfMSMqLP0eIFzFlEcd', '_blank'); window.open('https://eicgyqr5mc.feishu.cn/docx/doxcnY2GbQfMSMqLP0eIFzFlEcd', '_blank')
}, },
Jumpoperationguide(){ Jumpoperationguide(){
window.open('https://eicgyqr5mc.feishu.cn/docx/ZyhWdIz7EoMZ68xhI2bckcWWnMg', '_blank'); window.open('https://eicgyqr5mc.feishu.cn/docx/ZyhWdIz7EoMZ68xhI2bckcWWnMg', '_blank');
@@ -401,6 +394,7 @@
.action { .action {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
font-size: 14px;
} }
.action .avatar { .action .avatar {
+82
View File
@@ -477,6 +477,88 @@ export const constantRouterMap = [
name: 'TaskPlanList', name: 'TaskPlanList',
component: () => import(/* webpackChunkName: "user" */ '@/views/projectManagement/projectStatusBoard/components/TaskPlanList') component: () => import(/* webpackChunkName: "user" */ '@/views/projectManagement/projectStatusBoard/components/TaskPlanList')
}, },
/* 手机端开始 */
//搜索
{
path: '/phoneSearch',
name: 'phoneSearch',
component: () => import('@/views/phoneView/search')
},
//待办中心
{
path: '/phoneToDoCenter',
name: 'phoneToDoCenter',
component: () => import('@/views/phoneView/toDoCenter')
},
//任务数据
{
path: '/phoneTaskData',
name: 'phoneTaskData',
component: () => import('@/views/phoneView/taskData')
},
//我的
{
path: '/phoneHome',
name: 'phoneHome',
component: () => import('@/views/phoneView/home')
},
//搜索列表
{
path: '/phoneSearchList',
name: 'phoneSearchList',
component: () => import('@/views/phoneView/searchList')
},
//文档详情
{
path: '/phoneDocumentDetails',
name: 'phoneDocumentDetails',
component: () => import('@/views/phoneView/documentDetails')
},
//流程
{
path: '/phoneProcessManagement',
name: 'phoneProcessManagement',
component: () => import('@/views/phoneView/processManagement')
},
//知识分享
{
path: '/phoneProblemKnowledgeBase',
name: 'phoneProblemKnowledgeBase',
component: () => import('@/views/phoneView/problemKnowledgeBase')
},
//办理页面
{
path: '/phoneHandlingPage',
name: 'phoneHandlingPage',
component: () => import('@/views/phoneView/handlingPage')
},
//我的收藏
{
path: '/phoneMyCollection',
name: 'phoneMyCollection',
component: () => import('@/views/phoneView/myCollection')
},
//最近预览
{
path: '/phoneRecentBrowsing',
name: 'phoneRecentBrowsing',
component: () => import('@/views/phoneView/recentBrowsing')
},
//我的订阅
{
path: '/phoneMySubscribe',
name: 'phoneMySubscribe',
component: () => import('@/views/phoneView/mySubscribe')
},
//perhome办理流程
{
path: '/phonePreHomoMangement',
name: 'phonePreHomoMangement',
component: () => import('@/views/phoneView/preHomoMangement')
},
/* 手机端结束 */
// { // {
// path:'/vehicleinformation', // path:'/vehicleinformation',
// name: 'vehicleinformation', // name: 'vehicleinformation',
+4
View File
@@ -65,12 +65,16 @@ import '@/components/JVxeCells/install'
// 挂载全局使用的方法 // 挂载全局使用的方法
import VueDraggableResizable from 'vue-draggable-resizable' import VueDraggableResizable from 'vue-draggable-resizable'
import Vant from 'vant';
import 'vant/lib/index.css';
import 'amfe-flexible/index.js'
Vue.component('vue-draggable-resizable', VueDraggableResizable) Vue.component('vue-draggable-resizable', VueDraggableResizable)
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(Storage, config.storageOptions) Vue.use(Storage, config.storageOptions)
Vue.use(Antd) Vue.use(Antd)
Vue.use(VueAxios, router) Vue.use(VueAxios, router)
Vue.use(Viser) Vue.use(Viser)
Vue.use(Vant);
Vue.use(hasPermission) Vue.use(hasPermission)
Vue.use(JDictSelectTag) Vue.use(JDictSelectTag)
Vue.use(Print) Vue.use(Print)
+50 -4
View File
@@ -10,6 +10,32 @@ import { JSEncrypt } from 'jsencrypt'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import { welcome } from '@/utils/util' import { welcome } from '@/utils/util'
// 判断当前设备
function isMobile() {
var userAgentInfo = navigator.userAgent
var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
var mobile_flag = false
//根据userAgent判断是否是手机
for (var v = 0; v < mobileAgents.length; v++) {
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
mobile_flag = true
break
}
}
var screen_width = window.screen.width
var screen_height = window.screen.height
//根据屏幕分辨率判断是否是手机
if (screen_width < 500 && screen_height < 800) {
mobile_flag = true
}
return mobile_flag
}
let mobile = isMobile()
NProgress.configure({ showSpinner: false }) // NProgress Configuration NProgress.configure({ showSpinner: false }) // NProgress Configuration
// TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码 // TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码
@@ -46,7 +72,11 @@ router.beforeEach((to, from, next) => {
store.commit('SET_AVATAR', res.result.userInfo.avatar) store.commit('SET_AVATAR', res.result.userInfo.avatar)
let fullPath = '' let fullPath = ''
if (to.fullPath == '/') { if (to.fullPath == '/') {
fullPath = INDEX_MAIN_PAGE_PATH if (mobile) {
fullPath = '/phoneSearch'
} else {
fullPath = INDEX_MAIN_PAGE_PATH
}
} else { } else {
fullPath = to.path fullPath = to.path
} }
@@ -64,7 +94,13 @@ router.beforeEach((to, from, next) => {
if (Vue.ls.get(ACCESS_TOKEN)) { if (Vue.ls.get(ACCESS_TOKEN)) {
/* has token */ /* has token */
if (to.path === '/user/login') { if (to.path === '/user/login') {
next({ path: INDEX_MAIN_PAGE_PATH }) let fullPath = ''
if (mobile) {
fullPath = '/phoneSearch'
} else {
fullPath = INDEX_MAIN_PAGE_PATH
}
next({ path: fullPath })
NProgress.done() NProgress.done()
} else { } else {
if (store.getters.permissionList.length === 0) { if (store.getters.permissionList.length === 0) {
@@ -81,7 +117,13 @@ router.beforeEach((to, from, next) => {
// 根据roles权限生成可访问的路由表 // 根据roles权限生成可访问的路由表
// 动态添加可访问路由表 // 动态添加可访问路由表
router.addRoutes(store.getters.addRouters) router.addRoutes(store.getters.addRouters)
const redirect = decodeURIComponent(from.query.redirect || to.path) let redirect = decodeURIComponent(from.query.redirect || to.path)
if (mobile) {
if (redirect == '/'){
redirect = '/phoneSearch'
}
}
if (to.path === redirect) { if (to.path === redirect) {
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
next({ ...to, replace: true }) next({ ...to, replace: true })
@@ -103,7 +145,11 @@ router.beforeEach((to, from, next) => {
let fullPath = '' let fullPath = ''
if (to.fullPath == '/') { if (to.fullPath == '/') {
fullPath = INDEX_MAIN_PAGE_PATH if (mobile) {
fullPath = '/phoneSearch'
} else {
fullPath = INDEX_MAIN_PAGE_PATH
}
} else { } else {
fullPath = to.path fullPath = to.path
} }
+20
View File
@@ -0,0 +1,20 @@
import { Base64 } from 'js-base64'
import { Toast } from 'vant'
let downLoadFileUrl = window._CONFIG['domianPreviewURL'] + '/sys/common/download'
let downLoadImgUrl = window._CONFIG['domianWebImgURL'] + '/sys/common/download'
export function kkFileView(fileName, fileId) {
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix)
window.open(url)
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadImgUrl + '/' + fileId + fileSuffix)
window.open(url)
} else {
Toast('当前格式不支持预览')
}
}
@@ -55,7 +55,7 @@
</a-table> </a-table>
</div> </div>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -97,7 +97,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}} <a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
</a-button> </a-button>
</div> </div>
@@ -56,7 +56,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -17,7 +17,7 @@
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')" <a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"
:cancelText="$t('cancel')"> :cancelText="$t('cancel')">
<a-button style="margin-right: .8rem">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px">{{$t('cancel')}}</a-button>
</a-popconfirm> </a-popconfirm>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
@@ -946,12 +946,14 @@
margin-right: 4px; margin-right: 4px;
color: #01A0AC; color: #01A0AC;
cursor: pointer; cursor: pointer;
font-size: 14px;
} }
.leftconteTdInformation-icon { .leftconteTdInformation-icon {
color: #01A0AC; color: #01A0AC;
cursor: pointer; cursor: pointer;
margin-right: 6px; margin-right: 6px;
font-size: 14px;
} }
.rightTdInformation { .rightTdInformation {
@@ -17,7 +17,7 @@
:url="url" :url="url"
/> />
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -611,7 +611,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"/> <uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"/>
@@ -159,7 +159,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -51,7 +51,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-modal> </a-modal>
@@ -41,7 +41,7 @@
</a-form> </a-form>
<!-- </a-spin>--> <!-- </a-spin>-->
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('close')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('close')}}</a-button>--> <!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('close')}}</a-button>-->
</div> </div>
</a-modal> </a-modal>
@@ -77,7 +77,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div v-show="!disableSubmit"> <div v-show="!disableSubmit">
<a-button style="margin-right: .8rem" @confirm="handleCancel">取消</a-button> <a-button style="margin-right: 8px" @confirm="handleCancel">取消</a-button>
<a-button @click="handleOk" type="primary" :loading="confirmLoading">提交</a-button> <a-button @click="handleOk" type="primary" :loading="confirmLoading">提交</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -166,7 +166,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -279,7 +279,7 @@ export default {
if (res.success) { if (res.success) {
this.confirmLoading = false this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
this.confirmLoading = false this.confirmLoading = false
@@ -64,7 +64,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -107,7 +107,7 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-modal> </a-modal>
@@ -64,7 +64,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -97,7 +97,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div> </div>
</a-modal> </a-modal>
@@ -115,7 +115,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('export')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('export')}}</a-button>
</div> </div>
</a-modal> </a-modal>
@@ -85,7 +85,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('export')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('export')}}</a-button>
</div> </div>
</a-modal> </a-modal>
@@ -102,7 +102,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -101,7 +101,7 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-modal> </a-modal>
@@ -313,7 +313,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -0,0 +1,30 @@
<template>
<div class="header">
<van-nav-bar
title="标题"
left-text="返回"
right-text="按钮"
left-arrow
@click-left="onClickLeft"
@click-right="onClickRight"
/>
</div>
</template>
<script>
export default {
name: 'header',
methods:{
onClickLeft(){
},
onClickRight(){
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,543 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{serial_number}}
</span>
</div>
<div class="header-right">
<div class="header-right-text" @click="subscribeClick">
<img v-if="subscribeFlag == '1'" src="~@/assets/icon_link_document.png" alt="">
<img v-else src="~@/assets/icon_link.png" alt="">
<span :class="{'header-right-text-color':subscribeFlag == '1'?true:false}">{{$t('subscribe')}}</span>
</div>
<div class="header-right-text" @click="collectionClick">
<img v-if="collectFlag == '1'" src="~@/assets/icon_star_document.png" alt="">
<img v-else src="~@/assets/icon_star.png" alt="">
<span :class="{'header-right-text-color':collectFlag == '1'?true:false}">{{$t('Collection')}}</span>
</div>
</div>
<van-collapse class="collapse" v-model="activeNames">
<div v-for="(item,index) in detailList">
<div v-for="val in Object.keys(item)">
<van-collapse-item v-if="val == $t('essentialInformation')" :title="val" name="1">
<div class="content-box-type-box" v-for="(ol,index1) in item[val]">
<div class="content-box-type-num" v-if="ol.field_show_type == 10">
<span class="content-box-left-num">{{ol.db_field_txt}}</span>
<span class="content-box-text-num"
v-if="!ol.list">--</span>
<span class="content-box-text-num"
v-for="valItem in ol.list"
@click="numClick(valItem)"
v-else-if="ol.list && ol.list.length > 0">
{{valItem.title}}
</span>
</div>
<div class="content-box-type-num" v-else-if="ol.field_show_type == 8">
<span class="content-box-left-num">{{ol.db_field_txt}}</span>
<span class="content-box-text-num" style="color: #040B29">
{{ol.value || '--'}}
</span>
</div>
<div class="content-box-type" v-else-if="ol.urlClick">
<span class="content-box-left">{{ol.db_field_txt}}</span>
<span class="content-box-text" style="color: #01A0AC"
@click="urlClick(ol)">{{ol.value || '--'}}</span>
</div>
<div class="content-box-type" v-else>
<span class="content-box-left">{{ol.db_field_txt}}</span>
<span class="content-box-text">{{ol.value || '--'}}</span>
</div>
</div>
</van-collapse-item>
<van-collapse-item v-else-if="val == $t('textInformation')"
:title="val" name="2">
<div class="textInformation" v-for="(ol,index1) in item[val]">
<div class="textInformationText">
{{ol.db_field_txt}}
</div>
<div v-if="ol.value && ol.value.length > 0">
<div class="textInformationFile" @click="fileClick(valItem)" v-for="valItem in ol.value">
{{valItem.fileName}}
</div>
</div>
</div>
</van-collapse-item>
</div>
</div>
<van-collapse-item :title="$t('DetailsPhasedImplementation')" name="3">
<van-list
v-model="loading"
:finished="finished"
:finished-text="$t('noMore')"
:loading-text="$t('loading')"
@load="onLoad"
>
<div class="Implementation" v-for="(item,index) in dataGrad" :key="index">
<div class="ImplementationText">{{item.standNumberOrClause}}</div>
<div class="ImplementationBox">
<div class="ImplementationBoxLeft">
{{item.implementationTypeText}}
</div>
<div class="ImplementationBoxRight">
{{item.implementationDate}}
</div>
</div>
<div class="ImplementationButtom">
{{item.remarks}}
</div>
</div>
</van-list>
</van-collapse-item>
</van-collapse>
<van-overlay :show="show">
<van-loading type="spinner">{{textLoading}}</van-loading>
</van-overlay>
</div>
</template>
<script>
import { getAction, postAction, downFile } from '@/api/manage'
import { kkFileView } from '@/utils/kkfileView'
import eventBUs from '../../common/event'
import { Toast } from 'vant'
export default {
name: 'phoneDocumentDetails',
data() {
return {
activeNames: ['1', '2', '3'],
url: {
getInfo: 'document/bussDocumentLibraryEO/getInfoById',
list: 'log/bussLogEO/page',
getTitle: '/document/bussDocumentLibraryEO/getTitle',
getPage: '/document/phasedImplementationDetailsEO/page',
getMenuList: 'document/bussDocumentLibraryEO/getMenuList'
},
show: false,
serial_number: '',
detailList: [],
loading: false,
finished: false,
pageNo: 0,
dataGrad: [],
textLoading: this.$t('loading'),
collectFlag: 0,
subscribeFlag: 0
}
},
mounted() {
document.title = 'NIO GRP'
let _this = this
this.getWdkCollectAndSubscribeInfoByUser()
this.getTitle(function() {
_this.getInfoById()
})
},
watch: {
'$route': function(res) {
let _this = this
this.getWdkCollectAndSubscribeInfoByUser()
this.getTitle(function() {
_this.getInfoById()
})
}
},
methods: {
iconClick() {
if (this.$route.query.goRouter) {
this.$router.push({
path: this.$route.query.goRouter,
query: {
searchValue: this.$route.query.searchValue,
activeTab: this.$route.query.activeTab
}
})
} else {
this.$router.go(-1)
}
},
getWdkCollectAndSubscribeInfoByUser() {
getAction('/phone/search/getWdkCollectAndSubscribeInfoByUser', { id: this.$route.query.id }).then((res) => {
if (res.success) {
if (res.result.subscribeList && res.result.subscribeList.length > 0) {
this.subscribeFlag = '1'
} else {
this.subscribeFlag = '0'
}
if (res.result.collectionList && res.result.collectionList.length > 0) {
this.collectFlag = '1'
} else {
this.collectFlag = '0'
}
}
})
},
getTitle(callback) {
this.show = true
let _id = this.$route.query.id
getAction(this.url.getTitle, { id: _id }).then((res) => {
if (res.success) {
this.serial_number = res.result
callback && callback()
} else {
this.serial_number = ''
}
})
},
getInfoById() {
let _id = this.$route.query.id
getAction(this.url.getInfo, { id: _id }).then((res) => {
if (res.success) {
this.detailList = res.result
this.show = false
} else {
this.detailList = []
}
})
},
collectionClick() {
let url = ''
if (this.collectFlag == 0 || !this.collectFlag) {
url = 'document/bussDocumentLibraryEO/addCollect'
} else {
url = 'document/bussDocumentLibraryEO/cancelCollect'
}
getAction(url, { id: this.$route.query.id }).then((res) => {
if (res.success) {
Toast(this.$t('OperationSuccessful'))
this.getWdkCollectAndSubscribeInfoByUser()
} else {
Toast(this.$t('operationFailed'))
}
})
},
subscribeClick() {
let url = ''
if (this.subscribeFlag == 0 || !this.subscribeFlag) {
url = 'document/bussDocumentLibraryEO/addSubscribe'
} else {
url = 'document/bussDocumentLibraryEO/cancelSubscribe'
}
getAction(url, { id: this.$route.query.id }).then((res) => {
if (res.success) {
Toast(this.$t('OperationSuccessful'))
this.getWdkCollectAndSubscribeInfoByUser()
} else {
Toast(this.$t('operationFailed'))
}
})
},
getPage() {
let query = {
pageNo: this.pageNo,
pageSize: 10,
bussDocumentLibraryId: this.$route.query.id
}
getAction(this.url.getPage, query).then((res) => {
if (res.success) {
if (res.result.records.length > 0 && this.pageNo > 1) {
this.dataGrad = this.dataGrad.concat(res.result.records)
} else if (res.result.records.length > 0 && this.pageNo == 1) {
this.dataGrad = res.result.records
} else if (res.result.records.length == 0) {
this.finished = true
}
this.loading = false
} else {
this.dataGrad = []
}
})
},
onLoad() {
if (this.finished) {
this.dataGrad = []
this.finished = false
} else {
this.pageNo++
this.getPage()
}
},
fileClick(item) {
kkFileView(item.fileName, item.id)
},
urlClick(item) {
window.open(item.value)
},
numClick(item) {
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.id
}
})
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.fixed {
/*position: fixed;*/
/*top: 0;*/
/*left: 0;*/
/*width: 100%;*/
/*z-index: 1000;*/
/*background: #fff;*/
/*padding-top: 0.4rem;*/
}
.header-search {
/*padding-left: 0.4rem;*/
/*padding-right: 0.4rem;*/
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.header-right {
margin-top: 0.4rem;
display: flex;
justify-content: flex-end;
}
.header-right-text {
display: flex;
align-items: center;
margin-right: 0.4rem;
}
.header-right-text:last-child {
margin-right: 0.1rem;
}
.header-right-text img {
width: 0.4rem;
}
.header-right-text span {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
margin-left: 0.1rem;
}
.collapse {
margin-top: 0.6rem;
}
::v-deep .van-cell {
padding: 0;
}
::v-deep .van-cell::after {
border-bottom: none;
}
::v-deep .van-collapse-item--border::after {
border-top: none;
}
::v-deep .van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
border-width: 0;
}
::v-deep .van-cell__title span {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
}
::v-deep .collapse .van-icon {
font-size: 0.44rem;
color: #040B29;
}
::v-deep .van-collapse-item {
margin-bottom: 0.6rem;
}
.content-box-type-box {
margin-top: 0.08rem;
margin-bottom: 0.4rem;
}
.content-box-type {
display: flex;
}
.content-box-type-box:last-child {
margin-bottom: 0.1rem;
}
.content-box-left {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
flex: auto;
min-width: 2rem;
}
.content-box-left-num {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
width: 100%;
flex: none;
}
.content-box-text-num {
text-align: left;
width: 100%;
margin-top: 0.2rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #01A0AC;
word-break: break-all;
flex: none;
display: inline-block;
}
.content-box-text {
text-align: right;
margin-left: 0.3rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
::v-deep .van-collapse-item__content {
padding: 0.5rem 0;
}
.textInformation {
padding: 0.2rem 0 0 0;
}
.textInformationText {
margin-bottom: 0.5rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.textInformationFile {
margin-bottom: 0.3rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #01A0AC;
word-break: break-all;
}
.Implementation {
width: 100%;
padding: 0.2rem 0 0.3rem 0;
border-bottom: 1px solid #E6E7EC;
margin-bottom: 0.2rem;
}
.ImplementationText {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.ImplementationBox {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 0.2rem;
margin-bottom: 0.2rem;
}
.ImplementationBoxLeft {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
}
.ImplementationBoxRight {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
}
.ImplementationButtom {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #41475E;
word-break: break-all;
}
::v-deep .van-loading {
color: #fff;
font-size: 0.36rem;
}
::v-deep .van-loading__text {
color: #fff;
font-size: 0.46rem;
}
::v-deep .van-overlay {
z-index: 1001;
text-align: center;
line-height: 30;
display: flex;
align-items: center;
justify-content: center;
}
.header-right-text-color {
color: #01A0AC !important;
}
</style>
@@ -0,0 +1,211 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{$route.query.projectName + ' ' + $t('preHomoFlow')}}
</span>
</div>
<div class="content">
<van-list
v-model="loading"
:finished="finished"
:finished-text="$t('noMore')"
:loading-text="$t('loading')"
@load="onLoad"
>
<div class="content-text" @click="handlingClick(item)" v-for="(item,index) in list">
<div class="content-text-left">
<div class="content-text-top">
<span class="content-text-top-left">
{{item.category}}
</span>
<span class="content-text-top-right">
{{item.inspectionItem}}
</span>
</div>
<div class="content-text-button">
<span>{{item.serialNumber}}</span>
</div>
</div>
<div class="content-text-right">
<van-icon name="arrow"/>
</div>
</div>
</van-list>
</div>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
export default {
name: 'phoneHandlingPage',
data() {
return {
page: '/phone/toDoCenter/queryPreHomoPage',
list: [],
pageNo: 0,
pageSize: 10,
loading: false,
finished: false,
isDisplay:false,
}
},
mounted() {
document.title = 'NIO GRP'
this.isDisplay = JSON.parse(this.$route.query.isDisplay)
},
methods: {
iconClick() {
if (this.$route.query.goRouter) {
this.$router.push({
path: this.$route.query.goRouter,
query: {
searchValue: this.$route.query.searchValue,
activeTab: this.$route.query.activeTab
}
})
} else {
this.$router.go(-1)
}
},
handlingClick(item) {
this.$router.push({
path: '/phonePreHomoMangement',
query: {
taskDefinitionKey: this.$route.query.taskDefinitionKey,
projectName:this.$route.query.projectName,
id: item.id,
isDisplay:this.isDisplay
}
})
},
onLoad() {
if (this.finished) {
this.list = []
this.finished = false
} else {
this.pageNo++
this.getPage()
}
},
getPage() {
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
taskDefinitionKey: this.$route.query.taskDefinitionKey,
projectLibraryId: this.$route.query.projectLibraryId
}
getAction(this.page, params).then(res => {
if (res.success) {
if (res.result.records.length > 0 && this.pageNo > 1) {
this.list = this.list.concat(res.result.records)
} else if (res.result.records.length > 0 && this.pageNo == 1) {
this.list = res.result.records
} else if (res.result.records.length == 0) {
this.finished = true
}
this.loading = false
} else {
this.subscribeList = []
}
})
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.header-search {
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content {
margin-top: 0.36rem;
}
.content-text {
padding: 0.3rem 0;
box-sizing: border-box;
display: flex;
align-items: center;
border-bottom: 0.02rem solid #E6E7EC;
}
.content-text-left {
width: calc(100% - 1rem);
}
.content-text-right {
width: 1rem;
text-align: right;
}
.content-text-top {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.content-text-button {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
margin-top: 0.13rem;
}
.content-text-right .van-icon {
font-size: 0.5rem;
color: #040B29;
}
.content-text-top-right {
margin-left: 0.3rem;
}
.content-text-top-left {
word-break: break-all;
}
.content-text-top-right {
word-break: break-all;
}
</style>
+284
View File
@@ -0,0 +1,284 @@
<template>
<div class="box">
<div class="box-header">
<div class="img-header">
<img src="~@/assets/logoOne.png" alt="">
</div>
</div>
<div class="name-header">
{{user.username}}
</div>
<div class="eamil-header">
{{user.email}}
</div>
<div class="content-box-top" @click="recentBrowsingClick">
<img src="~@/assets/icon_eye.png" class="content-box-img" alt="">
<span class="content-box-text">
{{$t('recentBrowsing')}}
</span>
<van-icon class="icon" name="arrow"/>
</div>
<div class="content-box" @click="collectionClick">
<img src="~@/assets/icon_star.png" class="content-box-img" alt="">
<span class="content-box-text">
{{$t('myCollection')}}
</span>
<van-icon class="icon" name="arrow"/>
</div>
<div class="content-box" @click="subscribeClick">
<img src="~@/assets/icon_link.png" class="content-box-img" alt="">
<span class="content-box-text">
{{$t('mySubscription')}}
</span>
<van-icon class="icon" name="arrow"/>
</div>
<!-- <div class="content-box">-->
<!-- <img src="~@/assets/icon_assign.png" class="content-box-img" alt="">-->
<!-- <span class="content-box-text">-->
<!-- 退出登录-->
<!-- </span>-->
<!-- <van-icon class="icon" name="arrow"/>-->
<!-- </div>-->
<div class="content-box">
<img src="~@/assets/yuyan.png" class="content-box-img" alt="">
<span class="content-box-text-one">
{{$t('languageSwitching')}}
</span>
<span class="lang" v-if="checked">En</span>
<span class="lang" v-else>中文</span>
<van-switch @change="checkedChange" :loading="isLoading" v-model="checked"/>
</div>
<van-tabbar v-model="active" @change="onChange">
<van-tabbar-item name="search" icon="search">{{$t('phoneSearch')}}</van-tabbar-item>
<van-tabbar-item name="toDoCenter" icon="bell">{{$t('todocenter')}}</van-tabbar-item>
<van-tabbar-item name="taskData" icon="underway">{{$t('taskStatistics')}}</van-tabbar-item>
<van-tabbar-item name="home" icon="manager">{{$t('mine')}}</van-tabbar-item>
</van-tabbar>
</div>
</template>
<script>
import Vue from 'vue'
import store from '../../store'
import router, { resetRouter } from '../../router'
import moment from 'moment'
import { mapActions, mapGetters, mapState } from 'vuex'
import { getFileAccessHttpUrl, getAction } from '@/api/manage'
import enUS from 'ant-design-vue/lib/locale/en_US'
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import { UI_CACHE_DB_DICT_DATA, ACCESS_TOKEN } from '@/store/mutation-types'
import { generateIndexRouter } from '@/utils/util'
moment.locale('zh-cn')
const EN = 'en-us'
const ZH = 'zh-cn'
export default {
name: 'phoneHome',
data() {
return {
active: 'home',
checked: localStorage.getItem('language') == 'en-us' ? true : false,
isLoading: false,
user: {}
}
},
mounted() {
document.title = 'NIO GRP'
this.user = this.userInfo()
},
methods: {
...mapGetters(['userInfo']),
onChange(value) {
if (value == 'toDoCenter') {
this.$router.push({
path: '/phoneToDoCenter'
})
} else if (value == 'taskData') {
this.$router.push({
path: '/phoneTaskData'
})
} else if (value == 'search') {
this.$router.push({
path: '/phoneSearch'
})
}
},
subscribeClick() {
this.$router.push({
path: '/phoneMySubscribe'
})
},
collectionClick() {
this.$router.push({
path: '/phoneMyCollection'
})
},
recentBrowsingClick() {
this.$router.push({
path: '/phoneRecentBrowsing'
})
},
checkedChange(value) {
if (value) {
this.changeLocale('en-us')
} else {
this.changeLocale('zh-cn')
}
},
changeLocale(localeval) {
this.isLoading = true
switch (localeval) {
case 'zh-cn':
localStorage.setItem('language', 'zh-cn')
break
case 'en-us':
localStorage.setItem('language', 'en-us')
break
}
getAction('/sys/dict/queryAllDictItemsByCut', {}).then((res) => {
if (res.success) {
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
store.dispatch('GetPermissionList').then(res => {
const menuData = res.result.menu
resetRouter()
let constRoutes = []
constRoutes = generateIndexRouter(menuData)
router.addRoutes(constRoutes)
this.$root.Bus.$emit('switchLanguage', localeval)
this.isLoading = false
this.localeval = localeval
if (localeval === EN) {
moment.locale(EN)
this.$i18n.locale = EN
this.locale = enUS
} else {
moment.locale(ZH)
this.$i18n.locale = ZH
this.locale = zhCN
}
})
}
})
}
}
}
</script>
<style scoped>
::v-deep .van-tabbar-item--active {
color: #00B3BE;
}
.box {
padding: 0.4rem;
}
.box-header {
padding-top: 0.8rem;
text-align: center;
display: flex;
justify-content: center;
}
.img-header {
width: 3rem;
height: 3rem;
border-radius: 50%;
background: #D9D9D9;
line-height: 3rem;
text-align: center;
}
.name-header {
font-size: 0.4rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
text-align: center;
margin-top: 0.5rem;
}
.eamil-header {
font-size: 0.36rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #595E72;
text-align: center;
margin-top: 0.2rem;
}
.content-box-top {
border-top: 1px solid #E6E7EC;
margin-top: 0.8rem;
height: 1.6rem;
border-bottom: 1px solid #E6E7EC;
display: flex;
align-items: center;
}
.content-box {
height: 1.6rem;
border-bottom: 1px solid #E6E7EC;
display: flex;
align-items: center;
}
.content-box-img {
width: 0.52rem;
}
.content-box-text {
font-size: 0.4rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
width: calc(100% - 0.9rem);
}
.content-box-text-one {
font-size: 0.4rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
width: calc(100% - 1.8rem);
}
.icon {
font-size: 0.46rem;
font-weight: 500;
color: #040B29;
}
::v-deep .van-switch {
background-color: #BBBDC7;
height: 0.6rem;
width: 1.4rem;
}
::v-deep .van-switch__node {
width: 0.6rem;
height: 0.6rem;
}
::v-deep .van-switch--on {
background-color: #00B3BE;
}
::v-deep .van-switch--on .van-switch__node {
transform: translateX(0.56rem)
}
.lang {
font-size: 0.36rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
display: inline-block;
width: 1rem;
margin-right: 0.2rem;
}
</style>
@@ -0,0 +1,324 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{$t('myCollection')}}
</span>
</div>
<van-tabs v-model="activeTab" @change="activeChange">
<van-tab name="documentLibrary" :title="$t('DocumentLibrary')"></van-tab>
<van-tab name="problemKnowledgeBase" :title="$t('problemKnowledgeBase')"></van-tab>
</van-tabs>
<div class="content" v-if="activeTab == 'documentLibrary'">
<van-list
v-model="loading"
:finished="finished"
:finished-text="$t('noMore')"
:loading-text="$t('loading')"
@load="onLoad"
>
<div class="content-text" @click="collectionClick(item)" v-for="(item,index) in collectionList" :key="index">
<div class="content-text-left">
<div class="content-text-top">
<span class="content-text-top-left">
{{item.serialNumber}}
</span>
</div>
<div class="content-text-button">
<span> {{item.title}}</span>
</div>
</div>
<div class="content-text-right">
<van-icon name="arrow"/>
</div>
</div>
</van-list>
</div>
<div class="content" v-else-if="activeTab == 'problemKnowledgeBase'">
<van-list
v-model="problemLoading"
:finished="problemFinished"
:finished-text="$t('noMore')"
:loading-text="$t('loading')"
@load="problemOnLoad"
>
<div class="content-text" @click="problemKnowledgeBaseClick(item)" v-for="(item,index) in problemList"
:key="index">
<div class="content-text-left">
<!-- <div class="content-text-top">-->
<!-- <span class="content-text-top-left">-->
<!-- {{item.serialNumber}}-->
<!-- </span>-->
<!-- </div>-->
<div class="content-text-button">
<span> {{item.title}}</span>
</div>
</div>
<div class="content-text-right">
<van-icon name="arrow"/>
</div>
</div>
</van-list>
</div>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
export default {
name: 'phoneMyCollection',
data() {
return {
collectionList: [],
pageNo: 0,
pageSize: 10,
loading: false,
finished: false,
activeTab: 'documentLibrary',
problemList: [],
problemLoading: false,
problemFinished: false,
problemPageNo: 1,
url: {
documentLibraryUrl: 'collection/onlCgformCollection/page',
problemKnowledgeBaseUrl: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/queryCollectPageList'
}
}
},
mounted() {
document.title = 'NIO GRP'
// this.getCollection()
},
methods: {
iconClick() {
this.$router.go(-1)
},
activeChange() {
if (this.activeTab == 'documentLibrary') {
this.loading = true
this.collectionList = []
this.finished = false
this.pageNo = 1
this.getCollection()
} else if (this.activeTab == 'problemKnowledgeBase') {
this.problemLoading = true
this.problemList = []
this.problemFinished = false
this.problemPageNo = 1
this.getProblem()
}
},
onLoad() {
if (this.finished) {
this.collectionList = []
this.finished = false
} else {
this.pageNo++
this.getCollection()
}
},
problemOnLoad() {
if (this.problemFinished) {
this.problemList = []
this.problemFinished = false
} else {
this.problemPageNo++
this.getProblem()
}
},
getProblem() {
let params = {
pageNo: this.problemPageNo,
pageSize: 10
}
getAction(this.url.problemKnowledgeBaseUrl, params).then(res => {
if (res.success) {
let result = res.result ? res.result.records : []
if (result.length > 0 && this.problemPageNo > 1) {
this.problemList = this.problemList.concat(result)
} else if (result.length > 0 && this.problemPageNo == 1) {
this.problemList = result
} else if (result.length == 0) {
this.problemFinished = true
}
this.problemLoading = false
} else {
this.problemList = []
}
})
},
getCollection() {
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
postAction(this.url.documentLibraryUrl, params).then(res => {
if (res.success) {
let result = res.result ? res.result.records : []
if (result.length > 0 && this.pageNo > 1) {
this.collectionList = this.collectionList.concat(result)
} else if (result.length > 0 && this.pageNo == 1) {
this.collectionList = result
} else if (result.length == 0) {
this.finished = true
}
this.loading = false
} else {
this.collectionList = []
}
})
},
recentBrowseAdd(browseType, id) {
let query = {
browseType: browseType,
browseDataId: id
}
postAction('/phone/recentBrowse/add', query).then((res) => {
})
},
collectionClick(item) {
this.recentBrowseAdd('Document Library', item.documentId)
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.documentId
}
})
},
problemKnowledgeBaseClick(item) {
this.recentBrowseAdd('Knowledge sharing', item.id)
this.$router.push({
path: '/phoneProblemKnowledgeBase',
query: {
id: item.id
}
})
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
::v-deep .van-tabbar-item--active {
color: #00B3BE;
}
.header-search {
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content {
margin-top: 0.26rem;
}
.content-text {
padding: 0.3rem 0;
box-sizing: border-box;
display: flex;
align-items: center;
border-bottom: 0.02rem solid #E6E7EC;
}
.content-text-left {
width: calc(100% - 1rem);
}
.content-text-right {
width: 1rem;
text-align: right;
}
.content-text-top {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.content-text-button {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
margin-top: 0.13rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content-text-right .van-icon {
font-size: 0.5rem;
color: #040B29;
}
.content-text-top-right {
margin-left: 0.3rem;
}
::v-deep .van-tab {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
flex: none;
margin-right: 0.2rem;
}
::v-deep .van-tab--active {
font-size: 0.38rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
}
::v-deep .van-tabs {
margin-top: 0.36rem;
}
::v-deep .van-tabs__line {
background-color: #00B3BE;
}
</style>
@@ -0,0 +1,203 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{$t('mySubscription')}}
</span>
</div>
<div class="content">
<van-list
v-model="loading"
:finished="finished"
:finished-text="$t('noMore')"
:loading-text="$t('loading')"
@load="onLoad"
>
<div class="content-text" @click="collectionClick(item)" v-for="(item,index) in subscribeList" :key="index">
<div class="content-text-left">
<div class="content-text-top">
<span class="content-text-top-left">
{{item.serialNumber}}
</span>
<!-- <span class="content-text-top-right">-->
<!-- 测试检验项目-->
<!-- </span>-->
</div>
<div class="content-text-button">
<span>{{item.title}}</span>
</div>
</div>
<div class="content-text-right">
<van-icon name="arrow"/>
</div>
</div>
</van-list>
</div>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
export default {
name: 'phoneMySubscribe',
data() {
return {
subscribeList: [],
pageNo: 0,
pageSize: 10,
loading: false,
finished: false
}
},
mounted() {
document.title = 'NIO GRP'
// this.getSubscribe()
},
methods: {
iconClick() {
this.$router.go(-1)
},
onLoad() {
if (this.finished) {
this.subscribeList = []
this.finished = false
} else {
this.pageNo++
this.getSubscribe()
}
},
getSubscribe() {
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
postAction(`subscribe/onlCgformSubscribe/page`, params).then(res => {
if (res.success) {
if (res.result.records.length > 0 && this.pageNo > 1) {
this.subscribeList = this.subscribeList.concat(res.result.records)
} else if (res.result.records.length > 0 && this.pageNo == 1) {
this.subscribeList = res.result.records
} else if (res.result.records.length == 0) {
this.finished = true
}
this.loading = false
} else {
this.subscribeList = []
}
})
},
recentBrowseAdd(browseType, id) {
let query = {
browseType: browseType,
browseDataId: id
}
postAction('/phone/recentBrowse/add', query).then((res) => {
})
},
collectionClick(item) {
this.recentBrowseAdd('Document Library', item.documentId)
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.documentId
}
})
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.header-search {
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content {
margin-top: 0.36rem;
}
.content-text {
padding: 0.3rem 0;
box-sizing: border-box;
display: flex;
align-items: center;
border-bottom: 0.02rem solid #E6E7EC;
}
.content-text-left {
width: calc(100% - 1rem);
}
.content-text-right {
width: 1rem;
text-align: right;
}
.content-text-top {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.content-text-button {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
margin-top: 0.13rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content-text-right .van-icon {
font-size: 0.5rem;
color: #040B29;
}
.content-text-top-right {
margin-left: 0.3rem;
}
</style>
@@ -0,0 +1,943 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{$route.query.projectName + ' ' + $t('preHomoFlow')}}
</span>
</div>
<van-collapse class="collapse" v-model="activeNames">
<van-collapse-item :title="$t('essentialInformation')" name="1">
<div class="content-box-type">
<span class="content-box-left">{{$t('category')}}</span>
<span class="content-box-text">{{queryForm.category || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('inspectionItems')}}</span>
<span class="content-box-text">{{queryForm.inspectionItem || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('configurationItem')}}</span>
<span class="content-box-text">{{queryForm.configItem || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">WVTA ID</span>
<span class="content-box-text">{{queryForm.wvtaId || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('standardNo')}}</span>
<span class="content-box-text content-box-text-color"
@click="standardClick(queryForm)">{{queryForm.serialNumber || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('areaOfResponsibility')}}</span>
<span class="content-box-text">{{queryForm.dutyTerritoryName || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('engineeringInterfacePerson')}}</span>
<span class="content-box-text">{{queryForm.sdtName || '--'}}</span>
</div>
</van-collapse-item>
<van-collapse-item :title="$t('TaskRequirements')" name="2">
<div class="content-box-type">
<span class="content-box-left">{{$t('personLiable')}}</span>
<span class="content-box-text">{{queryForm.dutyPersonName || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('cutoffTime')}}</span>
<span class="content-box-text">{{queryForm.endTime || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('typeOfDeliverables')}}</span>
<span class="content-box-text">{{queryForm.deliverableTypeName || '--'}}</span>
</div>
<div class="content-box-type-text">
{{$t('deliverableTemplate')}}
</div>
<div class="content-box-type-text-one"
style="color: #040B29"
v-if="dataSourceFile && dataSourceFile.length == 0">
--
</div>
<div class="content-box-type-text-one"
v-else
@click="deliverablesResultFileClick(item)"
v-for="item in dataSourceFile">
{{item.fileName}}
</div>
<!-- <div class="content-box-type-text">-->
<!-- {{$t('descriptionDeliverables')}}-->
<!-- </div>-->
<!-- <div class="content-box-type-text-Two">-->
<!-- {{queryProject[queryData.remarks] || '&#45;&#45;'}}-->
<!-- </div>-->
</van-collapse-item>
<van-collapse-item v-if="queryForm.deliveryResult"
:title="$t('DeliverablesResult')" name="3">
<!-- v-for="item in deliverablesResultFile"-->
<!-- {{item.fileName}}-->
<div class="content-box-type-text-one"
v-if="queryForm.valueType == 'file'"
v-for="item in deliveryResultList"
@click="deliverablesResultFileClick(item)">
{{item.fileName}}
</div>
<div class="content-box-type-text-one-select"
v-if="queryForm.valueType == 'select'">
{{queryForm.deliveryResult == '1' ? $t('yes') :$t('not')}}
</div>
<div class="content-box-type-text-one-select"
v-if="queryForm.valueType == 'text'">
{{queryForm.deliveryResult}}
</div>
</van-collapse-item>
<van-collapse-item :title="$t('taskHandling')" v-if="!isDisplay" name="4">
<van-form @submit="onSubmit" ref="form">
<div class="resultofhandlingClass"
v-if="$route.query.taskDefinitionKey == 'Task Review' ||
$route.query.taskDefinitionKey == 'Task responsibility confirmation' ||
($route.query.taskDefinitionKey == 'Task handling' && (queryForm.valueType == 'file' ||
queryForm.valueType == 'text' || queryForm.valueType == 'select'))"
style="margin-bottom: 0.1rem">
<span>{{$t('resultofhandling')}}</span>
<span class="requiredClass"
v-if="$route.query.taskDefinitionKey == 'Task Review' ||
$route.query.taskDefinitionKey == 'Task responsibility confirmation'">
*</span>
</div>
<van-field name="disposeResult"
class="uploader"
v-if="$route.query.taskDefinitionKey == 'Task Review' ||
$route.query.taskDefinitionKey == 'Task responsibility confirmation'"
:rules="[{ required: true, message: $t('resultofhandling') + $t('cannotEmpty') }]">
<template #input>
<van-radio-group @change="disposeResultChange" v-model="form.disposeResult" direction="horizontal">
<van-radio name="rzgcssc_tg" v-if="$route.query.taskDefinitionKey == 'Task Review'">
{{$t('reviewAndPass')}}
</van-radio>
<van-radio name="rzgcssc_th" v-if="$route.query.taskDefinitionKey == 'Task Review'">
{{$t('reviewAndReturn')}}
</van-radio>
<van-radio name="zrrjsrw" v-if="$route.query.taskDefinitionKey == 'Task responsibility confirmation'">
{{$t('missionAccepted')}}
</van-radio>
<van-radio name="zrrjjrw" v-if="$route.query.taskDefinitionKey == 'Task responsibility confirmation'">
{{$t('missionRejection')}}
</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="form.disposeResult == 'rzgcssc_tg'"
v-model.trim="form.reportNumber"
rows="4"
name="reportNumber"
class="textarea"
autosize
:label="$t('reportNo')"
maxlength="200"
:placeholder="$t('pleaseEnter')+$t('reportNo')"
/>
<van-field
v-if="form.disposeResult == 'rzgcssc_tg'"
v-model.trim="form.productModel"
rows="4"
name="productModel"
class="textarea"
autosize
:label="$t('productModel')"
maxlength="200"
:placeholder="$t('pleaseEnter')+$t('productModel')"
/>
<van-field
v-if="form.disposeResult == 'rzgcssc_tg'"
v-model.trim="form.productionEnterpriseName"
rows="4"
class="textarea productionEnterpriseName"
autosize
name="productionEnterpriseName"
:label="$t('nameOfManufacturer')"
maxlength="200"
:placeholder="$t('pleaseEnter')+$t('nameOfManufacturer')"
/>
<div class="resultofhandlingClass"
v-if="form.disposeResult == 'rzgcssc_th' || form.disposeResult == 'zrrjjrw'">
<span>{{$t('feedback')}}</span>
<span class="requiredClass">*</span>
</div>
<van-field
v-if="form.disposeResult == 'rzgcssc_th' || form.disposeResult == 'zrrjjrw'"
v-model.trim="form.reasonForReturn"
rows="4"
name="reasonForReturn"
class="textarea"
autosize
:show-error="false"
:rules="[{ required: true, message: $t('feedbackMessage') + $t('cannotEmpty') }]"
maxlength="200"
type="textarea"
:placeholder="$t('pleaseEnter')+$t('feedbackMessage')"
/>
<div v-if="$route.query.taskDefinitionKey == 'Task handling'">
<div class="resultofhandlingClass">
<span>{{$t('DeliverablesResult')}}</span>
<span class="requiredClass">*</span>
</div>
<van-field name="uploader" class="uploader"
:rules="[{ required: true, message: $t('DeliverablesResult') + $t('cannotEmpty') }]"
v-if="queryForm.valueType == 'file'">
<template #input>
<van-uploader :preview-image="false"
accept="*"
v-model="form.deliveryResult"
:after-read="upload"
class="uploader-button">
<van-button icon="back-top" type="primary">{{$t('upload1')}}</van-button>
</van-uploader>
</template>
</van-field>
<van-field
v-else-if="queryForm.valueType == 'text'"
:rules="[{ required: true, message: $t('DeliverablesResult') + $t('cannotEmpty') }]"
v-model.trim="form.deliveryResult"
rows="4"
class="textarea"
autosize
:show-error="false"
maxlength="200"
:placeholder="$t('pleaseEnter')+$t('DeliverablesResult')"
/>
<van-field name="disposeResult"
class="uploader"
v-else-if="queryForm.valueType == 'select'"
:rules="[{ required: true, message: $t('DeliverablesResult') + $t('cannotEmpty') }]">
<template #input>
<van-radio-group v-model="form.deliveryResult" direction="horizontal">
<van-radio name="1">
{{$t('yes')}}
</van-radio>
<van-radio name="2">
{{$t('not')}}
</van-radio>
</van-radio-group>
</template>
</van-field>
<div class="file-list"
v-for="(item,index) in fileList"
:key="index">
<span class="file-text">{{item.fileName}}
<van-icon class="file-text-icon" name="passed"/>
</span>
<a-icon @click="fileClick(index)" class="icon-text" type="delete"/>
</div>
</div>
<van-button class="submitButton"
round
block
type="info"
native-type="submit">{{$t('submit')}}
</van-button>
</van-form>
</van-collapse-item>
</van-collapse>
<van-overlay :show="show">
<van-loading type="spinner">{{textLoading}}</van-loading>
</van-overlay>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { Dialog, Toast } from 'vant'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { kkFileView } from '@/utils/kkfileView'
import axios from 'axios'
export default {
name: 'phonePreHomoMangement',
data() {
return {
activeNames: ['1', '2', '3', '4'],
fileList: [],
show: false,
textLoading: this.$t('loading'),
queryForm: {},
queryData: {},
form: {},
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
queryProject: {},
dataSourceFile: [],
deliverablesResultFile: [],
deliveryResultList: [],
isDisplay: false,
url: {
queryProjectCertificationInventoryById: '/phone/toDoCenter/queryProjectCertificationInventoryById',
saveBatch: '/project/projectCertificationInventoryEO/saveBatch'
}
}
},
mounted() {
document.title = 'NIO GRP'
this.isDisplay = JSON.parse(this.$route.query.isDisplay)
this.getData()
},
methods: {
iconClick() {
this.$router.go(-1)
},
getFileInfos(item) {
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
this.deliveryResultList = res.result
this.fileList = []
this.form.deliveryResult = []
this.deliveryResultList.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
this.fileList.push({
id: val.id,
fileName: val.fileName
})
})
this.form.deliveryResult = this.fileList
} else {
this.deliveryResultList = []
}
})
},
getDeliveryResult(item) {
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
} else {
this.dataSourceFile = []
}
})
},
disposeResultChange(value) {
if (value == 'rzgcssc_tg') {
this.form.reasonForReturn = ''
} else if (value == 'rzgcssc_th') {
this.form.productionEnterpriseName = ''
this.form.productModel = ''
this.form.reportNumber = ''
} else if (value == 'zrrjsrw') {
this.form.reasonForReturn = ''
} else if (value == 'zrrjjrw') {
this.form.reasonForReturn = ''
}
this.$nextTick(() => {
this.form = { ...this.form }
})
},
onSubmit() {
this.$refs.form.validate().then(() => {
this.textLoading = this.$t('Submitting')
this.show = true
if (this.$route.query.taskDefinitionKey == 'Task Review') {
if (this.form.disposeResult == 'rzgcssc_tg') {
this.preservationClick()
} else {
this.ApprovedClick()
}
} else if (this.$route.query.taskDefinitionKey == 'Task handling') {
this.submitPreservation()
} else if (this.$route.query.taskDefinitionKey == 'Task responsibility confirmation') {
this.ApprovedClick()
}
})
},
submitClick() {
let query = {
'nodeKey': 'zrrtjrw',
'projectLibraryId': this.queryForm.projectLibraryId,
'ids': this.queryForm.id
}
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
if (res.success) {
Toast(this.$t('OperationSuccessful'))
this.$router.go(-1)
this.show = false
} else {
Toast(this.$t('operationFailed'))
}
})
},
submitPreservation() {
let content = []
let fileListId = []
let form = JSON.parse(JSON.stringify(this.form))
if (this.queryForm.valueType == 'file') {
this.fileList.forEach(res => {
fileListId.push(res.id)
})
form.deliveryResult = fileListId.join(',')
}
content[0] = Object.assign(this.queryForm, form)
postAction(this.url.saveBatch, { 'dataList': content }).then((res) => {
if (res.success) {
this.submitClick()
}
})
},
ApprovedClick() {
let query = {
'nodeKey': this.form.disposeResult,
'projectLibraryId': this.queryForm.projectLibraryId,
'ids': this.queryForm.id,
reasonForReturn: this.form.reasonForReturn
}
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
if (res.success) {
Toast(this.$t('OperationSuccessful'))
this.$router.go(-1)
this.show = false
} else {
Toast(this.$t('operationFailed'))
}
})
},
//保存
preservationClick() {
let content = []
content[0] = Object.assign(this.queryForm, this.form)
postAction(this.url.saveBatch, { 'dataList': content }).then((res) => {
if (res.success) {
this.ApprovedClick()
}
})
},
getData() {
getAction(this.url.queryProjectCertificationInventoryById, { id: this.$route.query.id }).then((res) => {
if (res.success) {
this.queryForm = res.result || {}
if (this.queryForm.deliveryResult && this.queryForm.valueType == 'file') {
this.getFileInfos(this.queryForm.deliveryResult)
}
if (this.queryForm.deliverableTemplate) {
this.getDeliveryResult(this.queryForm.deliverableTemplate)
}
this.queryForm = { ...this.queryForm }
} else {
this.queryForm = {}
}
})
},
async upload(file) {
// 这时候我们创建一个formData对象实例
const formData = new FormData()
// 通过append方法添加需要的file
// 这里需要注意 append(key, value)来添加数据如果指定的key不存在则会新增一条数据如果key存在则添加到数据的末尾
formData.append('file', file.file)
// 调用uploadFile上传的接口
const res = await this.uploadFile(formData)
this.fileList.push(res)
// 上传文件的guid和后台返回的guid一样通过push方法把上传的文件存放到上传成功才能提交的数组里面
},
uploadFile(formData) {
this.textLoading = this.$t('loading')
this.show = true
return new Promise(resolve => {
const token = Vue.ls.get(ACCESS_TOKEN)
axios({
url: this.uploadAction,
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data', // 文件上传
'X-Access-Token': token
}
}).then((res) => {
resolve(res.data.result)
this.show = false
})
})
},
fileClick(index) {
this.fileList.splice(index, 1)
this.form.deliveryResult.splice(index, 1)
this.form = { ...this.form }
},
deliverablesResultFileClick(item) {
kkFileView(item.fileName, item.id)
},
standardClick(item) {
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.bussDocumentLibraryId
}
})
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.header-search {
/*padding-left: 0.4rem;*/
/*padding-right: 0.4rem;*/
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.collapse {
margin-top: 0.6rem;
}
::v-deep .van-cell {
padding: 0;
}
::v-deep .van-cell::after {
border-bottom: none;
}
::v-deep .van-collapse-item--border::after {
border-top: none;
}
::v-deep .van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
border-width: 0;
}
::v-deep .van-cell--clickable .van-cell__title span {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
}
::v-deep .collapse .van-cell--clickable .van-icon {
font-size: 0.44rem;
color: #040B29;
}
::v-deep .van-collapse-item {
margin-bottom: 0.6rem;
}
.content-box-type {
display: flex;
margin-top: 0.08rem;
margin-bottom: 0.4rem;
}
.content-box-type:last-child {
margin-bottom: 0.1rem;
}
.content-box-left {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
flex: auto;
min-width: 2rem;
}
.content-box-type-text {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
margin-bottom: 0.4rem;
}
.content-box-type-text-one {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #01A0AC;
margin-bottom: 0.4rem;
word-break: break-all;
}
.content-box-type-text-one-select {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
.content-box-type-text-one:last-child {
margin-bottom: 0.1rem;
}
.content-box-type-text-Two {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
.content-box-text {
text-align: right;
margin-left: 0.3rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
::v-deep .van-collapse-item__content {
padding: 0.5rem 0;
}
::v-deep .van-step__circle-container .van-icon {
font-size: 0.55rem;
background: #fff;
}
::v-deep .van-step--finish {
color: #00BEBE;
}
::v-deep .van-step--vertical {
padding: 0.26rem 0 0.46rem 0;
}
::v-deep .van-step--vertical:not(:last-child)::after {
border-bottom-width: 0;
}
.vanStepBox {
margin-left: 0.2rem;
}
.van-text {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.van-text-color {
padding: 0.19rem 0.3rem;
color: #26BD4B;
font-size: 0.34rem;
background: rgba(38, 189, 75, 0.12);
border-radius: 0.1rem;
}
.van-time {
font-size: 0.34rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
margin-top: 0.3rem;
}
.van-name {
color: #868A9A;
margin-right: 0.1rem;
font-size: 0.34rem;
}
.van-name-time {
color: #868A9A;
margin-left: 0.1rem;
font-size: 0.34rem;
}
.van-desgin {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #41475E;
margin-top: 0.3rem;
word-break: break-all;
}
.van-file {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #01A0AC;
margin-top: 0.3rem;
word-break: break-all;
}
::v-deep .van-form .van-cell__title {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #595E72;
width: 100%;
}
::v-deep .van-form .van-cell__value {
margin-top: 0.1rem;
}
::v-deep .van-form .van-radio__icon .van-icon {
width: 0.45rem;
height: 0.45rem;
line-height: 0.38rem;
}
::v-deep .van-form .van-radio__icon--checked .van-icon {
background-color: #00BEBE;
border-color: #00BEBE;
}
::v-deep .van-form .van-radio__icon {
height: 0.45rem;
}
::v-deep .van-form .van-radio__label {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
::v-deep .van-form .van-cell {
margin-bottom: 0.3rem;
}
.textarea {
display: block;
}
::v-deep .van-form .textarea .van-field__control {
background: #F5F6F7;
border-radius: 0.12rem;
padding: 0.2rem;
margin-top: 0.1rem;
}
.uploader {
display: block;
}
.uploader-button {
margin-top: 0.2rem;
}
.uploader-button .van-button--primary {
background-color: #fff;
border: 0.03rem solid #00BEBE;
color: #01A0AC;
font-size: 0.38rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
.uploader-button .van-button {
height: 0.9rem;
border-radius: 0.12rem;
}
.uploader-button .van-button .van-icon {
font-size: 0.42rem;
font-weight: 500;
}
::v-deep .van-loading {
color: #fff;
font-size: 0.36rem;
}
::v-deep .van-loading__text {
color: #fff;
font-size: 0.46rem;
}
::v-deep .van-overlay {
z-index: 1001;
text-align: center;
line-height: 30;
display: flex;
align-items: center;
justify-content: center;
}
.submitButton {
border-radius: 0.2rem;
background: #00B3BE;
border: none;
margin-top: 1.2rem;
}
::v-deep .van-icon-success:before {
font-size: 0.34rem;
text-align: center;
}
::v-deep .van-radio {
margin-bottom: 0.1rem;
}
.file-list {
width: 100%;
background: #FFFFFF;
border-radius: 0.2rem;
border: 0.02rem solid #E6E7EC;
padding: 0.26rem 0.4rem;
font-size: 0.38rem;
font-weight: 400;
color: #040B29;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.2rem;
}
.file-text {
display: inline-block;
margin-right: 0.3rem;
word-break: break-all;
}
.file-text-icon {
font-size: 0.41rem;
margin-left: 0.2rem;
color: #26BD4B;
font-weight: 600;
float: right;
margin-top: 0.11rem;
}
.icon-text {
font-size: 0.4rem;
color: #040B29;
}
::v-deep .van-field--error .van-field__control::placeholder {
color: #BBBDC7;
}
.van-text-status {
margin-bottom: 0.3rem;
margin-top: 0.3rem;
}
.van-collapse-item:last-child {
margin-bottom: 0;
}
.AcceptedClass {
background: #e9f8ed;
color: #26BD4B;
}
.RejectedClass {
background: #fdeaea;
color: #E83030;
}
.TransferClass {
background: #fff6e8;
color: #FDA71C;
}
.ReturnedClass {
background: #fff6e8;
color: #FDA71C;
}
.AdoptClass {
background: #e9f8ed;
color: #26BD4B;
}
.ComplianceClass {
background: #e9f8ed;
color: #26BD4B;
}
.NonComplianceClass {
background: #fdeaea;
color: #E83030;
}
.trackedClass {
background: #fff6e8;
color: #FDA71C;
}
.NAClass {
background: #f1f1f3;
color: #707486;
}
.content-box-text-color {
color: #01A0AC;
}
.resultofhandlingClass {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #595E72;
width: 100%;
}
.requiredClass {
color: #E83030;
font-size: 0.38rem;
margin-left: 0.02rem;
}
::v-deep .productionEnterpriseName .van-field__error-message {
display: none;
}
</style>
@@ -0,0 +1,694 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{queryForm.title}}
</span>
</div>
<div class="header-buttom" v-if="queryForm.problemTypeNameList && queryForm.problemTypeNameList.length > 0">
<div class="header-buttom-text" v-for="val in queryForm.problemTypeNameList">
{{val}}
</div>
</div>
<div class="problemName">
<div class="problemNameLeft">
<img src="~@/assets/icon_contact.png" class="problemNameLeftImg" alt="">
<span class="problemNameLeftText">{{queryForm.createBy}}</span>
</div>
<div class="problemNameLeft">
<img src="~@/assets/icon_time.png" class="problemNameLeftImg" alt="">
<span class="problemNameLeftText">{{queryForm.createTime}}</span>
</div>
</div>
<div class="content" v-html="queryForm.content">
</div>
<div class="contentFile" v-if="queryForm.accessoryFileNameList && queryForm.accessoryFileNameList.length > 0">
<div class="contentFile-text"
@click="fileClick(item)"
v-for="item in queryForm.accessoryFileNameList">
{{item.fileName}}
</div>
</div>
<div class="iconText">
<div class="iconTextLeft">
<img src="~@/assets/icon_kan.png" alt="">
<span class="iconTextLeft-text">
{{queryForm.browsingHistoryCount}}
</span>
</div>
<div class="iconTextLeft" @click="likeClick()">
<img v-if="!this.isPraise" src="~@/assets/icon_zan.png" alt="">
<img v-else src="~@/assets/dianzan.png" alt="">
<span class="iconTextLeft-text" :class="{'icon-active':this.isPraise}">
{{queryForm.praiseCount}}
</span>
</div>
<div class="iconTextLeft" @click="starClick()">
<img v-if="!this.isCollect" src="~@/assets/icon_shoucang.png" alt="">
<img v-else src="~@/assets/xuanzhong.png" alt="">
<span class="iconTextLeft-text" :class="{'icon-active':this.isCollect}">
{{queryForm.collectCount}}
</span>
</div>
</div>
<div class="comment">
<div class="comment-text" @click="howAboutCommentClick">
{{$t('howAboutComment')}}
</div>
<div class="comment-content" v-for="(item,index) in releaseList" :key="index">
<div class="comment-content-text">
<div class="comment-content-text-left">
<span class="comment-content-text-yuan"></span>
{{item.createBy}}
</div>
<div class="comment-content-text-right">
<span>{{item.createTime}}</span>
</div>
</div>
<div class="comment-text-box">
{{item.commentContent}}
</div>
<div class="comment-text-button">
<div class="commentRight" @click="messageClick(item)">
<img src="~@/assets/icon_reply.png" alt="">
<span>{{$t('answer')}}</span>
</div>
<div class="commentRight"
v-if="administrators || item.createBy == userInfoQuery.username"
@click="deleteClick(item)">
<img src="~@/assets/icon_rubbish.png" alt="">
<span>{{$t('delete')}}</span>
</div>
</div>
<div style="margin-top: 0.3rem"
v-if="item.problemKnowledgeBaseCommentVOList && item.problemKnowledgeBaseCommentVOList.length > 0">
<div class="reply-box" v-for="(val,index1) in item.problemKnowledgeBaseCommentVOList">
<div class="comment-content-text">
<div class="comment-content-text-left">
<span class="comment-content-text-yuan"></span>
{{val.createBy}}
</div>
<div class="comment-content-text-right">
<span>{{val.createTime}}</span>
</div>
</div>
<div class="comment-text-box">
{{val.commentContent}}
</div>
<div class="comment-text-button-one">
<div class="commentRight" @click="messageClick(item)">
<img src="~@/assets/icon_reply.png" alt="">
</div>
<div class="commentRight"
v-if="administrators || val.createBy == userInfoQuery.username"
@click="deleteClick(val)">
<img src="~@/assets/icon_rubbish.png" alt="">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="input-text" v-if="isDisplay">
<van-cell-group>
<van-field rows="1"
class="sendInput"
autosize
type="textarea"
v-model="sendValue"
placeholder="说点什么吧"/>
<van-button type="primary" :disabled="sendDisplay" @click="sendClick">{{$t('send')}}</van-button>
</van-cell-group>
</div>
</div>
</template>
<script>
import { getAction, postAction, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import { kkFileView } from '@/utils/kkfileView'
import { deleteAction } from '../../api/manage'
import { Dialog, Toast } from 'vant'
export default {
name: 'phoneProblemKnowledgeBase',
data() {
return {
url: {
queryById: '/problemKnowledgeBase/problemKnowledgeBaseEO/queryById'
},
queryForm: {},
releaseList: [],
isCollect: false,
isPraise: false,
sendValue: '',
isDisplay: false,
commentQuery: {},
sendDisplay: true,
num: 1,
userInfoQuery: {},
administrators: false
}
},
mounted() {
document.title = 'NIO GRP'
this.administrators = false
this.userInfoQuery = this.userInfo()
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
window.addEventListener('scroll', this.scrolling)
window.addEventListener('mousedown', this.handleonmousedown)
this.getQueryBy()
this.releaseData()
this.viewAdd()
},
watch: {
sendValue: function(res) {
if (!res) {
this.sendDisplay = true
} else {
this.sendDisplay = false
}
}
},
destroyed() {
// 离开该页面需要移除这个监听的事件不然会报错
window.removeEventListener('scroll', this.handleScroll)
window.removeEventListener('mousedown', this.handleonmousedown)
},
methods: {
...mapGetters(['userInfo']),
// scrolling() {
// this.isDisplay = false
// },
handleonmousedown(e) {
if (e.srcElement.type == 'textarea' || e.target.type == 'textarea') {
} else if (e.target.innerText == this.$t('send')) {
} else {
this.isDisplay = false
}
},
iconClick() {
if (this.$route.query.goRouter) {
this.$router.push({
path: this.$route.query.goRouter,
query: {
searchValue: this.$route.query.searchValue,
activeTab: this.$route.query.activeTab
}
})
} else {
this.$router.go(-1)
}
},
viewAdd() {
let query = {
problemKnowledgeBaseId: this.$route.query.id,
browsingUserId: this.userInfo().id
}
postAction('/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO/add', query).then((res) => {
})
},
getQueryBy() {
let query = {
id: this.$route.query.id
}
getAction(this.url.queryById, query).then((res) => {
if (res.success) {
this.queryForm = res.result || {}
this.queryForm = { ...this.queryForm }
if (this.queryForm.praiseEO && this.queryForm.praiseEO.praiseStatus == 'Praise') {
this.isPraise = true
} else {
this.isPraise = false
}
if (this.queryForm.collectEO && this.queryForm.collectEO.collectStatus == 'Collect') {
this.isCollect = true
} else {
this.isCollect = false
}
}
})
},
likeClick() {
if (this.isDisplay) {
this.isDisplay = false
return
}
let praiseStatus = ''
this.isPraise = !this.isPraise
if (this.isPraise) {
praiseStatus = 'Praise'
this.queryForm.praiseCount = this.queryForm.praiseCount + 1
} else {
praiseStatus = 'Cancel praise'
this.queryForm.praiseCount = this.queryForm.praiseCount - 1
}
let query = {
problemKnowledgeBaseId: this.$route.query.id,
praiseUserId: this.userInfo().id,
praiseStatus: praiseStatus,
id: this.queryForm.praiseEO ? this.queryForm.praiseEO.id : undefined
}
putAction('/problemKnowledgeBase/problemKnowledgeBasePraiseEO/edit', query).then((res) => {
if (!this.queryForm.praiseEO || !this.queryForm.praiseEO.id) {
this.queryById()
}
})
},
starClick() {
if (this.isDisplay) {
this.isDisplay = false
return
}
let collectStatus = ''
this.isCollect = !this.isCollect
if (this.isCollect) {
collectStatus = 'Collect'
this.queryForm.collectCount = this.queryForm.collectCount + 1
} else {
collectStatus = 'Cancel Collect'
this.queryForm.collectCount = this.queryForm.collectCount - 1
}
let query = {
problemKnowledgeBaseId: this.$route.query.id,
collectUserId: this.userInfo().id,
collectStatus: collectStatus,
id: this.queryForm.collectEO ? this.queryForm.collectEO.id : undefined
}
putAction('/problemKnowledgeBase/problemKnowledgeBaseCollectEO/edit', query).then((res) => {
if (!this.queryForm.collectEO || !this.queryForm.collectEO.id) {
this.queryById()
}
})
},
releaseData() {
let query = {
problemKnowledgeBaseId: this.$route.query.id
}
getAction('/problemKnowledgeBase/problemKnowledgeBaseCommentEO/list', query).then((res) => {
if (res.success) {
this.releaseList = res.result || []
} else {
this.releaseList = []
}
})
},
deleteClick(item) {
let _this = this
if (this.isDisplay) {
this.isDisplay = false
return
}
function beforeClose(action, done) {
if (action === 'confirm') {
let url = ''
if (item.problemKnowledgeBaseId) {
url = '/problemKnowledgeBase/problemKnowledgeBaseCommentEO/deleteBatch'
} else {
url = '/project/problemKnowledgeBaseReplyEO/deleteBatch'
}
deleteAction(url, { ids: item.id }).then((res) => {
if (res.success) {
Toast(_this.$t('OperationSuccessful'))
_this.releaseData()
done()
} else {
_this.$message.warning(res.message)
}
})
} else {
done()
}
}
Dialog.confirm({
message: this.$t('confirmDeletion') + '?',
beforeClose
})
},
howAboutCommentClick() {
this.isDisplay = true
this.num = 1
this.$nextTick(() => {
let vanField = document.querySelectorAll('.sendInput .van-field__control')[0]
vanField.focus()
})
},
fileClick(item) {
kkFileView(item.fileName, item.id)
},
messageClick(item) {
this.isDisplay = true
this.num = 2
this.commentQuery = item
this.$nextTick(() => {
let vanField = document.querySelectorAll('.sendInput .van-field__control')[0]
vanField.focus()
})
},
sendClick() {
if (this.num == 1) {
let query = {
problemKnowledgeBaseId: this.$route.query.id,
commentContent: this.sendValue,
commentUserId: this.userInfo().id
}
postAction('/problemKnowledgeBase/problemKnowledgeBaseCommentEO/add', query).then((res) => {
if (res.success) {
Toast(this.$t('OperationSuccessful'))
this.releaseData()
this.sendValue = ''
this.isDisplay = false
} else {
Toast(this.$t('operationFailed'))
}
})
} else {
this.handleComment()
}
},
handleComment() {
let query = {
commentId: this.commentQuery.id,
replyContent: this.sendValue
}
postAction('/project/problemKnowledgeBaseReplyEO/add', query).then((res) => {
if (res.success) {
Toast(this.$t('OperationSuccessful'))
this.releaseData()
this.sendValue = ''
this.isDisplay = false
} else {
Toast(this.$t('operationFailed'))
}
})
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.box-showModal {
position: absolute;
height: 100%;
}
.header-search {
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.header-buttom {
margin-top: 0.36rem;
text-align: right;
}
.header-buttom-text {
font-size: 0.34rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #00B3BE;
padding: 0.17rem 0.3rem;
background: rgba(0, 179, 190, 0.12);
border-radius: 0.12rem;
opacity: 1;
display: inline-block;
margin-left: 0.2rem;
}
.problemName {
display: flex;
margin-top: 0.16rem;
height: 1rem;
line-height: 1rem;
}
.problemNameLeft {
margin-right: 0.5rem;
display: flex;
align-items: center;
}
.problemNameLeftImg {
width: 0.42rem;
}
.problemNameLeftText {
font-size: 0.34rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
margin-left: 0.2rem;
margin-top: 0.07rem;
}
.content {
margin-top: 0.1rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #040B29;
word-break: break-all;
}
.contentFile {
margin-top: 0.2rem;
}
.contentFile-text {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #01A0AC;
margin-bottom: 0.2rem;
}
.iconText {
text-align: right;
display: flex;
justify-content: flex-end;
margin-top: 0.4rem;
padding-bottom: 0.6rem;
border-bottom: 0.02rem solid #E6E7EC;
}
.iconTextLeft-text {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
margin-left: 0.12rem;
}
.iconTextLeft {
display: flex;
align-items: center;
margin-left: 0.4rem;
}
.iconTextLeft img {
width: 0.46rem;
}
.comment {
margin-top: 0.8rem;
}
.comment-text {
width: 100%;
background: #F6F7FA;
border-radius: 0.23rem;
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
text-align: center;
padding: 0.36rem 0;
}
.comment-content {
padding: 0.7rem 0;
box-sizing: border-box;
border-bottom: 0.02rem solid #E6E7EC;
}
.comment-content-text {
display: flex;
justify-content: space-between;
align-items: center;
}
.comment-content-text-left {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #040B29;
display: flex;
align-items: center;
}
.comment-content-text-yuan {
width: 0.2rem;
height: 0.2rem;
display: inline-block;
border-radius: 50%;
background: #01A0AC;
margin-right: 0.2rem;
}
.comment-content-text-right {
font-size: 0.34rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
}
.comment-text-box {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #41475E;
word-break: break-all;
margin-top: 0.3rem;
}
.comment-text-button {
display: flex;
align-items: center;
justify-content: flex-end;
text-align: right;
margin-top: 0.3rem;
/*margin-bottom: 0.3rem;*/
}
.comment-text-button-one {
display: flex;
align-items: center;
justify-content: flex-end;
text-align: right;
margin-top: 0.3rem;
}
.commentRight {
margin-left: 0.4rem;
display: flex;
align-items: center;
}
.commentRight img {
width: 0.44rem;
}
.commentRight span {
font-size: 0.36rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
margin-left: 0.1rem;
}
.reply-box {
background: #F6F7F8;
/*border-radius: 0.16rem;*/
padding: 0.4rem 0.4rem 0 0.4rem;
margin-left: 0.5rem;
}
.reply-box:last-child {
padding-bottom: 0.4rem;
border-bottom-left-radius: 0.16rem;
border-bottom-right-radius: 0.16rem;
}
.reply-box:first-child {
border-top-left-radius: 0.16rem;
border-top-right-radius: 0.16rem;
}
.icon-active {
color: #00B3BE !important;
}
.input-text {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #F6F7FA;
padding: 0.2rem 0.4rem;
}
.input-text .van-cell-group {
display: flex;
background: transparent;
align-items: center;
}
.input-text .van-cell {
width: calc(100% - 1.8rem);
display: inline-block;
border-radius: 0.6rem;
margin-right: 0.3rem;
}
.input-text .van-button {
width: 1.8rem;
height: 1rem;
border-radius: 0.4rem;
background: #01A0AC;
border: none;
}
</style>
@@ -0,0 +1,898 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{queryForm.serialNumber}} {{title}}
</span>
</div>
<van-collapse class="collapse" v-model="activeNames">
<van-collapse-item :title="$t('essentialInformation')" name="1">
<div class="content-box-type">
<span class="content-box-left">{{$t('entryName')}}</span>
<span class="content-box-text">{{queryForm.projectName+'-'+queryForm.projectVersion}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('regulationNo')}}</span>
<span class="content-box-text">{{queryForm.serialNumber || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('title')}}</span>
<span class="content-box-text">{{queryForm.title || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('subtitle')}}</span>
<span class="content-box-text">{{queryForm.subtitle || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('applicableSupplement')}}</span>
<span class="content-box-text">{{queryForm.applicableSupplement || '--'}}</span>
</div>
</van-collapse-item>
<van-collapse-item :title="$t('TaskRequirements')" name="2">
<div class="content-box-type">
<span class="content-box-left">{{$t('Sponsor')}}</span>
<span class="content-box-text">{{queryProject[queryData.Sponsor] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('personLiable')}}</span>
<span class="content-box-text">{{queryProject[queryData.personLiable] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('deliveryDate')}}</span>
<span class="content-box-text">{{queryProject[queryData.DueDate] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('typeOfDeliverables')}}</span>
<span class="content-box-text">{{queryProject[queryData.typeOfDeliverables] || '--'}}</span>
</div>
<div class="content-box-type-text">
{{$t('deliverableTemplate')}}
</div>
<div class="content-box-type-text-Two" v-if="dataSourceFile && dataSourceFile.length == 0">
--
</div>
<div class="content-box-type-text-one"
v-else
@click="dataSourceFileClick(item)"
v-for="item in dataSourceFile">
{{item.fileName}}
</div>
<div class="content-box-type-text">
{{$t('descriptionDeliverables')}}
</div>
<div class="content-box-type-text-Two">
{{queryProject[queryData.remarks] || '--'}}
</div>
</van-collapse-item>
<van-collapse-item :title="$t('Processhistory')" name="3">
<van-steps inactive-icon="passed"
active-icon="passed"
active-color="#00BEBE"
direction="vertical" :active="dataSource.length">
<van-step v-for="(item,index) in dataSource" :key="index">
<div class="vanStepBox">
<div class="van-text">
{{item.name}}
</div>
<div class="van-text-status">
<span class="van-text-color" :class="statusClass[item.operatorResult]" v-if="item.operatorResultName">
{{item.operatorResultName}}
</span>
</div>
<div class="van-time">
<span class="van-name">
{{item.assignee}}
</span>
|
<span class="van-name-time">
{{item.createTime}}
</span>
</div>
<div class="van-desgin">
{{item.approvalOpinion}}
</div>
<div class="van-file" @click="approvalFileClick(item,index1)"
v-if="item.approvalFileName && item.approvalFileName.length > 0"
v-for="(val,index1) in item.approvalFileName" :key="index1">
{{val}}
</div>
</div>
</van-step>
</van-steps>
</van-collapse-item>
<van-collapse-item :title="$t('taskHandling')" name="4" v-if="!queryData.isDisplay">
<van-form @submit="onSubmit" ref="form">
<div class="resultofhandlingClass" style="margin-bottom: 0.1rem">
<span>{{$t('resultofhandling')}}</span>
<span class="requiredClass">*</span>
</div>
<van-field name="disposeResult"
class="uploader"
:rules="[{ required: true, message: $t('resultofhandling') + $t('cannotEmpty') }]">
<template #input>
<van-radio-group v-model="form.disposeResult" direction="horizontal">
<van-radio name="Accepted" v-if="queryData.TaskKey == 'zrrqr' || queryData.TaskKey == 'dezrrqr'">
{{$t('accept')}}
</van-radio>
<van-radio name="Rejected" v-if="queryData.TaskKey == 'zrrqr'">
{{$t('refuse')}}
</van-radio>
<van-radio name="Adopt" :disabled="isAdopt"
v-if="queryData.TaskKey == 'fggcssh' || queryData.TaskKey == 'fggcsbcsh'">
{{$t('adopt')}}
</van-radio>
<van-radio name="Compliance"
v-if="queryData.TaskKey == 'dezrrtjjfw' || queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'zrrbctjxg'">
{{$t('accord')}}
</van-radio>
<van-radio name="Non-Compliance"
v-if="queryData.TaskKey == 'dezrrtjjfw' || queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'zrrbctjxg'">
{{$t('nonConformity')}}
</van-radio>
<van-radio name="To be tracked"
v-if="queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'dezrrtjjfw' || queryData.TaskKey == 'zrrbctjxg'">
{{$t('Tracked')}}
</van-radio>
<van-radio name="NA"
v-if="queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'dezrrtjjfw' || queryData.TaskKey == 'zrrbctjxg'">
{{$t('notInvolved')}}
</van-radio>
<van-radio name="Returned"
v-if="queryData.TaskKey == 'dezrrqr' || queryData.TaskKey == 'dezrrtjjfw' ||
queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'fggcssh' || queryData.TaskKey == 'fggcsbcsh'">
{{$t('sendBack')}}
</van-radio>
</van-radio-group>
</template>
</van-field>
<div class="resultofhandlingClass">
<span>{{$t('feedback')}}</span>
<span class="requiredClass">*</span>
</div>
<van-field
v-model.trim="form.approvalOpinion"
rows="4"
class="textarea"
autosize
:show-error="false"
:rules="[{ required: true, message: $t('feedbackMessage') + $t('cannotEmpty') }]"
maxlength="200"
type="textarea"
:placeholder="$t('pleaseEnter')+$t('feedbackMessage')"
/>
<van-field name="uploader" class="uploader"
v-if="queryData.TaskKey == 'dezrrtjjfw' || queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'fggcssh'
|| queryData.TaskKey == 'zrrbctjxg' || queryData.TaskKey == 'fggcsbcsh'"
:label="$t('attachmentUpload')">
<template #input>
<van-uploader :preview-image="false"
accept="*"
:after-read="upload"
class="uploader-button">
<van-button icon="back-top" type="primary">{{$t('upload1')}}</van-button>
</van-uploader>
</template>
</van-field>
<div class="file-list"
v-for="(item,index) in fileList"
:key="index">
<span class="file-text">{{item.fileName}}
<van-icon class="file-text-icon" name="passed"/>
</span>
<a-icon @click="fileClick(index)" class="icon-text" type="delete"/>
</div>
<van-button class="submitButton"
round
block
type="info"
native-type="submit">{{$t('submit')}}
</van-button>
</van-form>
</van-collapse-item>
</van-collapse>
<van-overlay :show="show">
<van-loading type="spinner">{{textLoading}}</van-loading>
</van-overlay>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile, uploadAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import moment from 'moment'
import axios from 'axios'
import Vue from 'vue'
import { kkFileView } from '@/utils/kkfileView'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'phoneProcessManagement',
data() {
return {
activeNames: ['1', '2', '3', '4'],
show: false,
form: {},
statusClass: {
'Accepted': 'AcceptedClass',
'Rejected': 'RejectedClass',
'Transfer': 'TransferClass',
'Returned': 'ReturnedClass',
'Adopt': 'AdoptClass',
'Compliance': 'ComplianceClass',
'Non-Compliance': 'NonComplianceClass',
'To be tracked': 'trackedClass',
'NA': 'NAClass'
},
dataSource: [],
url: {
urlFrom: 'project/projectLibraryBase/queryById',
queryProjectLawsInventoryInfoById: 'project/projectLawsInventoryEO/queryProjectLawsInventoryInfoById',
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds',
edit: '/project/projectTaskInventoryDetailEO/edit',
dreSubmit: '/project/projectTaskInventoryFeedbackEO/dreSubmit',
list: '/project/projectTaskInventoryFeedbackEO/list',
historyList: '/wkflow/processHistoryEO/queryComplianceProcessHistoryList'
},
queryForm: {},
queryProject: {},
queryBy: {},
queryData: {},
title: '',
dataSourceFile: [],
textLoading: '',
fileList: [],
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
examineTitle: '',
isAdopt: false
}
},
mounted() {
document.title = 'NIO GRP'
this.textLoading = this.$t('loading')
this.getData(this.$route.query)
},
methods: {
...mapGetters(['userInfo']),
dataSourceFileClick(item) {
kkFileView(item.fileName, item.id)
},
approvalFileClick(item, index) {
kkFileView(item.approvalFileName[index], item.approvalFile[index])
},
iconClick() {
if (this.$route.query.goRouter) {
this.$router.push({
path: this.$route.query.goRouter,
query: {
searchValue: this.$route.query.searchValue,
activeTab: this.$route.query.activeTab
}
})
} else {
this.$router.go(-1)
}
},
onSubmit() {
this.$refs.form.validate().then(() => {
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let content = []
if (this.fileList && this.fileList.length > 0) {
this.fileList.forEach(res => {
content.push(res.id)
})
}
this.form.approvalFile = content.join(',')
this.completeTask({ operatorTime: handlingTime, ...this.form })
})
},
getData(row) {
this.show = true
this.queryData = row
this.queryData.isDisplay = JSON.parse(this.queryData.isDisplay)
let _this = this
if (row.flowType == '2') {
this.title = this.$t('designTheComplianceProcess')
} else if (row.flowType == '4') {
this.title = this.$t('verifyComplianceProcess')
}
if (row.TaskKey == 'zrrqr' || row.TaskKey == 'dezrrqr' || row.TaskKey == 'zrrtjjfw' || row.TaskKey == 'dezrrtjjfw') {
this.examineTitle = this.$t('personLiableConfirm')
} else {
this.examineTitle = this.$t('sponsorReview')
}
this.getHistoryList()
if (row.taskIds) {
this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo()
})
} else {
this.queryBy.projectLibraryId = row.projectLibraryId
this.queryBy.id = row.projectTaskInventoryId
this.queryProjectLawsInventoryInfo()
}
},
queryTaskDetailByTask(callback) {
this.loading = true
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.queryData.taskIds }).then((res) => {
if (res instanceof String) {
this.queryBy = JSON.parse(res) || {}
callback()
} else {
this.queryBy = res || {}
callback()
}
})
},
queryProjectLawsInventoryInfo() {
let query = {
id: this.queryBy.id,
operatorType: 'taskAffirmQuery'
}
this.queryBy.approvalOpinion = ''
this.queryBy.approvalFile = ''
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) {
this.queryProject = res.result[0] || {}
if (this.queryBy.disposeResult == 'To be tracked' || this.queryBy.disposeResult == 'Non-Compliance') {
this.isAdopt = true
}
if (this.queryProject[this.queryData.deliverableTemplate]) {
this.getFileInfos(this.queryProject[this.queryData.deliverableTemplate])
}
this.getQueryForm()
} else {
this.queryProject = {}
}
})
},
getHistoryList() {
let query = {
actiProcInstId: this.queryData.actiProcInstId || this.queryData.prcId,
flowType: this.queryData.flowType,
projectLawsInventoryId: this.queryData.projectTaskInventoryId
}
getAction('/wkflow/processHistoryEO/queryComplianceProcessHistoryList', query).then((res) => {
if (res.success) {
this.dataSource = res.result || []
this.dataSource.forEach(val => {
if (val.approvalFileName) {
val.approvalFileName = val.approvalFileName.split(',')
val.approvalFile = val.approvalFile.split(',')
}
})
} else {
this.dataSource = []
}
})
},
getFileInfos(item) {
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
} else {
this.dataSourceFile = []
}
})
},
getQueryForm() {
getAction(this.url.urlFrom, { id: this.queryBy.projectLibraryId }).then((res) => {
if (res.success) {
this.queryForm = res.result[0] || {}
if (this.queryProject) {
this.queryForm = { ...this.queryForm, ...this.queryProject }
}
this.show = false
} else {
this.queryForm = {}
}
})
},
async upload(file) {
// 这时候我们创建一个formData对象实例
const formData = new FormData()
// 通过append方法添加需要的file
// 这里需要注意 append(key, value)来添加数据如果指定的key不存在则会新增一条数据如果key存在则添加到数据的末尾
formData.append('file', file.file)
// 调用uploadFile上传的接口
const res = await this.uploadFile(formData)
this.fileList.push(res)
// 上传文件的guid和后台返回的guid一样通过push方法把上传的文件存放到上传成功才能提交的数组里面
},
uploadFile(formData) {
this.textLoading = this.$t('loading')
this.show = true
return new Promise(resolve => {
const token = Vue.ls.get(ACCESS_TOKEN)
axios({
url: this.uploadAction,
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data', // 文件上传
'X-Access-Token': token
}
}).then((res) => {
resolve(res.data.result)
this.show = false
})
})
},
completeTask(value) {
this.textLoading = this.$t('Submitting')
this.show = true
let json = Object.assign(this.queryBy, value)
let data = JSON.stringify(json).replace(/\"/g, '\'')
Object.keys(value).forEach(res => {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
})
let query = {
userid: this.userInfo().id,
taskId: this.queryData.taskId || this.queryData.taskIds,
json: data
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.show = false
this.$router.go(-1)
} else {
this.show = false
this.$message.warning(res.message)
}
})
},
fileClick(index) {
this.fileList.splice(index, 1)
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.header-search {
/*padding-left: 0.4rem;*/
/*padding-right: 0.4rem;*/
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.collapse {
margin-top: 0.6rem;
}
::v-deep .van-cell {
padding: 0;
}
::v-deep .van-cell::after {
border-bottom: none;
}
::v-deep .van-collapse-item--border::after {
border-top: none;
}
::v-deep .van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
border-width: 0;
}
::v-deep .van-cell--clickable .van-cell__title span {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
}
::v-deep .collapse .van-cell--clickable .van-icon {
font-size: 0.44rem;
color: #040B29;
}
::v-deep .van-collapse-item {
margin-bottom: 0.6rem;
}
.content-box-type {
display: flex;
margin-top: 0.08rem;
margin-bottom: 0.4rem;
}
.content-box-type:last-child {
margin-bottom: 0.1rem;
}
.content-box-left {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
flex: auto;
min-width: 2rem;
}
.content-box-type-text {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6F7385;
margin-bottom: 0.4rem;
}
.content-box-type-text-one {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #01A0AC;
margin-bottom: 0.4rem;
word-break: break-all;
}
.content-box-type-text-Two {
display: inline-block;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
.content-box-text {
text-align: right;
margin-left: 0.3rem;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
::v-deep .van-collapse-item__content {
padding: 0.5rem 0;
}
::v-deep .van-step__circle-container .van-icon {
font-size: 0.55rem;
background: #fff;
}
::v-deep .van-step--finish {
color: #00BEBE;
}
::v-deep .van-step--vertical {
padding: 0.26rem 0 0.46rem 0;
}
::v-deep .van-step--vertical:not(:last-child)::after {
border-bottom-width: 0;
}
.vanStepBox {
margin-left: 0.2rem;
}
.van-text {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
.van-text-color {
padding: 0.19rem 0.3rem;
color: #26BD4B;
font-size: 0.34rem;
background: rgba(38, 189, 75, 0.12);
border-radius: 0.1rem;
}
.van-time {
font-size: 0.34rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #868A9A;
margin-top: 0.3rem;
}
.van-name {
color: #868A9A;
margin-right: 0.1rem;
font-size: 0.34rem;
}
.van-name-time {
color: #868A9A;
margin-left: 0.1rem;
font-size: 0.34rem;
}
.van-desgin {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #41475E;
margin-top: 0.3rem;
word-break: break-all;
}
.van-file {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #01A0AC;
margin-top: 0.3rem;
word-break: break-all;
}
::v-deep .van-form .van-cell__title {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #595E72;
width: 100%;
}
::v-deep .van-form .van-cell__value {
margin-top: 0.1rem;
}
::v-deep .van-form .van-radio__icon .van-icon {
width: 0.45rem;
height: 0.45rem;
line-height: 0.38rem;
}
::v-deep .van-form .van-radio__icon--checked .van-icon {
background-color: #00BEBE;
border-color: #00BEBE;
}
::v-deep .van-form .van-radio__icon {
height: 0.45rem;
}
::v-deep .van-form .van-radio__label {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
}
::v-deep .van-form .van-cell {
margin-bottom: 0.3rem;
}
.textarea {
display: block;
}
::v-deep .van-form .textarea .van-field__control {
background: #F5F6F7;
border-radius: 0.12rem;
padding: 0.2rem;
margin-top: 0.1rem;
}
.uploader {
display: block;
}
.uploader-button {
margin-top: 0.2rem;
}
.uploader-button .van-button--primary {
background-color: #fff;
border: 0.03rem solid #00BEBE;
color: #01A0AC;
font-size: 0.38rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
.uploader-button .van-button {
height: 0.9rem;
border-radius: 0.12rem;
}
.uploader-button .van-button .van-icon {
font-size: 0.42rem;
font-weight: 500;
}
::v-deep .van-loading {
color: #fff;
font-size: 0.36rem;
}
::v-deep .van-loading__text {
color: #fff;
font-size: 0.46rem;
}
::v-deep .van-overlay {
z-index: 1001;
text-align: center;
line-height: 30;
display: flex;
align-items: center;
justify-content: center;
}
.submitButton {
border-radius: 0.2rem;
background: #00B3BE;
border: none;
margin-top: 1.2rem;
}
::v-deep .van-icon-success:before {
font-size: 0.34rem;
text-align: center;
}
::v-deep .van-radio {
margin-bottom: 0.1rem;
}
.file-list {
width: 100%;
background: #FFFFFF;
border-radius: 0.2rem;
border: 0.02rem solid #E6E7EC;
padding: 0.26rem 0.4rem;
font-size: 0.38rem;
font-weight: 400;
color: #040B29;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.2rem;
}
.file-text {
display: inline-block;
margin-right: 0.3rem;
word-break: break-all;
}
.file-text-icon {
font-size: 0.41rem;
margin-left: 0.2rem;
color: #26BD4B;
font-weight: 600;
}
.icon-text {
font-size: 0.4rem;
color: #040B29;
}
::v-deep .van-field--error .van-field__control::placeholder {
color: #BBBDC7;
}
.van-text-status {
margin-bottom: 0.3rem;
margin-top: 0.3rem;
}
.van-collapse-item:last-child {
margin-bottom: 0;
}
.AcceptedClass {
background: #e9f8ed;
color: #26BD4B;
}
.RejectedClass {
background: #fdeaea;
color: #E83030;
}
.TransferClass {
background: #fff6e8;
color: #FDA71C;
}
.ReturnedClass {
background: #fff6e8;
color: #FDA71C;
}
.AdoptClass {
background: #e9f8ed;
color: #26BD4B;
}
.ComplianceClass {
background: #e9f8ed;
color: #26BD4B;
}
.NonComplianceClass {
background: #fdeaea;
color: #E83030;
}
.trackedClass {
background: #fff6e8;
color: #FDA71C;
}
.NAClass {
background: #f1f1f3;
color: #707486;
}
.resultofhandlingClass {
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #595E72;
width: 100%;
}
.requiredClass {
color: #E83030;
font-size: 0.38rem;
margin-left: 0.06rem;
}
</style>
@@ -0,0 +1,189 @@
<template>
<div class="box">
<div class="header-search">
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<span class="header-search-text">
{{$t('recentBrowsing')}}
</span>
</div>
<div class="content">
<div class="content-text" @click="recentBrowsingClick(item)" v-for="(item,index) in recentBrowsingList"
:key="index">
<div class="content-text-left">
<div class="content-text-top">
<span class="content-text-top-left">
{{item.title || '--'}}
</span>
<!-- <span class="content-text-top-right">-->
<!-- 测试检验项目-->
<!-- </span>-->
</div>
<div class="content-text-button">
<span>{{item.browseTypeName}}</span>
</div>
<div class="content-text-button">
<span>{{$t('browsingTime')}}{{item.createTime}}</span>
</div>
</div>
<div class="content-text-right">
<van-icon name="arrow"/>
</div>
</div>
</div>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
import { kkFileView } from '@/utils/kkfileView'
export default {
name: 'phoneRecentBrowsing',
data() {
return {
url: {
page: '/phone/recentBrowse/page'
},
recentBrowsingList: []
}
},
mounted() {
document.title = 'NIO GRP'
this.getRecentBrowsing()
},
methods: {
...mapGetters(['userInfo']),
iconClick() {
this.$router.go(-1)
},
getRecentBrowsing() {
let query = {
createBy: this.userInfo().username,
pageNo: 1,
pageSize: 30
}
getAction(this.url.page, query).then((res) => {
if (res.success) {
this.recentBrowsingList = res.result.records || []
} else {
this.recentBrowsingList = []
}
})
},
recentBrowsingClick(item) {
if (item.browseType == 'Document Library') {
this.$router.push({
path: '/phoneDocumentDetails',
query: {
id: item.browseDataId
}
})
} else if (item.browseType == 'Regulatory Monthly Report') {
kkFileView(item.title, item.fileId)
} else if (item.browseType == 'Knowledge sharing') {
this.$router.push({
path: '/phoneProblemKnowledgeBase',
query: {
id: item.browseDataId
}
})
}
}
}
}
</script>
<style scoped>
.box {
padding: 0 0.4rem 0.4rem 0.4rem;
position: relative;
}
.header-search {
width: 100%;
display: flex;
position: sticky;
top: 0;
padding-top: 0.4rem;
background: #fff;
z-index: 1000;
}
.icon {
font-size: 0.66rem;
width: 0.7rem;
}
.header-search-text {
font-size: 0.44rem;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 600;
color: #040B29;
margin-left: 0.2rem;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content {
margin-top: 0.36rem;
}
.content-text {
padding: 0.3rem 0;
box-sizing: border-box;
display: flex;
align-items: center;
border-bottom: 0.02rem solid #E6E7EC;
}
.content-text-left {
width: calc(100% - 1rem);
}
.content-text-right {
width: 1rem;
text-align: right;
}
.content-text-top {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
}
.content-text-button {
font-size: 0.42rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
margin-top: 0.13rem;
}
.content-text-right .van-icon {
font-size: 0.5rem;
color: #040B29;
}
.content-text-top-right {
margin-left: 0.3rem;
}
</style>

Some files were not shown because too many files have changed in this diff Show More