From fd13b0017518273406ee1a9906c07d079e4a9ac4 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期三, 27 十一月 2024 17:54:52 +0800 Subject: [PATCH] 租户列表 套餐宽度固定180 --- src/views/data/point/DaPointChart.vue | 51 +++++++++++++++++++++++++++------------------------ 1 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/views/data/point/DaPointChart.vue b/src/views/data/point/DaPointChart.vue index 4fbed39..caaa271 100644 --- a/src/views/data/point/DaPointChart.vue +++ b/src/views/data/point/DaPointChart.vue @@ -46,7 +46,7 @@ </el-button> </el-form-item> </el-form> - <div ref="chartDom" class="result-chart"></div> + <div ref="chartDom" class="result-chart" v-loading="loading"></div> </el-dialog> </template> @@ -87,30 +87,33 @@ defineExpose({open}) // 提供 open 方法,用于打开弹窗 -async function getDataList() { - visible.value = true; - if (dataForm.value.id) { - try { - chartParams.codes = [dataForm.value.pointNo]; - chartParams.startDate = dataForm.value.startTime; - chartParams.endDate = dataForm.value.endTime; - const data = await DaPoint.getPointDaChart(chartParams) - let seriesData = [] - data.series.forEach(item => { - seriesData.push({ - name: item.name, - type: "line", - data: item.data, - showSymbol: true, - smooth: false, - lineStyle: { - normal: { - color: "#5B8FF9", - width: 1, + const loading = ref(false) + async function getDataList() { + visible.value = true; + loading.value = true + if (dataForm.value.id) { + try { + chartParams.codes=[dataForm.value.pointNo]; + chartParams.startDate = dataForm.value.startTime; + chartParams.endDate = dataForm.value.endTime; + const data = await DaPoint.getPointDaChart(chartParams) + loading.value = false + let seriesData = [] + data.series.forEach(item => { + seriesData.push({ + name: item.name, + type: "line", + data: item.data, + showSymbol: true, + smooth: false, + lineStyle: { + normal: { + color: "#5B8FF9", + width: 1, + }, }, - }, - }); - }) + }); + }) myChart = echarts.init(chartDom.value); const option = { -- Gitblit v1.9.3