编辑返回的问题
This commit is contained in:
parent
d41cd2aa99
commit
21fb3385c8
|
@ -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
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue