钢化更改文字显示,大屏模块、磨边的玻璃显示更改判断条件,下片台注释打印
| | |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-print-nb": "^1.7.5", |
| | | "vue-router": "^4.2.4", |
| | | "vue3-print-nb": "^0.1.4", |
| | | "vxe-table": "^4.5.15", |
| | | "xe-utils": "^3.5.14", |
| | | "xlsx": "^0.18.5" |
| | |
| | | "vue": "^3.2.0" |
| | | } |
| | | }, |
| | | "node_modules/vue3-print-nb": { |
| | | "version": "0.1.4", |
| | | "resolved": "https://registry.npmmirror.com/vue3-print-nb/-/vue3-print-nb-0.1.4.tgz", |
| | | "integrity": "sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==", |
| | | "dependencies": { |
| | | "vue": "^3.0.5" |
| | | } |
| | | }, |
| | | "node_modules/vxe-table": { |
| | | "version": "4.5.15", |
| | | "resolved": "https://registry.npmjs.org/vxe-table/-/vxe-table-4.5.15.tgz", |
| | |
| | | "@vue/devtools-api": "^6.5.0" |
| | | } |
| | | }, |
| | | "vue3-print-nb": { |
| | | "version": "0.1.4", |
| | | "resolved": "https://registry.npmmirror.com/vue3-print-nb/-/vue3-print-nb-0.1.4.tgz", |
| | | "integrity": "sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==", |
| | | "requires": { |
| | | "vue": "^3.0.5" |
| | | } |
| | | }, |
| | | "vxe-table": { |
| | | "version": "4.5.15", |
| | | "resolved": "https://registry.npmjs.org/vxe-table/-/vxe-table-4.5.15.tgz", |
| | |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-print-nb": "^1.7.5", |
| | | "vue-router": "^4.2.4", |
| | | "vue3-print-nb": "^0.1.4", |
| | | "vxe-table": "^4.5.15", |
| | | "xe-utils": "^3.5.14", |
| | | "xlsx": "^0.18.5" |
| | |
| | | import * as echarts from "echarts" |
| | | // echarts.registerMap('china', china) |
| | | // Vue.prototype.$echarts = echarts |
| | | |
| | | // app.component("v-chart", Echarts) |
| | | // app.config.globalProperties.$echarts = echarts |
| | | const app = createApp(App) |
| | |
| | | locale: zhCn, |
| | | }) |
| | | app.use(i18n) |
| | | |
| | | app.mount('#app') |
| | | app.mount('#app') |
| | |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = heighta * 0.12; |
| | | adjustedHeight = widtha * 0.1; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.yCoordinate + heighta); |
| | | } else { |
| | | adjustedWidth = widtha * 0.12; |
| | | adjustedHeight = heighta * 0.1; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.yCoordinate + widtha); |
| | | } |
| | | // if (rect.angle === 0) { |
| | |
| | | ycoordinate: rect.xCoordinate * 0.1, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | | heighta: adjustedHeighta, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | }; |
| | | }); |
| | | }else{ |
| | |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = heighta * 0.12; |
| | | adjustedHeight = widtha * 0.1; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.yCoordinate + heighta); |
| | | } else { |
| | | adjustedWidth = widtha * 0.12; |
| | | adjustedHeight = heighta * 0.1; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.yCoordinate + widtha); |
| | | } |
| | | // if (rect.angle === 0) { |
| | |
| | | ycoordinate: rect.xCoordinate * 0.1, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | | heighta: adjustedHeighta, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | }; |
| | | }); |
| | | }else{ |
| | |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * 0.24; |
| | | adjustedHeight = heighta * 0.16; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5190 - (rect.yCoordinate + widtha); |
| | | } else { |
| | | adjustedWidth = heighta * 0.24; |
| | | adjustedHeight = widtha * 0.16; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5190 - (rect.yCoordinate + heighta); |
| | | } |
| | | return { |
| | |
| | | y: rect.xCoordinate * 0.16, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | | heighta: adjustedHeighta, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | }; |
| | | }); |
| | | }else{ |
| | |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * 0.24; |
| | | adjustedHeight = heighta * 0.16; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | // newX = 5190 - (rect.yCoordinate + widtha); |
| | | } else { |
| | | adjustedWidth = heighta * 0.24; |
| | | adjustedHeight = widtha * 0.16; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // adjustedWidtha = heighta; |
| | | // adjustedHeighta = widtha; |
| | | // newX = 5190 - (rect.yCoordinate + heighta); |
| | | } |
| | | return { |
| | |
| | | y: rect.xCoordinate * 0.16, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | | heighta: adjustedHeighta, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | }; |
| | | }); |
| | | }else{ |
| | |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * 0.24; |
| | | adjustedHeight = heighta * 0.16; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | // newX = 5190 - (rect.yCoordinate + rect.width); |
| | | } else { |
| | | adjustedWidth = heighta * 0.24; |
| | | adjustedHeight = widtha * 0.16; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | // adjustedWidtha = heighta; |
| | | // adjustedHeighta = widtha; |
| | | // newX = 5190 - (rect.yCoordinate + rect.height); |
| | | } |
| | | return { |
| | |
| | | ycoordinate: rect.xCoordinate * 0.16, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | | heighta: adjustedHeighta, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | }; |
| | | }); |
| | | } |
| | |
| | | import request from "@/utils/request"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import PrintFlow from './PrintFlow.vue' |
| | | import print from 'fromwe-print-nb' |
| | | // import PrintFlow from './PrintFlow.vue' |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisiblea2 = ref(false) |
| | | const dialogFormVisibleaDownGlass = ref(false) |
| | |
| | | const selectValuesa = reactive({}); |
| | | const selectOptionsa = ref([]); |
| | | const dialogTableVisible = ref(false) |
| | | const printFlowCardId = ref('') |
| | | const printLayer=ref('') |
| | | // const printFlowCardId = ref('') |
| | | // const printLayer=ref('') |
| | | |
| | | const handleInputChangea = (value, rowId) => { |
| | | // 更新对应行的 select 值 |
| | |
| | | } |
| | | |
| | | |
| | | const open=async(row)=>{ |
| | | // const open=async(row)=>{ |
| | | |
| | | printFlowCardId.value=row.flowCardId; |
| | | printLayer.value=row.layer |
| | | dialogTableVisible.value = true; |
| | | setTimeout(() => { |
| | | printFlowCard(); // 替换成你要执行的函数名 |
| | | }, 1000); |
| | | ; |
| | | } |
| | | // printFlowCardId.value=row.flowCardId; |
| | | // printLayer.value=row.layer |
| | | // dialogTableVisible.value = true; |
| | | // setTimeout(() => { |
| | | // printFlowCard(); // 替换成你要执行的函数名 |
| | | // }, 1000); |
| | | // ; |
| | | // } |
| | | |
| | | const printFlowCard = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("child"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | // const printFlowCard = () => { |
| | | // // 需要打印的局部区域赋予"print-wrap"的id |
| | | // let el = document.getElementById("child"); |
| | | // let doc = document; |
| | | // let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | // let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | // // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | // let content = doc.createElement("div"); |
| | | // content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | | "body>#" + |
| | | printId + |
| | | "{display:none}@media print{" + |
| | | "@page {" + |
| | | " size: auto; " + |
| | | " margin: 2mm 2mm 0mm 1mm; " + |
| | | " }body>:not(#" + |
| | | printId + |
| | | "){display:none !important}body>#" + |
| | | printId + |
| | | "{display:block;padding-top:1px}}"; |
| | | // |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | // // 样式控制与打印无关的元素隐藏 |
| | | // let style = doc.createElement("style"); |
| | | // style.innerHTML = |
| | | // "body>#" + |
| | | // printId + |
| | | // "{display:none}@media print{" + |
| | | // "@page {" + |
| | | // " size: auto; " + |
| | | // " margin: 2mm 2mm 0mm 1mm; " + |
| | | // " }body>:not(#" + |
| | | // printId + |
| | | // "){display:none !important}body>#" + |
| | | // printId + |
| | | // "{display:block;padding-top:1px}}"; |
| | | // // |
| | | // content.innerHTML = el.outerHTML; |
| | | // // // console.log("el.outerHTML", el.outerHTML); |
| | | // body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | | setTimeout(() => { |
| | | window.print(); |
| | | body.removeChild(content); |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | // // 与style元素设置的样式相配合 |
| | | // // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | // body.appendChild(content); |
| | | // setTimeout(() => { |
| | | // window.print(); |
| | | // body.removeChild(content); |
| | | // body.removeChild(style); |
| | | // }, 20); |
| | | // } |
| | | |
| | | |
| | | // beforeUnmount(() => { |
| | |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | <!-- <el-dialog |
| | | id="sizePrintCalrd" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <!-- <template #header="{ close, titleId, titleClass }"> |
| | | <el-button @click="printFlowCard" >打印</el-button> |
| | | </template> --> |
| | | <print-flow |
| | | id="child" |
| | | :printFlowCardId="printFlowCardId" |
| | | :printLayer="printLayer" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | |
| | | </template> |
| | | <style scoped> |
| | |
| | | <div id="longa" v-show="dalipiana"></div> |
| | | <div id="longb" v-show="dalipianb"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <!-- <div id="shangpianji" v-show="xiapian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> --> |
| | | </div> |
| | | <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | |
| | | let socket3 = null; |
| | | let socket4 = null; |
| | | let socket5 = null; |
| | | let socket6 = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.awaitingRepairs[0] |
| | |
| | | const socketUrl3 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassIsRun`; |
| | | const handleMessage3 = (data) => { |
| | | const tasks = data.taskCaches[0]; |
| | | woshia.value = tasks.some(task => task.endCell == 2001 && task.glassId == 0); |
| | | woshic.value = tasks.some(task => task.endCell == 2002 && task.glassId == 0); |
| | | woshia.value = tasks.some(task => task.line == 2001); |
| | | woshic.value = tasks.some(task => task.line == 2002); |
| | | console.log(tasks); |
| | | |
| | | }; |
| | | // 大理片笼 |
| | | const socketUrl4 = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/isRun`; |
| | |
| | | if(data.engineering.length !==0 ){ |
| | | shangpian.value = true; |
| | | } |
| | | }; |
| | | // 下片 |
| | | const socketUrl6 = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unLoadGlassIsRun`; |
| | | const handleMessage6 = (data) => { |
| | | // if(data.engineering.length !==0 ){ |
| | | // shangpian.value = true; |
| | | // } |
| | | }; |
| | | const renderPieCharts = () => { |
| | | processesData.value.forEach((data, index) => { |
| | |
| | | socket3 = initializeWebSocket(socketUrl3, handleMessage3); |
| | | socket4 = initializeWebSocket(socketUrl4, handleMessage4); |
| | | socket5 = initializeWebSocket(socketUrl5, handleMessage5); |
| | | socket6 = initializeWebSocket(socketUrl6, handleMessage6); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | |
| | | if (socket5) { |
| | | closeWebSocket5(socket5); |
| | | } |
| | | if (socket6) { |
| | | closeWebSocket6(socket6); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | |
| | | closeWebSocket3(); |
| | | closeWebSocket4(); |
| | | closeWebSocket5(); |
| | | closeWebSocket6(); |
| | | }); |
| | | </script> |
| | | |