This commit is contained in:
cclu 2023-04-18 13:37:30 +08:00
parent 17a431c02b
commit 31d936f4ad
3 changed files with 31 additions and 13 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="fillingDegree"> <div class="fillingDegree">
<div class="item"> <div class="item">
<canvas class="fillDegree" canvas-id="fillDegree" id="fillDegree" @tap="tap" @click.stop="handleChange('')"/> <canvas class="fillDegree" canvas-id="fillDegree" id="fillDegree" @tap.stop="tap" @click.stop="handleChange('')"/>
<!-- <image v-if="fillDegreePath" class="fillDegree" :src="fillDegreePath"></image>--> <!-- <image v-if="fillDegreePath" class="fillDegree" :src="fillDegreePath"></image>-->
</div> </div>
</div> </div>
@ -17,7 +17,8 @@ export default {
width:0, width:0,
fillDegreePath:'', fillDegreePath:'',
selectIndex: 0, selectIndex: 0,
dataList : [] dataList : [],
isTap:false,//tap
} }
}, },
props: { props: {
@ -35,10 +36,9 @@ export default {
} }
}, },
methods: { methods: {
handleChange(type){ handleChange(){
console.log('type组件里面',type) if (this.isTap){
if (type==='canvas'){ this.isTap = false
this.$emit('handleChangeBandLevel',this.selectIndex)
}else{ }else{
this.$emit('handleChangeBandLevel',false) this.$emit('handleChangeBandLevel',false)
} }
@ -47,7 +47,12 @@ export default {
uChartsInstance[e.target.id].showToolTip(e,{ uChartsInstance[e.target.id].showToolTip(e,{
formatter: (item, category, index, opts) =>{ formatter: (item, category, index, opts) =>{
this.selectIndex = opts.series[index].key this.selectIndex = opts.series[index].key
this.handleChange('canvas') if (this.selectIndex){
this.$emit('handleChangeBandLevel',this.selectIndex)
}else{
this.$emit('handleChangeBandLevel',false)
}
this.isTap = true
return item.name; return item.name;
} }
}); });

View File

@ -10,7 +10,7 @@
<div class="chartsItem"> <div class="chartsItem">
<p class="title">业态充盈度</p> <p class="title">业态充盈度</p>
<div v-if="fillDegreeList.result.series[0].data.length>0"> <div v-if="fillDegreeList.result.series[0].data.length>0">
<filling-degree :data="fillDegreeList" @handleChangeBandLevel="handleChangeBandLevel"/> <filling-degree :data="fillDegreeList" @handleChangeBandLevel="handleChangeBandLevel" :isClick="isClick"/>
<analyse :analyseInfo="{analysisins_type: 1502,analysisins_format: 2000}" /> <analyse :analyseInfo="{analysisins_type: 1502,analysisins_format: 2000}" />
</div> </div>
<no-data v-else/> <no-data v-else/>
@ -75,14 +75,17 @@ export default {
bandLevelList:[],// bandLevelList:[],//
consumLevelList:[],// consumLevelList:[],//
brandLabelList:[],// brandLabelList:[],//
brandLabelListNoChange:[],//
brandInfoList:[],// brandInfoList:[],//
brandInfoListNoChange:[],//
serviceInfo:{}, // serviceInfo:{}, //
backType:'',// backType:'',//
analyseInfo:{ analyseInfo:{
analysisins_type: 1501 analysisins_type: 1501
}, },
selectKey:'',// selectKey:'',//
str:'' str:'',
isClick:true,//
} }
}, },
onLoad(option) { onLoad(option) {
@ -218,6 +221,9 @@ export default {
}, },
// //
async handleChangeBandLevel(key){ async handleChangeBandLevel(key){
uni.showLoading({
title: '加载中...'
})
let req let req
if (key===false){ if (key===false){
req = { req = {
@ -236,8 +242,12 @@ export default {
this.selectKey = key this.selectKey = key
} }
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req) let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
this.brandLabelList = totalData.Result_Data.BrandTag if (totalData.Result_Data){
this.brandInfoList =totalData.Result_Data.ShopBrandList this.brandLabelList = totalData.Result_Data.BrandTag
this.brandInfoList =totalData.Result_Data.ShopBrandList
uni.hideLoading()
}
}, },
async nearestService(){ async nearestService(){
let seat = uni.getStorageSync('seatInfo'); let seat = uni.getStorageSync('seatInfo');
@ -378,7 +388,10 @@ export default {
} }
let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req) let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
this.brandLabelList = totalData.Result_Data.BrandTag this.brandLabelList = totalData.Result_Data.BrandTag
this.brandLabelListNoChange = totalData.Result_Data.BrandTag
this.brandInfoList =totalData.Result_Data.ShopBrandList this.brandInfoList =totalData.Result_Data.ShopBrandList
this.brandInfoListNoChange = totalData.Result_Data.ShopBrandList
console.log('this.brandInfoList',this.brandInfoList)
// let res = [{icon:'',name:'',company:'',type:0,time:'2019.03-2022.03',label:["","30-40"],info:[9,8,8]}, // let res = [{icon:'',name:'',company:'',type:0,time:'2019.03-2022.03',label:["","30-40"],info:[9,8,8]},
// {icon:'',name:'',company:'',type:1,time:'2019.03-2022.03',label:["","30-40"],info:[9,9,9]}, // {icon:'',name:'',company:'',type:1,time:'2019.03-2022.03',label:["","30-40"],info:[9,9,9]},

View File

@ -989,7 +989,7 @@ export default {
// StatisticsEndDate:this.lastDay // StatisticsEndDate:this.lastDay
// } // }
// request.$webGet('CommercialApi/Revenue/GetMallDeliver',buyPrice).then(res=>{ // request.$webGet('CommercialApi/Revenue/GetMallDeliver',buyPrice).then(res=>{
// // data // // data f
// this.buyPriceMonth = res.Result_Data.Deliver_Price // this.buyPriceMonth = res.Result_Data.Deliver_Price
// }) // })
// //