update
This commit is contained in:
parent
d29a5fc4e7
commit
99ce5e8233
@ -131,6 +131,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "serviceDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -28,7 +28,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">
|
||||||
<p class="title">业态适配型</p>
|
<p class="title">业态交易值占比</p>
|
||||||
<div v-if="businessTypeList.series[0].data.length>0">
|
<div v-if="businessTypeList.series[0].data.length>0">
|
||||||
<business-format :data="businessTypeList"/>
|
<business-format :data="businessTypeList"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1405,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1405,analysisins_format: 2000}" />
|
||||||
@ -233,17 +233,18 @@ export default {
|
|||||||
const req = {
|
const req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:this.time,
|
StatisticsDate:this.time,
|
||||||
serverpartId:this.serviceInfo.Serverpart_ID
|
serverpartId:this.serviceInfo.Serverpart_ID,
|
||||||
|
BusinessTradeIds:-1
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeRevenue',req)
|
||||||
let res = []
|
let res = []
|
||||||
let all = 0
|
let all = 0
|
||||||
data.Result_Data.BusinessTradeRank.forEach((item,index)=>{
|
data.Result_Data.BusinessTradeRank.forEach((item,index)=>{
|
||||||
if (index<=10){
|
if (index<=10){
|
||||||
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value)})
|
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value),number:Number(item.data)})
|
||||||
all+=Number(item.value)
|
all+=Number(item.value)
|
||||||
}else if(index===11){
|
}else if(index===11){
|
||||||
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2))})
|
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2)),number:Number(item.data)})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let result= {
|
let result= {
|
||||||
@ -263,32 +264,41 @@ export default {
|
|||||||
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetTransactionConvert',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetTransactionConvert',req)
|
||||||
|
console.log('data123123',data)
|
||||||
let customerOrder = []
|
let customerOrder = []
|
||||||
let customerMax = 0
|
let customerMax = 0
|
||||||
let carLit = []
|
let carLit = []
|
||||||
let carLitMax = 0
|
let carLitMax = 0
|
||||||
data.Result_Data.TransactionList.data.forEach(item=>{
|
if (data.Result_Data.TransactionList.data.length>0){
|
||||||
let index = item[0]
|
data.Result_Data.TransactionList.data.forEach((item,index)=>{
|
||||||
if (index === 0 ||index === 4 ||index === 8 ||index === 12 ||index === 16||index === 20||index === 23){
|
if (index % 2 === 1 && index!==data.Result_Data.TransactionList.data.length-1){
|
||||||
if (customerMax<item[1]){
|
|
||||||
customerMax = item[1]
|
}else{
|
||||||
|
if (customerMax<item[1]){
|
||||||
|
customerMax = item[1]
|
||||||
|
}
|
||||||
|
customerOrder.push(item[1])
|
||||||
}
|
}
|
||||||
customerOrder.push(item[1])
|
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
data.Result_Data.BayonetList.data.forEach(item=>{
|
|
||||||
let index = item[0]
|
if (data.Result_Data.BayonetList.data.length>0){
|
||||||
if (index === 0 ||index === 4 ||index === 8 ||index === 12 ||index === 16||index === 20||index === 23){
|
data.Result_Data.BayonetList.data.forEach((item,index)=>{
|
||||||
if (carLitMax<item[1]){
|
if (index % 2 === 1 && index!==data.Result_Data.BayonetList.data.length-1){
|
||||||
carLitMax = item[1]
|
|
||||||
|
}else{
|
||||||
|
if (carLitMax<item[1]){
|
||||||
|
carLitMax = item[1]
|
||||||
|
}
|
||||||
|
carLit.push(item[1])
|
||||||
}
|
}
|
||||||
carLit.push(item[1])
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
categories: ["0:00","4:00","8:00","12:00","16:00","20:00","24:00"],
|
categories: ["0:00","2:00","4:00","6:00","8:00","10:00","12:00","14:00","16:00","18:00","20:00","22:00","23:00"],
|
||||||
series:[
|
series:[
|
||||||
{
|
{
|
||||||
index:0,
|
index:0,
|
||||||
@ -304,6 +314,7 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
console.log('res',res)
|
||||||
|
|
||||||
// let res = {
|
// let res = {
|
||||||
// categories: ["0:00","4:00","8:00","12:00","16:00","20:00","24:00"],
|
// categories: ["0:00","4:00","8:00","12:00","16:00","20:00","24:00"],
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
<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">{{time}}</text>
|
<text class="value">{{time}}</text>
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车辆累计</p>
|
<p class="title">月度车流累计</p>
|
||||||
<div>
|
<div>
|
||||||
<month-total :data="monthTotalList"/>
|
<month-total :data="monthTotalList"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<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">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车辆类型占比-停留时间(日均)</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分析/日均</p>
|
||||||
<div v-if="carTypeTimeData.series.length>0">
|
<div v-if="carTypeTimeData.series.length>0">
|
||||||
<car-type-time :data="carTypeTimeData"/>
|
<car-type-time :data="carTypeTimeData"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1104,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1104,analysisins_format: 2000}" />
|
||||||
@ -95,7 +95,7 @@
|
|||||||
<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">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车车辆类型-停留时间(日均)</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分布图/日均</p>
|
||||||
|
|
||||||
<div v-if="timeAnalysisData.series.length>0">
|
<div v-if="timeAnalysisData.series.length>0">
|
||||||
<time-analysis :data="timeAnalysisData"/>
|
<time-analysis :data="timeAnalysisData"/>
|
||||||
@ -105,10 +105,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<div class="topItem" >
|
<div class="topItem" >
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月入区率占比</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车型占比</p>
|
||||||
<div class="box" v-if="allEntry">
|
<div class="box" v-if="allEntry">
|
||||||
<text class="value">{{allEntry?allEntry:'-'}}%</text>
|
<text class="value">{{allEntry?allEntry:'-'}}%</text>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
|
<text class="compare">(较上月)</text>
|
||||||
<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>
|
<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>
|
<text class="text">{{addAllEntry?Math.abs(addAllEntry) + '%':'-' + '%'}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -387,12 +388,20 @@ export default {
|
|||||||
const data = await request.$webGet('CommercialApi/BigData/GetMonthAnalysis',req)
|
const data = await request.$webGet('CommercialApi/BigData/GetMonthAnalysis',req)
|
||||||
let monthList = []
|
let monthList = []
|
||||||
let carCount = []
|
let carCount = []
|
||||||
|
let carCountMax = 0
|
||||||
let moneyCount = []
|
let moneyCount = []
|
||||||
|
let monetCountMax = 0
|
||||||
let info = []
|
let info = []
|
||||||
data.Result_Data.List.forEach(item=>{
|
data.Result_Data.List.forEach(item=>{
|
||||||
monthList.push(item.Statistics_Month + '月')
|
monthList.push(item.Statistics_Month + '月')
|
||||||
carCount.push(Number((item.Vehicle_Count / 10000).toFixed(0)))
|
if (carCountMax<item.Vehicle_Count){
|
||||||
moneyCount.push(Number((item.RevenueAmount / 10000).toFixed(0)))
|
carCountMax = item.Vehicle_Count
|
||||||
|
}
|
||||||
|
if (monetCountMax<item.RevenueAmount){
|
||||||
|
monetCountMax = item.RevenueAmount
|
||||||
|
}
|
||||||
|
carCount.push(Number((item.Vehicle_Count / 10000)))
|
||||||
|
moneyCount.push(Number((item.RevenueAmount / 10000)))
|
||||||
// showTip要展示的信息
|
// showTip要展示的信息
|
||||||
info.push({
|
info.push({
|
||||||
allCarCount : item.Vehicle_Count,
|
allCarCount : item.Vehicle_Count,
|
||||||
@ -404,8 +413,8 @@ export default {
|
|||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
categories: monthList,
|
categories: monthList,
|
||||||
series:[{name:'车流量',data:carCount,type:'column',index:0,info:info},
|
series:[{name:'车流量',data:carCount,type:'column',index:0,info:info,max:carCountMax / 10000},
|
||||||
{name:'交易金额',data:moneyCount,type:'line',index:1}]
|
{name:'交易金额',data:moneyCount,type:'line',index:1,max:monetCountMax / 10000}]
|
||||||
}
|
}
|
||||||
|
|
||||||
this.monthTotalList = res
|
this.monthTotalList = res
|
||||||
@ -485,10 +494,14 @@ export default {
|
|||||||
let series = []
|
let series = []
|
||||||
result.forEach(item=>{
|
result.forEach(item=>{
|
||||||
let stayTime = []
|
let stayTime = []
|
||||||
|
let stayTimeMax = 0
|
||||||
let carType = []
|
let carType = []
|
||||||
let valueList = []
|
let valueList = []
|
||||||
let typeAll = 0
|
let typeAll = 0
|
||||||
item.StayTimesList.forEach(subItem=>{
|
item.StayTimesList.forEach(subItem=>{
|
||||||
|
if (stayTimeMax<Number(subItem.value)){
|
||||||
|
stayTimeMax = Number(subItem.value)
|
||||||
|
}
|
||||||
stayTime.push(Number(subItem.value))
|
stayTime.push(Number(subItem.value))
|
||||||
})
|
})
|
||||||
item.VehicleCountList.forEach(subItem=>{
|
item.VehicleCountList.forEach(subItem=>{
|
||||||
@ -503,7 +516,8 @@ export default {
|
|||||||
|
|
||||||
series.push({
|
series.push({
|
||||||
index:1,
|
index:1,
|
||||||
name:'停留时间',data:stayTime
|
name:'停留时间',data:stayTime,
|
||||||
|
max:stayTimeMax
|
||||||
})
|
})
|
||||||
series.push({
|
series.push({
|
||||||
index:0,
|
index:0,
|
||||||
@ -885,7 +899,7 @@ export default {
|
|||||||
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: #a69e9f;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="businessFormat">
|
<div class="businessFormat">
|
||||||
<canvas v-if="!formatPath" class="format" canvas-id="businessFormat" id="businessFormat"/>
|
<canvas class="format" canvas-id="businessFormat" id="businessFormat" @tap="tap"/>
|
||||||
<image v-if="formatPath" class="format" :src="formatPath"></image>
|
<!-- <image v-if="formatPath" class="format" :src="formatPath"></image>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -31,6 +31,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tap(e){
|
||||||
|
uChartsInstance[e.target.id].showToolTip(e, {
|
||||||
|
formatter: (item, category, index, opts) => {
|
||||||
|
console.log('opts',opts)
|
||||||
|
console.log('index',index)
|
||||||
|
return item.name + ',客单数量 ' + opts.series[index].number + '笔'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
let res = value
|
let res = value
|
||||||
@ -51,9 +61,9 @@ export default {
|
|||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
color: ["#1E80FF", "#00C2FF","#6B6FFF","#38C275","#F3BC1B","#ED6B5A","#FF9845","#74839D","#ACB9CD","#CAD0DA"],
|
color: ["#00C2FF","#6B6FFF","#38C275","#1E80FF", "#F3BC1B","#ED6B5A","#FF9845","#74839D","#ACB9CD","#CAD0DA"],
|
||||||
padding: [5, 5, 5, 5],
|
padding: [5, 5, 5, 5],
|
||||||
dataLabel: true,
|
dataLabel: false,
|
||||||
enableScroll: false,
|
enableScroll: false,
|
||||||
title: {
|
title: {
|
||||||
name: '刚需型',
|
name: '刚需型',
|
||||||
@ -67,9 +77,9 @@ export default {
|
|||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: true,
|
show: true,
|
||||||
position: "bottom",
|
position: "right",
|
||||||
lineHeight: 25,
|
lineHeight: 25,
|
||||||
float: 'left'
|
float: 'center'
|
||||||
|
|
||||||
},
|
},
|
||||||
extra: {
|
extra: {
|
||||||
@ -86,7 +96,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout( ()=>{
|
setTimeout( ()=>{
|
||||||
this.canvasToTempImage('businessFormat')
|
// this.canvasToTempImage('businessFormat')
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
canvasToTempImage(id){
|
canvasToTempImage(id){
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="consumptionCompare">
|
<div class="consumptionCompare">
|
||||||
<canvas v-if="!consumptionPath" class="consumption" canvas-id="consumption" id="consumption"/>
|
<canvas class="consumption" canvas-id="consumption" id="consumption" @tap="tap"/>
|
||||||
<image v-if="consumptionPath" :src="consumptionPath" class="consumption"></image>
|
<!-- <image v-if="consumptionPath" :src="consumptionPath" class="consumption"></image>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -31,6 +31,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tap(e){
|
||||||
|
uChartsInstance[e.target.id].showToolTip(e, {
|
||||||
|
formatter: (item, category, index, opts) => {
|
||||||
|
console.log('item',item)
|
||||||
|
if (item.name === 'name'){
|
||||||
|
return item.name + ':'+ item.data + '笔'
|
||||||
|
}else{
|
||||||
|
return item.name + ':'+ item.data + '辆'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
console.log('value',value)
|
console.log('value',value)
|
||||||
@ -71,8 +85,12 @@ export default {
|
|||||||
disableGrid: true,
|
disableGrid: true,
|
||||||
axisLineColor:"#F2F2F5",
|
axisLineColor:"#F2F2F5",
|
||||||
formatter: (val)=>{
|
formatter: (val)=>{
|
||||||
if (val==='0:00' || val==='4:00'|| val==='8:00'|| val==='12:00'|| val==='16:00'|| val==='20:00'|| val==='24:00'){
|
if (val==='0:00' || val==='4:00'|| val==='8:00'|| val==='12:00'|| val==='16:00'|| val==='20:00'|| val==='23:00'){
|
||||||
return val
|
if (val === '23:00'){
|
||||||
|
return '24:00'
|
||||||
|
}else{
|
||||||
|
return val
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@ -99,7 +117,7 @@ export default {
|
|||||||
max:_this.getNumber(config.carLitMax),
|
max:_this.getNumber(config.carLitMax),
|
||||||
position: 'right',
|
position: 'right',
|
||||||
titleOffsetY: -5,
|
titleOffsetY: -5,
|
||||||
titleOffsetX: 5,
|
titleOffsetX: -15,
|
||||||
axisLineColor:"#F2F2F5"
|
axisLineColor:"#F2F2F5"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@ -123,7 +141,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout( ()=>{
|
setTimeout( ()=>{
|
||||||
this.canvasToTempImage('consumption')
|
// this.canvasToTempImage('consumption')
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
canvasToTempImage(id){
|
canvasToTempImage(id){
|
||||||
|
|||||||
@ -52,10 +52,10 @@ export default {
|
|||||||
formatter: (item, category, index, opts) =>{
|
formatter: (item, category, index, opts) =>{
|
||||||
if (this.num===0){
|
if (this.num===0){
|
||||||
this.num++
|
this.num++
|
||||||
return item.name + ":" + opts.series[0].valueList[index] + '辆';
|
return '日均车辆' + ":" + opts.series[0].valueList[index] + '辆';
|
||||||
}else{
|
}else{
|
||||||
this.num=0
|
this.num=0
|
||||||
return item.name + ":" + item.data + '分';
|
return '平均停留' + ":" + item.data + '分钟';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -67,9 +67,21 @@ export default {
|
|||||||
categories: value.categories,
|
categories: value.categories,
|
||||||
series: value.series
|
series: value.series
|
||||||
}
|
}
|
||||||
this.drawCharts('carTypeTime', res)
|
console.log('value21312',value)
|
||||||
|
let config = {
|
||||||
|
max:this.getSplitNumber(value.series[1].max)
|
||||||
|
}
|
||||||
|
this.drawCharts('carTypeTime', res,config)
|
||||||
},
|
},
|
||||||
drawCharts(id, data) {
|
getSplitNumber(value){
|
||||||
|
if (value === 0){
|
||||||
|
return 5
|
||||||
|
}else{
|
||||||
|
let sum = value + value *0.2
|
||||||
|
return Number((sum / 5).toFixed(0)) * 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
drawCharts(id, data,config) {
|
||||||
const ctx = uni.createCanvasContext(id, this);
|
const ctx = uni.createCanvasContext(id, this);
|
||||||
let phoneInfo = uni.getStorageSync('phoneInfo')
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
this.width = phoneInfo.screenWidth-16
|
this.width = phoneInfo.screenWidth-16
|
||||||
@ -114,7 +126,7 @@ export default {
|
|||||||
{
|
{
|
||||||
title:'单位: 分钟',
|
title:'单位: 分钟',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 150,
|
max: config.max,
|
||||||
position: 'right',
|
position: 'right',
|
||||||
titleOffsetY: -5,
|
titleOffsetY: -5,
|
||||||
titleOffsetX: 5,
|
titleOffsetX: 5,
|
||||||
|
|||||||
@ -23,6 +23,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('monthValue',value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
immediate:true,
|
immediate:true,
|
||||||
@ -35,10 +36,10 @@ export default {
|
|||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
let text = ''
|
let text = ''
|
||||||
if (item.name === '车流量'){
|
if (item.name === '车流量'){
|
||||||
text = `入区 ${opts.series[0].info[index].allCarCount} 辆, 入区率 ${opts.series[0].info[index].rate} %`
|
text = `入区 ${opts.series[0].info[index].allCarCount?opts.series[0].info[index].allCarCount:''} 辆, 入区率 ${opts.series[0].info[index].rate?opts.series[0].info[index].rate:''} %`
|
||||||
return text
|
return text
|
||||||
}else{
|
}else{
|
||||||
return `金额 ${opts.series[0].info[index].money} 元, 单车价值 ${((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2)} 元`
|
return `金额 ${opts.series[0].info[index].money?opts.series[0].info[index].money:''} 元, 单车消费 ${opts.series[0].info[index].allCarCount?((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2):''} 元`
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -50,9 +51,22 @@ export default {
|
|||||||
categories: value.categories,
|
categories: value.categories,
|
||||||
series: value.series
|
series: value.series
|
||||||
}
|
}
|
||||||
this.drawCharts('monthTotal', res)
|
let config={
|
||||||
|
carMax:this.getSplitNumber(value.series[0].max),
|
||||||
|
moneyMax:this.getSplitNumber(value.series[1].max)
|
||||||
|
}
|
||||||
|
console.log('config',config)
|
||||||
|
this.drawCharts('monthTotal', res, config)
|
||||||
},
|
},
|
||||||
drawCharts(id, data) {
|
getSplitNumber(value){
|
||||||
|
if (value === 0){
|
||||||
|
return 5
|
||||||
|
}else{
|
||||||
|
let sum = value + value *0.2
|
||||||
|
return Number((sum / 5).toFixed(0)) * 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
drawCharts(id, data,config) {
|
||||||
const ctx = uni.createCanvasContext(id, this);
|
const ctx = uni.createCanvasContext(id, this);
|
||||||
let phoneInfo = uni.getStorageSync('phoneInfo')
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
let width = phoneInfo.screenWidth-32
|
let width = phoneInfo.screenWidth-32
|
||||||
@ -89,6 +103,7 @@ export default {
|
|||||||
titleOffsetY: -5,
|
titleOffsetY: -5,
|
||||||
titleOffsetX: 15,
|
titleOffsetX: 15,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
max:config.carMax
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
position: "right",
|
position: "right",
|
||||||
@ -98,6 +113,7 @@ export default {
|
|||||||
titleOffsetY: -5,
|
titleOffsetY: -5,
|
||||||
titleOffsetX: -15,
|
titleOffsetX: -15,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
max:config.moneyMax
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
|||||||
@ -8,11 +8,11 @@
|
|||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p class="price">{{ info.TicketCount?info.TicketCount:'-' }}</p>
|
<p class="price">{{ info.TicketCount?info.TicketCount:'-' }}</p>
|
||||||
<p class="text">客单交易 <text class="unit">/笔</text></p>
|
<p class="text">入区车辆 <text class="unit">/笔</text></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p class="price">{{ info.AvgTicketPrice?info.AvgTicketPrice:'-' }}</p>
|
<p class="price">{{ info.AvgTicketPrice?info.AvgTicketPrice:'-' }}</p>
|
||||||
<p class="text">客单均价 <text class="unit">/元</text></p>
|
<p class="text">单车价值 <text class="unit">/元</text></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,13 +30,27 @@
|
|||||||
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
|
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
|
||||||
<p class="text">客单均价 <text class="unit">/元</text></p>
|
<p class="text">客单均价 <text class="unit">/元</text></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<p class="price">{{ info.TicketAvgCount?info.TicketAvgCount:'-' }}</p>
|
||||||
|
<p class="text">入区车辆 <text class="unit">/笔</text></p>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
|
||||||
|
<p class="text">单车价值 <text class="unit">/元</text></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="pro">
|
<div class="pro">
|
||||||
<div class="big" :style="{width:info.transactionLevel.HighConsumption_Rate +'%'}"></div>
|
<div class="big" :style="{width:info.transactionLevel.HighConsumption_Rate +'%'}" @click="handleShow(0)">
|
||||||
<div class="normal" :style="{width:info.transactionLevel.NormalConsumption_Rate +'%',left:info.transactionLevel.HighConsumption_Rate+'%'}"></div>
|
<view class="meng" v-if="genderList[0]">{{'高消费'}}</view>
|
||||||
<div class="small" :style="{width:info.transactionLevel.LowConsumption_Rate +'%',left:(Number(info.transactionLevel.HighConsumption_Rate) + Number(info.transactionLevel.NormalConsumption_Rate))+'%'}"></div>
|
</div>
|
||||||
|
<div class="normal" :style="{width:info.transactionLevel.NormalConsumption_Rate +'%',left:info.transactionLevel.HighConsumption_Rate+'%'}" @click="handleShow(1)">
|
||||||
|
<view class="meng" v-if="genderList[1]">{{'普通消费'}}</view>
|
||||||
|
</div>
|
||||||
|
<div class="small" @click="handleShow(2)" :style="{width:info.transactionLevel.LowConsumption_Rate +'%',left:(Number(info.transactionLevel.HighConsumption_Rate) + Number(info.transactionLevel.NormalConsumption_Rate))+'%'}">
|
||||||
|
<view class="meng" v-if="genderList[2]">{{'低消费'}}</view>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="type">
|
<div class="type">
|
||||||
<text class="item big">高消费 {{info.transactionLevel.HighConsumption_Rate?info.transactionLevel.HighConsumption_Rate:'-'}}%</text>
|
<text class="item big">高消费 {{info.transactionLevel.HighConsumption_Rate?info.transactionLevel.HighConsumption_Rate:'-'}}%</text>
|
||||||
@ -60,7 +74,8 @@ export default {
|
|||||||
NormalConsumption_Rate:0,
|
NormalConsumption_Rate:0,
|
||||||
LowConsumption_Rate:0
|
LowConsumption_Rate:0
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
genderList:[false,false,false]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -77,6 +92,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods:{
|
||||||
|
handleShow(num){
|
||||||
|
console.log(1111)
|
||||||
|
let list = []
|
||||||
|
this.genderList.forEach(()=>{
|
||||||
|
list.push(false)
|
||||||
|
})
|
||||||
|
this.genderList = list
|
||||||
|
this.genderList[num] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -109,10 +135,13 @@ export default {
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-flow: wrap;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.item{
|
.item{
|
||||||
width:50%;
|
width:50%;
|
||||||
padding-left: 26px;
|
padding-left: 26px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 12px;
|
||||||
.price{
|
.price{
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: DINAlternate-Bold, DINAlternate;
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
@ -154,18 +183,60 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: #1E80FF;
|
background: #1E80FF;
|
||||||
border-radius: 2px 0 0 2px;
|
border-radius: 2px 0 0 2px;
|
||||||
|
.meng{
|
||||||
|
width: 70px;
|
||||||
|
height: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 5px;
|
||||||
|
z-index: 9;
|
||||||
|
left: 0;top: -20px;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
color:#fff;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.normal{
|
.normal{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #ACB9CD;
|
background: #ACB9CD;
|
||||||
border-radius: 2px 0 0 2px;
|
border-radius: 2px 0 0 2px;
|
||||||
|
.meng{
|
||||||
|
width: 70px;
|
||||||
|
height: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 5px;
|
||||||
|
z-index: 9;
|
||||||
|
right: 0;top: -20px;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
color:#fff;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.small{
|
.small{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #CAD0DA;
|
background: #CAD0DA;
|
||||||
border-radius: 2px 0 0 2px;
|
border-radius: 2px 0 0 2px;
|
||||||
|
.meng{
|
||||||
|
width: 70px;
|
||||||
|
height: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 5px;
|
||||||
|
z-index: 9;
|
||||||
|
right: 0;top: -20px;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
color:#fff;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.type{
|
.type{
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export default {
|
|||||||
woman:0,
|
woman:0,
|
||||||
width:0,//手机宽度
|
width:0,//手机宽度
|
||||||
customerSecondPath:'',//路径
|
customerSecondPath:'',//路径
|
||||||
genderList:[false,false],
|
genderList:[false,false],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@ -13,7 +13,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
width:0,
|
width:0,
|
||||||
comparePath:''
|
comparePath:'',
|
||||||
|
dataList: [],
|
||||||
|
selectIndex:0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -27,6 +29,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('营收对比value',value)
|
console.log('营收对比value',value)
|
||||||
this.comparePath = ''
|
this.comparePath = ''
|
||||||
|
this.dataList = value
|
||||||
|
this.selectIndex = value.type
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@ -35,9 +39,21 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tap(e){
|
tap(e){
|
||||||
|
console.log('dataList',this.dataList)
|
||||||
uChartsInstance[e.target.id].showToolTip(e, {
|
uChartsInstance[e.target.id].showToolTip(e, {
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
return item.name + ":" + item.data;
|
return item.name + ":" + item.data + '万元'
|
||||||
|
// if (this.selectIndex===0){
|
||||||
|
// if (item.name === '平日平均'){
|
||||||
|
// return item.name + ":" + this.dataList.normal[0].data[index] + '元';
|
||||||
|
// }else if(item.name === '周末平均'){
|
||||||
|
// return item.name + ":" + this.dataList.normal[1].data[index] + '元';
|
||||||
|
// }else if(item.name === '节假日平均'){
|
||||||
|
// return item.name + ":" + this.dataList.normal[2].data[index] + '元';
|
||||||
|
// }
|
||||||
|
// } else{
|
||||||
|
// return item.name + ":" + item.data
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
uChartsInstance[e.target.id].touchLegend(e);
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
@ -45,9 +61,21 @@ export default {
|
|||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
let res = value
|
let res = value
|
||||||
this.drawCharts('compare', res)
|
let config = {
|
||||||
|
max:this.getSplitNumber(value.max)
|
||||||
|
}
|
||||||
|
console.log('value2222222',value)
|
||||||
|
this.drawCharts('compare', res,config)
|
||||||
},
|
},
|
||||||
drawCharts(id, data) {
|
getSplitNumber(value){
|
||||||
|
if (value === 0){
|
||||||
|
return 5
|
||||||
|
}else{
|
||||||
|
let sum = value + value *0.2
|
||||||
|
return Number((sum / 4).toFixed(0)) * 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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')
|
||||||
@ -90,7 +118,9 @@ export default {
|
|||||||
fontSize:12,
|
fontSize:12,
|
||||||
axisLineColor:'#F2F2F5'
|
axisLineColor:'#F2F2F5'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
min:0,
|
||||||
|
max:config.max
|
||||||
},
|
},
|
||||||
extra: {
|
extra: {
|
||||||
column: {
|
column: {
|
||||||
|
|||||||
@ -3,29 +3,29 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/agreement.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/agreement.svg"></image>
|
||||||
<div class="info" style="margin-bottom: 24px;">
|
<div class="info" style="margin-bottom: 24px;">
|
||||||
<p class="title">合同盈亏<text class="unit">/元</text></p>
|
<p class="title">合同总金额<text class="unit">/万元</text></p>
|
||||||
<p class="value">-1,743,567,98</p>
|
<p class="value">{{dataInfo.ContractProfitLoss}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" style="margin-bottom: 24px;">
|
<div class="item" style="margin-bottom: 24px;">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/shopNumber.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/shopNumber.svg"></image>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p class="title">店铺数量<text class="unit">/个</text></p>
|
<p class="title">店铺数量<text class="unit">/个</text></p>
|
||||||
<p class="value">28</p>
|
<p class="value">{{dataInfo.ShopCount}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/add.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/add.svg"></image>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p class="title">2022日均坪效<text class="unit">/元</text></p>
|
<p class="title">欠款金额<text class="unit">/万元</text></p>
|
||||||
<p class="value">2786.00</p>
|
<p class="value">{{dataInfo.SalesPerSquareMeter}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/overShop.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/overShop.svg"></image>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p class="title">半年内到期门店<text class="unit">/个</text></p>
|
<p class="title">半年到期合同<text class="unit">/个</text></p>
|
||||||
<p class="value">6</p>
|
<p class="value">{{dataInfo.ExpiredShopCount}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -36,18 +36,19 @@ export default {
|
|||||||
name: "revenueAnalysis",
|
name: "revenueAnalysis",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataInfo:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Object,
|
||||||
default: () => []
|
default: () => {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
this.handleCarData(value)
|
this.dataInfo = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</div>
|
</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" />
|
||||||
<analyse :analyseInfo="{analysisins_type: 1203,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1203,analysisins_format: 2000}" />
|
||||||
@ -51,7 +51,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">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月业态消费偏好</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月业态客单偏好</p>
|
||||||
<div v-if="businessTypeList.length>0">
|
<div v-if="businessTypeList.length>0">
|
||||||
<business-type :data="businessTypeList"></business-type>
|
<business-type :data="businessTypeList"></business-type>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1206,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1206,analysisins_format: 2000}" />
|
||||||
|
|||||||
@ -37,8 +37,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="subItem">
|
<div class="subItem">
|
||||||
<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" style="margin-top: 20px">{{selectTab===0?'营收对比':selectTab===1?'客单对比':selectTab===2?'均价对比':''}}</p>
|
<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===0" style="margin-top: 12px">单位: 万元</text>
|
||||||
<text v-if="selectTab===1" 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>
|
<text v-if="selectTab===2" style="margin-top: 12px">单位: 元</text>
|
||||||
</div>
|
</div>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="subItem ">
|
<div class="subItem ">
|
||||||
<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" style="margin-top: 20px">营收趋势</p>
|
<p class="title" style="margin-top: 20px">营收同比分析</p>
|
||||||
<text style="margin-top: 12px">单位: 万元</text>
|
<text style="margin-top: 12px">单位: 万元</text>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="trendsList.series.length>0">
|
<div v-if="trendsList.series.length>0">
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<analyse :analyseInfo="{analysisins_type: selectTab===0?1305:selectTab===1?1306:selectTab===2?1307:'',analysisins_format: 2000}"/>
|
<analyse :analyseInfo="{analysisins_type: selectTab===0?1305:selectTab===1?1306:selectTab===2?1307:'',analysisins_format: 2000}"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">营收占比</p>
|
<p class="title">{{month}}月营收类型比例</p>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
@ -88,7 +88,7 @@
|
|||||||
<div v-if="showNotice" class="titleTopNotice">{{monthNoticeText}}</div>
|
<div v-if="showNotice" class="titleTopNotice">{{monthNoticeText}}</div>
|
||||||
<div v-if="showNotice" class="meng" @click.stop="handleNoShowNotice"></div>
|
<div v-if="showNotice" class="meng" @click.stop="handleNoShowNotice"></div>
|
||||||
</div>
|
</div>
|
||||||
<view class="box">
|
<view class="box" @click="handleGoServiceInfo('month')">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="big">
|
<view class="big">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/thisMonth.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/thisMonth.svg"></image>
|
||||||
@ -137,7 +137,7 @@
|
|||||||
<div v-if="showNoticeYear" class="titleTopNotice">{{yearNoticeText}}</div>
|
<div v-if="showNoticeYear" class="titleTopNotice">{{yearNoticeText}}</div>
|
||||||
<div v-if="showNoticeYear" class="meng" @click.stop="handleNoShowNoticeYear"></div>
|
<div v-if="showNoticeYear" class="meng" @click.stop="handleNoShowNoticeYear"></div>
|
||||||
</div>
|
</div>
|
||||||
<view class="box">
|
<view class="box" @click="handleGoServiceInfo('year')">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="big">
|
<view class="big">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/planYear.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/planYear.svg"></image>
|
||||||
@ -223,9 +223,10 @@ export default {
|
|||||||
analyseInfo:{
|
analyseInfo:{
|
||||||
analysisins_type: 1301
|
analysisins_type: 1301
|
||||||
},
|
},
|
||||||
monthNoticeText:'',
|
monthNoticeText:'',
|
||||||
yearNoticeText:'',
|
yearNoticeText:'',
|
||||||
lastDay:''
|
lastDay:'',
|
||||||
|
month:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@ -241,6 +242,12 @@ export default {
|
|||||||
if (storeTime){
|
if (storeTime){
|
||||||
this.time = storeTime
|
this.time = storeTime
|
||||||
}
|
}
|
||||||
|
let date = new Date(this.time)
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
if (m<10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
this.month = m
|
||||||
let storeServiceInfo = uni.getStorageSync('currentService')
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
if (storeServiceInfo){
|
if (storeServiceInfo){
|
||||||
this.serviceInfo = storeServiceInfo
|
this.serviceInfo = storeServiceInfo
|
||||||
@ -273,6 +280,53 @@ export default {
|
|||||||
this.handleNoticeYear()
|
this.handleNoticeYear()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 拿到服务区详情页需要的数据 然后带着跳转过去
|
||||||
|
handleGoServiceInfo(type){
|
||||||
|
let serviceInfo = this.serviceInfo
|
||||||
|
|
||||||
|
let num = serviceInfo.SERVERPART_NAME.indexOf('服务区')
|
||||||
|
console.log(num)
|
||||||
|
if (num!==-1){
|
||||||
|
serviceInfo.name = serviceInfo.SERVERPART_NAME.slice(0,num)
|
||||||
|
serviceInfo.unit = serviceInfo.SERVERPART_NAME.slice(num,100)
|
||||||
|
}else{
|
||||||
|
serviceInfo.name = serviceInfo.SERVERPART_NAME
|
||||||
|
}
|
||||||
|
console.log('this.plan',this.plan)
|
||||||
|
if (type==='month'){
|
||||||
|
let service = {
|
||||||
|
Budget_Amount:this.plan.BudgetMonth_Amount,
|
||||||
|
Budget_Degree:this.plan.MonthBudget_Degree,
|
||||||
|
Growth_Rate:this.plan.MonthGrowth_Rate,
|
||||||
|
Revenue_Amount:this.plan.RevenueMonth_Amount,
|
||||||
|
Serverpart_ID:serviceInfo.Serverpart_ID,
|
||||||
|
Serverpart_Name:serviceInfo.SERVERPART_NAME,
|
||||||
|
name:serviceInfo.name,
|
||||||
|
unit:serviceInfo.unit
|
||||||
|
}
|
||||||
|
const date = new Date(this.time)
|
||||||
|
let month = date.getMonth() + 1
|
||||||
|
console.log('service',service)
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&month=${month}&type=month`
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
let service = {
|
||||||
|
Budget_Amount:this.plan.BudgetYear_Amount,
|
||||||
|
Budget_Degree:this.plan.YearBudget_Degree,
|
||||||
|
Growth_Rate:this.yearAdd,
|
||||||
|
Revenue_Amount:this.plan.RevenueYear_Amount,
|
||||||
|
Serverpart_ID:serviceInfo.Serverpart_ID,
|
||||||
|
Serverpart_Name:serviceInfo.SERVERPART_NAME,
|
||||||
|
name:serviceInfo.name,
|
||||||
|
unit:serviceInfo.unit
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&type=year`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
async handleNoticeMonth(){
|
async handleNoticeMonth(){
|
||||||
let date = new Date(this.lastDay)
|
let date = new Date(this.lastDay)
|
||||||
let y = date.getFullYear()
|
let y = date.getFullYear()
|
||||||
@ -394,6 +448,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
|
||||||
let RevenueAmount = [] //营收金额
|
let RevenueAmount = [] //营收金额
|
||||||
|
let normalAmount = [] //不除以10000的金额
|
||||||
let RevenueMax = 0
|
let RevenueMax = 0
|
||||||
let TicketCountList = [] // 客单量
|
let TicketCountList = [] // 客单量
|
||||||
let TicketMax = 0
|
let TicketMax = 0
|
||||||
@ -401,13 +456,16 @@ export default {
|
|||||||
let AvgTicketMax = 0
|
let AvgTicketMax = 0
|
||||||
data.Result_Data.RevenueAmountList.forEach(item=>{
|
data.Result_Data.RevenueAmountList.forEach(item=>{
|
||||||
let list = []
|
let list = []
|
||||||
|
let listNormal = []
|
||||||
item.data.forEach(subItem=>{
|
item.data.forEach(subItem=>{
|
||||||
let number = (subItem[1] ).toFixed(0)
|
let number = (subItem[1] / 10000 ).toFixed(2)
|
||||||
if (number>RevenueMax){
|
if (number>RevenueMax){
|
||||||
RevenueMax = number
|
RevenueMax = number
|
||||||
}
|
}
|
||||||
list.push(number)
|
list.push(number)
|
||||||
|
listNormal.push(subItem[1])
|
||||||
})
|
})
|
||||||
|
normalAmount.push({name:item.name,data:listNormal})
|
||||||
RevenueAmount.push({name:item.name,data:list})
|
RevenueAmount.push({name:item.name,data:list})
|
||||||
})
|
})
|
||||||
data.Result_Data.TicketCountList.forEach(item=>{
|
data.Result_Data.TicketCountList.forEach(item=>{
|
||||||
@ -440,6 +498,7 @@ export default {
|
|||||||
list:{
|
list:{
|
||||||
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: RevenueAmount,
|
series: RevenueAmount,
|
||||||
|
normal:normalAmount,
|
||||||
max:RevenueMax,
|
max:RevenueMax,
|
||||||
type:0
|
type:0
|
||||||
},
|
},
|
||||||
|
|||||||
@ -121,7 +121,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
<div class="list" v-for="(item,index) in dataList" :key="index">
|
<div class="list" v-for="(item,index) in dataList" :key="index" @click="handleToServiceDetail(item)">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<p class="title" ><text class="name">{{item.name}}</text>{{item.unit}}</p>
|
<p class="title" ><text class="name">{{item.name}}</text>{{item.unit}}</p>
|
||||||
@ -189,7 +189,6 @@ export default {
|
|||||||
// 拿到传入的月份
|
// 拿到传入的月份
|
||||||
this.month = Number(option.month)
|
this.month = Number(option.month)
|
||||||
// 取全局的时间
|
// 取全局的时间
|
||||||
console.log('this.lastDay',this.lastDay)
|
|
||||||
let date = new Date(this.lastDay)
|
let date = new Date(this.lastDay)
|
||||||
let y = date.getFullYear()
|
let y = date.getFullYear()
|
||||||
let m = date.getMonth() + 1
|
let m = date.getMonth() + 1
|
||||||
@ -200,12 +199,10 @@ export default {
|
|||||||
if (d<10){
|
if (d<10){
|
||||||
d = '0' + d
|
d = '0' + d
|
||||||
}
|
}
|
||||||
console.log('d',d)
|
|
||||||
// 判断如果是当前月份的话 就拿到当前时间,不是当前月份的话 就拿那个月的最后一天
|
// 判断如果是当前月份的话 就拿到当前时间,不是当前月份的话 就拿那个月的最后一天
|
||||||
if (option.month){
|
if (option.month){
|
||||||
if (Number(m) === Number(option.month)){
|
if (Number(m) === Number(option.month)){
|
||||||
this.date = `${y}-${m}-${d}`
|
this.date = `${y}-${m}-${d}`
|
||||||
console.log('this.date',this.date)
|
|
||||||
}else{
|
}else{
|
||||||
let month
|
let month
|
||||||
if (this.month<10){
|
if (this.month<10){
|
||||||
@ -215,13 +212,10 @@ export default {
|
|||||||
}
|
}
|
||||||
//月份不是当前月
|
//月份不是当前月
|
||||||
let mayDate = `${y}-${month}`
|
let mayDate = `${y}-${month}`
|
||||||
console.log('mayDate',mayDate)
|
|
||||||
let addDay = this.$util.getThisMonthDay(mayDate)
|
let addDay = this.$util.getThisMonthDay(mayDate)
|
||||||
console.log('addDay',addDay)
|
|
||||||
this.date = `${mayDate}-${addDay}`
|
this.date = `${mayDate}-${addDay}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('this.date',this.date)
|
|
||||||
// 直接把上一个页面点进的片区属性全部拿来
|
// 直接把上一个页面点进的片区属性全部拿来
|
||||||
if (option.item){
|
if (option.item){
|
||||||
this.item = JSON.parse(option.item)
|
this.item = JSON.parse(option.item)
|
||||||
@ -256,6 +250,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 跳转到服务区详情
|
||||||
|
handleToServiceDetail(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(item)}&month=${this.month?this.month:''}&type=month&select=true`
|
||||||
|
})
|
||||||
|
},
|
||||||
async getDateSecond(){
|
async getDateSecond(){
|
||||||
let req = {
|
let req = {
|
||||||
StatisticsDate:this.date,
|
StatisticsDate:this.date,
|
||||||
@ -266,7 +266,6 @@ export default {
|
|||||||
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
|
||||||
data.Result_Data.RegionBudgetList.forEach(item=>{
|
data.Result_Data.RegionBudgetList.forEach(item=>{
|
||||||
let num = item.Serverpart_Name.indexOf('服务区')
|
let num = item.Serverpart_Name.indexOf('服务区')
|
||||||
console.log(num)
|
|
||||||
if (num!==-1){
|
if (num!==-1){
|
||||||
item.name = item.Serverpart_Name.slice(0,num)
|
item.name = item.Serverpart_Name.slice(0,num)
|
||||||
item.unit = item.Serverpart_Name.slice(num,100)
|
item.unit = item.Serverpart_Name.slice(num,100)
|
||||||
@ -317,7 +316,6 @@ export default {
|
|||||||
PageSize:10
|
PageSize:10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('req222',req)
|
|
||||||
const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
|
const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
|
||||||
this.monthText = data.Result_Data.List[0].ANALYSIS_CONTENT
|
this.monthText = data.Result_Data.List[0].ANALYSIS_CONTENT
|
||||||
this.itemText = data.Result_Data.List[0].ANALYSIS_CONTENT
|
this.itemText = data.Result_Data.List[0].ANALYSIS_CONTENT
|
||||||
@ -341,11 +339,9 @@ export default {
|
|||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsType:1
|
StatisticsType:1
|
||||||
}
|
}
|
||||||
console.log('req111',req)
|
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
|
||||||
data.Result_Data.RegionBudgetList.forEach(item=>{
|
data.Result_Data.RegionBudgetList.forEach(item=>{
|
||||||
let num = item.Serverpart_Name.indexOf('片区')
|
let num = item.Serverpart_Name.indexOf('片区')
|
||||||
console.log(num)
|
|
||||||
if (num!==-1){
|
if (num!==-1){
|
||||||
item.name = item.Serverpart_Name.slice(0,num)
|
item.name = item.Serverpart_Name.slice(0,num)
|
||||||
item.unit = item.Serverpart_Name.slice(num,100)
|
item.unit = item.Serverpart_Name.slice(num,100)
|
||||||
|
|||||||
944
pages/commercialBI/serviceDetail.vue
Normal file
944
pages/commercialBI/serviceDetail.vue
Normal file
@ -0,0 +1,944 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<div class="top">
|
||||||
|
<p class="title" v-if="type==='month'">{{serviceInfo.name}}服务区自营计划</p>
|
||||||
|
<p class="title" v-if="type==='year'">{{serviceInfo.name}}服务区年度自营计划</p>
|
||||||
|
<div class="select" v-if="isSelect && optionTime===''">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<view class="box" v-if="type==='month'">
|
||||||
|
<view class="top">
|
||||||
|
<view class="big">
|
||||||
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/thisMonth.svg"></image>
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
<view class="textTop">
|
||||||
|
<view class="left">
|
||||||
|
<p class="number">{{serviceInfo.Budget_Degree?serviceInfo.Budget_Degree + '%':'-'}}</p>
|
||||||
|
<p v-if="serviceInfo.Budget_Degree>=100" class="desc"><image class="success" src="/static/images/index/successMonth.svg"></image></p>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<text class="comparePlan">比计划: </text>
|
||||||
|
<view class="box2">
|
||||||
|
<image class="addIcon" :src="Number(serviceInfo.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">{{serviceInfo.Growth_Rate ?Math.abs(serviceInfo.Growth_Rate) + '%':'-'}}</p>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<div class="progressPlan">
|
||||||
|
<div class="trans" :style="{width:serviceInfo.Budget_Degree > 100 ? '100%' : serviceInfo.Budget_Degree + '%'}"></div>
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="success" style="margin-right: 39px">
|
||||||
|
<p class="text">本月已完成<text class="unit">/元</text></p>
|
||||||
|
<p class="money">{{serviceInfo.Revenue_Amount ?serviceInfo.Revenue_Amount :'-'}}</p>
|
||||||
|
</view>
|
||||||
|
<view class="success">
|
||||||
|
<p class="text">本月计划<text class="unit">/元</text></p>
|
||||||
|
<p class="money">{{serviceInfo.Budget_Amount ?serviceInfo.Budget_Amount :'-'}}</p>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="box" v-if="type==='year'">
|
||||||
|
<view class="top">
|
||||||
|
<view class="big">
|
||||||
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/planYear.svg"></image>
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
<view class="textTop">
|
||||||
|
<view class="left">
|
||||||
|
<p class="number">{{serviceInfo.Budget_Degree?serviceInfo.Budget_Degree + '%':'-'}}</p>
|
||||||
|
<p v-if="serviceInfo.Budget_Degree>=100" class="desc" style="color: #4E68FF"><image class="success" src="/static/images/index/yearSuccess.svg"></image></p>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<text class="comparePlan">比计划: </text>
|
||||||
|
<div class="box2">
|
||||||
|
<image class="addIcon" :src="Number(serviceInfo.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">{{serviceInfo.Growth_Rate?Math.abs(serviceInfo.Growth_Rate) + '%':''}}</p>
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<div class="progressPlan">
|
||||||
|
<div class="transYear" :style="{width:serviceInfo.Budget_Degree + '%'}"></div>
|
||||||
|
<!-- <image class="img" :style="{width: plan.percentageYear + '%'}" src="https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png"></image>-->
|
||||||
|
<!-- <div class=pro :style="{width:(100 - plan.percentageYear)+ '%'}"></div>-->
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="success" style="margin-right: 39px">
|
||||||
|
<p class="text">年度已完成<text class="unit">/元</text></p>
|
||||||
|
<p class="money">{{serviceInfo.Revenue_Amount?serviceInfo.Revenue_Amount:'-'}}</p>
|
||||||
|
</view>
|
||||||
|
<view class="success">
|
||||||
|
<p class="text">年度计划<text class="unit">/元</text></p>
|
||||||
|
<p class="money">{{serviceInfo.Budget_Amount?serviceInfo.Budget_Amount:'-'}}</p>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<p class="title" style="margin-top: 12px">{{month}}月预算完成度</p>
|
||||||
|
<div class="list" v-if="type==='month'" >
|
||||||
|
<div class="item" >
|
||||||
|
<div class="firstBox" v-for="(item,index) in dataList" :key="index" >
|
||||||
|
<text class="firstTitle">{{item.node.ACCOUNT_CODE}}</text>
|
||||||
|
<div class="valueBox" v-if="item.node.BUDGETDETAIL_AMOUNT ">
|
||||||
|
<p class="value" style="color:#a69e9f">{{item.node.BUDGETDETAIL_AMOUNT }}<text style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text class="type" style="margin-left: 4px">(计划)</text></p>
|
||||||
|
<p class="value" v-if="item.node.ShowGrowth_Rate">{{item.node.REVENUE_AMOUNT?item.node.REVENUE_AMOUNT:'-' }}<text v-if="item.node.REVENUE_AMOUNT!=='-'" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="item.node.REVENUE_AMOUNT!=='-'" class="type" style="margin-left: 4px">(实际)</text></p>
|
||||||
|
<view class="addBox" v-if="item.node.ShowGrowth_Rate">
|
||||||
|
<image class="addIcon" :src="item.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':item.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
|
||||||
|
<p class="text" style="margin-left: 4px">{{item.node.Growth_Rate?Math.abs(item.node.Growth_Rate) + '%':'-' }}</p>
|
||||||
|
<text class="type" style="margin-left: 4px">{{item.node.Growth_Rate>0?'(提升)':item.node.Growth_Rate<0?'(降低)':'-'}}</text>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="item.children.length>0" class="subBox" v-for="(subItem,subIndex) in item.children" :key="subIndex"
|
||||||
|
:style="subItem.children.length>0?'':'display:flex;justify-content: space-between'">
|
||||||
|
<p class="subTitle">{{subItem.node.ACCOUNT_CODE}}</p>
|
||||||
|
|
||||||
|
<div class="valueBox" v-if="subItem.node.BUDGETDETAIL_AMOUNT ">
|
||||||
|
<p class="value" style="color:#a69e9f">{{subItem.node.BUDGETDETAIL_AMOUNT}}<text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
|
||||||
|
<p v-if="subItem.node.ShowGrowth_Rate" class="value">{{subItem.node.REVENUE_AMOUNT?subItem.node.REVENUE_AMOUNT:'-' }}<text v-if="subItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
|
||||||
|
|
||||||
|
<view class="addBox" v-if="subItem.node.ShowGrowth_Rate">
|
||||||
|
<image class="addIcon" :src="subItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':subItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
|
||||||
|
<p class="text" style="margin-left: 4px">{{subItem.node.Growth_Rate?Math.abs(subItem.node.Growth_Rate) + '%':'-'}}</p>
|
||||||
|
<text class="type" style="margin-left: 4px">{{subItem.node.Growth_Rate>0?'(提升)':subItem.node.Growth_Rate<0?'(降低)':''}}</text>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="subItem.children.length>0" class="thirdBox" v-for="(thirdItem,thirdIndex) in subItem.children" :key="thirdIndex">
|
||||||
|
<text class="thirdTitle">{{thirdItem.node.ACCOUNT_CODE}}</text>
|
||||||
|
|
||||||
|
<div class="valueBox" v-if="thirdItem.node.BUDGETDETAIL_AMOUNT">
|
||||||
|
<p class="value" style="color:#a69e9f">{{thirdItem.node.BUDGETDETAIL_AMOUNT}}<text style="margin-left: 4px;color:#a69e9f" v-if="thirdItem.node.BUDGETDETAIL_AMOUNT!=='-'">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="thirdItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
|
||||||
|
<p class="value" v-if="thirdItem.node.ShowGrowth_Rate">{{thirdItem.node.REVENUE_AMOUNT?thirdItem.node.REVENUE_AMOUNT:'-' }}<text v-if="thirdItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="thirdItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
|
||||||
|
|
||||||
|
<view class="addBox" v-if="thirdItem.node.ShowGrowth_Rate">
|
||||||
|
<image class="addIcon" :src="thirdItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':thirdItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
|
||||||
|
<p class="text" style="margin-left: 4px">{{thirdItem.node.Growth_Rate?Math.abs(thirdItem.node.Growth_Rate) + '%':'-'}}</p>
|
||||||
|
<text class="type" style="margin-left: 4px">{{thirdItem.node.Growth_Rate>0?'(提升)':thirdItem.node.Growth_Rate<0?'(降低)':''}}</text>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="top">-->
|
||||||
|
<!-- <p class="thirdTitle">便利店</p>-->
|
||||||
|
<!-- <view class="right">-->
|
||||||
|
<!-- <text class="comparePlan">比计划: </text>-->
|
||||||
|
<!-- <view class="box2">-->
|
||||||
|
<!-- <image class="addIcon" :src="Number(serviceInfo.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">{{6+'%'}}</p>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="progressPlan">-->
|
||||||
|
<!-- <div class="trans" :style="{width:serviceInfo.Budget_Degree > 100 ? '100%' : serviceInfo.Budget_Degree + '%'}"></div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="firstBox">-->
|
||||||
|
<!-- <p class="firstTitle">营业成本</p>-->
|
||||||
|
<!-- <div class="subBox">-->
|
||||||
|
<!-- <div class="thirdBox">-->
|
||||||
|
<!-- <text class="thirdTitle">便利店</text>-->
|
||||||
|
<!-- <text class="value">100,200,600.00元</text>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="thirdBox">-->
|
||||||
|
<!-- <text class="thirdTitle">餐饮</text>-->
|
||||||
|
<!-- <text class="value">100,200,600.00元</text>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="thirdBox">-->
|
||||||
|
<!-- <text class="thirdTitle">客房及其他</text>-->
|
||||||
|
<!-- <text class="value">100,200,600.00元</text>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="firstBox">-->
|
||||||
|
<!-- <p class="firstTitle">毛利率</p>-->
|
||||||
|
<!-- <div class="subBox">-->
|
||||||
|
<!-- <div class="thirdBox">-->
|
||||||
|
<!-- <text class="thirdTitle">自营综合毛利率</text>-->
|
||||||
|
<!-- <text class="value">150%</text>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="thirdBox">-->
|
||||||
|
<!-- <text class="thirdTitle">便利店</text>-->
|
||||||
|
<!-- <text class="value">45%</text>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="thirdBox">-->
|
||||||
|
<!-- <text class="thirdTitle">餐饮</text>-->
|
||||||
|
<!-- <text class="value">65%</text>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 12px">
|
||||||
|
<div v-if="type==='year'" class="monthList" v-for="(item,index) in dataList" :key="index" @click="handleYearItem(item)">
|
||||||
|
<div class="top">
|
||||||
|
<div class="left">
|
||||||
|
<p class="title" ><text class="name">{{item.Statistics_Month}}</text>月</p>
|
||||||
|
<div class="value" >{{item.Budget_Degree}}%</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<text class="comparePlan">比计划: </text>
|
||||||
|
<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>
|
||||||
|
<p class="text">{{item.Growth_Rate?Math.abs(item.Growth_Rate) + '%':''}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="have" :style="{width:item.Budget_Degree + '%'}"></div>
|
||||||
|
</div>
|
||||||
|
<div class="bottom">
|
||||||
|
<div class="success">
|
||||||
|
<p class="text">已完成:</p>
|
||||||
|
<text class="money">{{item.Revenue_Amount}}</text>
|
||||||
|
</div>
|
||||||
|
<div class="success">
|
||||||
|
<p class="text">计划: </p>
|
||||||
|
<text class="money">{{item.Budget_Amount }}</text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/util/index.js'
|
||||||
|
export default {
|
||||||
|
name: "serviceDetail",
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
serviceInfo:{},
|
||||||
|
month:'',
|
||||||
|
dataList:[],
|
||||||
|
single:'',//显示时间
|
||||||
|
endData:'',//截止日期
|
||||||
|
type:'',
|
||||||
|
isSelect:false,
|
||||||
|
optionTime:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option){
|
||||||
|
console.log('option',option)
|
||||||
|
if (option.select){
|
||||||
|
this.isSelect = true
|
||||||
|
}
|
||||||
|
if (option.type === 'month'){
|
||||||
|
this.type = option.type
|
||||||
|
if (option.month){
|
||||||
|
this.optionTime = option.month
|
||||||
|
this.month = option.month
|
||||||
|
}
|
||||||
|
if (!this.month){
|
||||||
|
const date = new Date()
|
||||||
|
this.month = date.getMonth() + 1
|
||||||
|
}
|
||||||
|
if (this.month<10){
|
||||||
|
this.month = '0' + this.month
|
||||||
|
}
|
||||||
|
this.serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.serviceInfo.Budget_Degree =this.$util.fmoney(this.serviceInfo.Budget_Degree)
|
||||||
|
this.getData()
|
||||||
|
}else {
|
||||||
|
this.type = option.type
|
||||||
|
this.serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.getYearData()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
if (this.type === 'month'){
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: `${this.month}月${this.serviceInfo.SERVERPART_NAME || this.serviceInfo.Serverpart_Name}计划`,
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: `${this.serviceInfo.SERVERPART_NAME || this.serviceInfo.Serverpart_Name}年度计划`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
|
if (storeTime){
|
||||||
|
this.time = storeTime
|
||||||
|
}
|
||||||
|
this.single = this.$util.getThisMonthHave(this.time)
|
||||||
|
let nowTime = new Date()
|
||||||
|
let y = nowTime.getFullYear()
|
||||||
|
let month = nowTime.getMonth() + 1
|
||||||
|
if (month<10){
|
||||||
|
month = '0'+ month
|
||||||
|
}
|
||||||
|
this.endData = `${y}-${month}`
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
handleYearItem(item){
|
||||||
|
let currentService = uni.getStorageSync('currentService')
|
||||||
|
let service = {
|
||||||
|
Budget_Amount:item.Budget_Amount,
|
||||||
|
Budget_Degree:item.Budget_Degree,
|
||||||
|
Growth_Rate:item.Growth_Rate,
|
||||||
|
Revenue_Amount:item.Revenue_Amount,
|
||||||
|
Serverpart_ID:currentService.Serverpart_ID,
|
||||||
|
Serverpart_Name:currentService.SERVERPART_NAME
|
||||||
|
}
|
||||||
|
let num = service.Serverpart_Name.indexOf('服务区')
|
||||||
|
console.log(num)
|
||||||
|
if (num!==-1){
|
||||||
|
service.name = service.Serverpart_Name.slice(0,num)
|
||||||
|
service.unit = service.Serverpart_Name.slice(num,100)
|
||||||
|
}else{
|
||||||
|
service.name = service.Serverpart_Name
|
||||||
|
}
|
||||||
|
let month = item.Statistics_Month
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&month=${month}&type=month`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 时间选择器改变的时间
|
||||||
|
bindDateChange(e){
|
||||||
|
const date = new Date(e.detail.value)
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
if (m<10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
this.month = m
|
||||||
|
this.single = e.detail.value
|
||||||
|
let d = this.$util.getThisMonthDay(e.detail.value)
|
||||||
|
this.endTime = e.detail.value + '-' + d
|
||||||
|
console.log('e',e)
|
||||||
|
this.getData(e.detail.value)
|
||||||
|
},
|
||||||
|
async getYearData(){
|
||||||
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
|
let lastDay = uni.getStorageSync('lastDay')
|
||||||
|
let req = {
|
||||||
|
StatisticsDate: lastDay,
|
||||||
|
ProvinceCode:'340000',
|
||||||
|
StatisticsType:3,
|
||||||
|
SPRegionTypeID:storeServiceInfo.SPRegionType_ID,
|
||||||
|
ServerpartID:storeServiceInfo.Serverpart_ID
|
||||||
|
}
|
||||||
|
const totalData = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
|
||||||
|
console.log('totalData',totalData)
|
||||||
|
this.dataList = totalData.Result_Data.RegionBudgetList
|
||||||
|
},
|
||||||
|
async getData(changeTime){
|
||||||
|
let time = uni.getStorageSync('lastDay')
|
||||||
|
let date = ''
|
||||||
|
if (changeTime){
|
||||||
|
date = new Date(changeTime)
|
||||||
|
}else{
|
||||||
|
date = new Date(time)
|
||||||
|
}
|
||||||
|
const nowDate = new Date()
|
||||||
|
let nowMonth = nowDate.getMonth() + 1
|
||||||
|
let y = date.getFullYear()
|
||||||
|
let m = this.month
|
||||||
|
let req = {}
|
||||||
|
if (nowMonth === m ){
|
||||||
|
req = {
|
||||||
|
BUDGETPROJECT_YEAR: y,
|
||||||
|
STATISTICS_MONTH:`${y}${m}`,
|
||||||
|
SERVERPART_ID:this.serviceInfo.Serverpart_ID,
|
||||||
|
ACCOUNT_CODE:'6001,6401,6402',
|
||||||
|
STATISTICS_DATE: time
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let reqDate = new Date(changeTime)
|
||||||
|
let y = reqDate.getFullYear()
|
||||||
|
let m = reqDate.getMonth() + 1
|
||||||
|
if (m<10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
req = {
|
||||||
|
BUDGETPROJECT_YEAR: y,
|
||||||
|
STATISTICS_MONTH: `${y}${m}`,
|
||||||
|
SERVERPART_ID:this.serviceInfo.Serverpart_ID,
|
||||||
|
ACCOUNT_CODE:'6001,6401,6402',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const totalData = await request.$webGet('CommercialApi/Budget/GetBudgetProjectDetailList',req)
|
||||||
|
console.log('totalData',totalData)
|
||||||
|
this.dataList = totalData.Result_Data.List
|
||||||
|
this.dataList.forEach(item=>{
|
||||||
|
if (item.children){
|
||||||
|
item.children = this.editData(item.children)
|
||||||
|
}else{
|
||||||
|
if (item.node.BUDGETDETAIL_AMOUNT){
|
||||||
|
item.node.BUDGETDETAIL_AMOUNT = this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT)
|
||||||
|
item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
|
||||||
|
}else{
|
||||||
|
item.node.BUDGETDETAIL_AMOUNT = '-'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
// 递归处理数据
|
||||||
|
editData(value){
|
||||||
|
value.forEach(item=>{
|
||||||
|
if (item.children){
|
||||||
|
item.children = this.editData(item.children)
|
||||||
|
}else{
|
||||||
|
if (item.node.BUDGETDETAIL_AMOUNT){
|
||||||
|
item.node.BUDGETDETAIL_AMOUNT = this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT)
|
||||||
|
item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
|
||||||
|
}else{
|
||||||
|
item.node.BUDGETDETAIL_AMOUNT = '-'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
again(value){
|
||||||
|
this.editData(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.main{
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 16px;
|
||||||
|
.title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
}
|
||||||
|
.top{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
.title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
}
|
||||||
|
.select{
|
||||||
|
margin-left: 8px;
|
||||||
|
display: inline-block;
|
||||||
|
.time {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 4px;
|
||||||
|
.day {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #782717;
|
||||||
|
line-height: 44rpx;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.uni-input {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ae664e;
|
||||||
|
line-height: 36rpx;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
width: 24px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: #f5f2f2;
|
||||||
|
margin-top: 12px;
|
||||||
|
.top {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
.big {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 8px;
|
||||||
|
.icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
width: calc(100% - 60px);
|
||||||
|
padding: 2px 0;
|
||||||
|
.textTop{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
.left{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.number {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #150002;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.desc{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #FF7043;
|
||||||
|
.success{
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
.comparePlan{
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 36rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.box2{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.text{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
color: #150002;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.addIcon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressPlan{
|
||||||
|
width: 100%;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #fff;
|
||||||
|
margin-top: 8px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
.trans{
|
||||||
|
height: 8px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;top: 0;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png")no-repeat 100% 100%;
|
||||||
|
}
|
||||||
|
.transYear{
|
||||||
|
height: 8px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;top: 0;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png")no-repeat 100% 100%;
|
||||||
|
}
|
||||||
|
//.img{
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;
|
||||||
|
// left: 0;
|
||||||
|
// z-index:1;
|
||||||
|
//}
|
||||||
|
//.pro{
|
||||||
|
// height: 100%;
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;right: 0;
|
||||||
|
// background: #fff;
|
||||||
|
// z-index:2;
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
margin-top: 16px;
|
||||||
|
padding-left: 48px;
|
||||||
|
.success {
|
||||||
|
.text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #786b6c;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
.unit {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.money {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.list{
|
||||||
|
margin-top: 12px;
|
||||||
|
.item{
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 12px;
|
||||||
|
background: #F5F5F5;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
.bigTitle{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
.name{
|
||||||
|
color: #150002;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.firstBox{
|
||||||
|
margin-top: 8px;
|
||||||
|
.firstTitle{
|
||||||
|
display: inline-block;
|
||||||
|
width: 180px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
.valueBox{
|
||||||
|
display: inline-block;
|
||||||
|
text-align: right;
|
||||||
|
.addBox{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.addIcon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
.type{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 18px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.value{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-left: 10px;
|
||||||
|
.type{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 18px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.subBox{
|
||||||
|
margin-top: 4px;
|
||||||
|
.subTitle{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-left: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
.thirdBox{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
.thirdTitle{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-left: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
.valueBox{
|
||||||
|
display: inline-block;
|
||||||
|
text-align: right;
|
||||||
|
.addBox{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.addIcon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
.type{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 18px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.value{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-left: 10px;
|
||||||
|
.type{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 18px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.top{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.thirdTitle{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
.comparePlan{
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.box2{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.text{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
color: #150002;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.addIcon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.progressPlan{
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-left: 30px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #fff;
|
||||||
|
margin-top: 8px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
.trans{
|
||||||
|
height: 8px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;top: 0;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png")no-repeat 100% 100%;
|
||||||
|
}
|
||||||
|
.transYear{
|
||||||
|
height: 8px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;top: 0;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png")no-repeat 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.monthList{
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 12px;
|
||||||
|
background: #F5F5F5;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
.top{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
.left{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.icon{
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 18px;
|
||||||
|
.name{
|
||||||
|
color: #150002;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.value{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #FF6D40;
|
||||||
|
line-height: 16px;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.comparePlan{
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 36rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.box2{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.text{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
color: #150002;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.addIcon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.progress{
|
||||||
|
width: 100%;
|
||||||
|
height: 8px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin: 8px 0 16px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
.have{
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 6px;
|
||||||
|
top: 0;left: 0;
|
||||||
|
background:#778CFD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 16px;
|
||||||
|
.success {
|
||||||
|
width: calc(50% - 4px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.text{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.money {
|
||||||
|
margin-left: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #a69e9f;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -395,9 +395,9 @@ export default {
|
|||||||
{ imgUrl: '/static/images/index/business_icon.svg', path: '/pages/commercialBI/managePortrait', name: '经营画像' },
|
{ imgUrl: '/static/images/index/business_icon.svg', path: '/pages/commercialBI/managePortrait', name: '经营画像' },
|
||||||
{ imgUrl: '/static/images/index/trade.svg', path: '/pages/commercialBI/businessPortrait', name: '交易画像' },
|
{ imgUrl: '/static/images/index/trade.svg', path: '/pages/commercialBI/businessPortrait', name: '交易画像' },
|
||||||
{ imgUrl: '/static/images/index/brand.svg', path: '/pages/commercialBI/formatPortrait', name: '业态品牌' },],
|
{ imgUrl: '/static/images/index/brand.svg', path: '/pages/commercialBI/formatPortrait', name: '业态品牌' },],
|
||||||
detailTypeList:[{ name: '分润门店', unit: '/个', value: '-',yesterValue:'-', add: '-', imgIcon: '/static/images/index/store.svg' },
|
detailTypeList:[{ name: '分润门店', unit: '/个', value: '-',yesterValue:'-', add: '', imgIcon: '/static/images/index/store.svg' },
|
||||||
{ name: '驿达分润', unit: '/元', value: '-',yesterValue:'-', imgIcon: '/static/images/index/yidaFenrun.svg' },
|
{ name: '驿达分润', unit: '/元', value: '-',yesterValue:'-', imgIcon: '/static/images/index/yidaFenrun.svg' },
|
||||||
{ name: '订单配送', unit: '/单', value: '-',yesterValue:'-', add: '-', imgIcon: '/static/images/index/orderDelivery.svg' },
|
{ name: '订单配送', unit: '/单', value: '-',yesterValue:'-', add: '', imgIcon: '/static/images/index/orderDelivery.svg' },
|
||||||
{ name: '采购金额', unit: '/元', value: '-',yesterValue:'-', imgIcon: '/static/images/index/purchaseAmount.svg' },],
|
{ name: '采购金额', unit: '/元', value: '-',yesterValue:'-', imgIcon: '/static/images/index/purchaseAmount.svg' },],
|
||||||
propOfRevenList:[ { name: '经营模式', value: 1 },
|
propOfRevenList:[ { name: '经营模式', value: 1 },
|
||||||
{ name: '经营业态', value: 2 },
|
{ name: '经营业态', value: 2 },
|
||||||
@ -446,12 +446,21 @@ export default {
|
|||||||
yearNoticeText:'',
|
yearNoticeText:'',
|
||||||
thisMonth:0,//拿到当前月份
|
thisMonth:0,//拿到当前月份
|
||||||
isSuccess:false,//首页这些接口是否全部调用成功
|
isSuccess:false,//首页这些接口是否全部调用成功
|
||||||
|
isReturn : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
user:{
|
user:{
|
||||||
handler:function (value){
|
handler:function (value){
|
||||||
this.getData(this.option)
|
let userInfo = uni.getStorageSync('vuex')
|
||||||
|
userInfo = JSON.parse(userInfo)
|
||||||
|
console.log(userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee'])
|
||||||
|
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
|
||||||
|
this.isReturn = false
|
||||||
|
}
|
||||||
|
if (!this.isReturn){
|
||||||
|
this.getData(this.option)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deep:true
|
deep:true
|
||||||
},
|
},
|
||||||
@ -481,82 +490,101 @@ export default {
|
|||||||
...mapGetters({'user':'getUser'})
|
...mapGetters({'user':'getUser'})
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
// 处理页面显示的时间
|
// 处理页面显示的时间
|
||||||
this.single = timestampToTime((new Date(this.lastDay).getTime()))
|
this.single = timestampToTime((new Date(this.lastDay).getTime()))
|
||||||
// 获取手机参数对页面进行适配 主要是用于拿到胶囊的位置
|
// 获取手机参数对页面进行适配 主要是用于拿到胶囊的位置
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
// 获取最近有效日期的时间,以昨天为主
|
// 获取最近有效日期的时间,以昨天为主
|
||||||
const date = new Date(this.lastDay)
|
console.log('this.lastDay',this.lastDay)
|
||||||
this.thisDay = getThisDay(date.getDay())
|
const date = new Date(this.lastDay)
|
||||||
this.thisMonth = this.$util.getThisTimeMonth(this.lastDay)
|
|
||||||
// 把时间存起来给全部页面都能拿到
|
|
||||||
uni.setStorageSync('lastDay',this.lastDay)
|
|
||||||
// 判断是否有投诉建议的悬浮框弹出
|
|
||||||
for(let key in this.toDoMsg){
|
|
||||||
if (key === 'd405ae13-3388-41c0-a5f6-d11194d0a943' && this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']){
|
|
||||||
this.isShow = true
|
|
||||||
this.isShowTitle = this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//拿到option的值
|
|
||||||
this.option = option
|
|
||||||
// 获取数据的方法
|
|
||||||
if (this.user.Membership_Id){
|
|
||||||
this.getData(option)
|
|
||||||
}
|
|
||||||
// 判断缓存中是否有位置信息 没有的话 向用户请求 拿到用户当前位置
|
|
||||||
// 拿到当前位置之后去请求离当前位置最近的服务区 作为第一次进入小程序自动选中的服务区
|
|
||||||
// 在用户选择服务区之后就会有当前服务区
|
|
||||||
this.seat = uni.getStorageSync('seatInfo')
|
|
||||||
console.log('this.seat',this.seat)
|
|
||||||
if (!this.seat){
|
|
||||||
//获取用户的经纬度位置存在stroge里面
|
|
||||||
wx.getFuzzyLocation({
|
|
||||||
type:'gcj02',
|
|
||||||
altitude:true,
|
|
||||||
success: (res) =>{
|
|
||||||
let seatInfo = {
|
|
||||||
latitude:res.latitude,
|
|
||||||
longitude:res.longitude
|
|
||||||
}
|
|
||||||
uni.setStorageSync('seatInfo', seatInfo);
|
|
||||||
this.seat = seatInfo
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
//拿到最近服务区的数据
|
|
||||||
this.nearestService()
|
|
||||||
}
|
|
||||||
//问号显示的内容 月份的数据请求 和 年份的数据请求
|
|
||||||
this.handleNoticeMonth()
|
|
||||||
this.handleNoticeYear()
|
|
||||||
//设置日期选择器的开始时间和结束时间
|
//设置日期选择器的开始时间和结束时间
|
||||||
let y = date.getFullYear()
|
let y = date.getFullYear()
|
||||||
let m = date.getMonth() + 1
|
let m = date.getMonth() + 1
|
||||||
let d = date.getDate()
|
let d = date.getDate()
|
||||||
let howDay
|
let howDay
|
||||||
if (d - 8 <0){
|
let day
|
||||||
let k = 8 - d
|
if (d - 8 <0){
|
||||||
m = m - 1
|
let k = 8 - d
|
||||||
const time = `${y}-${m}`
|
m = m - 1
|
||||||
howDay = this.$util.getThisMonthDay(time)
|
const time = `${y}-${m}`
|
||||||
this.startDate = `${y}-${m}-${howDay - k}`
|
howDay = this.$util.getThisMonthDay(time)
|
||||||
}else{
|
if (m<10){
|
||||||
this.startDate = `${y}-${m}-${d - 8}`
|
m = '0' + m
|
||||||
}
|
}
|
||||||
this.endData = new Date()
|
this.startDate = `${y}-${m}-${howDay - k}`
|
||||||
|
}else{
|
||||||
setTimeout(()=>{
|
if (m<10){
|
||||||
if (!this.isSuccess){
|
m = '0' + m
|
||||||
uni.showToast({
|
}
|
||||||
title: '加载失败,请下拉刷新重新加载',
|
if (d - 8 <10){
|
||||||
icon: 'none',
|
day = d - 8
|
||||||
duration: 3000
|
day = '0' + day
|
||||||
})
|
}
|
||||||
}
|
this.startDate = `${y}-${m}-${day}`
|
||||||
},10000)
|
}
|
||||||
|
this.endData = new Date()
|
||||||
|
this.thisDay = getThisDay(date.getDay())
|
||||||
|
this.thisMonth = this.$util.getThisTimeMonth(this.lastDay)
|
||||||
|
// 把时间存起来给全部页面都能拿到
|
||||||
|
uni.setStorageSync('lastDay',this.lastDay)
|
||||||
|
let userInfo = uni.getStorageSync('vuex')
|
||||||
|
userInfo = JSON.parse(userInfo)
|
||||||
|
console.log(userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee'])
|
||||||
|
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
|
||||||
|
this.isReturn = false
|
||||||
|
}
|
||||||
|
if (!this.isReturn){
|
||||||
|
// 判断是否有投诉建议的悬浮框弹出
|
||||||
|
for(let key in this.toDoMsg){
|
||||||
|
if (key === 'd405ae13-3388-41c0-a5f6-d11194d0a943' && this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']){
|
||||||
|
this.isShow = true
|
||||||
|
this.isShowTitle = this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//拿到option的值
|
||||||
|
this.option = option
|
||||||
|
// 获取数据的方法
|
||||||
|
if (this.user.Membership_Id){
|
||||||
|
this.getData(option)
|
||||||
|
}
|
||||||
|
// 判断缓存中是否有位置信息 没有的话 向用户请求 拿到用户当前位置
|
||||||
|
// 拿到当前位置之后去请求离当前位置最近的服务区 作为第一次进入小程序自动选中的服务区
|
||||||
|
// 在用户选择服务区之后就会有当前服务区
|
||||||
|
this.seat = uni.getStorageSync('seatInfo')
|
||||||
|
if (!this.seat){
|
||||||
|
//获取用户的经纬度位置存在stroge里面
|
||||||
|
wx.getFuzzyLocation({
|
||||||
|
type:'gcj02',
|
||||||
|
altitude:true,
|
||||||
|
success: (res) =>{
|
||||||
|
let seatInfo = {
|
||||||
|
latitude:res.latitude,
|
||||||
|
longitude:res.longitude
|
||||||
|
}
|
||||||
|
uni.setStorageSync('seatInfo', seatInfo);
|
||||||
|
this.seat = seatInfo
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//拿到最近服务区的数据
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
|
//问号显示的内容 月份的数据请求 和 年份的数据请求
|
||||||
|
this.handleNoticeMonth()
|
||||||
|
this.handleNoticeYear()
|
||||||
|
console.log('date',date)
|
||||||
|
setTimeout(()=>{
|
||||||
|
if (!this.isSuccess){
|
||||||
|
uni.showToast({
|
||||||
|
title: '加载失败,请下拉刷新重新加载',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},10000)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
||||||
@ -648,13 +676,34 @@ export default {
|
|||||||
this.showNoticeYear = false
|
this.showNoticeYear = false
|
||||||
},
|
},
|
||||||
handlePlanPageGo(type){
|
handlePlanPageGo(type){
|
||||||
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
|
if (!this.isReturn){
|
||||||
|
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无权限请联系管理员',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handlePage(){
|
handlePage(){
|
||||||
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
|
if (!this.isReturn){
|
||||||
|
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无权限请联系管理员',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleGoTab(item){
|
handleGoTab(item){
|
||||||
this.$util.toNextRoute('navigateTo', `${item.path}?time=${this.lastDay}&serviceInfo=${JSON.stringify(this.nearServiceInfo)}`)
|
if (!this.isReturn){
|
||||||
|
this.$util.toNextRoute('navigateTo', `${item.path}?time=${this.lastDay}&serviceInfo=${JSON.stringify(this.nearServiceInfo)}`)
|
||||||
|
} else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无权限请联系管理员',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getData(option){
|
getData(option){
|
||||||
//老代码
|
//老代码
|
||||||
@ -926,6 +975,10 @@ export default {
|
|||||||
let endDate = new Date(this.lastDay)
|
let endDate = new Date(this.lastDay)
|
||||||
let endMonth = endDate.getMonth() + 1
|
let endMonth = endDate.getMonth() + 1
|
||||||
let endDay = endDate.getDate()
|
let endDay = endDate.getDate()
|
||||||
|
console.log('this.startDate',this.startDate)
|
||||||
|
console.log('date',date)
|
||||||
|
console.log('endTime',endTime)
|
||||||
|
console.log('startTime',startTime)
|
||||||
if (date > endTime || date < startTime){
|
if (date > endTime || date < startTime){
|
||||||
isOnRefresh = false
|
isOnRefresh = false
|
||||||
}else{
|
}else{
|
||||||
@ -938,9 +991,10 @@ export default {
|
|||||||
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
|
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
|
||||||
this.onRefresh()
|
this.onRefresh()
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showModal({
|
||||||
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据`,
|
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据,更多数据请登陆商业综合平台查看`,
|
||||||
icon:'none',
|
icon:'none',
|
||||||
|
showCancel: false,
|
||||||
duration:3000
|
duration:3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -307,10 +307,7 @@ export default {
|
|||||||
// iconPath: 'https://eshangtech.com/ShopICO/ahyd-BID/service/health.svg',
|
// iconPath: 'https://eshangtech.com/ShopICO/ahyd-BID/service/health.svg',
|
||||||
id: value.Serverpart_ID,
|
id: value.Serverpart_ID,
|
||||||
latitude: value.latitude,
|
latitude: value.latitude,
|
||||||
longitude: value.longitude,
|
longitude: value.longitude
|
||||||
callout: {
|
|
||||||
display: 'ALWAYS'
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
// }
|
// }
|
||||||
this.markers = markers
|
this.markers = markers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user