diff --git a/src/views/course/CourseDetail.vue b/src/views/course/CourseDetail.vue
index 7eb2954..8992102 100644
--- a/src/views/course/CourseDetail.vue
+++ b/src/views/course/CourseDetail.vue
@@ -14,9 +14,9 @@
-
- {{item}}
-
+
+ {{item}}
+
@@ -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
})
},
},