Commit ee6d3a64 authored by xingyuji's avatar xingyuji

Merge branch 'develop' into 'master'

fix: 供求比例改为0.xx、供销比改为0.x

See merge request !60
parents c933feb6 b6b74984
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
position: "top", position: "top",
formatter:function(params){ //标签内容 formatter:function(params){ //标签内容
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
return (1 / params.data).toFixed(1) return (1 / params.data).toFixed(2)
} }
} }
} }
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
formatter: (params) => { formatter: (params) => {
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
return `<div>${params.name}区间</br> return `<div>${params.name}区间</br>
供销比:${params.data ? (1/ params.data).toFixed(1) : ''} 供销比:${params.data ? (1/ params.data).toFixed(2) : ''}
</div>` </div>`
} }
}, },
...@@ -244,10 +244,10 @@ ...@@ -244,10 +244,10 @@
}) })
supplyDealRate.push({ supplyDealRate.push({
areaRange: areaRangeMap[key], areaRange: areaRangeMap[key],
rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0 rate: res.data[key] ? (1 / (res.data[key].rate || 0)) : 0
}) })
areaRange.push(areaRangeMap[key]) areaRange.push(areaRangeMap[key])
rate.push(res.data[key] ? (Number(res.data[key].rate).toFixed(1) || 0) : 0) rate.push(res.data[key] ? (Number(res.data[key].rate).toFixed(2) || 0) : 0)
// rate.push(res.data[key] ? (res.data[key].rate ? Number(res.data[key].rate).toFixed(1) : 0 ) : 0) // rate.push(res.data[key] ? (res.data[key].rate ? Number(res.data[key].rate).toFixed(1) : 0 ) : 0)
supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0) supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0)
dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0) dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0)
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
areaRange: areaRangeMap[key], areaRange: areaRangeMap[key],
supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0, supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0,
dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0, dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0,
gongQiuBi:res.data[key] ? (Number(res.data[key].rate).toFixed(1) || 0) : 0 gongQiuBi:res.data[key] ? (Number(res.data[key].rate).toFixed(2) || 0) : 0
}) })
}) })
this.chartData.rows = supplyChartsData this.chartData.rows = supplyChartsData
...@@ -265,6 +265,7 @@ ...@@ -265,6 +265,7 @@
this.supplyData.supplyNum.data = supplyNumber this.supplyData.supplyNum.data = supplyNumber
this.supplyRateData.areaRange.data = areaRange this.supplyRateData.areaRange.data = areaRange
this.supplyRateData.Rate.data = rate this.supplyRateData.Rate.data = rate
debugger
this.exportSaveStatus = JSON.stringify(exportList) this.exportSaveStatus = JSON.stringify(exportList)
if(noData === Object.keys(areaRangeMap).length) { if(noData === Object.keys(areaRangeMap).length) {
this.noDataFlag = true this.noDataFlag = true
......
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
position: "top", position: "top",
formatter:function(params){ //标签内容 formatter:function(params){ //标签内容
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
return (1 / params.data).toFixed(1) return (1 / params.data).toFixed(2)
} }
} }
} }
...@@ -441,7 +441,7 @@ ...@@ -441,7 +441,7 @@
formatter: (params) => { formatter: (params) => {
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
return `<div>${params.name}区间</br> return `<div>${params.name}区间</br>
供销比:${params.data ? (1/ params.data).toFixed(1) : ''} 供销比:${params.data ? (1/ params.data).toFixed(2) : ''}
</div>` </div>`
} }
}, },
...@@ -455,7 +455,7 @@ ...@@ -455,7 +455,7 @@
position: "top", position: "top",
formatter:function(params){ //标签内容 formatter:function(params){ //标签内容
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
return (params.data * 100 ).toFixed(0) + '%' return (params.data * 100 ).toFixed(1) + '%'
} }
} }
} }
...@@ -739,14 +739,14 @@ ...@@ -739,14 +739,14 @@
rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0 rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0
}) })
areaRange.push(areaRangeMap[key]) areaRange.push(areaRangeMap[key])
rate.push(res.data[key] ? (Number(res.data[key].rate).toFixed(1) || 0) : 0) rate.push(res.data[key] ? (Number(res.data[key].rate).toFixed(2) || 0) : 0)
supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0) supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0)
dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0) dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0)
exportList.push({ exportList.push({
areaRange: areaRangeMap[key], areaRange: areaRangeMap[key],
supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0, supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0,
dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0, dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0,
gongQiuBi: res.data[key] ? (Number(res.data[key].rate).toFixed(1) || 0) : 0 gongQiuBi: res.data[key] ? (Number(res.data[key].rate).toFixed(2) || 0) : 0
}) })
}) })
this.supplySaleCharts.rows = supplyChartsData this.supplySaleCharts.rows = supplyChartsData
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment