diff --git a/src/views/sunVillage_info/list_finance_detail.vue b/src/views/sunVillage_info/list_finance_detail.vue index aef70bcb..4e89151f 100644 --- a/src/views/sunVillage_info/list_finance_detail.vue +++ b/src/views/sunVillage_info/list_finance_detail.vue @@ -113,27 +113,25 @@ methods: { getDetail(id){ financePublicDetail(this.queryParams).then((res) => { - res.data.openFile = res.data.openFile.split(',') - res.data.openFile.map(rr=>{ - let name = rr.substr(27,rr.length); - let type = ''; - if (name.indexOf('.doc') > -1){ - type = 'word'; - }else if(name.indexOf('.xls') > -1){ - type = 'excel'; - } - this.openFileList.push({name:name,type:type}) - }) - if (res.data.openPic!=''){ - this.openPic = res.data.openPic.split(',') - this.openPic2 = res.data.openPic.split(',') - this.openPic.map((rrr,i)=>{ - this.openPic[i] = {url:'/api'+rrr} + if (res.data.openFile !='' && res.data.openFile != null && res.data.openFile != undefined){ + res.data.openFile = res.data.openFile.split(',') + res.data.openFile.map(rr=>{ + let name = rr.substr(27,rr.length); + let type = ''; + if (name.indexOf('.doc') > -1){ + type = 'word'; + }else if(name.indexOf('.xls') > -1){ + type = 'excel'; + } + this.openFileList.push({name:name,type:type}) + }) + } + if (res.data.openPic !='' && res.data.openPic != null && res.data.openPic != undefined){ + res.data.openPic = res.data.openPic.split(',') + res.data.openPic.map((rrr,i)=>{ + this.openPic.push({url:'/api'+rrr}) }) } - // res.data.openPic.map((rrr,i)=>{ - // this.openPic.push({url:this.$store.getters.baseRoutingUrl+rrr}) - // }) this.form = res.data; }) diff --git a/src/views/sunVillage_info/list_finance_edit.vue b/src/views/sunVillage_info/list_finance_edit.vue index c0df8ebe..9afc831b 100644 --- a/src/views/sunVillage_info/list_finance_edit.vue +++ b/src/views/sunVillage_info/list_finance_edit.vue @@ -139,7 +139,7 @@ getDetail(id){ financePublicDetail(this.queryParams).then((res) => { var that = this ; - if (res.data.openFile!=''){ + if (res.data.openFile!='' && res.data.openFile != null && res.data.openFile != undefined){ this.openFile = res.data.openFile.split(',') this.openFile2 = res.data.openFile.split(',') this.openFile.map((rr,i)=>{ @@ -153,7 +153,7 @@ this.openFile[i] = {name:name,type:type} }) } - if (res.data.openPic!=''){ + if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ this.openPic = res.data.openPic.split(',') this.openPic2 = res.data.openPic.split(',') this.openPic.map((rrr,i)=>{ diff --git a/src/views/sunVillage_info/list_issues_detail.vue b/src/views/sunVillage_info/list_issues_detail.vue index 374585a1..4bb19d49 100644 --- a/src/views/sunVillage_info/list_issues_detail.vue +++ b/src/views/sunVillage_info/list_issues_detail.vue @@ -30,7 +30,7 @@ - + - +