Commit b3759e2e authored by danfuman's avatar danfuman

修改

parent 14b738fe
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -119,7 +119,6 @@ ...@@ -119,7 +119,6 @@
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
import economiesDetail from './economies-detail' import economiesDetail from './economies-detail'
import skeleton from '../../component/skeleton' import skeleton from '../../component/skeleton'
import axios from 'axios'
export default { export default {
name: 'NationalEconomies', name: 'NationalEconomies',
components: { components: {
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<el-table-column prop="type" label="项目类型" :formatter="formatStatus" width="100"/> <el-table-column prop="type" label="项目类型" :formatter="formatStatus" width="100"/>
<el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable width="130"/> <el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable width="130"/>
<el-table-column prop="countRate" label="数量占比(%)" align="right" :formatter="formatStatus" sortable width="140"/> <el-table-column prop="countRate" label="数量占比(%)" align="right" :formatter="formatStatus" sortable width="140"/>
<el-table-column prop="money" label="中标总金额 (万元)" align="right" :formatter="formatStatus" width="150"/> <el-table-column prop="money" label="中标总金额 (万元)" align="right" :formatter="formatStatus" sortable width="170"/>
<el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" width="120"/> <el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" sortable width="140"/>
</el-table> </el-table>
</div> </div>
</div> </div>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="province" label="地区" :formatter="formatStatus" width="100"/> <el-table-column prop="province" label="地区" :formatter="formatStatus" width="100"/>
<el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable width="130"/> <el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable width="130"/>
<el-table-column prop="countRate" label="数量占比(%)" align="right" :formatter="formatStatus" width="120"/> <el-table-column prop="countRate" label="数量占比(%)" align="right" :formatter="formatStatus" sortable width="150"/>
<el-table-column prop="sumMoney" label="中标总金额 (万元)" align="right" :formatter="formatStatus" width="140"/> <el-table-column prop="sumMoney" label="中标总金额 (万元)" align="right" :formatter="formatStatus" width="140"/>
<el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" width="120"/> <el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" width="120"/>
</el-table> </el-table>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="rangeName" label="中标金额" :formatter="formatStatus"/> <el-table-column prop="rangeName" label="中标金额" :formatter="formatStatus"/>
<el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable/> <el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable/>
<el-table-column prop="rate" label="占比(%)" align="right" :formatter="formatStatus" width="100"/> <el-table-column prop="rate" label="占比(%)" align="right" :formatter="formatStatus" width="120" sortable/>
</el-table> </el-table>
</div> </div>
</div> </div>
...@@ -278,8 +278,19 @@ ...@@ -278,8 +278,19 @@
this.dataRegion() this.dataRegion()
this.yearsData() this.yearsData()
this.getCountBidByType() this.getCountBidByType()
this.$nextTick(() => {
})
setTimeout(() => {
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
}, 1000);
}, },
mounted() { mounted() {
}, },
beforeDestroy(){ beforeDestroy(){
...@@ -292,16 +303,14 @@ ...@@ -292,16 +303,14 @@
countBidByType(params).then(res => { countBidByType(params).then(res => {
this.isSkeleton=false; this.isSkeleton=false;
this.xmtjList=res.data.date; this.xmtjList=res.data.date;
this.xmtjList.forEach(item =>{
item.money=Number(item.money)
})
if(res.data){ if(res.data){
this.$nextTick(() => { this.$nextTick(() => {
this.initChart1(res.data.date) this.initChart1(res.data.date)
}) })
} }
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
}) })
}, },
getCountBidGroupByProvince(){ getCountBidGroupByProvince(){
...@@ -394,8 +403,6 @@ ...@@ -394,8 +403,6 @@
} }
}) })
}, },
initChart1(data) { initChart1(data) {
this.$nextTick(() => { this.$nextTick(() => {
let myChart = echarts.init(document.getElementById("echarts1")) let myChart = echarts.init(document.getElementById("echarts1"))
...@@ -408,57 +415,107 @@ ...@@ -408,57 +415,107 @@
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'line', type: 'cross'
label: {
backgroundColor: '#FFFFFF'
}
} }
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, axisLabel: { //坐标轴刻度标签的相关设置
axisLabel: { margin: 15, //刻度标签与轴线之间的距离
color:"#666666",
show: true, show: true,
interval: 0 interval: 0
}, },
axisTick: false, //坐标轴刻度
axisPointer: {
type: 'shadow'
},
data: data.map(item => item.type), data: data.map(item => item.type),
}, },
yAxis: { yAxis: [
type: 'value', {
}, type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
},
name: '单位:个',
nameLocation: 'start',
nameTextStyle: {
padding: [0, 0, 0, -60], // 四个数字分别为上右下左与原位置距离
color: '#666666',
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: ['#FFFFFF']
}
}
},
{
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
},
name: '单位:万元',
nameLocation: 'start',
nameTextStyle: {
padding: [0, 0, 0, 72], // 四个数字分别为上右下左与原位置距离
color: '#666666',
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: ['#FFFFFF']
}
}
}
],
grid: { grid: {
top:30, top:30,
left:100, left:80,
right:30, right:90,
bottom:30, bottom:30,
}, },
color:['#ADC0FF', '#E9C8FF'],
series: [ series: [
{ {
name:'中标数量(个)', name:'中标金额(万元)',
smooth: false, //平滑 smooth: false, //平滑
type:"line", type:"line",
symbolSize: 6, //折线拐点大小 symbolSize: 6,
itemStyle: { yAxisIndex: 1,
normal: { tooltip: {
borderWidth: 4, valueFormatter: function (value) {
lineStyle: { width: 2 } return value + '万元'
} }
}, },
data:list1, itemStyle: {
color: '#14C9C9'
},
data:data.map(item => item.money),
}, },
{ {
name:'中标总金额(万元)', name:'中标总数(个)',
smooth: false, //平滑 type: 'bar',
type:"line", barWidth: 20,
symbolSize: 6, //折线拐点大小 tooltip: {
valueFormatter: function (value) {
return value + '个';
}
},
itemStyle: { itemStyle: {
normal: { normal:{
borderWidth: 4, color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
lineStyle: { width: 2 } offset: 0,
color: '#56A5FF'
}, {
offset: 1,
color: '#1B8EFF'
}])
} }
}, },
data:list2, data:data.map(item => item.count),
} }
] ]
} }
...@@ -1006,18 +1063,20 @@ ...@@ -1006,18 +1063,20 @@
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 1) {
sums[index] = '合计'; sums[index] = '平均下浮率';
return; return;
} }
if (index === 1) { if (index === 0) {
sums[index] = '-'; sums[index] = '-';
return; return;
} }
const values = data.map(item => Number(item[column.property])); const values = data.map(item => Number(item[column.property]));
let length=0
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
length=values.length
return Number(prev) + Number(curr) return Number(prev) + Number(curr)
} else { } else {
return prev; return prev;
...@@ -1025,7 +1084,7 @@ ...@@ -1025,7 +1084,7 @@
}, 0); }, 0);
if (index === 2||index === 3||index === 4) { if (index === 2||index === 3||index === 4) {
sums[index] = Number(sums[index]).toFixed(2); sums[index] = (Number(sums[index])/length).toFixed(2);
return; return;
} }
}); });
......
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