Merge remote-tracking branch 'origin/fix_20230911_UAT' into fix_20230911_UAT

This commit is contained in:
gaosong
2023-10-25 09:49:31 +08:00
16 changed files with 865 additions and 535 deletions
@@ -1338,7 +1338,9 @@ ADD PRIMARY KEY (`vdr_id`);
ALTER TABLE `params_report`
ADD COLUMN `project_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关项目版本' AFTER `target_market`;
-- 问题管理添加相关项目类型字段 2023-10-24
ALTER TABLE `problem_management`
ADD COLUMN `project_type` varchar(255) NULL COMMENT '相关项目类型' AFTER `problem_priority`;
@@ -25,11 +25,23 @@ import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum;
import com.jero.modules.cert.collect.enums.ExportStateEnum;
import com.jero.modules.cert.collect.service.IParamsCollectExportService;
import com.jero.modules.cert.collect.vo.ParamsConfigDataVO;
import com.jero.modules.cert.report.entity.*;
import com.jero.modules.cert.report.entity.ParamsExportTemplateEO;
import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO;
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
import com.jero.modules.cert.report.entity.ParamsReportDetailEO;
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
import com.jero.modules.cert.report.entity.ParamsReportExportHistoryEO;
import com.jero.modules.cert.report.entity.ReportCertCategoryParamsInfoEO;
import com.jero.modules.cert.report.enums.ExportTemplateStateEnum;
import com.jero.modules.cert.report.enums.ExportTypeEnum;
import com.jero.modules.cert.report.mapper.ParamsReportDetailEOMapper;
import com.jero.modules.cert.report.service.*;
import com.jero.modules.cert.report.service.IParamsExportTemplateEOService;
import com.jero.modules.cert.report.service.IParamsReportConfigDataEOService;
import com.jero.modules.cert.report.service.IParamsReportConfigEOService;
import com.jero.modules.cert.report.service.IParamsReportDetailEOService;
import com.jero.modules.cert.report.service.IParamsReportDetailLogEOService;
import com.jero.modules.cert.report.service.IParamsReportExportHistoryEOService;
import com.jero.modules.cert.report.service.IReportCertCategoryParamsInfoEOService;
import com.jero.modules.cert.report.vo.ParamsReportDetailVO;
import com.jero.modules.cert.template.enums.ControlTypeEnum;
import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
@@ -50,7 +62,13 @@ import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFFont;
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.docx4j.Docx4J;
@@ -68,14 +86,32 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.UUID;
import java.util.stream.Collectors;
/**
@@ -1824,6 +1860,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = paramsReportConfigDataEOService.queryListByConfigIdList(paramsReportConfigIdList); // 查询所有配置数据
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// List<String> idList = configDataList.stream().map(e -> e.get("id").toString()).collect(Collectors.toList());
// List<ParamsReportDetailEO> paramsReportDetailEOS = this.listByIds(idList);
// 处理数据
for (Map<String, Object> map : configDataList) {
@@ -2041,10 +2079,28 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
this.paramsReportConfigDataEOService.remove(removeConfigDataWrap);
}
ParamsReportDetailLogEO insertLogEO = new ParamsReportDetailLogEO();
String ramarks = "";
if(map.get("remarks") != null){
ramarks = map.get("remarks").toString();
}
boolean remarkFlag = false;
// List<ParamsReportDetailEO> collect = paramsReportDetailEOS.stream().filter(e -> paramsCollectManifestId.equals(e.getId())).collect(Collectors.toList());
// if(ObjectUtils.isNotEmpty(collect)){
// String remark = collect.get(0).getRemarks();
// if(StringUtils.isNotBlank(remark)
// && StringUtils.isNotBlank(ramarks)
// && !ramarks.equals(remark)){
// remarkFlag = true;
// }
// if(StringUtils.isBlank(remark) && StringUtils.isNotBlank(ramarks)){
// remarkFlag = true;
// }
// if(StringUtils.isNotBlank(remark) && StringUtils.isBlank(ramarks)){
// remarkFlag = true;
// }
// }
if(!loginUser.getUsername().equals(logCnContent.toString()) && !loginUser.getUsername().equals(logEnContent.toString())){
insertLogEO.setLogCnContent(logCnContent.toString().substring(0, logCnContent.length()-1));
insertLogEO.setLogEnContent(logEnContent.toString().substring(0, logCnContent.length()-1));
@@ -354,4 +354,10 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
public Result<?> overallReplacementUser(@RequestBody JSONObject json){
return this.projectLibraryBaseService.overallReplacementUser(json);
}
@AutoLog(value = "查询数字平台或车型平台")
@ApiOperation(value="查询数字平台或车型平台", notes="查询数字平台或车型平台")
@GetMapping(value = "/getPlatform")
public List<String> getPlatform(String platform){
return projectLibraryBaseService.getPlatform(platform);
}
}
@@ -175,4 +175,9 @@ public class ProblemManagementEO implements Serializable {
@ApiModelProperty(value = "旧数据->old,新数据->new")
private String flag;
@ApiModelProperty(value = "相关项目类型")
private String projectType;
}
@@ -0,0 +1,45 @@
package com.jero.modules.project.enums;
/**
* 任务状态枚举类
*/
public enum PlatformEnum {
NUMBER_PLATFORM("数字平台","numberPlatform"),
CAR_PLATFORM("车型平台","carPlatform"),
;
String name;
String value;
private PlatformEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static String getTextByValue(String value) {
PlatformEnum[] values = values();
for (PlatformEnum taskStatusEnum : values) {
if (taskStatusEnum.value.equals(value)) {
return taskStatusEnum.name;
}
}
return null;
}
}
@@ -204,4 +204,6 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
List<ProjectLibraryBase> queryList(List<String> projectIdList);
List<ProjectLibraryBase> getListByIds(List<String> projectIdList);
List<String> getPlatform(String platform);
}
@@ -116,20 +116,6 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
public List<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
ncrTrackVO.setUserId(loginUser.getId());
// if(StringUtils.isNotBlank(ncrTrackVO.getSerialNumber())){
// if(ncrTrackVO.getSerialNumber().contains("%")){
// ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replaceAll("%", "/%"));
// }
// ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replace("*",""));
// }
// if(StringUtils.isNotBlank(ncrTrackVO.getTitle())){
// if(ncrTrackVO.getTitle().contains("%")){
// ncrTrackVO.setTitle(ncrTrackVO.getTitle().replace("%","/%"));
// }
// ncrTrackVO.setTitle(ncrTrackVO.getTitle().replace("*",""));
// }
// List<SysUser> sysUserList = sysUserService.list();
ncrTrackVO.setInconformity(ReviewResultEnum.INCONFORMITY.getValue());
ncrTrackVO.setTrack(ReviewResultEnum.TO_TRACK.getValue());
@@ -10979,9 +10979,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@NotNull
private List<Map<String, Object>> getNewData(Map<String, Object> params, String cut,boolean administrator) {
// params.put("numberPlatform","NT2");
// params.put("carPlatform","NT2");
//新数据
LambdaQueryWrapper<ProblemManagementEO> wrapper = new LambdaQueryWrapper<>();
wrapper.like(ProblemManagementEO::getProjectId,params.get("projectLibraryId"));
wrapper.or().eq(ProblemManagementEO::getProjectId,params.get("numberPlatform"));
wrapper.or().eq(ProblemManagementEO::getProjectId, params.get("carPlatform"));
List<ProblemManagementEO> managementEOList = problemManagementEOService.list(wrapper);
//法规
List<String> lawsIdList = managementEOList.stream()
@@ -11051,6 +11056,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
map.put("id",problemManagementEO.getId());
map.put("flag",DataEnum.NEW.getValue());
map.put("administrator",administrator ? "true" : "false");
map.put("projectType",problemManagementEO.getProjectType());
List<DictModel> dictModelList = problemTypeList.stream().filter(e -> e.getValue().equals(problemManagementEO.getProblemType())).collect(Collectors.toList());
@@ -11078,6 +11084,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
List<ProjectLibraryBase> projectLibraryBaseListTemp = projectLibraryBaseList.stream()
.filter(e->StringUtils.isNotBlank(problemManagementEO.getProjectId())
&& problemManagementEO.getProjectId().contains(e.getId())).collect(Collectors.toList());
if(ObjectUtils.isEmpty(projectLibraryBaseListTemp)){
map.put("projectName",problemManagementEO.getProjectId());
map.put("projectId",problemManagementEO.getProjectId());
}
//目标市场数据字典
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
List<String> projectNameList = new ArrayList<>();
@@ -42,6 +42,7 @@ import com.jero.modules.project.enums.FlowStateEnum;
import com.jero.modules.project.enums.HSStatisticalNodesEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.PermissionDescriptionEnum;
import com.jero.modules.project.enums.PlatformEnum;
import com.jero.modules.project.enums.ProjectRoleEnum;
import com.jero.modules.project.enums.ProjectTaskPlanningNameEnum;
import com.jero.modules.project.enums.ProjectUserLocationEnum;
@@ -4219,6 +4220,23 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
}
return res;
}
@Override
public List<String> getPlatform(String platform) {
List<ProjectLibraryBase> projectLibraryBaseList = this.list();
List<String> platformList = new ArrayList<>();
if(PlatformEnum.NUMBER_PLATFORM.getValue().equals(platform)){
platformList = projectLibraryBaseList.stream()
.filter(e -> StringUtils.isNotBlank(e.getDigitalPlatform()))
.map(ProjectLibraryBase::getDigitalPlatform).distinct().collect(Collectors.toList());
}
if(PlatformEnum.CAR_PLATFORM.getValue().equals(platform)){
platformList = projectLibraryBaseList.stream()
.filter(e -> StringUtils.isNotBlank(e.getVehiclePlatform()))
.map(ProjectLibraryBase::getVehiclePlatform).distinct().collect(Collectors.toList());
}
return platformList;
}
}
@@ -258,6 +258,9 @@ public class NcrTrackVO implements Serializable {
private String platform;
//相关项目类型
private String projectType;
@@ -698,10 +698,11 @@
this.deleteIds.push(item.id)
}
for(let i=index;i<this.contentList.length-1;i++){
this.contentList[index]=this.contentList[index+1]
}
this.contentList.pop()
// for(let i=index;i<this.contentList.length-1;i++){
// this.contentList[index]=this.contentList[index+1]
// }
this.contentList.splice(index,1)
// this.contentList.pop()
// console.log('this.content',this.contentList)
},
//保存
@@ -167,6 +167,7 @@
</div>
</div>
<projectStatus ref="projectStatusRef"
:queryForm="queryForm"
@currentStatus="currentStatus"
@projectStatusForm="projectStatusForm"/>
<versionStatistics ref="versionStatisticsRef" @versionStatisticsForm="versionStatisticsForm"/>
@@ -239,6 +240,9 @@
if (res.success) {
this.cut = res.cut
this.queryForm = res.result[0] || {}
if (this.$refs.projectStatusRef){
this.$refs.projectStatusRef.getData(this.queryForm)
}
if (this.cut == 'en') {
this.queryForm.brandText = this.queryForm.brandTextEn
} else {
File diff suppressed because it is too large Load Diff
@@ -29,7 +29,8 @@
<otastatus @currentStatus="currentStatus" :idList="idList" v-if="activeKey == $t('otastatus')"/>
</a-tab-pane>
<a-tab-pane :key="$t('Problemanagement')" :tab="$t('Problemanagement')">
<nonConformance @currentStatus="currentStatus" v-if="activeKey == $t('Problemanagement')"/>
<nonConformance ref="nonConformanceRef" @currentStatus="currentStatus"
v-if="activeKey == $t('Problemanagement')"/>
</a-tab-pane>
</a-tabs>
</a-card>
@@ -56,12 +57,25 @@
return {
activeKey: this.$t('regulatoryComplianceManagement'),
selectedRowKeys: [],
idList: []
idList: [],
queryForm: {}
}
},
methods: {
getData(data) {
this.queryForm = data
this.queryForm = { ...this.queryForm }
if (this.$refs.nonConformanceRef) {
this.$refs.nonConformanceRef.getData(this.queryForm)
}
},
activeKeyChange() {
this.$emit('projectStatusForm', this.activeKey)
if (this.activeKey == this.$t('Problemanagement')) {
this.$nextTick(() => {
this.$refs.nonConformanceRef.getData(this.queryForm)
})
}
},
currentStatus(item) {
this.$emit('currentStatus', item)
@@ -89,10 +89,50 @@
</div>
<a-form-model-item class="itemModel" prop="contentTemplate">
<a-select allowClear
class="box-input"
v-model="formInline.projectType"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
@change="platformChange"
:style="formInline.projectType == 'none' ? 'width:100%' : 'width:50%'"
optionFilterProp="label"
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('type')">
<a-select-option v-for="(item, key) in platformList"
:key="key"
:label="item.name"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
<a-select allowClear
v-if="formInline.projectType == 'numberPlatform' || formInline.projectType == 'carPlatform'"
class="box-input"
v-model="formInline.projectId"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
style="width: 50%;float: right"
optionFilterProp="label"
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option v-for="(item, key) in relatedItemsList"
:key="key"
:label="item"
:value="item">
<span style="display: inline-block;width: 100%" :title="item ">
{{item}}
</span>
</a-select-option>
</a-select>
<a-select allowClear
class="box-input"
v-else-if="formInline.projectType == 'model'"
v-model="formInline.projectId"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
style="width: 50%;float: right"
mode="multiple"
optionFilterProp="label"
:autoClearSearchValue="false"
@@ -271,17 +311,17 @@
v-for="(item,index) in formInline.progressTrackingList" :key="index">
<!-- <span>{{item}}</span>-->
<div style="width: calc(100% - 116px);display: inline-block">
<!-- <quill-editor-->
<!-- class="text-editor trackingClass"-->
<!-- ref="myQuillEditorRef"-->
<!-- :disabled="true"-->
<!-- v-if="!item.isDescription"-->
<!-- v-model="item.progressTracking"-->
<!-- :content="item.progressTracking"-->
<!-- style="width: 100%;height: 200px;display: inline-block"-->
<!-- :options="editorOption"-->
<!-- />-->
<div class="text-box" v-if="!item.isDescription" v-html="item.progressTracking"></div>
<!-- <quill-editor-->
<!-- class="text-editor trackingClass"-->
<!-- ref="myQuillEditorRef"-->
<!-- :disabled="true"-->
<!-- v-if="!item.isDescription"-->
<!-- v-model="item.progressTracking"-->
<!-- :content="item.progressTracking"-->
<!-- style="width: 100%;height: 200px;display: inline-block"-->
<!-- :options="editorOption"-->
<!-- />-->
<div class="text-box" v-if="!item.isDescription" v-html="item.progressTracking"></div>
<a-input class="box-input"
v-if="item.isDescription"
v-model='item.progressTracking'
@@ -479,6 +519,24 @@
},
data() {
return {
platformList: [
{
name: this.$t('DigitalPlatform'),
value: 'numberPlatform'
},
{
name: this.$t('ModelPlatform'),
value: 'carPlatform'
},
{
name: this.$t('Model'),
value: 'model'
},
{
name: this.$t('nothing'),
value: 'none'
}
],
editorOption: { // 富文本框配置
placeholder: '',
theme: 'snow', // or 'bubble'
@@ -545,7 +603,7 @@
formInline: {
fileLinkList: [{}],
progressTrackingList: [{
isDescription:true,
isDescription: true
}],
approvalEvidenceLinkList: [{}],
dutyTerritory: undefined,
@@ -561,6 +619,7 @@
chapterContentsList: [],
firstLevelDutyTerritoryList: [],
projectNameList: [],
relatedItemsList: [],
ProblemstateList: [this.$t('red'), this.$t('yellow'), this.$t('green')],
templateDisabled: false,
contentTemplateList: [
@@ -641,7 +700,7 @@
this.problemState = this.$t('emptyc')
}
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let text = '<p class="text-class">'+this.userInfo().username + ' ' + time+'</p>' + ' ' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\''
let text = '<p class="text-class">' + this.userInfo().username + ' ' + time + '</p>' + ' ' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\''
if (JSON.stringify(this.formInline.progressTrackingList[0]) == '{}' || this.formInline.progressTrackingList[0].progressTracking == '') {
this.formInline.progressTrackingList.forEach((item, index) => {
item.progressTracking = text
@@ -681,7 +740,7 @@
...mapGetters(['userInfo']),
add() {
this.templateDisabled = false
this.getNameList()
// this.getNameList()
this.getFirstLevelDutyTerritory()
this.title = this.$t('newlyAdded')
this.visible = true
@@ -699,8 +758,17 @@
})
},
edit(row) {
console.log(row)
this.getNameList()
this.projectNameList = []
if (row.projectType == 'model') {
this.getNameList()
if (this.formInline.projectId != null) {
this.formInline.projectId = this.formInline.projectId.split(',')
} else {
this.formInline.projectId = undefined
}
} else if (row.projectType == 'numberPlatform' || row.projectType == 'carPlatform') {
this.getPlatform(row.projectType)
}
this.getFirstLevelDutyTerritory()
this.title = this.$t('edit')
this.problemState = row.problemState
@@ -722,11 +790,6 @@
if (this.formInline.fileLinkList == null) {
this.formInline.fileLinkList = [{}]
}
if (this.formInline.projectId != null) {
this.formInline.projectId = this.formInline.projectId.split(',')
} else {
this.formInline.projectId = undefined
}
this.visible = true
this.disabled = false
this.templateDisabled = true
@@ -753,7 +816,7 @@
TrackingModelForm(row) {
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
console.log(row)
let text = '<p class="text-class">'+this.userInfo().username + ' ' + time +'</p>' + row
let text = '<p class="text-class">' + this.userInfo().username + ' ' + time + '</p>' + row
console.log(text)
this.formInline.progressTrackingList.forEach((item, index) => {
if (!item.progressTracking) {
@@ -807,7 +870,6 @@
})
},
handleSubmit() {
console.log(this.formInline)
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
@@ -970,10 +1032,29 @@
putAwayClick() {
this.isDescription = !this.isDescription
},
openClick(item){
openClick(item) {
item.isDescription = !item.isDescription
this.formInline = {...this.formInline}
this.formInline = { ...this.formInline }
},
platformChange(value) {
this.projectNameList = []
this.relatedItemsList = []
if (value == 'model') {
this.formInline.projectId = []
this.getNameList()
} else if (value == 'numberPlatform' || value == 'carPlatform') {
this.formInline.projectId = undefined
this.getPlatform(value)
}else{
this.formInline.projectId = undefined
}
this.formInline = { ...this.formInline }
},
getPlatform(platform) {
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
this.relatedItemsList = res || []
})
}
}
}
</script>
@@ -985,11 +1066,13 @@
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
.text-class{
.text-class {
color: rgba(0, 0, 0, 0.65);
font-weight: bold;
}
p{
p {
margin: 0;
padding: 0;
}
@@ -1117,7 +1200,8 @@
::v-deep .itemModel-explain .ql-container {
height: calc(100% - 100px);
}
.text-box{
.text-box {
width: 100%;
height: 200px;
display: inline-block;
@@ -82,14 +82,56 @@
</div>
<a-form-model-item class="itemModel" prop="contentTemplate">
<a-select allowClear
class="box-input"
v-model="formInline.projectType"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
:disabled="true"
:style="formInline.projectType == 'none' ? 'width:100%' : 'width:50%'"
optionFilterProp="label"
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('type')">
<a-select-option v-for="(item, key) in platformList"
:key="key"
:label="item.name"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
<a-select allowClear
v-if="formInline.projectType == 'numberPlatform' || formInline.projectType == 'carPlatform'"
class="box-input"
v-model="formInline.projectId"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
mode="multiple"
:disabled="disabled"
:disabled="true"
style="width: 50%;float: right"
optionFilterProp="label"
:autoClearSearchValue="false">
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option v-for="(item, key) in relatedItemsList"
:key="key"
:label="item"
:value="item">
<span style="display: inline-block;width: 100%" :title="item ">
{{item}}
</span>
</a-select-option>
</a-select>
<a-select allowClear
class="box-input"
v-else-if="formInline.projectType == 'model'"
v-model="formInline.projectId"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
:disabled="true"
style="width: 50%;float: right"
mode="multiple"
optionFilterProp="label"
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option v-for="(item, key) in projectNameList"
:key="key"
:label="item.projectName"
@@ -302,6 +344,25 @@
}
]
},
relatedItemsList:[],
platformList: [
{
name: this.$t('DigitalPlatform'),
value: 'numberPlatform'
},
{
name: this.$t('ModelPlatform'),
value: 'carPlatform'
},
{
name: this.$t('Model'),
value: 'model'
},
{
name: this.$t('nothing'),
value: 'none'
}
],
visible: false,
visibletrack: false,
rulestracking: {
@@ -381,7 +442,18 @@
},
...mapGetters(['userInfo']),
edit(row) {
this.getNameList()
this.projectNameList = []
if (row.projectType == 'model') {
this.getNameList()
if (this.formInline.projectId != null) {
this.formInline.projectId = this.formInline.projectId.split(',')
} else {
this.formInline.projectId = undefined
}
} else if (row.projectType == 'numberPlatform' || row.projectType == 'carPlatform') {
this.getPlatform(row.projectType)
}
// this.getNameList()
this.getFirstLevelDutyTerritory()
this.title = this.$t('view')
this.formInline = row
@@ -420,6 +492,11 @@
},
handleCancel() {
this.visible = false
},
getPlatform(platform) {
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
this.relatedItemsList = res || []
})
}
}
}