| | |
| | | <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> |
| | |
| | | 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; |