From 7bcdaba7faad85bf16bf0f2a1dbd3e390bdb15dd Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 05 Nov 2024 21:15:40 +0800
Subject: [PATCH] 救援队伍统计、应急空间统计、风险源统计图表样式初步调整,园区概况布局调整 倾斜模型加载配置微调后续看加载效果 企业名录样式调整
---
src/views/survey/components/box/unitContent.vue | 60 +++++++++++++++++++++++++++++++-----------------------------
1 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/src/views/survey/components/box/unitContent.vue b/src/views/survey/components/box/unitContent.vue
index e38a6b6..7e68486 100644
--- a/src/views/survey/components/box/unitContent.vue
+++ b/src/views/survey/components/box/unitContent.vue
@@ -2,14 +2,14 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2023-03-13 14:54:26
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-04 13:58:17
+ * @LastEditTime: 2024-11-05 17:15:55
* @FilePath: \bigScreen\src\views\survey\components\box\unitContent.vue
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
-import publicContent from './publicContent.vue'
+import { useEchartsResize } from 'hooks/useEchartsResize'
import { getEmergencySpaceStatistic } from '../../../../api/indParkInfo'
@@ -17,14 +17,6 @@
const curEcharts = ref(null)
let myEcharts = reactive(null)
-
-onMounted(() => {
- nextTick(() => {
- myEcharts = $echarts.init(curEcharts.value)
- getEmergencySpace()
-
- })
-})
function getEmergencySpace () {
getEmergencySpaceStatistic().then(res => {
@@ -41,8 +33,21 @@
myEcharts.setOption({
legend: {
orient: "vertical",
- left: "left",
+ top: '5%',
+ left: "5%",
+ textStyle: {
+ color: '#fff'
+ }
},
+
+ grid: {
+ top: '6%',
+ left: '6%',
+ right: '6%',
+ bottom: '6%',
+ containLabel: true
+ },
+
tooltip: {
trigger: 'item'
},
@@ -51,7 +56,8 @@
{
// name: 'Access From',
type: 'pie',
- radius: ['40%', '70%'],
+ left: '10%',
+ radius: ['30%', '60%'],
// avoidLabelOverlap: false,
// padAngle: 5,
// itemStyle: {
@@ -80,26 +86,22 @@
})
}
+nextTick(() => {
+ myEcharts = $echarts.init(curEcharts.value)
+ getEmergencySpace()
+})
+
+const echartsResize = () => {
+ myEcharts && myEcharts.resize()
+}
+
+useEchartsResize(echartsResize)
</script>
<template>
- <public-content>
- <template #content>
- <div class="unit-content">
- <div class="unit-content-echarts" ref="curEcharts">
+ <div class="w100 h100" ref="curEcharts">
- </div>
- </div>
- </template>
- </public-content>
+ </div>
</template>
-<style lang="scss" scoped>
-.unit-content {
- color: #fff;
-}
-
-.unit-content-echarts {
- height: 200px;
-}
-</style>
\ No newline at end of file
+<style lang="scss" scoped></style>
\ No newline at end of file
--
Gitblit v1.9.3