admin
2024-08-12 4280d7277bc0f9b5c3dfad6d59d833aa89294f69
jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -14,7 +14,9 @@
      <el-col :span="10">
        <el-card shadow="never">
          <span class="head-font">产品序列号 : {{headContent.sfcCode}}</span>
          <el-button @click="print1">打印</el-button>
<!--          <el-button @click="print1">打印</el-button>-->
          <el-button id="print" v-print="'#printMe'" type="primary">打印</el-button>
          <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button>
          <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button>
@@ -630,7 +632,11 @@
        this.$message('websocket连接成功!');
      };
      this.ws.onmessage = function (event) {
        if (event.data === "IN") {
        if (event.data === "print") {
          self.$message('postman调用打印方法打印!');
          // self.print1()
          document.getElementById('print').click();
        }else if (event.data === "IN") {
          self.cakeLamp.InPlace = 1;
        } else if (event.data === "IN0") {
          self.cakeLamp.InPlace = 0;