|
@@ -236,38 +236,37 @@ export default {
|
|
|
this.fundList[7].budget=data.Transaction
|
|
|
// console.log(this.fundList);
|
|
|
// return
|
|
|
- this.tit=res.data[1][0].intro
|
|
|
- // this.ty=res.data[0][0].type
|
|
|
-
|
|
|
-
|
|
|
this.fundList.forEach(e=>{
|
|
|
e.havePaid=0
|
|
|
})
|
|
|
+ // console.log(res.data[1][0]);
|
|
|
+ console.log(res.data[1])
|
|
|
|
|
|
-
|
|
|
- res['data'][1].filter(e=>{
|
|
|
- if (e.actualuse==null) {
|
|
|
- e.actualuse=e.applyfund
|
|
|
- }
|
|
|
- })
|
|
|
- // // console.log(arr);
|
|
|
-
|
|
|
- let arr= res['data'][1].filter(e=>{
|
|
|
- return e.actualuse!=null
|
|
|
- })
|
|
|
- if (arr) {
|
|
|
- arr.forEach(item=>{
|
|
|
- let JP = JSON.parse(item['actualuse']);
|
|
|
- this.fundList[0]['havePaid']+=Number(JP['device']);
|
|
|
- this.fundList[1]['havePaid']+=Number(JP['Material']);
|
|
|
- this.fundList[2]['havePaid']+=Number(JP['processing']);
|
|
|
- this.fundList[3]['havePaid']+=Number(JP['Collaboration']);
|
|
|
- this.fundList[4]['havePaid']+=Number(JP['APPRAISAL']);
|
|
|
- this.fundList[5]['havePaid']+=Number(JP['entery']);
|
|
|
- this.fundList[6]['havePaid']+=Number(JP['activities']);
|
|
|
- this.fundList[7]['havePaid']+=Number(JP['Transaction']);
|
|
|
+ if (!res.data[1]) {
|
|
|
+ this.tit=res.data[1][0].intro
|
|
|
+ res['data'][1].filter(e=>{
|
|
|
+ if (e.actualuse==null) {
|
|
|
+ e.actualuse=e.applyfund
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let arr= res['data'][1].filter(e=>{
|
|
|
+ return e.actualuse!=null
|
|
|
})
|
|
|
+ if (arr) {
|
|
|
+ arr.forEach(item=>{
|
|
|
+ let JP = JSON.parse(item['actualuse']);
|
|
|
+ this.fundList[0]['havePaid']+=Number(JP['device']);
|
|
|
+ this.fundList[1]['havePaid']+=Number(JP['Material']);
|
|
|
+ this.fundList[2]['havePaid']+=Number(JP['processing']);
|
|
|
+ this.fundList[3]['havePaid']+=Number(JP['Collaboration']);
|
|
|
+ this.fundList[4]['havePaid']+=Number(JP['APPRAISAL']);
|
|
|
+ this.fundList[5]['havePaid']+=Number(JP['entery']);
|
|
|
+ this.fundList[6]['havePaid']+=Number(JP['activities']);
|
|
|
+ this.fundList[7]['havePaid']+=Number(JP['Transaction']);
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+ // this.ty=res.data[0][0].type
|
|
|
|
|
|
if (data.total!='') { //因为创客空间有金额总和total学生和活动的没有所以要做到统一,把空间的total去掉
|
|
|
data.total=0
|
|
@@ -276,7 +275,7 @@ export default {
|
|
|
for(let k in data){
|
|
|
this.allFund+=data[k]*1
|
|
|
}
|
|
|
- // console.log(this.allFund);
|
|
|
+ console.log(this.allFund);
|
|
|
},err=>{
|
|
|
console.log(err);
|
|
|
})
|