This commit is contained in:
白菜
2025-08-17 01:13:04 +08:00
parent 5ea121abf0
commit 74b22a2ec6
5 changed files with 186 additions and 15 deletions

View File

@ -1,5 +1,5 @@
<template>
<uni-popup ref="popup" type="center" @maskClick="show = false">
<uni-popup ref="popup" type="center" @maskClick="show = false" :animation="false">
<view class="chart-popup">
<uni-datetime-picker v-model="range" type="daterange" :end="end" rangeSeparator="至" @change="changeTime"
style="margin-bottom: 10px;" />
@ -8,8 +8,10 @@
<button type="primary" size="mini" @click="onSearch" style="margin-left: 20px;">搜索</button>
</view> -->
<view class="chart-container">
<qiun-data-charts type="line" :reload="show" :chartData="chartsData" :optsWatch='false'
:inScrollView="true" :pageScrollTop="pageScrollTop" :opts="options" :ontouch="true" />
<!-- <qiun-data-charts type="line" :reload="show" :opts="options" :optsWatch='false'
:inScrollView="true" :pageScrollTop="pageScrollTop" :ontouch="true" :chartData="chartsData" /> -->
<qiun-data-charts type="line" :reshow="show" :optsWatch='false' :opts="options" :chartData="chartsData"
:ontouch="true" :inScrollView="true" :pageScrollTop="pageScrollTop" />
</view>
</view>
</uni-popup>
@ -28,18 +30,25 @@
},
data() {
return {
// {update:true,enableScroll:true,xAxis:{scrollShow:true,itemCount:4,disableGrid:true,scrollAlign:'current'}}
options: {
// xAxis: {
// scrollShow: true,
// itemCount: 3,
// disableGrid: true,
// scrollAlign: 'current'
// },
// enableScroll: true,
// update: true,
dataLabel: false,
enableScroll: true,
xAxis: {
scrollShow: true,
itemCount: 3,
disableGrid: true
},
update: true,
duration: 0,
animation: false,
// enableScroll: true,
// padding: [10, 15, 10, 15]
},
show: false,
range: [],
@ -66,10 +75,13 @@
this.deviceId = deviceId
this.dataType = dataType
this.range = []
setTimeout(() => {
this.$nextTick(() => {
this.show = true
this.getData()
}, 300)
// setTimeout(() => {
// }, 300)
})
},
changeTime(val) {
this.range = val || []
@ -91,7 +103,7 @@
clusterDeviceId,
range: [startDate = '', endDate = '']
} = this;
this.chartsData?.series && (this.chartsData.series = [])
this.chartsData = {}
return getSingleBatteryData({
siteId,
deviceId,