Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+10
-5
@@ -54,12 +54,16 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
|
||||
@AutoLog(value = "文档对比信息表-分页列表查询")
|
||||
@ApiOperation(value = "文档对比信息表-分页列表查询", notes = "文档对比信息表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(SarFileCompareInfo sarFileCompareInfo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
||||
public Result<?> queryPageList(SarFileCompareInfo sarFileCompareInfo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut, HttpServletRequest req) {
|
||||
QueryWrapper<SarFileCompareInfo> queryWrapper = QueryGenerator.initQueryWrapper(sarFileCompareInfo, req.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
queryWrapper.eq("create_by", sysUser.getUsername()).or().eq("release_state", ReleaseConditionEnum.DRAFT.getValue());
|
||||
Page<SarFileCompareInfo> page = new Page<SarFileCompareInfo>(pageNo, pageSize);
|
||||
IPage<SarFileCompareInfo> pageList = sarFileCompareInfoService.page(page, queryWrapper);
|
||||
for (SarFileCompareInfo info : pageList.getRecords()) {
|
||||
info.setReleaseStateTitle(ReleaseConditionEnum.getTextByValue(info.getReleaseState(), cut));
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -208,12 +212,13 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
|
||||
@ApiOperation(value = "文档对比信息表-更改发布状态", notes = "文档对比信息表-更改发布状态")
|
||||
@RequestMapping(value = "/changeState", method = RequestMethod.POST)
|
||||
public Result<?> changeState(@Validated @RequestBody SarFileCompareInfo sarFileCompareInfo) {
|
||||
if (sarFileCompareInfo.getReleaseState().equals(ReleaseConditionEnum.DRAFT.getValue())) {
|
||||
sarFileCompareInfo.setReleaseState(ReleaseConditionEnum.PUBLISHED.getValue());
|
||||
SarFileCompareInfo info = sarFileCompareInfoService.queryById(sarFileCompareInfo.getId());
|
||||
if (ReleaseConditionEnum.DRAFT.getValue().equals(sarFileCompareInfo.getReleaseState())) {
|
||||
info.setReleaseState(ReleaseConditionEnum.PUBLISHED.getValue());
|
||||
} else {
|
||||
sarFileCompareInfo.setReleaseState(ReleaseConditionEnum.DRAFT.getValue());
|
||||
info.setReleaseState(ReleaseConditionEnum.DRAFT.getValue());
|
||||
}
|
||||
sarFileCompareInfoService.editById(sarFileCompareInfo);
|
||||
sarFileCompareInfoService.editById(info);
|
||||
return Result.OK("更改成功!");
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -126,6 +127,10 @@ public class SarFileCompareInfo implements Serializable {
|
||||
@ApiModelProperty(value = "发布状态")
|
||||
private String releaseState;
|
||||
|
||||
/**发布状态-翻译后*/
|
||||
@TableField(exist = false)
|
||||
private String releaseStateTitle;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.jero.modules.compare.enums;
|
||||
|
||||
/**
|
||||
* 对比信息发布状态
|
||||
*/
|
||||
public enum ComparesInfoStateEnum {
|
||||
DRAFT(0, "草稿"), RELEASE(1, "发布");
|
||||
|
||||
private int value;
|
||||
private String lable;
|
||||
|
||||
private ComparesInfoStateEnum(int value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -160,7 +160,7 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
||||
}
|
||||
if (j >= rightItemList.size() - 1) {
|
||||
int ts = leftItemList.get(i).getTargetStand();
|
||||
if(ts > -1){
|
||||
if (ts > -1) {
|
||||
rightItemList.get(ts).setTargetStand(i);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ public class SarFileCompareResCommentServiceImpl extends ServiceImpl<SarFileComp
|
||||
if (StringUtils.isEmpty(rc.getParentId())) {
|
||||
SarFileCompareResComVO resComVO = wrapperSarFileCompareResComVO(rc);
|
||||
for (SarFileCompareResComment rc1 : list) {
|
||||
if (!StringUtils.isEmpty(rc.getParentId()) && rc.getParentId().equals(resComVO.getId())) {
|
||||
if (!StringUtils.isEmpty(rc1.getParentId()) && rc1.getParentId().equals(resComVO.getId())) {
|
||||
resComVO.addResComVo(wrapperSarFileCompareResComVO(rc1));
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
@@ -170,4 +172,17 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
||||
return super.importExcel(request, response, CountryCardManageReleaseEO.class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新状态 发布或撤回
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-country_card-管理发布表-发布或撤回")
|
||||
@ApiOperation(value="问题知识库-country_card-管理发布表-发布或撤回", notes="问题知识库-country_card-管理发布表-发布或撤回")
|
||||
@PostMapping(value = "/batchUpdateReleaseStatus")
|
||||
public Result<?> batchUpdateReleaseStatus(@RequestBody JSONObject json) {
|
||||
this.countryCardManageReleaseEOService.batchUpdateReleaseStatus(json);
|
||||
return Result.OK("批量更新发布状态成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -54,6 +54,7 @@ public class CountryCardTempEOController extends JeroController<CountryCardTempE
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardTempEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardTempEO, req.getParameterMap());
|
||||
queryWrapper.orderByAsc("order_num");
|
||||
Page<CountryCardTempEO> page = new Page<CountryCardTempEO>(pageNo, pageSize);
|
||||
IPage<CountryCardTempEO> pageList = countryCardTempEOService.page(page, queryWrapper);
|
||||
this.countryCardTempEOService.disposeData(pageList.getRecords(),countryCardTempEO.getCut());
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class ProblemKnowledgeBaseClassifyEOController extends JeroController<Pro
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseClassifyEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseClassifyEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseClassifyEO> page = new Page<ProblemKnowledgeBaseClassifyEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseClassifyEO> pageList = problemKnowledgeBaseClassifyEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class ProblemKnowledgeBaseCommentEOController extends JeroController<Prob
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCommentEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseCommentEO> page = new Page<ProblemKnowledgeBaseCommentEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCommentEO> pageList = problemKnowledgeBaseCommentEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
||||
+2
@@ -53,6 +53,8 @@ public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnow
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
this.problemKnowledgeBaseEOService.disposeData(pageList.getRecords(),problemKnowledgeBaseEO.getCut());
|
||||
|
||||
+2
@@ -73,6 +73,8 @@ public class CountryCardTempEO implements Serializable {
|
||||
@Excel(name = "标签类型", width = 15)
|
||||
@ApiModelProperty(value = "标签类型")
|
||||
private java.lang.String lableType;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String lableType_dicText;
|
||||
|
||||
/**展示顺序*/
|
||||
@Excel(name = "展示顺序", width = 15)
|
||||
|
||||
+4
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -70,5 +71,8 @@ public class ProblemKnowledgeBaseUserEO implements Serializable {
|
||||
@Excel(name = "用户id", width = 15)
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private java.lang.String userId;
|
||||
/**用户姓名*/
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
*/
|
||||
public enum ReleaseStatusEnum {
|
||||
|
||||
HAVE_RELEASED("已发布","Have released","have released"),
|
||||
DRAFT("草稿","Draft","draft"),
|
||||
HAVE_RELEASED("已发布","Have released","Have released"),
|
||||
DRAFT("草稿","Draft","Draft"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
+7
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@@ -65,4 +66,10 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<CountryCardManageReleaseEO> datas, String cut);
|
||||
|
||||
/**
|
||||
* 批量更新发布状态
|
||||
* @param json
|
||||
*/
|
||||
void batchUpdateReleaseStatus(JSONObject json);
|
||||
}
|
||||
|
||||
+7
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -68,4 +69,10 @@ public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledg
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<ProblemKnowledgeBaseEO> datas,String cut);
|
||||
|
||||
/**
|
||||
* 创建查询权限
|
||||
* @param queryWrapper
|
||||
*/
|
||||
void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper);
|
||||
}
|
||||
|
||||
+7
@@ -58,4 +58,11 @@ public interface IProblemKnowledgeBaseUserEOService extends IService<ProblemKnow
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseUserEO> queryList();
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<ProblemKnowledgeBaseUserEO> datas,String cut);
|
||||
}
|
||||
|
||||
+17
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
@@ -12,6 +13,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -142,4 +144,19 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateReleaseStatus(JSONObject json) {
|
||||
String ids = json.getString("ids");
|
||||
String releaseStatus = json.getString("releaseStatus");
|
||||
|
||||
QueryWrapper<CountryCardManageReleaseEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(CountryCardManageReleaseEO::getId,Arrays.asList(ids.split(",")));
|
||||
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.list(queryWrapper);
|
||||
countryCardManageReleaseEOList.forEach(countryCardManageReleaseEO -> {
|
||||
countryCardManageReleaseEO.setReleaseStatus(releaseStatus);
|
||||
});
|
||||
|
||||
this.updateBatchById(countryCardManageReleaseEOList);
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -118,6 +118,7 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
@Override
|
||||
public List<CountryCardTempEO> queryList(CountryCardTempEO countryCardTempEO, HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardTempEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardTempEO, req.getParameterMap());
|
||||
queryWrapper.orderByAsc("order_num");
|
||||
List<CountryCardTempEO> result = this.list(queryWrapper);
|
||||
return result;
|
||||
}
|
||||
@@ -144,6 +145,10 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
|
||||
countryCardTemp.setCountryCardTempItemEOList(collect);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(countryCardTemp.getLableType())){
|
||||
countryCardTemp.setLableType_dicText(LableTypeEnum.getTextByValue(countryCardTemp.getLableType(),cut));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -92,6 +92,7 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseCommentEO> queryList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO, HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCommentEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<ProblemKnowledgeBaseCommentEO> result = this.list(queryWrapper);
|
||||
return result;
|
||||
}
|
||||
|
||||
+43
@@ -129,6 +129,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
public List<ProblemKnowledgeBaseEO> queryList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
this.createQueryPermission(queryWrapper);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<ProblemKnowledgeBaseEO> result = this.list(queryWrapper);
|
||||
this.disposeData(result,problemKnowledgeBaseEO.getCut());
|
||||
return result;
|
||||
@@ -181,6 +183,12 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
collectQueryWrapper.lambda().in(ProblemKnowledgeBaseCollectEO::getProblemKnowledgeBaseId,probleKnowledgeBaseIdList);
|
||||
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectQueryWrapper);
|
||||
|
||||
//查询出数据的所有的权限用户
|
||||
QueryWrapper<ProblemKnowledgeBaseUserEO> permissionUserQueryWrapper = new QueryWrapper<>();
|
||||
permissionUserQueryWrapper.lambda().in(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId,probleKnowledgeBaseIdList);
|
||||
List<ProblemKnowledgeBaseUserEO> permissionUserEOList = this.problemKnowledgeBaseUserEOService.list(permissionUserQueryWrapper);
|
||||
this.problemKnowledgeBaseUserEOService.disposeData(permissionUserEOList,cut);
|
||||
|
||||
datas.forEach(data -> {
|
||||
if(StringUtils.isNotEmpty(data.getShowPermissions())){
|
||||
data.setShowPermissions_dicText(ShowPermissionsEnum.getTextByValue(data.getShowPermissions(),cut));
|
||||
@@ -238,7 +246,42 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseCollectEOS)){
|
||||
data.setCollectEO(problemKnowledgeBaseCollectEOS.get(0));
|
||||
}
|
||||
|
||||
List<ProblemKnowledgeBaseUserEO> permissionUserEOS = permissionUserEOList.stream().filter(permissionUserEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getId(), permissionUserEO.getProblemKnowledgeBaseId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(permissionUserEOS)){
|
||||
data.setPermissionUserList(permissionUserEOS);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper) {
|
||||
/**
|
||||
* 查询权限
|
||||
* 公开:所有人都可以看到。
|
||||
* 私密:只有配置了的权限用户可以看到。
|
||||
*/
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
|
||||
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentUser.getId());
|
||||
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
|
||||
|
||||
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
|
||||
queryWrapper.lambda().and(query -> {
|
||||
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue()).
|
||||
or(o -> {
|
||||
o.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.PRIVACY.getValue());
|
||||
o.in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -3,9 +3,16 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseUserEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseUserEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -20,6 +27,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class ProblemKnowledgeBaseUserEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseUserEOMapper, ProblemKnowledgeBaseUserEO> implements IProblemKnowledgeBaseUserEOService {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -89,4 +99,30 @@ public class ProblemKnowledgeBaseUserEOServiceImpl extends ServiceImpl<ProblemKn
|
||||
public List<ProblemKnowledgeBaseUserEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<ProblemKnowledgeBaseUserEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<String> userIdList = datas.stream().map(ProblemKnowledgeBaseUserEO::getUserId).distinct().collect(Collectors.toList());
|
||||
|
||||
List<SysUser> userList = sysUserService.querySysUserListByIdList(userIdList);
|
||||
|
||||
datas.forEach(data -> {
|
||||
if(CollectionUtils.isNotEmpty(userList)){
|
||||
String userName = "";
|
||||
for (SysUser user : userList) {
|
||||
if (StringUtils.equals(data.getUserId(), user.getId())) {
|
||||
userName = user.getUsername();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(userName)){
|
||||
data.setUserName(userName);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-4
@@ -132,14 +132,24 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
saveOrUpdate(lawsMonthlyReportWriteEO);
|
||||
|
||||
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
||||
//新征求意见清单模板
|
||||
//新征求意见清单模板(先删除在新增)
|
||||
//删除
|
||||
LambdaQueryWrapper<NewOpinionTemplateEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportWriteEO.getId());
|
||||
iNewOpinionTemplateEOService.remove(wrapper);
|
||||
//新增
|
||||
List<NewOpinionTemplateEO> newOpinionTemplateEOList = lawsMonthlyReportWriteEO.getNewOpinionTemplateEOList();
|
||||
iNewOpinionTemplateEOService.updateBatchById(newOpinionTemplateEOList);
|
||||
iNewOpinionTemplateEOService.saveBatch(newOpinionTemplateEOList);
|
||||
|
||||
}else if (ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
||||
//新发布标准清单模板
|
||||
//新发布标准清单模板(先删除在新增)
|
||||
//删除
|
||||
LambdaQueryWrapper<NewStandardTemplateEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportWriteEO.getId());
|
||||
iNewStandardTemplateEOService.remove(lambdaQueryWrapper);
|
||||
//新增
|
||||
List<NewStandardTemplateEO> newStandardTemplateEOList = lawsMonthlyReportWriteEO.getNewStandardTemplateEOList();
|
||||
iNewStandardTemplateEOService.updateBatchById(newStandardTemplateEOList);
|
||||
iNewStandardTemplateEOService.saveBatch(newStandardTemplateEOList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
<a-icon type="message"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside-box" v-if="item.projectCommentVOList && item.projectCommentVOList.length > 0">
|
||||
<div class="box-content-inside" v-for="(val,indexOne) in item.projectCommentVOList" :key="indexOne">
|
||||
<div class="inside-box" v-if="item.resComVoList && item.resComVoList.length > 0">
|
||||
<div class="box-content-inside" v-for="(val,indexOne) in item.resComVoList" :key="indexOne">
|
||||
<div class="img-box">
|
||||
<img src="../../../../assets/daiban.png" class="img" alt="">
|
||||
</div>
|
||||
@@ -97,7 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'commentList',
|
||||
@@ -112,9 +112,9 @@
|
||||
confirmLoading: false,
|
||||
visibleComment: false,
|
||||
url: {
|
||||
list: '/compare/sarFileCompareResComment/list',
|
||||
add: '/sarFileCompareResComment/add',
|
||||
edit: '/project/projectReplyEO/add'
|
||||
list: '/compare/sarFileCompareResComment/queryListByInfoId',
|
||||
add: '/compare/sarFileCompareResComment/add',
|
||||
edit: '/compare/sarFileCompareResComment/edit'
|
||||
},
|
||||
rules: {
|
||||
commentContent: [
|
||||
@@ -161,7 +161,7 @@
|
||||
getList() {
|
||||
this.loading = true
|
||||
getAction(this.url.list, {
|
||||
projectLibraryId: this.$route.query.id,
|
||||
id: this.$route.query.id,
|
||||
commentContent: this.commentContent
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -178,21 +178,25 @@
|
||||
if (valid) {
|
||||
let url = ''
|
||||
let query = {}
|
||||
let Action
|
||||
if (this.title == this.$t('publishComment')) {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
query = {
|
||||
commentContent: this.formInline.commentContent,
|
||||
projectLibraryId: this.$route.query.id
|
||||
comment: this.formInline.commentContent,
|
||||
infoId: this.$route.query.id
|
||||
}
|
||||
} else if (this.title == this.$t('replyToComments')) {
|
||||
url = this.url.edit
|
||||
Action = postAction
|
||||
url = this.url.add
|
||||
query = {
|
||||
replyContent: this.formInline.replyContent,
|
||||
projectCommentId: this.formInline.projectCommentId
|
||||
comment: this.formInline.replyContent,
|
||||
parentId: this.formInline.projectCommentId,
|
||||
infoId: this.$route.query.id
|
||||
}
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(url, query).then((res) => {
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visibleComment = false
|
||||
@@ -200,7 +204,7 @@
|
||||
this.getList()
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('operationFailed'))
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+123
-61
@@ -29,43 +29,38 @@
|
||||
<div class="detail-content-header-content">
|
||||
<div class="detail-content-header-content-left"
|
||||
:class="{'detail-content-header-content-left-active':isDisplay}">
|
||||
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
|
||||
{{$t('selectedStandard')}}:{{resultData.serialNumberLeft}} {{resultData.fileNameLeft}}
|
||||
</div>
|
||||
<div class="detail-content-header-content-content"
|
||||
:class="{'detail-content-header-content-left-active':isDisplay}">
|
||||
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
|
||||
{{$t('selectedStandard')}}:{{resultData.serialNumberRight}} {{resultData.fileNameRight}}
|
||||
</div>
|
||||
<div class="detail-content-header-content-right" v-if="!isDisplay">
|
||||
操作
|
||||
{{$t('operation')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-checkbox-group @change="checkboxChange" v-model="checkboxList"
|
||||
style="width: 100%;overflow: overlay;height: calc(100vh - 300px)">
|
||||
<div class="detail-content-content" v-for="item in 4">
|
||||
<a-checkbox value="A" class="detail-checkbox">
|
||||
<div class="detail-content-content" v-for="(item,index) in resultData.resList">
|
||||
<a-checkbox :value="item.id" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板
|
||||
sdf kdsf kljsfkldsfdsfdsf
|
||||
<span>{{item.itemsNumLeft}}</span>
|
||||
<span style="margin-left: 10px">{{item.itemsNameLeft}}</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextLeft"></div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范
|
||||
<span>{{item.itemsNumRight}}</span>
|
||||
<span style="margin-left: 10px">{{item.itemsNameRight}}</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextRight"></div>
|
||||
</div>
|
||||
<div class="detail-content-bottom">
|
||||
<div class="detail-content-bottom-left" :title="$t('comparisonDifferenceComment')">
|
||||
@@ -73,41 +68,27 @@
|
||||
{{$t('comparisonDifferenceComment')}}:
|
||||
</div>
|
||||
<div class="detail-content-bottom-right">
|
||||
差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异
|
||||
{{item.comment}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right" v-if="!isDisplay">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button" @click="comparaEdit">{{$t('edit')}}</a>
|
||||
<a class="text-button" @click="comparaDelete">{{$t('delete')}}</a>
|
||||
<a class="text-button" @click="comparaEdit(item)">{{$t('edit')}}</a>
|
||||
<a class="text-button" @click="comparaDelete(item)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox value="D" class="detail-checkbox">
|
||||
<a-checkbox @change="fullCheckboxChange" v-model="fullCheckbox" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-content-text-left-text">
|
||||
{{$t('fullTextComments')}}: 文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
{{$t('fullTextComments')}}: {{resultData.comments}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right" v-if="!isDisplay">
|
||||
@@ -133,7 +114,7 @@
|
||||
<a-button key="back" @click="visible = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="fullTextCommentsSubmit">
|
||||
<a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit">
|
||||
{{$t('submit')}}
|
||||
</a-button>
|
||||
</template>
|
||||
@@ -142,9 +123,9 @@
|
||||
<div class="title-text-Remarks" :title="$t('fullTextComments')">
|
||||
<span>{{$t('fullTextComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="dreUserIdName">
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('fullTextComments')"
|
||||
v-model="formInlineText.fullTextComments"
|
||||
v-model="formInlineText.comment"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -152,9 +133,9 @@
|
||||
<div class="title-text-Remarks" :title="$t('comparativeComments')">
|
||||
<span>{{$t('comparativeComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="dreUserIdName">
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('comparativeComments')"
|
||||
v-model="formInlineText.comparativeComments"
|
||||
v-model="formInlineText.comment"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -168,6 +149,7 @@
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import commentList from './commentList'
|
||||
import { putAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'comparisonResults',
|
||||
@@ -185,7 +167,9 @@
|
||||
title: '',
|
||||
indeterminate: false,
|
||||
checkAll: false,
|
||||
isDisplay: false
|
||||
isDisplay: false,
|
||||
fullCheckbox: false,
|
||||
resultData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -210,51 +194,129 @@
|
||||
},
|
||||
getData() {
|
||||
let query = {
|
||||
id: this.$route.query.id
|
||||
id: this.$route.query.id,
|
||||
infoId: this.$route.query.id
|
||||
}
|
||||
getAction('/compare/sarFileCompareItemComment/list', query).then((res) => {
|
||||
this.loading = true
|
||||
getAction('/compare/sarFileCompareItemComment/queryCompareResult', query).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
this.resultData = res.result || {}
|
||||
this.loading = false
|
||||
} else {
|
||||
this.resultData = {}
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
checkboxChange(checkedList) {
|
||||
this.indeterminate = !!checkedList.length && checkedList.length < this.checkboxList.length
|
||||
this.checkAll = checkedList.length === this.checkboxList.length
|
||||
this.indeterminate = !!checkedList.length && checkedList.length < this.resultData.resList.length || (this.fullCheckbox && this.checkboxList.length < this.resultData.resList.length) || (!this.fullCheckbox && !!checkedList.length)
|
||||
this.checkAll = checkedList.length === this.resultData.resList.length && this.fullCheckbox
|
||||
},
|
||||
fullCheckboxChange(event) {
|
||||
this.indeterminate = !!this.checkboxList.length && this.checkboxList.length < this.resultData.resList.length || (event.target.checked && this.checkboxList.length < this.resultData.resList.length) || (!this.fullCheckbox && !!this.checkboxList.length)
|
||||
this.checkAll = this.checkboxList.length === this.resultData.resList.length && event.target.checked
|
||||
},
|
||||
onChange(event) {
|
||||
this.checkAll = event.target.checked
|
||||
if (event.target.checked) {
|
||||
this.checkboxList = ['A', 'B', 'C', 'D']
|
||||
this.resultData.resList.forEach(res => {
|
||||
this.checkboxList.push(res.id)
|
||||
})
|
||||
this.fullCheckbox = true
|
||||
this.indeterminate = false
|
||||
} else {
|
||||
this.checkboxList = []
|
||||
this.fullCheckbox = false
|
||||
}
|
||||
if (this.checkboxList.length == 0) {
|
||||
if (this.checkboxList.length == 0 && !this.fullCheckbox) {
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
}
|
||||
},
|
||||
fullTextCommentsSubmit() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
this.$refs.ruleFormText.validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
if (this.title == this.$t('fullTextComments')) {
|
||||
this.fullTextComments()
|
||||
} else {
|
||||
this.comparaComments()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fullTextEdit() {
|
||||
this.visible = true
|
||||
this.title = this.$t('fullTextComments')
|
||||
this.formInlineText = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormText.clearValidate()
|
||||
fullTextComments() {
|
||||
this.confirmLoading = true
|
||||
let query = {
|
||||
id: this.$route.query.id,
|
||||
comments: this.formInlineText.comment
|
||||
}
|
||||
putAction('/compare/sarFileCompareInfo/editComments', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
this.visible = false
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
comparaEdit() {
|
||||
comparaComments() {
|
||||
this.confirmLoading = true
|
||||
let query = {
|
||||
infoId: this.$route.query.id,
|
||||
id: this.formInlineText.id,
|
||||
comment: this.formInlineText.comment
|
||||
}
|
||||
putAction('/compare/sarFileCompareItemComment/edit', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
this.visible = false
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
fullTextEdit(item) {
|
||||
this.visible = true
|
||||
this.title = this.$t('comparativeComments')
|
||||
this.formInlineText = {}
|
||||
this.title = this.$t('fullTextComments')
|
||||
this.formInlineText.comment = this.resultData.comments || ''
|
||||
this.formInlineText = { ...this.formInlineText }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormText.clearValidate()
|
||||
this.rulesText = {
|
||||
comment: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('fullTextComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
this.rulesText = { ...this.rulesText }
|
||||
})
|
||||
},
|
||||
comparaEdit(item) {
|
||||
this.visible = true
|
||||
this.title = this.$t('comparativeComments')
|
||||
this.formInlineText = JSON.parse(JSON.stringify(item))
|
||||
this.formInlineText = { ...this.formInlineText }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormText.clearValidate()
|
||||
this.rulesText = {
|
||||
comment: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('comparativeComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
this.rulesText = { ...this.rulesText }
|
||||
})
|
||||
},
|
||||
comparaDelete(val) {
|
||||
@@ -262,10 +324,10 @@
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
|
||||
deleteAction('/compare/sarFileCompareItemComment/delete', { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
_this.getData()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
|
||||
+48
-17
@@ -45,7 +45,7 @@
|
||||
<div class="detail-content-content-right">
|
||||
<div class="detail-content-content-right-data" @click="detailLeft(index,item)"
|
||||
v-for="(item,index) in resultData.textLeft"
|
||||
:class="{'detail-content-content-right-data-blue':false}">
|
||||
:class="{'detail-content-content-right-data-blue':item.reviewed == '1'?true:false}">
|
||||
<div class="detail-content-content-right-data-text" style="margin-bottom: 10px;color: #040B29">
|
||||
{{item.itemsNum + ' ' + item.itemsName}}
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
<div class="detail-content-content-right-right">
|
||||
<div class="detail-content-content-right-data-right" @click="detailRight(index,item)"
|
||||
v-for="(item,index) in resultData.textRight"
|
||||
:class="{'detail-content-content-right-data-blue-right':false}">
|
||||
:class="{'detail-content-content-right-data-blue-right':item.reviewed == '1'?true:false}">
|
||||
<div class="detail-content-content-right-data-text" style="margin-bottom: 10px;color: #040B29">
|
||||
{{item.itemsNum + ' ' + item.itemsName}}
|
||||
</div>
|
||||
@@ -119,7 +119,7 @@
|
||||
<a-button type="primary" @click="fullTextCommentsEdit">
|
||||
{{$t('edit')}}
|
||||
</a-button>
|
||||
<a-button type="primary" :confirm-loading="confirmLoading" @click="fullTextCommentsSubmit">
|
||||
<a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit">
|
||||
{{$t('submit')}}
|
||||
</a-button>
|
||||
</template>
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('fullTextComments')"
|
||||
v-model="formInlineText.comment"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:disabled="fullTextDisabled"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -142,7 +142,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postAction } from '../../../../api/manage'
|
||||
import { postAction, putAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'documentDataComparison',
|
||||
@@ -207,6 +207,28 @@
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
this.formInline = {}
|
||||
this.resultData.textRight.forEach(val => {
|
||||
if (val.id == this.dataRight.id) {
|
||||
val.reviewed = 1
|
||||
}
|
||||
})
|
||||
this.resultData.textLeft.forEach(val => {
|
||||
if (val.id == this.dataLeft.id) {
|
||||
val.reviewed = 1
|
||||
}
|
||||
})
|
||||
this.resultData = { ...this.resultData }
|
||||
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
|
||||
if (detailLeftColor && detailLeftColor.length > 0) {
|
||||
detailLeftColor[0].classList.remove('detail-content-content-right-data-color')
|
||||
}
|
||||
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
|
||||
if (detailRightColor && detailRightColor.length > 0) {
|
||||
detailRightColor[0].classList.remove('detail-content-content-right-data-color-right')
|
||||
}
|
||||
this.dataLeft = {}
|
||||
this.dataRight = {}
|
||||
// this.$router.push({
|
||||
// path: '/documentComparison'
|
||||
// })
|
||||
@@ -230,7 +252,11 @@
|
||||
},
|
||||
addFullTextCommentClick() {
|
||||
this.visible = true
|
||||
this.fullTextDisabled = true
|
||||
if (this.formInlineText.comment) {
|
||||
this.fullTextDisabled = true
|
||||
} else {
|
||||
this.fullTextDisabled = false
|
||||
}
|
||||
},
|
||||
turnOffAutomaticMatchingClick() {
|
||||
this.isMatching = !this.isMatching
|
||||
@@ -242,16 +268,17 @@
|
||||
fullTextCommentsSubmit() {
|
||||
this.$refs.ruleFormText.validate(valid => {
|
||||
if (valid) {
|
||||
let formInlineText = JSON.parse(JSON.stringify(this.formInlineText))
|
||||
this.confirmLoading = true
|
||||
let query = {
|
||||
infoId: this.$route.query.id,
|
||||
comment: this.formInlineText.comment
|
||||
id: this.$route.query.id,
|
||||
comments: formInlineText.comment
|
||||
}
|
||||
postAction('/compare/sarFileCompareItemComment/add', query).then((res) => {
|
||||
putAction('/compare/sarFileCompareInfo/editComments', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
this.fullTextDisabled = false
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
@@ -269,6 +296,8 @@
|
||||
postAction('/compare/sarFileCompareInfo/getComparisonDetail', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.resultData = res.result || {}
|
||||
this.formInlineText.comment = res.result.comments || ''
|
||||
this.formInlineText = { ...this.formInlineText }
|
||||
this.loading = false
|
||||
} else {
|
||||
this.resultData = {}
|
||||
@@ -298,10 +327,10 @@
|
||||
}
|
||||
let detailContent = document.getElementsByClassName('detail-content-content-right-right-top')
|
||||
let detailRight = document.getElementsByClassName('detail-content-content-right-data-right')
|
||||
this.dataRight = this.resultData.textRight[item.targetStand - 1]
|
||||
this.dataRight = this.resultData.textRight[item.targetStand]
|
||||
if (detailRight && detailRight.length > 0) {
|
||||
detailRight[item.itemsDisplayNum - 1].classList.add('detail-content-content-right-data-color-right')
|
||||
detailContent[0].scrollTop = detailRight[item.targetStand - 1].offsetTop - 150
|
||||
detailRight[item.targetStand].classList.add('detail-content-content-right-data-color-right')
|
||||
detailContent[0].scrollTop = detailRight[item.targetStand].offsetTop - 150
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -324,12 +353,12 @@
|
||||
if (detailLeftColor && detailLeftColor.length > 0) {
|
||||
detailLeftColor[0].classList.remove('detail-content-content-right-data-color')
|
||||
}
|
||||
this.dataLeft = this.resultData.textLeft[item.targetStand - 1]
|
||||
this.dataLeft = this.resultData.textLeft[item.targetStand]
|
||||
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
|
||||
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
||||
if (detailLeft && detailLeft.length > 0) {
|
||||
detailLeft[item.itemsDisplayNum - 1].classList.add('detail-content-content-right-data-color')
|
||||
detailContent[0].scrollTop = detailLeft[item.targetStand - 1].offsetTop - 150
|
||||
detailLeft[item.targetStand].classList.add('detail-content-content-right-data-color')
|
||||
detailContent[0].scrollTop = detailLeft[item.targetStand].offsetTop - 150
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -489,8 +518,9 @@
|
||||
|
||||
.detail-content-content-left {
|
||||
width: 180px;
|
||||
height: auto;
|
||||
height: 520px;
|
||||
float: left;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.detail-content-content-right-top {
|
||||
@@ -510,6 +540,7 @@
|
||||
.detail-content-content-right {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
|
||||
}
|
||||
|
||||
.detail-content-content-right-right {
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'releaseState'
|
||||
dataIndex: 'releaseStateTitle'
|
||||
},
|
||||
{
|
||||
title: this.$t('remarks'),
|
||||
@@ -294,8 +294,31 @@
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
subscribe() {
|
||||
|
||||
subscribe(record) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: record.releaseState == 'draft' ? _this.$t('confirmRelease') : _this.$t('confirmWithdraw'),
|
||||
onOk() {
|
||||
let releaseState = ''
|
||||
if (record.releaseState == 'draft') {
|
||||
releaseState = 'draft'
|
||||
} else {
|
||||
releaseState = 'published'
|
||||
}
|
||||
let query = {
|
||||
releaseState: releaseState,
|
||||
id: record.id
|
||||
}
|
||||
postAction('/compare/sarFileCompareInfo/changeState', query).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
let newUrl = this.$router.resolve({
|
||||
|
||||
Reference in New Issue
Block a user