ZengTao
2025-11-29 4dc1abb37aec033fdbd09d290c6f62d082ba774a
UI-Project/src/views/largescreendisplay/screendisplay.vue
@@ -1,7 +1,6 @@
<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';
@@ -26,7 +25,7 @@
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);
@@ -61,7 +60,7 @@
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];
@@ -82,7 +81,7 @@
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];
@@ -105,7 +104,7 @@
};
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]));
@@ -291,7 +290,7 @@
};
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]));
@@ -302,7 +301,7 @@
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);
@@ -501,7 +500,7 @@
}
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);
@@ -1048,10 +1047,10 @@
      </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;">
@@ -1332,7 +1331,7 @@
  /* margin-top: 50px; */
  /* float: left; */
  position: relative;
  background-image: url('../../assets/screen.png');
  background-image: url('/screen.png');
  width: 795px;
  height: 700px;
  background-size: contain;