This commit is contained in:
cclu 2023-04-06 20:20:00 +08:00
parent 87eafb02ed
commit 5137dcd55f
30 changed files with 651 additions and 282 deletions

View File

@ -239,6 +239,16 @@ function getThisMonthDay(value){
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,
cutDate,
getThisMonthDay,
getThisMonth,
fmoney,
noDecimal,
changeStringToDate,

View File

@ -66,6 +66,12 @@
"minified" : true,
"postcss" : true
},
"plugins": {
"chooseLocation": {
"version": "1.0.10",
"provider": "wx76a9a06e5b4e693e"
}
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {

View File

@ -1,31 +1,47 @@
<template>
<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="chartsItem">
<p class="title">交易分析</p>
<transaction-analysis :data="transactionList" />
<div v-if="transactionList">
<transaction-analysis :data="transactionList" />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">消费时段分析</p>
<time-period-analysis :data="timePeriodList"/>
<analyse />
<div v-if="timePeriodList.series.length>0">
<time-period-analysis :data="timePeriodList"/>
<analyse />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">消费水平<text class="unit">(Top 5)</text></p>
<level-top :data="levelTopList"></level-top>
<analyse />
<div v-if="levelTopList.series.length>0">
<level-top :data="levelTopList"></level-top>
<analyse />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">业态适配型</p>
<business-format :data="businessTypeList"/>
<analyse />
<div v-if="businessTypeList.series[0].data.length>0">
<business-format :data="businessTypeList"/>
<analyse />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">消费转化对比图</p>
<consumption-compare :data="compareList"/>
<analyse />
<div v-if="compareList.series[0].data.length>0">
<consumption-compare :data="compareList"/>
<analyse />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">商超畅销品</p>
@ -46,10 +62,12 @@ import LevelTop from "./components/bussiness/levelTop.vue";
import BusinessFormat from "./components/bussiness/businessFormat.vue";
import ConsumptionCompare from "./components/bussiness/consumptionCompare.vue";
import BestsellerShop from "./components/bussiness/bestsellerShop.vue";
import NoData from "./components/noData.vue";
export default {
name: "businessPortrait",
components: {
NoData,
BestsellerShop,
ConsumptionCompare,
BusinessFormat, LevelTop, analyse, TimePeriodAnalysis, headerTop,transactionAnalysis},
@ -60,6 +78,7 @@ export default {
title:'交易画像',//
bgColor:'180deg, #FFBA07 0%, #F38309 100%',
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/businessPortraitBg.svg',//
page:'/pages/commercialBI/businessPortrait',
time: '',//
menu: {},//
transactionList:[],//
@ -67,18 +86,27 @@ export default {
levelTopList:[],//
businessTypeList:[],//
compareList:[],//
bestsellerList:[]//
bestsellerList:[],//
serviceInfo:{} //
}
},
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()
//
uni.setStorageSync('phoneInfo', systemInfo)
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
if (!storeServiceInfo){
this.nearestService()
}
//
this.getTransactionList()
//
@ -93,11 +121,30 @@ export default {
this.getBestsellerList()
},
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(){
let req = {
Province_Code:'340000',
Statistics_Date:this.time,
Serverpart_ID:416,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
ShowConsumptionLevel:true,
ShowConvertRate:true
}
@ -108,8 +155,8 @@ export default {
async getTimePeriodList(){
let req = {
Province_Code:'340000',
Statistics_Date:'2023-04-02',
Serverpart_ID:416
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID
}
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionTimeAnalysis',req)
@ -121,7 +168,6 @@ export default {
}
]
}
console.log('res',res)
// let res={
// series: [
// {
@ -135,8 +181,8 @@ export default {
async getLevelTopList(){
let req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-02',
ServerpartId:416,
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ShowWholeTrade:true
}
let res = {
@ -168,13 +214,14 @@ export default {
// }
// ]
// }
console.log('res',res)
this.levelTopList = res
},
async getBusinessTypeList(){
const req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-02',
serverpartId:416
StatisticsDate:this.time,
serverpartId:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
let res = []
@ -194,17 +241,17 @@ export default {
}
]
};
console.log('result',result)
this.businessTypeList = result
},
async getCompareList(){
const req = {
Province_Code:'340000',
Statistics_Date:'2023-04-02',
Serverpart_ID:471
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetTransactionConvert',req)
console.log('data',data)
let customerOrder = []
let customerMax = 0
let carLit = []
@ -245,7 +292,6 @@ export default {
}
]
}
console.log('res',res)
// let res = {
// categories: ["0:00","4:00","8:00","12:00","16:00","20:00","24:00"],

View File

@ -22,8 +22,8 @@
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
<view class="select">
<view class="content">
<view class="uni-input">大龙山服务区</view>
<p class="area">安庆片区</p>
<view class="uni-input">{{serviceInfo.SERVERPART_NAME}}</view>
<p class="area">{{serviceInfo.SPREGIONTYPE_NAME}}</p>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
@ -105,7 +105,8 @@ export default {
carTypeTimeData:[],//
timeAnalysisData:[],//
percentEntryData:[],//
percentEntryDataAll:[]//
percentEntryDataAll:[],//
serviceInfo:{} //
}
},
components: {PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis},
@ -115,10 +116,14 @@ export default {
}
},
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
// id
this.Serverpart_ID = option.Serverpart_ID
let storeTime = uni.getStorageSync('lastDay')
this.time = storeTime?storeTime:option.time
//
let systemInfo = uni.getSystemInfoSync()
//
@ -127,6 +132,9 @@ export default {
this.menu = uni.getMenuButtonBoundingClientRect()
//
// prop
if (!storeServiceInfo){
this.nearestService()
}
//
this.getCarData()
//
@ -142,15 +150,35 @@ export default {
},
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() {
uni.navigateTo({
url:'/pages/map/index'
url:`/pages/map/index?chartType=${true}&page=/pages/commercialBI/carPortrait&serviceInfo=${JSON.stringify(this.serviceInfo)}`
})
},
handleBack(){
uni.navigateBack({
delta: 1
uni.switchTab({
url: '/pages/index/index'
})
},
//
@ -173,7 +201,6 @@ export default {
this.getTimeAnalysis(Serverpart_Region)
//
this.percentEntryData = this.percentEntryDataAll[this.selectTab]
console.log('this.percentEntryData',this.percentEntryData)
// this.tabIsTrue = false
// setTimeout(()=>{
// this.tabIsTrue = true
@ -182,15 +209,15 @@ export default {
},
bindPickerChange:function (e){
console.log(e)
},
getCarData(){
console.log('this.serviceInfo',this.serviceInfo)
request.$webGet('CommercialApi/Revenue/GetBayonetEntryList',{
StatisticsDate: this.time,
Serverpart_ID :this.Serverpart_ID
Serverpart_ID :this.serviceInfo.Serverpart_ID
}).then(res=>{
console.log('res.Result_Data.List',res)
this.carData = res.Result_Data.List
console.log('this.carData',this.carData)
})
},
getHomeData(){
@ -203,7 +230,7 @@ export default {
let statistic = `${y}${m}`
request.$webGet('CommercialApi/Revenue/GetBayonetOAList',{
StatisticsMonth:statistic,
Serverpart_ID:this.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
ContainWhole:true
}).then(res=>{
//
@ -244,7 +271,7 @@ export default {
getCarTypeTime(){
request.$webGet('CommercialApi/Revenue/GetBayonetSTAList',{
StatisticsDate:this.time,
Serverpart_ID:this.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
ContainWhole:true
}).then(res=>{
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[2] ={categories:result[2].Vehicle_Type, series:[series[5],series[4]]}
this.carTypeTimeData = this.carTypeTimeDataAll[this.selectTab]
console.log('this.carTypeTimeData',this.carTypeTimeData)
})
// categories: ["","","",""],
// series: [{name:'',data:[30,38,20,10]},
@ -294,12 +320,11 @@ export default {
StartMonth:`${y}${m}`,
EndMonth:`${y}${m}`,
Province_Code:'340000',
Serverpart_ID:this.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_Region: data
}).then(res=>{
let result = res.Result_Data.List
this.timeAnalysisData = result
console.log('resulttimeAnalysisData',result)
})
@ -313,13 +338,10 @@ export default {
request.$webGet('CommercialApi/Revenue/GetSPBayonetList',{
Statistics_Date: this.time,
Province_Code:'340000',
Serverpart_ID :this.Serverpart_ID,
Serverpart_ID :this.serviceInfo.Serverpart_ID,
GroupType:2
}).then(res=>{
console.log('getPercentEntry',res)
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]
})
}

View File

@ -47,7 +47,8 @@ export default {
handler(value) {
this.shopList = value
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -68,7 +69,7 @@ export default {
width: _this.width / 2,
height: 165,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -26,7 +26,8 @@ export default {
data: {
handler(value) {
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -46,7 +47,7 @@ export default {
width: _this.width,
height: 280,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -26,7 +26,8 @@ export default {
data: {
handler(value) {
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -58,7 +59,7 @@ export default {
height: 240,
categories: data.categories,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -26,7 +26,8 @@ export default {
data: {
handler(value) {
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -47,7 +48,7 @@ export default {
height: 272,
categories: data.categories,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -27,7 +27,8 @@ export default {
handler(value) {
console.log('value1111',value)
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -47,7 +48,7 @@ export default {
width: _this.width,
height: 200,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -84,7 +84,6 @@ export default {
//
text = item.Serverpart_Region + '区 ' + value .toFixed(2) + '%'
}
console.log('text.length',text.length)
probabilityData.push({
name: text,
@ -127,7 +126,7 @@ export default {
width: _this.width,
height: 208,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -3,10 +3,9 @@
<div class="bandItem" v-for="(item,index) in dataList" :key="index">
<p class="title">{{item.name}}</p>
<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.normal)!==0" class="normal" :style="{width:item.normal + '%',left:item.small+'%'}">{{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.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:`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:`calc(${item.normal + item.small}% - 4px)`}">{{item.big<16?'':item.big + '%'}}</div>
</div>
</div>
<div class="key">
@ -48,7 +47,8 @@ export default {
handler(value) {
console.log('carDatawatch', value)
this.dataList = value
}
},
immediate: true
}
},
methods: {
@ -73,6 +73,7 @@ export default {
.progress{
width: 100%;
height: 20px;
box-sizing: border-box;
margin-top: 6px;
position: relative;
font-size: 12px;
@ -85,13 +86,11 @@ export default {
height: 100%;
position: absolute;
top: 0;
left: 0;
border-radius: 2px 0 0 2px;
border-radius: 0 2px 2px 0 ;
box-sizing: border-box;
padding-left: 4px;
background: #1E80FF;
}
.normal{
display: flex;
align-items: center;
@ -118,7 +117,7 @@ export default {
position: absolute;
box-sizing: border-box;
padding-left: 4px;
border-radius: 0 2px 2px 0 ;
border-radius: 2px 0 0 2px ;
background: #CAD0DA;
}
.small:after{

View File

@ -60,7 +60,8 @@ export default {
handler(value) {
console.log('carDatawatch', value)
this.dataList = value
}
},
immediate: true
}
},
}

View File

@ -25,8 +25,10 @@ export default {
watch: {
data: {
handler(value) {
console.log('23123123',value)
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -47,7 +49,7 @@ export default {
height: 282,
categories: data.categories,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -29,7 +29,8 @@ export default {
handler(value) {
console.log('carDatawatch', value)
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -49,7 +50,7 @@ export default {
width: _this.width,
height: 289,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -25,7 +25,8 @@ export default {
handler(value) {
console.log('fdjsfhsdjkf',value)
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {

View File

@ -48,7 +48,7 @@ export default {
height: 294,
categories: data.categories,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -48,8 +48,10 @@ export default {
watch: {
data: {
handler(value) {
console.log('value',value)
this.genderList = value
}
},
immediate: true
}
},
methods: {

View File

@ -76,7 +76,7 @@ export default {
width: _this.width,
height: 193,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -16,9 +16,9 @@
<view class="select">
<view class="content">
<!-- <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">合肥片区</text>
<text class="area">{{spregionTypeName}}</text>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
@ -66,7 +66,23 @@ export default {
topBg:{
type:String,
default: ""
}
},
serverpartName:{
type:String,
deafault:''
},
spregionTypeName:{
type:String,
deafault:''
},
page:{
type:String,
default:''
},
serviceInfo:{
type:Object,
default:()=>{}
}
},
data() {
return {
@ -80,16 +96,16 @@ export default {
bindPickerChange(){
},
//
//s
handleBack(){
uni.navigateBack({
delta: 1
uni.switchTab({
url: '/pages/index/index'
})
},
//
handleGoSelectService(){
uni.navigateTo({
url:'/pages/map/index'
url:`/pages/map/index?page=${this.page}&chartType=${true}&serviceInfo=${JSON.stringify(this.serviceInfo)}`
})
}
}

View File

@ -25,12 +25,10 @@ export default {
watch: {
data: {
handler(value) {
console.log('carDatawatch', value)
this.comparePath = ''
console.log('comparePath',this.comparePath)
this.handleCarData(value)
},
deep:true
immediate: true
}
},
methods: {
@ -62,7 +60,6 @@ export default {
return number * 2000
},
drawCharts(id, data,config) {
console.log('data')
const ctx = uni.createCanvasContext(id, this);
let _this = this
let phoneInfo = uni.getStorageSync('phoneInfo')

View File

@ -26,7 +26,8 @@ export default {
handler(value) {
console.log('carDatawatch', value)
this.handleCarData(value)
}
},
immediate: true
}
},
methods: {
@ -53,7 +54,7 @@ export default {
height: 213,
categories: data.categories,
series: data.series,
animation: true,
animation: false,
rotate: false,
rotateLock: false,
background: "#FFFFFF",

View File

@ -1,31 +1,44 @@
<template>
<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="chartsItem">
<p class="title">业态充盈度</p>
<filling-degree :data="fillDegreeList" />
<analyse />
<div v-if="fillDegreeList.series[0].data.length>0">
<filling-degree :data="fillDegreeList" />
<analyse />
</div>
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">品牌消费水平<text class="unit">(Top 5)</text></p>
<band-level :data="bandLevelList"/>
<analyse />
<div v-if="bandLevelList.length>0">
<band-level :data="bandLevelList"/>
<analyse />
</div>
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">业态消费水平<text class="unit">(Top 5)</text></p>
<consumption-level :data="consumLevelList" />
<analyse />
<div v-if="consumLevelList.series.length>0">
<consumption-level :data="consumLevelList" />
<analyse />
</div>
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">品牌指数</p>
<div class="labelList">
<div class="labelItem" v-for="(item,index) in brandLabelList" :key="index">
<p class="name">{{item[0]}}<text class="number">({{item[1]}})</text></p>
<div v-if="brandInfoList.length>0">
<div class="labelList">
<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>
<band-number :data="brandInfoList"/>
</div>
<band-number :data="brandInfoList"/>
<no-data v-else/>
</div>
</div>
</div>
@ -39,10 +52,11 @@ import FillingDegree from "./components/format/fillingDegree.vue";
import BandLevel from "./components/format/bandLevel.vue";
import ConsumptionLevel from "./components/format/consumLevel.vue";
import BandNumber from "./components/format/bandNumber.vue";
import NoData from "./components/noData.vue";
export default {
name: "businessPortrait",
components: {BandNumber, ConsumptionLevel, BandLevel, FillingDegree, analyse, headerTop},
components: {NoData, BandNumber, ConsumptionLevel, BandLevel, FillingDegree, analyse, headerTop},
data() {
return {
topBg:'linear-gradient(180deg, #C6C1F0 0%, #CECBF3 100%);',//
@ -50,6 +64,7 @@ export default {
title:'业态品牌',//
bgColor: '180deg, #459FFF 0%, #473AFF 100%',
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/formatPortraitBg.svg',//
page:'/pages/commercialBI/formatPortrait',
time: '',//
menu: {},//
fillDegreeList:[],//
@ -61,18 +76,27 @@ export default {
{name:'这是品类名称',value:5},
{name:'省内品牌',value:3},
{name:'地方特色',value:8}],//
brandInfoList:[]//
brandInfoList:[],//
serviceInfo:{} //
}
},
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()
//
uni.setStorageSync('phoneInfo', systemInfo)
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
if (!storeServiceInfo){
this.nearestService()
}
//
this.getFillDegreeList()
//
@ -83,11 +107,30 @@ export default {
this.getBrandInfoList()
},
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(){
const req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-02',
serverpartId:416
StatisticsDate:this.time,
serverpartId:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi//Revenue/GetBusinessTradeRevenue',req)
let res = []
@ -128,8 +171,8 @@ export default {
let req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-03',
ServerpartId:416,
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ShowWholeBrand:false
}
let res =[]
@ -158,8 +201,8 @@ export default {
let req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-02',
ServerpartId:416,
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ShowWholeTrade:false
}
let res = {
@ -192,12 +235,13 @@ export default {
// ]
// }
this.consumLevelList = res
console.log('this.consumLevelList',this.consumLevelList)
},
async getBrandInfoList(){
let req = {
ProvinceCode:'340000',
Serverpart_ID:416,
Statistics_Date:'2023-04-02'
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Statistics_Date:this.time
}
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
console.log('totalData',totalData)

View File

@ -1,31 +1,47 @@
<template>
<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="chartsItem">
<p class="title">客群分析</p>
<customer-first :data="customer" />
<div v-if="customer">
<customer-first :data="customer" />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">客群分析</p>
<customer-second :data="genderBubbleList" />
<analyse />
<div v-if="genderBubbleList.res.length!==0">
<customer-second :data="genderBubbleList" />
<analyse />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">客群消费偏好</p>
<consum-prefer :data="consterPreferList" />
<analyse />
<div v-if="consterPreferList.categories.length!==0">
<consum-prefer :data="consterPreferList" />
<analyse />
</div>
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">客群消费水平</p>
<consumption-level :data="consumptionLevelList"/>
<analyse />
<div v-if="consumptionLevelList.length>0">
<consumption-level :data="consumptionLevelList"/>
<analyse />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">业态消费偏好</p>
<business-type :data="businessTypeList"></business-type>
<analyse />
<div v-if="businessTypeList.length>0">
<business-type :data="businessTypeList"></business-type>
<analyse />
</div>
<no-data v-else />
</div>
</div>
</div>
@ -51,18 +67,25 @@ export default {
title:'客群画像',//
bgColor:'180deg, #30C8ED 0%, #0B9353 100%',//
bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/commercial/guestPortraitBg.svg',//
page:'/pages/commercialBI/guestPortrait',
time:'',//
menu:{},//
customer:{}, //
genderBubbleList:[],//
consterPreferList:{},//
consumptionLevelList:[],//
businessTypeList:[]//
businessTypeList:[],//
serviceInfo:{} //
}
},
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()
//
@ -72,6 +95,9 @@ export default {
//
// prop
// 便
if (!storeServiceInfo){
this.nearestService()
}
//customer
this.getCustomer()
//
@ -84,13 +110,33 @@ export default {
this.getBusinessTypeList()
},
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
// async await
async getCustomer(){
const req = {
Province_Code:'340000',
Statistics_Date:'2023-04-02',
Serverpart_ID:416,
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
ShowConsumptionLevel:true,
ShowConvertRate:true
}
@ -107,8 +153,8 @@ export default {
const req = {
statisticsType:2,
provinceCode:'340000',
serverpartId:416,
statisticsMonth:'202303'
serverpartId:this.serviceInfo.Serverpart_ID,
statisticsMonth:this.$util.getThisMonth(this.time)
}
let totalData = await request.$webGet('CommercialApi/Customer/GetCustomerRatio',req)
totalData.Result_Data.List.forEach(item=>{
@ -121,12 +167,11 @@ export default {
})
const bubbleReq = {
provinceCode:'340000',
serverpartId:416,
statisticsMonth:'202303'
serverpartId:this.serviceInfo.Serverpart_ID,
statisticsMonth:this.$util.getThisMonth(this.time)
}
let bubbleData = await request.$webGet('CommercialApi/Customer/GetCustomerGroupRatio',bubbleReq)
console.log('bubbleData',bubbleData)
result.res = bubbleData.Result_Data.List
// let res = [
// {
@ -151,10 +196,10 @@ export default {
const req = {
statisticsType:1,
startMonth:`202303`,
endMonth:`202303`,
startMonth:this.$util.getThisMonth(this.time),
endMonth:this.$util.getThisMonth(this.time),
provinceCode: '340000',
serverpartId: 416
serverpartId: this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi/Customer/GetCustomerSaleRatio',req)
let res = {
@ -171,7 +216,6 @@ export default {
res.series[1].data.push(item.FemaleRatio)
})
res.max = data.Result_Data.MaxSexRatio
// let res = {
// categories: ['','','','','',''],
// series: [
@ -185,13 +229,13 @@ export default {
async getConsumptionLevelList(){
const req = {
provinceCode:'340000',
serverpartId:416,
statisticsMonth:'202303'
serverpartId:this.serviceInfo.Serverpart_ID,
statisticsMonth:this.$util.getThisMonth(this.time)
}
const data = await request.$webGet('CommercialApi/Customer/GetCustomerConsumeRatio',req)
let res = []
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'},
@ -202,10 +246,10 @@ export default {
async getBusinessTypeList(){
const req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-02',
serverpartId:416
StatisticsDate:this.time,
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 all = 0
if (data.Result_Data){

View File

@ -1,6 +1,7 @@
<template>
<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="chartsItem">
@ -25,24 +26,30 @@
<div class="money">
<div class="top">
<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 class="bottom">
<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>
</div>
</div>
</div>
<div class="subItem">
<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 class="subItem ">
<p class="title" style="margin-top: 20px">营收趋势</p>
<revenue-trends :data="trendsList"/>
<analyse/>
<div v-if="trendsList.series.length>0">
<revenue-trends :data="trendsList"/>
</div>
<no-data v-else/>
</div>
<analyse/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">营收占比</p>
@ -173,10 +180,11 @@ import MoneyCompare from "./components/manager/moneyCompare.vue";
import analyse from "./components/analyse.vue";
import RevenueTrends from "./components/manager/revenueTrends.vue";
import request from '@/util/index.js'
import NoData from "./components/noData.vue";
export default {
name: "businessPortrait",
components: {RevenueTrends, MoneyCompare, ContractGuarantee, RevenueAnalysis, headerTop,analyse},
components: {NoData, RevenueTrends, MoneyCompare, ContractGuarantee, RevenueAnalysis, headerTop,analyse},
data() {
return {
topBg:'linear-gradient(180deg, #D9CCEF 0%, #DED3F2 100%);',
@ -186,6 +194,7 @@ export default {
title:'经营画像',//
bgColor: '180deg, #996CFF 0%, #5D43F8 100%',
bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/managePortraitBg.svg',//
page:'/pages/commercialBI/managePortrait',
time: '',//
menu: {},//
revenueList:[],//
@ -193,7 +202,7 @@ export default {
orderTransaction:{},//
revenueAll:[],//
revenue:{},//
moneyCompareList:[],//
moneyCompareList:{},//
trendsList:[],//
revenueType:{},//
plan:{},//
@ -201,17 +210,26 @@ export default {
yearAdd:'', //
showNotice:false,
showNoticeYear:false,
serviceInfo:{} //
}
},
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()
//
uni.setStorageSync('phoneInfo', systemInfo)
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
if (!storeServiceInfo){
this.nearestService()
}
//
this.getRevenueList()
//
@ -228,6 +246,25 @@ export default {
this.monthYearPlan()
},
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(){
this.showNotice = true
},
@ -263,12 +300,13 @@ export default {
this.selectTab = value
this.revenue = this.revenueAll[this.selectTab]
this.moneyCompareList = this.revenue.list
console.log('this.moneyCompareList',this.moneyCompareList)
},
async getMoneyCompareList(){
let req = {
ProvinceCode:'340000',
StatisticsDate:'2023-04-02',
ServerpartId:416
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
let RevenueAmount = [] //
@ -365,11 +403,13 @@ export default {
this.moneyCompareList = this.revenue.list
},
async getTrendsList(){
let date = new Date(this.time)
let y = date.getFullYear()
let req = {
ProvinceCode:'340000',
StatisticsDate:'2023',
StatisticsDate:y,
StatisticsType:1,
ServerpartId:471
ServerpartId:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',req)
let list = []
@ -401,9 +441,9 @@ export default {
async getRevenueType(){
const req = {
pushProvinceCode:'340000',
Statistics_StartDate:'2023-04-03',
Statistics_Date:'2023-04-03',
Serverpart_ID:416
Statistics_StartDate:this.time,
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',req)
let all = 0

View File

@ -5,7 +5,7 @@
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
<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">
<text class="day">{{ thisDay }}</text>
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
@ -423,13 +423,18 @@ export default {
plan:{},//
ShareShopCountYes:0,//
yesterdayAllPay:0,//
wechatPushSalesList: null //
wechatPushSalesList: null, //
seat:{},//
nearServiceInfo:{
SERVERPART_NAME:"广德服务区",
SPREGIONTYPE_NAME:"芜湖片区",
Serverpart_ID:524
},//
}
},
watch:{
user:{
handler:function (value){
console.log('监听user',value)
this.getData(this.option)
},
deep:true
@ -455,7 +460,6 @@ export default {
onLoad(option){
//
this.single = timestampToTime((new Date(this.lastDay).getTime()))
console.log('single',this.single)
//
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
@ -463,6 +467,8 @@ export default {
//
const date = new Date(this.lastDay)
this.thisDay = getThisDay(date.getDay())
//
uni.setStorageSync('lastDay',this.lastDay)
//
for(let key in this.toDoMsg){
if (key === 'd405ae13-3388-41c0-a5f6-d11194d0a943' && this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']){
@ -476,6 +482,29 @@ export default {
if (this.user.Membership_Id){
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 m = date.getMonth() + 1
@ -503,6 +532,26 @@ export default {
},
methods:{
...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(){
this.showNotice = true
},
@ -522,7 +571,7 @@ export default {
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
},
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){
//
@ -625,7 +674,6 @@ export default {
let _this = this
//
let yesterday = handleYesterday(this.lastDay)
console.log(this.lastDay)
if ((yesterday.substr(yesterday.length-1,1)) === '0'){
let date = new Date(this.lastDay)
let y = date.getFullYear()
@ -633,7 +681,6 @@ export default {
let day = this.$util.getThisMonthDay(this.lastDay)
yesterday = `${y}-${m}-${day}`
}
console.log('yesterday', yesterday)
//
const data = {
Statistics_Date:yesterday,
@ -726,11 +773,9 @@ export default {
Statistics_Date:this.lastDay,
ShowCompareRate: true
}
console.log('allPriceData',allPriceData)
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
// data
let result = res.Result_Data
console.log('resultresultresult',result)
for(let key in result){
if (key!=='RevenuePushModel' && key!=='GrowthRate'){
let all = 0
@ -782,14 +827,10 @@ export default {
const date = new Date(e.detail.value).getTime()
this.single = timestampToTime(date)
this.lastDay = e.detail.value
uni.setStorageSync('lastDay',this.lastDay)
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
this.onRefresh()
},
//
handleDateClick(){
// class
this.priceMove = false
},
showPie(obj) {
let data = {
series: []
@ -924,7 +965,6 @@ export default {
//
const totalData = await request.$webGet('CommercialApi/BaseInfo/GetShopCountList',data)
console.log('totalData',totalData)
let all = 0
totalData.Result_Data.List.forEach(item=>{
all+=item.SHOP_REVENUECOUNT
@ -1548,7 +1588,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
.thisMonth,.thisYear{
width: 100%;
margin-top: 28px;
padding-bottom: 28px;
padding-bottom: 24px;
.titleTop{
display: flex;
align-items: center;

View File

@ -89,14 +89,14 @@
</div>
<div class="right">
<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.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 class="item">
<p :class="item.HASWIFI?'text':'unText'">女厕({{item.HASWIFI?item.HASWIFI:'0' }})</p>
<p :class="item.TOILETCOUNT?'text':'unText'">潮汐厕位({{item.TOILETCOUNT?item.TOILETCOUNT:'0' }}</p>
<p :class="item.HASWIFI?'text':'unText'">{{item.HASWIFI?'女厕(' + item.HASWIFI + ')':'女厕' }}</p>
<p :class="item.TOILETCOUNT?'text':'unText'">{{item.TOILETCOUNT?'潮汐厕位(' + item.TOILETCOUNT + ')':'潮汐厕位' }}</p>
<p :class="item.HASSHOWERROOM?'text':'unText'">车辆加水</p>
</div>
</div>
@ -109,13 +109,13 @@
</div>
<div class="right">
<div class="item">
<p :class="item.SMALLPARKING?'text':'unText'">轿车车位({{item.SMALLPARKING?item.SMALLPARKING:'0' }})</p>
<p :class="item.TRUCKPACKING?'text':'unText'">货车车位({{item.TRUCKPACKING?item.TRUCKPACKING:'0' }})</p>
<p :class="item.SMALLPARKING?'text':'unText'">{{item.SMALLPARKING?'轿车车位(' + item.SMALLPARKING + ')':'轿车车位' }}</p>
<p :class="item.TRUCKPACKING?'text':'unText'">{{item.TRUCKPACKING?'货车车位(' + item.TRUCKPACKING + ')':'货车车位' }}</p>
</div>
<div class="item">
<p :class="item.PACKING?'text':'unText'">客车车位({{item.PACKING?item.PACKING:'0' }})</p>
<p :class="item.DANPACKING?'text':'unText'">危化品车位({{item.DANPACKING?item.DANPACKING:'0' }})</p>
<p :class="item.PACKING?'text':'unText'">{{item.PACKING?'客车车位(' + item.PACKING + ')':'客车车位' }}</p>
<p :class="item.DANPACKING?'text':'unText'">{{item.DANPACKING?'危化品车位(' + item.DANPACKING +')':'危化品车位' }}</p>
</div>
</div>
</div>
@ -129,11 +129,11 @@
<div class="item">
<p :class="item.DININGROOMCOUNT?'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 class="item">
<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>
@ -173,9 +173,8 @@ export default {
this.getList(option)
}else if (option.isPicker==='true'){
this.isShowPicker = true
console.log(1111)
console.log('option',option)
this.handleSearch(option.longitude,option.latitude)
let seat = uni.getStorageSync('seatInfo')
this.handleSearch(seat.longitude,seat.latitude)
this.getServiceList()
}else{
this.getServiceList()
@ -199,7 +198,6 @@ export default {
latitude:latitude
}
const totalData = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',reqs)
console.log('totalData',totalData)
this.info = totalData.Result_Data
this.typeList[4].isShow = this.info.HASCHARGE
this.typeList[5].isShow = this.info.HASGUESTROOM
@ -260,7 +258,8 @@ export default {
<style scoped lang="scss">
.main{
width: 100%;
width: 100%;
max-width: 100vw;
position: relative;
.leftArrow{
width: 100%;
@ -421,16 +420,15 @@ export default {
line-height: 20px;
margin-right: 8px;
min-width: 60px;
padding-top: 2px;
.text{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 20px;
display: inline-block;
vertical-algin: middle;
}
}
.text{
flex: 1;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 20px;
display: inline-block;
}
.subTitleArea{
font-size: 14px;
@ -463,7 +461,7 @@ export default {
}
.service{
background: #fff;
padding: 12px 16px 0;
padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
.serviceItem{
margin-top: 4px;
.title{
@ -522,6 +520,17 @@ export default {
color: #160002;
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;
}
}
}
}

View File

@ -3,7 +3,7 @@
<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>
</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="top">
<div class="topImg" @click="handleChangeUp">
@ -11,12 +11,14 @@
</div>
<div class="search">
<div class="left">
<picker class="pick" @change="handleChangeService" :value="selectIndex" :range="array" range-key="name">
<view class="picker">
{{array[selectIndex].name?array[selectIndex].name:''}}
</view>
<picker class="pick" @change="handleChangeService($event)" :value="selectIndex" :range="array" range-key="name">
<div class="box">
<view class="picker">
{{array[selectIndex].name?array[selectIndex].name:''}}
</view>
<image class="selectIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/upArrow.svg"></image>
</div>
</picker>
<image class="selectIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/upArrow.svg"></image>
</div>
<div class="right">
<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 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">
<p class="title">{{item.SERVERPART_NAME }}</p>
<div class="box">
<div class="imgBox">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/service/phone.svg"></image>
</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>
</div>
</div>
@ -64,9 +66,12 @@ export default {
name: "index",
data(){
return {
isShowMap:false,
longitude: null,
latitude: null,
userLongitude:null,
userLatitude:null,
mapCtx: {},
latitude:30.207269999999998,//
longitude:120.18023,//
menu:{},//
statusBarHeight:'',//
selectIndex:0,//
@ -74,46 +79,93 @@ export default {
serviceList:[],
searchText:'',
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()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
console.log('this.menu',this.menu)
//
this.mapCtx = uni.createMapContext('myMap')
this.getServiceList()
this.getLocation()
// this.getLocation()
// this.getListData()
},
onHide(){
this.isShowMap = false
},
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(){
uni.navigateBack({
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(){
let req = {
Province_Code:'340000'
}
const data = await request.$webGet('CommercialApi/BaseInfo/GetSPRegionList',req)
console.log('data22222',data)
this.array = data.Result_Data.List
await this.getLocation()
},
//
handleChangeService(e){
console.log('e',e)
this.selectIndex = Number(e.detail.value)
let value = this.array[Number(e.detail.value)].value
this.getListData(value)
this.getListData()
},
//
async handleSearch(){
let req = {
longitude:this.longitude,
Province_Code:'340000',
@ -125,21 +177,45 @@ export default {
this.serviceList = data.Result_Data.List
},
//
handleGoDetail(id){
uni.navigateTo({
url:`/pages/map/detail?SERVERPART_ID=${id}&latitude${this.latitude}&longitude=${this.longitude}&isPicker=${false}`
})
},
async getListData(value){
let req = {
longitude:this.longitude,
Province_Code:'340000',
latitude:this.latitude,
SPRegionType_ID:value?value:this.array[this.selectIndex].value
handleGoDetail(id,item){
console.log('item',item)
if (this.chartType){
let res = {
SERVERPART_NAME:item.SERVERPART_NAME,//
SPREGIONTYPE_NAME:item.SPREGIONTYPE_NAME,//
Serverpart_ID:item.SERVERPART_ID,
longitude:item.SERVERPART_X,
latitude:item.SERVERPART_Y,
}
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)
console.log('data',data)
this.serviceList = data.Result_Data.List
},
//
@ -150,23 +226,46 @@ export default {
this.isMoveUp = true
}
},
getLocation(){
let _this = this
uni.getFuzzyLocation({
type:'gcj02',
altitude:true,
success:function (res){
console.log('res21312',res)
this.latitude = res.latitude
this.longitude = res.latitude
console.log('this.latitude',this.latitude)
_this.getListData()
}
})
async getLocation(){
let seat = uni.getStorageSync('seatInfo')
if (!seat){
console.log(11111)
let _this = this
uni.getFuzzyLocation({
type:'gcj02',
altitude:true,
success:function (res){
this.latitude = res.latitude
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;
.left{
width: 30%;
display: flex;
align-items: center;
position: relative;
.picker{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 20px;
}
.selectIcon{
width: 15px;
height: 15px;
margin-left: 6px;
.pick{
.box{
display: flex;
align-items: center;
.picker{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 20px;
}
.selectIcon{
width: 15px;
height: 15px;
margin-left: 6px;
}
}
}
}
.left:after{

View File

@ -62,10 +62,6 @@ export default {
lastDay:{
type:String,
default:""
},
noticeInfo:{
type:Object,
default:()=>{}
}
},
data(){
@ -87,7 +83,7 @@ export default {
}
}else if(item.value === 3 && item.isNotice || item.value ===4 && item.isNotice){
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{
this.$util.toNextRoute('navigateTo', item.homeUrl)
}

View File

@ -39,7 +39,7 @@
</view>
<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>
<Tabbar ref="tabbar" :page="page" ></Tabbar>
@ -258,10 +258,6 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
],
},
],
noticeInfo:{
latitude:0,//
longitude:0,//
}
};
},
components:{
@ -336,20 +332,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
},
handleGoEmpower(){
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>
@ -543,7 +526,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
width: 100%;
background: #fff;
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;
border-radius: 32rpx 32rpx 2rpx 2rpx;
.main{

View File

@ -44,3 +44,4 @@ export function handleYesterday(value) {
const d = date.getDate() - 1
return `${y}-${m}-${d}`
}