web
4 天以前 8e38cc8536cfda9b6bda8548d63778cbf5f4d634
src/views/screen/temperature/graphic/index.vue
@@ -1,10 +1,11 @@
<script setup>
import {ref, onMounted, watch} from "vue";
import {ref, onMounted} from "vue";
import * as echarts from 'echarts/core';
import {getTemperaturePointList} from '@/api/screen/index.js'
import Quarter from "@/components/Quarter";
import moment from "moment";
import { getGraphicData } from '@/api/screen/graphic/index.js'
import { debounce } from '@/utils/tool.js'
const menuList = ref([])
@@ -163,6 +164,14 @@
    })
}
// 监听页面大小变化,改变echarts的大小
window.onresize = debounce(function () {
    charts?.forEach(el => {
        el.resize()
    })
}, 500, true)
// 全屏操作
const handleFullScreen = () => {
    graphicRef.value.requestFullscreen()
@@ -225,6 +234,7 @@
// 获取报表数据
const getChartData = (point = '') => {
    chartData.value = []; //先赋值为空,强制元素重载
    const data = {
        type: timeType.value,
        pointId: point,
@@ -270,7 +280,7 @@
        <div class="graphic-info">
            <div class="graphic-tool">
                <div class="tool-l">
                    <div class="name">类型</div>
                    <div class="name">时间类型</div>
                    <el-button-group class="ml-4">
                        <el-button :type="timeType === 1 ? 'primary' : ''" @click="changeType(1)">日
                        </el-button>
@@ -448,6 +458,7 @@
                    border-radius: 8px;
                    .charts {
                        width: 100%;
                        height: 100%;
                    }
                }