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 !=''"> <if test="paramsCollectManifestEO.userTypes !=null and paramsCollectManifestEO.userTypes !=''">
<choose> <choose>
<when test="paramsCollectManifestEO.userTypes == 'sdt'"> <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>
<when test="paramsCollectManifestEO.userTypes == 'dre'"> <when test="paramsCollectManifestEO.userTypes == 'dre'">
AND dre = #{paramsCollectManifestEO.dreForAuth} AND state in ('4','6','7','8') 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); boolean getManifestConfigFlag(String paramsManifestId);
Map<String, List<ParamsCollectManifestEO>> queryByManifestIdList(List<String> manifestIdList);
// 退回 // 退回
boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO); boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO);
@@ -62,4 +62,11 @@ public interface IParamsConfigDataEOService extends IService<ParamsConfigDataEO>
* @return * @return
*/ */
List<ParamsConfigDataEO> queryList(); List<ParamsConfigDataEO> queryList();
/**
* 查询清单的所有配置数据
* @param configIdList
* @return
*/
List<ParamsConfigDataEO> queryListByConfigIdList(List<String> configIdList);
} }
@@ -1,8 +1,11 @@
package com.jero.modules.cert.collect.service; package com.jero.modules.cert.collect.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
import com.jero.modules.cert.collect.entity.ParamsConfigDataHistoryEO; import com.jero.modules.cert.collect.entity.ParamsConfigDataHistoryEO;
import java.util.List;
/** /**
* @Description: 参数配置数据历史版本 * @Description: 参数配置数据历史版本
* @Author: jero-boot * @Author: jero-boot
@@ -19,4 +22,11 @@ public interface IParamsConfigDataHistoryEOService extends IService<ParamsConfig
* @return * @return
*/ */
ParamsConfigDataHistoryEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId); 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); 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); return saveBatch(paramsCollectManifestEOList);
} }
@@ -217,6 +229,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
return getById(id); 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<ParamsCollectManifestEO> list = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列 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<>(); List<SysDictItem> dictItemList = new ArrayList<>();
@@ -318,7 +340,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
Map<String, Object> configMap = new HashMap<>(); Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId(); 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); // 重新组合配置数据 List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
configMap.put("controlType", controlType); configMap.put("controlType", controlType);
configMap.put("list", paramsConfigDataVOList); 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 @Override
public boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) { if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
@@ -1490,7 +1527,24 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理 updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理
updateEOList.add(updateEO); 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 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<ParamsCollectManifestHistoryEO> list = paramsCollectManifestHistoryEOMapper.listInfo(paramsCollectManifestEO); // 查询固定列
List<ParamsConfigHistoryEO> paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列 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<>(); List<SysDictItem> dictItemList = new ArrayList<>();
@@ -132,8 +143,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
Map<String, Object> configMap = new HashMap<>(); Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId(); String paramsConfigId = paramsConfigEO.getId();
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataHistoryEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 // ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataHistoryEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据 ParamsConfigDataHistoryEO paramsConfigDataHistoryEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataHistoryEO, collectManifestEO); // 重新组合配置数据
configMap.put("controlType", controlType); configMap.put("controlType", controlType);
configMap.put("list", paramsConfigDataVOList); configMap.put("list", paramsConfigDataVOList);
manifestMap.put(paramsConfigEO.getId(), configMap); manifestMap.put(paramsConfigEO.getId(), configMap);
@@ -166,7 +178,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
* @param paramsCollectManifestEO * @param paramsCollectManifestEO
* @return * @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<>(); List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
String templateId = null; String templateId = null;
String templateName = null; String templateName = null;
@@ -1,5 +1,6 @@
package com.jero.modules.cert.collect.service.impl; 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.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
@@ -107,4 +108,19 @@ public class ParamsConfigDataEOServiceImpl extends ServiceImpl<ParamsConfigDataE
public List<ParamsConfigDataEO> queryList() { public List<ParamsConfigDataEO> queryList() {
return list(); 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; 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.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.entity.ParamsConfigDataHistoryEO;
import com.jero.modules.cert.collect.mapper.ParamsConfigDataHistoryEOMapper; import com.jero.modules.cert.collect.mapper.ParamsConfigDataHistoryEOMapper;
import com.jero.modules.cert.collect.service.IParamsConfigDataHistoryEOService; import com.jero.modules.cert.collect.service.IParamsConfigDataHistoryEOService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @Description: 参数配置数据历史版本 * @Description: 参数配置数据历史版本
* @Author: jero-boot * @Author: jero-boot
@@ -31,4 +35,19 @@ public class ParamsConfigDataHistoryEOServiceImpl extends ServiceImpl<ParamsConf
getOne(queryWrapper); getOne(queryWrapper);
return 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); // 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<>(); List<ParamsCollectManifestEO> updateCollectManifestEOList = new ArrayList<>();
paramsCollectManifestEOList.forEach(collectManifestEO -> { updateList.forEach(collectManifestEO -> {
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO(); ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
updateCollectManifestEO.setId(collectManifestEO.getId()); updateCollectManifestEO.setId(collectManifestEO.getId());
updateCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue()); updateCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
@@ -80,6 +80,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
@Autowired @Autowired
private IParamsConfigEOService paramsConfigEOService; private IParamsConfigEOService paramsConfigEOService;
@Autowired
private IParamsConfigDataEOService paramsConfigDataEOService;
/** /**
@@ -288,8 +292,12 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
IPage rows = paramsManifestEOMapper.pageInfo(page, paramsManifestEO); IPage rows = paramsManifestEOMapper.pageInfo(page, paramsManifestEO);
// 根据参数项状态更新清单状态 // 根据参数项状态更新清单状态
List<ParamsManifestEO> paramsManifestEOList = rows.getRecords(); List<ParamsManifestEO> paramsManifestEOList = rows.getRecords();
paramsManifestEOList.forEach(manifestEO -> { if (CollectionUtil.isNotEmpty(paramsManifestEOList)) {
Map<String, Object> map = paramsCollectManifestEOService.isCollectFinished(manifestEO.getId()); 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"); Boolean finish = (Boolean) map.get("finish");
Date time = (Date) map.get("time"); Date time = (Date) map.get("time");
if (finish) { if (finish) {
@@ -304,8 +312,6 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateById(updateParamsManifestEO); updateById(updateParamsManifestEO);
} else { } else {
manifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
manifestEO.setFinishTime(null);
if (ManifestStateEnum.FINISHED.getValue().equals(manifestEO.getState())) { if (ManifestStateEnum.FINISHED.getValue().equals(manifestEO.getState())) {
// 更新清单状态和完成时间 // 更新清单状态和完成时间
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO(); ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
@@ -314,19 +320,29 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
updateParamsManifestEO.setFinishTime(null); updateParamsManifestEO.setFinishTime(null);
updateById(updateParamsManifestEO); 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; return rows;
} }
@Autowired private boolean getManifestConfigFlag(List<ParamsCollectManifestEO> list) {
private IParamsConfigDataEOService paramsConfigDataEOService; 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.setId(id);
updateManifestEO.setVersion(paramsManifestEO.getVersion() + 1); updateManifestEO.setVersion(paramsManifestEO.getVersion() + 1);
updateManifestEO.setParamsTemplatePublishVersion(newestVersion); updateManifestEO.setParamsTemplatePublishVersion(newestVersion);
updateManifestEO.setState(ManifestStateEnum.COLLECTING.getValue()); // 变更扩展后,清单状态为收集中
return updateById(updateManifestEO); return updateById(updateManifestEO);
} }
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog; 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.common.system.base.controller.JeroController;
import com.jero.modules.cert.template.entity.ParamsTemplateEO; import com.jero.modules.cert.template.entity.ParamsTemplateEO;
import com.jero.modules.cert.template.service.IParamsTemplateEOService; import com.jero.modules.cert.template.service.IParamsTemplateEOService;
@@ -188,9 +189,14 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
@GetMapping(value = "/copyById") @GetMapping(value = "/copyById")
@RequiresPermissions("params:template:copy") @RequiresPermissions("params:template:copy")
public Result<?> copyById(@RequestParam(name="id") String id, 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); 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 { public enum GatherResultEnum {
UNDERWAY("进行中","underway","underway"), UNDERWAY("进行中","Underway","Underway"),
COMPLETED("已完成","completed","completed"), 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, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportTitleTemplateEO, req.getParameterMap()); QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportTitleTemplateEO, req.getParameterMap());
Page<LawsMonthlyReportTitleTemplateEO> page = new Page<LawsMonthlyReportTitleTemplateEO>(pageNo, pageSize); // Page<LawsMonthlyReportTitleTemplateEO> page = new Page<LawsMonthlyReportTitleTemplateEO>(pageNo, pageSize);
IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.page(page, queryWrapper); // IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.page(page, queryWrapper);
IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.getPageInfo(pageNo,pageSize, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
@@ -167,4 +168,17 @@ public class LawsMonthlyReportTitleTemplateEOController extends JeroController<L
return super.importExcel(request, response, LawsMonthlyReportTitleTemplateEO.class); 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; 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.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; 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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; 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 = "英文标题") @ApiModelProperty(value = "英文标题")
private java.lang.String titleEn; 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="parent_id" property="parentId" />
<result column="title_cn" property="titleCn" /> <result column="title_cn" property="titleCn" />
<result column="title_en" property="titleEn" /> <result column="title_en" property="titleEn" />
<result column="sort" property="sort" />
</resultMap> </resultMap>
</mapper> </mapper>
@@ -1,7 +1,10 @@
package com.jero.modules.report.service; 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.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
import java.util.List; import java.util.List;
/** /**
@@ -58,4 +61,18 @@ public interface ILawsMonthlyReportTitleTemplateEOService extends IService<LawsM
* @return * @return
*/ */
List<LawsMonthlyReportTitleTemplateEO> queryList(); 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; 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.entity.LawsMonthlyReportTitleTemplateEO;
import com.jero.modules.report.mapper.LawsMonthlyReportTitleTemplateEOMapper; import com.jero.modules.report.mapper.LawsMonthlyReportTitleTemplateEOMapper;
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService; import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
import com.jero.modules.system.util.StringUtils;
import org.springframework.stereotype.Service; 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 java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @Description: 月报标题模板 * @Description: 月报标题模板
@@ -25,7 +35,29 @@ public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<Law
*/ */
@Override @Override
public void add(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) { 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.setCreateTime(now);
lawsMonthlyReportTitleTemplateEO.setUpdateTime(now); lawsMonthlyReportTitleTemplateEO.setUpdateTime(now);
save(lawsMonthlyReportTitleTemplateEO); save(lawsMonthlyReportTitleTemplateEO);
@@ -86,4 +118,71 @@ public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<Law
public List<LawsMonthlyReportTitleTemplateEO> queryList() { public List<LawsMonthlyReportTitleTemplateEO> queryList() {
return list(); 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) @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); 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', FNumber: 'Number',
NNNiONumber: 'Number', NNNiONumber: 'Number',
NNiONumber: 'NIO Number', NNiONumber: 'NIO Number',
ParameterNo: 'Number',
NRequired: 'Is Must', NRequired: 'Is Must',
NParameterName: 'Params Name', NParameterName: 'Params Name',
NtechnicalField: 'Technical Field', NtechnicalField: 'Technical Field',
@@ -1063,4 +1064,5 @@ module.exports = {
Templatenamelist: 'Template name - parameter item collection list', Templatenamelist: 'Template name - parameter item collection list',
newNiONumber: 'Number', newNiONumber: 'Number',
English: 'English', English: 'English',
requiredParametersEmpty:'Required parameters cannot be empty',
} }
+2
View File
@@ -1033,6 +1033,7 @@ module.exports = {
FNumber: '账号', FNumber: '账号',
NNNiONumber: 'NIO编号', NNNiONumber: 'NIO编号',
NNiONumber: 'NIO编号', NNiONumber: 'NIO编号',
ParameterNo: '编号',
NRequired: '是否必填', NRequired: '是否必填',
NParameterName: '参数名称', NParameterName: '参数名称',
NtechnicalField: '技术领域', NtechnicalField: '技术领域',
@@ -1067,4 +1068,5 @@ module.exports = {
Templatenamelist: '模板名称-参数项收集清单', Templatenamelist: '模板名称-参数项收集清单',
newNiONumber: 'NIO编号', newNiONumber: 'NIO编号',
English:'英文', English:'英文',
requiredParametersEmpty:'必填参数不能为空',
} }
+198 -170
View File
@@ -1,7 +1,7 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<div class='box'> <div class='box'>
<!-- 纯文本--> <!-- 纯文本-->
<div v-if='detailDate.controlType === "1"' class='add_flex'> <div v-if='detailDate.controlType === "1"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'> <div v-if='item.type==="text"'>
@@ -20,7 +20,7 @@
<a-input class="box-input inputWid" <a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 中文--> <!-- 中文-->
<div v-if="item.controlVerify == '2'"> <div v-if="item.controlVerify == '2'">
@@ -28,7 +28,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')" :placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')" onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正整数 --> <!-- 正整数 -->
<div v-if="item.controlVerify == '3'"> <div v-if="item.controlVerify == '3'">
@@ -37,7 +37,7 @@
:max="99999" :max="99999"
:precision="0" :precision="0"
:placeholder="$t('enterPositiveInteger')" :placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正浮点书 --> <!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'"> <div v-if="item.controlVerify == '4'">
@@ -45,7 +45,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')" onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')" :placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 整数或小数 --> <!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'"> <div v-if="item.controlVerify == '5'">
@@ -53,7 +53,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:max="99999" :max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')" :placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 一位小数 --> <!-- 一位小数 -->
<div v-if="item.controlVerify == '6'"> <div v-if="item.controlVerify == '6'">
@@ -62,7 +62,7 @@
:max="99999" :max="99999"
:precision="1" :precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')" :placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 两位小数--> <!-- 两位小数-->
<div v-if="item.controlVerify == '7'"> <div v-if="item.controlVerify == '7'">
@@ -71,7 +71,7 @@
:max="99999" :max="99999"
:precision="2" :precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 三位小数--> <!-- 三位小数-->
<div v-if="item.controlVerify == '8'"> <div v-if="item.controlVerify == '8'">
@@ -80,7 +80,7 @@
:max="99999" :max="99999"
:precision="3" :precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')" :placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 四位小数--> <!-- 四位小数-->
<div v-if="item.controlVerify == '9'"> <div v-if="item.controlVerify == '9'">
@@ -89,16 +89,17 @@
:max="99999" :max="99999"
:precision="4" :precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 纯下拉单选--> <!-- 纯下拉单选-->
<div v-if='detailDate.controlType === "2"' class='add_flex'> <div v-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
@@ -108,11 +109,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 纯下拉多选--> <!-- 纯下拉多选-->
<div v-if='detailDate.controlType === "3"' class='add_flex'> <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-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="pull_more"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
@@ -122,7 +124,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 纯附件--> <!-- 纯附件-->
<div v-if='detailDate.controlType === "4"' class='add_flex'> <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-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="file"'> <div v-if='item.type==="file"'>
@@ -134,11 +136,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 文本+下拉单选--> <!-- 文本+下拉单选-->
<div v-if='detailDate.controlType === "5"' class='add_flex'> <div v-if='detailDate.controlType === "5"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }} {{ itemin.label }}
@@ -162,7 +165,7 @@
<a-input class="box-input inputWid" <a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 中文--> <!-- 中文-->
<div v-if="item.controlVerify == '2'"> <div v-if="item.controlVerify == '2'">
@@ -170,7 +173,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')" :placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')" onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正整数 --> <!-- 正整数 -->
<div v-if="item.controlVerify == '3'"> <div v-if="item.controlVerify == '3'">
@@ -179,7 +182,7 @@
:max="99999" :max="99999"
:precision="0" :precision="0"
:placeholder="$t('enterPositiveInteger')" :placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正浮点书 --> <!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'"> <div v-if="item.controlVerify == '4'">
@@ -187,7 +190,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')" onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')" :placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 整数或小数 --> <!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'"> <div v-if="item.controlVerify == '5'">
@@ -195,7 +198,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:max="99999" :max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')" :placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 一位小数 --> <!-- 一位小数 -->
<div v-if="item.controlVerify == '6'"> <div v-if="item.controlVerify == '6'">
@@ -204,7 +207,7 @@
:max="99999" :max="99999"
:precision="1" :precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')" :placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 两位小数--> <!-- 两位小数-->
<div v-if="item.controlVerify == '7'"> <div v-if="item.controlVerify == '7'">
@@ -213,7 +216,7 @@
:max="99999" :max="99999"
:precision="2" :precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 三位小数--> <!-- 三位小数-->
<div v-if="item.controlVerify == '8'"> <div v-if="item.controlVerify == '8'">
@@ -222,7 +225,7 @@
:max="99999" :max="99999"
:precision="3" :precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')" :placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 四位小数--> <!-- 四位小数-->
<div v-if="item.controlVerify == '9'"> <div v-if="item.controlVerify == '9'">
@@ -231,12 +234,12 @@
:max="99999" :max="99999"
:precision="4" :precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 文本+下拉多选--> <!-- 文本+下拉多选-->
<div v-if='detailDate.controlType === "6"' class='add_flex'> <div v-if='detailDate.controlType === "6"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'> <div v-if='item.type==="text"'>
@@ -255,7 +258,7 @@
<a-input class="box-input inputWid" <a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 中文--> <!-- 中文-->
<div v-if="item.controlVerify == '2'"> <div v-if="item.controlVerify == '2'">
@@ -263,7 +266,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')" :placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')" onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正整数 --> <!-- 正整数 -->
<div v-if="item.controlVerify == '3'"> <div v-if="item.controlVerify == '3'">
@@ -272,7 +275,7 @@
:max="99999" :max="99999"
:precision="0" :precision="0"
:placeholder="$t('enterPositiveInteger')" :placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正浮点书 --> <!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'"> <div v-if="item.controlVerify == '4'">
@@ -280,7 +283,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')" onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')" :placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 整数或小数 --> <!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'"> <div v-if="item.controlVerify == '5'">
@@ -288,7 +291,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:max="99999" :max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')" :placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 一位小数 --> <!-- 一位小数 -->
<div v-if="item.controlVerify == '6'"> <div v-if="item.controlVerify == '6'">
@@ -297,7 +300,7 @@
:max="99999" :max="99999"
:precision="1" :precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')" :placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 两位小数--> <!-- 两位小数-->
<div v-if="item.controlVerify == '7'"> <div v-if="item.controlVerify == '7'">
@@ -306,7 +309,7 @@
:max="99999" :max="99999"
:precision="2" :precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 三位小数--> <!-- 三位小数-->
<div v-if="item.controlVerify == '8'"> <div v-if="item.controlVerify == '8'">
@@ -315,7 +318,7 @@
:max="99999" :max="99999"
:precision="3" :precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')" :placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 四位小数--> <!-- 四位小数-->
<div v-if="item.controlVerify == '9'"> <div v-if="item.controlVerify == '9'">
@@ -324,11 +327,12 @@
:max="99999" :max="99999"
:precision="4" :precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
</div> </div>
<div v-if='item.type==="pull_more"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
@@ -338,7 +342,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 文本+附件--> <!-- 文本+附件-->
<div v-if='detailDate.controlType === "7"' class='add_flex'> <div v-if='detailDate.controlType === "7"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'> <div v-if='item.type==="text"'>
@@ -357,7 +361,7 @@
<a-input class="box-input inputWid" <a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 中文--> <!-- 中文-->
<div v-if="item.controlVerify == '2'"> <div v-if="item.controlVerify == '2'">
@@ -365,7 +369,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')" :placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')" onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正整数 --> <!-- 正整数 -->
<div v-if="item.controlVerify == '3'"> <div v-if="item.controlVerify == '3'">
@@ -374,7 +378,7 @@
:max="99999" :max="99999"
:precision="0" :precision="0"
:placeholder="$t('enterPositiveInteger')" :placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正浮点书 --> <!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'"> <div v-if="item.controlVerify == '4'">
@@ -382,7 +386,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')" onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')" :placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 整数或小数 --> <!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'"> <div v-if="item.controlVerify == '5'">
@@ -390,7 +394,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:max="99999" :max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')" :placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 一位小数 --> <!-- 一位小数 -->
<div v-if="item.controlVerify == '6'"> <div v-if="item.controlVerify == '6'">
@@ -399,7 +403,7 @@
:max="99999" :max="99999"
:precision="1" :precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')" :placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 两位小数--> <!-- 两位小数-->
<div v-if="item.controlVerify == '7'"> <div v-if="item.controlVerify == '7'">
@@ -408,7 +412,7 @@
:max="99999" :max="99999"
:precision="2" :precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 三位小数--> <!-- 三位小数-->
<div v-if="item.controlVerify == '8'"> <div v-if="item.controlVerify == '8'">
@@ -417,7 +421,7 @@
:max="99999" :max="99999"
:precision="3" :precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')" :placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 四位小数--> <!-- 四位小数-->
<div v-if="item.controlVerify == '9'"> <div v-if="item.controlVerify == '9'">
@@ -426,7 +430,7 @@
:max="99999" :max="99999"
:precision="4" :precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
</div> </div>
<div v-if='item.type==="file"'> <div v-if='item.type==="file"'>
@@ -438,11 +442,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 下拉单选+附件--> <!-- 下拉单选+附件-->
<div v-if='detailDate.controlType === "8"' class='add_flex'> <div v-if='detailDate.controlType === "8"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }} {{ itemin.label }}
@@ -459,11 +464,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 下拉多选+附件--> <!-- 下拉多选+附件-->
<div v-if='detailDate.controlType === "9"' class='add_flex'> <div v-if='detailDate.controlType === "9"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull_more"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
@@ -480,11 +486,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 文本+下拉单选+附件--> <!-- 文本+下拉单选+附件-->
<div v-if='detailDate.controlType === "10"' class='add_flex'> <div v-if='detailDate.controlType === "10"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'> <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"> <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 "> <span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }} {{ itemin.label }}
@@ -508,7 +515,7 @@
<a-input class="box-input inputWid" <a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 中文--> <!-- 中文-->
<div v-if="item.controlVerify == '2'"> <div v-if="item.controlVerify == '2'">
@@ -516,7 +523,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')" :placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')" onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正整数 --> <!-- 正整数 -->
<div v-if="item.controlVerify == '3'"> <div v-if="item.controlVerify == '3'">
@@ -525,7 +532,7 @@
:max="99999" :max="99999"
:precision="0" :precision="0"
:placeholder="$t('enterPositiveInteger')" :placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 正浮点书 --> <!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'"> <div v-if="item.controlVerify == '4'">
@@ -533,7 +540,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')" onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')" :placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 整数或小数 --> <!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'"> <div v-if="item.controlVerify == '5'">
@@ -541,7 +548,7 @@
:disabled="item.isLock == '1' ? true: false" :disabled="item.isLock == '1' ? true: false"
:max="99999" :max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')" :placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 一位小数 --> <!-- 一位小数 -->
<div v-if="item.controlVerify == '6'"> <div v-if="item.controlVerify == '6'">
@@ -550,7 +557,7 @@
:max="99999" :max="99999"
:precision="1" :precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')" :placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 两位小数--> <!-- 两位小数-->
<div v-if="item.controlVerify == '7'"> <div v-if="item.controlVerify == '7'">
@@ -559,7 +566,7 @@
:max="99999" :max="99999"
:precision="2" :precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 三位小数--> <!-- 三位小数-->
<div v-if="item.controlVerify == '8'"> <div v-if="item.controlVerify == '8'">
@@ -568,7 +575,7 @@
:max="99999" :max="99999"
:precision="3" :precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')" :placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
<!-- 四位小数--> <!-- 四位小数-->
<div v-if="item.controlVerify == '9'"> <div v-if="item.controlVerify == '9'">
@@ -577,7 +584,7 @@
:max="99999" :max="99999"
:precision="4" :precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')" :placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" /> v-model="item.dataValue"/>
</div> </div>
</div> </div>
<div v-if='item.type==="file"'> <div v-if='item.type==="file"'>
@@ -590,133 +597,154 @@
</div> </div>
</div> </div>
</div> </div>
<uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess" :detailDate='detailDate'></uploadFileChangeDown> <uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess"
:detailDate='detailDate'></uploadFileChangeDown>
</div> </div>
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import uploadFileChangeDown from '@/components/uploadFileChangeDown/file' import uploadFileChangeDown from '@/components/uploadFileChangeDown/file'
export default {
name: 'index', export default {
props: { name: 'index',
detailDate: { props: {
type: Object, detailDate: {
default: {}, type: Object,
require: true 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 = []
} }
// this.detailDatetransformation.push(item) },
}) data() {
}, return {
methods: { isLock: '0',
uploadSuccess(data) { formInline: {},
let attIdList = [] visible: false,
if(data && data.length>0){ detailDatetransformation: []
data.map(item => { }
attIdList.push(item.id || data.name) },
}) 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) => { this.detailDate.list.forEach((item, index) => {
if(item.type === 'file') { if (item.type === 'file') {
item.dataValue = attIdList.join(',') item.dataValue = attIdList.join(',')
} }
}) })
/** 赋值给当前对应的表单文件 */ },
// this.formInline[this.uploadName] = attIdList.join(',') clickButtonToUpload(item) {
// this.formInline = { ...this.formInline } if (item.isLock == '1') {
// console.log('form',this.formInline) this.$refs.uploadFile.disabled = true
}else{ } else {
// this.formInline[this.uploadName]='' this.$refs.uploadFile.disabled = false
// this.formInline = { ...this.formInline } }
// console.log('form',this.formInline) 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) { watch: {
this.$refs.uploadFile.visible = true detailDate(newold, oldold) {
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => { console.log(newold, oldold, 'll')
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')
}, },
deep: true formInline: {
handler(newOld, oldval) {
console.log(newOld, oldval, 'll')
},
deep: true
}
} }
} }
}
</script> </script>
<style> <style>
.table .ant-table-column-title { .table .ant-table-column-title {
font-weight: bold; font-weight: bold;
} }
.ant-table td { .ant-table td {
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.box { .box {
width: 100%; width: 100%;
height: calc(100% - 100px); height: calc(100% - 100px);
overflow: auto; overflow: auto;
} }
.text { .text {
margin-right: 10px; margin-right: 10px;
} }
.page { .page {
text-align: right; text-align: right;
margin-top: 20px; margin-top: 20px;
} }
.add_flex{
display: flex; .add_flex {
} display: flex;
/deep/.box{ }
overflow: hidden;
} /deep/ .box {
.add_flex_item{ overflow: hidden;
width: 30%; }
flex: 1;
} .add_flex_item {
.selectWid{ width: 30%;
min-width: 150px; flex: 1;
} }
.inputWid{
min-width: 150px; .selectWid {
} min-width: 150px;
.add-width{ }
width: 33%;
margin-right: 5px; .inputWid {
} min-width: 150px;
.add--number{ }
width: 101%;
} .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> </style>
@@ -2,6 +2,7 @@
<div class='diolag-area'> <div class='diolag-area'>
<a-spin :spinning='spinLoading'> <a-spin :spinning='spinLoading'>
<a-form-model <a-form-model
@keyup.enter.native="searchQuery"
class='tag-module' class='tag-module'
ref='ruleForm' ref='ruleForm'
:model='form' :model='form'
@@ -2,7 +2,8 @@
<a-checkbox-group v-if="tagType=='checkbox'" @change="onChange" :value="arrayValue" :disabled="disabled"> <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"> <a-checkbox v-for="(item, key) in dictOptions" :key="key" :value="item.value">
<span :title='item.text||item.label'> <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> </span>
</a-checkbox> </a-checkbox>
</a-checkbox-group> </a-checkbox-group>
@@ -1,22 +1,24 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<div class="box"> <div class="box">
<!-- -->
<a-table <a-table
class="table" class="table"
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%',y:'calc(100vh - 160px)'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
sticky
:components="components"
:columns="columns" :columns="columns"
:rowClassName="rowClassName" :rowClassName="rowClassName"
:components="components"
@change="tableOnChange" @change="tableOnChange"
@onHeaderRow='onHeaderRow' @onHeaderRow='onHeaderRow'
> >
<span slot="titleName" slot-scope="text,record" :title="text"> <span slot="titleName" slot-scope="text,record" :title="text">
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }} {{ text }}
</span> </span>
<div :slot="'titleName'+(index+1)" v-for="(item,index) in content"> <div :slot="'titleName'+(index+1)" v-for="(item,index) in content">
<span style='padding-right: 20px'>{{ item.db_field_txt }} </span> <span style='padding-right: 20px'>{{ item.db_field_txt }} </span>
@@ -26,7 +28,8 @@
<span slot="operationbtn" slot-scope="record"> <span slot="operationbtn" slot-scope="record">
<span v-if='currentPersonRole === "homo"'> <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 <span
@click='ondataValueTobeinitiated(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span> @click='ondataValueTobeinitiated(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span>
</span> </span>
@@ -44,7 +47,8 @@
</a-table> </a-table>
</div> </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 <a-form-model
class='tag-module' class='tag-module'
ref='ruleForm' ref='ruleForm'
@@ -52,11 +56,13 @@
:rules='rules' :rules='rules'
:label-col='labelCol' :label-col='labelCol'
:wrapper-col='wrapperCol' :wrapper-col='wrapperCol'
> >
<a-row :gutter='24'> <a-row :gutter='24'>
<a-col :span='24'> <a-col :span='24'>
<a-form-model-item ref='region' :label="$t('engineeringInterfacePerson')" prop='querySdt'> <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"> <a-select-option v-for="(item, key) in querySdtList" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
@@ -174,7 +180,7 @@
x: col.width, x: col.width,
z: 1, z: 1,
axis: 'x', axis: 'x',
draggable: true, draggable: false,
resizable: false resizable: false
}, },
on: { on: {
@@ -213,7 +219,11 @@
form: {}, form: {},
rules: { rules: {
querySdt: [ querySdt: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('engineeringInterfacePerson'), trigger: 'blur' } {
required: true,
message: this.$t('PleaseSelect') + this.$t('engineeringInterfacePerson'),
trigger: 'change'
}
] ]
}, },
wrapperCol: { wrapperCol: {
@@ -234,8 +244,13 @@
mounted() { mounted() {
}, },
methods: { methods: {
rowClassName(row,index) { rowClassName(row, index) {
return row.changeFlag == '1'? 'yellow' : 'red' if (row.changeFlag == '1') {
return 'rowClassRedYellow'
}
if (row.delFlag == '1') {
return 'rowClassRed'
}
}, },
// 查看配置详细信息 // 查看配置详细信息
onClickSee(val) { onClickSee(val) {
@@ -322,11 +337,17 @@
// 工程接口人 取消 // 工程接口人 取消
cancleImports() { cancleImports() {
this.areaVisible = false this.areaVisible = false
this.$refs['ruleForm'].resetFields()
}, },
// 点击工程接口人的详情人员 有权限 // 点击工程接口人的详情人员 有权限
ondataValueTobeinitiated(record) { ondataValueTobeinitiated(record) {
this.areaVisible = true this.areaVisible = true
this.getquerySdtList(record) // this.$refs.ruleForm.clearValidate()
this.$nextTick(() => {
this.getquerySdtList(record)
})
this.$refs.ruleForm.clearValidate()
}, },
dataValueTobeinitiated() { 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')) 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) => { getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) { if (res.success) {
this.getTableList() this.getTableList(res.result[0].value)
this.$emit('LoginUserType', res.result) this.$emit('LoginUserType', res.result, this.currentPersonRole)
} }
}) })
}, },
@@ -380,7 +401,8 @@
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
sorter: res.sort, sorter: res.sort,
sortOrder: res.db_field_txt sortOrder: res.db_field_txt,
width: 500
}) })
num++ num++
this.content.push(res) this.content.push(res)
@@ -395,10 +417,11 @@
dataIndex: res.db_field_name, dataIndex: res.db_field_name,
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
sorter: res.sort sorter: res.sort,
width: 160
}) })
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'titleName', customRender: 'titleName'
} }
if (res.click) { if (res.click) {
// 工程接口人列表修改 // 工程接口人列表修改
@@ -426,7 +449,36 @@
// todo // todo
getAction(this.url.tableList, params).then((res) => { getAction(this.url.tableList, params).then((res) => {
if (res.success) { 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.total = res.result.total
this.selectedRowKeys = [] this.selectedRowKeys = []
this.loading = false this.loading = false
@@ -435,7 +487,10 @@
} }
}) })
}, },
getTableList() { cancleoperationFailed() {
this.selectedRowKeys = []
},
getTableList(currentPersonRole) {
// todo // todo
let paramsManifestid let paramsManifestid
let url let url
@@ -444,13 +499,12 @@
paramsManifestid = this.$route.query.id paramsManifestid = this.$route.query.id
url = this.url.tableList url = this.url.tableList
} else { } else {
console.log('历史版本呢')
// 历史版本 // 历史版本
paramsManifestid = this.$route.query.it paramsManifestid = this.$route.query.it
url = 'params/collectManifestHistory/list' url = 'params/collectManifestHistory/list'
} }
let params = { let params = {
userTypes: this.currentPersonRole, userTypes: this.currentPersonRole || currentPersonRole,
paramsManifestId: paramsManifestid, paramsManifestId: paramsManifestid,
...this.formInline ...this.formInline
} }
@@ -475,13 +529,13 @@
// }) // })
// }) // })
let tt = [] let tt = []
if(this.currentPersonRole !== 'dre') { if (this.currentPersonRole !== 'dre') {
res.result.forEach((Obj) => { res.result.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { 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) => { Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1 itemLi.isLock = 1
if(itemLi.type === 'pull_more'){ if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
} }
}) })
@@ -492,9 +546,9 @@
} else { } else {
res.result.forEach((Obj) => { res.result.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { 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) => { Obj[item].list.forEach((itemLi) => {
if(itemLi.type === 'pull_more'){ if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
} }
}) })
@@ -534,7 +588,7 @@
}, },
watch: { watch: {
currentPersonRole: { currentPersonRole: {
handler: function(){ handler: function() {
this.getTableList() this.getTableList()
this.getData() this.getData()
}, },
@@ -612,6 +666,18 @@
margin-top: 20px; 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 { .table-draggable-handle {
/* width: 10px !important; */ /* width: 10px !important; */
height: 100% !important; height: 100% !important;
@@ -624,14 +690,10 @@
transform: none !important; transform: none !important;
bottom: 0; bottom: 0;
} }
.rowClassRed{
.resize-table-th { background: #f3d9de;
position: relative;
} }
/deep/.ant-table-tbody .yellow { .rowClassRedYellow{
background-color: #ffff001f !important; background: yellow;
height: 40px !important;
border: none !important;
padding: 0 !important;
} }
</style> </style>
@@ -5,7 +5,8 @@
<span style='flex: 1'> <span style='flex: 1'>
{{ this.template.templateName === undefined || this.template.templateName === null? '暂无模板': this.template.templateName }} {{ this.template.templateName === undefined || this.template.templateName === null? '暂无模板': this.template.templateName }}
</span> </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"/> <a-icon type="download"/>
</span> </span>
</div> </div>
@@ -34,140 +35,121 @@
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage' import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
export default { export default {
name: 'file', name: 'file',
props: ['disableds', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile','detailDate'], props: ['disableds', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'detailDate'],
data() { data() {
return { return {
visible: false, visible: false,
title: this.$t('clickUpload'), title: this.$t('clickUpload'),
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload', uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined, state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl, myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [], upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
fileList: [], fileList: [],
myfileList: [], myfileList: [],
isLoding: false, isLoding: false,
cut: '', cut: '',
template: {}, template: {},
disabled: false disabled: false
}
},
created() {
this.detailDate.list.forEach((item) => {
console.log('ppp')
if(item.type == 'file' && item.isLock == '1') {
this.disabled = true
} }
}) },
console.log(this.detailDate,'detailDate') created() {
const token = Vue.ls.get(ACCESS_TOKEN) console.log(this.detailDate, 'detailDate')
this.headers = { 'X-Access-Token': token } // this.detailDate.list.forEach((item) => {
this.containerId = 'container-ty-' + new Date().getTime() // if (item.type == 'file' && item.isLock == '1') {
}, // this.disabled = true
mounted() { // }
this.detailDate.list.forEach((item) => { // })
if(item.type === 'file') { 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.templateId = item.templateId
this.template.templateName = item.templateName 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') { let long = localStorage.getItem('language')
this.$emit('uploadSuccess', this.fileList) 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.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed')) },
} else if (status === 'removed') { remove() {
this.myfileList = info.fileList this.fileTypeSatus = true
this.fileList = [] },
this.myfileList.forEach((res) => { mypreview(item) {
if (res.response) { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
this.fileList.push(res.response.result) window.open(url, '_blank')
} else { },
this.fileList.push(res) 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 (status === 'error') {
if (this.myfileList.length > 0) { this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully')) this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} } else if (status === 'removed') {
} 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 = info.fileList
this.fileList = []
this.myfileList.forEach((res) => { this.myfileList.forEach((res) => {
if (res.response) { if (res.response) {
this.fileList.push(res.response.result) this.fileList.push(res.response.result)
@@ -176,66 +158,84 @@ export default {
} }
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() if (this.myfileList.length > 0) {
this.$message.error(this.$t('UploadMost')) this.$message.destroy()
return this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
} }
}) } else if (status === 'done') {
this.$emit('uploadSuccess', this.fileList) this.fileList = []
if (this.myfileList.length > 0) { this.myfileList = info.fileList
this.$message.destroy() if (info.fileList.length > 20) {
if (file.response.success) { info.fileList.splice(20)
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully')) 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> </script>
<style> <style>
.ant-upload-list-item-name { .ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
} }
.action-upload { .action-upload {
font-size: 67px; font-size: 67px;
color: #c0c4cc; color: #c0c4cc;
} }
.uploadFile { .uploadFile {
} }
</style> </style>
@@ -22,7 +22,7 @@
<a-form-model-item class="itemModel" prop="paramsTemplateName"> <a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="formInline.paramsTemplateName" v-model.trim="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/> :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -87,7 +87,7 @@ export default {
visible: false, visible: false,
rules: { rules: {
paramsTemplateName:[ 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' }, { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
], ],
description:[ description:[
@@ -132,6 +132,7 @@ export default {
rules: { rules: {
paramsTemplateName:[ paramsTemplateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('templateName'), trigger: 'change' }, { 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, visible: false,
@@ -243,6 +244,7 @@ export default {
}, },
hideModal(){ hideModal(){
this.visible = false; this.visible = false;
this.$refs['ruleForm'].resetFields()
}, },
//批量删除 //批量删除
handleDel() { handleDel() {
@@ -22,7 +22,7 @@
<a-form-model-item class="itemModel" prop="nioNumber"> <a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="formInline.nioNumber" v-model.trim="formInline.nioNumber"
:placeholder="$t('PleaseEnter')+$t('NNiONumber')"/> :placeholder="$t('PleaseEnter')+$t('NNiONumber')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -55,7 +55,7 @@
<a-form-model-item class="itemModel" prop="paramsName"> <a-form-model-item class="itemModel" prop="paramsName">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="formInline.paramsName" v-model.trim="formInline.paramsName"
:placeholder="$t('PleaseEnter')+$t('NParameterName')"/> :placeholder="$t('PleaseEnter')+$t('NParameterName')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -127,7 +127,7 @@
style='height: 95px; width: 100%' style='height: 95px; width: 100%'
type="textarea" type="textarea"
:disabled="disabled" :disabled="disabled"
v-model="formInline.description" v-model.trim="formInline.description"
:placeholder="$t('PleaseEnter')+$t('NParameterDescription')"/> :placeholder="$t('PleaseEnter')+$t('NParameterDescription')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -204,7 +204,7 @@
<a-input class="box-input add-input" <a-input class="box-input add-input"
:disabled="disabled" :disabled="disabled"
type="textarea" type="textarea"
v-model="formInline.controlValues" v-model.trim="formInline.controlValues"
:placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')"/> :placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -229,20 +229,20 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24" > <a-col :span="24" >
<a-tabs> <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-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NNNiONumber')">{{$t('NNNiONumber')}}</span> :title="$t('ParameterNo')">{{$t('ParameterNo')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.paramsNumber" v-model.trim="item.paramsNumber"
:placeholder="$t('PleaseEnter')+$t('NNNiONumber')"/> :placeholder="$t('PleaseEnter')+$t('ParameterNo')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -255,7 +255,7 @@
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.paramsName" v-model.trim="item.paramsName"
:placeholder="$t('PleaseEnter')+$t('NParameterName')"/> :placeholder="$t('PleaseEnter')+$t('NParameterName')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -349,12 +349,12 @@ export default {
visible: false, visible: false,
rules: { rules: {
nioNumber:[ 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' }, { min:1, max: 15, message: this.$t('cantExeed')+'15'+this.$t('characters'), trigger: 'blur' },
{ {
pattern: /^[0-9a-zA-Z-]{1,}$/, pattern: /^[0-9a-zA-Z-]{1,}$/,
message: this.$t('onlyThree'), message: this.$t('onlyThree'),
trigger: 'change' trigger: 'blur'
} }
], ],
certCategory: [ certCategory: [
@@ -364,7 +364,7 @@ export default {
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' }, { required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
], ],
paramsName: [ 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' }, { min:1, max: 30, message: this.$t('cantExeed')+'30'+this.$t('characters'), trigger: 'blur' },
], ],
technologyTerritory: [ technologyTerritory: [
@@ -386,7 +386,7 @@ export default {
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlVerification'), trigger: 'change' }, { required: true, message: this.$t('PleaseEnter')+this.$t('controlVerification'), trigger: 'change' },
], ],
controlValues: [ 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' }, { min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' },
], ],
}, },
@@ -398,6 +398,7 @@ export default {
disabled: false, disabled: false,
projectNameList: [], projectNameList: [],
title: '', title: '',
cut:'',
stateOne: '', stateOne: '',
contentList : [], contentList : [],
contentListed: [], // 编辑 contentList 所带出来的数据 contentListed: [], // 编辑 contentList 所带出来的数据
@@ -411,6 +412,14 @@ export default {
mounted() { mounted() {
this.getNameList() this.getNameList()
this.getSysCategoryTree() 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: { methods: {
getcontentListedEdit() { getcontentListedEdit() {
@@ -427,6 +436,7 @@ export default {
tt.push(Object.assign(obj,item)) tt.push(Object.assign(obj,item))
}) })
this.contentListStart = tt this.contentListStart = tt
console.log(this.contentListStart)
} }
}) })
}, },
@@ -455,42 +465,105 @@ export default {
Onchangelabel(val) { Onchangelabel(val) {
let _tt = [] let _tt = []
if(this.flag == 1) { if(this.flag == 1) {
this.contentListStart.forEach((itemVal) => { if(this.cut == 'cn'){
val.forEach((item) => { this.contentListStart.forEach((itemVal) => {
if(itemVal.value === item.value) { val.forEach((item) => {
_tt.push(itemVal) 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 this.contentList = _tt
} else { } else {
let _mm = [] let _mm = []
this.contentListStart.forEach((itemVal) => { if(this.cut == 'cn'){
val.forEach((item) => { this.contentListStart.forEach((itemVal) => {
if(itemVal.value === item.value) { val.forEach((item) => {
_mm.push(itemVal) if(itemVal.value === item.value) {
} itemVal.cut = 'cn'
_mm.push(itemVal)
}
})
}) })
}) _mm.forEach((item) => {
_mm.forEach((item) => { this.contentListed.forEach((itemVal) => {
this.contentListed.forEach((itemVal) => { // 原编辑的数据
// 原编辑的数据 if(itemVal.certCategory === item.value) {
if(itemVal.certCategory === item.value) {
item.textVal= itemVal.textVal, item.textVal= itemVal.textVal,
item.certCategory= itemVal.certCategory, item.certCategory= itemVal.certCategory,
item.paramsNumber= itemVal.paramsNumber, // 编号 item.paramsNumber= itemVal.paramsNumber, // 编号
item.paramsName= itemVal.paramsName, //参数名称 item.paramsName= itemVal.paramsName, //参数名称
item.description= itemVal.description // 描述 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 this.contentList = _mm
console.log(this.contentList)
} }
}, },
Onchange(val) { Onchange(val) {
if(this.formInline.certCategory == '') { let tabList = []
this.contentList = [] 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() { getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => { getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
@@ -540,13 +613,23 @@ export default {
// 获取认证类别 // 获取认证类别
this.getcontentListedEdit() this.getcontentListedEdit()
value.certCategoryParamsInfoEOList.map((item, index) => { value.certCategoryParamsInfoEOList.map((item, index) => {
item.textVal = item.certCategory_dictText if(this.cut == 'cn'){
this.contentListed.push(item) 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 this.contentList = this.contentListed
console.log(this.contentList)
}, },
handleCancel() { handleCancel() {
this.visible = false this.visible = false
this.$refs['ruleForm'].resetFields()
}, },
handleSubmit() { handleSubmit() {
if(this.formInline.certCategory == undefined) { if(this.formInline.certCategory == undefined) {
@@ -229,7 +229,7 @@ export default {
if (res.success) { if (res.success) {
this.$message.success(res.result) this.$message.success(res.result)
} else { } 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> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<div class="table-page-search-wrapper"> <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-row :gutter="24" class='add-padding'>
<a-col :md="7" :sm="8"> <a-col :md="7" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
@@ -49,14 +49,19 @@
:dataSource='dataSource' :dataSource='dataSource'
:pagination='false' :pagination='false'
:loading='loading' :loading='loading'
:scroll='{x: 600}' :scroll="{x: '100%',y:'calc(100vh - 320px)'}"
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'> @change='handleTableChange'>
<span slot="paramsManifestClick" slot-scope="text,record"> <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 }} {{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
</a> </a>
</span> </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"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)">{{$t('configure')}}</a> <a class="text-operation" @click="configure(record)">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
@@ -77,8 +82,9 @@
/> />
</div> </div>
<!-- 参数模板--> <!-- 参数模板-->
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null"> <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' <parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel'
:version='version'
:projectId='this.$route.query.id'></parameter-template-add> :projectId='this.$route.query.id'></parameter-template-add>
</a-modal> </a-modal>
<!-- 配置--> <!-- 配置-->
@@ -87,11 +93,12 @@
<a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null"> <a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null">
<historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version> <historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version>
</a-modal> </a-modal>
<!-- 复制参数模板--> <!-- 复制参数模板-->
<a-modal class="show-drawer" :title="$t('Copyparameterlist')" width="700px" v-model="drawerVisible" :footer="null"> <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' <project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url' :templateTitle='templatetitle' @copysubmit='copysubmit'
:projectId='this.$route.query.id'></project-collection-parameters> :selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters>
</a-modal> </a-modal>
</a-card> </a-card>
</template> </template>
@@ -124,44 +131,57 @@
title: this.$t('title'), title: this.$t('title'),
align: 'center', align: 'center',
dataIndex: 'title', dataIndex: 'title',
width: 240,
scopedSlots: { customRender: 'paramsManifestClick' } scopedSlots: { customRender: 'paramsManifestClick' }
}, },
{ {
title: this.$t('status'), title: this.$t('status'),
align: 'center', align: 'center',
width: 80,
ellipsis: true,
dataIndex: 'state' dataIndex: 'state'
}, },
{ {
title: this.$t('parameterTemplateName'), title: this.$t('parameterTemplateName'),
align: 'center', align: 'center',
width: 180,
ellipsis: true,
dataIndex: 'paramsTemplateName' dataIndex: 'paramsTemplateName'
}, },
{ {
title: this.$t('collectionCompletionTime'), title: this.$t('collectionCompletionTime'),
align: 'center', align: 'center',
dataIndex: 'finishTime' dataIndex: 'finishTime',
width: 160,
ellipsis: true,
scopedSlots: { customRender: 'collectionCompletionTime' }
}, },
{ {
title: this.$t('Version'), title: this.$t('Version'),
align: 'center', align: 'center',
width: 50,
ellipsis: true,
dataIndex: 'version' dataIndex: 'version'
}, },
{ {
title: this.$t('creator'), title: this.$t('creator'),
align: 'center', align: 'center',
width: 110,
ellipsis: true,
dataIndex: 'createBy' dataIndex: 'createBy'
}, },
{ {
title: this.$t('createTime'), title: this.$t('createTime'),
align: 'center', align: 'center',
width: 160, width: 160,
ellipsis: true,
dataIndex: 'createTime' dataIndex: 'createTime'
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
width: 310, width: 210,
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
@@ -177,7 +197,7 @@
deleteAll: 'params/manifest/deleteBatch', deleteAll: 'params/manifest/deleteBatch',
conAdd: 'params/config/addBatch', conAdd: 'params/config/addBatch',
conList: 'params/config/list', conList: 'params/config/list',
changeExtension:'params/manifest/changeExtension', changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig' verifyConfig: 'params/manifest/verifyConfig'
}, },
loading: false, loading: false,
@@ -199,7 +219,7 @@
drawerVisible: false, drawerVisible: false,
drawerVisibleitem: false, drawerVisibleitem: false,
titleTag: '', titleTag: '',
selectedRowKeysvalArray: [], selectedRowKeysvalArray: []
} }
}, },
mounted() { mounted() {
@@ -214,7 +234,7 @@
localStorage.setItem('paramsManifest', JSON.stringify(item)) localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = _this.$router.resolve({ let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection', path: '/ParameterItemCollection',
query: item, query: item
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
} else { } else {
@@ -223,7 +243,7 @@
}) })
}, },
deleteLib(val) { deleteLib(val) {
if(val.state === '已完成' || val.state === 'Finished' ) { if (val.state === '已完成' || val.state === 'Finished') {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmDelete'), content: _this.$t('ConfirmDelete'),
@@ -252,9 +272,9 @@
}, },
// 配置 // 配置
configure(item) { configure(item) {
this.itemId = item.id this.itemId = item.id
this.itemRow = item this.itemRow = item
this.$refs.configureRef.addModel(item.id) this.$refs.configureRef.addModel(item.id)
}, },
handleCancel(val) { handleCancel(val) {
this.areaVisible = val this.areaVisible = val
@@ -277,7 +297,7 @@
this.pageNo = 1 this.pageNo = 1
this.getlist() this.getlist()
}, },
onSelectChange(val,valArray) { onSelectChange(val, valArray) {
this.selectedRowKeys = val this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',') this.selectedRowKeysArray = val.join(',')
this.selectedRowKeysvalArray = valArray this.selectedRowKeysvalArray = valArray
@@ -286,7 +306,7 @@
this.areaVisible = true this.areaVisible = true
setTimeout(() => { setTimeout(() => {
this.$refs.templateRef.editData(edit) this.$refs.templateRef.editData(edit)
},50) }, 50)
}, },
handleAdd() { handleAdd() {
this.areaVisible = true this.areaVisible = true
@@ -294,11 +314,11 @@
// 变更扩展 // 变更扩展
handleModule() { handleModule() {
let _this = this let _this = this
if(this.selectedRowKeys.length == 0){ if (this.selectedRowKeys.length == 0) {
this.$message.warning(_this.$t('pleaseSelectData')) this.$message.warning(_this.$t('pleaseSelectData'))
}else if(this.selectedRowKeys.length > 1){ } else if (this.selectedRowKeys.length > 1) {
this.$message.warning(_this.$t('OnlyOneSelected')) 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) => { getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
@@ -316,11 +336,11 @@
// 默认为0 可全部删除 // 默认为0 可全部删除
let flag = 1 let flag = 1
this.selectedRowKeysvalArray.forEach((item) => { this.selectedRowKeysvalArray.forEach((item) => {
if(item.state !== '已完成' && val.state !== 'Finished' ){ if (item.state !== '已完成' && val.state !== 'Finished') {
flag = 0 flag = 0
} }
}) })
if(flag) { if (flag) {
let param = { let param = {
ids: this.selectedRowKeysArray ids: this.selectedRowKeysArray
} }
@@ -365,6 +385,7 @@
pageNo: this.pageNo, pageNo: this.pageNo,
...this.queryParam ...this.queryParam
} }
this.loading = true
getAction(this.url.list, query).then((res) => { getAction(this.url.list, query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
@@ -501,8 +522,22 @@
cursor: pointer; cursor: pointer;
border-radius: 4px; 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>
<style> <style>
@@ -11,16 +11,16 @@
> >
<a-row :gutter='24'> <a-row :gutter='24'>
<a-col :span='9'> <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' <a-input style='width: 420px'
:placeholder="$t('PleaseEnter')+$t('title')" :placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title' /> v-model='formData.title'/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span='9'> <!-- <a-col :span='9'>-->
</a-col> <!-- </a-col>-->
<a-col :span='6'> <!-- <a-col :span='6'>-->
</a-col> <!-- </a-col>-->
</a-row> </a-row>
<a-row :gutter='24'> <a-row :gutter='24'>
<a-col :span='9'> <a-col :span='9'>
@@ -29,7 +29,7 @@
<j-dict-select-tag class='box-input' v-model='form.region' <j-dict-select-tag class='box-input' v-model='form.region'
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'" :type="'select'"
:triggerChange='false' :dictCode="'region'" /> :triggerChange='false' :dictCode="'region'"/>
</a-form-model-item> </a-form-model-item>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@@ -37,7 +37,7 @@
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'> <a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
<a-input <a-input
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
v-model='form.paramsTemplateName' /> v-model='form.paramsTemplateName'/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span='6' style='margin-top: 5px'> <a-col :span='6' style='margin-top: 5px'>
@@ -79,148 +79,153 @@
</template> </template>
<script> <script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage' import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
export default { export default {
name: 'diolagArea', name: 'diolagArea',
components: {}, components: {},
data() { data() {
return { return {
title: this.$t('add'), title: this.$t('add'),
total: 0, total: 0,
selectedRowKeysDate: {}, selectedRowKeysDate: {},
loading: false, loading: false,
editId: '', editId: '',
columns: [ columns: [
{ {
title: this.$t('zoneOfApplication'), title: this.$t('zoneOfApplication'),
dataIndex: 'region_dictText', dataIndex: 'region_dictText',
key: 'showArea', key: 'showArea',
align: 'center', align: 'center',
ellipsis: true ellipsis: true
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
}, },
{ wrapperCol: {
title: this.$t('parameterTemplate'), xs: { span: 24 },
align: 'center', sm: { span: 14 }
dataIndex: 'paramsTemplateName', },
ellipsis: true form: {},
} formData: {},
], rules: {
newVisible: false, title: [
labelCol: { { required: true, message: this.$t('enterTitle'), trigger: 'blur' },
xs: { span: 24 }, {
sm: { span: 7 } max: 200,
}, message: this.$t('title') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
wrapperCol: { trigger: 'blur'
xs: { span: 24 }, }
sm: { span: 14 } ]
}, },
form: {}, areaTable: [],
formData: {}, flag: false, //表单提交标识
rules: { spinLoading: false,
title: [ confirmLoading: false,
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' } selectedRowKeys: [],
] pageNo: 1,
}, pageSize: 10,
areaTable: [], row: {}
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
} }
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() this.loadData()
}, },
searchReset() { methods: {
this.form = {} pageOnChange(page, pageSize) {
this.loadData() this.pageNo = page
}, this.loadData()
handleCancel() { },
this.$emit('areaVisible', false) SizeChange(page, pageSize) {
}, this.pageNo = 1
onSelectChange(selectedRowKeys, selectedRowKeysDate) { this.pageSize = pageSize
this.selectedRowKeysDate = selectedRowKeysDate this.loadData()
this.selectedRowKeys = selectedRowKeys },
}, loadData() {
handleTableChange(val) { this.loading = true
console.log(',,,') let params = {
}, pageNo: this.pageNo,
showModal() { pageSize: this.pageSize,
this.title = this.$t('add') ...this.form
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 => { getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
if (valid) { if (res.success) {
this.flag = true this.areaTable = [...res.result.records]
this.spinLoading = true this.total = res.result.total
this.confirmLoading = true }
}).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 = { let postDate = {
title: this.formData.title, title: this.formData.title,
paramsTemplateId: this.paramsTemplateId || this.selectedRowKeys[0], paramsTemplateId: this.paramsTemplateId || this.selectedRowKeys[0],
@@ -230,7 +235,7 @@ export default {
if (this.formData.id) { if (this.formData.id) {
//编辑 //编辑
postDate = { postDate = {
id : this.formData.id, id: this.formData.id,
...postDate ...postDate
} }
postAction(`params/manifest/edit`, postDate).then(res => { postAction(`params/manifest/edit`, postDate).then(res => {
@@ -271,85 +276,92 @@ export default {
this.spinLoading = false this.spinLoading = false
this.confirmLoading = 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() { watch: {
this.newVisible = false selectedRowKeyS(val) {
this.$refs.ruleForm.resetFields() this.selectedRowKeys = val
}, }
//删除按钮
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
} }
}
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.diolag-area { .diolag-area {
.table-area { .table-area {
margin: 20px 0; margin: 20px 0;
.action-edit { .action-edit {
margin-right: 10px; margin-right: 10px;
}
}
.table-del {
color: red;
} }
} }
.table-del { .drawer-bootom-button {
display: flex;
justify-content: center;
}
.Required {
color: red; color: red;
margin-right: 4px;
} }
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-right: 4px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
.ant-modal-wrap { .ant-modal-wrap {
.ant-modal { .ant-modal {
.ant-modal-content { .ant-modal-content {
.ant-modal-footer { .ant-modal-footer {
text-align: center; text-align: center;
}
} }
} }
} }
} }
} </style>
<style>
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
white-space: nowrap!important;
}
</style> </style>
@@ -174,7 +174,7 @@ export default {
methods: { methods: {
// 清单列表传出数据 // 清单列表传出数据
listVisibleRow(val) { listVisibleRow(val) {
this.selectedRowKeys = [] // this.selectedRowKeys = []
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable)) let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
newAreaTable.forEach((item, index) => { newAreaTable.forEach((item, index) => {
if( item.id == this.listVisibleRowDate.id ) { if( item.id == this.listVisibleRowDate.id ) {
@@ -17,8 +17,8 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('configurationName')">{{$t('configurationName')}}</span> :title="$t('configurationName')">{{$t('configurationName')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="nioNumber"> <a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input" <a-input class="box-input"
@@ -48,8 +48,8 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('Model')">{{$t('Model')}}</span> :title="$t('Model')">{{$t('Model')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="nioNumber"> <a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input" <a-input class="box-input"
@@ -79,8 +79,8 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('electricMachinery')">{{$t('electricMachinery')}}</span> :title="$t('electricMachinery')">{{$t('electricMachinery')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="nioNumber"> <a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input" <a-input class="box-input"
@@ -95,8 +95,11 @@
<div class="title-text"> <div class="title-text">
<!-- <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>--> <!-- <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>-->
</div> </div>
<a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}</a-button> <a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">{{$t('deleteConfiguration')}}</a-button> </a-button>
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">
{{$t('deleteConfiguration')}}
</a-button>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@@ -112,337 +115,340 @@
</template> </template>
<script> <script>
import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
import axios from 'axios' 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() {
}, export default {
methods: { name: 'addModel',
getNameList() { components: {
getAction('project/projectNameInfoEO/list', {}).then((res) => { uploadFile
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
}, },
addModel(id) { props: {
this.paramsConfigEOList = [] itemId: {
this.visible = true type: String,
this.title = this.$t('MaintainConfigureInfo') default: '',
this.formInline = {} require: true
this.getconList(id) },
url: {
type: Object,
default: '',
require: true
},
itemRow: {
type: Object,
default: '',
require: true
}
}, },
getconList(id) { data() {
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => { return {
if (res.success) { formInline: {},
if(res.result.length === 0) { confirmLoading: false,
this.paramsConfigEOList = [ visible: false,
{ rules: {
id: '', // nioNumber:[
// displaySeq: 0, // { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
configName: '', // 配置名称 // ]
version: '', // 版本 },
carType: '', // 车型 disabled: false,
battery: '', // 电池 projectNameList: [],
motor: '', // 电机 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 { } 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')) addModel(id) {
} this.paramsConfigEOList = []
}, this.visible = true
deleteConfiguration(displaySeq,index) { this.title = this.$t('MaintainConfigureInfo')
if(this.paramsConfigEOList.length === 1) { this.formInline = {}
this.$message.warning(this.$t('oneconfigurationInformation')) this.getconList(id)
return },
} getconList(id) {
let _this = this getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
this.$confirm({ if (res.success) {
content: _this.$t('ConfirmDelete'), if (res.result.length === 0) {
onOk() { this.paramsConfigEOList = [
_this.deleteConfigIdsArray.push(displaySeq) {
_this.deleteConfigIds = _this.deleteConfigIdsArray.join(',') id: '',
let _tt = _this.paramsConfigEOList.splice(index,1) // displaySeq: 0,
if(_tt.length === 1) { configName: '', // 配置名称
_this.$message.success(_this.$t('DeleteSucceeded')) version: '', // 版本
} carType: '', // 车型
} battery: '', // 电池
}) motor: '' // 电机
}, }
handleCancel() { ]
this.visible = false } else {
}, this.paramsConfigEOList = res.result
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.visible = true
this.confirmLoading = true } else {
postAction(this.url.conAdd, querycontentListItem).then((res) => { this.$message.warning(res.message)
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
}
})
} }
}) })
},
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> </script>
<style> <style>
.formAdd .ant-form-item-label { .formAdd .ant-form-item-label {
width: 130px; width: 130px;
} }
.formAdd .ant-form-item-control-wrapper { .formAdd .ant-form-item-control-wrapper {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
/*.formAdd .ant-form-item {*/ /*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/ /* margin-bottom: 20px;*/
/*}*/ /*}*/
.itemModel .ant-form-item-control-wrapper { .itemModel .ant-form-item-control-wrapper {
width: 100%; width: 100%;
} }
.box-input .ant-select-selection--single { .box-input .ant-select-selection--single {
height: 38px; height: 38px;
} }
.box-input .ant-select-selection--multiple { .box-input .ant-select-selection--multiple {
height: 38px; height: 38px;
} }
.box-input .ant-select-selection__rendered { .box-input .ant-select-selection__rendered {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li { .box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px; margin-top: 6px;
} }
.box-input .ant-calendar-picker { .box-input .ant-calendar-picker {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
.box-input .ant-calendar-picker-input { .box-input .ant-calendar-picker-input {
height: 38px; height: 38px;
} }
.box-input .ant-input-number-input-wrap { .box-input .ant-input-number-input-wrap {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
</style> </style>
<style scoped> <style scoped>
.box-title-text { .box-title-text {
line-height: 1.4; line-height: 1.4;
display: flex; display: flex;
/*align-items: center;*/ /*align-items: center;*/
} }
.title-text { .title-text {
width: 114px; width: 114px;
text-align: right; text-align: right;
display: inline-block; display: inline-block;
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
margin-right: 16px; margin-right: 16px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
height: 42px; height: 42px;
line-height: 48px; line-height: 48px;
} }
.box-input { .box-input {
display: inline-block; display: inline-block;
height: 38px; height: 38px;
width: 100%; width: 100%;
} }
.itemModel { .itemModel {
width: calc(100% - 130px); width: calc(100% - 130px);
display: inline-block; display: inline-block;
margin-top: 2px; margin-top: 2px;
} }
.Required { .Required {
color: red; color: red;
margin-right: 4px; margin-right: 4px;
} }
.title-text-text { .title-text-text {
margin-top: 9px; margin-top: 9px;
} }
.formAdd { .formAdd {
margin-bottom: 40px; margin-bottom: 40px;
} }
.drawer-bootom-button { .drawer-bootom-button {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
z-index:100; z-index: 100;
border-top: 1px solid #e8e8e8; border-top: 1px solid #e8e8e8;
padding: 10px 16px; padding: 10px 16px;
text-align: right; text-align: right;
left: 0; left: 0;
background: #fff; background: #fff;
border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;
} }
</style> </style>
<style> <style>
.ant-input-disabled { .ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
} }
</style> </style>