Merge remote-tracking branch 'origin/dev_third_stage'

This commit is contained in:
zer0Black
2022-07-01 15:01:16 +08:00
36 changed files with 2607 additions and 2181 deletions
@@ -54,7 +54,7 @@
<if test="paramsCollectManifestEO.userTypes !=null and paramsCollectManifestEO.userTypes !=''">
<choose>
<when test="paramsCollectManifestEO.userTypes == 'sdt'">
AND sdt = #{paramsCollectManifestEO.sdt} AND state in ('2','4','5','6','7')
AND sdt = #{paramsCollectManifestEO.sdt} AND state in ('2','4','5','6','7','8')
</when>
<when test="paramsCollectManifestEO.userTypes == 'dre'">
AND dre = #{paramsCollectManifestEO.dreForAuth} AND state in ('4','6','7','8')
@@ -102,6 +102,8 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
boolean getManifestConfigFlag(String paramsManifestId);
Map<String, List<ParamsCollectManifestEO>> queryByManifestIdList(List<String> manifestIdList);
// 退回
boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO);
@@ -62,4 +62,11 @@ public interface IParamsConfigDataEOService extends IService<ParamsConfigDataEO>
* @return
*/
List<ParamsConfigDataEO> queryList();
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
List<ParamsConfigDataEO> queryListByConfigIdList(List<String> configIdList);
}
@@ -1,8 +1,11 @@
package com.jero.modules.cert.collect.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
import com.jero.modules.cert.collect.entity.ParamsConfigDataHistoryEO;
import java.util.List;
/**
* @Description: 参数配置数据历史版本
* @Author: jero-boot
@@ -19,4 +22,11 @@ public interface IParamsConfigDataHistoryEOService extends IService<ParamsConfig
* @return
*/
ParamsConfigDataHistoryEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
List<ParamsConfigDataHistoryEO> queryListByConfigIdList(List<String> configIdList);
}
@@ -166,6 +166,18 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
paramsCollectManifestEOList.add(target);
}
// 判断清单状态是否为已完成,若是,更改为收集中
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
if (ManifestStateEnum.FINISHED.getValue().equals(paramsManifestEO.getState())) {
// 更新清单状态和完成时间
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
updateParamsManifestEO.setId(paramsManifestId);
updateParamsManifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
updateParamsManifestEO.setFinishTime(null);
paramsManifestEOService.updateById(updateParamsManifestEO);
}
return saveBatch(paramsCollectManifestEOList);
}
@@ -217,6 +229,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
return getById(id);
}
private ParamsConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsConfigDataEO> paramsConfigDataEOList) {
List<ParamsConfigDataEO> configDataEOList = paramsConfigDataEOList.stream().filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(configDataEOList)) {
return configDataEOList.get(0);
}
return null;
}
/**
* 列表查询
*
@@ -255,6 +275,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
}
List<ParamsCollectManifestEO> list = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
// 普通数据字典
List<SysDictItem> dictItemList = new ArrayList<>();
@@ -318,7 +340,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId();
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
// ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
ParamsConfigDataEO paramsConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
configMap.put("controlType", controlType);
configMap.put("list", paramsConfigDataVOList);
@@ -1027,6 +1050,20 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
}
}
@Override
public Map<String, List<ParamsCollectManifestEO>> queryByManifestIdList(List<String> manifestIdList){
Map<String, List<ParamsCollectManifestEO>> map = new HashMap<>();
LambdaQueryWrapper<ParamsCollectManifestEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ParamsCollectManifestEO::getParamsManifestId, manifestIdList);
List<ParamsCollectManifestEO> list = list(queryWrapper);
for (String manifestId : manifestIdList) {
List<ParamsCollectManifestEO> collectManifestEOList = list.stream().filter(e->manifestId.equals(e.getParamsManifestId())).collect(Collectors.toList());
map.put(manifestId, collectManifestEOList);
}
return map;
}
@Override
public boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
@@ -1490,7 +1527,24 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理
updateEOList.add(updateEO);
}
return updateBatchById(updateEOList);
boolean isSuccess = updateBatchById(updateEOList);
// 判断清单是否已完成,修改清单状态
Map<String, Object> map = isCollectFinished(paramsManifestId);
Boolean finish = (Boolean) map.get("finish");
Date time = (Date) map.get("time");
if (finish) {
// 更新清单状态和完成时间
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
updateParamsManifestEO.setId(paramsManifestId);
updateParamsManifestEO.setState(ManifestStateEnum.FINISHED.getValue());
updateParamsManifestEO.setFinishTime(time);
paramsManifestEOService.updateById(updateParamsManifestEO);
}
return isSuccess;
}
/**
@@ -58,6 +58,14 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
private IOSSFileService ossFileService;
private ParamsConfigDataHistoryEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsConfigDataHistoryEO> paramsConfigDataEOList) {
List<ParamsConfigDataHistoryEO> configDataEOList = paramsConfigDataEOList.stream().filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(configDataEOList)) {
return configDataEOList.get(0);
}
return null;
}
/**
* 列表查询
*
@@ -69,6 +77,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
List<ParamsCollectManifestHistoryEO> list = paramsCollectManifestHistoryEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列
List<ParamsConfigHistoryEO> paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
List<ParamsConfigDataHistoryEO> paramsConfigDataEOList = paramsConfigDataHistoryEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
// 普通数据字典
List<SysDictItem> dictItemList = new ArrayList<>();
@@ -132,8 +143,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId();
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataHistoryEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
// ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataHistoryEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
ParamsConfigDataHistoryEO paramsConfigDataHistoryEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataHistoryEO, collectManifestEO); // 重新组合配置数据
configMap.put("controlType", controlType);
configMap.put("list", paramsConfigDataVOList);
manifestMap.put(paramsConfigEO.getId(), configMap);
@@ -166,7 +178,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
* @param paramsCollectManifestEO
* @return
*/
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigEO paramsConfigEO, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestHistoryEO paramsCollectManifestEO) {
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigEO paramsConfigEO, ParamsConfigDataHistoryEO paramsConfigDataEO, ParamsCollectManifestHistoryEO paramsCollectManifestEO) {
List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
String templateId = null;
String templateName = null;
@@ -1,5 +1,6 @@
package com.jero.modules.cert.collect.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
@@ -107,4 +108,19 @@ public class ParamsConfigDataEOServiceImpl extends ServiceImpl<ParamsConfigDataE
public List<ParamsConfigDataEO> queryList() {
return list();
}
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
@Override
public List<ParamsConfigDataEO> queryListByConfigIdList(List<String> configIdList) {
if (CollectionUtil.isNotEmpty(configIdList)) {
LambdaQueryWrapper<ParamsConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ParamsConfigDataEO::getParamsConfigId, configIdList);
return list(queryWrapper);
}
return null;
}
}
@@ -1,12 +1,16 @@
package com.jero.modules.cert.collect.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
import com.jero.modules.cert.collect.entity.ParamsConfigDataHistoryEO;
import com.jero.modules.cert.collect.mapper.ParamsConfigDataHistoryEOMapper;
import com.jero.modules.cert.collect.service.IParamsConfigDataHistoryEOService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description: 参数配置数据历史版本
* @Author: jero-boot
@@ -31,4 +35,19 @@ public class ParamsConfigDataHistoryEOServiceImpl extends ServiceImpl<ParamsConf
getOne(queryWrapper);
return getOne(queryWrapper);
}
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
@Override
public List<ParamsConfigDataHistoryEO> queryListByConfigIdList(List<String> configIdList) {
if (CollectionUtil.isNotEmpty(configIdList)) {
LambdaQueryWrapper<ParamsConfigDataHistoryEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ParamsConfigDataHistoryEO::getParamsConfigId, configIdList);
return list(queryWrapper);
}
return null;
}
}
@@ -107,9 +107,11 @@ public class ParamsConfigEOServiceImpl extends ServiceImpl<ParamsConfigEOMapper,
});
// saveBatch(addConfigList);
// 修改所有参数项状态为:待发起收集
if (CollectionUtil.isNotEmpty(paramsCollectManifestEOList)) {
List<ParamsCollectManifestEO> updateList = paramsCollectManifestEOList.stream()
.filter(e-> !CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(updateList)) {
List<ParamsCollectManifestEO> updateCollectManifestEOList = new ArrayList<>();
paramsCollectManifestEOList.forEach(collectManifestEO -> {
updateList.forEach(collectManifestEO -> {
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
updateCollectManifestEO.setId(collectManifestEO.getId());
updateCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
@@ -80,6 +80,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
@Autowired
private IParamsConfigEOService paramsConfigEOService;
@Autowired
private IParamsConfigDataEOService paramsConfigDataEOService;
/**
@@ -288,8 +292,12 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
IPage rows = paramsManifestEOMapper.pageInfo(page, paramsManifestEO);
// 根据参数项状态更新清单状态
List<ParamsManifestEO> paramsManifestEOList = rows.getRecords();
paramsManifestEOList.forEach(manifestEO -> {
Map<String, Object> map = paramsCollectManifestEOService.isCollectFinished(manifestEO.getId());
if (CollectionUtil.isNotEmpty(paramsManifestEOList)) {
List<String> manifestIdList = paramsManifestEOList.stream().map(ParamsManifestEO::getId).collect(Collectors.toList());
Map<String, List<ParamsCollectManifestEO>> manifestMap = paramsCollectManifestEOService.queryByManifestIdList(manifestIdList);
paramsManifestEOList.forEach(manifestEO -> {
/*Map<String, Object> map = paramsCollectManifestEOService.isCollectFinished(manifestEO.getId());
Boolean finish = (Boolean) map.get("finish");
Date time = (Date) map.get("time");
if (finish) {
@@ -304,8 +312,6 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateById(updateParamsManifestEO);
} else {
manifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
manifestEO.setFinishTime(null);
if (ManifestStateEnum.FINISHED.getValue().equals(manifestEO.getState())) {
// 更新清单状态和完成时间
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
@@ -314,19 +320,29 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateParamsManifestEO.setFinishTime(null);
updateById(updateParamsManifestEO);
}
}
manifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
manifestEO.setFinishTime(null);
// 添加配置标识,清单参数项状态为 待发起、变更时,可添加配置
boolean configFlag = paramsCollectManifestEOService.getManifestConfigFlag(manifestEO.getId());
manifestEO.setConfigFlag(configFlag);
}*/
});
// 添加配置标识,清单参数项状态为 待发起、变更时,可添加配置
boolean configFlag = getManifestConfigFlag(manifestMap.get(manifestEO.getId()));
manifestEO.setConfigFlag(configFlag);
});
}
return rows;
}
@Autowired
private IParamsConfigDataEOService paramsConfigDataEOService;
private boolean getManifestConfigFlag(List<ParamsCollectManifestEO> list) {
int number = (int) list.stream().filter(e->CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())
|| CollectManifestStateEnum.CHANGE.getValue().equals(e.getState())).count();
if (number == list.size() && list.size() > 0) {
return true;
} else {
return false;
}
}
/**
* 变更扩展
@@ -468,6 +484,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateManifestEO.setId(id);
updateManifestEO.setVersion(paramsManifestEO.getVersion() + 1);
updateManifestEO.setParamsTemplatePublishVersion(newestVersion);
updateManifestEO.setState(ManifestStateEnum.COLLECTING.getValue()); // 变更扩展后,清单状态为收集中
return updateById(updateManifestEO);
}
@@ -5,6 +5,7 @@ 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.aspect.annotation.AutoLog;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
@@ -188,9 +189,14 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
@GetMapping(value = "/copyById")
@RequiresPermissions("params:template:copy")
public Result<?> copyById(@RequestParam(name="id") String id,
@RequestParam(name="paramsTemplateName") String paramsTemplateName) {
@RequestParam(name="paramsTemplateName") String paramsTemplateName,
@RequestParam(name="cut") String cut) {
ParamsTemplateEO paramsTemplateEO = paramsTemplateEOService.copyById(id, paramsTemplateName);
return Result.OK("复制成功", paramsTemplateEO);
if (CutEnum.EN.getValue().equals(cut)) {
return Result.OK("Copy successful", paramsTemplateEO);
} else {
return Result.OK("复制成功", paramsTemplateEO);
}
}
@@ -8,8 +8,8 @@ import org.apache.commons.lang3.StringUtils;
*/
public enum GatherResultEnum {
UNDERWAY("进行中","underway","underway"),
COMPLETED("已完成","completed","completed"),
UNDERWAY("进行中","Underway","Underway"),
COMPLETED("已完成","Completed","Completed"),
;
@@ -0,0 +1,64 @@
package com.jero.modules.lawsOpinionGather.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.api.vo.Result;
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 法规意见收集表 - 定时器
* 作用:当前日期大于等于截止日志的时候,把该数据的收集结果,更新为已完成,同时把当前这条数据的所有待办任务提交
*/
@Slf4j
public class LawsOpinionGatherJob implements Job {
@Autowired
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
@Autowired
private WorkFlowFeignClient workFlowFeignClient;
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.info("法规意见收集流程,定时任务开启 =====================================================");
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
lawsOpinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.lawsOpinionGatherEOService.list(lawsOpinionGatherEOQueryWrapper);
if (CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)) {
Date currentDate = new Date();
List<LawsOpinionGatherEO> updateLawsOpinionGatherEOList = lawsOpinionGatherEOList.stream().filter(e -> {
boolean flag = false;
if(currentDate.after(e.getEndTime())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(updateLawsOpinionGatherEOList)){
List<String> actiProcInstIdList = updateLawsOpinionGatherEOList.stream().map(LawsOpinionGatherEO::getActiProcInstId).distinct().collect(Collectors.toList());
String actiProcInstIds = StringUtils.join(actiProcInstIdList,",");
//将这些流程实例下的待办任务提交
Result<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
if(result.getCode().equals(CommonConstant.SC_OK_200)){
updateLawsOpinionGatherEOList.forEach(lawsOpinionGatherEO -> {
lawsOpinionGatherEO.setGatherResult(GatherResultEnum.COMPLETED.getValue());
});
this.lawsOpinionGatherEOService.updateBatchById(updateLawsOpinionGatherEOList);
}
}
}
log.info("法规意见收集流程,定时任务开启 =====================================================");
}
}
@@ -53,8 +53,9 @@ public class LawsMonthlyReportTitleTemplateEOController extends JeroController<L
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportTitleTemplateEO, req.getParameterMap());
Page<LawsMonthlyReportTitleTemplateEO> page = new Page<LawsMonthlyReportTitleTemplateEO>(pageNo, pageSize);
IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.page(page, queryWrapper);
// Page<LawsMonthlyReportTitleTemplateEO> page = new Page<LawsMonthlyReportTitleTemplateEO>(pageNo, pageSize);
// IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.page(page, queryWrapper);
IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.getPageInfo(pageNo,pageSize, queryWrapper);
return Result.OK(pageList);
}
@@ -167,4 +168,17 @@ public class LawsMonthlyReportTitleTemplateEOController extends JeroController<L
return super.importExcel(request, response, LawsMonthlyReportTitleTemplateEO.class);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "月报标题模板-列表查询")
@ApiOperation(value="月报标题模板-列表查询", notes="月报标题模板-列表查询")
@GetMapping(value = "/oneMenu")
public Result<List<LawsMonthlyReportTitleTemplateEO>> OneMenuList() {
List<LawsMonthlyReportTitleTemplateEO> list = lawsMonthlyReportTitleTemplateEOService.OneMenuList();
return Result.OK(list);
}
}
@@ -1,21 +1,21 @@
package com.jero.modules.report.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.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.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@@ -76,4 +76,14 @@ public class LawsMonthlyReportTitleTemplateEO implements Serializable {
@ApiModelProperty(value = "英文标题")
private java.lang.String titleEn;
@TableField(exist = false)
private List<LawsMonthlyReportTitleTemplateEO> children = new ArrayList<>();
//标识(上移-->0,下移-->1)
@TableField(exist = false)
private String flag;
//排序
private int sort;
}
@@ -11,5 +11,6 @@
<result column="parent_id" property="parentId" />
<result column="title_cn" property="titleCn" />
<result column="title_en" property="titleEn" />
<result column="sort" property="sort" />
</resultMap>
</mapper>
@@ -1,7 +1,10 @@
package com.jero.modules.report.service;
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
import java.util.List;
/**
@@ -58,4 +61,18 @@ public interface ILawsMonthlyReportTitleTemplateEOService extends IService<LawsM
* @return
*/
List<LawsMonthlyReportTitleTemplateEO> queryList();
/**
* 分页
* @param pageNo
* @param pageSize
* @param queryWrapper
* @return
*/
IPage<LawsMonthlyReportTitleTemplateEO> getPageInfo(Integer pageNo,Integer pageSize, QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper);
/**
* 以及菜单
*/
List<LawsMonthlyReportTitleTemplateEO> OneMenuList();
}
@@ -1,12 +1,22 @@
package com.jero.modules.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
import com.jero.modules.report.mapper.LawsMonthlyReportTitleTemplateEOMapper;
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
import com.jero.modules.system.util.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 月报标题模板
@@ -25,7 +35,29 @@ public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<Law
*/
@Override
public void add(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) {
Date now = new Date();
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = this.list();
List<LawsMonthlyReportTitleTemplateEO> parent = lawsMonthlyReportTitleTemplateEOS.stream().filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
List<LawsMonthlyReportTitleTemplateEO> children = lawsMonthlyReportTitleTemplateEOS.stream().filter(e -> StringUtils.isNotBlank(e.getParentId())).collect(Collectors.toList());
int sort = 0;
if(StringUtils.isBlank(lawsMonthlyReportTitleTemplateEO.getParentId())){
if(parent.size() == 0){
lawsMonthlyReportTitleTemplateEO.setSort(0);
}else{
List<Integer> sortList = parent.stream().map(LawsMonthlyReportTitleTemplateEO::getSort).collect(Collectors.toList());
Collections.sort(sortList);
sort = sortList.get(sortList.size()-1) + 1;
}
}else{
if(children.size() == 0){
lawsMonthlyReportTitleTemplateEO.setSort(0);
}else{
List<Integer> sortList = parent.stream().map(LawsMonthlyReportTitleTemplateEO::getSort).collect(Collectors.toList());
Collections.sort(sortList);
sort = sortList.get(sortList.size()-1) + 1;
}
}
lawsMonthlyReportTitleTemplateEO.setSort(sort);
Date now = new Date();
lawsMonthlyReportTitleTemplateEO.setCreateTime(now);
lawsMonthlyReportTitleTemplateEO.setUpdateTime(now);
save(lawsMonthlyReportTitleTemplateEO);
@@ -86,4 +118,71 @@ public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<Law
public List<LawsMonthlyReportTitleTemplateEO> queryList() {
return list();
}
@Override
public IPage<LawsMonthlyReportTitleTemplateEO> getPageInfo( Integer pageNo,Integer pageSize,QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper) {
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = this.list();
List<LawsMonthlyReportTitleTemplateEO> parentList = lawsMonthlyReportTitleTemplateEOS.stream()
.filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
Collections.sort(parentList, new Comparator<LawsMonthlyReportTitleTemplateEO>() {
@Override
public int compare(LawsMonthlyReportTitleTemplateEO p1, LawsMonthlyReportTitleTemplateEO p2) {
return String.valueOf(p1.getSort()).compareTo(String.valueOf(p2.getSort()));
}
});
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : parentList) {
List<LawsMonthlyReportTitleTemplateEO> children = lawsMonthlyReportTitleTemplateEOS.stream()
.filter(e -> lawsMonthlyReportTitleTemplateEO.getId().equals(e.getParentId())).collect(Collectors.toList());
if(children.size() != 0){
Collections.sort(children, new Comparator<LawsMonthlyReportTitleTemplateEO>() {
@Override
public int compare(LawsMonthlyReportTitleTemplateEO p1, LawsMonthlyReportTitleTemplateEO p2) {
return String.valueOf(p1.getSort()).compareTo(String.valueOf(p2.getSort()));
}
});
lawsMonthlyReportTitleTemplateEO.setChildren(children);
}
}
Page pages = getPages(pageNo, pageSize, parentList);
return pages;
}
/**
* 以及菜单
* @return
*/
@Override
public List<LawsMonthlyReportTitleTemplateEO> OneMenuList() {
LambdaQueryWrapper<LawsMonthlyReportTitleTemplateEO> wrapper = new LambdaQueryWrapper<>();
wrapper.isNull(LawsMonthlyReportTitleTemplateEO::getParentId);
return this.list(wrapper);
}
public Page getPages(Integer currentPage, Integer pageSize, List<LawsMonthlyReportTitleTemplateEO> list){
Page page =new Page();
if(list==null){
return null;
}
int size = list.size();
if(pageSize > size){
pageSize = size;
}
if(pageSize!=0){
//求出最⼤页数,防⽌currentPage越界
int maxPage = size % pageSize ==0? size / pageSize : size / pageSize +1;
if(currentPage > maxPage){
currentPage = maxPage;
}
}
//当前页第⼀条数据的下标
int curIdx = currentPage >1?(currentPage -1)* pageSize :0;
List pageList =new ArrayList();
//将当前页的数据放进pageList
for(int i =0; i < pageSize && curIdx + i < size; i++){
pageList.add(list.get(curIdx + i));
}
page.setCurrent(currentPage).setSize(pageSize).setTotal(list.size()).setRecords(pageList);
return page;
}
}
@@ -135,4 +135,6 @@ public interface WorkFlowFeignClient {
@RequestMapping(value = "/bat-wkflow/task/queryProcessHistoryByPrcId",method = RequestMethod.GET)
List<Map<String, Object>> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId, @RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu);
@RequestMapping(value = "/bat-wkflow/task/completeTaskByPids",method = RequestMethod.GET)
Result<String> completeTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds);
}
+2
View File
@@ -1028,6 +1028,7 @@ module.exports = {
FNumber: 'Number',
NNNiONumber: 'Number',
NNiONumber: 'NIO Number',
ParameterNo: 'Number',
NRequired: 'Is Must',
NParameterName: 'Params Name',
NtechnicalField: 'Technical Field',
@@ -1063,4 +1064,5 @@ module.exports = {
Templatenamelist: 'Template name - parameter item collection list',
newNiONumber: 'Number',
English: 'English',
requiredParametersEmpty:'Required parameters cannot be empty',
}
+2
View File
@@ -1033,6 +1033,7 @@ module.exports = {
FNumber: '账号',
NNNiONumber: 'NIO编号',
NNiONumber: 'NIO编号',
ParameterNo: '编号',
NRequired: '是否必填',
NParameterName: '参数名称',
NtechnicalField: '技术领域',
@@ -1067,4 +1068,5 @@ module.exports = {
Templatenamelist: '模板名称-参数项收集清单',
newNiONumber: 'NIO编号',
English:'英文',
requiredParametersEmpty:'必填参数不能为空',
}
+198 -170
View File
@@ -1,7 +1,7 @@
<template>
<div style="height: 100%">
<div class='box'>
<!-- 纯文本-->
<!-- 纯文本-->
<div v-if='detailDate.controlType === "1"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
@@ -20,7 +20,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -28,7 +28,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -37,7 +37,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -45,7 +45,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -53,7 +53,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -62,7 +62,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -71,7 +71,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -80,7 +80,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -89,16 +89,17 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 纯下拉单选-->
<!-- 纯下拉单选-->
<div v-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -108,11 +109,12 @@
</div>
</div>
</div>
<!-- 纯下拉多选-->
<!-- 纯下拉多选-->
<div v-if='detailDate.controlType === "3"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -122,7 +124,7 @@
</div>
</div>
</div>
<!-- 纯附件-->
<!-- 纯附件-->
<div v-if='detailDate.controlType === "4"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="file"'>
@@ -134,11 +136,12 @@
</div>
</div>
</div>
<!-- 文本+下拉单选-->
<!-- 文本+下拉单选-->
<div v-if='detailDate.controlType === "5"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
@@ -162,7 +165,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -170,7 +173,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -179,7 +182,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -187,7 +190,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -195,7 +198,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -204,7 +207,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -213,7 +216,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -222,7 +225,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -231,12 +234,12 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 文本+下拉多选-->
<!-- 文本+下拉多选-->
<div v-if='detailDate.controlType === "6"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
@@ -255,7 +258,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -263,7 +266,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -272,7 +275,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -280,7 +283,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -288,7 +291,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -297,7 +300,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -306,7 +309,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -315,7 +318,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -324,11 +327,12 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -338,7 +342,7 @@
</div>
</div>
</div>
<!-- 文本+附件-->
<!-- 文本+附件-->
<div v-if='detailDate.controlType === "7"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
@@ -357,7 +361,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -365,7 +369,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -374,7 +378,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -382,7 +386,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -390,7 +394,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -399,7 +403,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -408,7 +412,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -417,7 +421,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -426,7 +430,7 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="file"'>
@@ -438,11 +442,12 @@
</div>
</div>
</div>
<!-- 下拉单选+附件-->
<!-- 下拉单选+附件-->
<div v-if='detailDate.controlType === "8"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
@@ -459,11 +464,12 @@
</div>
</div>
</div>
<!-- 下拉多选+附件-->
<!-- 下拉多选+附件-->
<div v-if='detailDate.controlType === "9"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -480,11 +486,12 @@
</div>
</div>
</div>
<!-- 文本+下拉单选+附件-->
<!-- 文本+下拉单选+附件-->
<div v-if='detailDate.controlType === "10"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
@@ -508,7 +515,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -516,7 +523,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -525,7 +532,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -533,7 +540,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -541,7 +548,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -550,7 +557,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -559,7 +566,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -568,7 +575,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -577,7 +584,7 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="file"'>
@@ -590,133 +597,154 @@
</div>
</div>
</div>
<uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess" :detailDate='detailDate'></uploadFileChangeDown>
<uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess"
:detailDate='detailDate'></uploadFileChangeDown>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import uploadFileChangeDown from '@/components/uploadFileChangeDown/file'
export default {
name: 'index',
props: {
detailDate: {
type: Object,
default: {},
require: true
}
},
data() {
return {
isLock: '0',
formInline: {},
visible: false,
detailDatetransformation: []
}
},
components: {
uploadFileChangeDown
},
mounted() {
this.detailDate.list.forEach((item) => {
if(item.type === 'pull_more') {
item.dataValue = []
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import uploadFileChangeDown from '@/components/uploadFileChangeDown/file'
export default {
name: 'index',
props: {
detailDate: {
type: Object,
default: {},
require: true
}
// this.detailDatetransformation.push(item)
})
},
methods: {
uploadSuccess(data) {
let attIdList = []
if(data && data.length>0){
data.map(item => {
attIdList.push(item.id || data.name)
})
},
data() {
return {
isLock: '0',
formInline: {},
visible: false,
detailDatetransformation: []
}
},
components: {
uploadFileChangeDown
},
mounted() {
this.detailDate.list.forEach((item) => {
if (item.type === 'pull_more') {
item.dataValue = []
}
// this.detailDatetransformation.push(item)
})
},
methods: {
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
/** 赋值给当前对应的表单文件 */
// this.formInline[this.uploadName] = attIdList.join(',')
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
} else {
// this.formInline[this.uploadName]=''
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
}
this.detailDate.list.forEach((item, index) => {
if(item.type === 'file') {
if (item.type === 'file') {
item.dataValue = attIdList.join(',')
}
})
/** 赋值给当前对应的表单文件 */
// this.formInline[this.uploadName] = attIdList.join(',')
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
}else{
// this.formInline[this.uploadName]=''
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
},
clickButtonToUpload(item) {
if (item.isLock == '1') {
this.$refs.uploadFile.disabled = true
} else {
this.$refs.uploadFile.disabled = false
}
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
}
},
clickButtonToUpload(item) {
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
},
watch: {
detailDate(newold,oldold) {
console.log(newold,oldold,'ll')
},
formInline:{
handler(newOld,oldval) {
console.log(newOld,oldval,'ll')
watch: {
detailDate(newold, oldold) {
console.log(newold, oldold, 'll')
},
deep: true
formInline: {
handler(newOld, oldval) {
console.log(newOld, oldval, 'll')
},
deep: true
}
}
}
}
</script>
<style>
.table .ant-table-column-title {
font-weight: bold;
}
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
.ant-table td {
white-space: nowrap;
}
</style>
<style lang="less" scoped>
.box {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
}
.box {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
}
.text {
margin-right: 10px;
}
.text {
margin-right: 10px;
}
.page {
text-align: right;
margin-top: 20px;
}
.add_flex{
display: flex;
}
/deep/.box{
overflow: hidden;
}
.add_flex_item{
width: 30%;
flex: 1;
}
.selectWid{
min-width: 150px;
}
.inputWid{
min-width: 150px;
}
.add-width{
width: 33%;
margin-right: 5px;
}
.add--number{
width: 101%;
}
.page {
text-align: right;
margin-top: 20px;
}
.add_flex {
display: flex;
}
/deep/ .box {
overflow: hidden;
}
.add_flex_item {
width: 30%;
flex: 1;
}
.selectWid {
min-width: 150px;
}
.inputWid {
min-width: 150px;
}
.add-width {
width: 33%;
margin-right: 5px;
}
.add--number {
width: 101%;
}
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65);
}
.ant-select-disabled{
color: rgba(0, 0, 0, 0.65);
}
</style>
@@ -2,6 +2,7 @@
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
@keyup.enter.native="searchQuery"
class='tag-module'
ref='ruleForm'
:model='form'
@@ -2,7 +2,8 @@
<a-checkbox-group v-if="tagType=='checkbox'" @change="onChange" :value="arrayValue" :disabled="disabled">
<a-checkbox v-for="(item, key) in dictOptions" :key="key" :value="item.value">
<span :title='item.text||item.label'>
{{ (item.text && item.text.length > 6 ? item.text.slice(0, 5) + '...' : item.text) || (item.label && item.label.length > 6 ? item.label.slice(0, 5) + '...' : item.label) }}
<!-- {{ (item.text && item.text.length > 6 ? item.text.slice(0, 20) + '...' : item.text) || (item.label && item.label.length > 6 ? item.label.slice(0, 10) + '...' : item.label) }}-->
{{ item.text || item.label}}
</span>
</a-checkbox>
</a-checkbox-group>
@@ -1,22 +1,24 @@
<template>
<div style="height: 100%">
<div class="box">
<!-- -->
<a-table
class="table"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%',y:'calc(100vh - 160px)'}"
:data-source="dataSource"
:loading="loading"
sticky
:components="components"
:columns="columns"
:rowClassName="rowClassName"
:components="components"
@change="tableOnChange"
@onHeaderRow='onHeaderRow'
>
<span slot="titleName" slot-scope="text,record" :title="text">
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
{{ text }}
</span>
<div :slot="'titleName'+(index+1)" v-for="(item,index) in content">
<span style='padding-right: 20px'>{{ item.db_field_txt }} </span>
@@ -26,7 +28,8 @@
<span slot="operationbtn" slot-scope="record">
<span v-if='currentPersonRole === "homo"'>
<!-- 认证工程师 -->
<span v-if='record.state == "待发起收集" || record.state == "工程接口人退回" || record.state == "变更" || record.state == "Wait Collect" || record.state == "Sdt Back" || record.state == "Change"'>
<span
v-if='record.state == "待发起收集" || record.state == "工程接口人退回" || record.state == "变更" || record.state == "Wait Collect" || record.state == "Sdt Back" || record.state == "Change"'>
<span
@click='ondataValueTobeinitiated(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span>
</span>
@@ -44,7 +47,8 @@
</a-table>
</div>
<!-- 修改工程接口人--->
<a-modal v-model="areaVisible" :title="$t('modifyprojectInterfacePerson')" width='500px' :footer="null">
<a-modal v-model="areaVisible" :title="$t('modifyprojectInterfacePerson')" width='620px' :footer="null"
@cancel="cancleImports">
<a-form-model
class='tag-module'
ref='ruleForm'
@@ -52,11 +56,13 @@
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='24'>
<a-form-model-item ref='region' :label="$t('engineeringInterfacePerson')" prop='querySdt'>
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')" v-model="Dateline.querySdt">
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
v-model="Dateline.querySdt">
<a-select-option v-for="(item, key) in querySdtList" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -174,7 +180,7 @@
x: col.width,
z: 1,
axis: 'x',
draggable: true,
draggable: false,
resizable: false
},
on: {
@@ -213,7 +219,11 @@
form: {},
rules: {
querySdt: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('engineeringInterfacePerson'), trigger: 'blur' }
{
required: true,
message: this.$t('PleaseSelect') + this.$t('engineeringInterfacePerson'),
trigger: 'change'
}
]
},
wrapperCol: {
@@ -234,8 +244,13 @@
mounted() {
},
methods: {
rowClassName(row,index) {
return row.changeFlag == '1'? 'yellow' : 'red'
rowClassName(row, index) {
if (row.changeFlag == '1') {
return 'rowClassRedYellow'
}
if (row.delFlag == '1') {
return 'rowClassRed'
}
},
// 查看配置详细信息
onClickSee(val) {
@@ -322,11 +337,17 @@
// 工程接口人 取消
cancleImports() {
this.areaVisible = false
this.$refs['ruleForm'].resetFields()
},
// 点击工程接口人的详情人员 有权限
ondataValueTobeinitiated(record) {
this.areaVisible = true
this.getquerySdtList(record)
// this.$refs.ruleForm.clearValidate()
this.$nextTick(() => {
this.getquerySdtList(record)
})
this.$refs.ruleForm.clearValidate()
},
dataValueTobeinitiated() {
this.$message.warning(this.$t('certifiedEngineer') + this.$t('and') + this.$t('Statusis') + this.$t('CollectionInitiated') + this.$t('ReturnedPerson') + this.$t('alteration') + this.$t('toHavePermission'))
@@ -345,8 +366,8 @@
}
getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) {
this.getTableList()
this.$emit('LoginUserType', res.result)
this.getTableList(res.result[0].value)
this.$emit('LoginUserType', res.result, this.currentPersonRole)
}
})
},
@@ -380,7 +401,8 @@
align: 'center',
ellipsis: true,
sorter: res.sort,
sortOrder: res.db_field_txt
sortOrder: res.db_field_txt,
width: 500
})
num++
this.content.push(res)
@@ -395,10 +417,11 @@
dataIndex: res.db_field_name,
align: 'center',
ellipsis: true,
sorter: res.sort
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName',
customRender: 'titleName'
}
if (res.click) {
// 工程接口人列表修改
@@ -426,7 +449,36 @@
// todo
getAction(this.url.tableList, params).then((res) => {
if (res.success) {
this.dataSource = res.result
let tt = []
if (this.currentPersonRole !== 'dre') {
res.result.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
}
})
tt.push(Obj)
})
} else {
res.result.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
}
})
tt.push(Obj)
})
}
this.dataSource = tt
this.total = res.result.total
this.selectedRowKeys = []
this.loading = false
@@ -435,7 +487,10 @@
}
})
},
getTableList() {
cancleoperationFailed() {
this.selectedRowKeys = []
},
getTableList(currentPersonRole) {
// todo
let paramsManifestid
let url
@@ -444,13 +499,12 @@
paramsManifestid = this.$route.query.id
url = this.url.tableList
} else {
console.log('历史版本呢')
// 历史版本
paramsManifestid = this.$route.query.it
url = 'params/collectManifestHistory/list'
}
let params = {
userTypes: this.currentPersonRole,
userTypes: this.currentPersonRole || currentPersonRole,
paramsManifestId: paramsManifestid,
...this.formInline
}
@@ -475,13 +529,13 @@
// })
// })
let tt = []
if(this.currentPersonRole !== 'dre') {
if (this.currentPersonRole !== 'dre') {
res.result.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if(Obj[item] instanceof Object && Obj[item].controlType !== undefined){
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if(itemLi.type === 'pull_more'){
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
@@ -492,9 +546,9 @@
} else {
res.result.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if(Obj[item] instanceof Object && Obj[item].controlType !== undefined){
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if(itemLi.type === 'pull_more'){
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
@@ -534,7 +588,7 @@
},
watch: {
currentPersonRole: {
handler: function(){
handler: function() {
this.getTableList()
this.getData()
},
@@ -612,6 +666,18 @@
margin-top: 20px;
}
/deep/ .ant-table-tbody .yellow {
background-color: #ffff001f !important;
height: 40px !important;
border: none !important;
padding: 0 !important;
}
</style>
<style>
.resize-table-th {
position: relative;
}
.table-draggable-handle {
/* width: 10px !important; */
height: 100% !important;
@@ -624,14 +690,10 @@
transform: none !important;
bottom: 0;
}
.resize-table-th {
position: relative;
.rowClassRed{
background: #f3d9de;
}
/deep/.ant-table-tbody .yellow {
background-color: #ffff001f !important;
height: 40px !important;
border: none !important;
padding: 0 !important;
.rowClassRedYellow{
background: yellow;
}
</style>
@@ -5,7 +5,8 @@
<span style='flex: 1'>
{{ this.template.templateName === undefined || this.template.templateName === null? '暂无模板': this.template.templateName }}
</span>
<span style='flex: none' @click='download' v-if='this.template.templateName !== undefined && this.template.templateName !== null'>
<span style='flex: none' @click='download'
v-if='this.template.templateName !== undefined && this.template.templateName !== null'>
<a-icon type="download"/>
</span>
</div>
@@ -34,140 +35,121 @@
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
export default {
name: 'file',
props: ['disableds', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile','detailDate'],
data() {
return {
visible: false,
title: this.$t('clickUpload'),
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
fileList: [],
myfileList: [],
isLoding: false,
cut: '',
template: {},
disabled: false
}
},
created() {
this.detailDate.list.forEach((item) => {
console.log('ppp')
if(item.type == 'file' && item.isLock == '1') {
this.disabled = true
export default {
name: 'file',
props: ['disableds', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'detailDate'],
data() {
return {
visible: false,
title: this.$t('clickUpload'),
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
fileList: [],
myfileList: [],
isLoding: false,
cut: '',
template: {},
disabled: false
}
})
console.log(this.detailDate,'detailDate')
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
this.detailDate.list.forEach((item) => {
if(item.type === 'file') {
},
created() {
console.log(this.detailDate, 'detailDate')
// this.detailDate.list.forEach((item) => {
// if (item.type == 'file' && item.isLock == '1') {
// this.disabled = true
// }
// })
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
this.detailDate.list.forEach((item) => {
if (item.type === 'file') {
this.template.templateId = item.templateId
this.template.templateName = item.templateName
}
})
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
},
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
} else {
this.myfileList = []
}
},
beforeUpload(file) {
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
//TODO 客户要求不拦截文件
// if(file.type){
// if (thisFileType.indexOf(file.type) != -1) {
// this.fileTypeSatus = true;
// }else{
// this.fileTypeSatus = false;
// }
// }else{
// if(file.name.slice(file.name.length - 3 , file.name.length) == 'rar'){
// this.fileTypeSatus = true
// }else if(file.type == 'application/x-zip-compressed'){
// this.fileTypeSatus = true
// }else{
// this.fileTypeSatus = false;
// }
// }
this.$message.destroy()
},
remove() {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
if(info.fileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
return
}
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
},
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
} else {
this.myfileList = []
}
},
beforeUpload(file) {
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
//TODO 客户要求不拦截文件
// if(file.type){
// if (thisFileType.indexOf(file.type) != -1) {
// this.fileTypeSatus = true;
// }else{
// this.fileTypeSatus = false;
// }
// }else{
// if(file.name.slice(file.name.length - 3 , file.name.length) == 'rar'){
// this.fileTypeSatus = true
// }else if(file.type == 'application/x-zip-compressed'){
// this.fileTypeSatus = true
// }else{
// this.fileTypeSatus = false;
// }
// }
this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
},
remove() {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
if (info.fileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
return
}
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
@@ -176,66 +158,84 @@ export default {
}
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
}
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功。`);
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功。`);
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
}
}
}
</script>
<style>
.ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important;
}
.ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important;
}
.action-upload {
font-size: 67px;
color: #c0c4cc;
}
.action-upload {
font-size: 67px;
color: #c0c4cc;
}
.uploadFile {
.uploadFile {
}
}
</style>
@@ -22,7 +22,7 @@
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
v-model.trim="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
</a-form-model-item>
</div>
@@ -87,7 +87,7 @@ export default {
visible: false,
rules: {
paramsTemplateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'change' },
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'blur' },
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
],
description:[
@@ -132,6 +132,7 @@ export default {
rules: {
paramsTemplateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('templateName'), trigger: 'change' },
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
],
},
visible: false,
@@ -243,6 +244,7 @@ export default {
},
hideModal(){
this.visible = false;
this.$refs['ruleForm'].resetFields()
},
//批量删除
handleDel() {
@@ -22,7 +22,7 @@
<a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.nioNumber"
v-model.trim="formInline.nioNumber"
:placeholder="$t('PleaseEnter')+$t('NNiONumber')"/>
</a-form-model-item>
</div>
@@ -55,7 +55,7 @@
<a-form-model-item class="itemModel" prop="paramsName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsName"
v-model.trim="formInline.paramsName"
:placeholder="$t('PleaseEnter')+$t('NParameterName')"/>
</a-form-model-item>
</div>
@@ -127,7 +127,7 @@
style='height: 95px; width: 100%'
type="textarea"
:disabled="disabled"
v-model="formInline.description"
v-model.trim="formInline.description"
:placeholder="$t('PleaseEnter')+$t('NParameterDescription')"/>
</a-form-model-item>
</div>
@@ -204,7 +204,7 @@
<a-input class="box-input add-input"
:disabled="disabled"
type="textarea"
v-model="formInline.controlValues"
v-model.trim="formInline.controlValues"
:placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')"/>
</a-form-model-item>
</div>
@@ -229,20 +229,20 @@
<a-row :gutter="24">
<a-col :span="24" >
<a-tabs>
<a-tab-pane v-for='(item,index) in contentList' :tab="item.textVal === undefined ? item.text : item.textVal" :key="index + 1">
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('NNNiONumber')">{{$t('NNNiONumber')}}</span>
:title="$t('ParameterNo')">{{$t('ParameterNo')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input class="box-input"
:disabled="disabled"
v-model="item.paramsNumber"
:placeholder="$t('PleaseEnter')+$t('NNNiONumber')"/>
v-model.trim="item.paramsNumber"
:placeholder="$t('PleaseEnter')+$t('ParameterNo')"/>
</a-form-model-item>
</div>
</a-col>
@@ -255,7 +255,7 @@
<a-form-model-item class="itemModel">
<a-input class="box-input"
:disabled="disabled"
v-model="item.paramsName"
v-model.trim="item.paramsName"
:placeholder="$t('PleaseEnter')+$t('NParameterName')"/>
</a-form-model-item>
</div>
@@ -349,12 +349,12 @@ export default {
visible: false,
rules: {
nioNumber:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
{ required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'blur' },
{ min:1, max: 15, message: this.$t('cantExeed')+'15'+this.$t('characters'), trigger: 'blur' },
{
pattern: /^[0-9a-zA-Z-]{1,}$/,
message: this.$t('onlyThree'),
trigger: 'change'
trigger: 'blur'
}
],
certCategory: [
@@ -364,7 +364,7 @@ export default {
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
],
paramsName: [
{ required: true, message: this.$t('pleaseSelect')+this.$t('ParameterName'), trigger: 'change' },
{ required: true, message: this.$t('pleaseSelect')+this.$t('ParameterName'), trigger: 'blur' },
{ min:1, max: 30, message: this.$t('cantExeed')+'30'+this.$t('characters'), trigger: 'blur' },
],
technologyTerritory: [
@@ -386,7 +386,7 @@ export default {
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlVerification'), trigger: 'change' },
],
controlValues: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'change' },
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'blur' },
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' },
],
},
@@ -398,6 +398,7 @@ export default {
disabled: false,
projectNameList: [],
title: '',
cut:'',
stateOne: '',
contentList : [],
contentListed: [], // 编辑 contentList 所带出来的数据
@@ -411,6 +412,14 @@ export default {
mounted() {
this.getNameList()
this.getSysCategoryTree()
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
console.log(this.cut)
},
methods: {
getcontentListedEdit() {
@@ -427,6 +436,7 @@ export default {
tt.push(Object.assign(obj,item))
})
this.contentListStart = tt
console.log(this.contentListStart)
}
})
},
@@ -455,42 +465,105 @@ export default {
Onchangelabel(val) {
let _tt = []
if(this.flag == 1) {
this.contentListStart.forEach((itemVal) => {
val.forEach((item) => {
if(itemVal.value === item.value) {
_tt.push(itemVal)
}
if(this.cut == 'cn'){
this.contentListStart.forEach((itemVal) => {
val.forEach((item) => {
if(itemVal.value === item.value) {
itemVal.cut = 'cn'
_tt.push(itemVal)
}
})
})
})
}else {
this.contentListStart.forEach((itemVal) => {
val.forEach((item) => {
if(itemVal.value === item.value) {
itemVal.cut = 'en'
_tt.push(itemVal)
}
})
})
}
this.contentList = _tt
} else {
let _mm = []
this.contentListStart.forEach((itemVal) => {
val.forEach((item) => {
if(itemVal.value === item.value) {
_mm.push(itemVal)
}
if(this.cut == 'cn'){
this.contentListStart.forEach((itemVal) => {
val.forEach((item) => {
if(itemVal.value === item.value) {
itemVal.cut = 'cn'
_mm.push(itemVal)
}
})
})
})
_mm.forEach((item) => {
this.contentListed.forEach((itemVal) => {
// 原编辑的数据
if(itemVal.certCategory === item.value) {
_mm.forEach((item) => {
this.contentListed.forEach((itemVal) => {
// 原编辑的数据
if(itemVal.certCategory === item.value) {
item.textVal= itemVal.textVal,
item.certCategory= itemVal.certCategory,
item.paramsNumber= itemVal.paramsNumber, // 编号
item.paramsName= itemVal.paramsName, //参数名称
item.description= itemVal.description // 描述
}
item.certCategory= itemVal.certCategory,
item.paramsNumber= itemVal.paramsNumber, // 编号
item.paramsName= itemVal.paramsName, //参数名称
item.cut= itemVal.cut, //中英文标识
item.description= itemVal.description // 描述
}
})
})
})
}else {
this.contentListStart.forEach((itemVal) => {
val.forEach((item) => {
if(itemVal.value === item.value) {
itemVal.cut = 'en'
_mm.push(itemVal)
}
})
})
_mm.forEach((item) => {
this.contentListed.forEach((itemVal) => {
// 原编辑的数据
if(itemVal.certCategory === item.value) {
item.textVal= itemVal.textVal,
item.certCategory= itemVal.certCategory,
item.paramsNumber= itemVal.paramsNumber, // 编号
item.paramsName= itemVal.paramsName, //参数名称
item.cut= itemVal.cut, //中英文标识
item.description= itemVal.description // 描述
}
})
})
}
this.contentList = _mm
console.log(this.contentList)
}
},
Onchange(val) {
if(this.formInline.certCategory == '') {
this.contentList = []
}
let tabList = []
let arr = []
let newArray = []
this.arr = []
this.contentListStart.forEach((item,index) => {
this.arr.push(item.certCategory)
})
console.log(this.arr)
this.tabList = val.split(',')
this.arr.forEach(item => {
if (!this.tabList.includes(item)) {
newArray.push(item);
this.contentList.forEach((item1,index1) => {
if(item == item1.certCategory){
item1.paramsNumber= '', // 编号
item1.paramsName= '', //参数名称
item1.description= '' // 描述
}
})
};
})
},
getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
@@ -540,13 +613,23 @@ export default {
// 获取认证类别
this.getcontentListedEdit()
value.certCategoryParamsInfoEOList.map((item, index) => {
item.textVal = item.certCategory_dictText
this.contentListed.push(item)
if(this.cut == 'cn'){
item.cut = 'cn'
this.contentListed.push(item)
item.text = item.certCategory_dictText
}else {
item.cut = 'en'
this.contentListed.push(item)
item.textEn = item.certCategory_dictText
}
})
this.contentList = this.contentListed
console.log(this.contentList)
},
handleCancel() {
this.visible = false
this.$refs['ruleForm'].resetFields()
},
handleSubmit() {
if(this.formInline.certCategory == undefined) {
@@ -229,7 +229,7 @@ export default {
if (res.success) {
this.$message.success(res.result)
} else {
this.$message.warning(res.result)
this.$message.warning(res.message)
}
})
},
@@ -1,262 +0,0 @@
<template>
<div class="doc-detail">
<!-- 认证参数收集——清单信息-->
<div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title">
<span style="line-height: 74px;display: inline-block;float: left">
<a-icon type="left-circle" theme="filled" style="margin-right: 6px;font-size: 30px;color: #21c9cc;"/>
</span>
<span>
{{this.title}}
</span>
</div>
<div class="Virtual-detail-text-right" v-if="textTitle === $t('listOfRegulations')">
<div class="operator-text" @click="commentClick">
<a-icon type="message"/>
{{$t('comment')}}
</div>
<div class="operator-text" @click="historicalVersionClick">
<a-icon type="clock-circle"/>
{{$t('historicalVersion')}}
</div>
<div class="operator-text" @click="UpdateLogClick">
<a-icon type="reload"/>
{{$t('UpdateLog')}}
</div>
</div>
</div>
<div style="padding: 67px 0 0 0;background: #ffffff;height:100%">
<div class="detail-content" style="height: 100%">
<div class="Virtual-detail-left">
<div class="Virtual-detail-left-text" :title="$t('projectDetails')"
@click="textClick(0,$t('projectDetails'))">
<a-icon type="container"/>
{{$t('projectDetails')}}
</div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')"
@click="textClick(1,$t('listOfRegulations'))">
<a-icon type="container"/>
{{$t('listOfRegulations')}}
</div>
<div class="Virtual-detail-left-text" :title="$t('taskList')" @click="textClick(2,$t('taskList'))">
<a-icon type="container"/>
{{$t('taskList')}}
</div>
<div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"
@click="textClick(3,$t('nonConformance'))">
<a-icon type="container"/>
{{$t('nonConformance')}}
</div>
<div class="Virtual-detail-left-text" :title="$t('TaskParameterCollection')"
@click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="container"/>
{{$t('TaskParameterCollection')}}
</div>
</div>
<div class="Virtual-detail-right">
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
v-else-if="textTitle === $t('taskList')"/>
<ParameterItemCollectionList v-else-if="textTitle === $t('TaskParameterCollection')"
:paramsManifest='paramsManifest'/>
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
</div>
</div>
</div>
<updateLog :url="url" ref="updateLogRef"/>
<historicalVersionList ref="historicalVersionListRef"/>
<commentList ref="commentListRef"/>
</div>
</template>
<script>
import TaskList from '@views/projectManagement/components/TaskList'
import listOfRegulations from '@views/projectManagement/components/listOfRegulations'
import ProjectDetailsName from '@views/projectManagement/components/ProjectDetails'
import ParameterItemCollectionList from '../components/ParameterItemCollectionList'
import nonConformance from '@views/projectManagement/components/nonConformance'
import updateLog from '@comp/UpdateLog'
import historicalVersionList from '@views/projectManagement/components/historicalVersionList'
import commentList from '@views/projectManagement/components/commentList'
import { getAction, postAction, deleteAction, downloadFile } from '@api/manage'
export default {
name: 'ProjectDetails',
components: {
TaskList,
listOfRegulations,
ProjectDetailsName,
ParameterItemCollectionList,
nonConformance,
updateLog,
historicalVersionList,
commentList
},
data() {
return {
title: this.$t('projectDetails'),
textTitle: this.$t('TaskParameterCollection'),
isDisplayNum: '',
areaOfResponsibility: {},
url: {
logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '',
queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId'
},
paramsManifest: {}
}
},
mounted() {
this.textColor()
this.getTaskId()
// 清单信息
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
},
created() {
document.title = this.$t('projectDetails') + '-' + this.$route.query.projectName
},
methods: {
textColor() {
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) {
textColor[0].classList.remove('Virtual-detail-left-text-color')
}
let text = document.getElementsByClassName('Virtual-detail-left-text')
if (text && text.length > 0) {
for (let i = 0; i < text.length; i++) {
if (text[i].title == this.$t('TaskParameterCollection')) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
}
},
textClick(num, name) {
this.textTitle = name
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) {
textColor[0].classList.remove('Virtual-detail-left-text-color')
}
let text = document.getElementsByClassName('Virtual-detail-left-text')
for (let i = 0; i < text.length; i++) {
if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
},
UpdateLogClick() {
this.$refs.updateLogRef.getList({ projectLibraryId: this.$route.query.id })
},
historicalVersionClick() {
this.$refs.historicalVersionListRef.getList()
},
commentClick() {
this.$refs.commentListRef.getData()
},
getTaskId() {
let query = {
projectLibraryId: this.$route.query.id
}
getAction(this.url.queryUserPremissionByProjectLibraryId, query).then((res) => {
if (res.success) {
this.isDisplayNum = res.result
}
})
},
TaskListChange(item) {
this.areaOfResponsibility = item
this.textTitle = this.$t('taskList')
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) {
textColor[0].classList.remove('Virtual-detail-left-text-color')
}
let text = document.getElementsByClassName('Virtual-detail-left-text')
for (let i = 0; i < text.length; i++) {
if (text[i].title == this.$t('taskList')) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-left {
width: 240px;
padding: 16px 24px;
box-sizing: border-box;
font-size: 16px;
line-height: 3;
float: left;
.Virtual-detail-left-text {
padding: 2px 12px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.Virtual-detail-right {
border-left: 2px #eff1f3 solid;
width: calc(100% - 240px);
height: 100%;
float: left;
overflow: auto;
}
}
.Virtual-detail-left-text-color {
background: #eff1f3;
border-radius: 4px;
}
.Virtual-detail-text-right {
}
</style>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery" >
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" class='add-padding'>
<a-col :md="7" :sm="8">
<div class="box-title-text">
@@ -49,14 +49,19 @@
:dataSource='dataSource'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:scroll="{x: '100%',y:'calc(100vh - 320px)'}"
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
<span slot="paramsManifestClick" slot-scope="text,record">
<a @click="paramsManifestClick(record)">
<a class="textName" :title="text" @click="paramsManifestClick(record)">
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
</a>
</span>
<span slot="collectionCompletionTime" slot-scope="text,record">
<span class="textName" :title="record.finishTime">
{{record.finishTime ? record.finishTime : '-'}}
</span>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
@@ -77,8 +82,9 @@
/>
</div>
<!-- 参数模板-->
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel' :version='version'
<a-modal v-model="areaVisible" :maskClosable="false" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel'
:version='version'
:projectId='this.$route.query.id'></parameter-template-add>
</a-modal>
<!-- 配置-->
@@ -87,11 +93,12 @@
<a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null">
<historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version>
</a-modal>
<!-- 复制参数模板-->
<!-- 复制参数模板-->
<a-modal class="show-drawer" :title="$t('Copyparameterlist')" width="700px" v-model="drawerVisible" :footer="null">
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel' :templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters>
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel'
:templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters>
</a-modal>
</a-card>
</template>
@@ -124,44 +131,57 @@
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
width: 240,
scopedSlots: { customRender: 'paramsManifestClick' }
},
{
title: this.$t('status'),
align: 'center',
width: 80,
ellipsis: true,
dataIndex: 'state'
},
{
title: this.$t('parameterTemplateName'),
align: 'center',
width: 180,
ellipsis: true,
dataIndex: 'paramsTemplateName'
},
{
title: this.$t('collectionCompletionTime'),
align: 'center',
dataIndex: 'finishTime'
dataIndex: 'finishTime',
width: 160,
ellipsis: true,
scopedSlots: { customRender: 'collectionCompletionTime' }
},
{
title: this.$t('Version'),
align: 'center',
width: 50,
ellipsis: true,
dataIndex: 'version'
},
{
title: this.$t('creator'),
align: 'center',
width: 110,
ellipsis: true,
dataIndex: 'createBy'
},
{
title: this.$t('createTime'),
align: 'center',
width: 160,
ellipsis: true,
dataIndex: 'createTime'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 310,
width: 210,
scopedSlots: { customRender: 'operation' }
}
],
@@ -177,7 +197,7 @@
deleteAll: 'params/manifest/deleteBatch',
conAdd: 'params/config/addBatch',
conList: 'params/config/list',
changeExtension:'params/manifest/changeExtension',
changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig'
},
loading: false,
@@ -199,7 +219,7 @@
drawerVisible: false,
drawerVisibleitem: false,
titleTag: '',
selectedRowKeysvalArray: [],
selectedRowKeysvalArray: []
}
},
mounted() {
@@ -214,7 +234,7 @@
localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item,
query: item
})
window.open(newUrl.href, '_blank')
} else {
@@ -223,7 +243,7 @@
})
},
deleteLib(val) {
if(val.state === '已完成' || val.state === 'Finished' ) {
if (val.state === '已完成' || val.state === 'Finished') {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
@@ -252,9 +272,9 @@
},
// 配置
configure(item) {
this.itemId = item.id
this.itemRow = item
this.$refs.configureRef.addModel(item.id)
this.itemId = item.id
this.itemRow = item
this.$refs.configureRef.addModel(item.id)
},
handleCancel(val) {
this.areaVisible = val
@@ -277,7 +297,7 @@
this.pageNo = 1
this.getlist()
},
onSelectChange(val,valArray) {
onSelectChange(val, valArray) {
this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',')
this.selectedRowKeysvalArray = valArray
@@ -286,7 +306,7 @@
this.areaVisible = true
setTimeout(() => {
this.$refs.templateRef.editData(edit)
},50)
}, 50)
},
handleAdd() {
this.areaVisible = true
@@ -294,11 +314,11 @@
// 变更扩展
handleModule() {
let _this = this
if(this.selectedRowKeys.length == 0){
if (this.selectedRowKeys.length == 0) {
this.$message.warning(_this.$t('pleaseSelectData'))
}else if(this.selectedRowKeys.length > 1){
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(_this.$t('OnlyOneSelected'))
} else if(this.selectedRowKeysvalArray[0].state === '已完成'|| this.selectedRowKeysvalArray[0].state ==='Finished'){
} else if (this.selectedRowKeysvalArray[0].state === '已完成' || this.selectedRowKeysvalArray[0].state === 'Finished') {
getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
@@ -316,11 +336,11 @@
// 默认为0 可全部删除
let flag = 1
this.selectedRowKeysvalArray.forEach((item) => {
if(item.state !== '已完成' && val.state !== 'Finished' ){
flag = 0
if (item.state !== '已完成' && val.state !== 'Finished') {
flag = 0
}
})
if(flag) {
if (flag) {
let param = {
ids: this.selectedRowKeysArray
}
@@ -365,6 +385,7 @@
pageNo: this.pageNo,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
@@ -501,8 +522,22 @@
cursor: pointer;
border-radius: 4px;
}
/deep/.add-padding{
margin-left: -89px!important;
/deep/ .add-padding {
margin-left: -89px !important;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
<style>
@@ -11,16 +11,16 @@
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-form-model-item :label="$t('title')" prop='title'>
<a-form-model-item class="itemAddAdmin" :label="$t('title')" prop='title'>
<a-input style='width: 420px'
:placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title' />
v-model='formData.title'/>
</a-form-model-item>
</a-col>
<a-col :span='9'>
</a-col>
<a-col :span='6'>
</a-col>
<!-- <a-col :span='9'>-->
<!-- </a-col>-->
<!-- <a-col :span='6'>-->
<!-- </a-col>-->
</a-row>
<a-row :gutter='24'>
<a-col :span='9'>
@@ -29,7 +29,7 @@
<j-dict-select-tag class='box-input' v-model='form.region'
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'"
:triggerChange='false' :dictCode="'region'" />
:triggerChange='false' :dictCode="'region'"/>
</a-form-model-item>
</a-form-model-item>
</a-col>
@@ -37,7 +37,7 @@
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
<a-input
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
v-model='form.paramsTemplateName' />
v-model='form.paramsTemplateName'/>
</a-form-model-item>
</a-col>
<a-col :span='6' style='margin-top: 5px'>
@@ -79,148 +79,153 @@
</template>
<script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
export default {
name: 'diolagArea',
components: {},
data() {
return {
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('zoneOfApplication'),
dataIndex: 'region_dictText',
key: 'showArea',
align: 'center',
ellipsis: true
export default {
name: 'diolagArea',
components: {},
data() {
return {
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('zoneOfApplication'),
dataIndex: 'region_dictText',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
formData: {},
rules: {
title: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
row: {}
}
},
props: {
version: {
type: Number,
default: '',
required: false
},
projectId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
}
},
mounted() {
this.loadData()
},
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
formData: {},
rules: {
title: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' },
{
max: 200,
message: this.$t('title') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
row: {}
}
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
searchQuery() {
props: {
version: {
type: Number,
default: '',
required: false
},
projectId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
}
},
mounted() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
editData(edit) {
// 编辑一行的数据
this.row = edit
this.formData = {...edit}
this.selectedRowKeys = edit.paramsTemplateId.split(',')
},
//新增
handleSubmit() {
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
if(this.formData.title !== undefined) {
this.formData.title = this.formData.title.trim()
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
editData(edit) {
// 编辑一行的数据
this.row = edit
this.formData = { ...edit }
this.selectedRowKeys = edit.paramsTemplateId.split(',')
},
//新增
handleSubmit() {
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
if (this.formData.title !== undefined) {
this.formData.title = this.formData.title.trim()
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
let postDate = {
title: this.formData.title,
paramsTemplateId: this.paramsTemplateId || this.selectedRowKeys[0],
@@ -230,7 +235,7 @@ export default {
if (this.formData.id) {
//编辑
postDate = {
id : this.formData.id,
id: this.formData.id,
...postDate
}
postAction(`params/manifest/edit`, postDate).then(res => {
@@ -271,85 +276,92 @@ export default {
this.spinLoading = false
this.confirmLoading = false
}
})
}
},
cancelModel() {
this.newVisible = false
this.$refs.ruleForm.resetFields()
},
//删除按钮
deleteArea(val) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: '',
onOk:
async () => {
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
this.loadData()
} else {
// this.$message.warning(res.message)
if (res.message == '该展示区域有关联数据,无法删除!') {
this.$message.warning(this.$t('noDelete'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
}
})
}
})
}
// 编辑
},
cancelModel() {
this.newVisible = false
this.$refs.ruleForm.resetFields()
},
//删除按钮
deleteArea(val) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: '',
onOk:
async () => {
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
this.loadData()
} else {
// this.$message.warning(res.message)
if (res.message == '该展示区域有关联数据,无法删除!') {
this.$message.warning(this.$t('noDelete'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
}
})
}
})
},
// 编辑
},
watch: {
selectedRowKeyS(val) {
this.selectedRowKeys = val
watch: {
selectedRowKeyS(val) {
this.selectedRowKeys = val
}
}
}
}
}
</script>
<style lang='less' scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
.diolag-area {
.table-area {
margin: 20px 0;
.diolag-area {
.table-area {
margin: 20px 0;
.action-edit {
margin-right: 10px;
.action-edit {
margin-right: 10px;
}
}
.table-del {
color: red;
}
}
.table-del {
.drawer-bootom-button {
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-right: 4px;
}
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
<style lang='less'>
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
}
}
}
}
}
}
</style>
<style>
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
white-space: nowrap!important;
}
</style>
@@ -174,7 +174,7 @@ export default {
methods: {
// 清单列表传出数据
listVisibleRow(val) {
this.selectedRowKeys = []
// this.selectedRowKeys = []
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
newAreaTable.forEach((item, index) => {
if( item.id == this.listVisibleRowDate.id ) {
@@ -17,8 +17,8 @@
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('configurationName')">{{$t('configurationName')}}</span>
<span class="title-text-text"
:title="$t('configurationName')">{{$t('configurationName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input"
@@ -48,8 +48,8 @@
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('Model')">{{$t('Model')}}</span>
<span class="title-text-text"
:title="$t('Model')">{{$t('Model')}}</span>
</div>
<a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input"
@@ -79,8 +79,8 @@
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('electricMachinery')">{{$t('electricMachinery')}}</span>
<span class="title-text-text"
:title="$t('electricMachinery')">{{$t('electricMachinery')}}</span>
</div>
<a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input"
@@ -95,8 +95,11 @@
<div class="title-text">
<!-- <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>-->
</div>
<a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}</a-button>
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">{{$t('deleteConfiguration')}}</a-button>
<a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}
</a-button>
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">
{{$t('deleteConfiguration')}}
</a-button>
</div>
</a-col>
</a-row>
@@ -112,337 +115,340 @@
</template>
<script>
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import axios from 'axios'
export default {
name: 'addModel',
components: {
uploadFile
},
props: {
itemId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
},
itemRow: {
type: Object,
default: '',
require: true
}
},
data() {
return {
formInline: {},
confirmLoading: false,
visible: false,
rules: {
// nioNumber:[
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
// ]
},
disabled: false,
projectNameList: [],
title: '',
stateOne: '',
contentList : [],
paramsConfigEOList: [
{
id: '',
// displaySeq: 0,
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '', // 电机
}
],
conIndex: 0,
deleteConfigIds: '',
deleteConfigIdsArray: []
}
},
mounted() {
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import axios from 'axios'
},
methods: {
getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
export default {
name: 'addModel',
components: {
uploadFile
},
addModel(id) {
this.paramsConfigEOList = []
this.visible = true
this.title = this.$t('MaintainConfigureInfo')
this.formInline = {}
this.getconList(id)
props: {
itemId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
},
itemRow: {
type: Object,
default: '',
require: true
}
},
getconList(id) {
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
if (res.success) {
if(res.result.length === 0) {
this.paramsConfigEOList = [
{
id: '',
// displaySeq: 0,
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '', // 电机
}
]
data() {
return {
formInline: {},
confirmLoading: false,
visible: false,
rules: {
// nioNumber:[
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
// ]
},
disabled: false,
projectNameList: [],
title: '',
stateOne: '',
contentList: [],
paramsConfigEOList: [
{
id: '',
// displaySeq: 0,
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '' // 电机
}
],
conIndex: 0,
deleteConfigIds: '',
deleteConfigIdsArray: []
}
},
mounted() {
},
methods: {
getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.paramsConfigEOList = res.result
this.projectNameList = []
}
this.visible = true
} else {
this.$message.warning(res.message)
}
})
},
addConfiguration(item) {
if(this.itemRow.configFlag) {
this.paramsConfigEOList.splice(item.displaySeq + 1,0,{
id: '',
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '', // 电机
})
} else {
this.$message.warning(this.$t('Theselectedconfiguration'))
}
},
deleteConfiguration(displaySeq,index) {
if(this.paramsConfigEOList.length === 1) {
this.$message.warning(this.$t('oneconfigurationInformation'))
return
}
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
_this.deleteConfigIdsArray.push(displaySeq)
_this.deleteConfigIds = _this.deleteConfigIdsArray.join(',')
let _tt = _this.paramsConfigEOList.splice(index,1)
if(_tt.length === 1) {
_this.$message.success(_this.$t('DeleteSucceeded'))
}
}
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
let flag = 1
this.paramsConfigEOList.forEach((item) => {
// 配置名称
if(item.configName.trim() == ''){
this.$message.warning(this.$t('configurationName')+this.$t('cannotEmpty'))
flag = 0
return
} else if(item.configName.length > 25){
this.$message.warning(this.$t('configurationName')+this.$t('cantExeed')+'25'+this.$t('characters'))
flag = 0
return
}
// 车型
if(item.carType.trim() == ''){
this.$message.warning(this.$t('Model')+this.$t('cannotEmpty'))
flag = 0
return
} else if(item.carType.length > 20){
this.$message.warning(this.$t('Model')+this.$t('cantExeed')+'20'+this.$t('characters'))
flag = 0
return
}
// 版本
if(item.version.trim() == ''){
this.$message.warning(this.$t('Version')+this.$t('cannotEmpty'))
flag = 0
return
} else if(item.version.length > 20){
this.$message.warning(this.$t('Version')+this.$t('cantExeed')+'20'+this.$t('characters'))
flag = 0
return
}
// 电池
if(item.battery.trim() == ''){
this.$message.warning(this.$t('Battery')+this.$t('cannotEmpty'))
flag = 0
return
} else if(item.battery.length > 20){
this.$message.warning(this.$t('Battery')+this.$t('cantExeed')+'20'+this.$t('characters'))
flag = 0
return
}
// 电机
if(item.motor.trim() == ''){
this.$message.warning(this.$t('electricMachinery')+this.$t('cannotEmpty'))
flag = 0
return
} else if(item.motor.length > 20){
this.$message.warning(this.$t('electricMachinery')+this.$t('cantExeed')+'20'+this.$t('characters'))
flag = 0
return
}
})
if(flag == 1){
this.$refs.ruleForm.validate(valid => {
if (valid) {
let querycontentList = {}
let paramsManifestId = { paramsManifestId : this.itemId }
querycontentList = {
paramsConfigEOList: this.paramsConfigEOList,
deleteConfigIds: this.deleteConfigIds
},
addModel(id) {
this.paramsConfigEOList = []
this.visible = true
this.title = this.$t('MaintainConfigureInfo')
this.formInline = {}
this.getconList(id)
},
getconList(id) {
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
if (res.success) {
if (res.result.length === 0) {
this.paramsConfigEOList = [
{
id: '',
// displaySeq: 0,
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '' // 电机
}
]
} else {
this.paramsConfigEOList = res.result
}
let querycontentListItem = { ...querycontentList, ...paramsManifestId }
this.confirmLoading = true
postAction(this.url.conAdd, querycontentListItem).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.deleteConfigIds = ''
this.deleteConfigIdsArray = []
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
this.visible = true
} else {
this.$message.warning(res.message)
}
})
},
addConfiguration(item) {
if (this.itemRow.configFlag) {
this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
id: '',
configName: '', // 配置名称
version: '', // 版本
carType: '', // 车型
battery: '', // 电池
motor: '' // 电机
})
} else {
this.$message.warning(this.$t('Theselectedconfiguration'))
}
},
deleteConfiguration(displaySeq, index) {
if (this.paramsConfigEOList.length === 1) {
this.$message.warning(this.$t('oneconfigurationInformation'))
return
}
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
if (displaySeq) {
_this.deleteConfigIdsArray.push(displaySeq)
}
_this.deleteConfigIds = _this.deleteConfigIdsArray.join(',')
let _tt = _this.paramsConfigEOList.splice(index, 1)
if (_tt.length === 1) {
_this.$message.success(_this.$t('DeleteSucceeded'))
}
}
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
let flag = 1
this.paramsConfigEOList.forEach((item) => {
// 配置名称
if (item.configName.trim() == '') {
this.$message.warning(this.$t('configurationName') + this.$t('cannotEmpty'))
flag = 0
return
} else if (item.configName.length > 25) {
this.$message.warning(this.$t('configurationName') + this.$t('cantExeed') + '25' + this.$t('characters'))
flag = 0
return
}
// 车型
if (item.carType.trim() == '') {
this.$message.warning(this.$t('Model') + this.$t('cannotEmpty'))
flag = 0
return
} else if (item.carType.length > 20) {
this.$message.warning(this.$t('Model') + this.$t('cantExeed') + '20' + this.$t('characters'))
flag = 0
return
}
// 版本
if (item.version.trim() == '') {
this.$message.warning(this.$t('Version') + this.$t('cannotEmpty'))
flag = 0
return
} else if (item.version.length > 20) {
this.$message.warning(this.$t('Version') + this.$t('cantExeed') + '20' + this.$t('characters'))
flag = 0
return
}
// 电池
if (item.battery.trim() == '') {
this.$message.warning(this.$t('Battery') + this.$t('cannotEmpty'))
flag = 0
return
} else if (item.battery.length > 20) {
this.$message.warning(this.$t('Battery') + this.$t('cantExeed') + '20' + this.$t('characters'))
flag = 0
return
}
// 电机
if (item.motor.trim() == '') {
this.$message.warning(this.$t('electricMachinery') + this.$t('cannotEmpty'))
flag = 0
return
} else if (item.motor.length > 20) {
this.$message.warning(this.$t('electricMachinery') + this.$t('cantExeed') + '20' + this.$t('characters'))
flag = 0
return
}
})
if (flag == 1) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let querycontentList = {}
let paramsManifestId = { paramsManifestId: this.itemId }
querycontentList = {
paramsConfigEOList: this.paramsConfigEOList,
deleteConfigIds: this.deleteConfigIds
}
let querycontentListItem = { ...querycontentList, ...paramsManifestId }
this.confirmLoading = true
postAction(this.url.conAdd, querycontentListItem).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.deleteConfigIds = ''
this.deleteConfigIdsArray = []
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}
})
}
}
},
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index:100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
<style>
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>