mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
Merge branch 'master-20251023-tag' into test1024
This commit is contained in:
@@ -1212,7 +1212,7 @@ export default {
|
|||||||
console.log("courseForm 保存课程信息 this.showTags = " + this.showTags);
|
console.log("courseForm 保存课程信息 this.showTags = " + this.showTags);
|
||||||
console.log("courseForm 保存课程信息 this.courseInfo.tags = " + this.courseInfo.tags);
|
console.log("courseForm 保存课程信息 this.courseInfo.tags = " + this.courseInfo.tags);
|
||||||
if (this.showTags.length > 0) {
|
if (this.showTags.length > 0) {
|
||||||
this.courseInfo.tags = this.showTags.join();
|
this.courseInfo.tags = this.courseInfo.tags.join();
|
||||||
}
|
}
|
||||||
console.log("courseForm 保存课程信息 this.courseInfo.tags = " + this.courseInfo.tags);
|
console.log("courseForm 保存课程信息 this.courseInfo.tags = " + this.courseInfo.tags);
|
||||||
this.courseInfo.keywords = this.tips.join(',') || ''
|
this.courseInfo.keywords = this.tips.join(',') || ''
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
handleEnterKey(event) {
|
handleEnterKey(event) {
|
||||||
const inputVal = event.target.value?.trim()
|
const inputVal = event.target.value?.trim()
|
||||||
if (!this.searchResults.length && inputVal && this.selectedTags.length < this.maxTags) {
|
if (!this.searchResults.length && inputVal && this.selectedTags.length < this.maxTags) {
|
||||||
this.createNewTag(event.target.value.trim())
|
// this.createNewTag(event.target.value.trim())
|
||||||
event.target.value = ''
|
event.target.value = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -198,7 +198,13 @@ export default {
|
|||||||
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
const {result:tags} = await apiCourseTag.searchTags({tagName:query})
|
try {
|
||||||
|
// 获取 typeId:取 sysTypeList 最后一个有效的值
|
||||||
|
const typeId = this.sysTypeList.length > 2 ? this.sysTypeList[2] :
|
||||||
|
this.sysTypeList.length > 1 ? this.sysTypeList[1] :
|
||||||
|
this.sysTypeList.length > 0 ? this.sysTypeList[0] : null;
|
||||||
|
|
||||||
|
const {result:tags} = await apiCourseTag.searchTags({tagName:query,typeId:typeId})
|
||||||
tags.forEach(item => {
|
tags.forEach(item => {
|
||||||
this.tagMap.set(item.id, item)
|
this.tagMap.set(item.id, item)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user