分类被删除,找不到分类名称

dev
truthhun 1 year ago
parent fb703b5aab
commit 774adc191b

@ -177,12 +177,13 @@ export default {
search.category_id = search.category_id[search.category_id.length - 1]
}
const res = await listRecycleDocument(search)
this.loading = false
if (res.status === 200) {
const documents = res.data.document || []
documents.forEach((item) => {
;(item.category_id || (item.category_id = [])).forEach((id) => {
;(item.category_name || (item.category_name = [])).push(
this.categoryMap[id].title
this.categoryMap[id].title || '-' //
)
})
})
@ -192,7 +193,6 @@ export default {
} else {
this.$message.error(res.data.message)
}
this.loading = false
},
handleSizeChange(val) {
this.search.size = val

Loading…
Cancel
Save