|
@@ -225,18 +225,14 @@ export default {
|
|
|
loadData(id = '') {
|
|
loadData(id = '') {
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
queryPageList(this.getFormatParams(id)).then(response => {
|
|
queryPageList(this.getFormatParams(id)).then(response => {
|
|
|
- response.data.dataResult.forEach((item)=>{
|
|
|
|
|
- if(item.typeId && this.typeFiler.length>0){
|
|
|
|
|
- this.typeFiler.forEach((val)=>{
|
|
|
|
|
- if(item.typeId == val.id){
|
|
|
|
|
- item.typeId = val.name
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }else{
|
|
|
|
|
- item.typeId = item.typeId ? '已分类': '未分类'
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ response.data.dataResult.forEach((item)=>{
|
|
|
|
|
+ if(item.typeId && this.typeFiler.length){
|
|
|
|
|
+ let temp = this.typeFiler.find(i => i.id === item.typeId)
|
|
|
|
|
+ item.typeId = temp ? temp.name : '未分类'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ item.typeId = item.typeId ? '分类被删除': '未分类'
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
ActionUtils.handleListData(this, response.data)
|
|
ActionUtils.handleListData(this, response.data)
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|