From aa3438b349bb365bfb4c30a9194b5c10f9f843eb Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 08 四月 2025 17:39:13 +0800 Subject: [PATCH] feat:质检员历史质检单增加上滑更多 --- pages/tabbar-page/index-tabbar/index-tabbar.vue | 83 ++++++++++++++++++++++++----------------- 1 files changed, 48 insertions(+), 35 deletions(-) diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue index d2dccbb..ade255d 100644 --- a/pages/tabbar-page/index-tabbar/index-tabbar.vue +++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue @@ -7,8 +7,9 @@ <u-badge :isDot="true" type="error" v-if="dotShow"></u-badge> - <u-icon name="chat" - color="#fff" + <u-icon + name="chat" + :color="[roleType == 4 ? '#3b56eb' : '#fff']" size="50"></u-icon> </view> </view> @@ -39,9 +40,10 @@ <script> import customerIndex from '@/pages/customer-page/customer-index/customer-index.vue'; import driverIndex from '@/pages/driver-page/driver-index/driver-index.vue'; + // import driverIndex from '@/pages/driver-page/driver-index/test-index.vue' import inspectionIndex from '@/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue' import freightForwarderIndex from '@/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue'; - import { mapState, mapMutations } from 'vuex'; + import { mapState, mapMutations, mapGetters } from 'vuex'; import { webSocketUrl } from '@/api/request.js'; let socket = null; export default { @@ -54,7 +56,8 @@ computed: { ...mapState(['globalweighHouseCode', 'globalweigh', 'globalisconnect', 'globalSocket', 'websocketData', 'globalIntervalId' - ]) + ]), + ...mapGetters(['websocketData']) }, //棣栭〉涓嬫媺鍒锋柊 onPullDownRefresh() { @@ -145,35 +148,43 @@ }; }, watch: { - '$store.state.websocketData'(v) { - console.log(v, '鎺ュ彈鐨剋s鏁版嵁'); - if (v.startsWith('weigh')) { - let nowWeighObj = JSON.parse(v.slice(7)); - if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) { - if (nowWeighObj.eqInfraredStatus) { - this.changeinfraredStatus(true); - this.changeWeigh(nowWeighObj.weigh); - let warningState = nowWeighObj.warning == 1 - this.changeWarning(warningState) - } else { - this.changeinfraredStatus(false); - this.changeWeigh(nowWeighObj.weigh); - let warningState = nowWeighObj.warning == 1 - this.changeWarning(warningState) - } - } - } else if (v.startsWith('msg')) { - function removeTags(str) { - return str.replace(/<\/?[^>]+>/gi, ''); - } - this.messageList = JSON.parse(v.slice(5)); - this.messageList = { - ...this.messageList, - title: this.messageList.title.slice(0, 8) + '...', - content: removeTags(this.messageList.content).trim().slice(0, 8) + '...' - } - this.messagePushShow = true; - } else {} + 'websocketData': { + handler(v) { + console.log(v, '鎺ュ彈鐨剋s鏁版嵁'); + if(v) { + if (v.startsWith('weigh')) { + let nowWeighObj = JSON.parse(v.slice(7)); + console.log(nowWeighObj,'nowWeighObj-----') + console.log(this.globalweighHouseCode,'this.globalweighHouseCode-----') + if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) { + if (nowWeighObj.eqInfraredStatus) { + this.changeinfraredStatus(true); + this.changeWeigh(nowWeighObj.weigh); + let warningState = nowWeighObj.warning == 1 + this.changeWarning(warningState) + } else { + this.changeinfraredStatus(false); + this.changeWeigh(nowWeighObj.weigh); + let warningState = nowWeighObj.warning == 1 + this.changeWarning(warningState) + } + } + } else if (v.startsWith('msg')) { + function removeTags(str) { + return str.replace(/<\/?[^>]+>/gi, ''); + } + this.messageList = JSON.parse(v.slice(5)); + this.messageList = { + ...this.messageList, + title: this.messageList.title.slice(0, 8) + '...', + content: removeTags(this.messageList.content).trim().slice(0, 8) + '...' + } + this.messagePushShow = true; + } else {} + } + }, + deep: true, + immediate: true } }, onShow() { @@ -293,6 +304,8 @@ scoped> .max-block { font-family: siYuanLight !important; + width: 100%; + height: 100%; } .white-block { @@ -307,7 +320,7 @@ position: absolute; top: vww(96); right: vww(32); - z-index: 1; + z-index: 999999; .icon-body { position: relative; @@ -332,4 +345,4 @@ } } } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.1