|
@@ -4,7 +4,7 @@
|
|
<div class="left">
|
|
<div class="left">
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="number">
|
|
<div class="number">
|
|
- 85
|
|
|
|
|
|
+ {{ countFee.expendGas }}
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<div class="title">
|
|
支出/气体
|
|
支出/气体
|
|
@@ -13,7 +13,7 @@
|
|
<div class="verticalLine"/>
|
|
<div class="verticalLine"/>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="number">
|
|
<div class="number">
|
|
- 8.811k
|
|
|
|
|
|
+ {{countFee.principalBalance}}
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<div class="title">
|
|
剩余本金
|
|
剩余本金
|
|
@@ -22,21 +22,21 @@
|
|
<div class="verticalLine"/>
|
|
<div class="verticalLine"/>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="number">
|
|
<div class="number">
|
|
- 85
|
|
|
|
|
|
+ {{countFee.predictTotalCost}}
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<div class="title">
|
|
预计支出总费用
|
|
预计支出总费用
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="verticalLine"/>
|
|
|
|
- <div class="item">
|
|
|
|
- <div class="number">
|
|
|
|
- 88222
|
|
|
|
- </div>
|
|
|
|
- <div class="title">
|
|
|
|
- 预计空投价值
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+<!-- <div class="verticalLine"/>-->
|
|
|
|
+<!-- <div class="item">-->
|
|
|
|
+<!-- <div class="number">-->
|
|
|
|
+<!-- 88222-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div class="title">-->
|
|
|
|
+<!-- 预计空投价值-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </div>-->
|
|
</div>
|
|
</div>
|
|
<div class="right" @click="drawerFinance = true">
|
|
<div class="right" @click="drawerFinance = true">
|
|
<img src="../../assets/dashboard/upload.svg" alt="upload">
|
|
<img src="../../assets/dashboard/upload.svg" alt="upload">
|
|
@@ -94,10 +94,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="info">
|
|
<div class="info">
|
|
- 共7项
|
|
|
|
|
|
+ 共{{echartsInputData.totalCount}}项
|
|
</div>
|
|
</div>
|
|
<div class="info">
|
|
<div class="info">
|
|
- 总支出:234112
|
|
|
|
|
|
+ 总支出:{{echartsInputData.totalCost}}
|
|
</div>
|
|
</div>
|
|
<div class="progress">
|
|
<div class="progress">
|
|
<div class="progress">
|
|
<div class="progress">
|
|
@@ -114,10 +114,10 @@
|
|
<div class="progressBox">
|
|
<div class="progressBox">
|
|
<div class="item" v-for="(item,index) in progressData">
|
|
<div class="item" v-for="(item,index) in progressData">
|
|
<div class="name">
|
|
<div class="name">
|
|
- {{ item.name }}
|
|
|
|
|
|
+ {{ item.taskName }}
|
|
</div>
|
|
</div>
|
|
<div class="progress">
|
|
<div class="progress">
|
|
- <div class="progress" :style="{width:item.progress}"></div>
|
|
|
|
|
|
+ <div class="progress" :style="{width:(item.finishCount/item.totalCount*100)+'%'}"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -278,33 +278,13 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import * as echarts from 'echarts';
|
|
import * as echarts from 'echarts';
|
|
|
|
+import {addressGroup, countFee, dailyCost, expectedInput, taskProgress} from "@/api/statistics";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Dashboard",
|
|
name: "Dashboard",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- progressData: [
|
|
|
|
- {
|
|
|
|
- name: '任务名称',
|
|
|
|
- progress: '30%',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '任务名称',
|
|
|
|
- progress: '20%',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '任务名称',
|
|
|
|
- progress: '0',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '任务名称',
|
|
|
|
- progress: '0',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '任务名称',
|
|
|
|
- progress: '0',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ progressData: [],
|
|
isActive: 0,
|
|
isActive: 0,
|
|
day: ['7D', '30D', 'All'],
|
|
day: ['7D', '30D', 'All'],
|
|
visible: false,
|
|
visible: false,
|
|
@@ -344,13 +324,34 @@ export default {
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
- time:''
|
|
|
|
|
|
+ time:'',
|
|
|
|
+ countFee:{
|
|
|
|
+ expendGas:0,
|
|
|
|
+ predictTotalCost:0,
|
|
|
|
+ principalBalance:0,
|
|
|
|
+ },
|
|
|
|
+ echartsInputData:{
|
|
|
|
+ totalCost:0,
|
|
|
|
+ totalCount:0,
|
|
|
|
+ predicts:[]
|
|
|
|
+ },
|
|
|
|
+ echartsExpenseData:{
|
|
|
|
+ timeData:[],
|
|
|
|
+ seriesDataGas:[],
|
|
|
|
+ seriesDataP:[]
|
|
|
|
+ },
|
|
|
|
+ echartsAddressData:{
|
|
|
|
+ xAxisData:[],
|
|
|
|
+ seriesData:[]
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.initEchartsAddress()
|
|
|
|
- this.initEchartsInput()
|
|
|
|
- this.initEchartsExpense()
|
|
|
|
|
|
+ this.getExpectedInput()
|
|
|
|
+ this.getCountFee()
|
|
|
|
+ this.getDailyCost()
|
|
|
|
+ this.getTaskProgress()
|
|
|
|
+ this.getAddressGroup()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
initEchartsAddress() {
|
|
initEchartsAddress() {
|
|
@@ -370,7 +371,7 @@ export default {
|
|
xAxis: {
|
|
xAxis: {
|
|
offset: 20,
|
|
offset: 20,
|
|
type: 'category',
|
|
type: 'category',
|
|
- data: ['钱包名称', '钱包名称', '钱包名称', '钱包名称', '钱包名称', '钱包名称'],
|
|
|
|
|
|
+ data: this.echartsAddressData.xAxisData,
|
|
axisLabel: {
|
|
axisLabel: {
|
|
color: '#ABABAB'
|
|
color: '#ABABAB'
|
|
},
|
|
},
|
|
@@ -395,7 +396,7 @@ export default {
|
|
],
|
|
],
|
|
series: [
|
|
series: [
|
|
{
|
|
{
|
|
- data: [30, 25, 18, 40, 26, 40],
|
|
|
|
|
|
+ data: this.echartsAddressData.seriesData,
|
|
type: 'bar',
|
|
type: 'bar',
|
|
barWidth: '15%',
|
|
barWidth: '15%',
|
|
itemStyle: {
|
|
itemStyle: {
|
|
@@ -419,7 +420,6 @@ export default {
|
|
},
|
|
},
|
|
series: [
|
|
series: [
|
|
{
|
|
{
|
|
- name: 'Access From',
|
|
|
|
type: 'pie',
|
|
type: 'pie',
|
|
radius: ['40%', '70%'],
|
|
radius: ['40%', '70%'],
|
|
avoidLabelOverlap: false,
|
|
avoidLabelOverlap: false,
|
|
@@ -430,15 +430,7 @@ export default {
|
|
labelLine: {
|
|
labelLine: {
|
|
show: false
|
|
show: false
|
|
},
|
|
},
|
|
- data: [
|
|
|
|
- {value: 1048, name: '1'},
|
|
|
|
- {value: 735, name: '2'},
|
|
|
|
- {value: 580, name: '3'},
|
|
|
|
- {value: 484, name: '4'},
|
|
|
|
- {value: 300, name: '5'},
|
|
|
|
- {value: 300, name: '6'},
|
|
|
|
- {value: 300, name: '7'},
|
|
|
|
- ]
|
|
|
|
|
|
+ data: this.echartsInputData.predicts
|
|
}
|
|
}
|
|
]
|
|
]
|
|
};
|
|
};
|
|
@@ -479,7 +471,7 @@ export default {
|
|
axisTick: {
|
|
axisTick: {
|
|
show: false
|
|
show: false
|
|
},
|
|
},
|
|
- data: ['08-05','08-06','08-07','08-08','08-09','08-10']
|
|
|
|
|
|
+ data: this.echartsExpenseData.timeData
|
|
}
|
|
}
|
|
],
|
|
],
|
|
yAxis: [
|
|
yAxis: [
|
|
@@ -501,7 +493,7 @@ export default {
|
|
emphasis: {
|
|
emphasis: {
|
|
focus: 'series'
|
|
focus: 'series'
|
|
},
|
|
},
|
|
- data: [12,9,6,12,10,12]
|
|
|
|
|
|
+ data: this.echartsExpenseData.seriesDataGas
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '本金',
|
|
name: '本金',
|
|
@@ -515,7 +507,7 @@ export default {
|
|
emphasis: {
|
|
emphasis: {
|
|
focus: 'series'
|
|
focus: 'series'
|
|
},
|
|
},
|
|
- data: [12,9,6,12,10,12]
|
|
|
|
|
|
+ data: this.echartsExpenseData.seriesDataP
|
|
},
|
|
},
|
|
]
|
|
]
|
|
};
|
|
};
|
|
@@ -544,6 +536,50 @@ export default {
|
|
},
|
|
},
|
|
exportingReports(){
|
|
exportingReports(){
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+ getExpectedInput(){
|
|
|
|
+ expectedInput().then(res=>{
|
|
|
|
+ this.echartsInputData = res
|
|
|
|
+ this.echartsInputData.predicts.forEach(item=>{
|
|
|
|
+ item.value = item.estimatedCost
|
|
|
|
+ item.name = item.projectName
|
|
|
|
+ })
|
|
|
|
+ this.initEchartsInput()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getCountFee(){
|
|
|
|
+ countFee().then(res=>{
|
|
|
|
+ this.countFee = res
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getDailyCost(){
|
|
|
|
+ dailyCost().then(res=>{
|
|
|
|
+ this.echartsExpenseData = {
|
|
|
|
+ timeData:[],
|
|
|
|
+ seriesDataGas:[],
|
|
|
|
+ seriesDataP:[]
|
|
|
|
+ }
|
|
|
|
+ res.forEach(item=>{
|
|
|
|
+ this.echartsExpenseData.timeData.push(item.date)
|
|
|
|
+ this.echartsExpenseData.seriesDataGas.push(item.gas)
|
|
|
|
+ this.echartsExpenseData.seriesDataP.push(item.principal)
|
|
|
|
+ })
|
|
|
|
+ this.initEchartsExpense()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getTaskProgress(){
|
|
|
|
+ taskProgress().then(res=>{
|
|
|
|
+ this.progressData = res
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getAddressGroup(){
|
|
|
|
+ addressGroup().then(res=>{
|
|
|
|
+ res.forEach(item=>{
|
|
|
|
+ this.echartsAddressData.xAxisData.push(item.groupName)
|
|
|
|
+ this.echartsAddressData.seriesData.push(item.addressCount)
|
|
|
|
+ })
|
|
|
|
+ this.initEchartsAddress()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|