From 373929a32aa4a3197260a106be3fdc21eb109afc Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 04 三月 2025 08:38:11 +0800 Subject: [PATCH] feat:门卫页面修改状态传参 --- pages/tabbar-page/index-tabbar/index-tabbar.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 50 insertions(+), 2 deletions(-) diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue index 52ebb57..7d3aff6 100644 --- a/pages/tabbar-page/index-tabbar/index-tabbar.vue +++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue @@ -32,6 +32,11 @@ ref="samplingRef" :samplingData="samplingData" /> + <entranceGuard + v-if="roleType == 7" + ref="entranceGuardgRef" + :samplingData="entranceGuardData" + /> <tab-bar :current="0"></tab-bar> <!-- 鎺ㄩ�佹秷鎭脊绐� --> <u-modal :show="messagePushShow" @@ -53,6 +58,7 @@ import { mapState, mapMutations,mapGetters } from 'vuex'; import { webSocketUrl } from '@/api/request.js'; import sampling from '@/pages/sampling-page/index.vue' + import entranceGuard from '@/pages/entranceGuard/index.vue' let socket = null; export default { @@ -62,7 +68,8 @@ freightForwarderIndex, LoadUnload, selectTarget, - sampling + sampling, + entranceGuard }, computed: { ...mapState(['globalweighHouseCode', 'globalweigh', 'globalisconnect', 'globalSocket', 'websocketData', @@ -139,12 +146,37 @@ uni.stopPullDownRefresh(); } }); + }else if(this.roleType == 7){ + + this.$reqGet('gateAuth',{current:1,size:5,status:25}).then(res => { + if (res.code == 0) { + if(res.data.records.length){ + this.orderPlanData = res.data.records; + }else{ + this.orderPlanData = []; + } + + this.$u.toast('鍔犺浇鎴愬姛'); + uni.hideLoading(); + uni.stopPullDownRefresh(); + } else { + this.$u.toast('鍔犺浇澶辫触'); + uni.hideLoading(); + uni.stopPullDownRefresh(); + } + }); } }, onHide() { console.log('椤甸潰闅愯棌') this.$nextTick(()=>{ - this.$refs.samplingRef.clearTime(); + if(this.roleType === 7){ + this.$refs.entranceGuardgRef.clearTime(); + }else{ + this.$refs.samplingRef.clearTime(); + } + + }) }, onUnload() { @@ -184,6 +216,7 @@ roleType: null, orderPlanDataStore: [], indexHuoDaiOrderPlanData: [], + entranceGuardData:[], indexHistoryCoalData: [], indexdriverBillOfLoadingData: {}, samplingData:[], @@ -241,6 +274,14 @@ }); } + //闂ㄥ崼椤甸潰 + else if (v.startsWith('gate_auth')) { + //鏀跺埌閫氱煡鏇存柊鏁版嵁 + this.$nextTick(() => { + this.$refs.entranceGuardgRef.init(); + }); + + } } }, @@ -293,6 +334,13 @@ this.$refs.samplingRef.timerFun(); }); break; + case 7: + console.log('entranceGuardgRef'); + this.$nextTick(() => { + this.$refs.entranceGuardgRef.init(); + this.$refs.entranceGuardgRef.timerFun(); + }); + break; default: break; } -- Gitblit v1.9.1