编辑返回的问题
This commit is contained in:
parent
d41cd2aa99
commit
21fb3385c8
|
@ -14,9 +14,9 @@
|
||||||
</div>
|
</div>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="标签">
|
<a-descriptions-item label="标签">
|
||||||
<a-tag color="blue" v-for="(item,index) in detailData.tags" :key="index ">
|
<a-tag color="blue" v-for="(item,index) in detailData.tags" :key="index ">
|
||||||
{{item}}
|
{{item}}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
<div class="buttonGroup">
|
<div class="buttonGroup">
|
||||||
|
@ -39,7 +39,7 @@ export default {
|
||||||
},
|
},
|
||||||
dictCourseType: [],
|
dictCourseType: [],
|
||||||
dictCourseTag: [],
|
dictCourseTag: [],
|
||||||
tags:[] //用于存放标签
|
tags: [], //用于存放标签
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
|
@ -50,14 +50,14 @@ export default {
|
||||||
})
|
})
|
||||||
//调用词典
|
//调用词典
|
||||||
this.dictionaryDropDown()
|
this.dictionaryDropDown()
|
||||||
this.getTagName();
|
this.getTagName()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
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) {
|
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) => {
|
dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => {
|
||||||
this.dictCourseTag = res.data
|
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 i = 0; i < this.dictCourseTag.length; i++) {
|
||||||
for (let j = 0; j < this.detailData.courseTags.length; j++) {
|
for (let j = 0; j < this.detailData.courseTags.length; j++) {
|
||||||
if(this.dictCourseTag[i].value == this.detailData.courseTags[j].dictValue){
|
if (this.dictCourseTag[i].value == this.detailData.courseTags[j].dictValue) {
|
||||||
tags.push(this.dictCourseTag[i].name);
|
tags.push(this.dictCourseTag[i].name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('tagagagaga',tags);
|
console.log('tagagagaga', tags)
|
||||||
this.detailData.tags = tags;
|
this.detailData.tags = tags
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue