From 169e9b4d59bdd763bb5bd1b5a9b092a1200e327b Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 17 四月 2023 17:37:18 +0800 Subject: [PATCH] 增加原发信息,修复bug --- pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 98 ++++++++++++++++++-------------- pages/public-page/messageDetails/messageDetails.vue | 21 +----- pages/tabbar-page/index-tabbar/index-tabbar.vue | 2 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 17 ++++- 4 files changed, 75 insertions(+), 63 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue index c5bc631..3b31d83 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue @@ -101,7 +101,11 @@ gateCameraId: '', equipmentCode: '', weigh: 0 - } + }, + // 鍘熷彂淇℃伅 + primarySkin: null, + primaryHair: null, + primaryClean: null }; }, onShow() { @@ -142,7 +146,8 @@ getTakeCoal() { this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => { if (res.code == 0) { - this.coalDetailsData = res.data[0]; + console.log(res, '鎻愮叅鍗曡鎯�'); + this.coalDetailsData = res.data; // 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁拌祴鍊� this.getWeightHouseObj.deptId = this.coalDetailsData.deptId; this.getWeightHouseObj.filedId = this.coalDetailsData.filedId; @@ -158,6 +163,10 @@ this.getServiceOpenid.filedId = this.coalDetailsData.filedId; // 鑾峰彇鎻愮叅鍗曠姸鎬� this.currentPageCoalStatus = this.coalDetailsData.status; + // 鑾峰彇鍘熷彂淇℃伅 + this.primarySkin = this.coalDetailsData.skinTwo; + this.primaryHair = this.coalDetailsData.hairTwo; + this.primaryClean = this.coalDetailsData.cleanTwo; } }); }, @@ -249,7 +258,9 @@ uni.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${ res.data.id - }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}` + }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&primarySkin=${ + this.primarySkin + }&primaryHair=${this.primaryHair}&primaryClean=${this.primaryClean}` }); } else { this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�'); 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 cea97c8..81b3e58 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 @@ -20,6 +20,12 @@ </view> --> </view> </view> + <view class="bottom" v-if="weighList.orderType == '鍐呰喘' || weighList.orderType == '杞嚭'"> + <view> + <view style="font-weight: 600;">鍘熷彂淇℃伅</view> + <text>鐨噸{{ primarySkin || '' }}姣涢噸{{ primaryHair || '' }}鍑�閲峽{ primaryClean || '' }}</text> + </view> + </view> <view class="bottom"><text>TIP:褰撳墠鐘舵�佷负姝e父鏃跺彲浠ョО閲�</text></view> </view> <view class="two"> @@ -74,6 +80,9 @@ this.weighData.gateCameraId = params.gateCameraId; this.weighData.equipmentCode = params.gateCameraCode; this.weighHouseCode = params.weighHouseCode; + this.primarySkin = params.primarySkin; + this.primaryHair = params.primaryHair; + this.primaryClean = params.primaryClean; this.changeweighHouseCode(params.weighHouseCode); }, data() { @@ -115,13 +124,16 @@ // 鏀剧┖鎺у埗 evacuationModalShow: false, evacuationTitle: '鏀剧┖纭', - evacuationContent: '鏄惁纭鏀剧┖' + evacuationContent: '鏄惁纭鏀剧┖', + // 鑾峰彇鍘熷彂淇℃伅 + primarySkin: null, + primaryHair: null, + primaryClean: null }; }, watch: { realTimeWeigh(newV, oldV) { - console.log(newV); - if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢') { + if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType == '杞嚭') { if (this.weighList.skin == 0) { // this.temporaryWeighObj.skin = this.realTimeWeigh; this.temporaryWeighObj.skin = newV; @@ -130,7 +142,7 @@ this.temporaryWeighObj.hair = newV; this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2); } - } else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '杞嚭') { + } else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList.orderType == '杞叆') { if (this.weighList.hair == 0) { // this.temporaryWeighObj.hair = this.realTimeWeigh; this.temporaryWeighObj.hair = newV; @@ -252,44 +264,44 @@ /** * 鍒濆鍖� weoSocket */ - initWebSocket() { - let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`; - let socket = uni.connectSocket({ - url: wsUrl, - header: { - CLIENT_TOC: 'Y' - }, - complete: res => { - console.log(res, 'socket缁撴灉'); - } - }); - socket.onOpen(() => { - console.log('onOpen'); - }); - // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊 - socket.onMessage(res => { - console.log('socketWeigh', res); - let nowWeighObj = JSON.parse(res.data.slice(7)); - if (nowWeighObj.eqCode == this.weighHouseCode) { - if (nowWeighObj.eqInfraredStatus) { - this.infraredStatus = true; - this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; - } else { - this.infraredStatus = false; - this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; - } - } - }); - socket.onClose(() => { - uni.closeSocket(); - console.log('webSocketClose'); - this.$u.toast('纾呮埧宸插叧闂�'); - }); - socket.onError(err => { - console.log('socket鎶ラ敊', err); - this.$u.toast('纾呮埧鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒'); - }); - }, + // initWebSocket() { + // let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`; + // let socket = uni.connectSocket({ + // url: wsUrl, + // header: { + // CLIENT_TOC: 'Y' + // }, + // complete: res => { + // console.log(res, 'socket缁撴灉'); + // } + // }); + // socket.onOpen(() => { + // console.log('onOpen'); + // }); + // // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊 + // socket.onMessage(res => { + // console.log('socketWeigh', res); + // let nowWeighObj = JSON.parse(res.data.slice(7)); + // if (nowWeighObj.eqCode == this.weighHouseCode) { + // if (nowWeighObj.eqInfraredStatus) { + // this.infraredStatus = true; + // this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; + // } else { + // this.infraredStatus = false; + // this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; + // } + // } + // }); + // socket.onClose(() => { + // uni.closeSocket(); + // console.log('webSocketClose'); + // this.$u.toast('纾呮埧宸插叧闂�'); + // }); + // socket.onError(err => { + // console.log('socket鎶ラ敊', err); + // this.$u.toast('纾呮埧鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒'); + // }); + // }, // 鏀剧┖ evacuation() { this.evacuationModalShow = true; @@ -342,6 +354,8 @@ } .bottom { text-align: center; + position: relative; + top: vww(-30); } } .two { diff --git a/pages/public-page/messageDetails/messageDetails.vue b/pages/public-page/messageDetails/messageDetails.vue index cca0914..a67ad5b 100644 --- a/pages/public-page/messageDetails/messageDetails.vue +++ b/pages/public-page/messageDetails/messageDetails.vue @@ -1,22 +1,7 @@ <template> <view> <combined-title title="娑堟伅璇︽儏"></combined-title> - <view class="compDetails"> - <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th align="left">娑堟伅鏍囬</uni-th> - <uni-td align="left">{{ detail.title || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">娑堟伅鍐呭</uni-th> - <uni-td align="left">{{ detail.content || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鍒涘缓鏃堕棿</uni-th> - <uni-td align="left">{{ detail.createTime || '' }}</uni-td> - </uni-tr> - </uni-table> - </view> + <u-parse :content="content" :lazyLoad="true" :selectable="true"></u-parse> </view> </template> @@ -27,7 +12,8 @@ index: '', detail: {}, messageId: '', - id: '' + id: '', + content: '' }; }, onLoad(v) { @@ -41,6 +27,7 @@ getDetail() { this.$reqGet('getMsgDetail', { messageId: this.messageId, id: this.id }).then(res => { this.detail = res.data; + this.content = this.detail.content; }); } } diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue index acae31a..8b873b4 100644 --- a/pages/tabbar-page/index-tabbar/index-tabbar.vue +++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue @@ -230,7 +230,7 @@ }); socket.onClose(() => { console.log('webSocketClose'); - this.isconnect = true; + this.isconnect = false; }); socket.onError(err => { console.log('socket鎶ラ敊', err); -- Gitblit v1.9.1