This commit is contained in:
cclu 2023-06-20 20:16:48 +08:00
parent 8b91be08b2
commit 6f7aee4906
9 changed files with 140 additions and 78 deletions

View File

@ -276,7 +276,7 @@ export default {
let req = {
Province_Code:'340000',
Statistics_Date:time,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID|| '',
ShowConsumptionLevel:true,
ShowConvertRate:true
}
@ -294,7 +294,7 @@ export default {
let req = {
Province_Code:'340000',
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID|| '',
TimeSpan:1
}
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionTimeAnalysis',req)
@ -345,7 +345,7 @@ export default {
let req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ServerpartId:this.serviceInfo.Serverpart_ID|| '',
ShowWholeTrade:false
}
let res = {
@ -388,7 +388,7 @@ export default {
let req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ServerpartId:this.serviceInfo.Serverpart_ID|| '',
ShowWholeBrand:false
}
let res =[]
@ -422,7 +422,7 @@ export default {
const req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
serverpartId:this.serviceInfo.Serverpart_ID,
serverpartId:this.serviceInfo.Serverpart_ID|| '',
BusinessTradeIds:-1
}
const data = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeRevenue',req)
@ -456,7 +456,7 @@ export default {
const req = {
Province_Code:'340000',
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID
Serverpart_ID:this.serviceInfo.Serverpart_ID|| ''
}
const data = await request.$webGet('CommercialApi/Revenue/GetTransactionConvert',req)
let customerOrder = []
@ -532,7 +532,7 @@ export default {
let req = {
statisticsDate:this.time,
provinceCode:'340000',
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID || '',
SPRegionType_ID:this.serviceInfo.SPRegionType_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetSalableCommodity',req)

View File

@ -27,7 +27,7 @@
<view class="select">
<view class="content">
<view class="uni-input">{{serviceInfo.SERVERPART_NAME}}</view>
<p class="area">{{serviceInfo.SPREGIONTYPE_NAME}}</p>
<p class="area" v-if="serviceInfo.Serverpart_ID">{{serviceInfo.SPREGIONTYPE_NAME}}</p>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
@ -51,7 +51,7 @@
</div>
</div>
<div v-if="carData.length>0">
<entry-zone :carData="carData" :time="time" :month="thisMonth"/>
<entry-zone :carData="carData" :time="time" :month="thisMonth" />
<analyse :analyseInfo="{analysisins_type: 1102,analysisins_format: 2000}" />
</div>
<no-data v-if="!carData.length" :type="'car'"/>
@ -78,7 +78,8 @@
</picker>
</div>
</div>
<view class="tab" >
<view class="tab" v-if="serviceInfo.Serverpart_ID">
<view v-for="(item,index) in tabList" :key="index" :class="selectTab===item.value?'tabItem tabItemActive':'tabItem'" @click="handleChangeTab(item.value)">{{item.name}}</view>
</view>
@ -205,9 +206,9 @@ export default {
this.backType = option.type
},
onShow(){
this.isFirst = true
// bi 西
//
this.isFirst = true
// bi 西
//
let nowTime = new Date()
let y = nowTime.getFullYear()
let month = nowTime.getMonth() + 1
@ -300,16 +301,18 @@ export default {
}else{
id = currentService.Serverpart_ID
}
let req = {
if (id){
let req = {
ServerpartId:id
}
const total = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
// tabList
let tabList = [{name:'全部',value:0}]
total.Result_Data.RegionInfo.forEach((item,index)=>{
}
const total = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
// tabList
let tabList = [{name:'全部',value:0}]
total.Result_Data.RegionInfo.forEach((item,index)=>{
tabList.push({name:item.SERVERPART_REGIONNAME,value:index+1})
})
this.tabList = tabList
})
this.tabList = tabList
}
},
//
bindDateChange(e){
@ -538,10 +541,13 @@ export default {
getCarData(){
request.$webGet('CommercialApi/Revenue/GetBayonetEntryList',{
StatisticsDate: this.time,
Serverpart_ID :this.serviceInfo.Serverpart_ID,
Serverpart_ID :this.serviceInfo.Serverpart_ID!==0?this.serviceInfo.Serverpart_ID:null,
ShowAddUpCount:true
}).then(res=>{
this.carData = res.Result_Data.List
res.Result_Data.List.forEach(item=>{
item.Serverpart_ID = this.serviceInfo.Serverpart_ID
})
})
},
getHomeData(type){
@ -616,7 +622,7 @@ export default {
getCarTypeTime(){
request.$webGet('CommercialApi/Revenue/GetBayonetSTAList',{
StatisticsDate:this.endTime?this.endTime:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID || '',
ContainWhole:true
}).then(res=>{
let result = res.Result_Data.List
@ -663,6 +669,7 @@ export default {
this.carTypeTimeDataAll[2] ={categories:result[2].Vehicle_Type?result[2].Vehicle_Type:[], series:[series[5],series[4]]}
}
this.carTypeTimeData = this.carTypeTimeDataAll[this.selectTab]?this.carTypeTimeDataAll[this.selectTab]:[]
console.log('this.carTypeTimeData',this.carTypeTimeData)
}else{
this.carTypeTimeDataAll = []
this.carTypeTimeData = []
@ -682,7 +689,7 @@ export default {
StartMonth:`${y}${m}`,
EndMonth:`${y}${m}`,
Province_Code:'340000',
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID || '',
Serverpart_Region: data,
TimeSpan: 2
}).then(res=>{
@ -740,7 +747,7 @@ export default {
req = {
Statistics_Date: this.endTime?endTime:this.time,
Province_Code:'340000',
Serverpart_ID :this.serviceInfo.Serverpart_ID,
Serverpart_ID :this.serviceInfo.Serverpart_ID?this.serviceInfo.Serverpart_ID:'',
GroupType:2,
ShowGrowthRate:true
}

View File

@ -1,11 +1,11 @@
<template>
<div style="min-height: 100px;">
<div class="car">
<div class="item" style="left: -16px;width: calc(220px)">
<div class="item" :style="{left: Serverpart_ID?'-16px':'0px',width: '200px'}">
<canvas style="left: 0" v-if="!carNumPath" class="carNum" canvas-id="carNum" id="carNum"/>
<image style="left: 0" v-if="carNumPath" class="carNum" :src="carNumPath"></image>
</div>
<div class="item" style="right: -16px;width: calc(200px)">
<div class="item" :style="{right:Serverpart_ID? '-16px':'-33px',width: '200px'}">
<canvas style="right: 0" v-if="!probabilityPath" class="carNum" canvas-id="probability" id="probability"/>
<image style="right: 0" v-if="probabilityPath" class="carNum" :src="probabilityPath"></image>
</div>
@ -65,7 +65,8 @@ export default {
analysisins_format: 2000
},
allAddUpCount:0,
allEntryAddUpRate:0
allEntryAddUpRate:0,
Serverpart_ID:''
}
},
props:{
@ -82,23 +83,27 @@ export default {
default:''
}
},
watch:{
carData:{
handler(value){
console.log('value222',value)
if (value.length>0){
this.isShowData = true
}
this.carNumPath = ''
this.probabilityPath = ''
this.handleCarData(value)
this.dataList = value
this.dataList.forEach(item=>{
item.AddUpCount = this.$util.noDecimal(item.Vehicle_AddUpCount)
allCount +=item.Vehicle_AddUpCount
allRate +=item.EntryAddUp_Rate
this.Serverpart_ID = item.Serverpart_ID
})
this.handleCarData(value)
let allCount = 0
let allRate = 0
this.dataList.forEach(item=>{
item.AddUpCount = this.$util.noDecimal(item.Vehicle_AddUpCount)
allCount +=item.Vehicle_AddUpCount
allRate +=item.EntryAddUp_Rate
})
this.allAddUpCount = this.$util.noDecimal(allCount)
this.allEntryAddUpRate = allRate.toFixed(2)
},
@ -113,6 +118,7 @@ export default {
let carSum = 0 //
let Vehicle_CountAll=0 //
let SectionFlow_CountAll=0 //
console.log('this.id',this.id)
value.forEach(item=>{
data.push({name:item.Serverpart_Region+'区 '+item.Vehicle_Count ,value:item.Entry_Rate })
carSum+=item.Vehicle_Count
@ -154,14 +160,16 @@ export default {
}
let configCarNum={
title:this.carNumAll,
subtitle:"昨日入区车流"
subtitle:"昨日入区车流",
}
let config={
title:this.entryRate,
subtitle:"昨日入区率"
subtitle:"昨日入区率",
}
this.drawCharts('carNum' , res,configCarNum )
this.drawCharts2('probability',probabilityRes,config)
console.log('config',config)
console.log('configCarNum',configCarNum)
},
drawCharts(id,data,config){
const ctx = uni.createCanvasContext(id, this);
@ -170,8 +178,8 @@ export default {
uChartsInstance[id] = new uCharts({
type: "ring",
context: ctx,
width: 200,
height: 208,
width: _this.Serverpart_ID?200:160,
height: _this.Serverpart_ID?208:160,
series: data.series,
animation: false,
rotate: false,
@ -192,7 +200,7 @@ export default {
color: "#786B6C",
},
legend: {
show: true,
show: _this.Serverpart_ID?true:false,
position: "bottom",
lineHeight: 25,
float: 'center',
@ -222,8 +230,8 @@ export default {
uChartsInstance[id] = new uCharts({
type: "ring",
context: ctx,
width: 210,
height: 208,
width: _this.Serverpart_ID?210:160,
height: _this.Serverpart_ID?208:160,
series: data.series,
animation: false,
rotate: false,
@ -244,7 +252,7 @@ export default {
color: "#786B6C",
},
legend: {
show: true,
show: _this.Serverpart_ID?true:false,
position: "bottom",
lineHeight: 25,
float: 'center',

View File

@ -18,7 +18,7 @@
<!-- <view class="uni-input">{{serviceArray[serviceIndex]}}</view>-->
<view class="uni-input">{{serverpartName}}</view>
<!-- <text class="area">{{area}}</text>-->
<text class="area">{{spregionTypeName}}</text>
<text class="area" v-if="serviceInfo.Serverpart_ID">{{spregionTypeName}}</text>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>

View File

@ -30,7 +30,7 @@
</div>
</div>
</div>
<div class="list" >
<div class="list" v-if="id">
<!-- <p class="bigTitle" v-if="dataInfo.ContractList.length>0">即将到期合同列表: </p>-->
<div class="item" v-for="(item,index) in dataInfo.ContractList" :key="index">
<div class="title">{{item.name}}</div>
@ -52,12 +52,17 @@ export default {
data: {
type: Object,
default: () => {}
},
id:{
type:String,
default:''
}
},
watch: {
data: {
handler(value) {
this.dataInfo = value
console.log('value',value)
}
}
},

View File

@ -211,17 +211,17 @@ export default {
}else{
time = this.endTime
}
const req = {
const req = {
Province_Code:'340000',
Statistics_Date:time,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_ID:this.serviceInfo.Serverpart_ID || '',
ShowConsumptionLevel:true,
ShowConvertRate:true
}
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionAnalysis',req)
console.log('totalData',totalData)
this.customer = totalData.Result_Data?totalData.Result_Data:{}
}
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionAnalysis',req)
console.log('totalData',totalData)
this.customer = totalData.Result_Data?totalData.Result_Data:{}
},
//
async getGenderBubbleList(){
@ -245,7 +245,7 @@ export default {
const req = {
statisticsType:1,
provinceCode:'340000',
serverpartId:this.serviceInfo.Serverpart_ID,
serverpartId:this.serviceInfo.Serverpart_ID||'',
statisticsMonth:this.$util.getThisMonth(time)
}
let totalData = await request.$webGet('CommercialApi/Customer/GetCustomerRatio',req)
@ -259,7 +259,7 @@ export default {
})
const bubbleReq = {
provinceCode:'340000',
serverpartId:this.serviceInfo.Serverpart_ID,
serverpartId:this.serviceInfo.Serverpart_ID||'',
statisticsMonth:this.$util.getThisMonth(time)
}
@ -297,7 +297,7 @@ export default {
startMonth:this.$util.getThisMonth(time),
endMonth:this.$util.getThisMonth(time),
provinceCode: '340000',
serverpartId: this.serviceInfo.Serverpart_ID
serverpartId: this.serviceInfo.Serverpart_ID||''
}
const data = await request.$webGet('CommercialApi/Customer/GetCustomerSaleRatio',req)
let res = {
@ -344,7 +344,7 @@ export default {
}
const req = {
provinceCode:'340000',
serverpartId:this.serviceInfo.Serverpart_ID,
serverpartId:this.serviceInfo.Serverpart_ID||'',
statisticsMonth:this.$util.getThisMonth(time)
}
const data = await request.$webGet('CommercialApi/Customer/GetCustomerConsumeRatio',req)
@ -374,7 +374,7 @@ export default {
const req = {
ProvinceCode:'340000',
StatisticsDate:time,
serverpartId:this.serviceInfo.Serverpart_ID
serverpartId:this.serviceInfo.Serverpart_ID || ''
}
const data = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeRevenue',req)
let res = []

View File

@ -310,9 +310,13 @@ export default {
}
const date = new Date(this.time)
let month = date.getMonth() + 1
if (this.serviceInfo.Serverpart_ID){
uni.navigateTo({
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&month=${month}&type=month`
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&month=${month}&type=month`
})
}else{
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
}
}else{
let service = {
Budget_Amount:this.plan.BudgetYear_Amount,
@ -324,11 +328,14 @@ export default {
name:serviceInfo.name,
unit:serviceInfo.unit
}
if (this.serviceInfo.Serverpart_ID){
uni.navigateTo({
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&type=year`
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&type=year`
})
}else{
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
}
}
},
async handleNoticeMonth(){
let date = new Date(this.lastDay)
@ -405,8 +412,8 @@ export default {
let req = {
statisticsDate:this.time,
provinceCode:'340000',
Serverpart_ID:this.serviceInfo.Serverpart_ID,
SPRegionType_ID:this.serviceInfo.SPRegionType_ID
Serverpart_ID:this.serviceInfo.Serverpart_ID ||'',
SPRegionType_ID:this.serviceInfo.SPRegionType_ID || ''
}
let totalData = await request.$webGet('CommercialApi/Contract/GetContractAnalysis',req)
this.revenueList = {
@ -453,7 +460,7 @@ export default {
async getMoneyCompareList(){
let req = {
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID
ServerpartId:this.serviceInfo.Serverpart_ID || ''
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
let RevenueAmount = [] //
@ -566,13 +573,13 @@ export default {
ProvinceCode:'340000',
StatisticsDate:y,
StatisticsType:1,
ServerpartId:this.serviceInfo.Serverpart_ID
ServerpartId:this.serviceInfo.Serverpart_ID || ''
}
let yesReq = {
ProvinceCode:'340000',
StatisticsDate:y - 1,
StatisticsType:1,
ServerpartId:this.serviceInfo.Serverpart_ID
ServerpartId:this.serviceInfo.Serverpart_ID || ''
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',req)
const yesData = await request.$webGet('CommercialApi/Revenue/GetRevenueTrend',yesReq)
@ -620,7 +627,8 @@ export default {
const req = {
pushProvinceCode:'340000',
Statistics_StartDate:`${y}-${m}-01`,
Statistics_Date:this.time
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID || ''
}
const data = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',req)
let all = 0
@ -639,6 +647,7 @@ export default {
monthYearPlan(){
const monthDate= {
Province_Code:'340000',
Serverpart_ID:this.serviceInfo.Serverpart_ID || '',
Statistics_Date:this.time
}
request.$webGet('CommercialApi/Revenue/GetRevenueBudget',monthDate).then(res=>{

View File

@ -752,13 +752,21 @@ export default {
latitude:seat.latitude,
}
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
// let res = {
// SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//
// SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//
// SPRegionType_ID:data.Result_Data.List[0].SPREGIONTYPE_ID,//id
// Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,//id
// longitude:data.Result_Data.List[0].SERVERPART_X,
// latitude:data.Result_Data.List[0].SERVERPART_Y,
// }
let res = {
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//
SPRegionType_ID:data.Result_Data.List[0].SPREGIONTYPE_ID,//id
Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,//id
longitude:data.Result_Data.List[0].SERVERPART_X,
latitude:data.Result_Data.List[0].SERVERPART_Y,
SERVERPART_NAME: '安徽驿达',//
SPREGIONTYPE_NAME: '安徽驿达',//
Serverpart_ID: null,
SPRegionType_ID: null,
longitude:'117.200927',
latitude:'31.832905',
}
uni.setStorageSync('nearService',res)
this.nearServiceInfo = res

View File

@ -4,6 +4,7 @@
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"></image>
</div>
<map v-if="isShowMap" id="myMap" :longitude="longitude" :latitude="latitude" :markers="markers" class="map" show-location></map>
<view v-else class="map"></view>
<div class="list" :style="{transform:isMoveUp?`translateY(calc(-40vh + ${menu.bottom + 5}px))`:''}">
<div class="top">
<div class="topImg" @click="handleChangeUp">
@ -104,7 +105,6 @@ export default {
this.getServiceList()
}
})
console.log('option',option)
this.serviceInfo = JSON.parse(option.serviceInfo)
if (option.chartType){
this.chartType = true
@ -149,7 +149,6 @@ export default {
latitude:{
handler(value){
if (value){
console.log('watch',value)
this.getListData()
}
},
@ -199,7 +198,12 @@ export default {
Province_Code:'340000'
}
const data = await request.$webGet('CommercialApi/BaseInfo/GetSPRegionList',req)
this.array = data.Result_Data.List
console.log('data123',data)
let list = [{name:'安徽驿达',value:'0'}]
data.Result_Data.List.forEach(item=>{
list.push({name:item.name,value:item.value})
})
this.array = list
if (this.area){
this.array.forEach((item,index)=>{
if (item.name === this.area){
@ -209,10 +213,33 @@ export default {
}
await this.getLocation()
},
//
//
handleChangeService(e){
this.selectIndex = Number(e.detail.value)
console.log('e',e)
this.selectIndex = Number(e.detail.value)
console.log(this.selectIndex)
if (this.selectIndex===0){
let res = {
SERVERPART_NAME: '安徽驿达',//
SPREGIONTYPE_NAME: '安徽驿达',//
Serverpart_ID: null,
SPRegionType_ID: null,
longitude:'117.200927',
latitude:'31.832905',
}
uni.setStorageSync('currentService',res) //
if (this.chartType){
uni.navigateBack({
delta: 1
})
}else{
uni.navigateBack({
delta: 1
})
}
}else{
this.getListData()
}
},
//
async handleSearch(){
@ -254,7 +281,6 @@ export default {
async getListData(){
let id
let user = uni.getStorageSync('seatInfo')
console.log('user',user)
let current = uni.getStorageSync('currentService')
let nearService = uni.getStorageSync('nearService')
if (!this.selectIndex && this.selectIndex!==0){
@ -284,7 +310,6 @@ export default {
longitude:user.longitude,
latitude:user.latitude
}
console.log('req',req)
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
this.serviceList = data.Result_Data.List
},