From 2676f45f33b9dedb80d0417e5af603df41216f0b Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 19 Nov 2024 18:31:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'
---
src/views/survey/components/box/dataContent.vue | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/src/views/survey/components/box/dataContent.vue b/src/views/survey/components/box/dataContent.vue
index 11d83dc..6b26305 100644
--- a/src/views/survey/components/box/dataContent.vue
+++ b/src/views/survey/components/box/dataContent.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-11-04 16:32:04
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-05 17:12:37
+ * @LastEditTime: 2024-11-19 15:29:44
* @FilePath: \bigScreen\src\views\survey\components\box\dataContent.vue
* @Description:
*
@@ -10,23 +10,23 @@
-->
<script setup>
// import { ref, reactive, onMounted, nextTick, inject } from 'vue'
-import { useEchartsResize } from "hooks/useEchartsResize";
-import { getRescueTeamStatistic } from "@/api/indParkInfo";
-import { nextTick } from "vue";
+import { useEchartsResize } from "hooks/useEchartsResize"
+import { getRescueTeamStatistic } from "@/api/indParkInfo"
+import { nextTick } from "vue"
-let $echarts = inject("echarts");
-const curEcharts = ref(null);
+let $echarts = inject("echarts")
+const curEcharts = ref(null)
-let myEcharts = reactive(null);
+let myEcharts = reactive(null)
-function getStatistic() {
+function getStatistic () {
getRescueTeamStatistic().then((res) => {
- let xaxis_data = [];
- let yaxis_data = [];
+ let xaxis_data = []
+ let yaxis_data = []
res.data.data.forEach((element) => {
- xaxis_data.push(element.type);
- yaxis_data.push(element.num);
- });
+ xaxis_data.push(element.type)
+ yaxis_data.push(element.num)
+ })
myEcharts.setOption({
tooltip: {
@@ -85,6 +85,7 @@
color: "#fff",
},
axisLine: {
+ show: true,
lineStyle: {
color: "#fff",
},
@@ -97,6 +98,9 @@
axisLabel: {
color: "#fff",
},
+ splitLine: {
+ show: false,
+ }
},
],
series: [
@@ -110,20 +114,20 @@
},
},
],
- });
- });
+ })
+ })
}
nextTick(() => {
- myEcharts = $echarts.init(curEcharts.value);
- getStatistic();
-});
+ myEcharts = $echarts.init(curEcharts.value)
+ getStatistic()
+})
const echartsResize = () => {
- myEcharts && myEcharts.resize();
-};
+ myEcharts && myEcharts.resize()
+}
-useEchartsResize(echartsResize);
+useEchartsResize(echartsResize)
</script>
<template>
--
Gitblit v1.9.3