编辑返回的问题

This commit is contained in:
18571350067 2021-12-29 16:18:32 +08:00
parent d41cd2aa99
commit 21fb3385c8
1 changed files with 13 additions and 13 deletions

View File

@ -14,9 +14,9 @@
</div>
</a-descriptions-item>
<a-descriptions-item label="标签">
<a-tag color="blue" v-for="(item,index) in detailData.tags" :key="index ">
{{item}}
</a-tag>
<a-tag color="blue" v-for="(item,index) in detailData.tags" :key="index ">
{{item}}
</a-tag>
</a-descriptions-item>
</a-descriptions>
<div class="buttonGroup">
@ -39,7 +39,7 @@ export default {
},
dictCourseType: [],
dictCourseTag: [],
tags:[] //
tags: [], //
}
},
created: function () {
@ -50,14 +50,14 @@ export default {
})
//
this.dictionaryDropDown()
this.getTagName();
this.getTagName()
},
methods: {
close() {
this.$router.push({ path: '/course/CourseList/'+this.$route.query.type, query: {} })
this.$router.push({ path: '/course/CourseList/' + this.$route.query.type, query: {} })
},
edit(record) {
this.$router.push({ path: '/course/CourseAdd', query: { id: this.queryParam.id } })
this.$router.push({ path: '/course/CourseAdd', query: { id: this.queryParam.id, type: this.$route.query.type } })
},
//
@ -78,18 +78,18 @@ export default {
dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => {
this.dictCourseTag = res.data
console.log(this.dictCourseTag);
console.log(this.dictCourseTag)
let tags = [];
let tags = []
for (let i = 0; i < this.dictCourseTag.length; i++) {
for (let j = 0; j < this.detailData.courseTags.length; j++) {
if(this.dictCourseTag[i].value == this.detailData.courseTags[j].dictValue){
tags.push(this.dictCourseTag[i].name);
if (this.dictCourseTag[i].value == this.detailData.courseTags[j].dictValue) {
tags.push(this.dictCourseTag[i].name)
}
}
}
console.log('tagagagaga',tags);
this.detailData.tags = tags;
console.log('tagagagaga', tags)
this.detailData.tags = tags
})
},
},