Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# UI-Project/src/views/Caching/cachingun.vue
# UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
# UI-Project/src/views/UnLoadGlass/Landingindication.vue
# UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
# UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
| | |
| | | team:'班组', |
| | | basic:'设备', |
| | | add:'确认保存', |
| | | cancel:'取消', |
| | | }, |
| | | workOrder:{ |
| | | glassID:'玻璃ID', |
| | |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted , onBeforeUnmount} from "vue"; |
| | | import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | |
| | | const adda = ref(false) |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted , onUnmounted} from "vue"; |
| | | import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | }; |
| | | |
| | | |
| | | |
| | | let socket =null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/downcache`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | |
| | | })); |
| | | |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | console.log("关闭了") |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | row.enableState = 1 - row.enableState; // Toggle between 0 and 1
|
| | | // 此处可以添加保存状态的逻辑,比如调用 API 更新数据
|
| | | };
|
| | |
|
| | | let socket = null;
|
| | |
|
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/storageTask`;
|
| | | // 定义消息处理函数,更新 receivedData 变量
|
| | | const handleMessage = (data) => {
|
| | |
| | | // 替换原来的 createTime 字段为格式化后的日期时间字符串
|
| | | item.startTime = formattedDateTime;
|
| | | });
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | };
|
| | |
|
| | | onMounted(() => {
|
| | |
|
| | | socket = initializeWebSocket(socketUrl, handleMessage);
|
| | | });
|
| | |
|
| | |
|
| | | onUnmounted(() => {
|
| | | if (socket) {
|
| | | closeWebSocket(socket);
|
| | | socketStatus.value = 'closed';
|
| | | }
|
| | | });
|
| | | // onBeforeUnmount(() => {
|
| | | // console.log("关闭了");
|
| | | // closeWebSocket();
|
| | | // });
|
| | | onBeforeUnmount(() => {
|
| | | console.log("关闭了");
|
| | | closeWebSocket();
|
| | | });
|
| | |
|
| | | const tasktableData = ref([]);
|
| | |
|
| | |
| | | <script setup lang="ts"> |
| | | import { Delete, Upload } from '@element-plus/icons-vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; |
| | | import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue'; |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | } |
| | | }); |
| | | } |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | const handleMessage = (data) => { |
| | | // adjustedRects.value = data.currentCutTerritory[0] |
| | | adjustedRects.value = data.currentCutTerritory[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | x_axis: (rect.x_axis*100) * 0.003, // 将x值除以3 |
| | | ...rect, |
| | | x_axis: (rect.x_axis*100) * 0.003, |
| | | y_axis: (rect.y_axis*100) * 0.003, |
| | | width: (rect.width*100) * 0.002 , |
| | | widtha: rect.width , |
| | |
| | | height:( rect.height*100) * 0.002 , |
| | | glass_state: rect.glass_state |
| | | })); |
| | | // console.log("更新后数据", tableData); |
| | | |
| | | }; |
| | | |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; |
| | | import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | const adjustedRectsb = ref([]); |
| | | const currentGlassId = ref(null); |
| | | const currenttemperingFeedSequence = ref(null); |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; |
| | | const handleMessage = (data) => { |
| | | // 进炉中 |
| | |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | function updateRectColors() { |
| | | adjustedRectsa.value.forEach(rect => { |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import request from "@/utils/request" |
| | | |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; |
| | | import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | const adjustedRects = ref([]); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | |
| | | inputValuesb[rowId] = value; |
| | | }; |
| | | fetchTableData(); |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | // adjustedRects.value = data.device[0].map(rect => ({ |
| | |
| | | // thisProcess: rect.thisProcess, |
| | | // })); |
| | | }; |
| | | let socket; |
| | | // let socket; |
| | | onMounted(() => { |
| | | socket = new WebSocket(socketUrl); |
| | | socket.onmessage = (event) => { |
| | |
| | | }; |
| | | // }; |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | onUnmounted(() => { |
| | | socket.close(); |
| | | }); |
| | | |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | fetchTableData(); |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | |
| | | const flakea = ref(false) |
| | | const flakeb = ref(false) |
| | | const flakec = ref(false) |
| | | const dialoglea = ref(false) |
| | | const tableDatax = ref([]) |
| | | const user = ref(''); |
| | | const projectNo = ref(''); |
| | | const workstationId = ref(''); |
| | |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | const handlezhiban = () => { |
| | | dialoglea.value = true; // 打开绑定架子对话框 |
| | | fetchFlowCardId(); |
| | | }; |
| | | // 值班信息 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/work_assignment/selectWorkAssignment',{ |
| | | line: 2001, |
| | | workingProcedure : '冷加工' |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data; |
| | | console.log(tableDatax.value); |
| | | console |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleConfirmb = async () => { |
| | | const response = await request.post("/loadGlass/work_assignment/updateWorkAssignment", tableDatax.value) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | dialoglea.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | list(''); |
| | | fetchOptions(''); |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onMounted(() => { |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | const list = async () => { |
| | | try { |
| | |
| | | const titleSelectJsona = ref({ |
| | | processTypea: [], |
| | | }) |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | |
| | | <el-button style="margin-top: 5px;margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary" @click="handleBind">{{ $t('basicData.startloading') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button> |
| | | <!-- <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="handleBindb">停止任务</el-button> --> |
| | | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 300px;" |
| | | :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/> |
| | | <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" /> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')"> |
| | | <template #default="{ row }"> |
| | | <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')"> |
| | | <template #default="{ row }"> |
| | | <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | {{ $t('searchOrder.add') }} |
| | | </el-button> |
| | | <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('basicData.whetherpause')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | |
| | | const router = useRouter() |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { ref, onMounted , onBeforeUnmount, reactive, computed } from "vue"; |
| | | import { ref, onMounted , onBeforeUnmount, reactive, computed,onUnmounted } from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { tr } from "element-plus/es/locale"; |
| | |
| | | const tableDatad = ref([]) |
| | | const tableDataf = ref([]) |
| | | const tableDatae = ref([]) |
| | | const tableDataxx = ref([]) |
| | | const tableDatax = ref([]) |
| | | const carPosition = ref([]) |
| | | const ganghua = ref('') |
| | | const adjustedRects = ref([]); |
| | |
| | | const adjustedRectsg = ref([]); |
| | | const adjustedRectsh = ref([]); |
| | | const currentRow = reactive({}); // 当前行的数据 |
| | | const inputValuesa = reactive({}); |
| | | |
| | | const add = ref(false) |
| | | const flowCardId = ref(''); |
| | | const gap = ref(''); |
| | |
| | | }); |
| | | setInterval(() => { |
| | | localStorage.clear(); // 清除所有localStorage数据 |
| | | console.log(11111); |
| | | }, 60000); |
| | | // function cleanUp() { |
| | | // console.log('执行清理操作'); |
| | | // } |
| | | // // 假设我们每2分钟执行一次清理 |
| | | // setInterval(cleanUp, 1 * 60 * 1000); |
| | |
| | | // 是否禁用 |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enableState === 1 ? 0 : 1; |
| | | console.log(row.slot); |
| | | console.log(row.enableState); |
| | | var url="/cacheVerticalGlass/bigStorageCage/updateStorageCageDisabled?slot="+row.slot + "&enableState=" + newState; |
| | | console.log(url); |
| | | const response = await request.get(url) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | } |
| | | }; |
| | | const handlezhiban = () => { |
| | | fetchFlowCardId(); |
| | | dialoglea.value = true; // 打开绑定架子对话框 |
| | | fetchFlowCardId(); |
| | | }; |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | // var url="/cacheVerticalGlass/work_assignment/selectWorkAssignment?line=" + 2001 + "&workingProcedure='冷加工'"; |
| | | // const response = await request.post(url) |
| | | const response = await request.post('/cacheVerticalGlass/work_assignment/selectWorkAssignment',{ |
| | | line: 2001, |
| | | workingProcedure : '冷加工' |
| | | }); |
| | | if (response.code === 200) { |
| | | ElMessage.error(response.message); |
| | | tableDataxx.value = response.data; |
| | | console.log(tableDataxx.value); |
| | | |
| | | } |
| | | else { |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data; |
| | | console.log(tableDatax.value); |
| | | console |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleConfirm = async () => { |
| | | const response = await request.post("/cacheVerticalGlass/work_assignment/updateWorkAssignment", tableDatax.value) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | dialoglea.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | function handleRowClick(row) { |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | console.log(data.temperingSwitch[0]); |
| | | if(data.bigStorageCageDetailsOutTask!=null){ |
| | | tableDatac.value = data.bigStorageCageDetailsOutTask[0] |
| | | adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | |
| | | }else{ |
| | | ganghua.value = '' |
| | | } |
| | | console.log(data.temperingSwitch[0]); |
| | | if(data.bigStorageCageInfos!=null){ |
| | | window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length) |
| | | let length = window.localStorage.getItem('length') |
| | |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | |
| | | // initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | function getStatusType(enableState: number) { |
| | | switch (enableState) { |
| | |
| | | } |
| | | } |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | // console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialoglea" top="5vh" width="85%" :title="$t('searchOrder.dutyinformation')"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" |
| | | :data="tableDataxx" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')" min-width="150"/> |
| | | <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" min-width="120" /> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')" min-width="150" /> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')" min-width="150" /> |
| | | <el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 300px;" |
| | | :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/> |
| | | <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" /> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')"> |
| | | <template #default="{ row }"> |
| | | <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')"> |
| | | <template #default="{ row }"> |
| | | <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | {{ $t('searchOrder.add') }} |
| | | </el-button> |
| | | <el-button @click="dialoglea = false">{{ $t('basicData.cancel') }}</el-button> |
| | | <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | const adda = ref(false) |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted , onBeforeUnmount} from "vue"; |
| | | import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.EdgTasks1[0] |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | const adda = ref(false) |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted , onBeforeUnmount} from "vue"; |
| | | import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.EdgTasks2[0] |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | |
| | | onMounted(() => { |
| | | fetchFlowCardId(); // 获取数据 |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | console.log("关闭了") |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | const showCustomAlert = (downGlassInfoList) => { |
| | | let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">'; |
| | | tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>'; |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | let socket =null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass3`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | |
| | | onMounted(() => { |
| | | fetchFlowCardId(); // 获取数据 |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | console.log("关闭了") |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | |
| | | const showCustomAlert = (downGlassInfoList) => { |
| | | let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">'; |
| | | tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>'; |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive, onMounted, onUnmounted} from "vue"; |
| | | import {reactive, onMounted, onBeforeUnmount,onUnmounted} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | import { useI18n } from 'vue-i18n' |
| | |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | console.log("关闭了") |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | |
| | |
| | | return t('large.allstatus'); |
| | | } |
| | | } |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.awaitingRepairs[0] |
| | |
| | | // thisProcess: rect.thisProcess, |
| | | // })); |
| | | }; |
| | | let socket; |
| | | // let socket; |
| | | // 设置图表 DOM 引用 |
| | | function setChartDom(index, el) { |
| | | if (!chartRefs.value[index]) { |
| | |
| | | onUnmounted(() => { |
| | | socket.close(); |
| | | }); |
| | | |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | |
| | | .eq(EdgStorageCageDetails::getGlassId, GlassInfo::getGlassId) |
| | | .eq(EdgStorageCageDetails::getEngineerId, GlassInfo::getEngineerId)) |
| | | .eq(GlassInfo::getGlassId,taskCache1.getGlassId()) |
| | | .eq(EdgStorageCageDetails::getState,Const.GLASS_STATE_IN) |
| | | .eq(EdgStorageCageDetails::getState,Const.GLASS_STATE_OUT) |
| | | ); |
| | | if(glassInfos.size()==1){ |
| | | GlassInfo glassInfo=glassInfos.get(0); |