This commit is contained in:
cclu 2023-07-20 18:18:48 +08:00
parent 7b59c90510
commit 84e0f9761d
4 changed files with 121 additions and 58 deletions

View File

@ -42,10 +42,8 @@
let _this = this let _this = this
if (this.user.WeChat_MiniProToken) { if (this.user.WeChat_MiniProToken) {
console.log('有')
this.memberLogin() this.memberLogin()
} else { } else {
console.log('无')
this.getLoginCode() this.getLoginCode()
} }

View File

@ -249,7 +249,7 @@
<span>(<span style="color: red">{{subItem.DEDUCTION_SCORE}}</span>;</span> <span>(<span style="color: red">{{subItem.DEDUCTION_SCORE}}</span>;</span>
<span style="margin-left: 4px">备注: {{subItem.EXAMINEDETAIL_DESC}})</span> <span style="margin-left: 4px">备注: {{subItem.EXAMINEDETAIL_DESC}})</span>
<div class="imgList"> <div class="imgList">
<image v-for="(imgItem,imgIndex) in subItem.imgList" :key="imgIndex" class="img" :src="imgItem" :data-src="imgItem" @click.stop="previewImage"></image> <image v-for="(imgItem,imgIndex) in subItem.imgList" :key="imgIndex" class="img" :src="imgItem" :data-src="imgItem" @click.stop="previewImage($event,subItem)"></image>
</div> </div>
</view> </view>
</div> </div>
@ -409,11 +409,12 @@ export default {
console.log('subItem',subItem) console.log('subItem',subItem)
subItem.showChild = !subItem.showChild subItem.showChild = !subItem.showChild
}, },
previewImage(event){ previewImage(event,subItem){
console.log('event',event) console.log('event',event)
console.log('subItem',subItem)
wx.previewImage({ wx.previewImage({
current: event.currentTarget.dataset.src, // http current: event.currentTarget.dataset.src, // http
urls: [event.currentTarget.dataset.src] // http urls: subItem.imgList // http
}) })
}, },
// //

View File

@ -1072,10 +1072,8 @@ export default {
Province_Code: '340000', Province_Code: '340000',
GroupType: 1 GroupType: 1
} }
console.log('requestParams',requestParams)
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParams) const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParams)
let res = bayonetCount.Result_Data.List let res = bayonetCount.Result_Data.List
console.log('res',res)
res.forEach((item=>{ res.forEach((item=>{
if (item.Vehicle_Count===null || item.SectionFlow_Count===null || item.Entry_Rate===null || item.Entry_Rate>100){ if (item.Vehicle_Count===null || item.SectionFlow_Count===null || item.Entry_Rate===null || item.Entry_Rate>100){
item.Vehicle_Count = 0 item.Vehicle_Count = 0
@ -1127,8 +1125,7 @@ export default {
allList.push(list3.slice(0,20)) allList.push(list3.slice(0,20))
this.allTrafficList = allList this.allTrafficList = allList
this.showTrafficList = this.allTrafficList[this.selectSmallTab - 1] this.showTrafficList = this.allTrafficList[this.selectSmallTab - 1]
console.log('this.allTrafficList',this.allTrafficList) // uni.hideLoading()
uni.hideLoading()
}, },
handleChangeLoadMore(){ handleChangeLoadMore(){
this.loadMore = !this.loadMore this.loadMore = !this.loadMore
@ -1143,7 +1140,6 @@ export default {
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/specialCase`) this.$util.toNextRoute('navigateTo', `/pages/commercialBI/specialCase`)
}, },
handleChangeSmallSelect(val){ handleChangeSmallSelect(val){
console.log('val',val)
this.selectSmallTab = val this.selectSmallTab = val
this.showTrafficList = this.allTrafficList[val-1] this.showTrafficList = this.allTrafficList[val-1]
}, },
@ -1315,7 +1311,7 @@ export default {
this.getUnUpLoadList() this.getUnUpLoadList()
// //
this.handleGetTrafficList() this.handleGetTrafficList()
// //
this.handleGetWarningList() this.handleGetWarningList()
} else if (this.user.Membership_Id){ // } else if (this.user.Membership_Id){ //
// //
@ -1354,8 +1350,8 @@ export default {
} }
}, },
handleGetWarningList(){ handleGetWarningList(){
console.log('single',this.single)
const date = new Date() const date = new Date()
//
let h = date.getHours() - 1 let h = date.getHours() - 1
const req= { const req= {
// this.single // this.single
@ -1464,6 +1460,50 @@ export default {
let flag2 = false let flag2 = false
let flag3 = false let flag3 = false
let _this = this let _this = this
//
const allPriceData = {
pushProvinceCode:'340000',
Statistics_Date:this.lastDay,
ShowCompareRate: true,
ShowYearRevenue: true
}
uni.showLoading({
title: '正在加载...'
})
console.log(22222)
const lastData = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData)
flag3 = true
let result = lastData.Result_Data
for(let key in result){
if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount' && key!=='YearRevenueAmount'){
let all = 0
//
result[key].forEach(item=>{
all += Number(item.value)
})
//
result[key].map(item=>{
item.percentage = ((Number(item.value)/all)*100).toFixed(2)
})
//
result[key].forEach(item=>{
item.value = _this.$util.fmoney(item.value)
})
}
}
this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount)
this.yearAmountAdd = result.YearRevenueAmount?this.$util.fmoney(result.YearRevenueAmount):'-'
this.modelProgress = result.BusinessTypeList
this.regionProgress = result.BusinessTradeList
this.areaProgress = result.SPRegionList
this.showTableData = result.RevenuePushModel
this.showTableData.compared = result.GrowthRate
//
console.log('flag2',flag2)
console.log('flag3',flag3)
// //
let yesterday = handleYesterday(this.lastDay) let yesterday = handleYesterday(this.lastDay)
if ((yesterday.substr(yesterday.length-1,1)) === '0'){ if ((yesterday.substr(yesterday.length-1,1)) === '0'){
@ -1520,7 +1560,9 @@ export default {
Statistics_Date: this.lastDay, Statistics_Date: this.lastDay,
ShowCompareRate:true ShowCompareRate:true
} }
console.log(11111)
const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData) const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData)
console.log(4444)
this.lastDayBillCount = data.Result_Data this.lastDayBillCount = data.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
@ -1566,48 +1608,48 @@ export default {
// // data f // // data f
// this.buyPriceMonth = res.Result_Data.Deliver_Price // this.buyPriceMonth = res.Result_Data.Deliver_Price
// }) // })
//
const allPriceData = {
pushProvinceCode:'340000', // request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
Statistics_Date:this.lastDay, // console.log(33333)
ShowCompareRate: true, // flag3 = true
ShowYearRevenue: true // // data
} // let result = res.Result_Data
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{ // for(let key in result){
flag3 = true // if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount' && key!=='YearRevenueAmount'){
// data // let all = 0
let result = res.Result_Data // //
for(let key in result){ // result[key].forEach(item=>{
if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount' && key!=='YearRevenueAmount'){ // all += Number(item.value)
let all = 0 // })
// // //
result[key].forEach(item=>{ // result[key].map(item=>{
all += Number(item.value) // item.percentage = ((Number(item.value)/all)*100).toFixed(2)
}) // })
// // //
result[key].map(item=>{ // result[key].forEach(item=>{
item.percentage = ((Number(item.value)/all)*100).toFixed(2) // item.value = _this.$util.fmoney(item.value)
}) // })
// // }
result[key].forEach(item=>{ // }
item.value = _this.$util.fmoney(item.value) // this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount)
}) // this.yearAmountAdd = result.YearRevenueAmount?this.$util.fmoney(result.YearRevenueAmount):'-'
} // this.modelProgress = result.BusinessTypeList
} // this.regionProgress = result.BusinessTradeList
this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount) // this.areaProgress = result.SPRegionList
this.yearAmountAdd = result.YearRevenueAmount?this.$util.fmoney(result.YearRevenueAmount):'-' // this.showTableData = result.RevenuePushModel
this.modelProgress = result.BusinessTypeList // this.showTableData.compared = result.GrowthRate
this.regionProgress = result.BusinessTradeList // //
this.areaProgress = result.SPRegionList // console.log('flag2',flag2)
this.showTableData = result.RevenuePushModel // console.log('flag3',flag3)
this.showTableData.compared = result.GrowthRate //
// //
console.log('flag2',flag2) // })
console.log('flag3',flag3) console.log(55555)
if (flag2 && flag3 ){ if (flag2 && flag3 ){
// uni.hideLoading()
this.todayAmount() this.todayAmount()
} }
})
}, },
defaultMsg() { defaultMsg() {
let option = null let option = null

View File

@ -5,7 +5,7 @@
<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">
<!-- @click="handleNews"--> <!-- @click="handleNews"-->
<image class="img" src="/static/images/index/news.svg"></image> <image class="img" src="/static/images/index/news.svg" @click="handleNews"></image>
<view class="red"></view> <view class="red"></view>
</view> </view>
</view> </view>
@ -48,6 +48,7 @@
</template> </template>
<script> <script>
import request from '@/util/index.js'
import {mapActions, mapState} from 'vuex' import {mapActions, mapState} from 'vuex'
import userList from "./components/userList.vue"; import userList from "./components/userList.vue";
import Tabbar from "../../components/tabbar/tabbar.vue"; import Tabbar from "../../components/tabbar/tabbar.vue";
@ -272,6 +273,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
}, },
], ],
isTrue:false,// isTrue:false,//
special:false
}; };
}, },
components:{ components:{
@ -298,7 +300,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
this.statusBarHeight = Number(systemInfo.statusBarHeight) this.statusBarHeight = Number(systemInfo.statusBarHeight)
// //
this.menu = uni.getMenuButtonBoundingClientRect() this.menu = uni.getMenuButtonBoundingClientRect()
this.handleGetWarningList()
this.dataList[2].list.forEach(item=>{ this.dataList[2].list.forEach(item=>{
for(let key in this.user.AuthorityInfo){ for(let key in this.user.AuthorityInfo){
if (key === item.id){ if (key === item.id){
@ -343,6 +345,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
url:`/pages/commercialBI/noData?type=index` url:`/pages/commercialBI/noData?type=index`
}) })
} }
}, },
onShow(){ onShow(){
uni.hideTabBar() uni.hideTabBar()
@ -370,9 +373,28 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
this.$util.toNextRoute('navigateTo', '/pages/register/register') this.$util.toNextRoute('navigateTo', '/pages/register/register')
}, },
handleNews(){ handleNews(){
if (this.special){
this.$util.toNextRoute('navigateTo', '/pages/commercialBI/specialCase') this.$util.toNextRoute('navigateTo', '/pages/commercialBI/specialCase')
} }
}, },
handleGetWarningList(){
const date = new Date()
//
let h = date.getHours() - 1
const req= {
// this.single
StatisticsDate: this.lastDay,
StatisticsHour:h,
StatisticsType:1,
ShowCount:20
}
request.$webGet('CommercialApi/BigData/GetBayonetWarning',req).then(res=>{
if (res.Result_Data.List.length>0){
this.special = true
}
})
},
},
} }
</script> </script>