钢化更改文字显示,大屏模块、磨边的玻璃显示更改判断条件,下片台注释打印
7个文件已修改
211 ■■■■■ 已修改文件
UI-Project/package-lock.json 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/main.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/largescreen/largescreen.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/package-lock.json
@@ -25,6 +25,7 @@
        "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"
@@ -1822,6 +1823,14 @@
        "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",
@@ -3124,6 +3133,14 @@
        "@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",
UI-Project/package.json
@@ -25,6 +25,7 @@
    "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"
UI-Project/src/main.js
@@ -15,7 +15,6 @@
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)
@@ -29,5 +28,4 @@
    locale: zhCn,
})
app.use(i18n)
app.mount('#app')
app.mount('#app')
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -41,14 +41,14 @@
      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) {  
@@ -70,8 +70,8 @@
        ycoordinate: rect.xCoordinate * 0.1,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: adjustedWidtha,
        heighta: adjustedHeighta,
        widtha: rect.width,
        heighta: rect.height,
      };  
      });
      }else{
@@ -92,14 +92,14 @@
      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) {  
@@ -121,8 +121,8 @@
        ycoordinate: rect.xCoordinate * 0.1,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: adjustedWidtha,
        heighta: adjustedHeighta,
        widtha: rect.width,
        heighta: rect.height,
      };  
      });
      }else{
@@ -143,14 +143,14 @@
  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 {  
@@ -159,8 +159,8 @@
    y: rect.xCoordinate * 0.16,  
    width: adjustedWidth,  
    height: adjustedHeight,  
    widtha: adjustedWidtha,
    heighta: adjustedHeighta,
    widtha: rect.width,
    heighta: rect.height,
  };  
});
  }else{
@@ -181,14 +181,14 @@
  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 {  
@@ -197,8 +197,8 @@
        y: rect.xCoordinate * 0.16,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: adjustedWidtha,
        heighta: adjustedHeighta,
        widtha: rect.width,
        heighta: rect.height,
  };  
});
  }else{
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -48,14 +48,14 @@
    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 {  
@@ -64,8 +64,8 @@
    ycoordinate: rect.xCoordinate * 0.16,
    width: adjustedWidth,  
    height: adjustedHeight,  
    widtha: adjustedWidtha,
    heighta: adjustedHeighta,
    widtha: rect.width,
    heighta: rect.height,
  };  
});
  }
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -13,8 +13,7 @@
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)
@@ -33,8 +32,8 @@
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 值  
@@ -235,56 +234,56 @@
}
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(() => {
@@ -430,20 +429,17 @@
    </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>
UI-Project/src/views/largescreen/largescreen.vue
@@ -38,6 +38,12 @@
  <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"
@@ -171,6 +177,7 @@
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]
@@ -208,8 +215,10 @@
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`;
@@ -225,6 +234,13 @@
  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) => {
@@ -302,6 +318,7 @@
  socket3 = initializeWebSocket(socketUrl3, handleMessage3);
  socket4 = initializeWebSocket(socketUrl4, handleMessage4);
  socket5 = initializeWebSocket(socketUrl5, handleMessage5);
  socket6 = initializeWebSocket(socketUrl6, handleMessage6);
});
  onUnmounted(() => {
    if (socket) {
@@ -319,6 +336,9 @@
    if (socket5) {
    closeWebSocket5(socket5);
    }
    if (socket6) {
    closeWebSocket6(socket6);
    }
    });
onBeforeUnmount(() => {
console.log("关闭了")
@@ -327,6 +347,7 @@
closeWebSocket3();
closeWebSocket4();
closeWebSocket5();
closeWebSocket6();
});
</script>