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