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 || ''
}
}
}