|
|
@@ -1,8 +1,9 @@ |
|
|
|
<template> |
|
|
|
<view class="content"> |
|
|
|
<view v-if="pieDataAll.length>0"> |
|
|
|
<view > |
|
|
|
<!-- <view v-if="pieDataAll.length>0"> --> |
|
|
|
<view class="title_name">{{dealDateTime[0]}}年{{dealDateTime[1]}}月{{dealDateTime[2]}}日黔通智联ETC事业部全国发行日报表</view> |
|
|
|
<view class="table_wrap" > |
|
|
|
<view class="table_wrap" v-if="dataAll"> |
|
|
|
<t-table> |
|
|
|
<t-tr font-size="12"> |
|
|
|
<t-td >车型</t-td> |
|
|
@@ -28,26 +29,29 @@ |
|
|
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="dateTime" @change="change"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="isShow === 0"> |
|
|
|
<view class="title title_pie"><view class="choice_item1"><uni-data-select v-model="selectPieValue" :localdata="pieRange" @change="changePie" :clear="false"></uni-data-select></view></view> |
|
|
|
<view class="charts-box"> |
|
|
|
<qiun type="pie" :opts="opts" :chartData="pieData" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else-if="isShow === 1"> |
|
|
|
<view class="title title_pie"><view class="choice_item1"><uni-data-select v-model="selectLineValue" :localdata="lineRange" @change="changeLine" :clear="false"></uni-data-select></view></view> |
|
|
|
<view class="charts-box"> |
|
|
|
<qiun type="line" :opts="optsLine" :chartData="lineData" :ontouch="true"/> |
|
|
|
<view v-if="pieData !={} || chartData !={} || lineData !={} "> |
|
|
|
<view v-if="isShow === 0"> |
|
|
|
<view class="title title_pie"><view class="choice_item1"><uni-data-select v-model="selectPieValue" :localdata="pieRange" @change="changePie" :clear="false"></uni-data-select></view></view> |
|
|
|
<view class="charts-box"> |
|
|
|
<qiun type="pie" :opts="opts" :chartData="pieData" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<view class="title title_pie"><view class="choice_item"><uni-data-select v-model="selectColValue" :localdata="colRange" @change="changeCol" :clear="false"></uni-data-select></view></view> |
|
|
|
<view class="charts-box"> |
|
|
|
<qiun type="column" :opts="optsCol" :chartData="chartData" :ontouch="true"/> |
|
|
|
<view v-else-if="isShow === 1"> |
|
|
|
<view class="title title_pie"><view class="choice_item1"><uni-data-select v-model="selectLineValue" :localdata="lineRange" @change="changeLine" :clear="false"></uni-data-select></view></view> |
|
|
|
<view class="charts-box"> |
|
|
|
<qiun type="line" :opts="optsLine" :chartData="lineData" :ontouch="true"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<view class="title title_pie"><view class="choice_item"><uni-data-select v-model="selectColValue" :localdata="colRange" @change="changeCol" :clear="false"></uni-data-select></view></view> |
|
|
|
<view class="charts-box"> |
|
|
|
<qiun type="column" :opts="optsCol" :chartData="chartData" :ontouch="true"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view v-else>暂无数据统计信息</view> |
|
|
|
<!-- <view v-else>暂无数据统计信息</view> --> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@@ -72,7 +76,7 @@ |
|
|
|
dealDateTime:[], //处理过后的时间,前端展示 |
|
|
|
dataAll:'', //总的数据 |
|
|
|
//标题名称 |
|
|
|
titleArr:{'dayCardCount':'当日开户数','monthCardCount':'当月开户数','yearCardCount':'当年累积开户数','cardCount':'总计开户数','dayCancelCount':'当日注销','yearCancelCount':'当年注销数','cancelCount':'总计注销数'}, |
|
|
|
titleArr:{'dayCardCount':'当日开户数','monthCardCount':'当月开户数',"monthCancelCount":"当月注销",'yearCardCount':'当年累积开户数','cardCount':'总计开户数','dayCancelCount':'当日注销','yearCancelCount':'当年注销数','cancelCount':'总计注销数'}, |
|
|
|
isShow:0, |
|
|
|
pieData:{}, |
|
|
|
chartData: {}, |
|
|
@@ -150,8 +154,8 @@ |
|
|
|
qiun |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
// this.noDealDateTime=nowDate(new Date()); |
|
|
|
this.noDealDateTime='2023-04-17'; |
|
|
|
this.noDealDateTime=nowDate(new Date()); |
|
|
|
// this.noDealDateTime='2023-04-17'; |
|
|
|
this.dealDateTime=nowDate(new Date()).split('-'); |
|
|
|
this.reqPie(); //饼状图数据请求 |
|
|
|
}, |
|
|
@@ -232,19 +236,22 @@ |
|
|
|
.then((res) => { |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
this.dataAll = stringToJson(res.bizContent); |
|
|
|
console.log("this.dataAll",this.dataAll) |
|
|
|
this.dealPieData(stringToJson(res.bizContent)); //处理饼状图数据 |
|
|
|
this.getPieData(this.pieDataAll[0]); //饼状图展示 |
|
|
|
this.dealLineData(stringToJson(res.bizContent)); //处理折线图数据 |
|
|
|
this.getLineData(this.lineDataAll[0]); //折线图展示 |
|
|
|
this.dealColData(stringToJson(res.bizContent)) //处理柱状图数据 |
|
|
|
this.getColumnData(this.colData.xData,this.colData.yData[0]); //柱状图 |
|
|
|
|
|
|
|
if(this.dataAll.cardData){ |
|
|
|
console.log("this.dataAll",this.dataAll) |
|
|
|
this.dealPieData(stringToJson(res.bizContent)); //处理饼状图数据 |
|
|
|
this.getPieData(this.pieDataAll[0]); //饼状图展示 |
|
|
|
this.dealLineData(stringToJson(res.bizContent)); //处理折线图数据 |
|
|
|
this.getLineData(this.lineDataAll[0]); //折线图展示 |
|
|
|
this.dealColData(stringToJson(res.bizContent)) //处理柱状图数据 |
|
|
|
this.getColumnData(this.colData.xData,this.colData.yData[0]); //柱状图 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
dealPieData(data){ |
|
|
|
// 记账卡合计 |
|
|
|
this.pieRange=[]; //清空一遍数据 |
|
|
|
this.pieDataAll=[]; //清空一遍数据 |
|
|
|
var pieDataItem=[] |
|
|
|
if(data.cardData.accountCardData.accountCardDataCount){ |
|
|
|
var list={ value: 0, text: "记账卡合计" }; |
|
|
@@ -292,6 +299,7 @@ |
|
|
|
console.log("this.pieDataAll",this.pieDataAll) |
|
|
|
}, |
|
|
|
dealLineData(data){ |
|
|
|
this.lineDataAll=[]; |
|
|
|
// 全部 |
|
|
|
var lineItem={ |
|
|
|
xData:["当日开户数","当月开户数","当年累积开户数","总计开户数","当日注销","当年注销数","总计注销数"], |
|
|
@@ -345,6 +353,7 @@ |
|
|
|
this.lineDataAll.push(lineItem2) |
|
|
|
}, |
|
|
|
dealColData(data){ |
|
|
|
this.colRange=[]; |
|
|
|
var allData=data.cardData.accountCardData.accountCardDataDetail.concat(data.cardData.valueCardData.valueCardDataDetail) |
|
|
|
for(var i=0;i<allData.length;i++){ |
|
|
|
if(allData[i].agencyName){ |