fix:出版社显示格式改为 showName(showValue)
This commit is contained in:
parent
03102f1739
commit
8de408974a
@ -319,7 +319,7 @@
|
|||||||
<input class="form-input" v-model="noIsbnPublisher" placeholder="出版社" style="flex:1;" />
|
<input class="form-input" v-model="noIsbnPublisher" placeholder="出版社" style="flex:1;" />
|
||||||
<view class="dropdown-btn" @click.stop="noIsbnPublisherDropdownVisible = !noIsbnPublisherDropdownVisible">▼</view>
|
<view class="dropdown-btn" @click.stop="noIsbnPublisherDropdownVisible = !noIsbnPublisherDropdownVisible">▼</view>
|
||||||
<view v-if="noIsbnPublisherDropdownVisible && noIsbnPublisherOptions.length > 0" class="dropdown-list">
|
<view v-if="noIsbnPublisherDropdownVisible && noIsbnPublisherOptions.length > 0" class="dropdown-list">
|
||||||
<view class="dropdown-item" v-for="(item, idx) in noIsbnPublisherOptions" :key="idx" @click="selectNoIsbnPublisher(item)">{{ item }}</view>
|
<view class="dropdown-item" v-for="(item, idx) in noIsbnPublisherOptions" :key="idx" @click="selectNoIsbnPublisher(item)">{{ item.showName || item }}{{ item.showValue ? '(' + item.showValue + ')' : '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1929,7 +1929,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 更新出版社(最多20条)
|
// 更新出版社(最多20条)
|
||||||
if (pressList.length > 0) {
|
if (pressList.length > 0) {
|
||||||
this.noIsbnPublisherOptions = pressList.map(function(item) { return item.showName }).slice(0, 20)
|
this.noIsbnPublisherOptions = pressList.slice(0, 20)
|
||||||
this.noIsbnPublisherDropdownVisible = true
|
this.noIsbnPublisherDropdownVisible = true
|
||||||
} else {
|
} else {
|
||||||
this.noIsbnPublisherOptions = []
|
this.noIsbnPublisherOptions = []
|
||||||
@ -3453,7 +3453,7 @@ export default {
|
|||||||
|
|
||||||
// 无ISBN - 选择出版社
|
// 无ISBN - 选择出版社
|
||||||
selectNoIsbnPublisher(item) {
|
selectNoIsbnPublisher(item) {
|
||||||
this.noIsbnPublisher = item
|
this.noIsbnPublisher = typeof item === 'string' ? item : (item.showName || '')
|
||||||
this.noIsbnPublisherDropdownVisible = false
|
this.noIsbnPublisherDropdownVisible = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -312,7 +312,7 @@ export function searchCategories(keyword, options = {}) {
|
|||||||
* 获取孔网出版社列表(根据书名)
|
* 获取孔网出版社列表(根据书名)
|
||||||
* @param {string} keyword 书名
|
* @param {string} keyword 书名
|
||||||
* @param {object} options { phpsessid, userArea }
|
* @param {object} options { phpsessid, userArea }
|
||||||
* @returns {Promise<Array<{showName:string}>>} 出版社列表
|
* @returns {Promise<Array<{showName:string, showValue:string}>>} 出版社列表
|
||||||
*/
|
*/
|
||||||
export function searchPresses(keyword, options = {}) {
|
export function searchPresses(keyword, options = {}) {
|
||||||
const { phpsessid = '', userArea = '1006000000' } = options
|
const { phpsessid = '', userArea = '1006000000' } = options
|
||||||
@ -350,7 +350,7 @@ export function searchPresses(keyword, options = {}) {
|
|||||||
if (res.statusCode === 200 && res.data && res.data.status === 1 && res.data.data) {
|
if (res.statusCode === 200 && res.data && res.data.status === 1 && res.data.data) {
|
||||||
var labels = res.data.data.labels || []
|
var labels = res.data.data.labels || []
|
||||||
resolve(labels.map(function(item) {
|
resolve(labels.map(function(item) {
|
||||||
return { showName: item.showName }
|
return { showName: item.showName, showValue: item.showValue }
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
resolve([])
|
resolve([])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user