Merge branch 'dev_20230912_Platform' into 'fix_20230911_UAT'

Dev 20230912 platform

See merge request laws-nio/laws-weilai!362
This commit is contained in:
高嵩
2023-10-09 06:20:15 +00:00
14 changed files with 960 additions and 211 deletions
@@ -569,7 +569,7 @@ public class PlatformProjectLawsInventoryEOServiceImpl extends ServiceImpl<Platf
@Override
public void editById(ProjectLawsInventoryEO projectLawsInventoryEO) {
this.editService.editById(projectLawsInventoryEO);
this.editService.editByIdPlatform(projectLawsInventoryEO);
}
/**
@@ -31,6 +31,8 @@
pni.project_name,
plb.target_market,
plb.project_version,
plb.project_name_id,
plb.platform,
pyni.year_name,
pli.serial_number,
pli.title,
@@ -62,7 +64,7 @@
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
where
plb.platform is null
1=1
<!--<if test="ncrTrackVO.projectLibraryId != null and ncrTrackVO.projectLibraryId != ''">
plb.id =#{ncrTrackVO.projectLibraryId}
and
@@ -14,8 +14,21 @@ import com.jero.modules.dummy.util.ListDiff;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectLibraryRoleRelEO;
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.entity.ProjectUserPermission;
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
import com.jero.modules.project.enums.InventoryAffirmNodeEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.PermissionDescriptionEnum;
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
import com.jero.modules.project.enums.ProjectMessageEnum;
import com.jero.modules.project.enums.ProjectRoleEnum;
import com.jero.modules.project.enums.ProjectUserLocationEnum;
import com.jero.modules.project.enums.RoleRelModelTypeEnum;
import com.jero.modules.project.enums.TaskStatusEnum;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
import com.jero.modules.project.service.IProjectUserPermissionService;
@@ -43,14 +56,20 @@ import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
@@ -1248,6 +1267,243 @@ public class ProjectLawsInventoryEOEditServiceImpl {
throw new JeroBootException("该用户没有权限操作该数据!");
}
}
public void editByIdPlatform(ProjectLawsInventoryEO projectLawsInventoryEO) {
Date now = new Date();
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// boolean checkResult = checkData(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), projectLawsInventoryEO.getId());
// if (checkResult) {
QueryWrapper<ProjectLawsInventoryEO> oldPliQueryWrap = new QueryWrapper<>();
oldPliQueryWrap.lambda().eq(ProjectLawsInventoryEO::getId, projectLawsInventoryEO.getId());
List<ProjectLawsInventoryEO> oldPliEoList = projectLawsInventoryEOService.list(oldPliQueryWrap);
this.updateProjectLawsInventorySendMessage(projectLawsInventoryEO);
// 根据法规清单id,获取该法规清单在待办中心的任务明细。
List<String> oldPliEoIdList = oldPliEoList.stream().map(ProjectLawsInventoryEO::getId).distinct().collect(Collectors.toList());
QueryWrapper<ProcessInfoDetailEO> pidEoQueryWrap = new QueryWrapper<>();
pidEoQueryWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId, oldPliEoIdList);
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidEoQueryWrap);
if (CollectionUtils.isNotEmpty(pidEoList)) {
// 处理编辑法规工程师的逻辑
this.updateRegulationOwner(projectLawsInventoryEO, oldPliEoList, pidEoList);
// 处理编辑责任人的逻辑
this.updateDutyPerson(projectLawsInventoryEO, oldPliEoList, pidEoList);
}
// 处理修改设计或验证符合性截止日期的逻辑
this.updateDesignOrVerifyEndTime(projectLawsInventoryEO, oldPliEoList);
projectLawsInventoryEO.setUpdateTime(now);
ProjectLawsInventoryEO projectLawsInventoryEOCopy = SerializationUtils.clone(projectLawsInventoryEO);//复制
//更新log
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String username = sysUser.getUsername();
String contentLog = username + "编辑了清单中的“" + projectLawsInventoryEO.getSerialNumber() + "”:</br>";
String enContentLog = username + " edited the “" + projectLawsInventoryEO.getSerialNumber() + "” in the list:</br>";
List<ProjectLawsInventoryEO> infoEOList = new ArrayList<>();
infoEOList.add(projectLawsInventoryEO);
List<ProjectLawsInventoryEO> infoEOListCopy = new ArrayList<>();
infoEOListCopy.add(projectLawsInventoryEOCopy);
//查询数据库里原来的数据
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
List<ProjectLawsInventoryEO> dataList = projectLawsInventoryEOService.list(queryWrapper.eq("id", projectLawsInventoryEO.getId()));
List<ProjectLawsInventoryEO> dataListCopy = DeepCopyListUtil.depCopy(dataList);
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(ProjectLawsInventoryEO::getId, projectLawsInventoryEO.getId());
setDateNull(projectLawsInventoryEO, updateWrapper);
//保存
projectLawsInventoryEOService.update(projectLawsInventoryEO, updateWrapper);
// saveOrUpdate(projectLawsInventoryEO);
//获取编辑中的责任领域
List<String> dutyTerritoryList = new ArrayList<>();
dutyTerritoryList = Arrays.asList(projectLawsInventoryEO.getDutyTerritory().split(","));
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
//获取当前的projectLibrartId
String projectLibrartId = projectLawsInventoryEO.getProjectLibraryId();
String cut = projectLawsInventoryEO.getCut();
Map<String, Object> params = new HashMap<>();
params.put("projectLibraryId", projectLibrartId);
params.put("userId", currentUser.getId());
params.put("modelType", RoleRelModelTypeEnum.LAWS_INVENTORY.getValue());
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.queryByProjectLibraryIdAndUserId(params);
String roleCode1 = projectLibraryRoleRelEO.getRoleCode();
//分别获取当前编辑中的设计符合性和认证符合性责任人
List<String> designDutyIdList = new ArrayList<>();
designDutyIdList = Arrays.asList(projectLawsInventoryEO.getDesignDutyId().split(","));
List<String> verifyDutyIdList = new ArrayList<>();
verifyDutyIdList = Arrays.asList(projectLawsInventoryEO.getVerifyDutyId().split(","));
//allDutyList 为法规工程师中验证符合性和确认符合中的责任人
List<String> allDutyList = new ArrayList<>();
allDutyList.addAll(designDutyIdList);
allDutyList.addAll(verifyDutyIdList);
allDutyList = allDutyList.stream().distinct().collect(Collectors.toList());
//获取相关责任领域下的和projectLibrartId的相关人员名单的信息
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritoy(projectLibrartId, dutyTerritoryList);
List<String> allList = new ArrayList<>();
List<String> enginnerList = new ArrayList<>();
List<String> lawEnginnerList = new ArrayList<>();
List<String> enginnerLawSetList = new ArrayList<>();
List<String> enginnerAttSetList = new ArrayList<>();
//根据相关人员名单获取的工程接口人
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
String enginneringInterfacePerson = relatedPersonnel.getEngineeringInterfacePerson();
if (!StringUtils.isEmpty(enginneringInterfacePerson)) {
enginnerList = Arrays.stream(enginneringInterfacePerson.split(",")).collect(Collectors.toList());
allList.addAll(enginnerList);
}
}
//获取相关人员名单中的法规工程师
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
String lawEngineer = relatedPersonnel.getLawEngineer();
if (!StringUtils.isEmpty(lawEngineer)) {
lawEnginnerList = Arrays.stream(lawEngineer.split(",")).collect(Collectors.toList());
allList.addAll(lawEnginnerList);
}
}
//获取相关人员名单中的工程接口-法规工程师设置
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
String engineerLawSet = relatedPersonnel.getEngineerLawSet();
if (!StringUtils.isEmpty(engineerLawSet)) {
enginnerLawSetList = Arrays.stream(engineerLawSet.split(",")).collect(Collectors.toList());
allList.addAll(enginnerLawSetList);
}
}
//获取相关人员名单中的工程接口-认证工程师设置
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
String engineerAttSet = relatedPersonnel.getEngineerAttSet();
if (!StringUtils.isEmpty(engineerAttSet)) {
enginnerAttSetList = Arrays.stream(engineerAttSet.split(",")).collect(Collectors.toList());
allList.addAll(enginnerAttSetList);
}
}
//获取当前项目库id的studio工程师和认证工程师
List<String> studionList = new ArrayList<>();
List<String> certificationEngineerList = new ArrayList<>();
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseService.queryById(projectLibrartId, cut);
for (ProjectLibraryBase projectLibraryBase : projectLibraryBases) {
studionList.add(projectLibraryBase.getStudioEngineer());
String certificationEngineer = projectLibraryBase.getCertificationEngineer();
if (!StringUtils.isEmpty(certificationEngineer)) {
certificationEngineerList = Arrays.stream(certificationEngineer.split(",")).collect(Collectors.toList());
allList.addAll(certificationEngineerList);
}
}
allList = allList.stream().filter(all -> {
return StringUtils.isNotBlank(all);
}).distinct().collect(Collectors.toList());
/*
for(String all : allList){
if(all.equals("")){
allList.remove(all);
}
}
*/
//遍历所有人alllist中是否包含责任人,如果包含,不用操作。
//-------如果不包含,再去判断当前用户的角色是studio、法规还是认证
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
if (allList.size() > 0) {
for (String allDuty : allDutyList) {
String dutyPerson = allDuty;
if (StringUtils.isNotEmpty(dutyPerson) && !allList.contains(dutyPerson) && StringUtils.isNotEmpty(roleCode1)) {
if (roleCode1.equals(com.jero.modules.project.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue())) {
if (relatedPersonnel.getEngineeringInterfacePerson() != null) {
String engineeringInterfacePerson = dutyPerson + "," + relatedPersonnel.getEngineeringInterfacePerson();
relatedPersonnel.setEngineeringInterfacePerson(engineeringInterfacePerson);
} else {
relatedPersonnel.setEngineeringInterfacePerson(dutyPerson);
}
} else if (roleCode1.equals(com.jero.modules.project.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue())) {
if (relatedPersonnel.getEngineerLawSet() != null) {
String engineerLawSet = dutyPerson + "," + relatedPersonnel.getEngineerLawSet();
relatedPersonnel.setEngineerLawSet(engineerLawSet);
} else {
relatedPersonnel.setEngineerLawSet(dutyPerson);
}
} else if (roleCode1.equals(com.jero.modules.project.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())) {
if (relatedPersonnel.getEngineerAttSet() != null) {
String engineerAttSet = dutyPerson + "," + relatedPersonnel.getEngineerAttSet();
relatedPersonnel.setEngineerAttSet(engineerAttSet);
} else {
relatedPersonnel.setEngineerAttSet(dutyPerson);
}
}
}
}
}
}
this.projectRelatedPersonnelService.updateBatchById(projectRelatedPersonnelList);
//翻译-中文
translateData(infoEOList);
translateData(dataList);
//翻译-英文
translateDataToEn(infoEOListCopy);
translateDataToEn(dataListCopy);
//比对不同字段
Map<String, String> infoDiff = ListDiff.compareObject(dataList.get(0), projectLawsInventoryEO);
Map<String, String> infoDiffEn = ListDiff.compareObject(dataListCopy.get(0), projectLawsInventoryEOCopy);
//设置更新log
setContentLog(infoDiff, contentLog, infoDiffEn, enContentLog, projectLawsInventoryEO.getProjectLibraryId());
//验证用户是否是该法规上级 项目库的studio, 如果是,则同步更新流程
int roleCode = projectLawsInventoryEOService.checkUserRole(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), "");
if (StringUtils.equals(String.valueOf(roleCode), ProjectRoleEnum.STUDIO_ENGINEER.getValue())) {
//更新流程信息
projectLawsInventoryEOService.updateFlowInfo(projectLawsInventoryEO);
}
//设置权限 先删后加
List<ProjectUserPermission> adds = new ArrayList<>();
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getRegulationOwnerId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_REGULATION.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getHomologationEngineerId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_HOMOLOGATION.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getEngineeringInterfacePerson(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_INTERFACE.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getDesignInitiatorId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_DESIGN_INITIATOR.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getDesignDutyId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_DESIGN_DUTY.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getPrehomoInitiatorId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_PREHOMO_INITIATOR.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getPrehomoDutyId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_PREHOMO_DUTY.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getVerifyInitiatorId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_VERIFY_INITIATOR.getValue());
}
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())) {
setProjectLawsInventoryPermission(projectLawsInventoryEO.getVerifyDutyId(), projectLawsInventoryEO.getProjectLibraryId(), projectLawsInventoryEO.getId(), now, adds, ProjectUserLocationEnum.PROJECT_LAWS_INVENTORY_VERIFY_DUTY.getValue());
}
if (ObjectUtils.isNotEmpty(adds)) {
projectUserPermissionService.saveBatch(adds);
}
// }
// else {
// throw new JeroBootException("该用户没有权限操作该数据!");
// }
}
/**
* 发送消息
@@ -192,11 +192,16 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
String yearName = trackVO.getYearName();
String market = getMarket(targetMarketList, trackVO,ncrTrackVO.getCut());
String projectVersion = trackVO.getProjectVersion();
if(StringUtils.isNotBlank(projectVersion)){
trackVO.setProjectName(projectName+"-"+yearName+"-"+market+"-"+projectVersion);
if(StringUtils.isNotBlank(trackVO.getPlatform())){
trackVO.setProjectName(trackVO.getProjectNameId());
}else{
trackVO.setProjectName(projectName+"-"+yearName+"-"+market);
if(StringUtils.isNotBlank(projectVersion)){
trackVO.setProjectName(projectName+"-"+yearName+"-"+market+"-"+projectVersion);
}else{
trackVO.setProjectName(projectName+"-"+yearName+"-"+market);
}
}
//责任领域中英文切换
if(StringUtils.isNotBlank(trackVO.getDutyTerritory())){
String dutyTerritory = pull(dictItemList, trackVO.getDutyTerritory(), "duty_territory", ncrTrackVO.getCut());
@@ -784,10 +789,12 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
private String getMarket(List<DictModel> targetMarketList, NcrTrackVO trackVO,String cut) {
//目标市场
List<DictModel> dictModelList = new ArrayList<>();
for (String s : trackVO.getTargetMarket().split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
if(StringUtils.isNotBlank(trackVO.getTargetMarket())){
for (String s : trackVO.getTargetMarket().split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
}
}
String targetMarket = "";
if(dictModelList.size() != 0){
@@ -247,6 +247,10 @@ public class NcrTrackVO implements Serializable {
@ApiModelProperty(value = "旧数据->old,新数据->new")
private String flag;
private String projectNameId;
private String platform;
+27
View File
@@ -1988,4 +1988,31 @@ module.exports = {
matchempty:'The match is empty',
onlyDataProcessStatusDeleted:'Data can only be deleted if the process status is task ready, approved, or rejected by the responsible person',
platformitemhasbeenassociated:'A platform item has been associated',
power:'power',
producer:'producer',
Nameplatelabel:'Nameplate label',
Batteryfilingrecord:'Battery filing record',
Modelinformation:'Model information',
Batterynationalcode:'Battery national code',
Recordnformation:'Record information',
Electriccellproductionenterprises:'Electric cell production enterprises',
Assemblymanufacturer:'Assembly manufacturer',
PartNumberCN:'Part Number (Domestic)',
PartNumberEU:'Part Number (Foreign)',
bitfilecode:'24-bit file code',
Vendorcode:'Vendor code',
Productclasscode:'Product class code',
Batterytypecode:'Battery type code',
Specificationcode:'Specification code',
Traceinformationcode:'Trace information code',
Productionyearmonthdateserialnumber:'Production year month date serial number',
dimension:'dimension(mm)',
Ratedcapacity:'Rated capacity(Ah)',
Nominalvoltage:'Nominal voltage(V)',
Ratedmass:'Rated mass(kg)',
Numbercontainedmodules:'Number of contained modules',
Moduleseriesparallelmode:'Module series parallel mode',
modulspecificationcodeused:'The module or monomer specification code used',
Coolingmode:'Cooling mode',
Filingcompletiontime:'Filing completion time',
}
+27
View File
@@ -3944,4 +3944,31 @@ module.exports = {
Processdetails:'流程详情',
matchempty:'匹配项为空',
platformitemhasbeenassociated:'已关联平台件项目',
power:'功率',
producer:'生产商',
Nameplatelabel:'铭牌标签',
Batteryfilingrecord:'电池备案记录',
Modelinformation:'型号信息',
Batterynationalcode:'电池国标码',
Recordnformation:'备案信息',
Electriccellproductionenterprises:'电芯生产企业',
Assemblymanufacturer:'总成生产企业',
PartNumberCN:'零件号(国内)',
PartNumberEU:'零件号(国外)',
bitfilecode:'24位备案码',
Vendorcode:'供应商代码',
Productclasscode:'产品类型代码',
Batterytypecode:'电池类型代码',
Specificationcode:'规格代码',
Traceinformationcode:'追溯信息代码',
Productionyearmonthdateserialnumber:'生产年月日序列号',
dimension:'尺寸(mm)',
Ratedcapacity:'额定容量(Ah)',
Nominalvoltage:'标称电压(V)',
Ratedmass:'额定质量(kg)',
Numbercontainedmodules:'包含模块个数',
Moduleseriesparallelmode:'模块串并联方式',
modulspecificationcodeused:'所用模块或单体规格代码',
Coolingmode:'冷却方式',
Filingcompletiontime:'备案完成时间',
}
@@ -868,6 +868,7 @@
this.formInline = {}
this.dutyTerritoryList = []
this.visible = true
this.flowdisabled = false
this.personnelVisible = true
value.dutyDepart = value.dutyDepart ? value.dutyDepart.split(',') : []
value.dutyTerritory = value.dutyTerritory ? value.dutyTerritory.split(',') : []
@@ -1207,7 +1207,12 @@
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'List to be released' ||
this.selectedRowKeysList[i].flowStatus == 'Review and pass') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1707,19 +1712,24 @@
deleteLib(val) {
let _this = this
if (val.flowStatus == 'List to be released' || val.flowStatus == 'Review and pass') {
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id, projectLibraryId: _this.$route.query.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
console.log(val)
if(val.projectCertificationInventoryEOS && (val.projectCertificationInventoryEOS.length > 0 || val.projectCertificationInventoryEOS !== null)){
this.$message.warning(val.serialNumber + this.$t('platformitemhasbeenassociated'))
}else{
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id, projectLibraryId: _this.$route.query.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
}
} else {
this.$message.warning(this.$t('onlyDataWithProcessStatusDeleted'))
}
@@ -242,7 +242,7 @@
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
<a-form-model-item class="itemModel"
:prop="formInline.designDeliverableType.join(',').includes('1645667531513237506')?'':'designDutyIdName'"
:rules="[{ required: formInline.designDeliverableType.join(',').includes('1645667531513237506')?false:true,
message: $t('personLiable') + $t('cannotEmpty'), trigger: 'change'}]">
@@ -373,7 +373,7 @@
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
<a-form-model-item class="itemModel"
:prop="formInline.verifyDeliverableType.join(',').includes('1645667531513237506')?'':'verifyDutyIdName'"
:rules="[{ required: formInline.verifyDeliverableType.join(',').includes('1645667531513237506')?false:true,
message: $t('personLiable') + $t('cannotEmpty'), trigger: 'change'}]">
@@ -1332,6 +1332,7 @@
.formAdd {
margin-bottom: 40px;
}
.button-text {
@@ -11,16 +11,49 @@
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<!-- 项目基本信息-->
<div class="header-text">
{{$t('basicInformationOfParameters')}}
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
<span class="title-text-text" :title="$t('power')">{{$t('power')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectNameId">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="formInline.projectNameId"></a-input>
<a-form-model-item class="itemModel" prop="power">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('power')"
v-model="formInline.power"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('producer')">{{$t('producer')}}</span>
</div>
<a-form-model-item class="itemModel" prop="producer">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('producer')"
v-model="formInline.producer"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('targetMarket')">{{$t('targetMarket')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="targetMarket">
<j-multi-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
</a-form-model-item>
</div>
</a-col>
@@ -45,25 +78,41 @@
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
<span class="title-text-text" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>
</div>
<a-form-model-item class="itemModel" prop="ipdInfo">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('configurationItem')"
v-model="formInline.ipdInfo"></a-input>
<a-form-model-item class="itemModel-multi" prop="projectStatus">
<j-multi-select-tag class="box-input" v-model="formInline.projectStatus"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
:type="'select'"
:triggerChange="false" :dictCode="'project_status'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>
<span class="Required">*</span>
<span class="title-text-text" :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationPlan">
<a-input class="box-input"
:disabled="disabled"
:maxLength="200"
v-model="formInline.attestationPlan"
:placeholder="$t('PleaseEnter')+$t('certificationProgram')"/>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
allowClear
show-search
mode="multiple"
class="box-input"
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
@@ -72,19 +121,80 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">
<a-input class="box-input"
:disabled="disabled"
:maxLength="200"
v-model="formInline.vehicleDevelopmentPlan"
:placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>
<a-form-model-item class="itemModel" :prop="'regulationOwnerIdName'">
<PersonnelSelection :query="{db_field_name:'regulationOwnerId',db_field_txt:$t('regulatoryEngineer')}"
:isSingleChoice="true"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.regulationOwnerIdName"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyIdName">
<PersonnelSelection :query="{db_field_name:'designDutyId',db_field_txt:$t('regulatoryEngineer')}"
:isSingleChoice="true"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.designDutyIdName"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Nameplatelabel')">{{$t('Nameplatelabel')}}</span>
</div>
<a-form-model-item class="itemModelimg" prop="explanation">
<div>
<a-upload
:action="uploadAction+'?cut='+cut"
list-type="picture-card"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
>
<div v-if="fileList.length < 20">
<a-icon type="plus" />
<div class="ant-upload-text">
<!-- Upload-->
</div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancelimg">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</div>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- :maxLength="200"-->
<!-- v-model="formInline.vehicleDevelopmentPlan"-->
<!-- :placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('explain')">{{$t('explain')}}</span>
@@ -93,151 +203,306 @@
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explanation"
:maxLength="500"
:rows="2"/>
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- 电池备案记录-->
<div class="header-text">
{{$t('Batteryfilingrecord')}}
</div>
<!-- 型号信息-->
<div class='header-title'>
<span class='header-title-text'>{{$t('Modelinformation')}}</span>
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('productModel')">{{$t('productModel')}}</span>
</div>
<a-form-model-item class="itemModel" prop="productModel">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('productModel')"
v-model="formInline.productModel"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Electriccellproductionenterprises')">{{$t('Electriccellproductionenterprises')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Electriccellproductionenterprises">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Electriccellproductionenterprises')"
v-model="formInline.Electriccellproductionenterprises"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Assemblymanufacturer')">{{$t('Assemblymanufacturer')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="Assemblymanufacturer">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Assemblymanufacturer')"
v-model="formInline.Assemblymanufacturer"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('PartNumberCN')">{{$t('PartNumberCN')}}</span>
</div>
<a-form-model-item class="itemModel" prop="PartNumberCN">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('PartNumberCN')"
v-model="formInline.PartNumberCN"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('PartNumberEU')">{{$t('PartNumberEU')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="PartNumberEU">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('PartNumberEU')"
v-model="formInline.PartNumberEU"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- 电池国标码-->
<div class='header-title'>
<span class='header-title-text'>{{$t('Batterynationalcode')}}</span>
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('bitfilecode')">{{$t('bitfilecode')}}</span>
</div>
<a-form-model-item class="itemModel" prop="bitfilecode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('bitfilecode')"
v-model="formInline.bitfilecode"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Vendorcode') + '(1~3)'">{{$t('Vendorcode') + '(1~3)'}}</span>
</div>
<a-form-model-item class="itemModel" prop="endorcode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Vendorcode') + '(1~3)'"
v-model="formInline.endorcode"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Productclasscode') + '(4)'">{{$t('Productclasscode') + '(4)'}}</span>
</div>
<a-form-model-item class="itemModel" prop="Productclasscode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Productclasscode') + '(4)'"
v-model="formInline.Productclasscode"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Batterytypecode') + '(5)'">{{$t('Batterytypecode') + '(5)'}}</span>
</div>
<a-form-model-item class="itemModel" prop="Batterytypecode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Batterytypecode') + '(5)'"
v-model="formInline.Batterytypecode"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Specificationcode') + '(6~7)'">{{$t('Specificationcode') + '(6~7)'}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="Specificationcode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Specificationcode') + '(6~7)'"
v-model="formInline.Specificationcode"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Traceinformationcode') + '(8~14)'">{{$t('Traceinformationcode') + '(8~14)'}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="Traceinformationcode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Traceinformationcode') + '(8~14)'"
v-model="formInline.Traceinformationcode"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Productionyearmonthdateserialnumber') + '(15~20)'">{{$t('Productionyearmonthdateserialnumber') + '(15~20)'}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="Productionyearmonthdateserialnumber">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Productionyearmonthdateserialnumber') + '(15~20)'"
v-model="formInline.Productionyearmonthdateserialnumber"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- 备案信息-->
<div class='header-title'>
<span class='header-title-text'>{{$t('Recordnformation')}}</span>
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('dimension')">{{$t('dimension')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dimension">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('dimension')"
v-model="formInline.dimension"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Ratedcapacity')">{{$t('Ratedcapacity')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Ratedcapacity">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Ratedcapacity')"
v-model="formInline.Ratedcapacity"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Nominalvoltage')">{{$t('Nominalvoltage')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Nominalvoltage">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Nominalvoltage')"
v-model="formInline.Nominalvoltage"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Ratedmass')">{{$t('Ratedmass')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Ratedmass">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Ratedmass')"
v-model="formInline.Ratedmass"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Numbercontainedmodules')">{{$t('Numbercontainedmodules')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Numbercontainedmodules">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Numbercontainedmodules')"
v-model="formInline.Numbercontainedmodules"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Moduleseriesparallelmode')">{{$t('Moduleseriesparallelmode')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Moduleseriesparallelmode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Moduleseriesparallelmode')"
v-model="formInline.Moduleseriesparallelmode"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('modulspecificationcodeused')">{{$t('modulspecificationcodeused')}}</span>
</div>
<a-form-model-item class="itemModel" prop="modulspecificationcodeused">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('modulspecificationcodeused')"
v-model="formInline.modulspecificationcodeused"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Coolingmode')">{{$t('Coolingmode')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dimension">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Coolingmode')"
v-model="formInline.Coolingmode"></a-input>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- 备注-->
<div class='header-title'>
<span class='header-title-text'>{{$t('remarks')}}</span>
</div>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Filingcompletiontime')">{{$t('Filingcompletiontime')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('Filingcompletiontime')"
@change="dateChange({db_field_name:'designDueDate'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.designDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="remarks">
<a-textarea
:placeholder="$t('remarks')"
:maxLength="500"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required">*</span>-->
<!-- <span class="title-text-text" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="projectStatus">-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.projectStatus"-->
<!-- :disabled="disabled"-->
<!-- @input="handleInput('projectStatus')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('projectStatus')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'project_status'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('brand')">{{$t('brand')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'brand'">-->
<!-- <j-dict-select-tag v-model="formInline.brand"-->
<!-- :placeholder="$t('PleaseSelect')+$t('brand')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'brand'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required">*</span>-->
<!-- <span class="title-text-text" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi" :prop="'studioEngineerName'">-->
<!-- <PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.studioEngineerName"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi" :prop="'certificationEngineerName'">-->
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.certificationEngineerName"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('DigitalPlatform')">{{$t('DigitalPlatform')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'digitalPlatform'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.digitalPlatform"-->
<!-- :placeholder="$t('PleaseEnter')+$t('DigitalPlatform')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('ModelPlatform')">{{$t('ModelPlatform')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="vehiclePlatform">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.vehiclePlatform"-->
<!-- :placeholder="$t('PleaseEnter')+$t('ModelPlatform')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="attestationPlan">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.attestationPlan"-->
<!-- :placeholder="$t('PleaseEnter')+$t('certificationProgram')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('configurationInformation')">{{$t('configurationInformation')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="ipdInfo">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.ipdInfo"-->
<!-- :placeholder="$t('PleaseEnter')+$t('configurationInformation')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- &lt;!&ndash; ^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$-->
<!-- &ndash;&gt;-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('explain')">{{$t('explain')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="explanation">-->
<!-- <a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"-->
<!-- v-model="formInline.explanation"-->
<!-- :rows="4"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -251,6 +516,16 @@
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import moment from 'moment'
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = () => resolve(reader.result)
reader.onerror = (error) => reject(error)
})
}
export default {
name: 'addModel',
@@ -324,6 +599,30 @@
trigger: 'blur'
}
],
power:[
{
required: true,
message: this.$t('power') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 200,
message: this.$t('DigitalPlatform') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
producer:[
{
required: true,
message: this.$t('producer') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 200,
message: this.$t('DigitalPlatform') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
digitalPlatform: [
{
max: 200,
@@ -345,6 +644,13 @@
trigger: 'change'
}
],
targetMarket: [
{
required: true,
message: this.$t('targetMarket') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
brand: [
{
required: true,
@@ -371,24 +677,82 @@
trigger: 'change'
}
],
certificationEngineerName: [
dutyTerritory: [
{
max: 100,
message: this.$t('certifiedEngineer') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
required: true,
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
],
regulationOwnerIdName: [
{
required: true,
message: this.$t('regulatoryEngineer') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
designDutyIdName: [
{
required: true,
message: this.$t('engineeringInterfacePerson') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
},
disabled: false,
previewVisible: false,
previewImage: '',
cut: '',
fileList: [],
projectNameList: [],
title: ''
firstLevelDutyTerritoryList:[],
title: '',
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
}
},
mounted() {
this.getNameList()
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
},
methods: {
...mapGetters(['userInfo']),
handleCancelimg() {
this.previewVisible = false;
},
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
handleChange({ fileList }) {
this.fileList = fileList;
console.log(this.fileList)
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
dateChange(item) {
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
},
getNameList(value) {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
@@ -411,8 +775,9 @@
this.title = this.$t('add')
this.formInline = {}
this.getNameList()
this.formInline.studioEngineerName = this.userInfo().username
this.formInline.studioEngineer = this.userInfo().id
this.getFirstLevelDutyTerritory()
this.formInline.regulationOwnerIdName = this.userInfo().username
this.formInline.regulationOwnerId = this.userInfo().id
this.formInline.projectVersion = '00'
this.formInline = { ...this.formInline }
this.$nextTick(() => {
@@ -582,7 +947,31 @@
height: 40px;
margin-bottom: 24px;
}
.itemModelimg {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
margin-bottom: 24px;
}
.header-text {
font-size: 16px;
color: #000000;
font-weight: bold;
}
.header-title-text{
font-size: 16px;
color: #000000;
line-height: 50px;
margin: 0 19px;
}
.header-title{
background: #F5F6F7;
width: 100%;
height: 50px;
margin-top: 10px;
margin-bottom: 10px;
}
.Required {
color: red;
margin-right: 4px;
@@ -318,6 +318,7 @@
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
platform:row.platform,
primaryKeyId: row.primaryKeyId,
PersonChargeFeedback: row.personChargeFeedback
}
@@ -376,6 +377,7 @@
query = {
router: row.router,
taskIds: row.taskId,
platform:row.platform,
actiProcInstId: row.actiProcInstId,
id: row.projectLibraryId,
projectLibraryId: row.projectLibraryId,
@@ -20,6 +20,7 @@
:title="$t('basicInformation')"
:projectInformationList="projectInformationList"
:url="url"
:platform="this.queryData.platform"
:projectInformationId="this.queryBy.projectLibraryId"
:queryProject="queryProject"
/>
@@ -294,6 +295,9 @@
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) {
this.queryProject = res.result[0] || {}
if(this.queryData.platform){
this.queryProject.platform = this.queryData.platform
}
// if (this.queryData.TaskKey == 'zrrqr' || this.queryData.TaskKey == 'dezrrqr') {
// this.queryProject.endTime = this.queryData.endTime
// }
@@ -55,6 +55,10 @@
type: String,
default: ''
},
platform: {
type: String,
default: ''
},
queryProject: {
type: Object,
default: {}
@@ -101,17 +105,32 @@
},
RelatedItemsClick(item) {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
id: item.projectLibraryId,
projectName: item.projectName+'-'+item.projectVersion,
projectNameId: item.projectNameId,
targetMarket: item.targetMarket,
studioEngineer: item.studioEngineer
}
})
window.open(newUrl.href, '_blank')
if(this.platform == 'YES'){
let newUrl = this.$router.resolve({
path: '/platformItemLibraryDetails',
query: {
id: item.id,
projectName: item.projectName+'-'+item.projectVersion,
projectNameId: item.projectName,
targetMarket: item.targetMarket,
studioEngineer: item.studioEngineer
}
})
window.open(newUrl.href, '_blank')
}else{
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
id: item.projectLibraryId,
projectName: item.projectName+'-'+item.projectVersion,
projectNameId: item.projectNameId,
targetMarket: item.targetMarket,
studioEngineer: item.studioEngineer
}
})
window.open(newUrl.href, '_blank')
}
},
}
}