平台件项目库 项目详情编辑回显

This commit is contained in:
zyx.net
2023-09-14 14:37:35 +08:00
parent 12fc004e45
commit 14d5ffb537
3 changed files with 44 additions and 52 deletions
@@ -26,7 +26,9 @@
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
<span class="text-field-right" :title="queryForm.ipdInfo"
<span class="text-field-right text-field-right-color"
:title="queryForm.ipdInfo"
@click="urlClick(queryForm.ipdInfo)"
>{{queryForm.ipdInfo}}</span>
</div>
</div>
@@ -18,7 +18,7 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="entryName">
<a-form-model-item class="itemModel" prop="projectNameId">
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="formInline.projectNameId"></a-input>
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('modelName')"-->
@@ -54,10 +54,10 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="configurationItem">
<a-form-model-item class="itemModel-multi" prop="ipdInfo">
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('configurationItem')"
v-model="formInline.ipdInfo"></a-input>
</a-form-model-item>
@@ -71,7 +71,36 @@
<a-form-model-item class="itemModel" prop="explanation">
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explanation"
:rows="4"/>
:rows="2"/>
</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"
v-model="formInline.vehicleDevelopmentPlan"
:placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>
</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>
</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>
@@ -170,37 +199,6 @@
<!-- </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('softwareVersion')">{{$t('softwareVersion')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'softwareVersion'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.softwareVersion"-->
<!-- :placeholder="$t('PleaseEnter')+$t('softwareVersion')"/>-->
<!-- </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('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.vehicleDevelopmentPlan"-->
<!-- :placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
@@ -321,10 +319,10 @@
trigger: 'blur'
}
],
projectVersion:[
projectNameId:[
{
required: true,
message: this.$t('projectVersion') + this.$t('cannotEmpty'),
message: this.$t('entryName') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
@@ -342,13 +340,6 @@
trigger: 'blur'
}
],
projectNameId: [
{
required: true,
message: this.$t('entryName') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
yearNameId: [
{
required: true,
@@ -356,10 +347,10 @@
trigger: 'change'
}
],
targetMarket: [
brand: [
{
required: true,
message: this.$t('targetMarket') + this.$t('cannotEmpty'),
message: this.$t('brand') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
@@ -408,8 +399,8 @@
let content = this.projectNameList.filter(res => {
return res.id == value.projectNameId
})
this.yearNameDataList = content[0].yearNameDataList || []
this.formInline = value
console.log(this.formInline)
this.formInline = { ...this.formInline }
}
} else {
@@ -504,7 +495,6 @@
return res.id == value
})
this.formInline.vehiclePlatform = content[0].vehiclePlatform || ''
this.yearNameDataList = content[0].yearNameDataList || []
this.formInline.digitalPlatform = content[0].digitalPlatform || ''
this.formInline = { ...this.formInline }
}
@@ -104,8 +104,8 @@
getAction(this.url.settingQueryForm, { projectId: this.$route.query.id }).then((res) => {
if (res.success) {
this.$nextTick(() => {
this.formInline=res.result? {list:[{}]} :res.result
if(!res.result.list || res.result.list.length==0){
this.formInline.list = res.result? res.result : [{}]
if(!res.result || res.result.length==0){
this.formInline.list=[{}]
}
@@ -154,7 +154,7 @@
this.visible = false
},
dateChange(item,index) {
this.formInline.list[index].date = this.formInline.list[index].date ? moment(this.formInline.list[index].date).format('YYYY-MM-DD') : ''
this.formInline.list[index].danodeTimete = this.formInline.list[index].nodeTime ? moment(this.formInline.list[index].nodeTime).format('YYYY-MM-DD') : ''
}
}
}