+
+ {{`${startTime}时入区车流预警`}}
+ {{endTime===24?`${endTime - 1}-0时入区车流排行`:`0-${startTime}时入区车流排行`}}
+
+ {{ `注: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }}
+ 注: 前20个从今日零时起至今流量与月均同时段增幅情况
+
+
+
+
-
+
+
+ {{index + 1}}
+
+
+ {{item.name}}
+ {{item.SERVERPART_REGION}}区
+
+
+ {{item.VEHICLE_COUNT}}
+ /辆
+
+
+
+ {{item.VEHICLE_RATE}}%
+
-
@@ -95,129 +148,97 @@ export default {
data(){
const lastDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD', -1)
return {
- single:'',//显示时间
- endData:'', // 结束时间
- startTime:'',// 开始数据的时间
- endTime:'',// 结束数据的时间
- selectTab:1,// 选中的tab
- firstData:[],// tab选项卡为1的时候的数据
- secondData:[],// tab选项卡为2的时候的数据
- queryTime:'',// 推送传入的时间
- time:'',// 给接口的time
- statusBarHeight:'',
- menu:'',
- searchText:'',
- showDay:''// 顶部右侧显示的日期
+ single:'',//显示时间
+ endData:'', // 结束时间
+ startTime:'',// 开始数据的时间
+ endTime:'',// 结束数据的时间
+ selectTab: 1,// 选中的tab
+ tableList:[],// 表格数据
+ time:'',// 给接口的time
+ statusBarHeight:'',
+ menu:'',
+ searchText:'',
+ showMonth:'',// 上个月
+ showDay:''// 顶部右侧显示的日期
}
},
- onLoad(query){
- // 获取手机参数对页面进行适配
- let systemInfo = uni.getSystemInfoSync()
- this.statusBarHeight = Number(systemInfo.statusBarHeight)
- this.menu = uni.getMenuButtonBoundingClientRect()
- let storeTime = uni.getStorageSync('lastDay')
- if (storeTime){
- this.time = storeTime
- }
- this.searchText = this.time
+ onLoad(){
+ // 获取手机参数对页面进行适配
+ let systemInfo = uni.getSystemInfoSync()
+ this.statusBarHeight = Number(systemInfo.statusBarHeight)
+ this.menu = uni.getMenuButtonBoundingClientRect()
- const date = new Date(this.time)
- let d = date.getDate()
- if (d<10){
- d = '0'+d
- }
- this.showDay = d
-
- //传入的时间用在最上面的选择器上
- this.queryTime = query.time
- // let date //如果有推送按照推送走 没推送 走当前时间
- // if(this.queryTime){
- // date = new Date(this.queryTime)
- // }else{
- // date = new Date()
- // }
- // const y = date.getFullYear()
- // let m = date.getMonth() + 1
- // let d = date.getDate()
- // if (m<10){
- // m = '0'+m
- // }
- // // 显示的时间范围 用当前的时间
- //
- // let h = date.getHours()
- // // 如果小时减一小于0的话 天数也会往前移动一天
- // if (h-1<0){
- // d = d -1
- // }
- // if (d<10){
- // d = '0'+ d
- // }
- // this.endData = `${y}-${m}-${d}`
- // this.single = `${y}-${m}-${d}`
- // this.time = `${y}-${m}-${d}`
- // console.log('h',h)
- // // 12点的时候 等于0
- // if (h===0){
- // h = 24
- // }
- // if (this.queryTime){
- // this.startTime = h
- // }else{
- // this.startTime = h - 1
- // }
- // this.endTime = h
- // this.handleTab(1)
+ let storeTime = uni.getStorageSync('lastDay')
+ if (storeTime){
+ this.time = storeTime
+ }
+ this.searchText = this.time
+ // this.searchText = '2023-06-21'
+ const date = new Date(this.time)
+ let m = date.getMonth()
+ this.showMonth = m
+ let d = date.getDate()
+ if (d<10){
+ d = '0'+d
+ }
+ this.showDay = d
+ const nowDate = new Date()
+ let h = nowDate.getHours()
+ this.startTime = h - 1
+ // this.startTime = 19
+ //传入的时间用在最上面的选择器上
+ this.handleTab(1)
},
methods:{
// 时间器改变的方法
bindDateChange(e){
- const date = new Date(e.detail.value)
- let m = date.getMonth() + 1
- if (m<10){
- m = '0' + m
- }
- this.thisMonth = m
- this.single = e.detail.value
- let d = this.$util.getThisMonthDay(e.detail.value)
- this.endData = e.detail.value + '-' + d
- // 切换时间的时候把两个数组清空 这样更改时间之后可以展示新的数据
- this.firstData = []
- this.secondData = []
- // 改变时间重新调数据的方法
- this.onRefresh()
+ const date = new Date(e.detail.value)
+ let m = date.getMonth()
+ this.showMonth = m
+ const d = date.getDate()
+ this.searchText = e.detail.value
+ this.showDay = d
+ // 改变时间重新调数据的方法
+ this.onRefresh()
},
handleTab(val){
this.selectTab = val
- if (val === 2 && this.secondData.length===0){
+ if (val === 2 ){
const req= {
- StatisticsDate:this.time,
- StatisticsHour:this.startTime,
- StatisticsType:2
+ StatisticsDate:this.searchText,
+ StatisticsHour:this.startTime,
+ StatisticsType:2,
+ ShowCount:20
}
request.$webGet('CommercialApi/BigData/GetBayonetWarning',req).then(res=>{
res.Result_Data.List.forEach(item=>{
item.name = item.SERVERPART_NAME.split('服务区')[0]
})
- this.secondData = res.Result_Data.List
- console.log('this.secondData',this.secondData)
+ this.tableList = res.Result_Data.List
})
- }else if(val === 1 && this.firstData.length===0){
+ }else if(val === 1 ){
const req= {
- StatisticsDate:this.time,
- StatisticsHour:this.startTime,
- StatisticsType:1
+ StatisticsDate:this.searchText,
+ StatisticsHour:this.startTime,
+ StatisticsType:1,
+ ShowCount:20
}
request.$webGet('CommercialApi/BigData/GetBayonetWarning',req).then(res=>{
res.Result_Data.List.forEach(item=>{
item.name = item.SERVERPART_NAME.split('服务区')[0]
})
- this.firstData = res.Result_Data.List
+ this.tableList = res.Result_Data.List
})
}
},
onRefresh(){
this.handleTab(this.selectTab)
- }
+ },
+ handleBack(){
+ uni.navigateBack({
+ delta: 1
+ });
+ }
}
}
@@ -305,7 +326,7 @@ export default {
line-height: 28px;
position: absolute;
top: 50%;left: 50%;
- transform: translate(-14px,-7px);
+ transform: translate(-50%,-7px);
z-index:3;
}
.dayBox{
@@ -317,6 +338,137 @@ export default {
}
}
}
+
+ .content{
+ width: 100%;
+ height: calc(100vh - 212px);
+ box-sizing: border-box;
+ padding: 16px;
+ .contentTab{
+ width: 100%;
+ height: 38px;
+ border-radius: 4px;
+ background: #F3F1F5;
+ box-sizing: border-box;
+ padding: 4px;
+ display: flex;
+ .tabItem{
+ width: 50%;
+ height: 100%;
+ text-align: center;
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #786B6C;
+ line-height: 30px;
+ border-radius: 4px;
+ }
+ .selectTab{
+ background: #fff;
+ color: #21ADBA!important;
+ }
+ }
+ .noticeBox{
+ width: 100%;
+ border-bottom: 1px solid #ccc;
+ margin-top: 4px;
+ .notice{
+ font-size: 12px;
+ color: gray;
+ }
+ }
+ .contentList{
+ width: 100%;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding-bottom: 16px;
+ overflow: hidden;
+ .contentItem{
+ background: #fff;
+ padding: 19px 16px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .index{
+ width: 16px;
+ height: 16px;
+ position: relative;
+ .boxBg{
+ width: 16px;
+ height: 16px;
+ background: #10BFCE;
+ filter: blur(4px);
+ position: absolute;
+ top: 0;left: 0;
+ }
+ .indexText{
+ position: absolute;
+ top: 50%;left: 50%;
+ transform: translate(-50%,-50%);
+ z-index: 2;
+ font-size: 16px;
+ font-family: DingTalk-JinBuTi, DingTalk;
+ font-weight: normal;
+ color: #160002;
+ line-height: 20px;
+ }
+ }
+ .serviceBox{
+ width: 35%;
+ display: inline-block;
+ margin-left: 8px;
+ .name{
+ font-size: 18px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #160002;
+ line-height: 26px;
+ }
+ .position{
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #786B6C;
+ line-height: 20px;
+ }
+ }
+ .numberBox{
+ width: 30%;
+ .number{
+ font-size: 20px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #160002;
+ line-height: 24px;
+ }
+ .unit{
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #A69E9F;
+ line-height: 20px;
+ margin-left: 2px;
+ }
+ }
+ .addBox{
+ width: calc(30% - 20px);
+ display: flex;
+ align-items: center;
+ .addIcon{
+ width: 14px;
+ height: 14px;
+ }
+ .add{
+ font-size: 20px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #E83944;
+ line-height: 24px;
+ }
+ }
+ }
+ }
+ }
}
diff --git a/pages/examine/index.vue b/pages/examine/index.vue
index 8109b21..a3298c0 100644
--- a/pages/examine/index.vue
+++ b/pages/examine/index.vue
@@ -48,7 +48,7 @@
-
- 实时分析
- 注: 1个小时入区流量比5月同一时间流量增幅150%以上且每小时入区车辆超过100辆
-
- {{showDay}}
-
+
+
+
+
+
+ {{index + 1}}
+
+
+ {{item.name}}
+ {{item.SERVERPART_REGION}}区
+
+
+ {{item.VEHICLE_COUNT}}
+ /辆
+
+
+
+ {{item.VEHICLE_RATE}}%
+
+
-
@@ -109,6 +112,7 @@
门店上传{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}
@@ -45,7 +46,7 @@
+
查看更多
@@ -94,7 +95,9 @@
-
+
+
+
-
+