update
This commit is contained in:
parent
31d936f4ad
commit
7696fe4bf2
@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">{{month}}月消费水平<text class="unit"></text></p>
|
<p class="title">{{month}}月消费水平<text class="unit"></text></p>
|
||||||
<div v-if="levelTopList.series.length>0">
|
<div v-if="levelTopList.series.length">
|
||||||
<level-top :data="levelTopList"></level-top>
|
<level-top :data="levelTopList"></level-top>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1404,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1404,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
@ -191,15 +191,38 @@ export default {
|
|||||||
},
|
},
|
||||||
bindDateChange(e){
|
bindDateChange(e){
|
||||||
const date = new Date(e.detail.value)
|
const date = new Date(e.detail.value)
|
||||||
|
const nowDate = new Date()
|
||||||
let m = date.getMonth() + 1
|
let m = date.getMonth() + 1
|
||||||
|
let nowMonth = nowDate.getMonth() + 1
|
||||||
|
if (nowMonth === m){
|
||||||
|
let y = nowDate.getFullYear()
|
||||||
|
let nowMonth = nowDate.getMonth() + 1
|
||||||
|
let d = nowDate.getDate() - 1
|
||||||
if (m<10){
|
if (m<10){
|
||||||
m = '0' + m
|
m = '0' + m
|
||||||
}
|
}
|
||||||
|
if (nowMonth<10){
|
||||||
|
nowMonth = '0' + nowMonth
|
||||||
|
}
|
||||||
|
if (d<10){
|
||||||
|
d = '0' + d
|
||||||
|
}
|
||||||
|
this.time =`${y}-${nowMonth}-${d}`
|
||||||
|
}else{
|
||||||
|
let y = date.getFullYear()
|
||||||
|
if (m<10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
let d = this.$util.getThisMonthDay(`${y}-${m}`)
|
||||||
|
this.time = `${y}-${m}-${d}`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.month = m
|
this.month = m
|
||||||
this.single = e.detail.value
|
this.single = e.detail.value
|
||||||
let d = this.$util.getThisMonthDay(e.detail.value)
|
let d = this.$util.getThisMonthDay(e.detail.value)
|
||||||
this.endTime = e.detail.value + '-' + d
|
this.endTime = e.detail.value + '-' + d
|
||||||
this.time = e.detail.value
|
|
||||||
this.onRefresh()
|
this.onRefresh()
|
||||||
},
|
},
|
||||||
async nearestService(){
|
async nearestService(){
|
||||||
@ -220,16 +243,49 @@ export default {
|
|||||||
uni.setStorageSync('currentService',res)
|
uni.setStorageSync('currentService',res)
|
||||||
},
|
},
|
||||||
async getTransactionList(){
|
async getTransactionList(){
|
||||||
|
const nowDate = new Date()
|
||||||
|
const selectDate = new Date(this.time)
|
||||||
|
let selectMonth = selectDate.getMonth() + 1
|
||||||
|
let nowDateMonth = nowDate.getMonth() + 1
|
||||||
|
let time
|
||||||
|
if (selectMonth === nowDateMonth){
|
||||||
|
let nowYear = nowDate.getFullYear()
|
||||||
|
let m
|
||||||
|
let nowDay = nowDate.getDate() - 1
|
||||||
|
if (nowDateMonth<10){
|
||||||
|
m = '0' + nowDateMonth
|
||||||
|
}
|
||||||
|
if (nowDay<10){
|
||||||
|
nowDay = '0' + nowDay
|
||||||
|
}
|
||||||
|
time = `${nowYear}-${m}-${nowDay}`
|
||||||
|
}else{
|
||||||
|
let selectYear = selectDate.getFullYear()
|
||||||
|
let m
|
||||||
|
if (selectMonth<10){
|
||||||
|
m = '0' + selectMonth
|
||||||
|
}
|
||||||
|
let selectDay = this.$util.getThisMonthDay(`${selectYear}-${m}`)
|
||||||
|
time = `${selectYear}-${m}-${selectDay}`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let req = {
|
let req = {
|
||||||
Province_Code:'340000',
|
Province_Code:'340000',
|
||||||
Statistics_Date:this.time,
|
Statistics_Date:time,
|
||||||
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ShowConsumptionLevel:true,
|
ShowConsumptionLevel:true,
|
||||||
ShowConvertRate:true
|
ShowConvertRate:true
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionAnalysis',req)
|
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionAnalysis',req)
|
||||||
|
|
||||||
|
if (totalData.Result_Data){
|
||||||
this.transactionList = totalData.Result_Data
|
this.transactionList = totalData.Result_Data
|
||||||
|
}else{
|
||||||
|
this.transactionList = null
|
||||||
|
}
|
||||||
|
this.$forceUpdate()
|
||||||
|
console.log('this.transactionList',this.transactionList)
|
||||||
},
|
},
|
||||||
async getTimePeriodList(){
|
async getTimePeriodList(){
|
||||||
let req = {
|
let req = {
|
||||||
@ -242,6 +298,7 @@ export default {
|
|||||||
let list = [] //客单占比
|
let list = [] //客单占比
|
||||||
let numberList = [] //数量数组
|
let numberList = [] //数量数组
|
||||||
let moneyList = [] // 金额数组
|
let moneyList = [] // 金额数组
|
||||||
|
if (totalData.Result_Data){
|
||||||
totalData.Result_Data.CommonScatterList.forEach(item=>{
|
totalData.Result_Data.CommonScatterList.forEach(item=>{
|
||||||
list.push(item.value)
|
list.push(item.value)
|
||||||
numberList.push(item.data)
|
numberList.push(item.data)
|
||||||
@ -276,6 +333,10 @@ export default {
|
|||||||
// ]
|
// ]
|
||||||
// };
|
// };
|
||||||
this.timePeriodList = res
|
this.timePeriodList = res
|
||||||
|
}else{
|
||||||
|
this.timePeriodList = []
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async getLevelTopList(){
|
async getLevelTopList(){
|
||||||
let req = {
|
let req = {
|
||||||
@ -289,6 +350,7 @@ export default {
|
|||||||
series:[]
|
series:[]
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeLevel',req)
|
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeLevel',req)
|
||||||
|
if (totalData.Result_Data){
|
||||||
res.categories = totalData.Result_Data.legend
|
res.categories = totalData.Result_Data.legend
|
||||||
totalData.Result_Data.ColumnList.forEach(item=>{
|
totalData.Result_Data.ColumnList.forEach(item=>{
|
||||||
res.series.push({name:item.name,data:item.data})
|
res.series.push({name:item.name,data:item.data})
|
||||||
@ -314,6 +376,10 @@ export default {
|
|||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
this.levelTopList = res
|
this.levelTopList = res
|
||||||
|
}else{
|
||||||
|
this.levelTopList = []
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async getBandLevelList(){
|
async getBandLevelList(){
|
||||||
let req = {
|
let req = {
|
||||||
@ -324,6 +390,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let res =[]
|
let res =[]
|
||||||
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessBrandLevel',req)
|
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessBrandLevel',req)
|
||||||
|
if (totalData.Result_Data){
|
||||||
totalData.Result_Data.legend.forEach(item=>{
|
totalData.Result_Data.legend.forEach(item=>{
|
||||||
res.push({name:item,small:0,normal:0,big:0})
|
res.push({name:item,small:0,normal:0,big:0})
|
||||||
})
|
})
|
||||||
@ -343,6 +410,10 @@ export default {
|
|||||||
// {name:'老娘舅',big:'15.2',normal:'70.1',small:'14.5'},
|
// {name:'老娘舅',big:'15.2',normal:'70.1',small:'14.5'},
|
||||||
// {name:'吉祥馄饨',big:'25.2',normal:'39.9',small:'34.7'}]
|
// {name:'吉祥馄饨',big:'25.2',normal:'39.9',small:'34.7'}]
|
||||||
this.bandLevelList = res
|
this.bandLevelList = res
|
||||||
|
}else{
|
||||||
|
this.bandLevelList = []
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async getBusinessTypeList(){
|
async getBusinessTypeList(){
|
||||||
const req = {
|
const req = {
|
||||||
@ -354,6 +425,7 @@ export default {
|
|||||||
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){
|
||||||
data.Result_Data.BusinessTradeRank.forEach((item,index)=>{
|
data.Result_Data.BusinessTradeRank.forEach((item,index)=>{
|
||||||
if (index<=10){
|
if (index<=10){
|
||||||
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value),text:item.data})
|
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value),text:item.data})
|
||||||
@ -372,6 +444,10 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
this.businessTypeList = result
|
this.businessTypeList = result
|
||||||
|
}else{
|
||||||
|
this.businessTypeList = []
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async getCompareList(){
|
async getCompareList(){
|
||||||
const req = {
|
const req = {
|
||||||
@ -384,7 +460,7 @@ export default {
|
|||||||
let customerMax = 0
|
let customerMax = 0
|
||||||
let carLit = []
|
let carLit = []
|
||||||
let carLitMax = 0
|
let carLitMax = 0
|
||||||
if (data.Result_Data.TransactionList.data.length>0){
|
if (data.Result_Data.TransactionList.data){
|
||||||
data.Result_Data.TransactionList.data.forEach((item,index)=>{
|
data.Result_Data.TransactionList.data.forEach((item,index)=>{
|
||||||
if (index % 2 === 1 && index!==data.Result_Data.TransactionList.data.length-1){
|
if (index % 2 === 1 && index!==data.Result_Data.TransactionList.data.length-1){
|
||||||
|
|
||||||
@ -398,7 +474,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.Result_Data.BayonetList.data.length>0){
|
if (data.Result_Data.BayonetList.data){
|
||||||
data.Result_Data.BayonetList.data.forEach((item,index)=>{
|
data.Result_Data.BayonetList.data.forEach((item,index)=>{
|
||||||
if (index % 2 === 1 && index!==data.Result_Data.BayonetList.data.length-1){
|
if (index % 2 === 1 && index!==data.Result_Data.BayonetList.data.length-1){
|
||||||
|
|
||||||
@ -409,6 +485,8 @@ export default {
|
|||||||
carLit.push(item[1])
|
carLit.push(item[1])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
carLit = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -444,6 +522,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
|
console.log('res',res)
|
||||||
this.compareList = res
|
this.compareList = res
|
||||||
},
|
},
|
||||||
async getBestsellerList(){
|
async getBestsellerList(){
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
<entry-zone :carData="carData" :time="time" :month="thisMonth"/>
|
<entry-zone :carData="carData" :time="time" :month="thisMonth"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1102,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1102,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else :type="'car'"/>
|
<no-data v-if="!carData.length" :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -86,9 +86,14 @@
|
|||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车辆归属地</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车辆归属地</p>
|
||||||
<div v-if="homePlace.length>0">
|
<div v-if="homePlace.length>0">
|
||||||
<home-place :homeData="homePlace" :homeCity="cityPlace" />
|
<home-place :homeData="homePlace" :homeCity="cityPlace" />
|
||||||
|
<div class="selectType">
|
||||||
|
<div :class="item.select?'item itemSelect':'item itemUnSelect'" v-for="(item,index) in carTypeList" :key="index" @click="handleCarType(item)">
|
||||||
|
<div class="text">{{item.name}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else :type="'car'"/>
|
<no-data v-if="!homePlace.length" :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分析/日均</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分析/日均</p>
|
||||||
@ -96,16 +101,15 @@
|
|||||||
<car-type-time :data="carTypeTimeData"/>
|
<car-type-time :data="carTypeTimeData"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1104,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1104,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else :type="'car'"/>
|
<no-data v-if="!carTypeTimeData.series.length" :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分布图/日均</p>
|
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分布图/日均</p>
|
||||||
|
|
||||||
<div v-if="timeAnalysisData.series.length>0">
|
<div v-if="timeAnalysisData.series.length>0">
|
||||||
<time-analysis :data="timeAnalysisData"/>
|
<time-analysis :data="timeAnalysisData"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1105,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1105,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else :type="'car'"/>
|
<no-data v-if="!timeAnalysisData.series.length" :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartsItem" style="margin-top: 32px">
|
<div class="chartsItem" style="margin-top: 32px">
|
||||||
<div class="topItem" >
|
<div class="topItem" >
|
||||||
@ -123,7 +127,7 @@
|
|||||||
<percent-entry :data="percentEntryData" />
|
<percent-entry :data="percentEntryData" />
|
||||||
<analyse :analyseInfo="{analysisins_type: 1106,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1106,analysisins_format: 2000}" />
|
||||||
</div>
|
</div>
|
||||||
<no-data v-else :type="'car'"/>
|
<no-data v-if="!percentEntryData.length" :type="'car'"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -163,6 +167,7 @@ export default {
|
|||||||
selectTab: 0,
|
selectTab: 0,
|
||||||
tabIsTrue: true,
|
tabIsTrue: true,
|
||||||
tabList:[],//选项卡列表
|
tabList:[],//选项卡列表
|
||||||
|
carTypeList:[],//车型选项卡
|
||||||
carNumAll : 0,//一共的入区车流数
|
carNumAll : 0,//一共的入区车流数
|
||||||
monthTotalList:[],//月累计
|
monthTotalList:[],//月累计
|
||||||
carData:[],//入区车流的数据
|
carData:[],//入区车流的数据
|
||||||
@ -185,6 +190,7 @@ export default {
|
|||||||
allEntry:'',//一共的入区率占比
|
allEntry:'',//一共的入区率占比
|
||||||
addAllEntry:'',//相较上月增加的入区率
|
addAllEntry:'',//相较上月增加的入区率
|
||||||
endData:'',//截止日期
|
endData:'',//截止日期
|
||||||
|
isFirst:true,//是不是第一次调用
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -199,6 +205,7 @@ export default {
|
|||||||
this.backType = option.type
|
this.backType = option.type
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
|
this.isFirst = true
|
||||||
// 总的来说商业bi的五个页面都是 往组件里面传值 就可以出现图表和要求的东西
|
// 总的来说商业bi的五个页面都是 往组件里面传值 就可以出现图表和要求的东西
|
||||||
// 外面的一层页面主要用于处理数据
|
// 外面的一层页面主要用于处理数据
|
||||||
let nowTime = new Date()
|
let nowTime = new Date()
|
||||||
@ -256,6 +263,29 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
//车型选择
|
||||||
|
handleCarType(selectItem){
|
||||||
|
this.carTypeList.forEach(item=>{
|
||||||
|
if (item.value === selectItem.value){
|
||||||
|
if (item.select){
|
||||||
|
item.select = false
|
||||||
|
}else{
|
||||||
|
item.select = true
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
item.select = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let type
|
||||||
|
this.carTypeList.forEach(item=>{
|
||||||
|
if (item.select){
|
||||||
|
type = item.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
this.getHomeData(type)
|
||||||
|
},
|
||||||
//获取服务区基本信息
|
//获取服务区基本信息
|
||||||
async getServiceInfo(){
|
async getServiceInfo(){
|
||||||
let id = ''
|
let id = ''
|
||||||
@ -391,6 +421,32 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
async getMonthTotalList(){
|
async getMonthTotalList(){
|
||||||
|
let time
|
||||||
|
let nowYear
|
||||||
|
let yerYear
|
||||||
|
if (this.endTime){
|
||||||
|
const date = new Date(this.endTime)
|
||||||
|
let y = date.getFullYear() - 1
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
if (m<10){
|
||||||
|
m = '0'+ m
|
||||||
|
}
|
||||||
|
let d = date.getDate()
|
||||||
|
time = `${y}-${m}-${d}`
|
||||||
|
nowYear = y + 1
|
||||||
|
yerYear = y
|
||||||
|
}else{
|
||||||
|
const date = new Date(this.time)
|
||||||
|
let y = date.getFullYear() - 1
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
if (m<10){
|
||||||
|
m = '0'+ m
|
||||||
|
}
|
||||||
|
let d = date.getDate()
|
||||||
|
time = `${y}-${m}-${d}`
|
||||||
|
nowYear = y + 1
|
||||||
|
yerYear = y
|
||||||
|
}
|
||||||
const req = {
|
const req = {
|
||||||
StatisticsDate:this.endTime?this.endTime:this.time,
|
StatisticsDate:this.endTime?this.endTime:this.time,
|
||||||
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
||||||
@ -421,13 +477,53 @@ export default {
|
|||||||
allCarCount : item.Vehicle_Count,
|
allCarCount : item.Vehicle_Count,
|
||||||
region:item.RegionList,
|
region:item.RegionList,
|
||||||
rate:item.Entry_Rate,
|
rate:item.Entry_Rate,
|
||||||
money:item.RevenueAmount
|
money:item.RevenueAmount,
|
||||||
|
year:nowYear
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const reqYes = {
|
||||||
|
StatisticsDate:time,
|
||||||
|
Serverpart_ID:this.serviceInfo.Serverpart_ID
|
||||||
|
}
|
||||||
|
const dataYes = await request.$webGet('CommercialApi/BigData/GetMonthAnalysis',reqYes)
|
||||||
|
let monthListYes = []
|
||||||
|
let carCountYes = []
|
||||||
|
let carCountMaxYes = 0
|
||||||
|
let moneyCountYes = []
|
||||||
|
let monetCountMaxYes = 0
|
||||||
|
let infoYes = []
|
||||||
|
dataYes.Result_Data.List.forEach(item=>{
|
||||||
|
monthListYes.push(item.Statistics_Month + '月')
|
||||||
|
if (carCountMaxYes<item.Vehicle_Count){
|
||||||
|
carCountMaxYes = item.Vehicle_Count
|
||||||
|
}
|
||||||
|
if (monetCountMaxYes<item.RevenueAmount){
|
||||||
|
monetCountMaxYes = item.RevenueAmount
|
||||||
|
}
|
||||||
|
if (item.Vehicle_Count === 0){
|
||||||
|
carCountYes.push(0)
|
||||||
|
}else{
|
||||||
|
carCountYes.push(Number((item.Vehicle_Count / 10000)))
|
||||||
|
}
|
||||||
|
moneyCountYes.push(Number((item.RevenueAmount / 10000)))
|
||||||
|
// showTip要展示的信息
|
||||||
|
infoYes.push({
|
||||||
|
allCarCount : item.Vehicle_Count,
|
||||||
|
region:item.RegionList,
|
||||||
|
rate:item.Entry_Rate,
|
||||||
|
money:item.RevenueAmount,
|
||||||
|
year:yerYear
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
let res = {
|
let res = {
|
||||||
categories: monthList,
|
categories: monthList,
|
||||||
series:[{name:'车流量',data:carCount,type:'column',index:0,info:info,max:carCountMax / 10000},
|
series:[{name:`${nowYear}年车流量`,data:carCount,type:'column',index:0,info:info,max:carCountMax / 10000,year:nowYear},
|
||||||
{name:'交易金额',data:moneyCount,type:'line',index:1,max:monetCountMax / 10000}]
|
{name:`${yerYear}年车流量`,data:carCountYes,type:'column',index:0,info:infoYes,max:carCountMaxYes / 10000,year:yerYear},
|
||||||
|
{name:`${nowYear}年交易额`,data:moneyCount,type:'line',index:1,info:info,max:monetCountMax / 10000,year:nowYear},
|
||||||
|
{name:`${yerYear}年交易额`,data:moneyCountYes,type:'line',index:1,info:infoYes,max:monetCountMaxYes / 10000,year:yerYear}]
|
||||||
}
|
}
|
||||||
this.monthTotalList = res
|
this.monthTotalList = res
|
||||||
// categories: ["小型车","中型车","大货车","新能源车"],
|
// categories: ["小型车","中型车","大货车","新能源车"],
|
||||||
@ -444,7 +540,8 @@ export default {
|
|||||||
this.carData = res.Result_Data.List
|
this.carData = res.Result_Data.List
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getHomeData(){
|
getHomeData(type){
|
||||||
|
console.log('type',type)
|
||||||
const date = new Date(this.endTime?this.endTime:this.time)
|
const date = new Date(this.endTime?this.endTime:this.time)
|
||||||
let y = date.getFullYear()
|
let y = date.getFullYear()
|
||||||
let m = date.getMonth() + 1
|
let m = date.getMonth() + 1
|
||||||
@ -452,11 +549,31 @@ export default {
|
|||||||
m='0'+m
|
m='0'+m
|
||||||
}
|
}
|
||||||
let statistic = `${y}${m}`
|
let statistic = `${y}${m}`
|
||||||
request.$webGet('CommercialApi/Revenue/GetBayonetOAList',{
|
let req
|
||||||
|
if (type){
|
||||||
|
req = {
|
||||||
|
StatisticsMonth:statistic,
|
||||||
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
|
ContainWhole:true,
|
||||||
|
VehicleType:type
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
req = {
|
||||||
StatisticsMonth:statistic,
|
StatisticsMonth:statistic,
|
||||||
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
Serverpart_ID:this.serviceInfo.Serverpart_ID,
|
||||||
ContainWhole:true
|
ContainWhole:true
|
||||||
}).then(res=>{
|
}
|
||||||
|
}
|
||||||
|
request.$webGet('CommercialApi/Revenue/GetBayonetOAList',req).then(res=>{
|
||||||
|
if (this.isFirst){
|
||||||
|
let list = []
|
||||||
|
res.Result_Data.OtherData.forEach(item=>{
|
||||||
|
list.push({name:item,value:item,select:false})
|
||||||
|
})
|
||||||
|
this.carTypeList =list
|
||||||
|
this.isFirst = false
|
||||||
|
}
|
||||||
|
|
||||||
// 因为只让接口调用一次 所以要把全部和不同区域的内容要放在同一个列表里面 然后通过选项卡的点击来切换展示哪一块的数据
|
// 因为只让接口调用一次 所以要把全部和不同区域的内容要放在同一个列表里面 然后通过选项卡的点击来切换展示哪一块的数据
|
||||||
let result = res.Result_Data.List
|
let result = res.Result_Data.List
|
||||||
result.forEach(item=>{
|
result.forEach(item=>{
|
||||||
@ -569,6 +686,7 @@ export default {
|
|||||||
// this.timeAnalysisData = result
|
// this.timeAnalysisData = result
|
||||||
let categories = [0,2,4,6,8,10,12,14,16,18,20,22]
|
let categories = [0,2,4,6,8,10,12,14,16,18,20,22]
|
||||||
let series = []
|
let series = []
|
||||||
|
let max = 0
|
||||||
result.forEach(item=>{
|
result.forEach(item=>{
|
||||||
let obj = {name:'',data:[]}
|
let obj = {name:'',data:[]}
|
||||||
obj.name = item.name
|
obj.name = item.name
|
||||||
@ -577,11 +695,17 @@ export default {
|
|||||||
valueList.push(Number((subItem[1] * 60).toFixed(0)))
|
valueList.push(Number((subItem[1] * 60).toFixed(0)))
|
||||||
})
|
})
|
||||||
obj.data = valueList
|
obj.data = valueList
|
||||||
|
valueList.forEach(item=>{
|
||||||
|
if (item>max){
|
||||||
|
max = item
|
||||||
|
}
|
||||||
|
})
|
||||||
series.push(obj)
|
series.push(obj)
|
||||||
})
|
})
|
||||||
let list = {
|
let list = {
|
||||||
categories:categories,
|
categories:categories,
|
||||||
series:series
|
series:series,
|
||||||
|
max:max
|
||||||
}
|
}
|
||||||
this.timeAnalysisData = list
|
this.timeAnalysisData = list
|
||||||
})
|
})
|
||||||
@ -954,6 +1078,38 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.selectType{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 12px auto;
|
||||||
|
.item{
|
||||||
|
border-radius: 4px;
|
||||||
|
padding:2px 6px;
|
||||||
|
margin-right: 6px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.icon{
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #786B6C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.itemSelect{
|
||||||
|
border:1px solid #ccc;
|
||||||
|
background: rgba(237, 239, 244, 0.2);
|
||||||
|
}
|
||||||
|
.itemUnSelect{
|
||||||
|
border:1px solid #ccc;
|
||||||
|
background: rgba(202, 208, 218, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
.tab{
|
.tab{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
|
|||||||
@ -34,10 +34,12 @@ export default {
|
|||||||
tap(e){
|
tap(e){
|
||||||
uChartsInstance[e.target.id].showToolTip(e, {
|
uChartsInstance[e.target.id].showToolTip(e, {
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
|
console.log('item',item)
|
||||||
|
console.log('opts',opts)
|
||||||
if (item.name === '客单数'){
|
if (item.name === '客单数'){
|
||||||
return item.name + ':'+ item.data + '笔'
|
return item.name + ':'+ item.data + '笔'
|
||||||
}else{
|
}else{
|
||||||
return item.name + ':'+ item.data + '辆'
|
return item.name + ':'+ item.data + '辆,交易概率: ' + ((opts.series[0].data[index] / opts.series[1].data[index])*100).toFixed(2) + '%'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,9 +54,19 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
if (value){
|
||||||
|
console.log('bianle',value)
|
||||||
this.info = value
|
this.info = value
|
||||||
|
console.log('this.info',this.info)
|
||||||
|
this.$forceUpdate()
|
||||||
|
}else{
|
||||||
|
this.info = {}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
deep:true,
|
||||||
|
immediate:true,
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,22 +33,52 @@ export default {
|
|||||||
handleTap(e){
|
handleTap(e){
|
||||||
uChartsInstance[e.target.id].showToolTip(e,{
|
uChartsInstance[e.target.id].showToolTip(e,{
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
|
console.log('item',item)
|
||||||
|
console.log('index',index)
|
||||||
|
console.log('opts',opts)
|
||||||
let text = ''
|
let text = ''
|
||||||
if (item.name === '车流量'){
|
console.log('item.name.slice(5,10)',item.name.slice(5,10))
|
||||||
if (opts.series[0].info[index].allCarCount && opts.series[0].info[index].rate){
|
let type = item.name.slice(5,10)
|
||||||
text = `入区 ${opts.series[0].info[index].allCarCount?opts.series[0].info[index].allCarCount:''} 辆, 入区率 ${opts.series[0].info[index].rate?opts.series[0].info[index].rate:''} %`
|
let time = opts.series[0].info[index].year
|
||||||
}else if (!opts.series[0].info[index].allCarCount){
|
if (type === '车流量'){
|
||||||
text = `入区0辆`
|
if (`${time}年车流量` === item.name){
|
||||||
|
let showTime = opts.series[0].info[index].year.toString().slice(2,5)
|
||||||
|
text = `${showTime}年入区 ${opts.series[0].info[index].allCarCount?this.$util.fmoney(opts.series[0].info[index].allCarCount):''} 辆`
|
||||||
|
}else{
|
||||||
|
let showTime = opts.series[1].info[index].year.toString().slice(2,5)
|
||||||
|
text = `${showTime}年入区 ${opts.series[1].info[index].allCarCount?this.$util.fmoney(opts.series[1].info[index].allCarCount):''} 辆`
|
||||||
}
|
}
|
||||||
return text
|
return text
|
||||||
}else{
|
}else{
|
||||||
if (opts.series[0].info[index].allCarCount){
|
if (`${time}年交易额` === item.name){
|
||||||
return `金额 ${opts.series[0].info[index].money?opts.series[0].info[index].money:''} 元, 单车消费 ${opts.series[0].info[index].allCarCount?((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2):''} 元`
|
let showTime = opts.series[2].year.toString().slice(2,5)
|
||||||
|
console.log('showTime',showTime)
|
||||||
|
text = `${showTime}年金额 ${opts.series[2].info[index].money?this.$util.fmoney(opts.series[2].info[index].money):''} 元, 单车消费 ${opts.series[0].info[index].allCarCount?((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2):''} 元`
|
||||||
}else{
|
}else{
|
||||||
return `金额 ${opts.series[0].info[index].money?opts.series[0].info[index].money:''} 元`
|
let showTime = opts.series[3].year.toString().slice(2,5)
|
||||||
|
text = `${showTime}年金额 ${opts.series[3].info[index].money?this.$util.fmoney(opts.series[3].info[index].money):''} 元, 单车消费 ${opts.series[1].info[index].allCarCount?((opts.series[1].info[index].money) / opts.series[1].info[index].allCarCount).toFixed(2):''} 元`
|
||||||
|
}
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
// if (item.name.slice(5,10) === '车流量'){
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
// if (item.name === '车流量'){
|
||||||
}
|
// if (opts.series[0].info[index].allCarCount && opts.series[0].info[index].rate){
|
||||||
|
// text = `入区 ${opts.series[0].info[index].allCarCount?opts.series[0].info[index].allCarCount:''} 辆, 入区率 ${opts.series[0].info[index].rate?opts.series[0].info[index].rate:''} %`
|
||||||
|
// }else if (!opts.series[0].info[index].allCarCount){
|
||||||
|
// text = `入区0辆`
|
||||||
|
// }
|
||||||
|
// return text
|
||||||
|
// }else{
|
||||||
|
// if (opts.series[0].info[index].allCarCount){
|
||||||
|
// return `金额 ${opts.series[0].info[index].money?opts.series[0].info[index].money:''} 元, 单车消费 ${opts.series[0].info[index].allCarCount?((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2):''} 元`
|
||||||
|
// }else{
|
||||||
|
// return `金额 ${opts.series[0].info[index].money?opts.series[0].info[index].money:''} 元`
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -60,8 +90,8 @@ export default {
|
|||||||
series: value.series
|
series: value.series
|
||||||
}
|
}
|
||||||
let config={
|
let config={
|
||||||
carMax:this.getSplitNumber(value.series[0].max),
|
carMax:value.series[0].max > value.series[1].max ? this.getSplitNumber(value.series[0].max):this.getSplitNumber(value.series[1].max),
|
||||||
moneyMax:this.getSplitNumber(value.series[1].max)
|
moneyMax:value.series[2].max > value.series[3].max ? this.getSplitNumber(value.series[2].max):this.getSplitNumber(value.series[3].max)
|
||||||
}
|
}
|
||||||
this.drawCharts('monthTotal', res, config)
|
this.drawCharts('monthTotal', res, config)
|
||||||
},
|
},
|
||||||
@ -131,7 +161,8 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
lineHeight: 25,
|
lineHeight: 25,
|
||||||
float:'center'
|
float:'center',
|
||||||
|
itemGap: 30
|
||||||
},
|
},
|
||||||
extra: {
|
extra: {
|
||||||
mix:{
|
mix:{
|
||||||
|
|||||||
@ -33,6 +33,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('value',value)
|
||||||
this.handleCarData(value)
|
this.handleCarData(value)
|
||||||
},
|
},
|
||||||
immediate:true,
|
immediate:true,
|
||||||
@ -40,6 +41,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getSplitNumber(value){
|
||||||
|
if (value === 0){
|
||||||
|
return 5
|
||||||
|
}else{
|
||||||
|
let sum = value + value *0.2
|
||||||
|
if (sum>0 && sum<5){
|
||||||
|
return 5
|
||||||
|
}else{
|
||||||
|
return Number((sum / 5).toFixed(0)) * 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//点击事件
|
//点击事件
|
||||||
handleTap(e){
|
handleTap(e){
|
||||||
uChartsInstance[e.target.id].touchLegend(e);
|
uChartsInstance[e.target.id].touchLegend(e);
|
||||||
@ -51,13 +64,15 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
|
console.log('handleCarData',value)
|
||||||
let res = {
|
let res = {
|
||||||
categories:value.categories,
|
categories:value.categories,
|
||||||
series:value.series
|
series:value.series
|
||||||
}
|
}
|
||||||
this.drawCharts('timeAnalysis', res)
|
let max = this.getSplitNumber(value.max)
|
||||||
|
this.drawCharts('timeAnalysis', res,max)
|
||||||
},
|
},
|
||||||
drawCharts(id, data) {
|
drawCharts(id, data,max) {
|
||||||
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')
|
||||||
@ -100,7 +115,7 @@ export default {
|
|||||||
title:'单位: 分钟',
|
title:'单位: 分钟',
|
||||||
titleOffsetY: -5,
|
titleOffsetY: -5,
|
||||||
min:0,
|
min:0,
|
||||||
max:180,
|
max:max,
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
|||||||
@ -1,46 +1,57 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="consumptionLevel">
|
<div class="consumptionLevel">
|
||||||
<div class="gender" v-for="(item,index) in genderList" :key="index">
|
<div class="gender">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<image class="icon" :src="item.name==='男'?'https://eshangtech.com/ShopICO/ahyd-BID/commercial/man.svg':'https://eshangtech.com/ShopICO/ahyd-BID/commercial/woman.svg'"></image>
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/man.svg"></image>
|
||||||
<p class="title">{{item.name}}</p>
|
<p class="title">{{genderList[0].name}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="small" v-if="Number(item.small)!==0" :style="{background:item.name==='男性'?'#CAD0DA':'#C6D3D7',width:item.small + '%'}" @click="handleShow(item,index,0)">{{item.small<16?'':item.small + '%'}}
|
<div class="small" v-if="genderList[0].small" :style="{background:'#CAD0DA',width:genderList[0].small + '%'}" @click="handleShow('man',0,genderList[0].small,$event)">{{genderList[0].small<16?'':genderList[0].small + '%'}}</div>
|
||||||
<div class="text" v-if="item.showList[0]">
|
<div class="normal" v-if="genderList[0].normal" :style="{background:'#ACB9CD',width:(genderList[0].normal + '%'),left:`calc(${genderList[0].small}% + 2px)`}" @click="handleShow('man',1,genderList[0].normal,$event)">{{genderList[0].normal<16?'':genderList[0].normal+'%'}}</div>
|
||||||
<div class="icon" :style="{background:item.name==='男性'?'#CAD0DA':'#C6D3D7'}"></div>
|
<div class="big" v-if="genderList[0].big" :style="{background:'#1E80FF',left:`calc(${Number(genderList[0].small) +Number(genderList[0].normal) }% + 4px)`,width:genderList[0].big + '%'}" @click="handleShow('man',2,genderList[0].big,$event)">{{genderList[0].big<16?'':genderList[0].big + '%'}}</div>
|
||||||
<text style="margin-right: 4px">低消费</text>
|
|
||||||
<text>{{item.small}}%</text>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="normal" v-if="Number(item.normal)!==0" :style="{background:item.name==='男性'?'#ACB9CD':'#AFC1C6',width:item.normal + '%',left:item.small+'%'}" @click="handleShow(item,index,1)">{{item.normal<16?'':item.normal+'%'}}
|
|
||||||
<div class="text" v-if="item.showList[1]">
|
|
||||||
<div class="icon" :style="{background:item.name==='男性'?'#ACB9CD':'#AFC1C6'}"></div>
|
|
||||||
<text style="margin-right: 4px">普通消费</text>
|
|
||||||
<text>{{item.normal}}%</text>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="big" v-if="Number(item.big)!==0" :style="{background:item.name==='男性'?'#1E80FF':'#00C2FF',left:(Number(item.small)+Number(item.normal))+'%', width:item.big+'%'}" @click="handleShow(item,index,2)">{{item.big<16?'':item.big + '%'}}
|
|
||||||
<div class="text" v-if="item.showList[2]">
|
|
||||||
<div class="icon" :style="{background:item.name==='男性'?'#1E80FF':'#00C2FF'}"></div>
|
|
||||||
<text style="margin-right: 4px">高消费</text>
|
|
||||||
<text>{{item.big}}%</text>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="meng" :style="position==='left'?`left:${positionWidth}`:`right:${positionWidth}`" v-if="isShowMan">{{manText}}</div>
|
||||||
<div class="imgKey">
|
<div class="imgKey">
|
||||||
<div style="margin: 0 auto;display: flex">
|
<div style="margin: 0 auto;display: flex">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon" :style="{background:item.name==='男性'?'#CAD0DA':'#C6D3D7'}"></div>
|
<div class="icon" style="background:#CAD0DA"></div>
|
||||||
<p class="consume">低消费</p>
|
<p class="consume">低消费</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon" :style="{background:item.name==='男性'?'#ACB9CD':'#AFC1C6'}"></div>
|
<div class="icon" style="background:#ACB9CD"></div>
|
||||||
<p class="consume">普通消费</p>
|
<p class="consume">普通消费</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon" :style="{background:item.name==='男性'?'#1E80FF':'#00C2FF'}"></div>
|
<div class="icon" style="background:#1E80FF"></div>
|
||||||
|
<p class="consume">高消费</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="gender">
|
||||||
|
<div class="top">
|
||||||
|
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/woman.svg"></image>
|
||||||
|
<p class="title">{{genderList[0].name}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="small" v-if="genderList[1].small" :style="{background:'#C6D3D7',width:genderList[1].small + '%'}" @click="handleShow('woman',0,genderList[0].small,$event)">{{genderList[1].small<16?'':genderList[1].small + '%'}}</div>
|
||||||
|
<div class="normal" v-if="genderList[1].normal" :style="{background:'#AFC1C6',width:(genderList[1].normal + '%'),left:`calc(${genderList[1].small}% + 2px)`}" @click="handleShow('woman',1,genderList[0].normal,$event)">{{genderList[1].normal<16?'':genderList[1].normal+'%'}}</div>
|
||||||
|
<div class="big" v-if="genderList[1].big" :style="{background:'#00C2FF',left:`calc(${Number(genderList[1].small) +Number(genderList[1].normal) }% + 4px)`,width:genderList[1].big + '%'}" @click="handleShow('woman',2,genderList[0].big,$event)">{{genderList[1].big<16?'':genderList[1].big + '%'}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="meng" :style="positionWoman==='left'?`left:${positionWidthWoman}`:`right:${positionWidthWoman}`" v-if="isShowWoman">{{womanText}}</div>
|
||||||
|
<div class="imgKey">
|
||||||
|
<div style="margin: 0 auto;display: flex">
|
||||||
|
<div class="item">
|
||||||
|
<div class="icon" style="background:#C6D3D7"></div>
|
||||||
|
<p class="consume">低消费</p>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="icon" style="background:#AFC1C6"></div>
|
||||||
|
<p class="consume">普通消费</p>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="icon" style="background:#00C2FF"></div>
|
||||||
<p class="consume">高消费</p>
|
<p class="consume">高消费</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -56,6 +67,14 @@ export default {
|
|||||||
return {
|
return {
|
||||||
genderList:[],//数据
|
genderList:[],//数据
|
||||||
list:[{name:'man',list:[false,false,false]},{name:'woman',list:[false,false,false]}],
|
list:[{name:'man',list:[false,false,false]},{name:'woman',list:[false,false,false]}],
|
||||||
|
position:'',//left 或者 right
|
||||||
|
positionWidth:'',// 定位百分比
|
||||||
|
isShowMan:false,//男性提示框
|
||||||
|
isShowWoman:false,//女性提示框
|
||||||
|
positionWoman:'',//left 或者 right
|
||||||
|
positionWidthWoman:'',// 定位百分比
|
||||||
|
womanText:'',//女性提示框文字
|
||||||
|
manText:'',//男性提示框文字
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -67,32 +86,64 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('ssksjdks',value)
|
||||||
this.genderList = value
|
this.genderList = value
|
||||||
this.genderList.forEach(item=>{
|
this.genderList.forEach(item=>{
|
||||||
item.showList = [false,false,false]
|
item.showList = [false,false,false]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
deep:true,
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleShow(item,index,number){
|
handleShow(type,index,value,e){
|
||||||
|
let phoneInfo = uni.getStorageSync('phoneInfo')
|
||||||
|
let width = phoneInfo.screenWidth
|
||||||
|
let startWidth = width * 0.2
|
||||||
|
let endWidth = width * 0.6
|
||||||
|
let now = e.detail.x
|
||||||
|
if (type === 'man'){
|
||||||
|
this.isShowMan = true
|
||||||
if (index === 0){
|
if (index === 0){
|
||||||
//男
|
this.manText = '低消费' + value + '%'
|
||||||
let list = []
|
}else if (index === 1){
|
||||||
this.genderList[0].showList.forEach(()=>{
|
this.manText = '普通消费' + value + '%'
|
||||||
list.push(false)
|
}else if (index === 2){
|
||||||
})
|
this.manText = '高消费' + value + '%'
|
||||||
this.genderList[0].showList = list
|
}
|
||||||
this.genderList[0].showList[number] = true
|
|
||||||
}else if(index === 1){
|
if (now<startWidth){
|
||||||
//女
|
this.position = 'left'
|
||||||
let list = []
|
this.positionWidth = 0
|
||||||
this.genderList[1].showList.forEach(()=>{
|
}else if(now>startWidth && now<endWidth){
|
||||||
list.push(false)
|
this.position = 'left'
|
||||||
})
|
this.positionWidth = `calc(${now}px - 16px)`
|
||||||
this.genderList[1].showList = list
|
}else if(now>endWidth){
|
||||||
this.genderList[1].showList[number] = true
|
this.position = 'right'
|
||||||
|
this.positionWidth = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if(type==='woman'){
|
||||||
|
this.isShowWoman = true
|
||||||
|
if (index === 0){
|
||||||
|
this.womanText = '低消费' + value + '%'
|
||||||
|
}else if (index === 1){
|
||||||
|
this.womanText = '普通消费' + value + '%'
|
||||||
|
}else if (index === 2){
|
||||||
|
this.womanText = '高消费' + value + '%'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (now<startWidth){
|
||||||
|
this.positionWoman = 'left'
|
||||||
|
this.positionWidthWoman = 0
|
||||||
|
}else if(now>startWidth && now<endWidth){
|
||||||
|
this.positionWoman = 'left'
|
||||||
|
this.positionWidthWoman = `calc(${now}px - 16px)`
|
||||||
|
}else if(now>endWidth){
|
||||||
|
this.positionWoman = 'right'
|
||||||
|
this.positionWidthWoman = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
@ -107,6 +158,7 @@ export default {
|
|||||||
.gender{
|
.gender{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
position: relative;
|
||||||
.top{
|
.top{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -125,6 +177,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.progress{
|
.progress{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -158,7 +211,7 @@ export default {
|
|||||||
left: 0;
|
left: 0;
|
||||||
border-radius:0 2px 2px 0;
|
border-radius:0 2px 2px 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 4px;
|
text-indent: 0.25rem;
|
||||||
.text{
|
.text{
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
@ -184,7 +237,7 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 4px;
|
text-indent: 0.25rem;
|
||||||
.text{
|
.text{
|
||||||
width: 130px;
|
width: 130px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
@ -205,23 +258,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.normal:after{
|
|
||||||
position: absolute;
|
|
||||||
content:'';
|
|
||||||
width: 2px;
|
|
||||||
height: 100%;
|
|
||||||
background: #FFFFFF;
|
|
||||||
z-index:9;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.small{
|
.small{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 4px;
|
text-indent: 0.25rem;
|
||||||
border-radius:2px 0 0 2px;
|
border-radius:2px 0 0 2px;
|
||||||
.text{
|
.text{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -242,17 +286,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.small:after{
|
|
||||||
position: absolute;
|
|
||||||
content:'';
|
|
||||||
width: 2px;
|
|
||||||
height: 100%;
|
|
||||||
background: #FFFFFF;
|
|
||||||
z-index:9;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.meng{
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 5px;
|
||||||
|
z-index: 9;
|
||||||
|
top: 0;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
color:#fff;
|
||||||
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.imgKey{
|
.imgKey{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -29,9 +29,9 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<p class="price">{{ info.VehicleCount?info.VehicleCount:'-' }}</p>
|
<p class="price">{{ info.VehicleCount?info.VehicleCount:'-' }}</p>
|
||||||
<view class="right" v-if="info.VehicleCount">
|
<view class="right" v-if="addAreaCarNumber">
|
||||||
<image class="arrowTop" :src="Number((info.VehicleCount / info.MonthVehicleCount)-1)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="arrowTop" :src="((info.VehicleCount / info.MonthVehicleCount)-1)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<text class="text">{{info.VehicleCount / info.MonthVehicleCount?Math.abs((((info.VehicleCount / info.MonthVehicleCount) - 1) *100).toFixed(2)) + '%':'-' + '%'}}</text>
|
<text class="text">{{addAreaCarNumber ? addAreaCarNumber + '%':'-' + '%'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
<p class="text">入区车辆 <text class="unit">/辆</text></p>
|
<p class="text">入区车辆 <text class="unit">/辆</text></p>
|
||||||
@ -39,9 +39,9 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<p class="price">{{ info.AvgVehicleAmount ?info.AvgVehicleAmount :'-' }}</p>
|
<p class="price">{{ info.AvgVehicleAmount ?info.AvgVehicleAmount :'-' }}</p>
|
||||||
<view class="right" v-if="info.AvgVehicleAmount">
|
<view class="right" v-if="oneCarPrice">
|
||||||
<image class="arrowTop" :src="Number((info.AvgVehicleAmount / info.MonthVehicleAmount)-1)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
<image class="arrowTop" :src="Number((info.AvgVehicleAmount / info.MonthVehicleAmount)-1)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
|
||||||
<text class="text">{{info.AvgVehicleAmount / info.MonthVehicleAmount?Math.abs((((info.AvgVehicleAmount / info.MonthVehicleAmount) - 1) *100).toFixed(2)) + '%':'-' + '%'}}</text>
|
<text class="text">{{oneCarPrice?oneCarPrice + '%':'-' + '%'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
<p class="text">单车价值 <text class="unit">/元</text></p>
|
<p class="text">单车价值 <text class="unit">/元</text></p>
|
||||||
@ -107,7 +107,9 @@ export default {
|
|||||||
LowConsumption_Rate:0
|
LowConsumption_Rate:0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
genderList:[false,false,false]
|
genderList:[false,false,false],
|
||||||
|
addAreaCarNumber:'',//入区车辆增长
|
||||||
|
oneCarPrice:'',//单车价值
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -119,8 +121,13 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
|
console.log('value',value)
|
||||||
this.info = value
|
this.info = value
|
||||||
}
|
this.addAreaCarNumber = Math.abs((this.info.VehicleCount / this.info.MonthVehicleCount - 1)*100).toFixed(2)
|
||||||
|
this.oneCarPrice = Math.abs(((this.info.AvgVehicleAmount / this.info.MonthVehicleAmount) - 1) *100).toFixed(2)
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
deep:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@ -172,6 +179,14 @@ export default {
|
|||||||
padding-left: 26px;
|
padding-left: 26px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
.price{
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #341D00;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
.top{
|
.top{
|
||||||
display: flex;
|
display: flex;
|
||||||
.price{
|
.price{
|
||||||
@ -208,7 +223,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.text{
|
.text{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
|||||||
@ -146,9 +146,6 @@ export default {
|
|||||||
//分析的文字
|
//分析的文字
|
||||||
const total = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqText)
|
const total = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqText)
|
||||||
this.analyseText = total.Result_Data.List[0]?total.Result_Data.List[0].ANALYSIS_CONTENT:''
|
this.analyseText = total.Result_Data.List[0]?total.Result_Data.List[0].ANALYSIS_CONTENT:''
|
||||||
},
|
|
||||||
bindPickerChange(){
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//返回上一级s
|
//返回上一级s
|
||||||
handleBack(){
|
handleBack(){
|
||||||
@ -161,7 +158,6 @@ export default {
|
|||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击跳转服务区
|
//点击跳转服务区
|
||||||
handleGoSelectService(){
|
handleGoSelectService(){
|
||||||
|
|||||||
@ -43,21 +43,45 @@ export default {
|
|||||||
const date = new Date()
|
const date = new Date()
|
||||||
let m = date.getMonth()
|
let m = date.getMonth()
|
||||||
if (index >m){
|
if (index >m){
|
||||||
|
if (this.selectIndex===0){
|
||||||
if (item.name === '工作日平均'){
|
if (item.name === '工作日平均'){
|
||||||
return item.name + ":" + item.data + '万元'
|
return item.name + ":" + item.data + '万元'
|
||||||
}else if(item.name === '周末平均'){
|
}else if(item.name === '周末平均'){
|
||||||
|
return item.name + ":" + item.data + '万元'
|
||||||
|
}else {
|
||||||
|
return item.name + ":" + item.data + '万元'
|
||||||
|
}
|
||||||
|
}else if(this.selectIndex === 1){
|
||||||
|
if (item.name === '工作日平均'){
|
||||||
return item.name + ":" + item.data + '笔'
|
return item.name + ":" + item.data + '笔'
|
||||||
|
}else if(item.name === '周末平均'){
|
||||||
|
return item.name + ":" + item.data + '笔'
|
||||||
|
}else {
|
||||||
|
return item.name + ":" + item.data + '笔'
|
||||||
|
}
|
||||||
|
}else if(this.selectIndex === 2){
|
||||||
|
if (item.name === '工作日平均'){
|
||||||
|
return item.name + ":" + item.data + '元'
|
||||||
|
}else if(item.name === '周末平均'){
|
||||||
|
return item.name + ":" + item.data + '元'
|
||||||
}else {
|
}else {
|
||||||
return item.name + ":" + item.data + '元'
|
return item.name + ":" + item.data + '元'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if (this.selectIndex===0){
|
if (this.selectIndex===0){
|
||||||
if (item.name === '工作日平均'){
|
if (item.name === '工作日平均'){
|
||||||
return item.name + ":" + item.data + '万元,' + '较上月:' + opts.series[0].qoqAdd[index] + '%'
|
return item.name + ":" + item.data + '万元,' + '较上月:' + opts.series[0].qoqAdd[index] + '%'
|
||||||
}else if(item.name === '周末平均'){
|
}else if(item.name === '周末平均'){
|
||||||
return item.name + ":" + item.data + '笔,' + '较工作日:'+ opts.series[1].qoqAdd[index] + '%'
|
return item.name + ":" + item.data + '万元,' + '较工作日:'+ opts.series[1].qoqAdd[index] + '%'
|
||||||
}else {
|
}else {
|
||||||
return item.name + ":" + item.data + '元'
|
// 判断有节假日就显示括号 没有就不显示
|
||||||
|
if (opts.series[2].holiday[index][1]){
|
||||||
|
return item.name + ":" + item.data + '万元' + '(' + opts.series[2].holiday[index][1] + ')'
|
||||||
|
}else{
|
||||||
|
return item.name + ":" + item.data + '万元'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else if (this.selectIndex === 1){
|
}else if (this.selectIndex === 1){
|
||||||
if (item.name === '工作日平均'){
|
if (item.name === '工作日平均'){
|
||||||
@ -65,17 +89,25 @@ export default {
|
|||||||
}else if(item.name === '周末平均'){
|
}else if(item.name === '周末平均'){
|
||||||
return item.name + ":" + item.data + '笔,' + '较工作日:'+ opts.series[1].qoqAdd[index] + '%'
|
return item.name + ":" + item.data + '笔,' + '较工作日:'+ opts.series[1].qoqAdd[index] + '%'
|
||||||
}else {
|
}else {
|
||||||
|
if (opts.series[2].holiday[index][1]){
|
||||||
|
return item.name + ":" + item.data + '笔' + '(' + opts.series[2].holiday[index][1] + ')'
|
||||||
|
}else{
|
||||||
return item.name + ":" + item.data + '笔'
|
return item.name + ":" + item.data + '笔'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else if(this.selectIndex === 2){
|
}else if(this.selectIndex === 2){
|
||||||
if (item.name === '工作日平均'){
|
if (item.name === '工作日平均'){
|
||||||
return item.name + ":" + item.data + '元,' + '较上月:' + opts.series[0].qoqAdd[index] + '%'
|
return item.name + ":" + item.data + '元,' + '较上月:' + opts.series[0].qoqAdd[index] + '%'
|
||||||
}else if(item.name === '周末平均'){
|
}else if(item.name === '周末平均'){
|
||||||
return item.name + ":" + item.data + '元,' + '较工作日:'+ opts.series[1].qoqAdd[index] + '%'
|
return item.name + ":" + item.data + '元,' + '较工作日:'+ opts.series[1].qoqAdd[index] + '%'
|
||||||
}else {
|
}else {
|
||||||
|
if (opts.series[2].holiday[index][1]){
|
||||||
|
return item.name + ":" + item.data + '元' + '(' + opts.series[2].holiday[index][1] + ')'
|
||||||
|
}else{
|
||||||
return item.name + ":" + item.data + '元'
|
return item.name + ":" + item.data + '元'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// if (this.selectIndex===0){
|
// if (this.selectIndex===0){
|
||||||
// if (item.name === '平日平均'){
|
// if (item.name === '平日平均'){
|
||||||
// return item.name + ":" + this.dataList.normal[0].data[index] + '元';
|
// return item.name + ":" + this.dataList.normal[0].data[index] + '元';
|
||||||
@ -95,9 +127,19 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理传入的数据
|
// 处理传入的数据
|
||||||
handleCarData(value) {
|
handleCarData(value) {
|
||||||
|
console.log('1111',value)
|
||||||
let res = value
|
let res = value
|
||||||
|
let max = 0
|
||||||
|
value.series.forEach(item=>{
|
||||||
|
item.data.forEach(subItem=>{
|
||||||
|
if (max < Number(subItem)){
|
||||||
|
max = Number(subItem)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log('max',max)
|
||||||
let config = {
|
let config = {
|
||||||
max:this.getSplitNumber(value.max)
|
max:this.getSplitNumber(max)
|
||||||
}
|
}
|
||||||
this.drawCharts('compare', res,config)
|
this.drawCharts('compare', res,config)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -8,7 +8,19 @@
|
|||||||
|
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="chartsItem">
|
<div class="chartsItem">
|
||||||
<p class="title">业态充盈度</p>
|
<div class="top">
|
||||||
|
<p class="title">{{thisMonth}}月业态充盈度</p>
|
||||||
|
<div class="time">
|
||||||
|
<div class="select">
|
||||||
|
<picker mode="date" fields="month" :value="single" :end="endData" @change="bindDateChange" >
|
||||||
|
<view class="time">
|
||||||
|
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
|
||||||
|
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-if="fillDegreeList.result.series[0].data.length>0">
|
<div v-if="fillDegreeList.result.series[0].data.length>0">
|
||||||
<filling-degree :data="fillDegreeList" @handleChangeBandLevel="handleChangeBandLevel" :isClick="isClick"/>
|
<filling-degree :data="fillDegreeList" @handleChangeBandLevel="handleChangeBandLevel" :isClick="isClick"/>
|
||||||
<analyse :analyseInfo="{analysisins_type: 1502,analysisins_format: 2000}" />
|
<analyse :analyseInfo="{analysisins_type: 1502,analysisins_format: 2000}" />
|
||||||
@ -35,7 +47,8 @@
|
|||||||
<p class="title">品牌指数</p>
|
<p class="title">品牌指数</p>
|
||||||
<div >
|
<div >
|
||||||
<div class="labelList">
|
<div class="labelList">
|
||||||
<div :class="item[4]?'labelItem labelItemSelect':'labelItem labelItemUnSelect'" v-for="(item,index) in brandLabelList" :key="index" @click="changeLabel(item)">
|
<div :class="item[5]?'labelItem labelItemSelect':'labelItem labelItemUnSelect'" v-for="(item,index) in brandLabelList" :key="index" @click="changeLabel(item)">
|
||||||
|
<image class="icon" :src="item[4]"></image>
|
||||||
<p class="name">{{item[0]}}<text class="number">({{item[1]}})</text></p>
|
<p class="name">{{item[0]}}<text class="number">({{item[1]}})</text></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -81,11 +94,14 @@ export default {
|
|||||||
serviceInfo:{}, //当前服务区信息
|
serviceInfo:{}, //当前服务区信息
|
||||||
backType:'',//返回的页面类型
|
backType:'',//返回的页面类型
|
||||||
analyseInfo:{
|
analyseInfo:{
|
||||||
analysisins_type: 1501
|
analysisins_type: 1501 // 传给headTop组件的
|
||||||
},
|
},
|
||||||
selectKey:'',//有数据的话
|
selectKey:'',//有数据的话
|
||||||
str:'',
|
str:'',
|
||||||
isClick:true,//图表是否能点击
|
isClick:true,//图表是否能点击
|
||||||
|
single:'',//显示时间
|
||||||
|
thisMonth:'',//几月
|
||||||
|
endData:'', // 结束时间
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@ -94,12 +110,20 @@ export default {
|
|||||||
this.serviceInfo = serviceInfo
|
this.serviceInfo = serviceInfo
|
||||||
//跳转的时候带上时间
|
//跳转的时候带上时间
|
||||||
this.time = option.time
|
this.time = option.time
|
||||||
|
this.endData = new Date()
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
let storeTime = uni.getStorageSync('lastDay')
|
let storeTime = uni.getStorageSync('lastDay')
|
||||||
if (storeTime){
|
if (storeTime){
|
||||||
this.time = storeTime
|
this.time = storeTime
|
||||||
}
|
}
|
||||||
|
this.single = this.$util.getThisMonthHave(this.time)
|
||||||
|
const date = new Date(this.single)
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
if (m<10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
this.thisMonth = m
|
||||||
let storeServiceInfo = uni.getStorageSync('currentService')
|
let storeServiceInfo = uni.getStorageSync('currentService')
|
||||||
if (storeServiceInfo){
|
if (storeServiceInfo){
|
||||||
this.serviceInfo = storeServiceInfo
|
this.serviceInfo = storeServiceInfo
|
||||||
@ -123,17 +147,55 @@ export default {
|
|||||||
this.getBrandInfoList()
|
this.getBrandInfoList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
bindDateChange(e){
|
||||||
|
const date = new Date(e.detail.value)
|
||||||
|
const nowDate = new Date()
|
||||||
|
let nowMonth = nowDate.getMonth() + 1
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
|
||||||
|
this.single = e.detail.value
|
||||||
|
let d
|
||||||
|
if (nowMonth === m){
|
||||||
|
let nowYear = nowDate.getFullYear()
|
||||||
|
let nowMonth = nowDate.getMonth() +1
|
||||||
|
if (nowMonth<10){
|
||||||
|
nowMonth = '0'+ nowMonth
|
||||||
|
}
|
||||||
|
let nowDay = nowDate.getDate() - 1
|
||||||
|
if (nowDay<10){
|
||||||
|
nowDay = '0'+ nowDay
|
||||||
|
}
|
||||||
|
this.time = `${nowYear}-${nowMonth}-${nowDay}`
|
||||||
|
d = nowDay
|
||||||
|
}else{
|
||||||
|
d = this.$util.getThisMonthDay(e.detail.value)
|
||||||
|
this.time = e.detail.value + '-' + d
|
||||||
|
}
|
||||||
|
if (m<10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
this.thisMonth = m
|
||||||
|
this.endTime = e.detail.value + '-' + d
|
||||||
|
this.onRefresh()
|
||||||
|
console.log('this.time',this.time)
|
||||||
|
},
|
||||||
|
onRefresh(){
|
||||||
|
//业态充盈度
|
||||||
|
this.getFillDegreeList()
|
||||||
|
//品牌指数列表
|
||||||
|
this.getBrandInfoList()
|
||||||
|
},
|
||||||
async changeLabel(item){
|
async changeLabel(item){
|
||||||
console.log('item',item)
|
console.log('item',item)
|
||||||
let list = this.brandLabelList
|
let list = this.brandLabelList
|
||||||
list.forEach(selectItem=>{
|
list.forEach(selectItem=>{
|
||||||
selectItem[4] = false
|
selectItem[5] = false
|
||||||
})
|
})
|
||||||
list.forEach(selectItem=>{
|
list.forEach(selectItem=>{
|
||||||
if (item[3] === selectItem[3]){
|
if (item[3] === selectItem[3]){
|
||||||
selectItem[4] = true
|
selectItem[5] = true
|
||||||
}else{
|
}else{
|
||||||
selectItem[4] = false
|
selectItem[5] = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.brandLabelList = list
|
this.brandLabelList = list
|
||||||
@ -146,7 +208,7 @@ export default {
|
|||||||
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
||||||
this.brandInfoList =totalData.Result_Data.ShopBrandList
|
this.brandInfoList =totalData.Result_Data.ShopBrandList
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
console.log('this.brandLabelList',this.brandLabelList)
|
// 如果要多选 就下面注释的这段
|
||||||
// let str = ''
|
// let str = ''
|
||||||
// list.forEach(selectItem=>{
|
// list.forEach(selectItem=>{
|
||||||
// if (item[3] === selectItem[3]){
|
// if (item[3] === selectItem[3]){
|
||||||
@ -217,7 +279,6 @@ export default {
|
|||||||
// BrandType:str2,
|
// BrandType:str2,
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
// 业态充盈的改变事件
|
// 业态充盈的改变事件
|
||||||
async handleChangeBandLevel(key){
|
async handleChangeBandLevel(key){
|
||||||
@ -412,6 +473,57 @@ export default {
|
|||||||
padding: 28px 16px 24px;
|
padding: 28px 16px 24px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
.chartsItem{
|
.chartsItem{
|
||||||
|
.top{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.title{
|
||||||
|
font-size: 17px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #160002;
|
||||||
|
line-height: 24px;
|
||||||
|
.unit{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #786B6C;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.time{
|
||||||
|
margin-bottom: 4px;
|
||||||
|
.select{
|
||||||
|
margin-left: 8px;
|
||||||
|
display: inline-block;
|
||||||
|
.time {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 4px;
|
||||||
|
.day {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #782717;
|
||||||
|
line-height: 44rpx;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.uni-input {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ae664e;
|
||||||
|
line-height: 36rpx;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
width: 24px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.title{
|
.title{
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
font-family: PingFangSC-Semibold, PingFang SC;
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
@ -438,6 +550,13 @@ export default {
|
|||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.icon{
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
.name{
|
.name{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
|||||||
@ -217,6 +217,7 @@ export default {
|
|||||||
ShowConvertRate:true
|
ShowConvertRate:true
|
||||||
}
|
}
|
||||||
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionAnalysis',req)
|
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionAnalysis',req)
|
||||||
|
console.log('totalData',totalData)
|
||||||
this.customer = totalData.Result_Data?totalData.Result_Data:{}
|
this.customer = totalData.Result_Data?totalData.Result_Data:{}
|
||||||
},
|
},
|
||||||
//客群分析男女的气泡图
|
//客群分析男女的气泡图
|
||||||
@ -304,6 +305,7 @@ export default {
|
|||||||
],
|
],
|
||||||
max:''
|
max:''
|
||||||
}
|
}
|
||||||
|
if (data.Result_Data){
|
||||||
data.Result_Data.CustomerSaleList.forEach(item=>{
|
data.Result_Data.CustomerSaleList.forEach(item=>{
|
||||||
res.categories.push(item.BusinessTradeName)
|
res.categories.push(item.BusinessTradeName)
|
||||||
res.series[0].data.push(item.MaleRatio)
|
res.series[0].data.push(item.MaleRatio)
|
||||||
@ -318,6 +320,10 @@ export default {
|
|||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
this.consterPreferList = res
|
this.consterPreferList = res
|
||||||
|
}else{
|
||||||
|
this.consterPreferList = {}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//客群消费水平
|
//客群消费水平
|
||||||
async getConsumptionLevelList(){
|
async getConsumptionLevelList(){
|
||||||
|
|||||||
@ -475,7 +475,7 @@ export default {
|
|||||||
listNormal.push(subItem[1])
|
listNormal.push(subItem[1])
|
||||||
})
|
})
|
||||||
normalAmount.push({name:item.name,data:listNormal})
|
normalAmount.push({name:item.name,data:listNormal})
|
||||||
RevenueAmount.push({name:item.name,data:list,qoqAdd:qoqAddList})
|
RevenueAmount.push({name:item.name,data:list,qoqAdd:qoqAddList,holiday: item.value})
|
||||||
})
|
})
|
||||||
data.Result_Data.TicketCountList.forEach(item=>{
|
data.Result_Data.TicketCountList.forEach(item=>{
|
||||||
let list = []
|
let list = []
|
||||||
@ -488,7 +488,7 @@ export default {
|
|||||||
qoqAddList.push(subItem[2])
|
qoqAddList.push(subItem[2])
|
||||||
list.push(number)
|
list.push(number)
|
||||||
})
|
})
|
||||||
TicketCountList.push({name:item.name,data:list,qoqAdd:qoqAddList})
|
TicketCountList.push({name:item.name,data:list,qoqAdd:qoqAddList,holiday: item.value})
|
||||||
})
|
})
|
||||||
data.Result_Data.AvgTicketAmountList .forEach(item=>{
|
data.Result_Data.AvgTicketAmountList .forEach(item=>{
|
||||||
let list = []
|
let list = []
|
||||||
@ -501,9 +501,8 @@ export default {
|
|||||||
list.push(number)
|
list.push(number)
|
||||||
qoqAddList.push(subItem[2])
|
qoqAddList.push(subItem[2])
|
||||||
})
|
})
|
||||||
AvgTicketAmountList.push({name:item.name,data:list,qoqAdd:qoqAddList})
|
AvgTicketAmountList.push({name:item.name,data:list,qoqAdd:qoqAddList,holiday: item.value})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.revenueAll = [
|
this.revenueAll = [
|
||||||
{
|
{
|
||||||
data:this.$util.fmoney(data.Result_Data.RevenueAmount),
|
data:this.$util.fmoney(data.Result_Data.RevenueAmount),
|
||||||
|
|||||||
@ -299,12 +299,14 @@ export default {
|
|||||||
let canToSeverpartIndex = !provinceId ? this.hasSeverpartIndexAuthority : this.PushAuthority.some(n => {
|
let canToSeverpartIndex = !provinceId ? this.hasSeverpartIndexAuthority : this.PushAuthority.some(n => {
|
||||||
return n.ProvinceCode == provinceId && n.ShopAnalysisType == 1
|
return n.ProvinceCode == provinceId && n.ShopAnalysisType == 1
|
||||||
})
|
})
|
||||||
|
console.log('severpartIndexPath',severpartIndexPath)
|
||||||
this.$util.toNextRoute('navigateTo', canToSeverpartIndex ? severpartIndexPath : serverpartUploadPath)
|
console.log('canToSeverpartIndex',canToSeverpartIndex)
|
||||||
|
this.$util.toNextRoute('navigateTo', severpartIndexPath)
|
||||||
|
|
||||||
item.visited = true
|
item.visited = true
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
selectTab(name, index) {
|
selectTab(name, index) {
|
||||||
this[name] = index
|
this[name] = index
|
||||||
@ -481,7 +483,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.headMsg = totalData
|
this.headMsg = totalData
|
||||||
console.log('111',this.headMsg)
|
|
||||||
// 饼图分析及数据条形分析
|
// 饼图分析及数据条形分析
|
||||||
const [progressList, pieList] = this.getProgressData(busniessTypePie, totalData.cashPay)
|
const [progressList, pieList] = this.getProgressData(busniessTypePie, totalData.cashPay)
|
||||||
this.modelProgress = progressList
|
this.modelProgress = progressList
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="box-card" :style="'opacity:'+(1-opacity)+';'">
|
<div class="box-card" :style="'opacity:'+(1-opacity)+';'">
|
||||||
<div class="box-top-title">
|
<div class="box-top-title">
|
||||||
<span class="box-center-title">{{sMsg.serverpartname}}</span>
|
<span class="box-center-title">{{sMsg.serverpartname}}</span>
|
||||||
<picker mode="date" @change="bindDateChange" :value="theRequest&&theRequest.time" start="2021/01/01"
|
<picker mode="date" @change="bindDateChange" :value="theRequest&&theRequest.time" :start="startTime" :end="endTime"
|
||||||
class="title-clock">
|
class="title-clock">
|
||||||
<view>{{searchDate}} <text class="uni-icon uni-icon-arrowdown"></text></view>
|
<view>{{searchDate}} <text class="uni-icon uni-icon-arrowdown"></text></view>
|
||||||
</picker>
|
</picker>
|
||||||
@ -214,6 +214,8 @@
|
|||||||
ServiceRevenueData: [],
|
ServiceRevenueData: [],
|
||||||
nowTab: 1,
|
nowTab: 1,
|
||||||
operationModel: [], // 安徽经营模式
|
operationModel: [], // 安徽经营模式
|
||||||
|
startTime:'',//开始时间
|
||||||
|
endTime:'',//结束时间
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -237,6 +239,35 @@
|
|||||||
this.initData(option)
|
this.initData(option)
|
||||||
this.getData(option)
|
this.getData(option)
|
||||||
}
|
}
|
||||||
|
let startTime // 开始时间
|
||||||
|
const date = new Date()
|
||||||
|
let y = date.getFullYear()
|
||||||
|
let m = date.getMonth() + 1
|
||||||
|
let d = date.getDate() - 1
|
||||||
|
if (d - 8 < 0){
|
||||||
|
let num = 8 - d
|
||||||
|
m = m - 1
|
||||||
|
let changeMonth = m
|
||||||
|
if (changeMonth<10){
|
||||||
|
changeMonth = '0' + changeMonth
|
||||||
|
}
|
||||||
|
let thisMonthDay = this.$util.getThisMonthDay(`${y}-${changeMonth}`)
|
||||||
|
if (m < 10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
startTime = `${y}-${m}-${thisMonthDay - num}`//真实的日期
|
||||||
|
}else{
|
||||||
|
if (m < 10){
|
||||||
|
m = '0' + m
|
||||||
|
}
|
||||||
|
let day
|
||||||
|
day = d - 8
|
||||||
|
startTime = `${y}-${m}-${day}`
|
||||||
|
}
|
||||||
|
this.startTime = startTime
|
||||||
|
this.endTime = `${y}-${m}-${d}`
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeTab(value) {
|
changeTab(value) {
|
||||||
|
|||||||
@ -563,6 +563,8 @@ export default {
|
|||||||
if (d - 8 <10){
|
if (d - 8 <10){
|
||||||
day = d - 8
|
day = d - 8
|
||||||
day = '0' + day
|
day = '0' + day
|
||||||
|
}else{
|
||||||
|
day = d - 8
|
||||||
}
|
}
|
||||||
this.startDate = `${y}-${m}-${day}`
|
this.startDate = `${y}-${m}-${day}`
|
||||||
}
|
}
|
||||||
@ -856,7 +858,6 @@ export default {
|
|||||||
list.push(item)
|
list.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('this.bodyList',this.bodyList)
|
|
||||||
this.bodyList = list
|
this.bodyList = list
|
||||||
this.allShopCount = res.Result_Data.List.length
|
this.allShopCount = res.Result_Data.List.length
|
||||||
})
|
})
|
||||||
@ -958,7 +959,7 @@ export default {
|
|||||||
this.lastDayBillCount = res.Result_Data
|
this.lastDayBillCount = res.Result_Data
|
||||||
this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
|
this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
|
||||||
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
|
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
|
||||||
this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price )
|
this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
|
||||||
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
|
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
|
||||||
flag2 = true
|
flag2 = true
|
||||||
})
|
})
|
||||||
|
|||||||
@ -13,7 +13,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topImg">
|
<div class="topImg">
|
||||||
<image v-if="topBg.length>0" @click="handlePreview('have')" class="topDefaultBg" :src="topBg[selectTopBg]"></image>
|
<swiper v-if="topBg.length>0" :current="currentImg" class="carousel" @change="changeSwiper">
|
||||||
|
<swiper-item class="imgIndex" v-for="(item,index) in topBg" :key="index" >
|
||||||
|
<image class="img" :src="item"></image>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<div v-if="topBg.length>0" class="picNumber" @click="handlePreview">
|
||||||
|
<image class="icon" src="/static/images/noImg.svg"></image>
|
||||||
|
<text class="text"> {{currentImg + 1}} / {{ topBg.length }}</text>
|
||||||
|
<image class="more" src="/static/images/more.svg"></image>
|
||||||
|
</div>
|
||||||
<image v-else @click="handlePreview('default')" class="topDefaultBg" src="https://eshangtech.com/ShopICO/ahyd-BID/service/default.png"></image>
|
<image v-else @click="handlePreview('default')" class="topDefaultBg" src="https://eshangtech.com/ShopICO/ahyd-BID/service/default.png"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
@ -173,6 +182,8 @@ export default {
|
|||||||
defaultBg:['https://eshangtech.com/ShopICO/ahyd-BID/service/default.png'],
|
defaultBg:['https://eshangtech.com/ShopICO/ahyd-BID/service/default.png'],
|
||||||
topBg:[],
|
topBg:[],
|
||||||
selectTopBg:0,
|
selectTopBg:0,
|
||||||
|
screenWidth:0,
|
||||||
|
currentImg:0,//当前选中的图片
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
@ -180,6 +191,7 @@ export default {
|
|||||||
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()
|
||||||
|
this.screenWidth = systemInfo.screenWidth
|
||||||
if (option.isPicker==='false'){
|
if (option.isPicker==='false'){
|
||||||
this.isShowPicker = false
|
this.isShowPicker = false
|
||||||
}else if (option.isPicker==='true'){
|
}else if (option.isPicker==='true'){
|
||||||
@ -189,26 +201,27 @@ export default {
|
|||||||
onShow(){
|
onShow(){
|
||||||
let seat = uni.getStorageSync('currentService')
|
let seat = uni.getStorageSync('currentService')
|
||||||
this.handleSearch(seat)
|
this.handleSearch(seat)
|
||||||
let pageList = getCurrentPages()
|
|
||||||
console.log('pageList',pageList)
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 滚动轮播图
|
||||||
|
changeSwiper(e){
|
||||||
|
this.currentImg = e.detail.current
|
||||||
|
},
|
||||||
// 点击预览图片
|
// 点击预览图片
|
||||||
handlePreview(type){
|
handlePreview(type){
|
||||||
if (type === 'default'){
|
if (type === 'default'){
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: this.defaultBg[0], // 图片的地址url
|
current: this.defaultBg[this.currentImg], // 图片的地址url
|
||||||
urls: this.defaultBg // 预览的地址url
|
urls: this.defaultBg // 预览的地址url
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: this.defaultBg[0], // 图片的地址url
|
current: this.topBg[this.currentImg], // 图片的地址url
|
||||||
urls: this.topBg // 预览的地址url
|
urls: this.topBg // 预览的地址url
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handleSearch(seat){
|
async handleSearch(seat){
|
||||||
console.log('seat',seat)
|
|
||||||
let reqs = {
|
let reqs = {
|
||||||
longitude:seat.longitude,
|
longitude:seat.longitude,
|
||||||
ServerpartId:seat.Serverpart_ID,
|
ServerpartId:seat.Serverpart_ID,
|
||||||
@ -360,10 +373,52 @@ export default {
|
|||||||
.topImg{
|
.topImg{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 210px;
|
height: 210px;
|
||||||
|
position: relative;
|
||||||
.topDefaultBg{
|
.topDefaultBg{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.carousel{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
float: left;
|
||||||
|
.imgIndex{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.img{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.picNumber{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #383132;
|
||||||
|
border-radius: 11px;
|
||||||
|
position: absolute;
|
||||||
|
right: 16px;
|
||||||
|
bottom: 32px;
|
||||||
|
padding:5px 9px;
|
||||||
|
.icon{
|
||||||
|
width: 16px;
|
||||||
|
height: 18px;
|
||||||
|
opacity: 0.7;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
.more{
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.menu{
|
.menu{
|
||||||
width:100%;
|
width:100%;
|
||||||
|
|||||||
@ -88,6 +88,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
|
wx.getFuzzyLocation({
|
||||||
|
type:'gcj02',
|
||||||
|
altitude:true,
|
||||||
|
success: (res) =>{
|
||||||
|
let seatInfo = {
|
||||||
|
latitude:res.latitude,
|
||||||
|
longitude:res.longitude
|
||||||
|
}
|
||||||
|
uni.setStorageSync('seatInfo', seatInfo);
|
||||||
|
this.seat = seatInfo
|
||||||
|
let userSeat = uni.getStorageSync('seatInfo')
|
||||||
|
this.userLatitude = userSeat.latitude
|
||||||
|
this.userLongitude = userSeat.longitude
|
||||||
|
this.getServiceList()
|
||||||
|
}
|
||||||
|
})
|
||||||
console.log('option',option)
|
console.log('option',option)
|
||||||
this.serviceInfo = JSON.parse(option.serviceInfo)
|
this.serviceInfo = JSON.parse(option.serviceInfo)
|
||||||
if (option.chartType){
|
if (option.chartType){
|
||||||
@ -96,17 +112,17 @@ export default {
|
|||||||
this.page = option.page
|
this.page = option.page
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
let userSeat = uni.getStorageSync('seatInfo')
|
|
||||||
this.userLatitude = userSeat.latitude
|
|
||||||
this.userLongitude = userSeat.longitude
|
|
||||||
|
|
||||||
let seat = uni.getStorageSync('currentService')
|
let seat = uni.getStorageSync('currentService')
|
||||||
|
if (seat && !seat.latitude){
|
||||||
|
JSON.parse(seat)
|
||||||
|
}
|
||||||
if (seat){
|
if (seat){
|
||||||
this.longitude = seat.longitude
|
this.longitude = seat.longitude
|
||||||
this.latitude = seat.latitude
|
this.latitude = seat.latitude
|
||||||
this.area = seat.SPREGIONTYPE_NAME
|
this.area = seat.SPREGIONTYPE_NAME
|
||||||
// 标点
|
// 标点
|
||||||
this.addMarkers(seat)
|
this.addMarkers(seat)
|
||||||
|
this.getServiceList()
|
||||||
}else{
|
}else{
|
||||||
// 查详情
|
// 查详情
|
||||||
this.getServiceDetail(this.serviceInfo.Serverpart_ID)
|
this.getServiceDetail(this.serviceInfo.Serverpart_ID)
|
||||||
@ -117,8 +133,7 @@ export default {
|
|||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
// 地图初始化
|
// 地图初始化
|
||||||
this.mapCtx = uni.createMapContext('myMap')
|
this.mapCtx = uni.createMapContext('myMap')
|
||||||
// 获取片区列表
|
|
||||||
this.getServiceList()
|
|
||||||
// this.getLocation()
|
// this.getLocation()
|
||||||
// this.getListData()
|
// this.getListData()
|
||||||
},
|
},
|
||||||
@ -133,9 +148,12 @@ export default {
|
|||||||
latitude:{
|
latitude:{
|
||||||
handler(value){
|
handler(value){
|
||||||
if (value){
|
if (value){
|
||||||
|
console.log('watch',value)
|
||||||
this.getListData()
|
this.getListData()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
deep:true,
|
||||||
|
immediate:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@ -235,6 +253,7 @@ export default {
|
|||||||
async getListData(){
|
async getListData(){
|
||||||
let id
|
let id
|
||||||
let user = uni.getStorageSync('seatInfo')
|
let user = uni.getStorageSync('seatInfo')
|
||||||
|
console.log('user',user)
|
||||||
let current = uni.getStorageSync('currentService')
|
let current = uni.getStorageSync('currentService')
|
||||||
let nearService = uni.getStorageSync('nearService')
|
let nearService = uni.getStorageSync('nearService')
|
||||||
if (!this.selectIndex && this.selectIndex!==0){
|
if (!this.selectIndex && this.selectIndex!==0){
|
||||||
@ -264,6 +283,7 @@ export default {
|
|||||||
longitude:user.longitude,
|
longitude:user.longitude,
|
||||||
latitude:user.latitude
|
latitude:user.latitude
|
||||||
}
|
}
|
||||||
|
console.log('req',req)
|
||||||
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
this.serviceList = data.Result_Data.List
|
this.serviceList = data.Result_Data.List
|
||||||
},
|
},
|
||||||
|
|||||||
11
static/images/more.svg
Normal file
11
static/images/more.svg
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>服务区/更多@2x</title>
|
||||||
|
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="服务区信息" transform="translate(-100.000000, -2017.000000)" fill="#FFFFFF">
|
||||||
|
<g id="形状结合" transform="translate(100.000000, 2017.000000)">
|
||||||
|
<path d="M4.6109127,2.1109127 L8.14644661,5.64644661 L8.14644661,5.64644661 C8.34170876,5.84170876 8.34170876,6.15829124 8.14644661,6.35355339 L4.6109127,9.8890873 C4.41565056,10.0843494 4.09906807,10.0843494 3.90380592,9.8890873 C3.70854378,9.69382515 3.70854378,9.37724266 3.90380592,9.18198052 L7.08435931,5.99946609 L3.90380592,2.81801948 C3.70854378,2.62275734 3.70854378,2.30617485 3.90380592,2.1109127 C4.09906807,1.91565056 4.41565056,1.91565056 4.6109127,2.1109127 Z"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
12
static/images/noImg.svg
Normal file
12
static/images/noImg.svg
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>服务区/地址备份_2@2x</title>
|
||||||
|
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.699999988">
|
||||||
|
<g id="服务区信息" transform="translate(-124.000000, -2015.000000)">
|
||||||
|
<g id="image-fill" transform="translate(124.000000, 2015.000000)">
|
||||||
|
<polygon id="路径" points="0 0 16 0 16 16 0 16"></polygon>
|
||||||
|
<path d="M13.3333333,3.33333333 L2.66666667,3.33333333 L2.66666667,12.6666667 L8.86133333,6.47066667 C9.12166657,6.21041204 9.54366677,6.21041204 9.804,6.47066667 L13.3333333,10.0066667 L13.3333333,3.33333333 Z M1.33333333,2.662 C1.33587188,2.2977037 1.63037311,2.0029056 1.99466667,2 L14.0053333,2 C14.3706667,2 14.6666667,2.29666667 14.6666667,2.662 L14.6666667,13.338 C14.6641281,13.7022963 14.3696269,13.9970944 14.0053333,14 L1.99466667,14 C1.62931454,13.9996321 1.33333333,13.7033523 1.33333333,13.338 L1.33333333,2.662 Z M5.33333333,7.33333333 C4.59695367,7.33333333 4,6.73637967 4,6 C4,5.26362033 4.59695367,4.66666667 5.33333333,4.66666667 C6.069713,4.66666667 6.66666667,5.26362033 6.66666667,6 C6.66666667,6.73637967 6.069713,7.33333333 5.33333333,7.33333333 Z" id="形状" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
Loading…
x
Reference in New Issue
Block a user