| | |
| | | <script lang="ts"> |
| | | import screenfull from 'screenfull'; |
| | | import { lineApi } from '/@/api/intelligentLine'; |
| | | import { toRefs, reactive, ref, onMounted, onUnmounted, computed } from 'vue'; |
| | | import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick} from 'vue'; |
| | | import {useRoute} from 'vue-router'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | |
| | | const getLine = async (id:string) => { |
| | | let res = await lineApi().getLine({ id: id }); |
| | | if (res.data.code === '200') { |
| | | console.log(res.data.data, '获取巡检点'); |
| | | userInfos.value.dataList = res.data.data; |
| | | } else { |
| | | ElMessage({ |
| | |
| | | // 页面关闭处理 |
| | | onUnmounted(() => { |
| | | // 销毁监听 |
| | | state.socket.onclose = () => { |
| | | console.log('socket已经关闭'); |
| | | }; |
| | | nextTick(()=>{ |
| | | state.socket.onclose = () => { |
| | | console.log('socket已经关闭'); |
| | | }; |
| | | }) |
| | | }); |
| | | return { |
| | | dataList, |