422
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height)
|
||||
height: styleUtil.px2vh(height),
|
||||
opacity:data.length?1:0,
|
||||
}"
|
||||
/>
|
||||
<div v-if="condShow==0" class="nYong-du">加载中...</div>
|
||||
@@ -172,7 +173,7 @@
|
||||
[() => props.data, () => props.xAxisData],
|
||||
(val) => {
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!val[0].length){
|
||||
if(aIndex>=3&&!val[0][0].data.length){
|
||||
condShow.value = 1
|
||||
}
|
||||
if (val[0].length > 0 && val[1].length > 0) {
|
||||
@@ -181,7 +182,7 @@
|
||||
init()
|
||||
}, 1000)
|
||||
}else{
|
||||
|
||||
// condShow.value = 1
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height)
|
||||
height: styleUtil.px2vh(height),
|
||||
opacity:dataList.length?1:0,
|
||||
}"
|
||||
/>
|
||||
<div v-if="condShow==0" class="nYong-du">加载中...</div>
|
||||
@@ -47,7 +48,7 @@
|
||||
}
|
||||
})
|
||||
|
||||
const { id, setOption } = useEchart()
|
||||
const { id, setOption,chartVal,dispose ,clearOption} = useEchart()
|
||||
|
||||
var colorList = ['#FDC40A', '#FF5232', '#50F0A6', '#5FDFFA']
|
||||
|
||||
@@ -106,6 +107,7 @@
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(newVal) => {
|
||||
console.log(chartVal.value,newVal,'newValnewValnewValnewValnewVal')
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!newVal.length){
|
||||
condShow.value = 1
|
||||
@@ -125,8 +127,12 @@
|
||||
...defaultCofig,
|
||||
...props.config
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
@@ -146,5 +152,6 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
<!-- 客源地分析TOP5 -->
|
||||
<template>
|
||||
<div
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height)
|
||||
}"
|
||||
/>
|
||||
|
||||
<div style="position:relative;">
|
||||
<div
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height),
|
||||
opacity:list.length?1:0,
|
||||
}"
|
||||
/>
|
||||
<div v-if="condShow==0" class="nYong-du">加载中...</div>
|
||||
<div v-if="condShow==1" class="nYong-du">暂无数据</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -31,13 +37,21 @@
|
||||
|
||||
const { id, setOption } = useEchart()
|
||||
let params = null
|
||||
|
||||
let condShow = ref(0)
|
||||
let aIndex = 1
|
||||
watch(
|
||||
() => props.list,
|
||||
() => {
|
||||
setTimeout(() => {
|
||||
init()
|
||||
}, 1000)
|
||||
(val) => {
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!val.length){
|
||||
condShow.value = 1
|
||||
}
|
||||
if (val.length > 0) {
|
||||
setTimeout(() => {
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
@@ -165,6 +179,19 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.nYong-du{
|
||||
position:absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size:vw(18);
|
||||
// color:#999;
|
||||
color:#02f9fa;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.top {
|
||||
width: vw(250);
|
||||
height: vh(366);
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height)
|
||||
height: styleUtil.px2vh(height),
|
||||
opacity:list.length?1:0,
|
||||
}"
|
||||
/>
|
||||
<div v-if="condShow==0" class="nYong-du">加载中...</div>
|
||||
@@ -42,7 +43,8 @@
|
||||
watch(
|
||||
() => props.list,
|
||||
(val) => {
|
||||
if(aIndex>=3&&!newVal.length){
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!val.length){
|
||||
condShow.value = 1
|
||||
}
|
||||
if (val.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user