update
This commit is contained in:
parent
8fcf510dbc
commit
0749ce1888
@ -73,6 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import request from '@/util/index.js'
|
import request from '@/util/index.js'
|
||||||
|
import moment from "moment";
|
||||||
export default {
|
export default {
|
||||||
name: "map",
|
name: "map",
|
||||||
data(){
|
data(){
|
||||||
@ -90,16 +91,20 @@ export default {
|
|||||||
dataList:[],//
|
dataList:[],//
|
||||||
showMore: false,// 是否展开
|
showMore: false,// 是否展开
|
||||||
curYear:'',
|
curYear:'',
|
||||||
compareYear:''
|
compareYear:'',
|
||||||
|
searchTime:'',// 查询的时间
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(query){
|
onLoad(query){
|
||||||
|
console.log('query',query)
|
||||||
|
if (query.time){
|
||||||
|
this.searchTime = query.time
|
||||||
|
}
|
||||||
// 获取手机参数对页面进行适配
|
// 获取手机参数对页面进行适配
|
||||||
let systemInfo = uni.getSystemInfoSync()
|
let systemInfo = uni.getSystemInfoSync()
|
||||||
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
this.statusBarHeight = Number(systemInfo.statusBarHeight)
|
||||||
this.menu = uni.getMenuButtonBoundingClientRect()
|
this.menu = uni.getMenuButtonBoundingClientRect()
|
||||||
|
|
||||||
console.log('query',query)
|
|
||||||
if (!query.longitude || !query.latitude){
|
if (!query.longitude || !query.latitude){
|
||||||
let seat = uni.getStorageSync('seatInfo')
|
let seat = uni.getStorageSync('seatInfo')
|
||||||
this.longitude = seat.longitude
|
this.longitude = seat.longitude
|
||||||
@ -145,7 +150,6 @@ export default {
|
|||||||
dayNumber = 6 + dNumber
|
dayNumber = 6 + dNumber
|
||||||
}
|
}
|
||||||
this.howDayNumber = dayNumber
|
this.howDayNumber = dayNumber
|
||||||
console.log('dayNumber',dayNumber)
|
|
||||||
// let dateList = []
|
// let dateList = []
|
||||||
// for (let i = 1;i<=dayNumber;i++){
|
// for (let i = 1;i<=dayNumber;i++){
|
||||||
// if (i<7){
|
// if (i<7){
|
||||||
@ -157,6 +161,7 @@ export default {
|
|||||||
// this.scrollList = dateList
|
// this.scrollList = dateList
|
||||||
// 请求页面数据
|
// 请求页面数据
|
||||||
this.handleGetData()
|
this.handleGetData()
|
||||||
|
this.handleTest()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
handleBack(){
|
handleBack(){
|
||||||
@ -164,6 +169,20 @@ export default {
|
|||||||
delta: 1
|
delta: 1
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async handleTest(){
|
||||||
|
const req = {
|
||||||
|
Province_Code: '340000'
|
||||||
|
}
|
||||||
|
let data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||||
|
let list = data.Result_Data.List
|
||||||
|
let newList = []
|
||||||
|
list.forEach(item=>{
|
||||||
|
if (!item.SERVERPART_X || !item.SERVERPART_Y){
|
||||||
|
newList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log('newList',newList)
|
||||||
|
},
|
||||||
handleChangeType(value){
|
handleChangeType(value){
|
||||||
this.pageType = value
|
this.pageType = value
|
||||||
},
|
},
|
||||||
@ -171,25 +190,24 @@ export default {
|
|||||||
this.currentScroll = 'item'+ date
|
this.currentScroll = 'item'+ date
|
||||||
this.handleGetData()
|
this.handleGetData()
|
||||||
},
|
},
|
||||||
async handleGetData(date){
|
async handleGetData(){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'加载中'
|
title:'加载中'
|
||||||
})
|
})
|
||||||
let time = date?
|
// let time = date?
|
||||||
date==='all'?this.nowDay:
|
// date==='all'?this.nowDay:
|
||||||
this.currentScroll.split('item')[1]:
|
// this.currentScroll.split('item')[1]:
|
||||||
this.currentScroll.split('item')[1]
|
// this.currentScroll.split('item')[1]
|
||||||
|
|
||||||
|
|
||||||
let req = {
|
let req = {
|
||||||
ProvinceCode:'340000',
|
ProvinceCode:'340000',
|
||||||
Serverpart_ID:this.id,
|
Serverpart_ID:this.id,
|
||||||
Statistics_Date:time,
|
Statistics_Date:this.searchTime?moment(this.searchTime).format('YYYY-MM-DD'):moment().format('YYYY-MM-DD'),
|
||||||
}
|
}
|
||||||
let data = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
let data = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
||||||
console.log('111',data)
|
|
||||||
if (data.Result_Code===100){
|
if (data.Result_Code===100){
|
||||||
let list = data.Result_Data.ShopBrandList
|
let list = data.Result_Data.ShopBrandList
|
||||||
console.log('list111',list)
|
|
||||||
let resList = []
|
let resList = []
|
||||||
let noResList = []
|
let noResList = []
|
||||||
// 原先是要去掉营收为0的 现在不去
|
// 原先是要去掉营收为0的 现在不去
|
||||||
@ -200,13 +218,11 @@ export default {
|
|||||||
noResList.push(item)
|
noResList.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.dataList = this.handleSortList(resList).concat(this.handleSortBrandIdList(noResList))
|
this.dataList = this.handleSortList(resList).concat(this.handleSortBrandIdList(noResList))
|
||||||
console.log('dataList',this.dataList)
|
uni.hideLoading()
|
||||||
|
}else{
|
||||||
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
|
||||||
},
|
},
|
||||||
handleChangeShowMore(){
|
handleChangeShowMore(){
|
||||||
this.showMore = !this.showMore
|
this.showMore = !this.showMore
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<!-- 注: 1个小时入区流量比5月同一时间流量增幅150%以上且每小时入区车辆超过100辆-->
|
<!-- 注: 1个小时入区流量比5月同一时间流量增幅150%以上且每小时入区车辆超过100辆-->
|
||||||
<span class="notice" v-if="selectTab===1">{{ `注: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }}</span>
|
<span class="notice" v-if="selectTab===1">{{ `注: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }}</span>
|
||||||
<span class="notice" v-if="selectTab===2">注: 前20个从今日零时起至今流量与月均同时段增幅情况</span>
|
<span class="notice" v-if="selectTab===2">注: 前20个从今日零时起至今流量与月均同时段增幅情况</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxRight">
|
<div class="boxRight">
|
||||||
<span class="day">{{showDay}}</span>
|
<span class="day">{{showDay}}</span>
|
||||||
<img class="dayBox" src="https://eshangtech.com/ShopICO/ahyd-BID/newCommercial/dateBg.png"/>
|
<img class="dayBox" src="https://eshangtech.com/ShopICO/ahyd-BID/newCommercial/dateBg.png"/>
|
||||||
@ -31,11 +31,11 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="contentTab">
|
<div class="contentTab">
|
||||||
<div :class="selectTab===1?'selectTab tabItem':'tabItem'" @click="handleTab(1)">
|
<div :class="selectTab===1?'selectTab tabItem':'tabItem'" @click="handleTab(1)">
|
||||||
<span>{{`${startTime}时入区车流预警`}}</span>
|
<span>{{`${startTime===0?23:startTime-1}时入区车流预警`}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div :class="selectTab===2?'selectTab2 tabItem':'tabItem'" @click="handleTab(2)">
|
<div :class="selectTab===2?'selectTab2 tabItem':'tabItem'" @click="handleTab(2)">
|
||||||
<span>
|
<span>
|
||||||
{{endTime===24?`${endTime - 1}-0时入区车流排行`:`0-${startTime}时入区车流排行`}}
|
{{endTime===24?`${endTime - 1}-0时入区车流排行`:`0-${startTime===0?23:startTime-1}时入区车流排行`}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -117,6 +117,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '@/util/index.js'
|
import request from '@/util/index.js'
|
||||||
|
import moment from "moment/moment";
|
||||||
export default {
|
export default {
|
||||||
name: "specialCase",
|
name: "specialCase",
|
||||||
data(){
|
data(){
|
||||||
@ -193,9 +194,14 @@ export default {
|
|||||||
this.showDay = d
|
this.showDay = d
|
||||||
const nowDate = new Date()
|
const nowDate = new Date()
|
||||||
let h = nowDate.getHours()
|
let h = nowDate.getHours()
|
||||||
this.startTime = h-1
|
// let h = 0
|
||||||
|
this.startTime = h
|
||||||
if (this.startTime===0){
|
if (this.startTime===0){
|
||||||
this.searchText = `${y}-${nowM}-${nowD-1}`
|
let showDay = new Date(moment(this.searchText).subtract(1, 'day').format('YYYY-MM-DD')).getDate()
|
||||||
|
if (showDay<10){
|
||||||
|
showDay = '0'+showDay
|
||||||
|
}
|
||||||
|
this.showDay = showDay
|
||||||
}
|
}
|
||||||
// this.startTime = 19
|
// this.startTime = 19
|
||||||
//传入的时间用在最上面的选择器上
|
//传入的时间用在最上面的选择器上
|
||||||
@ -214,7 +220,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const total = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
|
const total = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages/commercialBI/map?longitude=${total.Result_Data.ServerpartInfo?total.Result_Data.ServerpartInfo.SERVERPART_X:''}&latitude=${total.Result_Data.ServerpartInfo?total.Result_Data.ServerpartInfo.SERVERPART_Y:''}&id=${item.SERVERPART_ID}`
|
url:`/pages/commercialBI/map?longitude=${total.Result_Data.ServerpartInfo?total.Result_Data.ServerpartInfo.SERVERPART_X:''}&latitude=${total.Result_Data.ServerpartInfo?total.Result_Data.ServerpartInfo.SERVERPART_Y:''}&id=${item.SERVERPART_ID}&time=${this.searchText}`
|
||||||
})
|
})
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},
|
},
|
||||||
@ -236,8 +242,8 @@ export default {
|
|||||||
})
|
})
|
||||||
if (val === 2 ){
|
if (val === 2 ){
|
||||||
const req= {
|
const req= {
|
||||||
StatisticsDate:this.searchText,
|
StatisticsDate:this.startTime === 0 ?moment(this.searchText).subtract(1, 'day').format('YYYY-MM-DD'):this.searchText,
|
||||||
StatisticsHour:this.startTime,
|
StatisticsHour:this.startTime === 0?23:this.startTime-1,
|
||||||
StatisticsType:2,
|
StatisticsType:2,
|
||||||
ShowCount:20
|
ShowCount:20
|
||||||
}
|
}
|
||||||
@ -251,8 +257,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}else if(val === 1 ){
|
}else if(val === 1 ){
|
||||||
const req= {
|
const req= {
|
||||||
StatisticsDate:this.searchText,
|
StatisticsDate:this.startTime === 0?moment(this.searchText).subtract(1, 'day').format('YYYY-MM-DD'):this.searchText,
|
||||||
StatisticsHour:this.startTime,
|
StatisticsHour:this.startTime === 0?23:this.startTime-1,
|
||||||
StatisticsType:1,
|
StatisticsType:1,
|
||||||
ShowCount:20
|
ShowCount:20
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2061,8 +2061,8 @@ export default {
|
|||||||
|
|
||||||
const req= {
|
const req= {
|
||||||
// this.single
|
// this.single
|
||||||
StatisticsDate: h===0 || h===24?moment(`${y}-${m}-${d}`).subtract(1, 'day').format('YYYY-MM-DD'):`${y}-${m}-${d}`,
|
StatisticsDate: h===0?moment(`${y}-${m}-${d}`).subtract(1, 'day').format('YYYY-MM-DD'):`${y}-${m}-${d}`,
|
||||||
StatisticsHour:h===0 || h===24?23:h - 1,
|
StatisticsHour:h===0?23:h - 1,
|
||||||
StatisticsType:1,
|
StatisticsType:1,
|
||||||
ShowCount:20
|
ShowCount:20
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user