wangfei
2025-11-12 73fe3c5574c8fbb7b18fa9b76d53b918f6f921e1
更换前端打包方式,将ip地址配置提取到public
25个文件已修改
1个文件已添加
81 ■■■■ 已修改文件
UI-Project/index.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/public/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/constants.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/request.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingbefore.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingun.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/GlassStorage/MaterialRackManagement.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/GlassStorage/rawfilmstorage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identifwu.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identifwutwo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/ReportWork/reportWork.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns2.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecageTwo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicData.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicyiwu.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipment.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipmenthree.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipmenttwo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowsitwo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowslicecage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/largescreen/largescreen.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/largescreendisplay/screendisplay.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/index.html
@@ -11,5 +11,6 @@
  <body>
    <div id="app" style="width: 100vw;height: 100vh;"></div>
    <script type="module" src="/src/main.js"></script>
    <script src="/config.js"></script>
  </body>
</html>
UI-Project/public/config.js
New file
@@ -0,0 +1,4 @@
const ip = '10.153.18.3'
window.ipConfig = {
    serverUrl: `${ip}:88`,
}
UI-Project/src/utils/constants.js
@@ -1,10 +1,10 @@
//  export const WebSocketHost = "192.168.2.100";
//  export const WebSocketHost = "10.153.19.179";
// export const WebSocketHost = "192.168.0.39";
// export const WebSocketHost = "10.153.18.3";
// export const WebSocketHost = "10.153.19.150";
// export const WebSocketHost = "10.153.19.218";
// export const WebSocketHost = "10.153.19.162";
export const WebSocketHost = "127.0.0.1";
export const host = "88";
// export const WebSocketHost = "127.0.0.1";
// export const host = "88";
export const ErpIp = "10.153.19.179";
export const ErpHost = "8086";
UI-Project/src/utils/request.js
@@ -1,9 +1,9 @@
import axios from 'axios'
import useUserInfoStore from '@/stores/userInfo'
import {host, WebSocketHost} from '@/utils/constants'
const userStore=useUserInfoStore()
const request = axios.create({
   baseURL: `http://${WebSocketHost}:${host}/api`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置!
    baseURL: `http://${window.ipConfig.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置!
   // baseURL: `http://${WebSocketHost}:${host}/api`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置!
   timeout: 30000
})
//
UI-Project/src/views/Caching/cachingbefore.vue
@@ -30,7 +30,7 @@
const showModal = ref(false)
const blindb = ref(false)
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassOne`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/cacheGlassOne`;
const handleMessage = (data) => {
    // 报警信息
if (data.alarmInfo[0] != null && data.alarmInfo[0].length > 0) {
UI-Project/src/views/Caching/cachingun.vue
@@ -28,7 +28,7 @@
const showModal = ref(false)
const blindb = ref(false)
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassTwo`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/cacheGlassTwo`;
const handleMessage = (data) => {
    // 报警信息
if (data.alarmInfo[0] != null && data.alarmInfo[0].length > 0) {
UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
@@ -383,7 +383,7 @@
  // 此处可以添加保存状态的逻辑,比如调用 API 更新数据
};
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/storageTask`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/glassStorage/api/talk/storageTask`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
UI-Project/src/views/GlassStorage/rawfilmstorage.vue
@@ -105,7 +105,7 @@
  parseAndSetTime();
});
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/rawGlass`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/glassStorage/api/talk/rawGlass`;
const handleMessage = (data) => {
    const formattedTasks = data.tasks[0].map(task => {
      if (task && task.createTime) {
UI-Project/src/views/Identify/identifwu.vue
@@ -186,7 +186,7 @@
    }
  });
}
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingOne`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/currentCutDrawingOne`;
const handleMessage = (data: any) => {
  if (data.engineer != null) {
  ava.value = data.engineer[0]
UI-Project/src/views/Identify/identifwutwo.vue
@@ -57,7 +57,7 @@
const realwidth = ref('');
const realheight = ref('');
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/currentCutDrawingTwo`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/currentCutDrawingTwo`;
const handleMessage = (data: any) => {
  if (data.engineer != null) {
  ava.value = data.engineer[0]
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -55,7 +55,7 @@
function handlePageChange(page: number) {
  currentPage.value = page;
}
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {  
  // 进炉中右
  if (data.intoGlass2 && data.intoGlass2.length > 0) {  
UI-Project/src/views/ReportWork/reportWork.vue
@@ -325,7 +325,7 @@
  }  
}
let socket = null;
// const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`;
// const socketUrl = `ws://${window.ipConfig.serverUrl}/api/temperingGlass/api/talk/screen`;
// const handleMessage = (data) => {
// adjustedRects.value = data.device[0].map(rect => ({  
//       ...rect, 
UI-Project/src/views/Returns/upreturns.vue
@@ -81,7 +81,7 @@
  }
});
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassOne`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/loadGlass/api/talk/loadGlassOne`;
const handleMessage = (data: any) => {
  isLoading.value = true;
  if (data.inkageState != null) {
UI-Project/src/views/Returns/upreturns2.vue
@@ -86,7 +86,7 @@
  }
};
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassTwo`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/loadGlass/api/talk/loadGlassTwo`;
const handleMessage = (data: any) => {
  isLoading.value = true;
UI-Project/src/views/Slicecage/slicecage.vue
@@ -786,7 +786,7 @@
  }
};
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheVerticalGlass/api/talk/slicecage`;
const handleMessage = (data) => {
  // 报警信息
if (data.alarmInfo[0] != null && data.alarmInfo[0].length > 0) {
UI-Project/src/views/Slicecage/slicecageTwo.vue
@@ -702,7 +702,7 @@
  }  
}; 
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheVerticalGlass/api/talk/slicecage`;
const handleMessage = (data) => {
  if(data.bigStorageSummary!=null){
    tableDatass.value = data.bigStorageSummary[0]
UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -101,7 +101,7 @@
  }  
};   
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/edgTasks`;
const handleMessage = (data) => {
  const formattedTasks = data.edgTasks[0].map(cageInfo => {
    if (cageInfo && cageInfo.createTime) {
UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue
@@ -74,7 +74,7 @@
  }  
};   
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/cacheGlass`;
const handleMessage = (data) => {
  tableData.value = data.EdgTasks2[0]
};
UI-Project/src/views/StockBasicData/stockBasicyiwu.vue
@@ -139,7 +139,7 @@
  }
}
let socket = null
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/edgTasks`
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
UI-Project/src/views/hollow/hollowequipment.vue
@@ -1084,7 +1084,7 @@
  }
]
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassOne`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/HollowGlassOne`;
const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1);
watch(() => currentPage.value, (newVal) => {
  window.localStorage.setItem('currentPage', newVal);
UI-Project/src/views/hollow/hollowequipmenthree.vue
@@ -616,7 +616,7 @@
  }
]
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassThree`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/HollowGlassThree`;
const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1);
watch(() => currentPage.value, (newVal) => {
  window.localStorage.setItem('currentPage', newVal);
UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -607,7 +607,7 @@
// })
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassTwo`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/HollowGlassTwo`;
const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1);
watch(() => currentPage.value, (newVal) => {
  window.localStorage.setItem('currentPage', newVal);
UI-Project/src/views/hollow/hollowsitwo.vue
@@ -314,7 +314,7 @@
  }
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/hollowGlassMessage`;
const handleMessage = (data) => {
  if(data.bigStorageCageUsageSummary!=null){
    const summaries = data.bigStorageCageUsageSummary[0];
UI-Project/src/views/hollow/hollowslicecage.vue
@@ -519,7 +519,7 @@
  }
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/hollowGlassMessage`;
const handleMessage = (data) => {
  // 报警信息
if (data.alarmInfo[0] != null && data.alarmInfo[0].length > 0) {
UI-Project/src/views/largescreen/largescreen.vue
@@ -203,7 +203,7 @@
let socket4 = null;
let socket5 = null;
let socket6 = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`;
const socketUrl = `ws://${window.ipConfig.serverUrl}/api/temperingGlass/api/talk/screen`;
const handleMessage = (data) => {
tableDatab.value = data.DoingTask[0]
tableDatac.value = data.orders[0]
@@ -225,7 +225,7 @@
  chartRefs.value[index].dom = el;  
}  
const socketUrl2 = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingIsRun`;
const socketUrl2 = `ws://${window.ipConfig.serverUrl}/api/temperingGlass/api/talk/temperingIsRun`;
const handleMessage2 = (data) => {
  const tasks = data.temperingTaskType[0];  
    flake.value = tasks.some(task => task.state == 1);
@@ -233,14 +233,14 @@
    flakec.value = tasks.some(task => task.state == 3);
};
// 卧式理片
const socketUrl3 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassIsRun`;
const socketUrl3 = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/cacheGlassIsRun`;
const handleMessage3 = (data) => {
    const tasks = data.taskCaches[0];  
  woshia.value = tasks.some(task => task.line == 2001);  
  woshic.value = tasks.some(task => task.line == 2002);  
};
// 大理片笼
const socketUrl4 = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/isRun`;
const socketUrl4 = `ws://${window.ipConfig.serverUrl}/api/cacheVerticalGlass/api/talk/isRun`;
const handleMessage4 = (data) => {
    const tasks = data.bigStorageCageDetailsOutTask[0];  
    dalipiana.value = tasks.some(task => task.slot !== null && task.slot !== undefined);  
@@ -248,14 +248,14 @@
dalipianb.value = taskss.some(task => task.slot !== null && task.slot !== undefined);  
};
// 上片
const socketUrl5 = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassIsRun`;
const socketUrl5 = `ws://${window.ipConfig.serverUrl}/api/loadGlass/api/talk/loadGlassIsRun`;
const handleMessage5 = (data) => {
    const tasks = data.engineering;  
    shangpian.value = tasks.some(task => task.state == 1);
    temperingtotal.value = data.engineering[0].engineerId
  };
// 下片
const socketUrl6 = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unLoadGlassIsRun`;
const socketUrl6 = `ws://${window.ipConfig.serverUrl}/api/unLoadGlass/api/talk/unLoadGlassIsRun`;
const handleMessage6 = (data) => {
  const tasks = data.downWorkstation[0];  
  const tasks1 = data.downGlassTask[0];  
UI-Project/src/views/largescreendisplay/screendisplay.vue
@@ -26,7 +26,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 +61,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 +82,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 +105,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 +291,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 +302,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 +501,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);