From f747dc9a8b0508cd51e0739799f1716b3e6e4edb Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Mon, 23 May 2022 11:49:05 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BA=93=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B9=B4=E6=AC=BE=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/ProjectDetails.vue | 1 +
.../projectManagement/components/addModel.vue | 46 ++++++++++---------
2 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/jero-web/src/views/projectManagement/components/ProjectDetails.vue b/jero-web/src/views/projectManagement/components/ProjectDetails.vue
index 1bc83ba1f..db3a65e8b 100644
--- a/jero-web/src/views/projectManagement/components/ProjectDetails.vue
+++ b/jero-web/src/views/projectManagement/components/ProjectDetails.vue
@@ -190,6 +190,7 @@
}
},
edit() {
+ console.log(this.queryForm)
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(this.queryForm)))
},
addModelList() {
diff --git a/jero-web/src/views/projectManagement/components/addModel.vue b/jero-web/src/views/projectManagement/components/addModel.vue
index 639382049..97f81a569 100644
--- a/jero-web/src/views/projectManagement/components/addModel.vue
+++ b/jero-web/src/views/projectManagement/components/addModel.vue
@@ -38,14 +38,14 @@
*
{{$t('modelYear')}}
-
+
-
+
-
- {{ item.projectName}}
+
+ {{ item.yearName}}
@@ -218,6 +218,7 @@
formInline: {},
confirmLoading: false,
visible: false,
+ yearNameDataList: [],
rules: {
ipdInfo: [
{
@@ -252,14 +253,14 @@
trigger: 'blur'
}
],
- vehiclePlatform:[
+ vehiclePlatform: [
{
max: 100,
message: this.$t('ModelPlatform') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
- digitalPlatform:[
+ digitalPlatform: [
{
max: 100,
message: this.$t('DigitalPlatform') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
@@ -273,7 +274,7 @@
trigger: 'change'
}
],
- yearName: [
+ yearNameId: [
{
required: true,
message: this.$t('modelYear') + this.$t('cannotEmpty'),
@@ -309,23 +310,20 @@
},
mounted() {
this.getNameList()
- this.getSpaceInfo()
},
methods: {
...mapGetters(['userInfo']),
- getNameList() {
+ getNameList(value) {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
- } else {
- this.projectNameList = []
- }
- })
- },
- getSpaceInfo() {
- postAction('/project/projectNameInfoEO/getSpaceInfo', {}).then((res) => {
- if (res.success) {
- // this.projectNameList = res.result || []
+ if (this.title == this.$t('edit')) {
+ let content = this.projectNameList.filter(res => {
+ return res.id == value.projectNameId
+ })
+ this.yearNameDataList = content[0].yearNameDataList || []
+ this.formInline = value
+ }
} else {
this.projectNameList = []
}
@@ -336,7 +334,6 @@
this.title = this.$t('add')
this.formInline = {}
this.getNameList()
- this.getSpaceInfo()
this.formInline.studioEngineerName = this.userInfo().username
this.formInline.studioEngineer = this.userInfo().id
this.$nextTick(() => {
@@ -346,8 +343,8 @@
editModel(value) {
this.visible = true
this.title = this.$t('edit')
+ this.getNameList(value)
this.$nextTick(() => {
- this.formInline = value
this.$refs.ruleForm.clearValidate()
})
},
@@ -398,7 +395,12 @@
this.formInline = { ...this.formInline }
},
projectNameChange(value) {
- console.log(value)
+ let content = this.projectNameList.filter(res => {
+ return res.id == value
+ })
+ this.formInline.vehiclePlatform = content[0].vehiclePlatform || ''
+ this.yearNameDataList = content[0].yearNameDataList || []
+ this.formInline.digitalPlatform = content[0].digitalPlatform || ''
}
}
}