update
This commit is contained in:
parent
87eafb02ed
commit
5137dcd55f
@ -239,6 +239,16 @@ function getThisMonthDay(value){
|
|||||||
return howDay
|
return howDay
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 输入时间拿到月份
|
||||||
|
function getThisMonth(value){
|
||||||
|
const date = new Date(value)
|
||||||
|
let y = date.getFullYear()
|
||||||
|
let m = date.getMonth()+1
|
||||||
|
if (m<10){
|
||||||
|
m = '0'+m
|
||||||
|
}
|
||||||
|
return `${y}${m}`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 视频播放
|
// 视频播放
|
||||||
@ -252,6 +262,7 @@ export default {
|
|||||||
netChange,
|
netChange,
|
||||||
cutDate,
|
cutDate,
|
||||||
getThisMonthDay,
|
getThisMonthDay,
|
||||||
|
getThisMonth,
|
||||||
fmoney,
|
fmoney,
|
||||||
noDecimal,
|
noDecimal,
|
||||||
changeStringToDate,
|
changeStringToDate,
|
||||||
|
|||||||
@ -66,6 +66,12 @@
|
|||||||
"minified" : true,
|
"minified" : true,
|
||||||
"postcss" : true
|
"postcss" : true
|
||||||
},
|
},
|
||||||
|
"plugins": {
|
||||||
|
"chooseLocation": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"provider": "wx76a9a06e5b4e693e"
|
||||||
|
}
|
||||||
|
},
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"permission" : {
|
"permission" : {
|
||||||
"scope.userLocation" : {
|
"scope.userLocation" : {
|
||||||
|
|||||||
@ -1,31 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header-top :bgUrl="bgUrl" :menu="menu" :bgColor="bgColor" :title="title" :labelList="labelList" :topBg="topBg"/>
|
<header-top :bgUrl="bgUrl" :menu="menu" :bgColor="bgColor" :title="title" :labelList="labelList" :topBg="topBg" :page="page"
|
||||||
|
:serverpartName="serviceInfo.SERVERPART_NAME" :spregionTypeName="serviceInfo.SPREGIONTYPE_NAME" :serviceInfo="serviceInfo"/>
|
||||||
|
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
<p class="title">交易分析</p>
|
<p class="title">交易分析</p>
|
||||||
<transaction-analysis :data="transactionList" />
|
<div v-if="transactionList">
|
||||||
|
<transaction-analysis :data="transactionList" />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<time-period-analysis :data="timePeriodList"/>
|
<div v-if="timePeriodList.series.length>0">
|
||||||
<analyse />
|
<time-period-analysis :data="timePeriodList"/>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<no-data v-else />
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">消费水平<text class="unit">(Top 5)</text></p>
|
<p class="title">消费水平<text class="unit">(Top 5)</text></p>
|
||||||
<level-top :data="levelTopList"></level-top>
|
<div v-if="levelTopList.series.length>0">
|
||||||
<analyse />
|
<level-top :data="levelTopList"></level-top>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<business-format :data="businessTypeList"/>
|
<div v-if="businessTypeList.series[0].data.length>0">
|
||||||
<analyse />
|
<business-format :data="businessTypeList"/>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<consumption-compare :data="compareList"/>
|
<div v-if="compareList.series[0].data.length>0">
|
||||||
<analyse />
|
<consumption-compare :data="compareList"/>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
@ -46,10 +62,12 @@ import LevelTop from "./components/bussiness/levelTop.vue";
|
|||||||
import BusinessFormat from "./components/bussiness/businessFormat.vue";
|
import BusinessFormat from "./components/bussiness/businessFormat.vue";
|
||||||
import ConsumptionCompare from "./components/bussiness/consumptionCompare.vue";
|
import ConsumptionCompare from "./components/bussiness/consumptionCompare.vue";
|
||||||
import BestsellerShop from "./components/bussiness/bestsellerShop.vue";
|
import BestsellerShop from "./components/bussiness/bestsellerShop.vue";
|
||||||
|
import NoData from "./components/noData.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "businessPortrait",
|
name: "businessPortrait",
|
||||||
components: {
|
components: {
|
||||||
|
NoData,
|
||||||
BestsellerShop,
|
BestsellerShop,
|
||||||
ConsumptionCompare,
|
ConsumptionCompare,
|
||||||
BusinessFormat, LevelTop, analyse, TimePeriodAnalysis, headerTop,transactionAnalysis},
|
BusinessFormat, LevelTop, analyse, TimePeriodAnalysis, headerTop,transactionAnalysis},
|
||||||
@ -60,6 +78,7 @@ export default {
|
|||||||
title:'交易画像',//页面标题
|
title:'交易画像',//页面标题
|
||||||
bgColor:'180deg, #FFBA07 0%, #F38309 100%',
|
bgColor:'180deg, #FFBA07 0%, #F38309 100%',
|
||||||
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/businessPortraitBg.svg',//背景图片路径
|
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/businessPortraitBg.svg',//背景图片路径
|
||||||
|
page:'/pages/commercialBI/businessPortrait',
|
||||||
time: '',//跳转携带的时间
|
time: '',//跳转携带的时间
|
||||||
menu: {},//手机配置信息
|
menu: {},//手机配置信息
|
||||||
transactionList:[],//交易分析数据
|
transactionList:[],//交易分析数据
|
||||||
@ -67,18 +86,27 @@ export default {
|
|||||||
levelTopList:[],//消费水平排行
|
levelTopList:[],//消费水平排行
|
||||||
businessTypeList:[],//业态适配型
|
businessTypeList:[],//业态适配型
|
||||||
compareList:[],//消费转化对比图
|
compareList:[],//消费转化对比图
|
||||||
bestsellerList:[]//商超畅销品
|
bestsellerList:[],//商超畅销品
|
||||||
|
serviceInfo:{} //当前服务区信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
console.log('option',option)
|
||||||
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
|
let serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.serviceInfo = storeServiceInfo?storeServiceInfo:serviceInfo
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
|
this.time = storeTime?storeTime:option.time
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
// 把获取到的手机参数保存
|
// 把获取到的手机参数保存
|
||||||
uni.setStorageSync('phoneInfo', systemInfo)
|
uni.setStorageSync('phoneInfo', systemInfo)
|
||||||
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
|
if (!storeServiceInfo){
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
//交易分析
|
//交易分析
|
||||||
this.getTransactionList()
|
this.getTransactionList()
|
||||||
//消费时段分析
|
//消费时段分析
|
||||||
@ -93,11 +121,30 @@ export default {
|
|||||||
this.getBestsellerList()
|
this.getBestsellerList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
async nearestService(){
|
||||||
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
|
let req = {
|
||||||
|
longitude:seat.longitude,
|
||||||
|
Province_Code:'340000',
|
||||||
|
latitude:seat.latitude,
|
||||||
|
}
|
||||||
|
console.log('req',req)
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
console.log('nearestService',data)
|
||||||
|
let res = {
|
||||||
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
|
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
|
||||||
|
longitude:data.Result_Data.List[0].SERVERPART_X,
|
||||||
|
latitude:data.Result_Data.List[0].SERVERPART_Y,
|
||||||
|
}
|
||||||
|
uni.setStorageSync('currentService',res)
|
||||||
|
},
|
||||||
async getTransactionList(){
|
async getTransactionList(){
|
||||||
let req = {
|
let req = {
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Statistics_Date:this.time,
|
Statistics_Date:this.time,
|
||||||
Serverpart_ID:416,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ShowConsumptionLevel:true,
|
ShowConsumptionLevel:true,
|
||||||
ShowConvertRate:true
|
ShowConvertRate:true
|
||||||
}
|
}
|
||||||
@ -108,8 +155,8 @@ export default {
|
|||||||
async getTimePeriodList(){
|
async getTimePeriodList(){
|
||||||
let req = {
|
let req = {
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Statistics_Date:'2023-04-02',
|
Statistics_Date:this.time,
|
||||||
Serverpart_ID:416
|
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionTimeAnalysis',req)
|
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionTimeAnalysis',req)
|
||||||
|
|
||||||
@ -121,7 +168,6 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
console.log('res',res)
|
|
||||||
// let res={
|
// let res={
|
||||||
// series: [
|
// series: [
|
||||||
// {
|
// {
|
||||||
@ -135,8 +181,8 @@ export default {
|
|||||||
async getLevelTopList(){
|
async getLevelTopList(){
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-02',
|
StatisticsDate:this.time,
|
||||||
ServerpartId:416,
|
ServerpartId:this.serviceInfo.Serverpart_ID,
|
||||||
ShowWholeTrade:true
|
ShowWholeTrade:true
|
||||||
}
|
}
|
||||||
let res = {
|
let res = {
|
||||||
@ -168,13 +214,14 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
|
console.log('res',res)
|
||||||
this.levelTopList = res
|
this.levelTopList = res
|
||||||
},
|
},
|
||||||
async getBusinessTypeList(){
|
async getBusinessTypeList(){
|
||||||
const req = {
|
const req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-02',
|
StatisticsDate:this.time,
|
||||||
serverpartId:416
|
serverpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
|
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
|
||||||
let res = []
|
let res = []
|
||||||
@ -194,17 +241,17 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
console.log('result',result)
|
||||||
this.businessTypeList = result
|
this.businessTypeList = result
|
||||||
},
|
},
|
||||||
async getCompareList(){
|
async getCompareList(){
|
||||||
const req = {
|
const req = {
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Statistics_Date:'2023-04-02',
|
Statistics_Date:this.time,
|
||||||
Serverpart_ID:471
|
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('data',data)
|
|
||||||
let customerOrder = []
|
let customerOrder = []
|
||||||
let customerMax = 0
|
let customerMax = 0
|
||||||
let carLit = []
|
let carLit = []
|
||||||
@ -245,7 +292,6 @@ 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"],
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
|
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
|
||||||
<view class="select">
|
<view class="select">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="uni-input">大龙山服务区</view>
|
<view class="uni-input">{{serviceInfo.SERVERPART_NAME}}</view>
|
||||||
<p class="area">安庆片区</p>
|
<p class="area">{{serviceInfo.SPREGIONTYPE_NAME}}</p>
|
||||||
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
|
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -105,7 +105,8 @@ export default {
|
|||||||
carTypeTimeData:[],//车辆类型占比与停留时间
|
carTypeTimeData:[],//车辆类型占比与停留时间
|
||||||
timeAnalysisData:[],// 车辆价值与停留时间分析
|
timeAnalysisData:[],// 车辆价值与停留时间分析
|
||||||
percentEntryData:[],//入区率占比
|
percentEntryData:[],//入区率占比
|
||||||
percentEntryDataAll:[]// 入区率占比总的
|
percentEntryDataAll:[],// 入区率占比总的
|
||||||
|
serviceInfo:{} //当前服务区信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis},
|
components: {PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis},
|
||||||
@ -115,10 +116,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
|
console.log('option',option)
|
||||||
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
|
let serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.serviceInfo = storeServiceInfo?storeServiceInfo:serviceInfo
|
||||||
|
console.log('this.serviceInfo',this.serviceInfo)
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
// 服务区id
|
this.time = storeTime?storeTime:option.time
|
||||||
this.Serverpart_ID = option.Serverpart_ID
|
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
// 把获取到的手机参数保存
|
// 把获取到的手机参数保存
|
||||||
@ -127,6 +132,9 @@ export default {
|
|||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
// 把获取图表数据的方法统一放在一起 然后去请求接口拿到数据 再分批传到相对应的图标组件
|
// 把获取图表数据的方法统一放在一起 然后去请求接口拿到数据 再分批传到相对应的图标组件
|
||||||
// 每个图表都是用组件的方式引入的 数据是通过prop传入的
|
// 每个图表都是用组件的方式引入的 数据是通过prop传入的
|
||||||
|
if (!storeServiceInfo){
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
// 入区车流分析
|
// 入区车流分析
|
||||||
this.getCarData()
|
this.getCarData()
|
||||||
// 车辆归属地
|
// 车辆归属地
|
||||||
@ -142,15 +150,35 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
//当前最近的服务区数据
|
||||||
|
async nearestService(){
|
||||||
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
|
let req = {
|
||||||
|
longitude:seat.longitude,
|
||||||
|
Province_Code:'340000',
|
||||||
|
latitude:seat.latitude,
|
||||||
|
}
|
||||||
|
console.log('req',req)
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
console.log('nearestService',data)
|
||||||
|
let res = {
|
||||||
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
|
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
|
||||||
|
longitude:data.Result_Data.List[0].SERVERPART_X,
|
||||||
|
latitude:data.Result_Data.List[0].SERVERPART_Y,
|
||||||
|
}
|
||||||
|
uni.setStorageSync('currentService',res)
|
||||||
|
},
|
||||||
//跳转到地图
|
//跳转到地图
|
||||||
handleGoSelectService() {
|
handleGoSelectService() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/map/index'
|
url:`/pages/map/index?chartType=${true}&page=/pages/commercialBI/carPortrait&serviceInfo=${JSON.stringify(this.serviceInfo)}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleBack(){
|
handleBack(){
|
||||||
uni.navigateBack({
|
uni.switchTab({
|
||||||
delta: 1
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//切换改变选项卡
|
//切换改变选项卡
|
||||||
@ -173,7 +201,6 @@ export default {
|
|||||||
this.getTimeAnalysis(Serverpart_Region)
|
this.getTimeAnalysis(Serverpart_Region)
|
||||||
//入区率占比
|
//入区率占比
|
||||||
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
|
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
|
||||||
console.log('this.percentEntryData',this.percentEntryData)
|
|
||||||
// this.tabIsTrue = false
|
// this.tabIsTrue = false
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
// this.tabIsTrue = true
|
// this.tabIsTrue = true
|
||||||
@ -182,15 +209,15 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
bindPickerChange:function (e){
|
bindPickerChange:function (e){
|
||||||
console.log(e)
|
|
||||||
},
|
},
|
||||||
getCarData(){
|
getCarData(){
|
||||||
|
console.log('this.serviceInfo',this.serviceInfo)
|
||||||
request.$webGet('CommercialApi/Revenue/GetBayonetEntryList',{
|
request.$webGet('CommercialApi/Revenue/GetBayonetEntryList',{
|
||||||
StatisticsDate: this.time,
|
StatisticsDate: this.time,
|
||||||
Serverpart_ID :this.Serverpart_ID
|
Serverpart_ID :this.serviceInfo.Serverpart_ID
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
console.log('res.Result_Data.List',res)
|
||||||
this.carData = res.Result_Data.List
|
this.carData = res.Result_Data.List
|
||||||
console.log('this.carData',this.carData)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getHomeData(){
|
getHomeData(){
|
||||||
@ -203,7 +230,7 @@ export default {
|
|||||||
let statistic = `${y}${m}`
|
let statistic = `${y}${m}`
|
||||||
request.$webGet('CommercialApi/Revenue/GetBayonetOAList',{
|
request.$webGet('CommercialApi/Revenue/GetBayonetOAList',{
|
||||||
StatisticsMonth:statistic,
|
StatisticsMonth:statistic,
|
||||||
Serverpart_ID:this.Serverpart_ID,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ContainWhole:true
|
ContainWhole:true
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
// 因为只让接口调用一次 所以要把全部和不同区域的内容要放在同一个列表里面 然后通过选项卡的点击来切换展示哪一块的数据
|
// 因为只让接口调用一次 所以要把全部和不同区域的内容要放在同一个列表里面 然后通过选项卡的点击来切换展示哪一块的数据
|
||||||
@ -244,7 +271,7 @@ export default {
|
|||||||
getCarTypeTime(){
|
getCarTypeTime(){
|
||||||
request.$webGet('CommercialApi/Revenue/GetBayonetSTAList',{
|
request.$webGet('CommercialApi/Revenue/GetBayonetSTAList',{
|
||||||
StatisticsDate:this.time,
|
StatisticsDate:this.time,
|
||||||
Serverpart_ID:this.Serverpart_ID,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ContainWhole:true
|
ContainWhole:true
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let result = res.Result_Data.List
|
let result = res.Result_Data.List
|
||||||
@ -278,7 +305,6 @@ export default {
|
|||||||
this.carTypeTimeDataAll[1] ={categories:result[1].Vehicle_Type, series:[series[3],series[2]]}
|
this.carTypeTimeDataAll[1] ={categories:result[1].Vehicle_Type, series:[series[3],series[2]]}
|
||||||
this.carTypeTimeDataAll[2] ={categories:result[2].Vehicle_Type, series:[series[5],series[4]]}
|
this.carTypeTimeDataAll[2] ={categories:result[2].Vehicle_Type, series:[series[5],series[4]]}
|
||||||
this.carTypeTimeData = this.carTypeTimeDataAll[this.selectTab]
|
this.carTypeTimeData = this.carTypeTimeDataAll[this.selectTab]
|
||||||
console.log('this.carTypeTimeData',this.carTypeTimeData)
|
|
||||||
})
|
})
|
||||||
// categories: ["小型车","中型车","大货车","新能源车"],
|
// categories: ["小型车","中型车","大货车","新能源车"],
|
||||||
// series: [{name:'新能源',data:[30,38,20,10]},
|
// series: [{name:'新能源',data:[30,38,20,10]},
|
||||||
@ -294,12 +320,11 @@ export default {
|
|||||||
StartMonth:`${y}${m}`,
|
StartMonth:`${y}${m}`,
|
||||||
EndMonth:`${y}${m}`,
|
EndMonth:`${y}${m}`,
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Serverpart_ID:this.Serverpart_ID,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
Serverpart_Region: data
|
Serverpart_Region: data
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let result = res.Result_Data.List
|
let result = res.Result_Data.List
|
||||||
this.timeAnalysisData = result
|
this.timeAnalysisData = result
|
||||||
console.log('resulttimeAnalysisData',result)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -313,13 +338,10 @@ export default {
|
|||||||
request.$webGet('CommercialApi/Revenue/GetSPBayonetList',{
|
request.$webGet('CommercialApi/Revenue/GetSPBayonetList',{
|
||||||
Statistics_Date: this.time,
|
Statistics_Date: this.time,
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Serverpart_ID :this.Serverpart_ID,
|
Serverpart_ID :this.serviceInfo.Serverpart_ID,
|
||||||
GroupType:2
|
GroupType:2
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
console.log('getPercentEntry',res)
|
|
||||||
this.percentEntryDataAll = [ res.Result_Data.List, [res.Result_Data.List[0]], [res.Result_Data.List[1]]]
|
this.percentEntryDataAll = [ res.Result_Data.List, [res.Result_Data.List[0]], [res.Result_Data.List[1]]]
|
||||||
console.log('this.percentEntryDataAll',this.percentEntryDataAll)
|
|
||||||
console.log('this.percentEntryDataAll[this.selectTab]',this.percentEntryDataAll[2])
|
|
||||||
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
|
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
this.shopList = value
|
this.shopList = value
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -68,7 +69,7 @@ export default {
|
|||||||
width: _this.width / 2,
|
width: _this.width / 2,
|
||||||
height: 165,
|
height: 165,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -26,7 +26,8 @@ export default {
|
|||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -46,7 +47,7 @@ export default {
|
|||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 280,
|
height: 280,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -26,7 +26,8 @@ export default {
|
|||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -58,7 +59,7 @@ export default {
|
|||||||
height: 240,
|
height: 240,
|
||||||
categories: data.categories,
|
categories: data.categories,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -26,7 +26,8 @@ export default {
|
|||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -47,7 +48,7 @@ export default {
|
|||||||
height: 272,
|
height: 272,
|
||||||
categories: data.categories,
|
categories: data.categories,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -27,7 +27,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('value1111',value)
|
console.log('value1111',value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -47,7 +48,7 @@ export default {
|
|||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 200,
|
height: 200,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -84,7 +84,6 @@ export default {
|
|||||||
//不要删区里面的空格!!!!
|
//不要删区里面的空格!!!!
|
||||||
text = item.Serverpart_Region + '区 ' + value .toFixed(2) + '%'
|
text = item.Serverpart_Region + '区 ' + value .toFixed(2) + '%'
|
||||||
}
|
}
|
||||||
console.log('text.length',text.length)
|
|
||||||
|
|
||||||
probabilityData.push({
|
probabilityData.push({
|
||||||
name: text,
|
name: text,
|
||||||
@ -127,7 +126,7 @@ export default {
|
|||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 208,
|
height: 208,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -3,10 +3,9 @@
|
|||||||
<div class="bandItem" v-for="(item,index) in dataList" :key="index">
|
<div class="bandItem" v-for="(item,index) in dataList" :key="index">
|
||||||
<p class="title">{{item.name}}</p>
|
<p class="title">{{item.name}}</p>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div v-if="Number(item.small)!==0" class="small" :style="{width:item.small + '%'}">{{item.small<16?'':item.small+'%'}}</div>
|
<div v-if="Number(item.small)!==0" class="small" :style="{width:`calc(${item.small}% - 2px)`}">{{item.small<16?'':item.small+'%'}}</div>
|
||||||
<div v-if="Number(item.normal)!==0" class="normal" :style="{width:item.normal + '%',left:item.small+'%'}">{{item.normal<16?'':item.normal + '%'}}</div>
|
<div v-if="Number(item.normal)!==0" class="normal" :style="{width:`calc(${item.normal}% - 2px)`,left:`calc(${item.small}% - 2px)`}">{{item.normal<16?'':item.normal + '%'}}</div>
|
||||||
<div v-if="Number(item.big)!==0" class="big" :style="{width:item.big+'%',left:(Number(item.small)+Number(item.normal))+'%'}">{{item.big<16?'':item.big + '%'}}</div>
|
<div v-if="Number(item.big)!==0" class="big" :style="{width:item.big+'%',left:`calc(${item.normal + item.small}% - 4px)`}">{{item.big<16?'':item.big + '%'}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="key">
|
<div class="key">
|
||||||
@ -48,7 +47,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
console.log('carDatawatch', value)
|
||||||
this.dataList = value
|
this.dataList = value
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -73,6 +73,7 @@ export default {
|
|||||||
.progress{
|
.progress{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -85,13 +86,11 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
border-radius: 0 2px 2px 0 ;
|
||||||
border-radius: 2px 0 0 2px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
background: #1E80FF;
|
background: #1E80FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.normal{
|
.normal{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -118,7 +117,7 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
border-radius: 0 2px 2px 0 ;
|
border-radius: 2px 0 0 2px ;
|
||||||
background: #CAD0DA;
|
background: #CAD0DA;
|
||||||
}
|
}
|
||||||
.small:after{
|
.small:after{
|
||||||
|
|||||||
@ -60,7 +60,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
console.log('carDatawatch', value)
|
||||||
this.dataList = value
|
this.dataList = value
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,8 +25,10 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('23123123',value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -47,7 +49,7 @@ export default {
|
|||||||
height: 282,
|
height: 282,
|
||||||
categories: data.categories,
|
categories: data.categories,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -29,7 +29,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
console.log('carDatawatch', value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -49,7 +50,7 @@ export default {
|
|||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 289,
|
height: 289,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -25,7 +25,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('fdjsfhsdjkf',value)
|
console.log('fdjsfhsdjkf',value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export default {
|
|||||||
height: 294,
|
height: 294,
|
||||||
categories: data.categories,
|
categories: data.categories,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -48,8 +48,10 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('value',value)
|
||||||
this.genderList = value
|
this.genderList = value
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -76,7 +76,7 @@ export default {
|
|||||||
width: _this.width,
|
width: _this.width,
|
||||||
height: 193,
|
height: 193,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
<view class="select">
|
<view class="select">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- <view class="uni-input">{{serviceArray[serviceIndex]}}</view>-->
|
<!-- <view class="uni-input">{{serviceArray[serviceIndex]}}</view>-->
|
||||||
<view class="uni-input">新桥服务区</view>
|
<view class="uni-input">{{serverpartName}}</view>
|
||||||
<!-- <text class="area">{{area}}</text>-->
|
<!-- <text class="area">{{area}}</text>-->
|
||||||
<text class="area">合肥片区</text>
|
<text class="area">{{spregionTypeName}}</text>
|
||||||
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
|
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -66,7 +66,23 @@ export default {
|
|||||||
topBg:{
|
topBg:{
|
||||||
type:String,
|
type:String,
|
||||||
default: ""
|
default: ""
|
||||||
}
|
},
|
||||||
|
serverpartName:{
|
||||||
|
type:String,
|
||||||
|
deafault:''
|
||||||
|
},
|
||||||
|
spregionTypeName:{
|
||||||
|
type:String,
|
||||||
|
deafault:''
|
||||||
|
},
|
||||||
|
page:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
serviceInfo:{
|
||||||
|
type:Object,
|
||||||
|
default:()=>{}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -80,16 +96,16 @@ export default {
|
|||||||
bindPickerChange(){
|
bindPickerChange(){
|
||||||
|
|
||||||
},
|
},
|
||||||
//返回上一级
|
//返回上一级s
|
||||||
handleBack(){
|
handleBack(){
|
||||||
uni.navigateBack({
|
uni.switchTab({
|
||||||
delta: 1
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//点击跳转服务区
|
//点击跳转服务区
|
||||||
handleGoSelectService(){
|
handleGoSelectService(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/map/index'
|
url:`/pages/map/index?page=${this.page}&chartType=${true}&serviceInfo=${JSON.stringify(this.serviceInfo)}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,12 +25,10 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
|
||||||
this.comparePath = ''
|
this.comparePath = ''
|
||||||
console.log('comparePath',this.comparePath)
|
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
deep:true
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -62,7 +60,6 @@ export default {
|
|||||||
return number * 2000
|
return number * 2000
|
||||||
},
|
},
|
||||||
drawCharts(id, data,config) {
|
drawCharts(id, data,config) {
|
||||||
console.log('data')
|
|
||||||
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')
|
||||||
|
|||||||
@ -26,7 +26,8 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
console.log('carDatawatch', value)
|
console.log('carDatawatch', value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
}
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -53,7 +54,7 @@ export default {
|
|||||||
height: 213,
|
height: 213,
|
||||||
categories: data.categories,
|
categories: data.categories,
|
||||||
series: data.series,
|
series: data.series,
|
||||||
animation: true,
|
animation: false,
|
||||||
rotate: false,
|
rotate: false,
|
||||||
rotateLock: false,
|
rotateLock: false,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
|
|||||||
@ -1,31 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header-top :bgUrl="bgUrl" :menu="menu" :bgColor="bgColor" :title="title" :labelList="labelList" :topBg="topBg"/>
|
<header-top :bgUrl="bgUrl" :menu="menu" :bgColor="bgColor" :title="title" :labelList="labelList" :topBg="topBg" :page="page"
|
||||||
|
:serverpartName="serviceInfo.SERVERPART_NAME" :spregionTypeName="serviceInfo.SPREGIONTYPE_NAME" :serviceInfo="serviceInfo"/>
|
||||||
|
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
<p class="title">业态充盈度</p>
|
<p class="title">业态充盈度</p>
|
||||||
<filling-degree :data="fillDegreeList" />
|
<div v-if="fillDegreeList.series[0].data.length>0">
|
||||||
<analyse />
|
<filling-degree :data="fillDegreeList" />
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<no-data v-else/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">品牌消费水平<text class="unit">(Top 5)</text></p>
|
<p class="title">品牌消费水平<text class="unit">(Top 5)</text></p>
|
||||||
<band-level :data="bandLevelList"/>
|
<div v-if="bandLevelList.length>0">
|
||||||
<analyse />
|
<band-level :data="bandLevelList"/>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<no-data v-else/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">业态消费水平<text class="unit">(Top 5)</text></p>
|
<p class="title">业态消费水平<text class="unit">(Top 5)</text></p>
|
||||||
<consumption-level :data="consumLevelList" />
|
<div v-if="consumLevelList.series.length>0">
|
||||||
<analyse />
|
<consumption-level :data="consumLevelList" />
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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 class="labelList">
|
<div v-if="brandInfoList.length>0">
|
||||||
<div class="labelItem" v-for="(item,index) in brandLabelList" :key="index">
|
<div class="labelList">
|
||||||
<p class="name">{{item[0]}}<text class="number">({{item[1]}})</text></p>
|
<div class="labelItem" v-for="(item,index) in brandLabelList" :key="index">
|
||||||
|
<p class="name">{{item[0]}}<text class="number">({{item[1]}})</text></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<band-number :data="brandInfoList"/>
|
||||||
</div>
|
</div>
|
||||||
<band-number :data="brandInfoList"/>
|
<no-data v-else/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -39,10 +52,11 @@ import FillingDegree from "./components/format/fillingDegree.vue";
|
|||||||
import BandLevel from "./components/format/bandLevel.vue";
|
import BandLevel from "./components/format/bandLevel.vue";
|
||||||
import ConsumptionLevel from "./components/format/consumLevel.vue";
|
import ConsumptionLevel from "./components/format/consumLevel.vue";
|
||||||
import BandNumber from "./components/format/bandNumber.vue";
|
import BandNumber from "./components/format/bandNumber.vue";
|
||||||
|
import NoData from "./components/noData.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "businessPortrait",
|
name: "businessPortrait",
|
||||||
components: {BandNumber, ConsumptionLevel, BandLevel, FillingDegree, analyse, headerTop},
|
components: {NoData, BandNumber, ConsumptionLevel, BandLevel, FillingDegree, analyse, headerTop},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
topBg:'linear-gradient(180deg, #C6C1F0 0%, #CECBF3 100%);',//顶部组件的悬浮背景色
|
topBg:'linear-gradient(180deg, #C6C1F0 0%, #CECBF3 100%);',//顶部组件的悬浮背景色
|
||||||
@ -50,6 +64,7 @@ export default {
|
|||||||
title:'业态品牌',//页面标题
|
title:'业态品牌',//页面标题
|
||||||
bgColor: '180deg, #459FFF 0%, #473AFF 100%',
|
bgColor: '180deg, #459FFF 0%, #473AFF 100%',
|
||||||
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/formatPortraitBg.svg',//背景图片路径
|
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/formatPortraitBg.svg',//背景图片路径
|
||||||
|
page:'/pages/commercialBI/formatPortrait',
|
||||||
time: '',//跳转携带的时间
|
time: '',//跳转携带的时间
|
||||||
menu: {},//手机配置信息
|
menu: {},//手机配置信息
|
||||||
fillDegreeList:[],//业态充盈度
|
fillDegreeList:[],//业态充盈度
|
||||||
@ -61,18 +76,27 @@ export default {
|
|||||||
{name:'这是品类名称',value:5},
|
{name:'这是品类名称',value:5},
|
||||||
{name:'省内品牌',value:3},
|
{name:'省内品牌',value:3},
|
||||||
{name:'地方特色',value:8}],//品牌指数标签列表
|
{name:'地方特色',value:8}],//品牌指数标签列表
|
||||||
brandInfoList:[]//品牌指数列表
|
brandInfoList:[],//品牌指数列表
|
||||||
|
serviceInfo:{} //当前服务区信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
console.log('option',option)
|
||||||
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
|
let serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.serviceInfo = storeServiceInfo?storeServiceInfo:serviceInfo
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
|
this.time = storeTime?storeTime:option.time
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
// 把获取到的手机参数保存
|
// 把获取到的手机参数保存
|
||||||
uni.setStorageSync('phoneInfo', systemInfo)
|
uni.setStorageSync('phoneInfo', systemInfo)
|
||||||
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
|
if (!storeServiceInfo){
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
//业态充盈度
|
//业态充盈度
|
||||||
this.getFillDegreeList()
|
this.getFillDegreeList()
|
||||||
//品牌消费水平
|
//品牌消费水平
|
||||||
@ -83,11 +107,30 @@ export default {
|
|||||||
this.getBrandInfoList()
|
this.getBrandInfoList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
async nearestService(){
|
||||||
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
|
let req = {
|
||||||
|
longitude:seat.longitude,
|
||||||
|
Province_Code:'340000',
|
||||||
|
latitude:seat.latitude,
|
||||||
|
}
|
||||||
|
console.log('req',req)
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
console.log('nearestService',data)
|
||||||
|
let res = {
|
||||||
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
|
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
|
||||||
|
longitude:data.Result_Data.List[0].SERVERPART_X,
|
||||||
|
latitude:data.Result_Data.List[0].SERVERPART_Y,
|
||||||
|
}
|
||||||
|
uni.setStorageSync('currentService',res)
|
||||||
|
},
|
||||||
async getFillDegreeList(){
|
async getFillDegreeList(){
|
||||||
const req = {
|
const req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-02',
|
StatisticsDate:this.time,
|
||||||
serverpartId:416
|
serverpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
|
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
|
||||||
let res = []
|
let res = []
|
||||||
@ -128,8 +171,8 @@ export default {
|
|||||||
|
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-03',
|
StatisticsDate:this.time,
|
||||||
ServerpartId:416,
|
ServerpartId:this.serviceInfo.Serverpart_ID,
|
||||||
ShowWholeBrand:false
|
ShowWholeBrand:false
|
||||||
}
|
}
|
||||||
let res =[]
|
let res =[]
|
||||||
@ -158,8 +201,8 @@ export default {
|
|||||||
|
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-02',
|
StatisticsDate:this.time,
|
||||||
ServerpartId:416,
|
ServerpartId:this.serviceInfo.Serverpart_ID,
|
||||||
ShowWholeTrade:false
|
ShowWholeTrade:false
|
||||||
}
|
}
|
||||||
let res = {
|
let res = {
|
||||||
@ -192,12 +235,13 @@ export default {
|
|||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
this.consumLevelList = res
|
this.consumLevelList = res
|
||||||
|
console.log('this.consumLevelList',this.consumLevelList)
|
||||||
},
|
},
|
||||||
async getBrandInfoList(){
|
async getBrandInfoList(){
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
Serverpart_ID:416,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
Statistics_Date:'2023-04-02'
|
Statistics_Date:this.time
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
||||||
console.log('totalData',totalData)
|
console.log('totalData',totalData)
|
||||||
|
|||||||
@ -1,31 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header-top :bgUrl="bgUrl" :menu="menu" :topBg="topBg" :bgColor="bgColor" :title="title" :labelList="labelList"/>
|
<header-top :bgUrl="bgUrl" :menu="menu" :topBg="topBg" :bgColor="bgColor" :title="title" :labelList="labelList" :page="page"
|
||||||
|
:serverpartName="serviceInfo.SERVERPART_NAME" :spregionTypeName="serviceInfo.SPREGIONTYPE_NAME" :serviceInfo="serviceInfo"/>
|
||||||
|
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
<p class="title">客群分析</p>
|
<p class="title">客群分析</p>
|
||||||
<customer-first :data="customer" />
|
<div v-if="customer">
|
||||||
|
<customer-first :data="customer" />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<customer-second :data="genderBubbleList" />
|
<div v-if="genderBubbleList.res.length!==0">
|
||||||
<analyse />
|
<customer-second :data="genderBubbleList" />
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<consum-prefer :data="consterPreferList" />
|
<div v-if="consterPreferList.categories.length!==0">
|
||||||
<analyse />
|
<consum-prefer :data="consterPreferList" />
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<consumption-level :data="consumptionLevelList"/>
|
<div v-if="consumptionLevelList.length>0">
|
||||||
<analyse />
|
<consumption-level :data="consumptionLevelList"/>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
<business-type :data="businessTypeList"></business-type>
|
<div v-if="businessTypeList.length>0">
|
||||||
<analyse />
|
<business-type :data="businessTypeList"></business-type>
|
||||||
|
<analyse />
|
||||||
|
</div>
|
||||||
|
<no-data v-else />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -51,18 +67,25 @@ export default {
|
|||||||
title:'客群画像',//页面标题
|
title:'客群画像',//页面标题
|
||||||
bgColor:'180deg, #30C8ED 0%, #0B9353 100%',//标签背景颜色
|
bgColor:'180deg, #30C8ED 0%, #0B9353 100%',//标签背景颜色
|
||||||
bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/commercial/guestPortraitBg.svg',//背景图片路径
|
bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/commercial/guestPortraitBg.svg',//背景图片路径
|
||||||
|
page:'/pages/commercialBI/guestPortrait',
|
||||||
time:'',//跳转携带的时间
|
time:'',//跳转携带的时间
|
||||||
menu:{},//手机配置信息
|
menu:{},//手机配置信息
|
||||||
customer:{}, // 客群分析第一个
|
customer:{}, // 客群分析第一个
|
||||||
genderBubbleList:[],//男女的气泡图
|
genderBubbleList:[],//男女的气泡图
|
||||||
consterPreferList:{},//客群消费偏好
|
consterPreferList:{},//客群消费偏好
|
||||||
consumptionLevelList:[],//客群消费水平
|
consumptionLevelList:[],//客群消费水平
|
||||||
businessTypeList:[]//业态偏好
|
businessTypeList:[],//业态偏好
|
||||||
|
serviceInfo:{} //当前服务区信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
|
console.log('option',option)
|
||||||
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
|
let serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.serviceInfo = storeServiceInfo?storeServiceInfo:serviceInfo
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
|
this.time = storeTime?storeTime:option.time
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
// 把获取到的手机参数保存
|
// 把获取到的手机参数保存
|
||||||
@ -72,6 +95,9 @@ export default {
|
|||||||
// 把获取图表数据的方法统一放在一起 然后去请求接口拿到数据 再分批传到相对应的图标组件
|
// 把获取图表数据的方法统一放在一起 然后去请求接口拿到数据 再分批传到相对应的图标组件
|
||||||
// 每个图表都是用组件的方式引入的 数据是通过prop传入的
|
// 每个图表都是用组件的方式引入的 数据是通过prop传入的
|
||||||
// 每个组件需要的数据格式都注释在方法的下面 方便修改,接口拿到数据之后 就是对数据进行处理 普通的遍历数组和遍历对象的方法
|
// 每个组件需要的数据格式都注释在方法的下面 方便修改,接口拿到数据之后 就是对数据进行处理 普通的遍历数组和遍历对象的方法
|
||||||
|
if (!storeServiceInfo){
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
//customer
|
//customer
|
||||||
this.getCustomer()
|
this.getCustomer()
|
||||||
//客群分析男女的气泡图
|
//客群分析男女的气泡图
|
||||||
@ -84,13 +110,33 @@ export default {
|
|||||||
this.getBusinessTypeList()
|
this.getBusinessTypeList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
//当前最近的服务区数据
|
||||||
|
async nearestService(){
|
||||||
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
|
let req = {
|
||||||
|
longitude:seat.longitude,
|
||||||
|
Province_Code:'340000',
|
||||||
|
latitude:seat.latitude,
|
||||||
|
}
|
||||||
|
console.log('req',req)
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
console.log('nearestService',data)
|
||||||
|
let res = {
|
||||||
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
|
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
|
||||||
|
longitude:data.Result_Data.List[0].SERVERPART_X,
|
||||||
|
latitude:data.Result_Data.List[0].SERVERPART_Y,
|
||||||
|
}
|
||||||
|
uni.setStorageSync('currentService',res)
|
||||||
|
},
|
||||||
//customer
|
//customer
|
||||||
// 用async await直接等待接口数据返回之后再对数据直接进行处理 节约时间
|
// 用async await直接等待接口数据返回之后再对数据直接进行处理 节约时间
|
||||||
async getCustomer(){
|
async getCustomer(){
|
||||||
const req = {
|
const req = {
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Statistics_Date:'2023-04-02',
|
Statistics_Date:this.time,
|
||||||
Serverpart_ID:416,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ShowConsumptionLevel:true,
|
ShowConsumptionLevel:true,
|
||||||
ShowConvertRate:true
|
ShowConvertRate:true
|
||||||
}
|
}
|
||||||
@ -107,8 +153,8 @@ export default {
|
|||||||
const req = {
|
const req = {
|
||||||
statisticsType:2,
|
statisticsType:2,
|
||||||
provinceCode:'340000',
|
provinceCode:'340000',
|
||||||
serverpartId:416,
|
serverpartId:this.serviceInfo.Serverpart_ID,
|
||||||
statisticsMonth:'202303'
|
statisticsMonth:this.$util.getThisMonth(this.time)
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/Customer/GetCustomerRatio',req)
|
let totalData = await request.$webGet('CommercialApi/Customer/GetCustomerRatio',req)
|
||||||
totalData.Result_Data.List.forEach(item=>{
|
totalData.Result_Data.List.forEach(item=>{
|
||||||
@ -121,12 +167,11 @@ export default {
|
|||||||
})
|
})
|
||||||
const bubbleReq = {
|
const bubbleReq = {
|
||||||
provinceCode:'340000',
|
provinceCode:'340000',
|
||||||
serverpartId:416,
|
serverpartId:this.serviceInfo.Serverpart_ID,
|
||||||
statisticsMonth:'202303'
|
statisticsMonth:this.$util.getThisMonth(this.time)
|
||||||
}
|
}
|
||||||
|
|
||||||
let bubbleData = await request.$webGet('CommercialApi/Customer/GetCustomerGroupRatio',bubbleReq)
|
let bubbleData = await request.$webGet('CommercialApi/Customer/GetCustomerGroupRatio',bubbleReq)
|
||||||
console.log('bubbleData',bubbleData)
|
|
||||||
result.res = bubbleData.Result_Data.List
|
result.res = bubbleData.Result_Data.List
|
||||||
// let res = [
|
// let res = [
|
||||||
// {
|
// {
|
||||||
@ -151,10 +196,10 @@ export default {
|
|||||||
|
|
||||||
const req = {
|
const req = {
|
||||||
statisticsType:1,
|
statisticsType:1,
|
||||||
startMonth:`202303`,
|
startMonth:this.$util.getThisMonth(this.time),
|
||||||
endMonth:`202303`,
|
endMonth:this.$util.getThisMonth(this.time),
|
||||||
provinceCode: '340000',
|
provinceCode: '340000',
|
||||||
serverpartId: 416
|
serverpartId: this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Customer/GetCustomerSaleRatio',req)
|
const data = await request.$webGet('CommercialApi/Customer/GetCustomerSaleRatio',req)
|
||||||
let res = {
|
let res = {
|
||||||
@ -171,7 +216,6 @@ export default {
|
|||||||
res.series[1].data.push(item.FemaleRatio)
|
res.series[1].data.push(item.FemaleRatio)
|
||||||
})
|
})
|
||||||
res.max = data.Result_Data.MaxSexRatio
|
res.max = data.Result_Data.MaxSexRatio
|
||||||
|
|
||||||
// let res = {
|
// let res = {
|
||||||
// categories: ['餐饮','商超','水果饮品','连锁品牌','粽子','小吃'],
|
// categories: ['餐饮','商超','水果饮品','连锁品牌','粽子','小吃'],
|
||||||
// series: [
|
// series: [
|
||||||
@ -185,13 +229,13 @@ export default {
|
|||||||
async getConsumptionLevelList(){
|
async getConsumptionLevelList(){
|
||||||
const req = {
|
const req = {
|
||||||
provinceCode:'340000',
|
provinceCode:'340000',
|
||||||
serverpartId:416,
|
serverpartId:this.serviceInfo.Serverpart_ID,
|
||||||
statisticsMonth:'202303'
|
statisticsMonth:this.$util.getThisMonth(this.time)
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Customer/GetCustomerConsumeRatio',req)
|
const data = await request.$webGet('CommercialApi/Customer/GetCustomerConsumeRatio',req)
|
||||||
let res = []
|
let res = []
|
||||||
data.Result_Data.List.forEach(item=>{
|
data.Result_Data.List.forEach(item=>{
|
||||||
res.push({name:item.name,big:item.data[3],normal:item.data[1]+item.data[2],small:item.data[0]})
|
res.push({name:item.name,big:item.data[3].toFixed(2),normal:(item.data[1]+item.data[2]).toFixed(2),small:item.data[0].toFixed(2)})
|
||||||
})
|
})
|
||||||
|
|
||||||
// let res=[{name:'男',big:'14.8',normal:'41.7',small:'43.5'},
|
// let res=[{name:'男',big:'14.8',normal:'41.7',small:'43.5'},
|
||||||
@ -202,10 +246,10 @@ export default {
|
|||||||
async getBusinessTypeList(){
|
async getBusinessTypeList(){
|
||||||
const req = {
|
const req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-02',
|
StatisticsDate:this.time,
|
||||||
serverpartId:416
|
serverpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
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
|
||||||
if (data.Result_Data){
|
if (data.Result_Data){
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header-top :bgUrl="bgUrl" :menu="menu" :bgColor="bgColor" :title="title" :labelList="labelList" :topBg="topBg"/>
|
<header-top :bgUrl="bgUrl" :menu="menu" :bgColor="bgColor" :title="title" :labelList="labelList" :topBg="topBg" :page="page"
|
||||||
|
:serverpartName="serviceInfo.SERVERPART_NAME" :spregionTypeName="serviceInfo.SPREGIONTYPE_NAME" :serviceInfo="serviceInfo"/>
|
||||||
|
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
@ -25,24 +26,30 @@
|
|||||||
<div class="money">
|
<div class="money">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/blueMoney.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/blueMoney.svg"></image>
|
||||||
<p class="sumMoney">{{revenue.data?revenue.data:''}}</p>
|
<p class="sumMoney">{{revenue.data?revenue.data:'-'}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/addArrow.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/addArrow.svg"></image>
|
||||||
<p class="add">{{revenue.add?revenue.add+'%':''}}</p>
|
<p class="add">{{revenue.add?revenue.add+'%':'-'}}</p>
|
||||||
<p class="text">(相比去年同日)</p>
|
<p class="text">(相比去年同日)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="subItem">
|
<div class="subItem">
|
||||||
<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>
|
||||||
<money-compare :data="moneyCompareList"/>
|
<div v-if="moneyCompareList.series.length>0">
|
||||||
|
<money-compare :data="moneyCompareList"/>
|
||||||
|
</div>
|
||||||
|
<no-data v-else/>
|
||||||
</div>
|
</div>
|
||||||
<div class="subItem ">
|
<div class="subItem ">
|
||||||
<p class="title" style="margin-top: 20px">营收趋势</p>
|
<p class="title" style="margin-top: 20px">营收趋势</p>
|
||||||
<revenue-trends :data="trendsList"/>
|
<div v-if="trendsList.series.length>0">
|
||||||
<analyse/>
|
<revenue-trends :data="trendsList"/>
|
||||||
|
</div>
|
||||||
|
<no-data v-else/>
|
||||||
</div>
|
</div>
|
||||||
|
<analyse/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">营收占比</p>
|
<p class="title">营收占比</p>
|
||||||
@ -173,10 +180,11 @@ import MoneyCompare from "./components/manager/moneyCompare.vue";
|
|||||||
import analyse from "./components/analyse.vue";
|
import analyse from "./components/analyse.vue";
|
||||||
import RevenueTrends from "./components/manager/revenueTrends.vue";
|
import RevenueTrends from "./components/manager/revenueTrends.vue";
|
||||||
import request from '@/util/index.js'
|
import request from '@/util/index.js'
|
||||||
|
import NoData from "./components/noData.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "businessPortrait",
|
name: "businessPortrait",
|
||||||
components: {RevenueTrends, MoneyCompare, ContractGuarantee, RevenueAnalysis, headerTop,analyse},
|
components: {NoData, RevenueTrends, MoneyCompare, ContractGuarantee, RevenueAnalysis, headerTop,analyse},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
topBg:'linear-gradient(180deg, #D9CCEF 0%, #DED3F2 100%);',
|
topBg:'linear-gradient(180deg, #D9CCEF 0%, #DED3F2 100%);',
|
||||||
@ -186,6 +194,7 @@ export default {
|
|||||||
title:'经营画像',//页面标题
|
title:'经营画像',//页面标题
|
||||||
bgColor: '180deg, #996CFF 0%, #5D43F8 100%',
|
bgColor: '180deg, #996CFF 0%, #5D43F8 100%',
|
||||||
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/managePortraitBg.svg',//背景图片路径
|
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/managePortraitBg.svg',//背景图片路径
|
||||||
|
page:'/pages/commercialBI/managePortrait',
|
||||||
time: '',//跳转携带的时间
|
time: '',//跳转携带的时间
|
||||||
menu: {},//手机配置信息
|
menu: {},//手机配置信息
|
||||||
revenueList:[],//营收分析
|
revenueList:[],//营收分析
|
||||||
@ -193,7 +202,7 @@ export default {
|
|||||||
orderTransaction:{},//客流客单交易
|
orderTransaction:{},//客流客单交易
|
||||||
revenueAll:[],//三组的营收信息
|
revenueAll:[],//三组的营收信息
|
||||||
revenue:{},//营收信息
|
revenue:{},//营收信息
|
||||||
moneyCompareList:[],//营收对比
|
moneyCompareList:{},//营收对比
|
||||||
trendsList:[],//营收趋势
|
trendsList:[],//营收趋势
|
||||||
revenueType:{},//营收占比
|
revenueType:{},//营收占比
|
||||||
plan:{},//月度和年度接口的返回参数 一起的
|
plan:{},//月度和年度接口的返回参数 一起的
|
||||||
@ -201,17 +210,26 @@ export default {
|
|||||||
yearAdd:'', // 年度计划增加的百分比
|
yearAdd:'', // 年度计划增加的百分比
|
||||||
showNotice:false,
|
showNotice:false,
|
||||||
showNoticeYear:false,
|
showNoticeYear:false,
|
||||||
|
serviceInfo:{} //当前服务区信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
console.log('option',option)
|
||||||
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
|
let serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
this.serviceInfo = storeServiceInfo?storeServiceInfo:serviceInfo
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
|
this.time = storeTime?storeTime:option.time
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
// 把获取到的手机参数保存
|
// 把获取到的手机参数保存
|
||||||
uni.setStorageSync('phoneInfo', systemInfo)
|
uni.setStorageSync('phoneInfo', systemInfo)
|
||||||
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
|
if (!storeServiceInfo){
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
//营收分析
|
//营收分析
|
||||||
this.getRevenueList()
|
this.getRevenueList()
|
||||||
//合同保底
|
//合同保底
|
||||||
@ -228,6 +246,25 @@ export default {
|
|||||||
this.monthYearPlan()
|
this.monthYearPlan()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
async nearestService(){
|
||||||
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
|
let req = {
|
||||||
|
longitude:seat.longitude,
|
||||||
|
Province_Code:'340000',
|
||||||
|
latitude:seat.latitude,
|
||||||
|
}
|
||||||
|
console.log('req',req)
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
console.log('nearestService',data)
|
||||||
|
let res = {
|
||||||
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
|
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
|
||||||
|
longitude:data.Result_Data.List[0].SERVERPART_X,
|
||||||
|
latitude:data.Result_Data.List[0].SERVERPART_Y,
|
||||||
|
}
|
||||||
|
uni.setStorageSync('currentService',res)
|
||||||
|
},
|
||||||
handleShowNotice(){
|
handleShowNotice(){
|
||||||
this.showNotice = true
|
this.showNotice = true
|
||||||
},
|
},
|
||||||
@ -263,12 +300,13 @@ export default {
|
|||||||
this.selectTab = value
|
this.selectTab = value
|
||||||
this.revenue = this.revenueAll[this.selectTab]
|
this.revenue = this.revenueAll[this.selectTab]
|
||||||
this.moneyCompareList = this.revenue.list
|
this.moneyCompareList = this.revenue.list
|
||||||
|
console.log('this.moneyCompareList',this.moneyCompareList)
|
||||||
},
|
},
|
||||||
async getMoneyCompareList(){
|
async getMoneyCompareList(){
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023-04-02',
|
StatisticsDate:this.time,
|
||||||
ServerpartId:416
|
ServerpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
|
||||||
let RevenueAmount = [] //营收金额
|
let RevenueAmount = [] //营收金额
|
||||||
@ -365,11 +403,13 @@ export default {
|
|||||||
this.moneyCompareList = this.revenue.list
|
this.moneyCompareList = this.revenue.list
|
||||||
},
|
},
|
||||||
async getTrendsList(){
|
async getTrendsList(){
|
||||||
|
let date = new Date(this.time)
|
||||||
|
let y = date.getFullYear()
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
StatisticsDate:'2023',
|
StatisticsDate:y,
|
||||||
StatisticsType:1,
|
StatisticsType:1,
|
||||||
ServerpartId:471
|
ServerpartId:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',req)
|
||||||
let list = []
|
let list = []
|
||||||
@ -401,9 +441,9 @@ export default {
|
|||||||
async getRevenueType(){
|
async getRevenueType(){
|
||||||
const req = {
|
const req = {
|
||||||
pushProvinceCode:'340000',
|
pushProvinceCode:'340000',
|
||||||
Statistics_StartDate:'2023-04-03',
|
Statistics_StartDate:this.time,
|
||||||
Statistics_Date:'2023-04-03',
|
Statistics_Date:this.time,
|
||||||
Serverpart_ID:416
|
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',req)
|
const data = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',req)
|
||||||
let all = 0
|
let all = 0
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
|
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
|
||||||
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
|
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
|
||||||
<image class="dateIcon" src="/static/images/index/dateTime.svg"></image>
|
<image class="dateIcon" src="/static/images/index/dateTime.svg"></image>
|
||||||
<picker mode="date" :value="single" :start="startDate" :end="endData" @change="bindDateChange" @click="handleDateClick">
|
<picker mode="date" :value="single" :start="startDate" :end="endData" @change="bindDateChange" >
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<text class="day">{{ thisDay }}</text>
|
<text class="day">{{ thisDay }}</text>
|
||||||
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
||||||
@ -423,13 +423,18 @@ export default {
|
|||||||
plan:{},//月度和年度接口的返回参数 一起的
|
plan:{},//月度和年度接口的返回参数 一起的
|
||||||
ShareShopCountYes:0,//昨日的店铺数
|
ShareShopCountYes:0,//昨日的店铺数
|
||||||
yesterdayAllPay:0,//前一天的营收总额
|
yesterdayAllPay:0,//前一天的营收总额
|
||||||
wechatPushSalesList: null // 甘肃单品排行数据
|
wechatPushSalesList: null, // 甘肃单品排行数据
|
||||||
|
seat:{},//用户经纬度信息
|
||||||
|
nearServiceInfo:{
|
||||||
|
SERVERPART_NAME:"广德服务区",
|
||||||
|
SPREGIONTYPE_NAME:"芜湖片区",
|
||||||
|
Serverpart_ID:524
|
||||||
|
},//最近服务区的有用信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
user:{
|
user:{
|
||||||
handler:function (value){
|
handler:function (value){
|
||||||
console.log('监听user',value)
|
|
||||||
this.getData(this.option)
|
this.getData(this.option)
|
||||||
},
|
},
|
||||||
deep:true
|
deep:true
|
||||||
@ -455,7 +460,6 @@ export default {
|
|||||||
onLoad(option){
|
onLoad(option){
|
||||||
// 处理页面显示的时间
|
// 处理页面显示的时间
|
||||||
this.single = timestampToTime((new Date(this.lastDay).getTime()))
|
this.single = timestampToTime((new Date(this.lastDay).getTime()))
|
||||||
console.log('single',this.single)
|
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
||||||
@ -463,6 +467,8 @@ export default {
|
|||||||
// 获取最近有效日期的时间,以昨天为主
|
// 获取最近有效日期的时间,以昨天为主
|
||||||
const date = new Date(this.lastDay)
|
const date = new Date(this.lastDay)
|
||||||
this.thisDay = getThisDay(date.getDay())
|
this.thisDay = getThisDay(date.getDay())
|
||||||
|
// 把时间存起来给全部页面都能拿到
|
||||||
|
uni.setStorageSync('lastDay',this.lastDay)
|
||||||
// 判断是否有投诉建议的悬浮框弹出
|
// 判断是否有投诉建议的悬浮框弹出
|
||||||
for(let key in this.toDoMsg){
|
for(let key in this.toDoMsg){
|
||||||
if (key === 'd405ae13-3388-41c0-a5f6-d11194d0a943' && this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']){
|
if (key === 'd405ae13-3388-41c0-a5f6-d11194d0a943' && this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']){
|
||||||
@ -476,6 +482,29 @@ export default {
|
|||||||
if (this.user.Membership_Id){
|
if (this.user.Membership_Id){
|
||||||
this.getData(option)
|
this.getData(option)
|
||||||
}
|
}
|
||||||
|
// 判断缓存中是否有位置信息 没有的话 向用户请求 拿到用户当前位置
|
||||||
|
this.seat = uni.getStorageSync('seatInfo')
|
||||||
|
if (!this.seat){
|
||||||
|
let _this=this
|
||||||
|
//获取用户的经纬度位置存在stroge里面
|
||||||
|
uni.getFuzzyLocation({
|
||||||
|
type:'gcj02',
|
||||||
|
altitude:true,
|
||||||
|
success:function (res){
|
||||||
|
let seatInfo = {
|
||||||
|
latitude:res.latitude,
|
||||||
|
longitude:res.longitude
|
||||||
|
}
|
||||||
|
uni.setStorageSync('seatInfo', seatInfo);
|
||||||
|
this.seat = seatInfo
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//拿到最近服务区的数据
|
||||||
|
this.nearestService()
|
||||||
|
}
|
||||||
|
|
||||||
//设置日期选择器的开始时间和结束时间
|
//设置日期选择器的开始时间和结束时间
|
||||||
let y = date.getFullYear()
|
let y = date.getFullYear()
|
||||||
let m = date.getMonth() + 1
|
let m = date.getMonth() + 1
|
||||||
@ -503,6 +532,26 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
...mapActions(['memberLogin','getLoginCode']),
|
...mapActions(['memberLogin','getLoginCode']),
|
||||||
|
async nearestService(){
|
||||||
|
let seat = uni.getStorageSync('seatInfo');
|
||||||
|
let req = {
|
||||||
|
longitude:seat.longitude,
|
||||||
|
Province_Code:'340000',
|
||||||
|
latitude:seat.latitude,
|
||||||
|
}
|
||||||
|
console.log('req',req)
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
console.log('nearestService',data)
|
||||||
|
let res = {
|
||||||
|
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||||
|
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||||
|
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
|
||||||
|
longitude:data.Result_Data.List[0].SERVERPART_X,
|
||||||
|
latitude:data.Result_Data.List[0].SERVERPART_Y,
|
||||||
|
}
|
||||||
|
uni.setStorageSync('currentService',res)
|
||||||
|
this.nearServiceInfo = res
|
||||||
|
},
|
||||||
handleShowNotice(){
|
handleShowNotice(){
|
||||||
this.showNotice = true
|
this.showNotice = true
|
||||||
},
|
},
|
||||||
@ -522,7 +571,7 @@ export default {
|
|||||||
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
|
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
|
||||||
},
|
},
|
||||||
handleGoTab(item){
|
handleGoTab(item){
|
||||||
this.$util.toNextRoute('navigateTo', `${item.path}?time=${this.lastDay}&Serverpart_ID=372`)
|
this.$util.toNextRoute('navigateTo', `${item.path}?time=${this.lastDay}&serviceInfo=${JSON.stringify(this.nearServiceInfo)}`)
|
||||||
},
|
},
|
||||||
getData(option){
|
getData(option){
|
||||||
//老代码
|
//老代码
|
||||||
@ -625,7 +674,6 @@ export default {
|
|||||||
let _this = this
|
let _this = this
|
||||||
// 传入最近的有效日期就可以拿到当前有效日期的前一天的日期
|
// 传入最近的有效日期就可以拿到当前有效日期的前一天的日期
|
||||||
let yesterday = handleYesterday(this.lastDay)
|
let yesterday = handleYesterday(this.lastDay)
|
||||||
console.log(this.lastDay)
|
|
||||||
if ((yesterday.substr(yesterday.length-1,1)) === '0'){
|
if ((yesterday.substr(yesterday.length-1,1)) === '0'){
|
||||||
let date = new Date(this.lastDay)
|
let date = new Date(this.lastDay)
|
||||||
let y = date.getFullYear()
|
let y = date.getFullYear()
|
||||||
@ -633,7 +681,6 @@ export default {
|
|||||||
let day = this.$util.getThisMonthDay(this.lastDay)
|
let day = this.$util.getThisMonthDay(this.lastDay)
|
||||||
yesterday = `${y}-${m}-${day}`
|
yesterday = `${y}-${m}-${day}`
|
||||||
}
|
}
|
||||||
console.log('yesterday', yesterday)
|
|
||||||
// 定义入参 除了改变时间 别的和老项目一致
|
// 定义入参 除了改变时间 别的和老项目一致
|
||||||
const data = {
|
const data = {
|
||||||
Statistics_Date:yesterday,
|
Statistics_Date:yesterday,
|
||||||
@ -726,11 +773,9 @@ export default {
|
|||||||
Statistics_Date:this.lastDay,
|
Statistics_Date:this.lastDay,
|
||||||
ShowCompareRate: true
|
ShowCompareRate: true
|
||||||
}
|
}
|
||||||
console.log('allPriceData',allPriceData)
|
|
||||||
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
|
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
|
||||||
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
// 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||||
let result = res.Result_Data
|
let result = res.Result_Data
|
||||||
console.log('resultresultresult',result)
|
|
||||||
for(let key in result){
|
for(let key in result){
|
||||||
if (key!=='RevenuePushModel' && key!=='GrowthRate'){
|
if (key!=='RevenuePushModel' && key!=='GrowthRate'){
|
||||||
let all = 0
|
let all = 0
|
||||||
@ -782,14 +827,10 @@ export default {
|
|||||||
const date = new Date(e.detail.value).getTime()
|
const date = new Date(e.detail.value).getTime()
|
||||||
this.single = timestampToTime(date)
|
this.single = timestampToTime(date)
|
||||||
this.lastDay = e.detail.value
|
this.lastDay = e.detail.value
|
||||||
|
uni.setStorageSync('lastDay',this.lastDay)
|
||||||
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
|
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
|
||||||
this.onRefresh()
|
this.onRefresh()
|
||||||
},
|
},
|
||||||
//选择时间的点击事件
|
|
||||||
handleDateClick(){
|
|
||||||
// 用来修改对客营收的class属性
|
|
||||||
this.priceMove = false
|
|
||||||
},
|
|
||||||
showPie(obj) {
|
showPie(obj) {
|
||||||
let data = {
|
let data = {
|
||||||
series: []
|
series: []
|
||||||
@ -924,7 +965,6 @@ export default {
|
|||||||
|
|
||||||
//获取服务区门店商家数量列表(根据省份、服务区、区域、统计日期查询)
|
//获取服务区门店商家数量列表(根据省份、服务区、区域、统计日期查询)
|
||||||
const totalData = await request.$webGet('CommercialApi/BaseInfo/GetShopCountList',data)
|
const totalData = await request.$webGet('CommercialApi/BaseInfo/GetShopCountList',data)
|
||||||
console.log('totalData',totalData)
|
|
||||||
let all = 0
|
let all = 0
|
||||||
totalData.Result_Data.List.forEach(item=>{
|
totalData.Result_Data.List.forEach(item=>{
|
||||||
all+=item.SHOP_REVENUECOUNT
|
all+=item.SHOP_REVENUECOUNT
|
||||||
@ -1548,7 +1588,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
|
|||||||
.thisMonth,.thisYear{
|
.thisMonth,.thisYear{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 28px;
|
margin-top: 28px;
|
||||||
padding-bottom: 28px;
|
padding-bottom: 24px;
|
||||||
.titleTop{
|
.titleTop{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -89,14 +89,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p :class="item.HASPANTRY?'text':'unText'">男厕({{item.HASPANTRY?item.HASPANTRY:'0' }})</p>
|
<p :class="item.HASPANTRY?'text':'unText'">{{item.HASPANTRY?'男厕(' + item.HASPANTRY+')':'男厕' }}</p>
|
||||||
<p :class="item.HASTHIRDTOILETS?'text':'unText'">第三卫生间</p>
|
<p :class="item.HASTHIRDTOILETS?'text':'unText'">第三卫生间</p>
|
||||||
<p :class="item.HASCHILD?'text':'unText'">车辆维修</p>
|
<p :class="item.HASCHILD?'text':'unText'">车辆维修</p>
|
||||||
<p :class="item.HASWATERROOM?'text':'unText'">开水器({{item.HASWATERROOM?item.HASWATERROOM:'0' }})</p>
|
<p :class="item.HASWATERROOM?'text':'unText'">{{item.HASWATERROOM?'开水器(' + item.HASWATERROOM + ')':'开水器' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p :class="item.HASWIFI?'text':'unText'">女厕({{item.HASWIFI?item.HASWIFI:'0' }})</p>
|
<p :class="item.HASWIFI?'text':'unText'">{{item.HASWIFI?'女厕(' + item.HASWIFI + ')':'女厕' }}</p>
|
||||||
<p :class="item.TOILETCOUNT?'text':'unText'">潮汐厕位({{item.TOILETCOUNT?item.TOILETCOUNT:'0' }})</p>
|
<p :class="item.TOILETCOUNT?'text':'unText'">{{item.TOILETCOUNT?'潮汐厕位(' + item.TOILETCOUNT + ')':'潮汐厕位' }}</p>
|
||||||
<p :class="item.HASSHOWERROOM?'text':'unText'">车辆加水</p>
|
<p :class="item.HASSHOWERROOM?'text':'unText'">车辆加水</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -109,13 +109,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p :class="item.SMALLPARKING?'text':'unText'">轿车车位({{item.SMALLPARKING?item.SMALLPARKING:'0' }})</p>
|
<p :class="item.SMALLPARKING?'text':'unText'">{{item.SMALLPARKING?'轿车车位(' + item.SMALLPARKING + ')':'轿车车位' }}</p>
|
||||||
<p :class="item.TRUCKPACKING?'text':'unText'">货车车位({{item.TRUCKPACKING?item.TRUCKPACKING:'0' }})</p>
|
<p :class="item.TRUCKPACKING?'text':'unText'">{{item.TRUCKPACKING?'货车车位(' + item.TRUCKPACKING + ')':'货车车位' }}</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p :class="item.PACKING?'text':'unText'">客车车位({{item.PACKING?item.PACKING:'0' }})</p>
|
<p :class="item.PACKING?'text':'unText'">{{item.PACKING?'客车车位(' + item.PACKING + ')':'客车车位' }}</p>
|
||||||
<p :class="item.DANPACKING?'text':'unText'">危化品车位({{item.DANPACKING?item.DANPACKING:'0' }})</p>
|
<p :class="item.DANPACKING?'text':'unText'">{{item.DANPACKING?'危化品车位(' + item.DANPACKING +')':'危化品车位' }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -129,11 +129,11 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<p :class="item.DININGROOMCOUNT?'text':'unText'" class="text">餐饮</p>
|
<p :class="item.DININGROOMCOUNT?'text':'unText'" class="text">餐饮</p>
|
||||||
<p :class="item.HASMESSAGESEARCH?'text':'unText'" class="text">住宿</p>
|
<p :class="item.HASMESSAGESEARCH?'text':'unText'" class="text">住宿</p>
|
||||||
<p :class="item.BUSINESSTYPE?'text':'unText'" >{{item.BUSINESSTYPE }}</p>
|
<p class="model">{{item.BUSINESSTYPE }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<p :class="item.HASBACKGROUNDRADIO?'text':'unText'" >便利店</p>
|
<p :class="item.HASBACKGROUNDRADIO?'text':'unText'" >便利店</p>
|
||||||
<p :class="item.DININGBXCOUNT?'text':'unText'">商铺({{item.DININGBXCOUNT }})</p>
|
<p :class="item.DININGBXCOUNT?'text':'unText'">{{item.DININGBXCOUNT?'商铺('+item.DININGBXCOUNT+')':'商铺' }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -173,9 +173,8 @@ export default {
|
|||||||
this.getList(option)
|
this.getList(option)
|
||||||
}else if (option.isPicker==='true'){
|
}else if (option.isPicker==='true'){
|
||||||
this.isShowPicker = true
|
this.isShowPicker = true
|
||||||
console.log(1111)
|
let seat = uni.getStorageSync('seatInfo')
|
||||||
console.log('option',option)
|
this.handleSearch(seat.longitude,seat.latitude)
|
||||||
this.handleSearch(option.longitude,option.latitude)
|
|
||||||
this.getServiceList()
|
this.getServiceList()
|
||||||
}else{
|
}else{
|
||||||
this.getServiceList()
|
this.getServiceList()
|
||||||
@ -199,7 +198,6 @@ export default {
|
|||||||
latitude:latitude
|
latitude:latitude
|
||||||
}
|
}
|
||||||
const totalData = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',reqs)
|
const totalData = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',reqs)
|
||||||
console.log('totalData',totalData)
|
|
||||||
this.info = totalData.Result_Data
|
this.info = totalData.Result_Data
|
||||||
this.typeList[4].isShow = this.info.HASCHARGE
|
this.typeList[4].isShow = this.info.HASCHARGE
|
||||||
this.typeList[5].isShow = this.info.HASGUESTROOM
|
this.typeList[5].isShow = this.info.HASGUESTROOM
|
||||||
@ -260,7 +258,8 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.main{
|
.main{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 100vw;
|
||||||
position: relative;
|
position: relative;
|
||||||
.leftArrow{
|
.leftArrow{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -421,16 +420,15 @@ export default {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
min-width: 60px;
|
min-width: 60px;
|
||||||
padding-top: 2px;
|
}
|
||||||
.text{
|
.text{
|
||||||
font-size: 14px;
|
flex: 1;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
color: #160002;
|
font-weight: 400;
|
||||||
line-height: 20px;
|
color: #160002;
|
||||||
display: inline-block;
|
line-height: 20px;
|
||||||
vertical-algin: middle;
|
display: inline-block;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.subTitleArea{
|
.subTitleArea{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -463,7 +461,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.service{
|
.service{
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 12px 16px 0;
|
padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
|
||||||
.serviceItem{
|
.serviceItem{
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
.title{
|
.title{
|
||||||
@ -522,6 +520,17 @@ export default {
|
|||||||
color: #160002;
|
color: #160002;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
.model{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 18px;
|
||||||
|
padding:0 6px;
|
||||||
|
background: #EAEAEA;
|
||||||
|
border-radius: 2px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="leftArrow" :style="{top:(menu.top + ((menu.height - 24)/2) )+ 'px'}" @click="handleBack">
|
<div class="leftArrow" :style="{top:(menu.top + ((menu.height - 24)/2) )+ 'px'}" @click="handleBack">
|
||||||
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"></image>
|
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"></image>
|
||||||
</div>
|
</div>
|
||||||
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map"></map>
|
<map v-if="isShowMap" id="myMap" :longitude="longitude" :latitude="latitude" :markers="markers" class="map" show-location></map>
|
||||||
<div class="list" :style="{transform:isMoveUp?`translateY(calc(-40vh + ${menu.bottom + 5}px))`:''}">
|
<div class="list" :style="{transform:isMoveUp?`translateY(calc(-40vh + ${menu.bottom + 5}px))`:''}">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="topImg" @click="handleChangeUp">
|
<div class="topImg" @click="handleChangeUp">
|
||||||
@ -11,12 +11,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<picker class="pick" @change="handleChangeService" :value="selectIndex" :range="array" range-key="name">
|
<picker class="pick" @change="handleChangeService($event)" :value="selectIndex" :range="array" range-key="name">
|
||||||
<view class="picker">
|
<div class="box">
|
||||||
{{array[selectIndex].name?array[selectIndex].name:''}}
|
<view class="picker">
|
||||||
</view>
|
{{array[selectIndex].name?array[selectIndex].name:''}}
|
||||||
|
</view>
|
||||||
|
<image class="selectIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/upArrow.svg"></image>
|
||||||
|
</div>
|
||||||
</picker>
|
</picker>
|
||||||
<image class="selectIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/upArrow.svg"></image>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<input class="searchText" v-model="searchText" confirm-type="search" @confirm="handleSearch" placeholder="搜索服务区" placeholder-style="font-size: 14px;color: #A69E9F;"/>
|
<input class="searchText" v-model="searchText" confirm-type="search" @confirm="handleSearch" placeholder="搜索服务区" placeholder-style="font-size: 14px;color: #A69E9F;"/>
|
||||||
@ -24,14 +26,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="serviceList" :style="{height:isMoveUp?`calc(100vh - 90px - ${menu.bottom + 5}px)`:''}">
|
<div class="serviceList" :style="{height:isMoveUp?`calc(100vh - 90px - ${menu.bottom + 5}px)`:''}">
|
||||||
<div class="serviceItem" v-for="(item,index) in serviceList" :key="index" @click="handleGoDetail(item.SERVERPART_ID)">
|
<div class="serviceItem" v-for="(item,index) in serviceList" :key="index" @click="handleGoDetail(item.SERVERPART_ID,item)">
|
||||||
<div class="topItem">
|
<div class="topItem">
|
||||||
<p class="title">{{item.SERVERPART_NAME }}</p>
|
<p class="title">{{item.SERVERPART_NAME }}</p>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/phone.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/phone.svg"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="imgBox" style="margin-right: 0px">
|
<div class="imgBox" style="margin-right: 0px" @click.stop="handleGomap(item)">
|
||||||
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/map.svg"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/map.svg"></image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -64,9 +66,12 @@ export default {
|
|||||||
name: "index",
|
name: "index",
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
isShowMap:false,
|
||||||
|
longitude: null,
|
||||||
|
latitude: null,
|
||||||
|
userLongitude:null,
|
||||||
|
userLatitude:null,
|
||||||
mapCtx: {},
|
mapCtx: {},
|
||||||
latitude:30.207269999999998,//维度
|
|
||||||
longitude:120.18023,//经度
|
|
||||||
menu:{},//手机参数
|
menu:{},//手机参数
|
||||||
statusBarHeight:'',// 每个手机的状态栏高度
|
statusBarHeight:'',// 每个手机的状态栏高度
|
||||||
selectIndex:0,//服务区选择器选择的值
|
selectIndex:0,//服务区选择器选择的值
|
||||||
@ -74,46 +79,93 @@ export default {
|
|||||||
serviceList:[],
|
serviceList:[],
|
||||||
searchText:'',
|
searchText:'',
|
||||||
isMoveUp:false, //是否展开
|
isMoveUp:false, //是否展开
|
||||||
|
chartType:false,//是否从图表也跳过来
|
||||||
|
page:'',//从哪个图表也跳过来
|
||||||
|
markers:'',//地图属性
|
||||||
|
covers:'',//地图属性
|
||||||
|
isFirst:true,//是否是第一次进页面
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(option){
|
||||||
|
console.log('option',option)
|
||||||
|
let serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
|
if (option.chartType){
|
||||||
|
this.chartType = true
|
||||||
|
}
|
||||||
|
let userSeat = uni.getStorageSync('seatInfo')
|
||||||
|
this.userLatitude = userSeat.latitude
|
||||||
|
this.userLongitude = userSeat.longitude
|
||||||
|
this.page = option.page
|
||||||
|
let seat = uni.getStorageSync('currentService')
|
||||||
|
if (seat){
|
||||||
|
console.log('seat',seat)
|
||||||
|
this.longitude = seat.longitude
|
||||||
|
this.latitude = seat.latitude
|
||||||
|
this.addMarkers(seat)
|
||||||
|
}else{
|
||||||
|
this.getServiceDetail(serviceInfo.Serverpart_ID)
|
||||||
|
}
|
||||||
// 获取手机参数
|
// 获取手机参数
|
||||||
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()
|
||||||
console.log('this.menu',this.menu)
|
|
||||||
// 地图初始化
|
// 地图初始化
|
||||||
this.mapCtx = uni.createMapContext('myMap')
|
this.mapCtx = uni.createMapContext('myMap')
|
||||||
this.getServiceList()
|
this.getServiceList()
|
||||||
this.getLocation()
|
// this.getLocation()
|
||||||
// this.getListData()
|
// this.getListData()
|
||||||
},
|
},
|
||||||
|
onHide(){
|
||||||
|
this.isShowMap = false
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
//跳转到腾讯地图
|
||||||
|
handleGomap(item){
|
||||||
|
let key='STWBZ-DKCR4-J6UUF-FRD5I-3EBN2-GDBOT'
|
||||||
|
let referer ='goMap'
|
||||||
|
let endPoint={
|
||||||
|
'name': item.SERVERPART_NAME,
|
||||||
|
latitude: item.SERVERPART_Y,
|
||||||
|
longitude: item.SERVERPART_X
|
||||||
|
}
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `plugin://chooseLocation/index?key=${key}&referer=${referer}&location=${JSON.stringify(endPoint)}`
|
||||||
|
});
|
||||||
|
},
|
||||||
//返回上一级页面
|
//返回上一级页面
|
||||||
handleBack(){
|
handleBack(){
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//获取服务区详情信息
|
||||||
|
async getServiceDetail(id){
|
||||||
|
console.log('id',id)
|
||||||
|
let req = {
|
||||||
|
ServerpartId:id
|
||||||
|
}
|
||||||
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
|
||||||
|
console.log('data',data)
|
||||||
|
this.longitude = data.Result_Data.ServerpartInfo.SERVERPART_X
|
||||||
|
this.latitude = data.Result_Data.ServerpartInfo.SERVERPART_Y
|
||||||
|
this.isShowMap = true
|
||||||
|
},
|
||||||
//获取片区列表
|
//获取片区列表
|
||||||
async getServiceList(){
|
async getServiceList(){
|
||||||
let req = {
|
let req = {
|
||||||
Province_Code:'340000'
|
Province_Code:'340000'
|
||||||
}
|
}
|
||||||
const data = await request.$webGet('CommercialApi/BaseInfo/GetSPRegionList',req)
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetSPRegionList',req)
|
||||||
console.log('data22222',data)
|
|
||||||
this.array = data.Result_Data.List
|
this.array = data.Result_Data.List
|
||||||
|
await this.getLocation()
|
||||||
},
|
},
|
||||||
//选择服务区
|
//选择服务区
|
||||||
handleChangeService(e){
|
handleChangeService(e){
|
||||||
console.log('e',e)
|
|
||||||
this.selectIndex = Number(e.detail.value)
|
this.selectIndex = Number(e.detail.value)
|
||||||
let value = this.array[Number(e.detail.value)].value
|
this.getListData()
|
||||||
this.getListData(value)
|
|
||||||
},
|
},
|
||||||
//搜索框触发的方法
|
//搜索框触发的方法
|
||||||
async handleSearch(){
|
async handleSearch(){
|
||||||
|
|
||||||
let req = {
|
let req = {
|
||||||
longitude:this.longitude,
|
longitude:this.longitude,
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
@ -125,21 +177,45 @@ export default {
|
|||||||
this.serviceList = data.Result_Data.List
|
this.serviceList = data.Result_Data.List
|
||||||
},
|
},
|
||||||
//跳转相对应的服务区详情界面
|
//跳转相对应的服务区详情界面
|
||||||
handleGoDetail(id){
|
handleGoDetail(id,item){
|
||||||
uni.navigateTo({
|
console.log('item',item)
|
||||||
url:`/pages/map/detail?SERVERPART_ID=${id}&latitude${this.latitude}&longitude=${this.longitude}&isPicker=${false}`
|
if (this.chartType){
|
||||||
})
|
let res = {
|
||||||
},
|
SERVERPART_NAME:item.SERVERPART_NAME,//服务区
|
||||||
async getListData(value){
|
SPREGIONTYPE_NAME:item.SPREGIONTYPE_NAME,//片区
|
||||||
let req = {
|
Serverpart_ID:item.SERVERPART_ID,
|
||||||
longitude:this.longitude,
|
longitude:item.SERVERPART_X,
|
||||||
Province_Code:'340000',
|
latitude:item.SERVERPART_Y,
|
||||||
latitude:this.latitude,
|
}
|
||||||
SPRegionType_ID:value?value:this.array[this.selectIndex].value
|
uni.setStorageSync('currentService',res) //当前选中服务区信息
|
||||||
|
let time = uni.getStorageSync('lastDay')
|
||||||
|
uni.redirectTo({
|
||||||
|
url:`${this.page}?serviceInfo=${JSON.stringify(res)}&chartType=${true}&time=${time}`
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/map/detail?SERVERPART_ID=${id}&isPicker=${false}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getListData(){
|
||||||
|
let id
|
||||||
|
if (this.isFirst){
|
||||||
|
this.isFirst=false
|
||||||
|
id = ''
|
||||||
|
}else{
|
||||||
|
if (this.array[this.selectIndex] && this.array[this.selectIndex].value){
|
||||||
|
id = this.array[this.selectIndex].value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = {
|
||||||
|
Province_Code: '340000',
|
||||||
|
SPRegionType_ID: id,
|
||||||
|
longitude:this.longitude,
|
||||||
|
latitude:this.latitude
|
||||||
}
|
}
|
||||||
console.log('req',req)
|
|
||||||
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
console.log('data',data)
|
|
||||||
this.serviceList = data.Result_Data.List
|
this.serviceList = data.Result_Data.List
|
||||||
},
|
},
|
||||||
//点击向上移动
|
//点击向上移动
|
||||||
@ -150,23 +226,46 @@ export default {
|
|||||||
this.isMoveUp = true
|
this.isMoveUp = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getLocation(){
|
async getLocation(){
|
||||||
let _this = this
|
let seat = uni.getStorageSync('seatInfo')
|
||||||
uni.getFuzzyLocation({
|
if (!seat){
|
||||||
type:'gcj02',
|
console.log(11111)
|
||||||
altitude:true,
|
let _this = this
|
||||||
success:function (res){
|
uni.getFuzzyLocation({
|
||||||
console.log('res21312',res)
|
type:'gcj02',
|
||||||
this.latitude = res.latitude
|
altitude:true,
|
||||||
this.longitude = res.latitude
|
success:function (res){
|
||||||
console.log('this.latitude',this.latitude)
|
this.latitude = res.latitude
|
||||||
_this.getListData()
|
this.longitude = res.longitude
|
||||||
}
|
_this.getListData()
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
await this.getListData()
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//添加标点
|
//添加标点
|
||||||
addMarkers(){
|
addMarkers(value){
|
||||||
|
console.log('addMarkers')
|
||||||
|
let markers = []
|
||||||
|
markers.push({
|
||||||
|
// iconPath: 'https://eshangtech.com/ShopICO/ahyd-BID/service/health.svg',
|
||||||
|
id: value.Serverpart_ID,
|
||||||
|
latitude: value.latitude,
|
||||||
|
longitude: value.longitude,
|
||||||
|
height: 30,
|
||||||
|
width: 20,
|
||||||
|
callout: {
|
||||||
|
padding: '6',
|
||||||
|
borderRadius: '4',
|
||||||
|
display: 'ALWAYS'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// }
|
||||||
|
this.markers = markers
|
||||||
|
this.isShowMap = true
|
||||||
|
console.log('this.markers',this.markers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,20 +326,24 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
.left{
|
.left{
|
||||||
width: 30%;
|
width: 30%;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
.picker{
|
.pick{
|
||||||
font-size: 14px;
|
.box{
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
display: flex;
|
||||||
font-weight: 400;
|
align-items: center;
|
||||||
color: #160002;
|
.picker{
|
||||||
line-height: 20px;
|
font-size: 14px;
|
||||||
}
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
.selectIcon{
|
font-weight: 400;
|
||||||
width: 15px;
|
color: #160002;
|
||||||
height: 15px;
|
line-height: 20px;
|
||||||
margin-left: 6px;
|
}
|
||||||
|
.selectIcon{
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.left:after{
|
.left:after{
|
||||||
|
|||||||
@ -62,10 +62,6 @@ export default {
|
|||||||
lastDay:{
|
lastDay:{
|
||||||
type:String,
|
type:String,
|
||||||
default:""
|
default:""
|
||||||
},
|
|
||||||
noticeInfo:{
|
|
||||||
type:Object,
|
|
||||||
default:()=>{}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
@ -87,7 +83,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}else if(item.value === 3 && item.isNotice || item.value ===4 && item.isNotice){
|
}else if(item.value === 3 && item.isNotice || item.value ===4 && item.isNotice){
|
||||||
if (item.name==='基础信息'){
|
if (item.name==='基础信息'){
|
||||||
this.$util.toNextRoute('navigateTo', `${item.homeUrl}?isPicker=${true}&latitude=${this.noticeInfo.latitude}&longitude=${this.noticeInfo.longitude}`)
|
this.$util.toNextRoute('navigateTo', `${item.homeUrl}?isPicker=${true}`)
|
||||||
}else{
|
}else{
|
||||||
this.$util.toNextRoute('navigateTo', item.homeUrl)
|
this.$util.toNextRoute('navigateTo', item.homeUrl)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="menu" :style="{ top: -(117 - menu.bottom) + 'px' }">
|
<view class="menu" :style="{ top: -(117 - menu.bottom) + 'px' }">
|
||||||
<userList v-for="(item, index) in dataList" :key="index" :item='item' :lastDay="lastDay" :noticeInfo="noticeInfo"></userList>
|
<userList v-for="(item, index) in dataList" :key="index" :item='item' :lastDay="lastDay" ></userList>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<Tabbar ref="tabbar" :page="page" ></Tabbar>
|
<Tabbar ref="tabbar" :page="page" ></Tabbar>
|
||||||
@ -258,10 +258,6 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
noticeInfo:{
|
|
||||||
latitude:0,//维度
|
|
||||||
longitude:0,//经度
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
@ -336,20 +332,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
|
|||||||
},
|
},
|
||||||
handleGoEmpower(){
|
handleGoEmpower(){
|
||||||
this.$util.toNextRoute('navigateTo', '/pages/register/register')
|
this.$util.toNextRoute('navigateTo', '/pages/register/register')
|
||||||
},
|
}
|
||||||
getLocation(){
|
|
||||||
uni.getFuzzyLocation({
|
|
||||||
type:'gcj02',
|
|
||||||
altitude:true,
|
|
||||||
success:function (res){
|
|
||||||
console.log('res21312',res)
|
|
||||||
this.noticeInfo={
|
|
||||||
latitude:res.latitude,
|
|
||||||
longitude:res.latitude
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -543,7 +526,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 24px 16px calc(env(safe-area-inset-bottom) + 72px) 16px;
|
padding: 24px 16px calc(env(safe-area-inset-bottom) + 82px) 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 32rpx 32rpx 2rpx 2rpx;
|
border-radius: 32rpx 32rpx 2rpx 2rpx;
|
||||||
.main{
|
.main{
|
||||||
|
|||||||
@ -44,3 +44,4 @@ export function handleYesterday(value) {
|
|||||||
const d = date.getDate() - 1
|
const d = date.getDate() - 1
|
||||||
return `${y}-${m}-${d}`
|
return `${y}-${m}-${d}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user