refactor:选择作者/出版社/分类时全量刷新三者

This commit is contained in:
ShenQiLun 2026-07-02 15:43:16 +08:00
parent 731c0658b4
commit 7ec1b9a50e

View File

@ -1965,7 +1965,8 @@ export default {
this.noIsbnCategoryIndex = index this.noIsbnCategoryIndex = index
var item = this.noIsbnCategoryList[index] var item = this.noIsbnCategoryList[index]
this.noIsbnSelectedCategoryValue = item ? item.value : '' this.noIsbnSelectedCategoryValue = item ? item.value : ''
// // //()+
this.fetchNoIsbnBookData()
this.debouncedReSearch() this.debouncedReSearch()
}, },
@ -3490,54 +3491,20 @@ export default {
selectNoIsbnAuthor(item) { selectNoIsbnAuthor(item) {
this.noIsbnAuthor = typeof item === 'string' ? item : (item.showName || '') this.noIsbnAuthor = typeof item === 'string' ? item : (item.showName || '')
this.noIsbnAuthorDropdownVisible = false this.noIsbnAuthorDropdownVisible = false
// + // //()+
this.fetchNoIsbnPressesByAuthor(this.noIsbnAuthor) this.fetchNoIsbnBookData()
this.debouncedReSearch() this.debouncedReSearch()
}, },
//
async fetchNoIsbnPressesByAuthor(author) {
var bookName = (this.noIsbnBookName || '').trim()
if (!bookName || !author) return
try {
var pressList = await searchPresses(bookName, {
phpsessid: this.kongfzToken || '',
author: author
})
if (pressList.length > 0) {
this.noIsbnPublisherOptions = pressList.slice(0, 20)
}
} catch (e) {
console.error('按作者获取出版社失败:', e)
}
},
// ISBN - // ISBN -
selectNoIsbnPublisher(item) { selectNoIsbnPublisher(item) {
this.noIsbnPublisher = typeof item === 'string' ? item : (item.showName || '') this.noIsbnPublisher = typeof item === 'string' ? item : (item.showName || '')
this.noIsbnPublisherDropdownVisible = false this.noIsbnPublisherDropdownVisible = false
// + // //()+
this.fetchNoIsbnAuthorsByPublisher(this.noIsbnPublisher) this.fetchNoIsbnBookData()
this.debouncedReSearch() this.debouncedReSearch()
}, },
//
async fetchNoIsbnAuthorsByPublisher(publisher) {
var bookName = (this.noIsbnBookName || '').trim()
if (!bookName || !publisher) return
try {
var authorList = await searchAuthors(bookName, {
phpsessid: this.kongfzToken || '',
publisher: publisher
})
if (authorList.length > 0) {
this.noIsbnAuthorOptions = authorList.map(function(item) { return item.showName }).slice(0, 20)
}
} catch (e) {
console.error('按出版社获取作者失败:', e)
}
},
// ISBN - // ISBN -
selectNoIsbnFormat(item) { selectNoIsbnFormat(item) {
this.noIsbnFormat = item this.noIsbnFormat = item