| | |
| | | <script setup> |
| | | import { onBeforeUnmount, onMounted, onUnmounted, ref, computed, nextTick, watch } from "vue"; |
| | | import { useRouter } from "vue-router" |
| | | import { host, WebSocketHost } from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import dayjs from 'dayjs'; |
| | |
| | | let socket = null; |
| | | // const rawGlassStorageDetailList = ref([]) |
| | | // const orderDTOS = ref([]) |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/largenScreen`; |
| | | const socketUrl = `ws://${window.ipConfig.serverUrl}/api/glassStorage/api/talk/largenScreen`; |
| | | const debouncedUpdate = debounce((data, handler) => { |
| | | handler(data); |
| | | }, 300); |
| | |
| | | let myChartEdg = null; |
| | | let myChartTemp = null; |
| | | let myChartHollow = null; |
| | | const socketUrl1 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/largenScreen`; |
| | | const socketUrl1 = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/largenScreen`; |
| | | let handleMessage1 = (data) => { |
| | | edgOneTasks.value = data.edgOneCount[0]; |
| | | edgTwoTasks.value = data.edgOneCount[0]; |
| | |
| | | const temperingTaskType = ref([]) |
| | | const temperingGlassInfoList = ref([]) |
| | | const temperingGlassInfoInList = ref([]) |
| | | const socketUrl2 = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/largenScreen`; |
| | | const socketUrl2 = `ws://${window.ipConfig.serverUrl}/api/temperingGlass/api/talk/largenScreen`; |
| | | let handleMessage2 = (data) => { |
| | | temperingTaskType.value = data.temperingTaskType[0]; |
| | | temperingGlassInfoList.value = data.temperingGlassInfoList[0]; |
| | |
| | | }; |
| | | let socket3 = null; |
| | | const bigStorageCageUsage = ref([]) |
| | | const socketUrl3 = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/largenScreen`; |
| | | const socketUrl3 = `ws://${window.ipConfig.serverUrl}/api/cacheVerticalGlass/api/talk/largenScreen`; |
| | | let handleMessage3 = (data) => { |
| | | bigStorageCageUsage.value = data.bigStorageCageUsage[0]; |
| | | timeAxisCreate(t('large.temperingState'), chartTemp.value, myChartTemp, tableDataTime(false, data.tempRunTimes[0])); |
| | |
| | | }; |
| | | let socket4 = null; |
| | | const hollowBigStorageCageUsage = ref([]) |
| | | const socketUrl4 = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/largenScreen`; |
| | | const socketUrl4 = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/largenScreen`; |
| | | let handleMessage4 = (data) => { |
| | | hollowBigStorageCageUsage.value = data.hollowBigStorageCageUsage[0]; |
| | | timeAxisCreate(t('large.hollowState'), chartHollow.value, myChartHollow, tableDataTime(false, data.hollowRunTimes[0])); |
| | |
| | | const switchNoorAreaLeft = ref(true) |
| | | const switchNoorAreaRight = ref(true) |
| | | const productionVO = ref([]) |
| | | const socketUrl5 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/largenScreenProduction`; |
| | | const socketUrl5 = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/largenScreenProduction`; |
| | | const createchart = (productionVO) => { |
| | | categories = productionVO.value.map(item => item.date); // 获取日期作为 x 轴 |
| | | totalAreaOutOne = productionVO.value.map(item => item.totalAreaOutOne); |
| | |
| | | } |
| | | const exportToExcel = async () => { |
| | | try { |
| | | window.open(`http://${WebSocketHost}:10011/largenScreen/exportDailyProduction`, '_blank'); |
| | | window.open(`http://${window.ipConfig.serverUrl}:10011/largenScreen/exportDailyProduction`, '_blank'); |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | |
| | | </div> |
| | | <div style="width: 50%;"> |
| | | <div class="img-screen" alt="Screen"> |
| | | <div> |
| | | <!-- <div> |
| | | <el-button type="primary" style="top:40px;left:670px;position: absolute;" @click="exportToExcel()">{{ |
| | | $t('large.statistics') }}</el-button> |
| | | </div> |
| | | </div> --> |
| | | <!-- 钢化半透明色块 --> |
| | | <div |
| | | style="width: 80px;height: 40px;top: 315px;left: 130px;position: absolute;background-color: rgba(0, 0, 0, 0.5);color: white;font-size: 12px;z-index: 999;"> |