Your Name
2023-01-06 e3d63f84a43db07fa5992de2937ee23fc67bad38
src/views/intellectInspect/intelligentLine/index.vue
@@ -1,14 +1,18 @@
<template>
    <div class="container">
    <div class="container" id="screenFull">
        <div class="big-title" @click="goBack()">国泰新华智能巡检系统</div>
        <div style="height: 20px;font-size: 14px;line-height: 20px; color: #00ffff; margin-top: 4px">{{ present }}</div>
        <div class="btns">
            <div class="fullbtn" @click="onScreenfullClick">
                <div class="toFull">
                    <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i>
                </div>
                <div>全屏</div>
            </div>
<!--            <div class="fullbtn" @click="onScreenfullClick">-->
<!--                <div class="toFull">-->
<!--                    <i class="iconfont" :title="全屏" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i>-->
<!--                  <el-icon>-->
<!--                    <FullScreen v-if="isScreenfull"/>-->
<!--                    <Close v-else/>-->
<!--                  </el-icon>-->
<!--                </div>-->
<!--                <div>全屏</div>-->
<!--            </div>-->
            <div class="backBtn" @click="goBack()">
                <img src="../../../assets/loginPage/back-icon.png"/>
                <div>退出</div>
@@ -88,7 +92,7 @@
<script lang="ts">
import screenfull from 'screenfull';
import { lineApi } from '/@/api/intelligentLine';
import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick} from 'vue';
import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick, onActivated} from 'vue';
import {useRoute} from 'vue-router';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
@@ -101,7 +105,6 @@
// 定义接口来定义对象的类型
interface stateType {
    present: string;
    isScreenfull: boolean;
    path: string;
    socket: any;
    socketData: string;
@@ -118,7 +121,6 @@
        const route = useRoute();
        const state = reactive<stateType>({
            present: '',
            isScreenfull: false,
            path: '',
            socketData: '',
            socket: null,
@@ -136,6 +138,9 @@
            getLine(state.id)
            getUrl(state.id)
        });
      onActivated(()=>{
        onScreenfullClick();
      })
        const dataList = computed(() => {
            return userInfos.value.dataList;
@@ -188,7 +193,7 @@
        const getLine = async (id:string) => {
            let res = await lineApi().getLine({ id: id });
            if (res.data.code === '200') {
                userInfos.value.dataList = res.data.data;
                userInfos.value.dataList = res.data.data
            } else {
                ElMessage({
                    type: 'warning',
@@ -199,18 +204,12 @@
        // 全屏
        const onScreenfullClick = () => {
            const element = document.getElementById('screenFull')
            if (!screenfull.isEnabled) {
                ElMessage.warning('暂不不支持全屏');
                return false;
            }
            screenfull.toggle();
            screenfull.on('change', () => {
                if (screenfull.isFullscreen) {
                    state.isScreenfull = true;
                } else {
                    state.isScreenfull = false;
                }
            });
            screenfull.toggle(element);
        };
        // 返回
@@ -1002,11 +1001,11 @@
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: center;
                justify-content: left;
                align-items: flex-start;
                overflow-y: hidden;
                overflow-x: hidden;
                overflow: auto;
                &::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
                &::scrollbar { width: 0; height: 0; color: transparent; }
            }
            .line-map {