From 273d640de28fc7fe55add05a9bc7ea1c19eca830 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期一, 15 七月 2024 20:09:05 +0800 Subject: [PATCH] -切换大模组代码更改 --- jcdm-ui/src/views/main/cfkb/Instructions/index.vue | 73 +++++++++++++++++++++++++++--------- 1 files changed, 54 insertions(+), 19 deletions(-) diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue index 97f3e0c..80e636b 100644 --- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue +++ b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue @@ -23,41 +23,47 @@ </el-row> <el-row :gutter="5" style="margin-top: 5px"> - <el-col :span="24"> + <el-col :span="12"> <el-tabs type="border-card" style="height: 600px" v-model="activeName" @tab-click="changeMenu"> <el-tab-pane name="first"> <span slot="label"> <a class="el-icon-date"></a>棣栭〉</span> <el-col :span="24"> <div> <div style="display: none" id="printMe"> - <p style="margin-left: 25px">9900166410</p> - <p style="margin-left: 25px">HW001.001</p> - <p style="margin-left: 25px">SW002.005</p> + <br> + <p style="margin-left: 43px">9900166410</p> + <p style="margin-left: 43px">HW001.001</p> + <p style="margin-left: 43px">SW002.005</p> + <br> + <span style="font-size: 30px;font-weight: bold;margin-left: 40px;">GEELY</span><br> + <span style="font-size: 10px;margin-left: 29px">COMMERCIAL VEHICLE</span><br> + <span style="margin-left: 60px">H2155D</span><br> + <span style="margin-left: 63px">993083</span><br> + <span style="margin-left: 40px">9900166410</span><br> + <span style="font-size: 10px;margin-left: 17px;">{{text1}}</span> <br> <br> <br> <br> - <span style="font-size: 30px;font-weight: bold;margin-left: 25px;">GEELY</span><br> - <span style="font-size: 10px;margin-left: 14px">COMMERCIAL VEHICLE</span><br> - <span style="margin-left: 44px">H2155D</span><br> - <span style="margin-left: 44px">993083</span><br> - <span style="margin-left: 26px">9900166410</span><br> - <span style="font-size: 10px;margin-right: 10px">{{text1}}</span> + <div ref="canvasWrapper" id="canvasWrapper1" style="display: flex;justify-content: center;margin-top: -27px;"></div> + <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 9px">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span> <br> <br> - <br> - <br> - <br> - <div ref="canvasWrapper" id="canvasWrapper" style="display: flex;justify-content: center;margin-top: -27px"></div> - <span style="font-size: 7px;word-break: break-all;display: flex;justify-content: center;">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span> + <div ref="canvasWrapper" id="canvasWrapper2" style="display: flex;justify-content: center;margin-top: -27px"></div> + <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 9px">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span> </div> <el-button @click="print1">鎵撳嵃</el-button> <el-button style="display: none" @click="test1">鐢熸垚浜岀淮鐮�</el-button> + <el-button style="display: none" @click="test2">鐢熸垚浜岀淮鐮�</el-button> </div> </el-col> </el-tab-pane> </el-tabs> + </el-col> + <el-col :span="12"> + <el-input v-model="weightValue" placeholder="璇疯緭鍏ョО閲嶆暟鎹�"></el-input> + <el-button @click="enterWeighing">褰曞叆</el-button> </el-col> </el-row> <el-dialog v-dialogpop-up :title="title" :visible.sync="open1" width="1000" append-to-body> @@ -211,7 +217,7 @@ import USBDevice from "@/utils/usb.json"; import {addPassingStationCollection} from "@/api/main/da/passingStationCollection/passingStationCollection"; import { - addTighteningParameters, + addTighteningParameters, enterWeighing, replaceAssemblyCode, saveCampaignTimeParameters, yzAddBasicParameters, @@ -222,6 +228,7 @@ name: "stationTerminal", data() { return { + weightValue: '', showInput: true, serialPortContent: '', // 鏌ヨ鍙傛暟 @@ -336,6 +343,19 @@ }, }, methods: { + enterWeighing(){ + if(this.headContent.sfcCode ==='' || this.weightValue === '' ){ + this.$message.error('鍙傛暟涓嶅叏锛�'); + }else { + let param = { + sfcCode: this.headContent.sfcCode, + weightValue: this.weightValue, + } + enterWeighing(param).then(response => { + this.$message('褰曞叆瀹屾垚锛�'); + }); + } + }, serialLink() { this.open1 = true }, @@ -448,16 +468,30 @@ return false; }, test1(){ - document.getElementById('canvasWrapper').innerHTML = ''; + document.getElementById('canvasWrapper1').innerHTML = ''; this.$nextTick(() => { - let qrCode = new QRCode('canvasWrapper',{ + let qrCode = new QRCode('canvasWrapper1',{ width: 120, height: 120, text: 'P9900166410#T'+ this.text1 +'#V993983#SSW002.005#HHW001.001#NBMS#', colorDark: '#000', colorLight: '#fff' }) - }) + } + ) + }, + test2(){ + document.getElementById('canvasWrapper2').innerHTML = ''; + this.$nextTick(() => { + let qrCode = new QRCode('canvasWrapper2',{ + width: 120, + height: 120, + text: 'P9900166410#T'+ this.text1 +'#V993983#SSW002.005#HHW001.001#NBMS#', + colorDark: '#000', + colorLight: '#fff' + }) + } + ) }, /** 鍏ョ珯澧炲姞杩囩珯閲囬泦璁板綍 **/ @@ -596,6 +630,7 @@ const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, ''); console.log("涓插彛鏀跺埌鏁版嵁-------------------"+scanValue) this.test1() + this.test2() this.text1 = scanValue this.headContent.sfcCode = scanValue // this.print1() -- Gitblit v1.9.3