update
This commit is contained in:
parent
3ed8af69d4
commit
d29a5fc4e7
@ -5,7 +5,8 @@
|
|||||||
"style":
|
"style":
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "驿达数智化看板",
|
"navigationBarTitleText": "驿达数智化看板",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,7 +43,6 @@
|
|||||||
<div style="display: flex;align-items: center;justify-content: space-between">
|
<div style="display: flex;align-items: center;justify-content: space-between">
|
||||||
<p class="title">入区车流分析</p>
|
<p class="title">入区车流分析</p>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<text class="value">日期:</text>
|
|
||||||
<text class="value">{{time}}</text>
|
<text class="value">{{time}}</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -54,9 +53,18 @@
|
|||||||
<no-data v-else :type="'car'"/>
|
<no-data v-else :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
|
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车辆累计</p>
|
||||||
|
<div>
|
||||||
|
<month-total :data="monthTotalList"/>
|
||||||
|
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<div class="time">
|
<div class="time">
|
||||||
<text class="thisTime">统计月份: </text>
|
<text class="thisTime"></text>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<picker mode="date" fields="month" :value="single" :end="endData" @change="bindDateChange" >
|
<picker mode="date" fields="month" :value="single" :end="endData" @change="bindDateChange" >
|
||||||
<view class="time">
|
<view class="time">
|
||||||
@ -67,10 +75,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<view class="tab" >
|
<view class="tab" >
|
||||||
<view v-for="(item,index) in tabList" :key="index" :class="selectTab===item.value?'tabItem tabItemActive':'tabItem'" @click="handleChangeTab(item.value)">{{item.name}}{{index!==0?'区':''}}</view>
|
<view v-for="(item,index) in tabList" :key="index" :class="selectTab===item.value?'tabItem tabItemActive':'tabItem'" @click="handleChangeTab(item.value)">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车辆归属地</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车辆归属地</p>
|
||||||
<div v-if="cityPlaceAll.length>0">
|
<div v-if="homePlace.length>0">
|
||||||
<home-place :homeData="homePlace" :homeCity="cityPlace" />
|
<home-place :homeData="homePlace" :homeCity="cityPlace" />
|
||||||
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
@ -86,16 +96,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车车辆类型-停留时间(日均)</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车车辆类型-停留时间(日均)</p>
|
||||||
<div v-if="timeAnalysisData.length>0">
|
|
||||||
|
<div v-if="timeAnalysisData.series.length>0">
|
||||||
<time-analysis :data="timeAnalysisData"/>
|
<time-analysis :data="timeAnalysisData"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1105,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1105,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else :type="'car'"/>
|
<no-data v-else :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<div class="top">
|
<div class="topItem" >
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月入区率占比</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月入区率占比</p>
|
||||||
<text class="value">{{allEntry?allEntry:'-'}}%</text>
|
<div class="box" v-if="allEntry">
|
||||||
|
<text class="value">{{allEntry?allEntry:'-'}}%</text>
|
||||||
|
<view class="right">
|
||||||
|
<image class="arrowTop" :src="Number(addAllEntry)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
|
<text class="text">{{addAllEntry?Math.abs(addAllEntry) + '%':'-' + '%'}}</text>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="percentEntryData.length>0">
|
<div v-if="percentEntryData.length>0">
|
||||||
<percent-entry :data="percentEntryData" />
|
<percent-entry :data="percentEntryData" />
|
||||||
@ -121,7 +138,7 @@ import HomePlace from "./components/car/homePlace.vue";
|
|||||||
import CarTypeTime from "./components/car/carTypeTime.vue";
|
import CarTypeTime from "./components/car/carTypeTime.vue";
|
||||||
import timeAnalysis from "./components/car/timeAnalysis.vue";
|
import timeAnalysis from "./components/car/timeAnalysis.vue";
|
||||||
import PercentEntry from "./components/car/percentEntry.vue";
|
import PercentEntry from "./components/car/percentEntry.vue";
|
||||||
import {timestampToTime} from "../../util/dateTime";
|
import MonthTotal from "./components/car/monthTotal.vue";
|
||||||
import NoData from "./components/noData.vue";
|
import NoData from "./components/noData.vue";
|
||||||
import Analyse from "./components/analyse.vue";
|
import Analyse from "./components/analyse.vue";
|
||||||
export default {
|
export default {
|
||||||
@ -139,8 +156,9 @@ export default {
|
|||||||
chartData:{},
|
chartData:{},
|
||||||
selectTab: 0,
|
selectTab: 0,
|
||||||
tabIsTrue: true,
|
tabIsTrue: true,
|
||||||
tabList:[{name:'全部',value:0},{name:'东',value:1},{name:'西',value:2}],//选项卡列表
|
tabList:[],//选项卡列表
|
||||||
carNumAll : 0,//一共的入区车流数
|
carNumAll : 0,//一共的入区车流数
|
||||||
|
monthTotalList:[],//月累计
|
||||||
carData:[],//入区车流的数据
|
carData:[],//入区车流的数据
|
||||||
homePlaceAll:[],//车辆归属地两区总和列表
|
homePlaceAll:[],//车辆归属地两区总和列表
|
||||||
homePlace:[],//车辆归属地
|
homePlace:[],//车辆归属地
|
||||||
@ -159,17 +177,17 @@ export default {
|
|||||||
endTime:'',
|
endTime:'',
|
||||||
thisMonth:'',//几月
|
thisMonth:'',//几月
|
||||||
allEntry:'',//一共的入区率占比
|
allEntry:'',//一共的入区率占比
|
||||||
endData:''//截止日期
|
addAllEntry:'',//相较上月增加的入区率
|
||||||
|
endData:'',//截止日期
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {Analyse, NoData, PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis},
|
components: {Analyse, NoData, PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis,MonthTotal},
|
||||||
computed:{
|
computed:{
|
||||||
isHaveData(){
|
isHaveData(){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
console.log('option',option)
|
|
||||||
this.backType = option.type
|
this.backType = option.type
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
@ -207,7 +225,10 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
this.serviceInfo = storeServiceInfo
|
this.serviceInfo = storeServiceInfo
|
||||||
}
|
}
|
||||||
console.log('this.serviceInfo',this.serviceInfo)
|
//获取服务区基本信息
|
||||||
|
this.getServiceInfo()
|
||||||
|
//月累计
|
||||||
|
this.getMonthTotalList()
|
||||||
// 入区车流分析
|
// 入区车流分析
|
||||||
this.getCarData()
|
this.getCarData()
|
||||||
// 车辆归属地
|
// 车辆归属地
|
||||||
@ -225,6 +246,27 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
//获取服务区基本信息
|
||||||
|
async getServiceInfo(){
|
||||||
|
let id = ''
|
||||||
|
let currentService = uni.getStorageSync('currentService')
|
||||||
|
let nearService = uni.getStorageSync('nearService')
|
||||||
|
if (!currentService){
|
||||||
|
id = nearService.Serverpart_ID
|
||||||
|
}else{
|
||||||
|
id = currentService.Serverpart_ID
|
||||||
|
}
|
||||||
|
let req = {
|
||||||
|
ServerpartId:id
|
||||||
|
}
|
||||||
|
const total = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
|
||||||
|
console.log('totalsdskadja',total)
|
||||||
|
let tabList = [{name:'全部',value:0}]
|
||||||
|
total.Result_Data.RegionInfo.forEach((item,index)=>{
|
||||||
|
tabList.push({name:item.SERVERPART_REGIONNAME,value:index+1})
|
||||||
|
})
|
||||||
|
this.tabList = tabList
|
||||||
|
},
|
||||||
// 时间选择器改变的时间
|
// 时间选择器改变的时间
|
||||||
bindDateChange(e){
|
bindDateChange(e){
|
||||||
const date = new Date(e.detail.value)
|
const date = new Date(e.detail.value)
|
||||||
@ -325,20 +367,53 @@ export default {
|
|||||||
// if (this.tabIsTrue){
|
// if (this.tabIsTrue){
|
||||||
this.selectTab = value
|
this.selectTab = value
|
||||||
// 车辆归属地
|
// 车辆归属地
|
||||||
this.homePlace = this.homePlaceAll[this.selectTab]
|
this.homePlace = this.homePlaceAll[this.selectTab]?this.homePlaceAll[this.selectTab]:[]
|
||||||
this.cityPlace = this.cityPlaceAll[this.selectTab]
|
|
||||||
|
this.cityPlace = this.cityPlaceAll[this.selectTab]?this.cityPlaceAll[this.selectTab]:[]
|
||||||
// 车辆类型占比与停留时间
|
// 车辆类型占比与停留时间
|
||||||
this.carTypeTimeData = this.carTypeTimeDataAll[this.selectTab]
|
this.carTypeTimeData = this.carTypeTimeDataAll[this.selectTab]?this.carTypeTimeDataAll[this.selectTab]:[]
|
||||||
// 车辆价值与停留时间分析
|
// 车辆价值与停留时间分析
|
||||||
this.getTimeAnalysis(Serverpart_Region)
|
this.getTimeAnalysis(Serverpart_Region)
|
||||||
//入区率占比
|
//入区率占比
|
||||||
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
|
this.getPercentEntry(this.tabList[this.selectTab].name)
|
||||||
// this.tabIsTrue = false
|
|
||||||
// setTimeout(()=>{
|
|
||||||
// this.tabIsTrue = true
|
|
||||||
// },2000)
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
},
|
||||||
|
async getMonthTotalList(){
|
||||||
|
const req = {
|
||||||
|
StatisticsDate:this.endTime?this.endTime:this.time,
|
||||||
|
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
||||||
|
}
|
||||||
|
const data = await request.$webGet('CommercialApi/BigData/GetMonthAnalysis',req)
|
||||||
|
let monthList = []
|
||||||
|
let carCount = []
|
||||||
|
let moneyCount = []
|
||||||
|
let info = []
|
||||||
|
data.Result_Data.List.forEach(item=>{
|
||||||
|
monthList.push(item.Statistics_Month + '月')
|
||||||
|
carCount.push(Number((item.Vehicle_Count / 10000).toFixed(0)))
|
||||||
|
moneyCount.push(Number((item.RevenueAmount / 10000).toFixed(0)))
|
||||||
|
// showTip要展示的信息
|
||||||
|
info.push({
|
||||||
|
allCarCount : item.Vehicle_Count,
|
||||||
|
region:item.RegionList,
|
||||||
|
rate:item.Entry_Rate,
|
||||||
|
money:item.RevenueAmount
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
let res = {
|
||||||
|
categories: monthList,
|
||||||
|
series:[{name:'车流量',data:carCount,type:'column',index:0,info:info},
|
||||||
|
{name:'交易金额',data:moneyCount,type:'line',index:1}]
|
||||||
|
}
|
||||||
|
|
||||||
|
this.monthTotalList = res
|
||||||
|
// categories: ["小型车","中型车","大货车","新能源车"],
|
||||||
|
// series: [{name:'新能源',data:[30,38,20,10]},
|
||||||
|
// {name:'燃油车',data:[20,17,23,32]},
|
||||||
|
// {name:'停留时间',data:[62,38,50,84]}]
|
||||||
|
|
||||||
},
|
},
|
||||||
getCarData(){
|
getCarData(){
|
||||||
request.$webGet('CommercialApi/Revenue/GetBayonetEntryList',{
|
request.$webGet('CommercialApi/Revenue/GetBayonetEntryList',{
|
||||||
@ -362,6 +437,7 @@ export default {
|
|||||||
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ContainWhole:true
|
ContainWhole:true
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
console.log('resfdkfjdks',res)
|
||||||
// 因为只让接口调用一次 所以要把全部和不同区域的内容要放在同一个列表里面 然后通过选项卡的点击来切换展示哪一块的数据
|
// 因为只让接口调用一次 所以要把全部和不同区域的内容要放在同一个列表里面 然后通过选项卡的点击来切换展示哪一块的数据
|
||||||
let result = res.Result_Data.List
|
let result = res.Result_Data.List
|
||||||
result.forEach(item=>{
|
result.forEach(item=>{
|
||||||
@ -390,9 +466,11 @@ export default {
|
|||||||
})
|
})
|
||||||
//城市
|
//城市
|
||||||
this.cityPlaceAll = cityList
|
this.cityPlaceAll = cityList
|
||||||
|
console.log('this.cityPlaceAll',this.cityPlaceAll)
|
||||||
this.cityPlace = cityList[this.selectTab]
|
this.cityPlace = cityList[this.selectTab]
|
||||||
//省份
|
//省份
|
||||||
this.homePlaceAll = dataList
|
this.homePlaceAll = dataList
|
||||||
|
console.log('this.homePlaceAll',this.homePlaceAll)
|
||||||
this.homePlace = dataList[this.selectTab]
|
this.homePlace = dataList[this.selectTab]
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -456,17 +534,39 @@ export default {
|
|||||||
TimeSpan: 2
|
TimeSpan: 2
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let result = res.Result_Data.List
|
let result = res.Result_Data.List
|
||||||
this.timeAnalysisData = result
|
// this.timeAnalysisData = result
|
||||||
|
let categories = [0,2,4,6,8,10,12,14,16,18,20,22]
|
||||||
|
let series = []
|
||||||
|
result.forEach(item=>{
|
||||||
|
let obj = {name:'',data:[]}
|
||||||
|
obj.name = item.name
|
||||||
|
let valueList = []
|
||||||
|
item.data.forEach(subItem=>{
|
||||||
|
valueList.push(Number((subItem[1] * 60).toFixed(0)))
|
||||||
|
})
|
||||||
|
obj.data = valueList
|
||||||
|
series.push(obj)
|
||||||
|
})
|
||||||
|
let list = {
|
||||||
|
categories:categories,
|
||||||
|
series:series
|
||||||
|
}
|
||||||
|
this.timeAnalysisData = list
|
||||||
|
console.log('this.timeAnalysisData',this.timeAnalysisData)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// let res = [
|
// res = {
|
||||||
// {name:'小型车',data:[[3,3,10],[10,1.5,10],[18,0.5,5],[22,2.5,10]]},
|
// categories: ["2018","2019","2020","2021","2022","2023"],
|
||||||
// {name:'中型车',data:[[3,1.5,10],[4,2.7,10],[14,2.3,10],[18,1.4,0.50]]},
|
// series: [
|
||||||
// {name:'大型车',data:[[2,0.7,2],[5,0.2,1],[7,0.7,3],[22,1.9,6]]}
|
// {name: "成交量A", data: [35,8,25,37,4,20]},
|
||||||
// ]
|
// {name: "成交量B", data: [70,40,65,100,44,68]},
|
||||||
|
// {name: "成交量C", data: [100,80,95,150,112,132]}
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
getPercentEntry(){
|
getPercentEntry(type){
|
||||||
const date = new Date(this.single)
|
const date = new Date(this.single)
|
||||||
const nowDate = new Date()
|
const nowDate = new Date()
|
||||||
let nowMonth = nowDate.getMonth() + 1
|
let nowMonth = nowDate.getMonth() + 1
|
||||||
@ -479,21 +579,36 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
endTime = this.endTime
|
endTime = this.endTime
|
||||||
}
|
}
|
||||||
request.$webGet('CommercialApi/Revenue/GetSPBayonetList',{
|
|
||||||
Statistics_Date: this.endTime?endTime:this.time,
|
let req = {}
|
||||||
Province_Code:'340000',
|
if (type==='全部' || !type){
|
||||||
Serverpart_ID :this.serviceInfo.Serverpart_ID,
|
req = {
|
||||||
GroupType:2
|
Statistics_Date: this.endTime?endTime:this.time,
|
||||||
}).then(res=>{
|
Province_Code:'340000',
|
||||||
this.percentEntryDataAll = [ res.Result_Data.List, [res.Result_Data.List[0]], [res.Result_Data.List[1]]]
|
Serverpart_ID :this.serviceInfo.Serverpart_ID,
|
||||||
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
|
GroupType:2,
|
||||||
let Vehicle_CountAll=0
|
ShowGrowthRate:true
|
||||||
let SectionFlow_CountAll=0
|
}
|
||||||
this.percentEntryData.forEach(item=>{
|
}else{
|
||||||
Vehicle_CountAll+= item.Vehicle_Count
|
req = {
|
||||||
SectionFlow_CountAll+= item.SectionFlow_Count
|
Statistics_Date: this.endTime?endTime:this.time,
|
||||||
})
|
Province_Code:'340000',
|
||||||
this.allEntry = ((Vehicle_CountAll/SectionFlow_CountAll)*100).toFixed(2)
|
Serverpart_ID :this.serviceInfo.Serverpart_ID,
|
||||||
|
GroupType:2,
|
||||||
|
ShowGrowthRate:true,
|
||||||
|
Serverpart_Region:type.slice(0,1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request.$webGet('CommercialApi/Revenue/GetSPBayonetList',req).then(res=>{
|
||||||
|
this.percentEntryData = res.Result_Data.List
|
||||||
|
if (this.percentEntryData.length>0){
|
||||||
|
this.allEntry = res.Result_Data.List[0].Entry_Rate
|
||||||
|
this.addAllEntry = res.Result_Data.List[0].Entry_GrowthRate
|
||||||
|
}else{
|
||||||
|
this.allEntry = ''
|
||||||
|
this.addAllEntry = ''
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -728,6 +843,54 @@ export default {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.topItem{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.title{
|
||||||
|
font-size: 17px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
.box{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.value{
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #000;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
margin-left: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.arrowTop {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #782717;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.compare {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #c97e64;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.time{
|
.time{
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
.thisTime{
|
.thisTime{
|
||||||
|
|||||||
@ -25,7 +25,6 @@ export default {
|
|||||||
watch:{
|
watch:{
|
||||||
analyseInfo:{
|
analyseInfo:{
|
||||||
handler(value){
|
handler(value){
|
||||||
console.log('analyseInfowatch',value)
|
|
||||||
this.getLabelDetail()
|
this.getLabelDetail()
|
||||||
},
|
},
|
||||||
immediate:true,
|
immediate:true,
|
||||||
|
|||||||
@ -37,7 +37,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('value232312',value)
|
|
||||||
this.info = value
|
this.info = value
|
||||||
this.carTypeTimePath=''
|
this.carTypeTimePath=''
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
@ -51,10 +50,6 @@ export default {
|
|||||||
handleTap(e){
|
handleTap(e){
|
||||||
uChartsInstance[e.target.id].showToolTip(e,{
|
uChartsInstance[e.target.id].showToolTip(e,{
|
||||||
formatter: (item, category, index, opts) =>{
|
formatter: (item, category, index, opts) =>{
|
||||||
console.log('item',item)
|
|
||||||
console.log('opts',opts)
|
|
||||||
console.log('category',category)
|
|
||||||
console.log('index',index)
|
|
||||||
if (this.num===0){
|
if (this.num===0){
|
||||||
this.num++
|
this.num++
|
||||||
return item.name + ":" + opts.series[0].valueList[index] + '辆';
|
return item.name + ":" + opts.series[0].valueList[index] + '辆';
|
||||||
@ -64,6 +59,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
},
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
@ -113,7 +109,7 @@ export default {
|
|||||||
min: 0,
|
min: 0,
|
||||||
max: 100,
|
max: 100,
|
||||||
titleOffsetY: -5,
|
titleOffsetY: -5,
|
||||||
axisLineColor:"#F2F2F5"
|
axisLineColor:"#F2F2F5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:'单位: 分钟',
|
title:'单位: 分钟',
|
||||||
|
|||||||
@ -1,47 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="min-height: 100px;">
|
<div style="min-height: 100px;">
|
||||||
<div class="car">
|
<div class="car">
|
||||||
<div class="item" style="left: -16px;width: calc(46% + 16px)">
|
<div class="item" style="left: -16px;width: calc(220px)">
|
||||||
<canvas style="left: 0" v-if="!carNumPath" class="carNum" canvas-id="carNum" id="carNum"/>
|
<canvas style="left: 0" v-if="!carNumPath" class="carNum" canvas-id="carNum" id="carNum"/>
|
||||||
<image style="left: 0" v-if="carNumPath" class="carNum" :src="carNumPath"></image>
|
<image style="left: 0" v-if="carNumPath" class="carNum" :src="carNumPath"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" style="right: -16px;width: calc(54% + 16px)">
|
<div class="item" style="right: -16px;width: calc(200px)">
|
||||||
<canvas style="right: 0" v-if="!probabilityPath" class="carNum" canvas-id="probability" id="probability"/>
|
<canvas style="right: 0" v-if="!probabilityPath" class="carNum" canvas-id="probability" id="probability"/>
|
||||||
<image style="right: 0" v-if="probabilityPath" class="carNum" :src="probabilityPath"></image>
|
<image style="right: 0" v-if="probabilityPath" class="carNum" :src="probabilityPath"></image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<!-- <div class="info">-->
|
||||||
<div class="item">
|
<!-- <div class="item">-->
|
||||||
<text class="title">{{month}}月累计:</text>
|
<!-- <text class="title">{{month}}月累计:</text>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="other">
|
<!-- <div class="other">-->
|
||||||
<div class="item">
|
<!-- <div class="item">-->
|
||||||
<p class="title">
|
<!-- <p class="title">-->
|
||||||
<text class="text">入区</text>
|
<!-- <text class="text">入区</text>-->
|
||||||
<text class="textRight">{{allAddUpCount}}辆</text>
|
<!-- <text class="textRight">{{allAddUpCount}}辆</text>-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
<div class="box">
|
<!-- <div class="box">-->
|
||||||
<p class="value" v-for="(item,index) in dataList" :key="index">
|
<!-- <p class="value" v-for="(item,index) in dataList" :key="index">-->
|
||||||
<text class="text">{{item.Serverpart_Region + '区 '}}</text>
|
<!-- <text class="text">{{item.Serverpart_Region + '区 '}}</text>-->
|
||||||
<text class="textRight">{{item.AddUpCount + '辆' }}</text>
|
<!-- <text class="textRight">{{item.AddUpCount + '辆' }}</text>-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="item">
|
<!-- <div class="item">-->
|
||||||
<p class="title">
|
<!-- <p class="title">-->
|
||||||
<text class="text">入区率</text>
|
<!-- <text class="text">入区率</text>-->
|
||||||
<text class="textRight">{{ allEntryAddUpRate }}%</text>
|
<!-- <text class="textRight">{{ allEntryAddUpRate }}%</text>-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
<div class="box">
|
<!-- <div class="box">-->
|
||||||
<p class="value" v-for="(item,index) in dataList" :key="index">
|
<!-- <p class="value" v-for="(item,index) in dataList" :key="index">-->
|
||||||
<text class="text">{{item.Serverpart_Region + '区 '}}</text>
|
<!-- <text class="text">{{item.Serverpart_Region + '区 '}}</text>-->
|
||||||
<text class="textRight">{{item.EntryAddUp_Rate + '%' }}</text>
|
<!-- <text class="textRight">{{item.EntryAddUp_Rate + '%' }}</text>-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -85,7 +85,6 @@ export default {
|
|||||||
watch:{
|
watch:{
|
||||||
carData:{
|
carData:{
|
||||||
handler(value){
|
handler(value){
|
||||||
console.log('valuefirst',value)
|
|
||||||
if (value.length>0){
|
if (value.length>0){
|
||||||
this.isShowData = true
|
this.isShowData = true
|
||||||
}
|
}
|
||||||
@ -161,8 +160,6 @@ export default {
|
|||||||
title:this.entryRate,
|
title:this.entryRate,
|
||||||
subtitle:"昨日入区率"
|
subtitle:"昨日入区率"
|
||||||
}
|
}
|
||||||
console.log('res1111',res)
|
|
||||||
console.log('probabilityRes1111',probabilityRes)
|
|
||||||
this.drawCharts('carNum' , res,configCarNum )
|
this.drawCharts('carNum' , res,configCarNum )
|
||||||
this.drawCharts2('probability',probabilityRes,config)
|
this.drawCharts2('probability',probabilityRes,config)
|
||||||
},
|
},
|
||||||
@ -170,12 +167,10 @@ export default {
|
|||||||
const ctx = uni.createCanvasContext(id, this);
|
const ctx = uni.createCanvasContext(id, this);
|
||||||
let _this = this
|
let _this = this
|
||||||
let phoneInfo = uni.getStorageSync('phoneInfo')
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
this.width = (phoneInfo.screenWidth ) / 2
|
|
||||||
console.log('this.width',this.width)
|
|
||||||
uChartsInstance[id] = new uCharts({
|
uChartsInstance[id] = new uCharts({
|
||||||
type: "ring",
|
type: "ring",
|
||||||
context: ctx,
|
context: ctx,
|
||||||
width: _this.width,
|
width: 200,
|
||||||
height: 208,
|
height: 208,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: false,
|
animation: false,
|
||||||
@ -227,7 +222,7 @@ export default {
|
|||||||
uChartsInstance[id] = new uCharts({
|
uChartsInstance[id] = new uCharts({
|
||||||
type: "ring",
|
type: "ring",
|
||||||
context: ctx,
|
context: ctx,
|
||||||
width: 215,
|
width: 210,
|
||||||
height: 208,
|
height: 208,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
|||||||
@ -6,12 +6,12 @@
|
|||||||
<image v-if="homePlacePath" class="carNum" :src="homePlacePath"></image>
|
<image v-if="homePlacePath" class="carNum" :src="homePlacePath"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="homeCity">
|
<div class="homeCity">
|
||||||
<div class="dashed box1"></div>
|
<!-- <div class="dashed box1"></div>-->
|
||||||
<div class="dashed box2"></div>
|
<!-- <div class="dashed box2"></div>-->
|
||||||
<div class="dashed box3"></div>
|
<!-- <div class="dashed box3"></div>-->
|
||||||
<div class="dashed box4"></div>
|
<!-- <div class="dashed box4"></div>-->
|
||||||
<div class="dashed box5"></div>
|
<!-- <div class="dashed box5"></div>-->
|
||||||
<div class="dashed box6"></div>
|
<!-- <div class="dashed box6"></div>-->
|
||||||
<view class="item" v-for="(item,index) in progressList" :key="index" @click="handleShow(index)">
|
<view class="item" v-for="(item,index) in progressList" :key="index" @click="handleShow(index)">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<p class="title">{{item.name}}</p>
|
<p class="title">{{item.name}}</p>
|
||||||
@ -22,14 +22,14 @@
|
|||||||
<view class="meng" v-if="selectIndex === index">{{item.value}}辆</view>
|
<view class="meng" v-if="selectIndex === index">{{item.value}}辆</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<div class="notice">
|
<!-- <div class="notice">-->
|
||||||
<text class="noticeInfo notice1">0%</text>
|
<!-- <text class="noticeInfo notice1">0%</text>-->
|
||||||
<text class="noticeInfo notice2">20%</text>
|
<!-- <text class="noticeInfo notice2">20%</text>-->
|
||||||
<text class="noticeInfo notice3">40%</text>
|
<!-- <text class="noticeInfo notice3">40%</text>-->
|
||||||
<text class="noticeInfo notice4">60%</text>
|
<!-- <text class="noticeInfo notice4">60%</text>-->
|
||||||
<text class="noticeInfo notice5">80%</text>
|
<!-- <text class="noticeInfo notice5">80%</text>-->
|
||||||
<text class="noticeInfo notice6">100%</text>
|
<!-- <text class="noticeInfo notice6">100%</text>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -104,7 +104,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
console.log('value',value)
|
|
||||||
let list = []
|
let list = []
|
||||||
value.forEach(item=>{
|
value.forEach(item=>{
|
||||||
list.push(item.data)
|
list.push(item.data)
|
||||||
|
|||||||
139
pages/commercialBI/components/car/monthTotal.vue
Normal file
139
pages/commercialBI/components/car/monthTotal.vue
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<canvas class="canvas" canvas-id="monthTotal" id="monthTotal" @tap="handleTap"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uCharts from '@/components/u-charts.js';
|
||||||
|
var uChartsInstance = {};
|
||||||
|
export default {
|
||||||
|
name: "monthTotal",
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
data: {
|
||||||
|
handler(value) {
|
||||||
|
this.handleCarData(value)
|
||||||
|
},
|
||||||
|
immediate:true,
|
||||||
|
deep:true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
handleTap(e){
|
||||||
|
uChartsInstance[e.target.id].showToolTip(e,{
|
||||||
|
formatter: (item, category, index, opts) => {
|
||||||
|
let text = ''
|
||||||
|
if (item.name === '车流量'){
|
||||||
|
text = `入区 ${opts.series[0].info[index].allCarCount} 辆, 入区率 ${opts.series[0].info[index].rate} %`
|
||||||
|
return text
|
||||||
|
}else{
|
||||||
|
return `金额 ${opts.series[0].info[index].money} 元, 单车价值 ${((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2)} 元`
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 处理传入的数据
|
||||||
|
handleCarData(value) {
|
||||||
|
let res = {
|
||||||
|
categories: value.categories,
|
||||||
|
series: value.series
|
||||||
|
}
|
||||||
|
this.drawCharts('monthTotal', res)
|
||||||
|
},
|
||||||
|
drawCharts(id, data) {
|
||||||
|
const ctx = uni.createCanvasContext(id, this);
|
||||||
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
|
let width = phoneInfo.screenWidth-32
|
||||||
|
uChartsInstance[id] = new uCharts({
|
||||||
|
type: "mix",
|
||||||
|
context: ctx,
|
||||||
|
width: width,
|
||||||
|
height: 300,
|
||||||
|
categories: data.categories,
|
||||||
|
series: data.series,
|
||||||
|
animation: false,
|
||||||
|
rotate: false,
|
||||||
|
rotateLock: false,
|
||||||
|
canvas2d: true,
|
||||||
|
background: "#FFFFFF",
|
||||||
|
color: ["#1E80FF", "#00B6FF","#38C275","#6B6FFF","#6B85AE"],
|
||||||
|
padding: [35, 10, 5, 5],
|
||||||
|
dataLabel: false,
|
||||||
|
enableScroll: false,
|
||||||
|
xAxis: {
|
||||||
|
disabled: false,
|
||||||
|
disableGrid: true,
|
||||||
|
axisLine: false,
|
||||||
|
fontColor: '#777777',
|
||||||
|
fontSize:data.categories.length<10 ? 13 : 11
|
||||||
|
},
|
||||||
|
yAxis:{
|
||||||
|
showTitle:true,
|
||||||
|
data:[{
|
||||||
|
position: "left",
|
||||||
|
title: '车流量 / 万辆 ',
|
||||||
|
disabled: false,
|
||||||
|
axisLine: false,
|
||||||
|
titleOffsetY: -5,
|
||||||
|
titleOffsetX: 15,
|
||||||
|
min: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
position: "right",
|
||||||
|
title: '交易金额 / 万元',
|
||||||
|
disabled: false,
|
||||||
|
axisLine: false,
|
||||||
|
titleOffsetY: -5,
|
||||||
|
titleOffsetX: -15,
|
||||||
|
min: 0,
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
position: "bottom",
|
||||||
|
lineHeight: 25,
|
||||||
|
float:'center'
|
||||||
|
},
|
||||||
|
extra: {
|
||||||
|
mix:{
|
||||||
|
column:{
|
||||||
|
type: "group",
|
||||||
|
width: 12,
|
||||||
|
activeBgColor: "#000000",
|
||||||
|
activeBgOpacity: 0.08
|
||||||
|
},
|
||||||
|
line:{
|
||||||
|
type: "curve",
|
||||||
|
width: 2,
|
||||||
|
activeType: "hollow"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.main{
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
.canvas{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<div class="big" :style="{width:big+'%',right:0+'%'}" @click="handleShow(2)">
|
<div class="big" :style="{width:big+'%',right:0+'%'}" @click="handleShow(2)">
|
||||||
<div class="text" v-if="rateList[2]" :style="{left:'60%'}">
|
<div class="text" v-if="rateList[2]" :style="{left:'60%'}">
|
||||||
<div class="icon" style="background: #0FC862"></div>
|
<div class="icon" style="background: #0FC862"></div>
|
||||||
<text style="margin-right: 4px">大车型</text>
|
<text style="margin-right: 4px">大型车</text>
|
||||||
<text>{{big}}%</text>
|
<text>{{big}}%</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,10 +32,16 @@
|
|||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="listItem" v-for="(item,index) in dataList" :key="index">
|
<div class="listItem" v-for="(item,index) in dataList" :key="index">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div style="margin-right: 4px" :class="index===0?'icon1':index===1?'icon2':index===2?'icon3':'icon'"></div>
|
<div style="margin-right: 4px" :class="item.title==='小型车'?'icon1':item.title==='中型车'?'icon2':item.title==='大型车'?'icon3':'icon'"></div>
|
||||||
<p class="smallTitle">{{item.title}}</p>
|
<p class="smallTitle">{{item.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
<p class="smallRate">{{item.value + '%'}}</p>
|
<div style="display: flex;align-items: center">
|
||||||
|
<p class="smallRate">{{item.value + '%'}}</p>
|
||||||
|
<view class="right">
|
||||||
|
<image class="arrowTop" :src="Number(item.addValue)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
|
<text class="text">{{item.addValue?Math.abs(item.addValue) + '%':'-' + '%'}}</text>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -51,8 +57,9 @@ export default {
|
|||||||
components: {Analyse, NoData},
|
components: {Analyse, NoData},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList:[{title:'小型车',value:''},{title:'中型车',value:''},{title:'大货车',value:''}],
|
dataList:[{title:'小型车',value:'',addValue:''},{title:'中型车',value:'',addValue:''},{title:'大型车',value:'',addValue:''}],
|
||||||
progress:0,//入区率总比
|
progress:0,//入区率总比
|
||||||
|
addProgress:0,//总增长
|
||||||
min:0,//小型车
|
min:0,//小型车
|
||||||
middle:0,//中型车
|
middle:0,//中型车
|
||||||
big:0,//大型车
|
big:0,//大型车
|
||||||
@ -73,7 +80,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
this.dataList = [{title:'小型车',value:''},{title:'中型车',value:''},{title:'大货车',value:''}]
|
this.dataList = [{title:'小型车',value:''},{title:'中型车',value:''},{title:'大型车',value:''}]
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
immediate:true,
|
immediate:true,
|
||||||
@ -91,7 +98,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
console.log('value',value)
|
|
||||||
let Vehicle_CountAll=0
|
let Vehicle_CountAll=0
|
||||||
let SectionFlow_CountAll=0
|
let SectionFlow_CountAll=0
|
||||||
let minAll = 0
|
let minAll = 0
|
||||||
@ -112,7 +118,18 @@ export default {
|
|||||||
this.dataList[0].value = (minAll / Vehicle_CountAll*100).toFixed(2)
|
this.dataList[0].value = (minAll / Vehicle_CountAll*100).toFixed(2)
|
||||||
this.dataList[1].value = (middleAll / Vehicle_CountAll*100).toFixed(2)
|
this.dataList[1].value = (middleAll / Vehicle_CountAll*100).toFixed(2)
|
||||||
this.dataList[2].value = (bigAll / Vehicle_CountAll*100).toFixed(2)
|
this.dataList[2].value = (bigAll / Vehicle_CountAll*100).toFixed(2)
|
||||||
|
this.dataList[0].addValue = value[0].MinVehicleEntry_Rate
|
||||||
|
this.dataList[1].addValue = value[0].MediumVehicleEntry_Rate
|
||||||
|
this.dataList[2].addValue = value[0].LargeVehicleEntry_GrowthRate
|
||||||
|
let list = []
|
||||||
|
this.dataList.forEach(item=>{
|
||||||
|
if (Number(item.value)===0){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
list.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dataList = list
|
||||||
for (let i=1;i<this.dataList.length;i++){
|
for (let i=1;i<this.dataList.length;i++){
|
||||||
for (let j=1;j<this.dataList.length - 1;j++){
|
for (let j=1;j<this.dataList.length - 1;j++){
|
||||||
if (Number(this.dataList[i].value)>Number(this.dataList[j].value)){
|
if (Number(this.dataList[i].value)>Number(this.dataList[j].value)){
|
||||||
@ -122,7 +139,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -281,6 +297,33 @@ export default {
|
|||||||
color: #160002;
|
color: #160002;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
.right{
|
||||||
|
width: 70px;
|
||||||
|
margin-left: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.arrowTop {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #782717;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.compare {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #c97e64;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,13 +26,14 @@ export default {
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Object,
|
||||||
default: () => []
|
default: () => {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('valueWatch',value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
immediate:true,
|
immediate:true,
|
||||||
@ -47,27 +48,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
let list = []
|
|
||||||
value.forEach(item=>{
|
|
||||||
list.push({name:item.name,data:item.data})
|
|
||||||
})
|
|
||||||
value.forEach(item=>{
|
|
||||||
item.data.forEach(item=>{
|
|
||||||
item[1] = Number(item[1])
|
|
||||||
item[2] = item[1]*5
|
|
||||||
})
|
|
||||||
})
|
|
||||||
console.log('list',list)
|
|
||||||
|
|
||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
series:
|
categories:value.categories,
|
||||||
list
|
series:value.series
|
||||||
// [{name:'小型车',data:[[3,3,10],[10,1.5,10],[18,0.5,5],[22,2.5,10]]},
|
|
||||||
// {name:'中型车',data:[[3,1.5,10],[4,2.7,10],[14,2.3,10],[18,1.4,0.50]]},
|
|
||||||
// {name:'大型车',data:[[2,0.7,2],[5,0.2,1],[7,0.7,3],[22,1.9,6]]}]
|
|
||||||
}
|
}
|
||||||
console.log('res',res)
|
console.log('res123123',res)
|
||||||
this.drawCharts('timeAnalysis', res)
|
this.drawCharts('timeAnalysis', res)
|
||||||
},
|
},
|
||||||
drawCharts(id, data) {
|
drawCharts(id, data) {
|
||||||
@ -76,10 +61,11 @@ export default {
|
|||||||
let phoneInfo = uni.getStorageSync('phoneInfo')
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
this.width = phoneInfo.screenWidth - 16
|
this.width = phoneInfo.screenWidth - 16
|
||||||
uChartsInstance[id] = new uCharts({
|
uChartsInstance[id] = new uCharts({
|
||||||
type: "bubble",
|
type: "line",
|
||||||
context: ctx,
|
context: ctx,
|
||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 170,
|
height: 240,
|
||||||
|
categories: data.categories,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: false,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
@ -87,33 +73,33 @@ export default {
|
|||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
color: ["#1E80FF", "#00B6FF","#0FC862"],
|
color: ["#1E80FF", "#00B6FF","#0FC862"],
|
||||||
padding: [10, 30, 5, 5],
|
padding: [15, 30, 5, 5],
|
||||||
dataLabel: false,
|
dataLabel: false,
|
||||||
enableScroll: false,
|
enableScroll: false,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
disableGrid: true,
|
disableGrid: true,
|
||||||
gridType: "solid",
|
formatter:(val)=>{
|
||||||
splitNumber: 6,
|
if (val===0 || val===4 || val===8 || val===12 || val===16 || val===20 || val===23){
|
||||||
boundaryGap: "justify",
|
if (val===23){
|
||||||
min: 0,
|
return '24:00'
|
||||||
max: 24,
|
}else{
|
||||||
axisLineColor:"#F2F2F5",
|
return `${val}:00`
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
disabled: false,
|
gridType: "dash",
|
||||||
disableGrid: false,
|
dashLength: 2,
|
||||||
gridType: "solid",
|
showTitle:true,
|
||||||
splitNumber: 5,
|
data:[{
|
||||||
gridColor:'#F2F2F5',
|
title:'单位: 分钟',
|
||||||
data: [
|
titleOffsetY: -5,
|
||||||
{
|
min:0,
|
||||||
min: 0,
|
max:180,
|
||||||
max: 5,
|
}]
|
||||||
unit:'h',
|
|
||||||
axisLineColor:"#F2F2F5",
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: true,
|
show: true,
|
||||||
@ -123,9 +109,10 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
extra: {
|
extra: {
|
||||||
bubble: {
|
line: {
|
||||||
border: 1,
|
type: "curve",
|
||||||
opacity: 0.25
|
width: 2,
|
||||||
|
activeType: "hollow"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -141,6 +128,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
.timeAnalysis{
|
.timeAnalysis{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 220px;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="consumPrefer">
|
<div class="consumPrefer">
|
||||||
<canvas v-if="!preferPath" class="prefer" canvas-id="prefer" id="prefer"/>
|
<canvas class="prefer" canvas-id="prefer" id="prefer" @tap="tap"/>
|
||||||
<image v-if="preferPath" class="prefer" :src="preferPath"></image>
|
<!-- <image v-if="preferPath" class="prefer" :src="preferPath"></image>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -31,6 +31,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tap(e){
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
console.log('value11111',value)
|
console.log('value11111',value)
|
||||||
@ -77,7 +80,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout( ()=>{
|
setTimeout( ()=>{
|
||||||
this.canvasToTempImage('prefer')
|
// this.canvasToTempImage('prefer')
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
canvasToTempImage(id){
|
canvasToTempImage(id){
|
||||||
|
|||||||
@ -6,23 +6,23 @@
|
|||||||
<p class="title">{{item.name}}</p>
|
<p class="title">{{item.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="small" :style="{background:item.name==='男'?'#CAD0DA':'#C6D3D7',width:item.small + '%'}" @click="handleShow(item,index,0)">{{item.small<16?'':item.small + '%'}}
|
<div class="small" v-if="Number(item.small)!==0" :style="{background:item.name==='男性'?'#CAD0DA':'#C6D3D7',width:item.small + '%'}" @click="handleShow(item,index,0)">{{item.small<16?'':item.small + '%'}}
|
||||||
<div class="text" v-if="item.showList[0]">
|
<div class="text" v-if="item.showList[0]">
|
||||||
<div class="icon"></div>
|
<div class="icon" :style="{background:item.name==='男性'?'#CAD0DA':'#C6D3D7'}"></div>
|
||||||
<text style="margin-right: 4px">低消费</text>
|
<text style="margin-right: 4px">低消费</text>
|
||||||
<text>{{item.small}}%</text>
|
<text>{{item.small}}%</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="normal" :style="{background:item.name==='男'?'#ACB9CD':'#AFC1C6',width:item.normal + '%',left:item.small+'%'}" @click="handleShow(item,index,1)">{{item.normal<16?'':item.normal+'%'}}
|
<div class="normal" v-if="Number(item.normal)!==0" :style="{background:item.name==='男性'?'#ACB9CD':'#AFC1C6',width:item.normal + '%',left:item.small+'%'}" @click="handleShow(item,index,1)">{{item.normal<16?'':item.normal+'%'}}
|
||||||
<div class="text" v-if="item.showList[1]">
|
<div class="text" v-if="item.showList[1]">
|
||||||
<div class="icon"></div>
|
<div class="icon" :style="{background:item.name==='男性'?'#ACB9CD':'#AFC1C6'}"></div>
|
||||||
<text style="margin-right: 4px">普通消费</text>
|
<text style="margin-right: 4px">普通消费</text>
|
||||||
<text>{{item.normal}}%</text>
|
<text>{{item.normal}}%</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="big" :style="{background:item.name==='男'?'#1E80FF':'#00C2FF',left:(Number(item.small)+Number(item.normal))+'%', width:item.big+'%'}" @click="handleShow(item,index,2)">{{item.big<16?'':item.big + '%'}}
|
<div class="big" v-if="Number(item.big)!==0" :style="{background:item.name==='男性'?'#1E80FF':'#00C2FF',left:(Number(item.small)+Number(item.normal))+'%', width:item.big+'%'}" @click="handleShow(item,index,2)">{{item.big<16?'':item.big + '%'}}
|
||||||
<div class="text" v-if="item.showList[2]">
|
<div class="text" v-if="item.showList[2]">
|
||||||
<div class="icon"></div>
|
<div class="icon" :style="{background:item.name==='男性'?'#1E80FF':'#00C2FF'}"></div>
|
||||||
<text style="margin-right: 4px">高消费</text>
|
<text style="margin-right: 4px">高消费</text>
|
||||||
<text>{{item.big}}%</text>
|
<text>{{item.big}}%</text>
|
||||||
</div>
|
</div>
|
||||||
@ -32,15 +32,15 @@
|
|||||||
<div class="imgKey">
|
<div class="imgKey">
|
||||||
<div style="margin: 0 auto;display: flex">
|
<div style="margin: 0 auto;display: flex">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon" :style="{background:item.name==='男'?'#CAD0DA':'#C6D3D7'}"></div>
|
<div class="icon" :style="{background:item.name==='男性'?'#CAD0DA':'#C6D3D7'}"></div>
|
||||||
<p class="consume">低消费</p>
|
<p class="consume">低消费</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon" :style="{background:item.name==='男'?'#ACB9CD':'#AFC1C6'}"></div>
|
<div class="icon" :style="{background:item.name==='男性'?'#ACB9CD':'#AFC1C6'}"></div>
|
||||||
<p class="consume">普通消费</p>
|
<p class="consume">普通消费</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon" :style="{background:item.name==='男'?'#1E80FF':'#00C2FF'}"></div>
|
<div class="icon" :style="{background:item.name==='男性'?'#1E80FF':'#00C2FF'}"></div>
|
||||||
<p class="consume">高消费</p>
|
<p class="consume">高消费</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -96,9 +96,6 @@ export default {
|
|||||||
this.genderList[1].showList[number] = true
|
this.genderList[1].showList[number] = true
|
||||||
}
|
}
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
console.log('index',index)
|
|
||||||
console.log('number',number)
|
|
||||||
console.log('this.genderList',this.genderList)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,7 +175,6 @@ export default {
|
|||||||
.icon{
|
.icon{
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
background: #1E80FF;
|
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,7 +226,8 @@ export default {
|
|||||||
border-radius:2px 0 0 2px;
|
border-radius:2px 0 0 2px;
|
||||||
.text{
|
.text{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding: 0 5px;
|
width: 130px;
|
||||||
|
height: 26px;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
left: 50px;top: -25px;
|
left: 50px;top: -25px;
|
||||||
background: rgba(0,0,0,0.6);
|
background: rgba(0,0,0,0.6);
|
||||||
|
|||||||
@ -26,8 +26,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<canvas v-if="!customerSecondPath" class="sexRatio" canvas-id="gender" id="gender"/>
|
<canvas class="sexRatio" canvas-id="gender" id="gender" @tap="tap"/>
|
||||||
<image class="sexRatio" v-if="customerSecondPath" :src="customerSecondPath"></image>
|
<!-- <image class="sexRatio" v-if="customerSecondPath" :src="customerSecondPath"></image>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -63,6 +63,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
tap(e){
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
|
},
|
||||||
handleShow(num){
|
handleShow(num){
|
||||||
let list = []
|
let list = []
|
||||||
this.genderList.forEach(()=>{
|
this.genderList.forEach(()=>{
|
||||||
@ -89,7 +92,7 @@ export default {
|
|||||||
type: "bubble",
|
type: "bubble",
|
||||||
context: ctx,
|
context: ctx,
|
||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 183,
|
height: 240,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: false,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
@ -109,13 +112,13 @@ export default {
|
|||||||
xAxis: {
|
xAxis: {
|
||||||
disableGrid: true,
|
disableGrid: true,
|
||||||
gridType: "solid",
|
gridType: "solid",
|
||||||
splitNumber:4,
|
splitNumber: 5,
|
||||||
boundaryGap: "justify",
|
boundaryGap: "justify",
|
||||||
title:'年龄: /岁',
|
title:'年龄: /岁',
|
||||||
titleOffsetY: 15,
|
titleOffsetY: 15,
|
||||||
titleOffsetX: -30,
|
titleOffsetX: -30,
|
||||||
min: 0,
|
min: 10,
|
||||||
max: 80,
|
max: 60,
|
||||||
axisLineColor:'#F2F2F5'
|
axisLineColor:'#F2F2F5'
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
@ -144,7 +147,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout( ()=>{
|
setTimeout( ()=>{
|
||||||
this.canvasToTempImage('gender')
|
// this.canvasToTempImage('gender')
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
canvasToTempImage(id){
|
canvasToTempImage(id){
|
||||||
@ -276,7 +279,7 @@ export default {
|
|||||||
.charts{
|
.charts{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 180px;
|
height: 220px;
|
||||||
.sexRatio{
|
.sexRatio{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="moneyCompare">
|
<div class="moneyCompare">
|
||||||
<canvas v-if="!comparePath" class="compare" canvas-id="compare" id="compare"/>
|
<canvas class="compare" canvas-id="compare" id="compare" @tap="tap"/>
|
||||||
<image v-if="comparePath" class="compare" :src="comparePath"></image>
|
<!-- <image v-if="comparePath" class="compare" :src="comparePath"></image>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -25,6 +25,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('营收对比value',value)
|
||||||
this.comparePath = ''
|
this.comparePath = ''
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
@ -33,40 +34,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tap(e){
|
||||||
|
uChartsInstance[e.target.id].showToolTip(e, {
|
||||||
|
formatter: (item, category, index, opts) => {
|
||||||
|
return item.name + ":" + item.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
console.log('value1',value)
|
|
||||||
let res = value
|
let res = value
|
||||||
let config = {
|
this.drawCharts('compare', res)
|
||||||
price:'',
|
|
||||||
max:0
|
|
||||||
}
|
|
||||||
if (value.type===0){
|
|
||||||
config.price = '单位: 万元'
|
|
||||||
config.max = this.getNumberHundred(value.max)
|
|
||||||
}else if(value.type===1){
|
|
||||||
config.price = '单位: 笔'
|
|
||||||
config.max = this.getNumber(value.max)
|
|
||||||
}else if(value.type===2){
|
|
||||||
config.price = '单位: 元'
|
|
||||||
config.max = this.getNumber(value.max)
|
|
||||||
}
|
|
||||||
console.log('config',config)
|
|
||||||
this.drawCharts('compare', res,config)
|
|
||||||
},
|
},
|
||||||
getNumber(value){
|
drawCharts(id, data) {
|
||||||
let number = Number(value) / 20
|
|
||||||
number = Math.ceil(number)
|
|
||||||
console.log('number',number)
|
|
||||||
return number * 20
|
|
||||||
},
|
|
||||||
getNumberHundred(value){
|
|
||||||
let number = Number(value) / 2000
|
|
||||||
number = Math.ceil(number)
|
|
||||||
console.log(number)
|
|
||||||
return number * 2000
|
|
||||||
},
|
|
||||||
drawCharts(id, data,config) {
|
|
||||||
const ctx = uni.createCanvasContext(id, this);
|
const ctx = uni.createCanvasContext(id, this);
|
||||||
let _this = this
|
let _this = this
|
||||||
let phoneInfo = uni.getStorageSync('phoneInfo')
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
@ -94,19 +75,20 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
disableGrid: true
|
disableGrid: true,
|
||||||
|
axisLineColor:'#F2F2F5'
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
showTitle:true,
|
showTitle:false,
|
||||||
splitNumber:4,
|
splitNumber:4,
|
||||||
|
gridColor:'#F2F2F5',
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
min: 0,
|
min: 0,
|
||||||
max: config.max,
|
|
||||||
title: config.price,
|
|
||||||
titleOffsetX:15,
|
titleOffsetX:15,
|
||||||
titleOffsetY:-5,
|
titleOffsetY:-5,
|
||||||
fontSize:12,
|
fontSize:12,
|
||||||
|
axisLineColor:'#F2F2F5'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -122,7 +104,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout( ()=>{
|
setTimeout( ()=>{
|
||||||
this.canvasToTempImage('compare')
|
// this.canvasToTempImage('compare')
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
canvasToTempImage(id){
|
canvasToTempImage(id){
|
||||||
|
|||||||
@ -47,7 +47,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="revenueTrends">
|
<div class="revenueTrends">
|
||||||
<canvas v-if="!trendsPath" class="trends" canvas-id="trends" id="trends"/>
|
<canvas class="trends" canvas-id="trends" id="trends" @tap="handleTap"/>
|
||||||
<image v-if="trendsPath" class="trends" :src="trendsPath"></image>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -24,13 +23,32 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
this.trendsPath = ''
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleTap(e){
|
||||||
|
console.log('e',e)
|
||||||
|
uChartsInstance[e.target.id].showToolTip(e,{
|
||||||
|
formatter: (item, category, index, opts) => {
|
||||||
|
const date = new Date()
|
||||||
|
let month = date.getMonth() + 1
|
||||||
|
if (item.name === '今年'){
|
||||||
|
if (index + 1 <= month){
|
||||||
|
return item.name + ":" + item.data + ',' + `同比增长${((opts.series[0].data[index] - opts.series[1].data[index]) /opts.series[1].data[index] * 100).toFixed(2)}%`;
|
||||||
|
}else{
|
||||||
|
return item.name + ":" + item.data
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return item.name + ":" + item.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
let res = value
|
let res = value
|
||||||
@ -39,7 +57,6 @@ export default {
|
|||||||
getNumber(value){
|
getNumber(value){
|
||||||
let number = value / 40
|
let number = value / 40
|
||||||
number = Math.ceil(number)
|
number = Math.ceil(number)
|
||||||
console.log(number)
|
|
||||||
return number * 40
|
return number * 40
|
||||||
},
|
},
|
||||||
drawCharts(id, data) {
|
drawCharts(id, data) {
|
||||||
@ -58,12 +75,12 @@ export default {
|
|||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
color: ["#1E80FF"],
|
color: ["#1E80FF","#00B6FF"],
|
||||||
padding: [15, 15, 5, 5],
|
padding: [15, 15, 5, 5],
|
||||||
dataLabel: false,
|
dataLabel: false,
|
||||||
enableScroll: false,
|
enableScroll: false,
|
||||||
legend: {
|
legend: {
|
||||||
show: false,
|
show: true,
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
lineHeight: 25,
|
lineHeight: 25,
|
||||||
float: 'center'
|
float: 'center'
|
||||||
@ -71,21 +88,20 @@ export default {
|
|||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
disableGrid: true,
|
disableGrid: true,
|
||||||
axisLineColor:'#F2F2F5'
|
axisLineColor:'#F2F2F5'
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
splitNumber:4,
|
splitNumber:4,
|
||||||
showTitle:true,
|
showTitle:false,
|
||||||
gridColor:'#F2F2F5',
|
gridColor:'#F2F2F5',
|
||||||
data:[
|
data:[
|
||||||
{
|
{
|
||||||
min:0,
|
min:0,
|
||||||
max:_this.getNumber(data.max),
|
max:_this.getNumber(data.max),
|
||||||
title:'单位: 万',
|
|
||||||
titleOffsetY:-5,
|
titleOffsetY:-5,
|
||||||
titleOffsetX:-5,
|
titleOffsetX:-5,
|
||||||
fontSize:12,
|
fontSize:12,
|
||||||
axisLineColor:'#F2F2F5'
|
axisLineColor:'#F2F2F5'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -101,7 +117,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout( ()=>{
|
setTimeout( ()=>{
|
||||||
this.canvasToTempImage('trends')
|
// this.canvasToTempImage('trends')
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
canvasToTempImage(id){
|
canvasToTempImage(id){
|
||||||
|
|||||||
@ -4,25 +4,28 @@
|
|||||||
:serverpartName="serviceInfo.SERVERPART_NAME" :spregionTypeName="serviceInfo.SPREGIONTYPE_NAME" :serviceInfo="serviceInfo"/>
|
:serverpartName="serviceInfo.SERVERPART_NAME" :spregionTypeName="serviceInfo.SPREGIONTYPE_NAME" :serviceInfo="serviceInfo"/>
|
||||||
|
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="time">
|
|
||||||
<text class="thisTime">统计月份: </text>
|
|
||||||
<div class="select">
|
|
||||||
<picker mode="date" fields="month" :value="single" @change="bindDateChange" >
|
|
||||||
<view class="time">
|
|
||||||
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
|
||||||
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月客群分析</p>
|
<div style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<p class="title">{{thisMonth?thisMonth:'-'}}月客单分析</p>
|
||||||
|
<div class="item">
|
||||||
|
<text class="value">{{time}}</text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-if="customer">
|
<div v-if="customer">
|
||||||
<customer-first :analyseInfo="{analysisins_type: 1202,analysisins_format: 2000}" :data="customer" />
|
<customer-first :analyseInfo="{analysisins_type: 1202,analysisins_format: 2000}" :data="customer" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else />
|
<no-data v-else />
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
|
<div class="time">
|
||||||
|
<div class="select">
|
||||||
|
<picker mode="date" fields="month" :value="single" :end="endData" @change="bindDateChange" >
|
||||||
|
<view class="time">
|
||||||
|
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
||||||
|
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</div>
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月客群分析</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月客群分析</p>
|
||||||
<div v-if="genderBubbleList.res.length>0">
|
<div v-if="genderBubbleList.res.length>0">
|
||||||
<customer-second :data="genderBubbleList" />
|
<customer-second :data="genderBubbleList" />
|
||||||
@ -31,6 +34,7 @@
|
|||||||
<no-data v-else />
|
<no-data v-else />
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
|
</div>
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月客群消费偏好</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月客群消费偏好</p>
|
||||||
<div v-if="consterPreferList.series.length>0">
|
<div v-if="consterPreferList.series.length>0">
|
||||||
<consum-prefer :data="consterPreferList" />
|
<consum-prefer :data="consterPreferList" />
|
||||||
@ -93,6 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
single:'',//显示时间
|
single:'',//显示时间
|
||||||
thisMonth:'',//几月
|
thisMonth:'',//几月
|
||||||
|
endData:'', // 结束时间
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
@ -101,6 +106,7 @@ export default {
|
|||||||
this.serviceInfo = serviceInfo
|
this.serviceInfo = serviceInfo
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
this.time = option.time
|
||||||
|
this.endData = new Date()
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
let storeTime = uni.getStorageSync('lastDay')
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
@ -157,8 +163,6 @@ export default {
|
|||||||
},
|
},
|
||||||
//重新调一遍页面数据的方法
|
//重新调一遍页面数据的方法
|
||||||
onRefresh(){
|
onRefresh(){
|
||||||
//customer
|
|
||||||
this.getCustomer()
|
|
||||||
//客群分析男女的气泡图
|
//客群分析男女的气泡图
|
||||||
this.getGenderBubbleList()
|
this.getGenderBubbleList()
|
||||||
//客群消费偏好
|
//客群消费偏好
|
||||||
@ -338,7 +342,7 @@ export default {
|
|||||||
const data = await request.$webGet('CommercialApi/Customer/GetCustomerConsumeRatio',req)
|
const data = await request.$webGet('CommercialApi/Customer/GetCustomerConsumeRatio',req)
|
||||||
let res = []
|
let res = []
|
||||||
data.Result_Data.List.forEach(item=>{
|
data.Result_Data.List.forEach(item=>{
|
||||||
res.push({name:item.name,big:item.data[3].toFixed(2),normal:(item.data[1]+item.data[2]).toFixed(2),small:item.data[0].toFixed(2)})
|
res.push({name:item.name,big:(item.data[3]+item.data[2]).toFixed(2),normal:(item.data[1]).toFixed(2),small:item.data[0].toFixed(2)})
|
||||||
})
|
})
|
||||||
|
|
||||||
// let res=[{name:'男',big:'14.8',normal:'41.7',small:'43.5'},
|
// let res=[{name:'男',big:'14.8',normal:'41.7',small:'43.5'},
|
||||||
@ -455,6 +459,15 @@ export default {
|
|||||||
color: #160002;
|
color: #160002;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
.item{
|
||||||
|
.value{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,14 +36,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="subItem">
|
<div class="subItem">
|
||||||
<p class="title" style="margin-top: 20px">{{selectTab===0?'营收对比':selectTab===1?'客单对比':selectTab===2?'均价对比':''}}</p>
|
<div style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<p class="title" style="margin-top: 20px">{{selectTab===0?'营收对比':selectTab===1?'客单对比':selectTab===2?'均价对比':''}}</p>
|
||||||
|
<text v-if="selectTab===0" style="margin-top: 12px">单位: 元</text>
|
||||||
|
<text v-if="selectTab===1" style="margin-top: 12px">单位: 笔</text>
|
||||||
|
<text v-if="selectTab===2" style="margin-top: 12px">单位: 元</text>
|
||||||
|
</div>
|
||||||
<div v-if="moneyCompareList.series.length>0">
|
<div v-if="moneyCompareList.series.length>0">
|
||||||
<money-compare :data="moneyCompareList"/>
|
<money-compare :data="moneyCompareList"/>
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else/>
|
<no-data v-else/>
|
||||||
</div>
|
</div>
|
||||||
<div class="subItem ">
|
<div class="subItem ">
|
||||||
<p class="title" style="margin-top: 20px">营收趋势</p>
|
<div style="display: flex;align-items: center;justify-content: space-between">
|
||||||
|
<p class="title" style="margin-top: 20px">营收趋势</p>
|
||||||
|
<text style="margin-top: 12px">单位: 万元</text>
|
||||||
|
</div>
|
||||||
<div v-if="trendsList.series.length>0">
|
<div v-if="trendsList.series.length>0">
|
||||||
<revenue-trends :data="trendsList"/>
|
<revenue-trends :data="trendsList"/>
|
||||||
</div>
|
</div>
|
||||||
@ -95,7 +103,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<view class="box2">
|
<view class="box2">
|
||||||
<image class="addIcon" :src="Number(monthAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(monthAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{monthAdd?monthAdd + '%':'-'}}</p>
|
<p class="text">{{monthAdd?Math.abs(monthAdd) + '%':'-'}}</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -144,7 +152,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<div class="box2">
|
<div class="box2">
|
||||||
<image class="addIcon" :src="Number(yearAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(yearAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{yearAdd?yearAdd + '%':''}}</p>
|
<p class="text">{{yearAdd?Math.abs(yearAdd) + '%':''}}</p>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -314,9 +322,7 @@ export default {
|
|||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
latitude:seat.latitude,
|
latitude:seat.latitude,
|
||||||
}
|
}
|
||||||
console.log('req',req)
|
|
||||||
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
console.log('nearestService',data)
|
|
||||||
let res = {
|
let res = {
|
||||||
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
@ -346,7 +352,6 @@ export default {
|
|||||||
SPRegionType_ID:this.serviceInfo.SPRegionType_ID
|
SPRegionType_ID:this.serviceInfo.SPRegionType_ID
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/Contract/GetContractAnalysis',req)
|
let totalData = await request.$webGet('CommercialApi/Contract/GetContractAnalysis',req)
|
||||||
console.log('totalData123',totalData)
|
|
||||||
this.revenueList = {
|
this.revenueList = {
|
||||||
ContractProfitLoss:totalData.Result_Data.ContractProfitLoss,
|
ContractProfitLoss:totalData.Result_Data.ContractProfitLoss,
|
||||||
ShopCount:totalData.Result_Data.ShopCount,
|
ShopCount:totalData.Result_Data.ShopCount,
|
||||||
@ -381,7 +386,6 @@ export default {
|
|||||||
this.selectTab = value
|
this.selectTab = value
|
||||||
this.revenue = this.revenueAll[this.selectTab]
|
this.revenue = this.revenueAll[this.selectTab]
|
||||||
this.moneyCompareList = this.revenue.list
|
this.moneyCompareList = this.revenue.list
|
||||||
console.log('this.moneyCompareList',this.moneyCompareList)
|
|
||||||
},
|
},
|
||||||
async getMoneyCompareList(){
|
async getMoneyCompareList(){
|
||||||
let req = {
|
let req = {
|
||||||
@ -389,7 +393,6 @@ export default {
|
|||||||
ServerpartId:this.serviceInfo.Serverpart_ID
|
ServerpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
|
||||||
console.log('data123123123',data)
|
|
||||||
let RevenueAmount = [] //营收金额
|
let RevenueAmount = [] //营收金额
|
||||||
let RevenueMax = 0
|
let RevenueMax = 0
|
||||||
let TicketCountList = [] // 客单量
|
let TicketCountList = [] // 客单量
|
||||||
@ -399,7 +402,7 @@ export default {
|
|||||||
data.Result_Data.RevenueAmountList.forEach(item=>{
|
data.Result_Data.RevenueAmountList.forEach(item=>{
|
||||||
let list = []
|
let list = []
|
||||||
item.data.forEach(subItem=>{
|
item.data.forEach(subItem=>{
|
||||||
let number = (subItem[1] /10000).toFixed(0)
|
let number = (subItem[1] ).toFixed(0)
|
||||||
if (number>RevenueMax){
|
if (number>RevenueMax){
|
||||||
RevenueMax = number
|
RevenueMax = number
|
||||||
}
|
}
|
||||||
@ -409,7 +412,6 @@ export default {
|
|||||||
})
|
})
|
||||||
data.Result_Data.TicketCountList.forEach(item=>{
|
data.Result_Data.TicketCountList.forEach(item=>{
|
||||||
let list = []
|
let list = []
|
||||||
console.log('data.Result_Data.TicketCountList',data.Result_Data.TicketCountList)
|
|
||||||
item.data.forEach(subItem=>{
|
item.data.forEach(subItem=>{
|
||||||
let number = (subItem[1]).toFixed(0)
|
let number = (subItem[1]).toFixed(0)
|
||||||
if (number > TicketMax){
|
if (number > TicketMax){
|
||||||
@ -419,7 +421,6 @@ export default {
|
|||||||
})
|
})
|
||||||
TicketCountList.push({name:item.name,data:list})
|
TicketCountList.push({name:item.name,data:list})
|
||||||
})
|
})
|
||||||
console.log('TicketMax',TicketMax)
|
|
||||||
data.Result_Data.AvgTicketAmountList .forEach(item=>{
|
data.Result_Data.AvgTicketAmountList .forEach(item=>{
|
||||||
let list = []
|
let list = []
|
||||||
item.data.forEach(subItem=>{
|
item.data.forEach(subItem=>{
|
||||||
@ -465,7 +466,6 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
this.revenue = this.revenueAll[this.selectTab]
|
this.revenue = this.revenueAll[this.selectTab]
|
||||||
console.log('this.revenueAll',this.revenueAll)
|
|
||||||
// let res = {
|
// let res = {
|
||||||
// categories: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],
|
// categories: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],
|
||||||
// series: [
|
// series: [
|
||||||
@ -494,7 +494,14 @@ export default {
|
|||||||
StatisticsType:1,
|
StatisticsType:1,
|
||||||
ServerpartId:this.serviceInfo.Serverpart_ID
|
ServerpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
|
let yesReq = {
|
||||||
|
ProvinceCode:'340000',
|
||||||
|
StatisticsDate:y - 1,
|
||||||
|
StatisticsType:1,
|
||||||
|
ServerpartId:this.serviceInfo.Serverpart_ID
|
||||||
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',req)
|
||||||
|
const yesData = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',yesReq)
|
||||||
let list = []
|
let list = []
|
||||||
let max = 0
|
let max = 0
|
||||||
data.Result_Data.List.forEach(item=>{
|
data.Result_Data.List.forEach(item=>{
|
||||||
@ -504,11 +511,19 @@ export default {
|
|||||||
}
|
}
|
||||||
list.push(item.value)
|
list.push(item.value)
|
||||||
})
|
})
|
||||||
|
let yesList = []
|
||||||
|
yesData.Result_Data.List.forEach(item=>{
|
||||||
|
item.value = Number((item.value/10000).toFixed(1))
|
||||||
|
yesList.push(item.value)
|
||||||
|
})
|
||||||
let res={
|
let res={
|
||||||
categories: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],
|
categories: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],
|
||||||
series:[{
|
series:[{
|
||||||
name: "",
|
name: "今年",
|
||||||
data: list
|
data: list
|
||||||
|
},{
|
||||||
|
name: "去年",
|
||||||
|
data: yesList
|
||||||
}],
|
}],
|
||||||
max:max
|
max:max
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<view class="box2">
|
<view class="box2">
|
||||||
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{info.Growth_Rate ?info.Growth_Rate + '%':'-'}}</p>
|
<p class="text">{{info.Growth_Rate ?Math.abs(info.Growth_Rate) + '%':'-'}}</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<div class="box2">
|
<div class="box2">
|
||||||
<image class="addIcon" :src="Number(item.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(item.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{item.Growth_Rate?item.Growth_Rate + '%':''}}</p>
|
<p class="text">{{item.Growth_Rate?Math.abs(item.Growth_Rate) + '%':''}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -100,7 +100,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<view class="box2">
|
<view class="box2">
|
||||||
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{info.Growth_Rate ?info.Growth_Rate + '%':'-'}}</p>
|
<p class="text">{{info.Growth_Rate ?Math.abs(info.Growth_Rate) + '%':'-'}}</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<div class="box2">
|
<div class="box2">
|
||||||
<image class="addIcon" :src="Number(item.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(item.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{item.Growth_Rate?item.Growth_Rate + '%':''}}</p>
|
<p class="text">{{item.Growth_Rate?Math.abs(item.Growth_Rate) + '%':''}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<view class="box2">
|
<view class="box2">
|
||||||
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{info.Growth_Rate ?info.Growth_Rate + '%':'-'}}</p>
|
<p class="text">{{info.Growth_Rate ?Math.abs(info.Growth_Rate) + '%':'-'}}</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<div class="box2">
|
<div class="box2">
|
||||||
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(info.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{info.Growth_Rate?info.Growth_Rate + '%':''}}</p>
|
<p class="text">{{info.Growth_Rate?Math.abs(info.Growth_Rate) + '%':''}}</p>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -105,7 +105,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<div class="box2">
|
<div class="box2">
|
||||||
<image class="addIcon" :src="Number(item.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(item.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{item.Growth_Rate?item.Growth_Rate + '%':''}}</p>
|
<p class="text">{{item.Growth_Rate?Math.abs(item.Growth_Rate) + '%':''}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
<div class="customer-title">车辆归属地</div>
|
<div class="customer-title">车辆归属地</div>
|
||||||
<div v-if="chartdata.countChart[canvasTab] && !lodingDetail">
|
<div v-if="chartdata.countChart[canvasTab] && !lodingDetail">
|
||||||
<view class="operation-pie-content">
|
<view class="operation-pie-content">
|
||||||
<!-- <uni-ec-canvas
|
<!-- <uni-ec-canvas
|
||||||
class="operation-stock-content"
|
class="operation-stock-content"
|
||||||
id="carBelong"
|
id="carBelong"
|
||||||
ref="carBelong"
|
ref="carBelong"
|
||||||
@ -127,7 +127,7 @@
|
|||||||
if (this.chartdata.countChart[name]) {
|
if (this.chartdata.countChart[name]) {
|
||||||
// 车辆归属地
|
// 车辆归属地
|
||||||
const list = this.chartdata.countChart[name]
|
const list = this.chartdata.countChart[name]
|
||||||
|
|
||||||
this.showClounm({
|
this.showClounm({
|
||||||
id: 'carBelong',
|
id: 'carBelong',
|
||||||
data: [{
|
data: [{
|
||||||
@ -138,13 +138,13 @@
|
|||||||
textColor: '#747474',
|
textColor: '#747474',
|
||||||
textSize: uni.upx2px(20),
|
textSize: uni.upx2px(20),
|
||||||
formatter: (val) => {
|
formatter: (val) => {
|
||||||
|
|
||||||
return parseInt(val)+'辆'
|
return parseInt(val)+'辆'
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
categories: list.OwnerCity
|
categories: list.OwnerCity
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
this.showPie({
|
this.showPie({
|
||||||
id: 'carFunnel',
|
id: 'carFunnel',
|
||||||
data: list.OwnerProvinceList.map(n => {
|
data: list.OwnerProvinceList.map(n => {
|
||||||
@ -167,6 +167,8 @@
|
|||||||
data: data,
|
data: data,
|
||||||
categories: categories
|
categories: categories
|
||||||
})
|
})
|
||||||
|
console.log('data123123',data)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -221,7 +223,7 @@
|
|||||||
...params
|
...params
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
if (data.Result_Code === 100 && data.Result_Data.List.length > 0) {
|
if (data.Result_Code === 100 && data.Result_Data.List.length > 0) {
|
||||||
const [list] = data.Result_Data.List
|
const [list] = data.Result_Data.List
|
||||||
this.chartdata.countChart[type] = list
|
this.chartdata.countChart[type] = list
|
||||||
@ -235,13 +237,13 @@
|
|||||||
textColor: '#747474',
|
textColor: '#747474',
|
||||||
textSize: uni.upx2px(20),
|
textSize: uni.upx2px(20),
|
||||||
formatter: (val) => {
|
formatter: (val) => {
|
||||||
|
|
||||||
return parseInt(val)+'辆'
|
return parseInt(val)+'辆'
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
categories: list.OwnerCity
|
categories: list.OwnerCity
|
||||||
})
|
})
|
||||||
|
|
||||||
this.showPie({
|
this.showPie({
|
||||||
id: 'carFunnel',
|
id: 'carFunnel',
|
||||||
data: list.OwnerProvinceList.map(n => {
|
data: list.OwnerProvinceList.map(n => {
|
||||||
@ -274,7 +276,7 @@
|
|||||||
this.getProportion(this.canvasTab, params)
|
this.getProportion(this.canvasTab, params)
|
||||||
this.getAnalysisDesc(this.canvasTab, params)
|
this.getAnalysisDesc(this.canvasTab, params)
|
||||||
},
|
},
|
||||||
|
|
||||||
tap(e) {
|
tap(e) {
|
||||||
rincanvas[e.target.id].touchLegend(e);
|
rincanvas[e.target.id].touchLegend(e);
|
||||||
rincanvas[e.target.id].showToolTip(e);
|
rincanvas[e.target.id].showToolTip(e);
|
||||||
@ -365,7 +367,7 @@
|
|||||||
titleOffsetY: uni.upx2px(-20),
|
titleOffsetY: uni.upx2px(-20),
|
||||||
fontSize: uni.upx2px(24),
|
fontSize: uni.upx2px(24),
|
||||||
fontColor: '#777777',
|
fontColor: '#777777',
|
||||||
|
|
||||||
}],
|
}],
|
||||||
showTitle:true,
|
showTitle:true,
|
||||||
axisLineColor: "#eee",
|
axisLineColor: "#eee",
|
||||||
@ -392,6 +394,7 @@
|
|||||||
let data = {
|
let data = {
|
||||||
series: []
|
series: []
|
||||||
}
|
}
|
||||||
|
console.log('obj21123',obj)
|
||||||
const ctx = uni.createCanvasContext(obj.id, this);
|
const ctx = uni.createCanvasContext(obj.id, this);
|
||||||
data.series = data.series.concat(obj.data)
|
data.series = data.series.concat(obj.data)
|
||||||
rincanvas[obj.id] = new uCharts({
|
rincanvas[obj.id] = new uCharts({
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
|
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
|
||||||
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
|
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
|
||||||
<image class="dateIcon" src="/static/images/index/dateTime.svg"></image>
|
<image class="dateIcon" src="/static/images/index/dateTime.svg"></image>
|
||||||
<picker mode="date" :value="single" :start="startDate" :end="endData" @change="bindDateChange" >
|
<!-- <picker mode="date" :value="single" @change="bindDateChange" >-->
|
||||||
|
<picker mode="date" :value="single" :end="endData" @change="bindDateChange" >
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<text class="day">{{ thisDay }}</text>
|
<text class="day">{{ thisDay }}</text>
|
||||||
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
||||||
@ -18,7 +19,8 @@
|
|||||||
<view v-if="user.Membership_Id" >
|
<view v-if="user.Membership_Id" >
|
||||||
<view class="topTitle">
|
<view class="topTitle">
|
||||||
<p class="title">对客营收</p>
|
<p class="title">对客营收</p>
|
||||||
<span class="text">门店上传: <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</text></span>
|
<text class="smallTitle">{{plan.RevenueMonth_Amount?plan.RevenueMonth_Amount:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>
|
||||||
|
<!-- <span class="text">门店上传: <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</text></span>-->
|
||||||
</view>
|
</view>
|
||||||
<view class="box" @click="handlePage">
|
<view class="box" @click="handlePage">
|
||||||
<view class="priceBox">
|
<view class="priceBox">
|
||||||
@ -27,10 +29,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="addBox">
|
<view class="addBox">
|
||||||
<text class="smallTitle">{{thisMonth?thisMonth:'-'}}月累计:<text style="margin-left: 4px">{{plan.RevenueMonth_Amount?plan.RevenueMonth_Amount:'-'}}</text></text>
|
<!-- <text class="smallTitle">{{plan.RevenueMonth_Amount?plan.RevenueMonth_Amount:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>-->
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<image class="arrowTop" :src="Number(showTableData.compared)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/arrow_top.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/arrow_reduce.svg'"></image>
|
<image class="arrowTop" :src="Number(showTableData.compared)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<text class="text">{{showTableData.compared?showTableData.compared + '%':'-' + '%'}}</text>
|
<text class="text">{{showTableData.compared?Math.abs(showTableData.compared) + '%':'-' + '%'}}</text>
|
||||||
<text class="compare">(相比昨日)</text>
|
<text class="compare">(相比昨日)</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -77,12 +79,18 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="price">{{showTableData.TotalOffAmount?showTableData.TotalOffAmount:'-' }}</p>
|
<p class="price">{{showTableData.TotalOffAmount?showTableData.TotalOffAmount:'-' }}</p>
|
||||||
</view>
|
</view>
|
||||||
<view class="detailItem">
|
<view class="detailItem">
|
||||||
<p class="itemName">
|
<p class="itemName">
|
||||||
分润到账<text class="itemUnit">/元</text>
|
门店上传<text class="itemUnit"></text>
|
||||||
</p>
|
</p>
|
||||||
<p class="price">{{detailTypeList[1].yesterValue?detailTypeList[1].yesterValue:'-' }}</p>
|
<p class="price" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</p>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="detailItem">-->
|
||||||
|
<!-- <p class="itemName">-->
|
||||||
|
<!-- 分润到账<text class="itemUnit">/元</text>-->
|
||||||
|
<!-- </p>-->
|
||||||
|
<!-- <p class="price">{{detailTypeList[1].yesterValue?detailTypeList[1].yesterValue:'-' }}</p>-->
|
||||||
|
<!-- </view>-->
|
||||||
<view class="detailItem">
|
<view class="detailItem">
|
||||||
<p class="itemName">
|
<p class="itemName">
|
||||||
商品出售<text class="itemUnit">/件</text>
|
商品出售<text class="itemUnit">/件</text>
|
||||||
@ -142,7 +150,7 @@
|
|||||||
<p class="money" v-else>{{ item.yesterValue }}</p>
|
<p class="money" v-else>{{ item.yesterValue }}</p>
|
||||||
<view v-if="index === 0 || index === 2" class="active">
|
<view v-if="index === 0 || index === 2" class="active">
|
||||||
<image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<text v-if="Number(item.add)!==0" class="add" :style="{color:Number(item.add)<0?'#07C160':'#FA5151'}">{{ item.add>0?'+' + item.add:item.add }}</text>
|
<text v-if="Number(item.add)!==0" class="add" :style="{color:Number(item.add)<0?'#07C160':'#FA5151'}">{{ item.add?Math.abs(item.add):'' }}</text>
|
||||||
<text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>
|
<text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="otherBox" v-else>
|
<view class="otherBox" v-else>
|
||||||
@ -261,7 +269,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<view class="box2">
|
<view class="box2">
|
||||||
<image class="addIcon" :src="Number(monthAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(monthAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{monthAdd?monthAdd + '%':'-'}}</p>
|
<p class="text">{{monthAdd?Math.abs(monthAdd) + '%':'-'}}</p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -310,7 +318,7 @@
|
|||||||
<text class="comparePlan">比计划: </text>
|
<text class="comparePlan">比计划: </text>
|
||||||
<div class="box2">
|
<div class="box2">
|
||||||
<image class="addIcon" :src="Number(yearAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="addIcon" :src="Number(yearAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<p class="text">{{yearAdd?yearAdd + '%':''}}</p>
|
<p class="text">{{yearAdd?Math.abs(yearAdd) + '%':''}}</p>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -437,6 +445,7 @@ export default {
|
|||||||
monthNoticeText:'',
|
monthNoticeText:'',
|
||||||
yearNoticeText:'',
|
yearNoticeText:'',
|
||||||
thisMonth:0,//拿到当前月份
|
thisMonth:0,//拿到当前月份
|
||||||
|
isSuccess:false,//首页这些接口是否全部调用成功
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
@ -538,6 +547,16 @@ export default {
|
|||||||
this.startDate = `${y}-${m}-${d - 8}`
|
this.startDate = `${y}-${m}-${d - 8}`
|
||||||
}
|
}
|
||||||
this.endData = new Date()
|
this.endData = new Date()
|
||||||
|
|
||||||
|
setTimeout(()=>{
|
||||||
|
if (!this.isSuccess){
|
||||||
|
uni.showToast({
|
||||||
|
title: '加载失败,请下拉刷新重新加载',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},10000)
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
||||||
@ -548,6 +567,10 @@ export default {
|
|||||||
this.isShow = false
|
this.isShow = false
|
||||||
this.selectTab = 1
|
this.selectTab = 1
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh:function(){
|
||||||
|
this.getData(this.option)
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
...mapActions(['memberLogin','getLoginCode']),
|
...mapActions(['memberLogin','getLoginCode']),
|
||||||
//
|
//
|
||||||
@ -561,7 +584,7 @@ export default {
|
|||||||
//本月的
|
//本月的
|
||||||
let req = {
|
let req = {
|
||||||
SearchParameter:{
|
SearchParameter:{
|
||||||
STATISTICS_DATE:`${y}-${m}`,
|
// STATISTICS_DATE:`${y}-${m}`,
|
||||||
ANALYSISINS_TYPE:'1011',
|
ANALYSISINS_TYPE:'1011',
|
||||||
ANALYSISINS_FORMAT:'3000'
|
ANALYSISINS_FORMAT:'3000'
|
||||||
},
|
},
|
||||||
@ -581,7 +604,7 @@ export default {
|
|||||||
//本年
|
//本年
|
||||||
let reqYear = {
|
let reqYear = {
|
||||||
SearchParameter:{
|
SearchParameter:{
|
||||||
STATISTICS_DATE:`${y}`,
|
// STATISTICS_DATE:`${y}`,
|
||||||
ANALYSISINS_TYPE:'1012',
|
ANALYSISINS_TYPE:'1012',
|
||||||
ANALYSISINS_FORMAT:'3000'
|
ANALYSISINS_FORMAT:'3000'
|
||||||
},
|
},
|
||||||
@ -590,6 +613,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const totalData = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqYear)
|
const totalData = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqYear)
|
||||||
this.yearNoticeText = totalData.Result_Data.List[0].ANALYSIS_CONTENT
|
this.yearNoticeText = totalData.Result_Data.List[0].ANALYSIS_CONTENT
|
||||||
|
console.log('this.yearNoticeText ',this.yearNoticeText )
|
||||||
},
|
},
|
||||||
async nearestService(){
|
async nearestService(){
|
||||||
let seat = uni.getStorageSync('seatInfo');
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
@ -730,6 +754,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
initYesterdayData(){
|
initYesterdayData(){
|
||||||
|
let flag1 = false
|
||||||
|
let flag2 = false
|
||||||
|
let flag3 = false
|
||||||
let _this = this
|
let _this = this
|
||||||
// 传入最近的有效日期就可以拿到当前有效日期的前一天的日期
|
// 传入最近的有效日期就可以拿到当前有效日期的前一天的日期
|
||||||
let yesterday = handleYesterday(this.lastDay)
|
let yesterday = handleYesterday(this.lastDay)
|
||||||
@ -757,12 +784,13 @@ export default {
|
|||||||
})
|
})
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
_this.yesterdayAllPay = cashPay
|
_this.yesterdayAllPay = cashPay
|
||||||
|
flag1 = true
|
||||||
})
|
})
|
||||||
//昨日的分润门店
|
//昨日的分润门店
|
||||||
request.$webGet('CommercialApi/Revenue/GetMobileShare',data).then(res=>{
|
// request.$webGet('CommercialApi/Revenue/GetMobileShare',data).then(res=>{
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
this.ShareShopCountYes = res.Result_Data.ShareShop_Count
|
// this.ShareShopCountYes = res.Result_Data.ShareShop_Count
|
||||||
})
|
// })
|
||||||
|
|
||||||
const date = new Date(this.lastDay)
|
const date = new Date(this.lastDay)
|
||||||
const y = date.getFullYear()
|
const y = date.getFullYear()
|
||||||
@ -777,10 +805,10 @@ export default {
|
|||||||
StatisticsStartDate:`${y}-${m}-01`,
|
StatisticsStartDate:`${y}-${m}-01`,
|
||||||
StatisticsEndDate:this.lastDay,
|
StatisticsEndDate:this.lastDay,
|
||||||
}
|
}
|
||||||
request.$webGet('CommercialApi/Revenue/GetMobileShare',monthDate).then(res=>{
|
// request.$webGet('CommercialApi/Revenue/GetMobileShare',monthDate).then(res=>{
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
this.monthPrice = res.Result_Data.Royalty_Price
|
// this.monthPrice = res.Result_Data.Royalty_Price
|
||||||
})
|
// })
|
||||||
|
|
||||||
//这一日的订单配送
|
//这一日的订单配送
|
||||||
const todayData = {
|
const todayData = {
|
||||||
@ -795,37 +823,38 @@ export default {
|
|||||||
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
|
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
|
||||||
this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price )
|
this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price )
|
||||||
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
|
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
|
||||||
|
flag2 = true
|
||||||
})
|
})
|
||||||
|
|
||||||
//昨日的订单配送
|
// //昨日的订单配送
|
||||||
const deliveData = {
|
// const deliveData = {
|
||||||
Province_Code:'340000',
|
// Province_Code:'340000',
|
||||||
Statistics_Date: yesterday
|
// Statistics_Date: yesterday
|
||||||
}
|
// }
|
||||||
request.$webGet('CommercialApi/Revenue/GetMallDeliver',deliveData).then(res=>{
|
// request.$webGet('CommercialApi/Revenue/GetMallDeliver',deliveData).then(res=>{
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
this.yesterdayBillCount = res.Result_Data.DeliverBill_Count
|
// this.yesterdayBillCount = res.Result_Data.DeliverBill_Count
|
||||||
})
|
// })
|
||||||
//昨日采购金额
|
// //昨日采购金额
|
||||||
const buyPriceYes = {
|
// const buyPriceYes = {
|
||||||
Province_Code:'340000',
|
// Province_Code:'340000',
|
||||||
Statistics_Date: yesterday
|
// Statistics_Date: yesterday
|
||||||
}
|
// }
|
||||||
request.$webGet('CommercialApi/Revenue/GetMallDeliver',buyPriceYes).then(res=>{
|
// request.$webGet('CommercialApi/Revenue/GetMallDeliver',buyPriceYes).then(res=>{
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
this.buyPriceYes = res.Result_Data.Deliver_Price
|
// this.buyPriceYes = res.Result_Data.Deliver_Price
|
||||||
})
|
// })
|
||||||
|
|
||||||
//一个月的采购金额
|
// //一个月的采购金额
|
||||||
const buyPrice = {
|
// const buyPrice = {
|
||||||
Province_Code:'340000',
|
// Province_Code:'340000',
|
||||||
StatisticsStartDate:`${y}-${m}-01`,
|
// StatisticsStartDate:`${y}-${m}-01`,
|
||||||
StatisticsEndDate:this.lastDay
|
// StatisticsEndDate:this.lastDay
|
||||||
}
|
// }
|
||||||
request.$webGet('CommercialApi/Revenue/GetMallDeliver',buyPrice).then(res=>{
|
// request.$webGet('CommercialApi/Revenue/GetMallDeliver',buyPrice).then(res=>{
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
this.buyPriceMonth = res.Result_Data.Deliver_Price
|
// this.buyPriceMonth = res.Result_Data.Deliver_Price
|
||||||
})
|
// })
|
||||||
// 获取营收推送汇总数据
|
// 获取营收推送汇总数据
|
||||||
const allPriceData = {
|
const allPriceData = {
|
||||||
pushProvinceCode:'340000',
|
pushProvinceCode:'340000',
|
||||||
@ -833,6 +862,7 @@ export default {
|
|||||||
ShowCompareRate: true
|
ShowCompareRate: true
|
||||||
}
|
}
|
||||||
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
|
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
|
||||||
|
flag3 = true
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
let result = res.Result_Data
|
let result = res.Result_Data
|
||||||
for(let key in result){
|
for(let key in result){
|
||||||
@ -852,12 +882,15 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modelProgress = result.BusinessTypeList
|
this.modelProgress = result.BusinessTypeList
|
||||||
this.regionProgress = result.BusinessTradeList
|
this.regionProgress = result.BusinessTradeList
|
||||||
this.areaProgress = result.SPRegionList
|
this.areaProgress = result.SPRegionList
|
||||||
this.showTableData = result.RevenuePushModel
|
this.showTableData = result.RevenuePushModel
|
||||||
this.showTableData.compared = result.GrowthRate
|
this.showTableData.compared = result.GrowthRate
|
||||||
this.todayAmount()
|
if (flag1 && flag2 && flag3 ){
|
||||||
|
this.todayAmount()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
defaultMsg() {
|
defaultMsg() {
|
||||||
@ -883,12 +916,34 @@ export default {
|
|||||||
},
|
},
|
||||||
// 顶部的时间组件切换时间触发的方法
|
// 顶部的时间组件切换时间触发的方法
|
||||||
bindDateChange(e){
|
bindDateChange(e){
|
||||||
const date = new Date(e.detail.value).getTime()
|
let isOnRefresh = false
|
||||||
this.single = timestampToTime(date)
|
let startTime = new Date(this.startDate).getTime()
|
||||||
this.lastDay = e.detail.value
|
let endTime = new Date(this.lastDay).getTime() - 8 * 3600 * 1000 //结束时间戳
|
||||||
uni.setStorageSync('lastDay',this.lastDay)
|
const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000
|
||||||
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
|
let startDate = new Date(this.startDate)
|
||||||
this.onRefresh()
|
let startMonth = startDate.getMonth() + 1
|
||||||
|
let startDay = startDate.getDate()
|
||||||
|
let endDate = new Date(this.lastDay)
|
||||||
|
let endMonth = endDate.getMonth() + 1
|
||||||
|
let endDay = endDate.getDate()
|
||||||
|
if (date > endTime || date < startTime){
|
||||||
|
isOnRefresh = false
|
||||||
|
}else{
|
||||||
|
isOnRefresh = true
|
||||||
|
}
|
||||||
|
if (isOnRefresh){
|
||||||
|
this.single = timestampToTime(date)
|
||||||
|
this.lastDay = e.detail.value
|
||||||
|
uni.setStorageSync('lastDay',this.lastDay)
|
||||||
|
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
|
||||||
|
this.onRefresh()
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据`,
|
||||||
|
icon:'none',
|
||||||
|
duration:3000
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
showPie(obj) {
|
showPie(obj) {
|
||||||
let data = {
|
let data = {
|
||||||
@ -1077,6 +1132,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
this.isSuccess = true
|
||||||
_this.$forceUpdate()
|
_this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -1209,6 +1265,22 @@ $iphoneHeight: env(safe-area-inset-bottom);
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
.smallTitle{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #782717;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-right: 4px;
|
||||||
|
.month{
|
||||||
|
margin-left: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #c97e64;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes allPriceAnimation {
|
@keyframes allPriceAnimation {
|
||||||
@ -1227,8 +1299,8 @@ $iphoneHeight: env(safe-area-inset-bottom);
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
margin: 4px 0;
|
margin: 12px 0 0;
|
||||||
.allPrice {
|
.allPrice {
|
||||||
font-size: 56rpx;
|
font-size: 56rpx;
|
||||||
font-family: DINAlternate-Bold, DINAlternate;
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
@ -1250,7 +1322,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
|
|||||||
|
|
||||||
.addBox {
|
.addBox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 5px;
|
margin-top: 12px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -1258,8 +1330,17 @@ $iphoneHeight: env(safe-area-inset-bottom);
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #c97e64;
|
color: #782717;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
margin-right: 4px;
|
||||||
|
.month{
|
||||||
|
margin-left: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #c97e64;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.right{
|
.right{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -138,11 +138,11 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
//跳转到腾讯地图
|
//跳转到腾讯地图
|
||||||
handleGomap(item){
|
handleGomap(item){
|
||||||
let seat = uni.getStorageSync('currentService')
|
let seat = uni.getStorageSync('seatInfo')
|
||||||
let key='STWBZ-DKCR4-J6UUF-FRD5I-3EBN2-GDBOT'
|
let key='STWBZ-DKCR4-J6UUF-FRD5I-3EBN2-GDBOT'
|
||||||
let referer ='goMap'
|
let referer ='goMap'
|
||||||
let startPoint = {
|
let startPoint = {
|
||||||
name:seat.SERVERPART_NAME,
|
name:'我的位置',
|
||||||
latitude:seat.latitude,
|
latitude:seat.latitude,
|
||||||
longitude:seat.longitude
|
longitude:seat.longitude
|
||||||
}
|
}
|
||||||
@ -192,6 +192,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//选择服务区
|
//选择服务区
|
||||||
handleChangeService(e){
|
handleChangeService(e){
|
||||||
|
console.log('this.array',this.array)
|
||||||
this.selectIndex = Number(e.detail.value)
|
this.selectIndex = Number(e.detail.value)
|
||||||
console.log('this.selectIndex',this.selectIndex)
|
console.log('this.selectIndex',this.selectIndex)
|
||||||
this.getListData()
|
this.getListData()
|
||||||
@ -238,10 +239,10 @@ export default {
|
|||||||
async getListData(){
|
async getListData(){
|
||||||
let id
|
let id
|
||||||
let user = uni.getStorageSync('seatInfo')
|
let user = uni.getStorageSync('seatInfo')
|
||||||
if (!this.selectIndex){
|
let current = uni.getStorageSync('currentService')
|
||||||
|
let nearService = uni.getStorageSync('nearService')
|
||||||
|
if (!this.selectIndex && this.selectIndex!==0){
|
||||||
console.log('user',user.latitude)
|
console.log('user',user.latitude)
|
||||||
let current = uni.getStorageSync('currentService')
|
|
||||||
let nearService = uni.getStorageSync('nearService')
|
|
||||||
if (!current){
|
if (!current){
|
||||||
id = nearService.SPRegionType_ID
|
id = nearService.SPRegionType_ID
|
||||||
}else{
|
}else{
|
||||||
@ -261,9 +262,11 @@ export default {
|
|||||||
// id = this.array[this.selectIndex].value
|
// id = this.array[this.selectIndex].value
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
console.log('id12213123',id)
|
||||||
let req = {
|
let req = {
|
||||||
Province_Code: '340000',
|
Province_Code: '340000',
|
||||||
SPRegionType_ID: id,
|
SPRegionType_ID: id,
|
||||||
|
Serverpart_ID:current.Serverpart_ID,
|
||||||
longitude:user.longitude,
|
longitude:user.longitude,
|
||||||
latitude:user.latitude
|
latitude:user.latitude
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user