This commit is contained in:
cclu 2023-05-04 09:27:05 +08:00
parent c887146ee8
commit f2971fd2ae
7 changed files with 419 additions and 61 deletions

View File

@ -143,6 +143,12 @@
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "specialCase",
"style": {
"navigationBarTitleText": ""
}
} }
] ]
}, },

View File

@ -1,7 +1,8 @@
<template> <template>
<div class="main"> <div class="main">
<image :class="type==='index'?'typeImg':'img'" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image> <image class="typeImg" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image>
<p class="text" v-if="type!=='car'">抱歉,数据为第三方接口传输无法进行画像分析</p> <p class="text" v-if="type==='index'">抱歉,数据为第三方接口传输无法进行画像分析</p>
<p class="noAuthor" v-else-if="type==='noAuthor'">抱歉您没有权限查看数智化看板请联系管理员进行授权</p>
<p class="text" v-else>抱歉,第三方数据未传,无法分析</p> <p class="text" v-else>抱歉,第三方数据未传,无法分析</p>
</div> </div>
</template> </template>
@ -14,16 +15,11 @@ export default {
type:'' type:''
} }
}, },
props:{
type:{
type:String,
default:''
}
},
onLoad(query){ onLoad(query){
if (query.type){ if (query.type){
this.type = 'index' this.type = query.type
} }
console.log('this.type',this.type)
let userInfo = uni.getStorageSync('vuex') let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo) userInfo = JSON.parse(userInfo)
console.log('userInfo',userInfo) console.log('userInfo',userInfo)

View File

@ -0,0 +1,297 @@
<template>
<div class="main">
<div style="width: 100%;height: 40px;display: flex;align-items: center">
<div class="select">
<div class="time">
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
</div>
<!-- 时间选择器 -->
<!-- <picker mode="date" fields="day" :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 class="list">
<div class="tabs">
<div :class="selectTab===1?'selectTab':'tabItem'" @click="handleTab(1)">{{`${startTime}时入区车流预警`}}</div>
<!-- 凌晨12点到1点之间查看 应该是23时到0时 这里做了个判断 -->
<div :class="selectTab===2?'selectTab':'tabItem'" @click="handleTab(2)">{{endTime===24?`${endTime - 1}-0时入区车流排行`:`0-${startTime}时入区车流排行`}}</div>
</div>
<div style="width: 100%;border-bottom: 1px solid #ccc;margin-top: 10px;padding-bottom: 4px">
<p class="notice" v-if="selectTab===1">: 1个小时入区流量比4月同一时间流量增幅150%以上且每小时入区车辆超过100辆</p>
<p class="notice" v-if="selectTab===2">: 前20个从今日零时起至今流量与月均同时段增幅情况</p>
</div>
<div style="height: calc(100vh - 130px);overflow: scroll;}">
<div v-if="selectTab===1" class="item" v-for="(item,index) in firstData" :key="index">
<div class="box" >
<text>{{index + 1}}</text>
<div class="name">{{item.name}}<div class="normal">{{item.SERVERPART_REGION}}</div></div>
<div class="enter">{{startTime}}时入区: {{item.VEHICLE_COUNT }}</div>
<div class="add">
<image class="addIcon" :src="Number(item.VEHICLE_RATE)>100?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':Number(item.VEHICLE_RATE)===100?'':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text :class="item.VEHICLE_RATE > 150?'orangeRed':''"> {{ item.VEHICLE_RATE }}%</text>
</div>
</div>
</div>
<div v-if="selectTab===2" class="item" v-for="(item,index) in secondData" :key="index">
<div class="box">
<text>{{index + 1}}</text>
<div class="name">{{item.name}}<text class="normal">{{item.SERVERPART_REGION}}</text></div>
<div class="enter">今日入区: {{item.VEHICLE_COUNT }}</div>
<div class="add">
<image class="addIcon" :src="Number(item.VEHICLE_RATE)>100?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':Number(item.VEHICLE_RATE)===100?'':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text :class="item.VEHICLE_RATE > 150?'orangeRed':''"> {{ item.VEHICLE_RATE }}%</text>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import request from '@/util/index.js'
export default {
name: "specialCase",
data(){
return {
single:'',//
endData:'', //
startTime:'',//
endTime:'',//
selectTab:1,// tab
firstData:[],// tab1
secondData:[],// tab2
queryTime:'',//
time:'',// time
}
},
onLoad(query){
//
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)
},
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()
},
handleTab(val){
this.selectTab = val
if (val === 2 && this.secondData.length===0){
const req= {
StatisticsDate:this.time,
StatisticsHour:this.startTime,
StatisticsType:2
}
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)
})
}else if(val === 1 && this.firstData.length===0){
const req= {
StatisticsDate:this.time,
StatisticsHour:this.startTime,
StatisticsType:1
}
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
})
}
},
onRefresh(){
this.handleTab(this.selectTab)
}
}
}
</script>
<style scoped lang="scss">
.main{
width: 100%;
box-sizing: border-box;
padding: 0 16px;
.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;
}
}
}
.list{
.tabs{
width: 100%;
display: flex;
.tabItem{
width: 50%;
height: 40px;
font-size: 12px;
line-height: 40px;
text-align: center;
background: #f0f0f0;
border-radius: 10px 10px 0 0;
}
.selectTab{
width: 50%;
height: 40px;
font-size: 12px;
line-height: 40px;
text-align: center;
background: #fff;
border-radius: 10px 10px 0 0;
}
}
.item{
width: 100%;
display: flex;
margin-bottom: 5px;
margin-top: 10px;
.box{
width: 100%;
display: flex;
align-items: center;
.name{
width: 40%;
font-size: 16px;
font-weight: 600;
text-align: left;
white-space: nowrap;
display: flex;
align-items: baseline;
.normal{
font-size: 12px;
font-weight: 400;
.unit{
color:#ccc;
}
}
}
.enter{
font-size: 12px;
width: 30%;
text-align: left;
white-space: nowrap;
}
.add{
font-size: 12px;
width: 30%;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
.orangeRed{
color:orangered;
}
.addIcon{
width: 20px;
height: 20px;
}
}
}
}
::-webkit-scrollbar {
width: 4px;
height: 4px;
color:transparent;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
border-radius: 10px;
background-color:transparent;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color:transparent;
}
.notice{
font-size: 12px;
color: gray;
}
}
}
</style>

View File

@ -15,7 +15,7 @@
</picker> </picker>
</view> </view>
</div> </div>
<view class="other"> <view class="other">
<view v-if="user.Membership_Id" > <view v-if="user.Membership_Id" >
<view class="topTitle"> <view class="topTitle">
<p class="title">对客营收</p> <p class="title">对客营收</p>
@ -59,7 +59,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="detail"> <view class="detail" v-if="!loadMore">
<view class="detailItem"> <view class="detailItem">
<p class="itemName"> <p class="itemName">
长款金额<text class="itemUnit">/</text> 长款金额<text class="itemUnit">/</text>
@ -126,7 +126,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="menu"> <div class="more" :style="{top:loadMore?'-270px':'-65px',paddingTop:loadMore?'16px':'12px'}" @click="handleChangeLoadMore">
<image :class="loadMore?'img':'img rate'" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</div>
<!-- 首页除顶部外,剩下的部分是自适应的高度,但是上移本身高度不变内容变了就会在底部留白,所以计算好内容的高度 在切换是否展示的时候 改变高度-->
<!-- 暂无更优法 -->
<view class="menu" :style="{top:loadMore?'-270px':'-65px',height:loadMore?
selectTab===3?'calc(1445px + env(safe-area-inset-bottom) + env(safe-area-inset-top) + env(safe-area-inset-bottom))':selectTab===2?'calc(1130px + env(safe-area-inset-bottom) + env(safe-area-inset-top))':'calc(965px + env(safe-area-inset-bottom) + env(safe-area-inset-top))':
selectTab===3?'calc(1445px + env(safe-area-inset-bottom) + env(safe-area-inset-top) + env(safe-area-inset-bottom))':selectTab===2?'calc(1130px + env(safe-area-inset-bottom) + env(safe-area-inset-top))':'calc(965px + env(safe-area-inset-bottom) + env(safe-area-inset-top))'}">
<image class="topBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/menuBg.png"></image> <image class="topBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/menuBg.png"></image>
<view class="content"> <view class="content">
<div class="tabType"> <div class="tabType">
@ -172,7 +179,7 @@
</view> </view>
<view class="chart"> <view class="chart">
<!-- 123就是对应的第几个标题选中 --> <!-- 123就是对应的第几个标题选中 老项目复制的 -->
<div v-show="selectTab===1" v-if="modelProgress.length > 0 && theRequest.ProvinceCode==340000"> <div v-show="selectTab===1" v-if="modelProgress.length > 0 && theRequest.ProvinceCode==340000">
<div> <div>
<div class="operation-c-list" v-for="(item,o) in modelProgress" :key="o"> <div class="operation-c-list" v-for="(item,o) in modelProgress" :key="o">
@ -340,16 +347,28 @@
</div> </div>
</view> </view>
</view> </view>
<div class="notice" v-if="isShow"> <!-- isShow-->
<div class="notice" v-if="special" style="background: rgba(203, 26, 26, 1)">
<view class="left"> <view class="left">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/warning.svg"></image> <image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/dangerous.svg"></image>
<view class="text"> <view class="text">
<p class="name">{{isShowTitle}}个投诉建议</p> <p class="name">五一流量预警</p>
<!-- <p class="desc"></p>--> <!-- <p class="desc"></p>-->
</view> </view>
</view> </view>
<view class="right" @click="handleSearch">去查看</view> <view class="right" @click="handleSearch('special')">去查看</view>
</div> </div>
<div class="notice" v-if="isShow" style="bottom: 200px;">
<view class="left">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/warning.svg"></image>
<view class="text">
<p class="name">{{isShowTitle}}个投诉建议</p>
<!-- <p class="desc"></p>-->
</view>
</view>
<view class="right" @click="handleSearch('other')">去查看</view>
</div>
<uni-popup ref="popup" :show="popupShow" :type="popupType" :round="popup" @hidePopup="closePop"> <uni-popup ref="popup" :show="popupShow" :type="popupType" :round="popup" @hidePopup="closePop">
<div class="popupIndex"> <div class="popupIndex">
<div class="popupTop">未上传门店: </div> <div class="popupTop">未上传门店: </div>
@ -462,6 +481,8 @@ export default {
isSuccess:false,// isSuccess:false,//
isReturn : true, isReturn : true,
isSuggestion:false,// isSuggestion:false,//
loadMore:true,//
special:true
} }
}, },
watch:{ watch:{
@ -470,15 +491,18 @@ export default {
handler:function (value){ handler:function (value){
let userInfo = uni.getStorageSync('vuex') let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo) userInfo = JSON.parse(userInfo)
console.log('userInfo11',userInfo)
//
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){ if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false this.isReturn = false
}else{
uni.redirectTo({
url:`/pages/commercialBI/noData?type=noAuthor`
})
} }
if (userInfo.userData.AuthorityInfo['e2fb458b-d1bd-48fa-805e-fc93dc71efb7'] === 1 || userInfo.userData.AuthorityInfo['ea2fc404-d924-4c88-98de-1f4d96137745'] === 1){ if (userInfo.userData.AuthorityInfo['e2fb458b-d1bd-48fa-805e-fc93dc71efb7'] === 1 || userInfo.userData.AuthorityInfo['ea2fc404-d924-4c88-98de-1f4d96137745'] === 1){
this.getSuggestion() this.getSuggestion()
}else{
uni.navigateTo({
url:`/pages/commercialBI/noData?type=index`
})
} }
// //
this.seat = uni.getStorageSync('seatInfo') this.seat = uni.getStorageSync('seatInfo')
@ -580,6 +604,10 @@ export default {
// //
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){ if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false this.isReturn = false
}else{
uni.redirectTo({
url:`/pages/commercialBI/noData?type=noAuthor`
})
} }
if (!this.isReturn){ if (!this.isReturn){
let userInfo = uni.getStorageSync('vuex') let userInfo = uni.getStorageSync('vuex')
@ -650,6 +678,9 @@ export default {
}, },
methods:{ methods:{
...mapActions(['memberLogin','getLoginCode']), ...mapActions(['memberLogin','getLoginCode']),
handleChangeLoadMore(){
this.loadMore = !this.loadMore
},
// //
handleStoreUpload(){ handleStoreUpload(){
this.popupShow = true this.popupShow = true
@ -837,13 +868,21 @@ export default {
handleReg(){ handleReg(){
this.$util.toNextRoute('redirectTo', '/pages/register/register') this.$util.toNextRoute('redirectTo', '/pages/register/register')
}, },
handleSearch(){ handleSearch(type){
let req = { if (type ==='special'){
SuggestionIds:this.isShowId if(!this.isReturn){
} this.special=false
request.$webGet('CommercialApi/Suggestion/RecordReadingLog',req).then(()=>{ this.$util.toNextRoute('navigateTo', '/pages/commercialBI/specialCase')
this.$util.toNextRoute('navigateTo', '/pages/suggestion/suggestion') }
}) }else{
let req = {
SuggestionIds:this.isShowId
}
request.$webGet('CommercialApi/Suggestion/RecordReadingLog',req).then(()=>{
this.$util.toNextRoute('navigateTo', '/pages/suggestion/suggestion')
})
}
}, },
// //
onRefresh(){ onRefresh(){
@ -1202,9 +1241,9 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
$iphoneHeight: env(safe-area-inset-bottom); $iphoneHeight: env(safe-area-inset-bottom);
.main { .main {
min-height: 100vh; height: 100vh;
width: 100%; width: 100%;
padding-bottom: calc(44px + env(safe-area-inset-bottom)); padding-bottom: calc( env(safe-area-inset-bottom));
.header { .header {
width: 100%; width: 100%;
height: 512px; height: 512px;
@ -1320,7 +1359,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
margin: 12px 0 0; margin: 6px 0 0;
.allPrice { .allPrice {
font-size: 56rpx; font-size: 56rpx;
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
@ -1342,7 +1381,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
.addBox { .addBox {
width: 100%; width: 100%;
margin-top: 12px; margin-top: 6px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -1390,7 +1429,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
.type { .type {
width: 100%; width: 100%;
height: 45px; height: 45px;
margin-top: 24px; margin-top: 8px;
.item { .item {
width: 50%; width: 50%;
display: flex; display: flex;
@ -1443,7 +1482,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
background: linear-gradient(135deg, #fff2df 0%, #ffe3e5 100%); background: linear-gradient(135deg, #fff2df 0%, #ffe3e5 100%);
box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(244, 138, 143, 0.21); box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(244, 138, 143, 0.21);
border-radius: 8rpx; border-radius: 8rpx;
margin-top: 24px; margin-top: 12px;
margin-bottom: 16px; margin-bottom: 16px;
.detailItem { .detailItem {
width: 33%; width: 33%;
@ -1493,6 +1532,21 @@ $iphoneHeight: env(safe-area-inset-bottom);
} }
} }
} }
.more{
width: 100%;
display: flex;
justify-content: center;
position: relative;
padding-bottom: 12px;
.img{
width: 24px;
height: 24px;
transform: rotate(90deg);
}
.rate{
transform: rotate(-90deg)!important;
}
}
.menu { .menu {
width: 100vw; width: 100vw;
position: relative; position: relative;
@ -1504,6 +1558,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
background: #fff; background: #fff;
top: -16px; top: -16px;
z-index: 1; z-index: 1;
.topBg { .topBg {
position: absolute; position: absolute;
width: 100vw; width: 100vw;

View File

@ -66,14 +66,11 @@
<p class="subTitle">产权单位</p> <p class="subTitle">产权单位</p>
<text class="text">{{info.ServerpartInfo.OWNEDCOMPANY?info.ServerpartInfo.OWNEDCOMPANY:'' }}</text> <text class="text">{{info.ServerpartInfo.OWNEDCOMPANY?info.ServerpartInfo.OWNEDCOMPANY:'' }}</text>
</div> </div>
<!-- <div class="word">-->
<!-- <p class="subTitle">介绍说明</p>--> <!-- <div class="unqualifiedNeeds">-->
<!-- <text class="text" style="text-indent:28px">{{info.ServerpartInfo.SERVERPART_INFO?info.ServerpartInfo.SERVERPART_INFO:'' }}</text>--> <!-- <text class="subTitle">介绍说明</text>-->
<!-- <text class="unqualNeedText" style="text-indent:28px">{{info.ServerpartInfo.SERVERPART_INFO?info.ServerpartInfo.SERVERPART_INFO:'' }}</text>-->
<!-- </div>--> <!-- </div>-->
<div class="unqualifiedNeeds">
<text class="subTitle">介绍说明</text>
<text class="unqualNeedText" style="text-indent:28px">{{info.ServerpartInfo.SERVERPART_INFO?info.ServerpartInfo.SERVERPART_INFO:'' }}</text>
</div>
</div> </div>
<div class="areaInfo" style="margin-top: 16px"> <div class="areaInfo" style="margin-top: 16px">
<p class="title">面积信息</p> <p class="title">面积信息</p>
@ -105,13 +102,13 @@
</div> </div>
<div class="right"> <div class="right">
<div class="item"> <div class="item">
<p :class="item.HASPANTRY?'text':'unText'">男厕<text style="margin-left: 4px">{{item.HASPANTRY?'(' + item.HASPANTRY+')':'' }}</text></p> <p :class="item.HASPANTRY?'text':'unText'" style="display: flex;align-items: center"><image style="width: 16px;height: 16px;margin-right: 4px" src="https://eshangtech.com/ShopICO/ahyd-BID/service/manWc.svg"/>男厕<text style="margin-left: 4px">{{item.HASPANTRY?'(' + item.HASPANTRY+')':'' }}</text></p>
<p :class="item.HASTHIRDTOILETS?'text':'unText'">第三卫生间</p> <p :class="item.HASTHIRDTOILETS?'text':'unText'">第三卫生间</p>
<p :class="item.HASCHILD?'text':'unText'">车辆维修</p> <p :class="item.HASCHILD?'text':'unText'">车辆维修</p>
<p :class="item.HASWATERROOM?'text':'unText'">开水器<text style="margin-left: 4px">{{item.HASWATERROOM?'(' + item.HASWATERROOM + ')':'' }}</text></p> <p :class="item.HASWATERROOM?'text':'unText'">开水器<text style="margin-left: 4px">{{item.HASWATERROOM?'(' + item.HASWATERROOM + ')':'' }}</text></p>
</div> </div>
<div class="item"> <div class="item">
<p :class="item.HASWIFI?'text':'unText'">女厕<text style="margin-left: 4px">{{item.HASWIFI?'(' + item.HASWIFI + ')':'' }}</text></p> <p :class="item.HASWIFI?'text':'unText'" style="display: flex;align-items: center"><image style="width: 16px;height: 16px;margin-right: 4px" src="https://eshangtech.com/ShopICO/ahyd-BID/service/womanWc.svg"/>女厕<text style="margin-left: 4px">{{item.HASWIFI?'(' + item.HASWIFI + ')':'' }}</text></p>
<p :class="item.TOILETCOUNT?'text':'unText'">潮汐厕位<text style="margin-left: 4px">{{item.TOILETCOUNT?'(' + item.TOILETCOUNT + ')':'' }}</text></p> <p :class="item.TOILETCOUNT?'text':'unText'">潮汐厕位<text style="margin-left: 4px">{{item.TOILETCOUNT?'(' + item.TOILETCOUNT + ')':'' }}</text></p>
<p :class="item.HASSHOWERROOM?'text':'unText'">车辆加水</p> <p :class="item.HASSHOWERROOM?'text':'unText'">车辆加水</p>
</div> </div>

View File

@ -4,7 +4,7 @@
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}"> <div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
<view class="news" :style="{ top: menu.top+16 + 'px', lineHeight: menu.bottom - menu.top + 'px' }"> <view class="news" :style="{ top: menu.top+16 + 'px', lineHeight: menu.bottom - menu.top + 'px' }">
<view class="box"> <view class="box">
<image class="img" src="/static/images/index/news.svg"></image> <image @click="handleNews" class="img" src="/static/images/index/news.svg"></image>
<view class="red"></view> <view class="red"></view>
</view> </view>
</view> </view>
@ -355,7 +355,10 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
}, },
handleGoEmpower(){ handleGoEmpower(){
this.$util.toNextRoute('navigateTo', '/pages/register/register') this.$util.toNextRoute('navigateTo', '/pages/register/register')
} },
handleNews(){
this.$util.toNextRoute('navigateTo', '/pages/commercialBI/specialCase')
}
}, },
} }
</script> </script>

View File

@ -16,11 +16,11 @@ const state = {
}; };
const getters = { const getters = {
getUser(state) { getUser(state) {
console.log('store',state.userData) console.log('store',state.userData)
return state.userData return state.userData
}, },
getMenu(state) { getMenu(state) {
return state.userData.AuthorityInfo return state.userData.AuthorityInfo
}, },
@ -36,7 +36,7 @@ const getters = {
shouldReLoadingList (state) { shouldReLoadingList (state) {
return state.shouldReLoadingList return state.shouldReLoadingList
}, },
}; };
const mutations = { const mutations = {
@ -47,12 +47,12 @@ const mutations = {
setVisitChannels (state, data) { setVisitChannels (state, data) {
state.visitChannels = data state.visitChannels = data
}, },
shouldReLoadingList (state, data){ shouldReLoadingList (state, data){
state.shouldReLoadingList = data state.shouldReLoadingList = data
}, },
isConnect(state,value) { isConnect(state,value) {
state.isConnect = value state.isConnect = value
}, },
setUserTodoList(state,value){ setUserTodoList(state,value){
@ -69,12 +69,12 @@ const actions = {
}) })
}, },
getTodoList({ dispatch, state,commit}){ // 获取用户待办事项 getTodoList({ dispatch, state,commit}){ // 获取用户待办事项
let _user = state.userData let _user = state.userData
request.$get("ToDoList", { request.$get("ToDoList", {
userId: _user.UserId, userId: _user.UserId,
userName: _user.UserName || '' userName: _user.UserName || ''
}).then(res => { }).then(res => {
commit('setUserTodoList', res.Data) commit('setUserTodoList', res.Data)
}) })
}, },
memberLogin({ dispatch, state,commit},_code) { memberLogin({ dispatch, state,commit},_code) {
@ -83,7 +83,7 @@ const actions = {
request.$get('WeChat_Login',{ request.$get('WeChat_Login',{
// request.$webGet('WebAPI_Push/WeChat/Login',{ // request.$webGet('WebAPI_Push/WeChat/Login',{
WeChat_Code: _code || '', WeChat_Code: _code || '',
}).then(data=>{ }).then(data=>{
console.log('data222',data) console.log('data222',data)
if (data.Result_Code === 100) { if (data.Result_Code === 100) {
@ -98,9 +98,9 @@ const actions = {
content: '请您授权登录后再操作。', content: '请您授权登录后再操作。',
success(res) { success(res) {
if(res.confirm){ if(res.confirm){
util.toNextRoute('redirectTo', '/pages/register/register') util.toNextRoute('redirectTo', '/pages/register/register')
} }
} }
}) })
@ -110,12 +110,12 @@ const actions = {
} else { } else {
console.log(data) console.log(data)
} }
}) })
}, },
async updateUser ({dispatch, commit, state},user){ async updateUser ({dispatch, commit, state},user){
let _user = user || state.userData let _user = user || state.userData
let _id = _user.Membership_Id let _id = _user.Membership_Id
if(!_id) return if(!_id) return
@ -127,14 +127,18 @@ const actions = {
data.WeChat_MiniProToken = _user.WeChat_MiniProToken data.WeChat_MiniProToken = _user.WeChat_MiniProToken
data.WeChat_UserId = _user.WeChat_UserId data.WeChat_UserId = _user.WeChat_UserId
data.WeChat_UserName = _user.WeChat_UserName data.WeChat_UserName = _user.WeChat_UserName
commit('setUser', data) commit('setUser', data)
dispatch('getTodoList') dispatch('getTodoList')
}else{
uni.redirectTo({
url:`/pages/commercialBI/noData?type=noAuthor`
})
} }
}) })
} }
} }
export default new Vuex.Store({ export default new Vuex.Store({
state, state,
mutations, mutations,
getters, getters,
@ -148,4 +152,4 @@ export default new Vuex.Store({
} }
}) })
] ]
}); });