This commit is contained in:
白菜
2025-10-15 18:16:56 +08:00
parent a8c79eef72
commit 6149cba24e
8 changed files with 430 additions and 189 deletions

View File

@ -66,7 +66,7 @@
<uni-popup ref="popup" type="center" :animation="false" :mask-click="false" :is-mask-click="false"
@maskClick="maskClick">
<view class="chart-popup" v-if="showChart">
<uni-datetime-picker v-model="range" type="daterange" :end="end" rangeSeparator="至" @change="changeTime"
<date-range-select ref="chartDateRangeSelect" @updateDate="updateChartDate"
style="margin-bottom: 10px;" />
<view class="chart-container">
<qiun-data-charts type="line" :reload="showChart" :optsWatch='false' :opts="options"
@ -100,6 +100,7 @@
<script>
// import Chart from './Chart.vue'
import DateRangeSelect from './../DateRangeSelect.vue'
import {
getStackNameList,
getClusterNameList,
@ -110,9 +111,6 @@
mapState
} from 'vuex'
export default {
components: {
// Chart
},
computed: {
...mapState({
workStatusOptions: (state) =>
@ -121,6 +119,9 @@
state.ems.communicationStatusOptions,
})
},
components: {
DateRangeSelect
},
data() {
return {
pageNum: 1,
@ -182,7 +183,6 @@
deviceId
}, dataType) {
this.loading = false
this.range = []
this.chartSearchData = {
clusterDeviceId,
deviceId,
@ -191,11 +191,13 @@
this.$refs.popup.open()
setTimeout(() => {
this.showChart = true
this.getChartData()
}, 100)
this.$nextTick(() => {
this.$refs.chartDateRangeSelect.init()
})
}, 500)
},
changeTime(val) {
this.range = val || []
updateChartDate(data) {
this.range = data || []
this.getChartData()
},
getChartData() {