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
if (this.user.WeChat_MiniProToken) {
console.log('有')
this.memberLogin()
} else {
console.log('无')
this.getLoginCode()
}

View File

@ -249,7 +249,7 @@
<span>(<span style="color: red">{{subItem.DEDUCTION_SCORE}}</span>;</span>
<span style="margin-left: 4px">备注: {{subItem.EXAMINEDETAIL_DESC}})</span>
<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>
</view>
</div>
@ -409,11 +409,12 @@ export default {
console.log('subItem',subItem)
subItem.showChild = !subItem.showChild
},
previewImage(event){
previewImage(event,subItem){
console.log('event',event)
console.log('subItem',subItem)
wx.previewImage({
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',
GroupType: 1
}
console.log('requestParams',requestParams)
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParams)
let res = bayonetCount.Result_Data.List
console.log('res',res)
res.forEach((item=>{
if (item.Vehicle_Count===null || item.SectionFlow_Count===null || item.Entry_Rate===null || item.Entry_Rate>100){
item.Vehicle_Count = 0
@ -1127,8 +1125,7 @@ export default {
allList.push(list3.slice(0,20))
this.allTrafficList = allList
this.showTrafficList = this.allTrafficList[this.selectSmallTab - 1]
console.log('this.allTrafficList',this.allTrafficList)
uni.hideLoading()
// uni.hideLoading()
},
handleChangeLoadMore(){
this.loadMore = !this.loadMore
@ -1143,7 +1140,6 @@ export default {
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/specialCase`)
},
handleChangeSmallSelect(val){
console.log('val',val)
this.selectSmallTab = val
this.showTrafficList = this.allTrafficList[val-1]
},
@ -1315,7 +1311,7 @@ export default {
this.getUnUpLoadList()
//
this.handleGetTrafficList()
//
//
this.handleGetWarningList()
} else if (this.user.Membership_Id){ //
//
@ -1354,8 +1350,8 @@ export default {
}
},
handleGetWarningList(){
console.log('single',this.single)
const date = new Date()
//
let h = date.getHours() - 1
const req= {
// this.single
@ -1464,6 +1460,50 @@ export default {
let flag2 = false
let flag3 = false
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)
if ((yesterday.substr(yesterday.length-1,1)) === '0'){
@ -1520,7 +1560,9 @@ export default {
Statistics_Date: this.lastDay,
ShowCompareRate:true
}
console.log(11111)
const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData)
console.log(4444)
this.lastDayBillCount = data.Result_Data
this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
@ -1566,48 +1608,48 @@ export default {
// // data f
// this.buyPriceMonth = res.Result_Data.Deliver_Price
// })
//
const allPriceData = {
pushProvinceCode:'340000',
Statistics_Date:this.lastDay,
ShowCompareRate: true,
ShowYearRevenue: true
}
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
flag3 = true
// data
let result = res.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)
// request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
// console.log(33333)
// flag3 = true
// // data
// let result = res.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)
//
//
// })
console.log(55555)
if (flag2 && flag3 ){
// uni.hideLoading()
this.todayAmount()
}
})
},
defaultMsg() {
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="box">
<!-- @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>
</view>
@ -48,6 +48,7 @@
</template>
<script>
import request from '@/util/index.js'
import {mapActions, mapState} from 'vuex'
import userList from "./components/userList.vue";
import Tabbar from "../../components/tabbar/tabbar.vue";
@ -272,6 +273,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
},
],
isTrue:false,//
special:false
};
},
components:{
@ -298,7 +300,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
this.statusBarHeight = Number(systemInfo.statusBarHeight)
//
this.menu = uni.getMenuButtonBoundingClientRect()
this.handleGetWarningList()
this.dataList[2].list.forEach(item=>{
for(let key in this.user.AuthorityInfo){
if (key === item.id){
@ -343,6 +345,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
url:`/pages/commercialBI/noData?type=index`
})
}
},
onShow(){
uni.hideTabBar()
@ -370,9 +373,28 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
this.$util.toNextRoute('navigateTo', '/pages/register/register')
},
handleNews(){
if (this.special){
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>