From 82af85eae92790fc125ca42d1a800046fe0bd916 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期三, 29 三月 2023 14:00:08 +0800 Subject: [PATCH] 登录页修改 --- pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 51 ++++++++++++++++++++++++++------------------------- 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue index f52f718..2b56177 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue @@ -90,29 +90,29 @@ // pingMessage: JSON.stringify({ type: 'ping' }) // 蹇冭烦璇锋眰淇℃伅 // } // 涓存椂绉伴噸瀵硅薄 - temporaryWeighObj:{ - skin:0, - hair:0, - clean:0 + temporaryWeighObj: { + skin: 0, + hair: 0, + clean: 0 }, - infraredStatus:false// 绾㈠鐘舵�� + infraredStatus: false // 绾㈠鐘舵�� }; }, - watch:{ - realTimeWeigh(newV,oldV){ - if(this.weighList.orderTye == '澶栭攢'){ - if(this.weighList.skin == 0){ - this.temporaryWeighObj.skin = this.realTimeWeigh + watch: { + realTimeWeigh(newV, oldV) { + if (this.weighList.orderTye == '澶栭攢') { + if (this.weighList.skin == 0) { + this.temporaryWeighObj.skin = this.realTimeWeigh; } else { - this.temporaryWeighObj.hair = this.realTimeWeigh - this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin + this.temporaryWeighObj.hair = this.realTimeWeigh; + this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin; } - } else if(this.weighList.orderTye == '澶栬喘'){ - if(this.weighList.hair == 0){ - this.temporaryWeighObj.hair = this.realTimeWeigh + } else if (this.weighList.orderTye == '澶栬喘') { + if (this.weighList.hair == 0) { + this.temporaryWeighObj.hair = this.realTimeWeigh; } else { - this.temporaryWeighObj.skin = this.realTimeWeigh - this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin + this.temporaryWeighObj.skin = this.realTimeWeigh; + this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin; } } } @@ -134,7 +134,7 @@ return false; } } - }, + } }, methods: { init() { @@ -227,12 +227,13 @@ // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊 socket.onMessage(res => { console.log('socketWeigh', res); - let nowWeighObj = JSON.parse(res.data.slice(7)) + let nowWeighObj = JSON.parse(res.data.slice(7)); if (nowWeighObj.eqCode == this.weighHouseCode) { - if(nowWeighObj.'鏆傚畾'){ - this.infraredStatus = true - }else{ - this.infraredStatus = false + if (nowWeighObj.eqInfraredStatus) { + this.infraredStatus = true; + this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; + } else { + this.infraredStatus = false; this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; } } @@ -258,7 +259,7 @@ flex-direction: column; .one { flex: 2; - border: vww(1) solid #dddddd; + border: vww(2) solid #dddddd; margin: vww(20) vww(20) 0 vww(20); border-radius: vww(15); .top { @@ -287,7 +288,7 @@ } .two { flex: 4; - border: vww(1) solid #dddddd; + border: vww(2) solid #dddddd; margin: vww(20); border-radius: vww(10); padding: vww(20); -- Gitblit v1.9.1