| | |
| | | :indexdriverBillOfLoadingData="indexdriverBillOfLoadingData"></driver-index> |
| | | <load-unload ref="LoadUnloadRef" |
| | | v-if="roleType == 5"></load-unload> |
| | | <doorkeep-index ref="doorkeepIndexRef" |
| | | v-if="roleType == 6"></doorkeep-index> |
| | | <!-- <selectTarget v-if="roleType == 5" |
| | | ref="LoadUnloadRef"></selectTarget> --> |
| | | <qualityIndex ref="qualityIndexRef" v-if="roleType == 7"></qualityIndex> |
| | | <tab-bar :current="0"></tab-bar> |
| | | <!-- 推送消息弹窗 --> |
| | | <u-modal :show="messagePushShow" |
| | |
| | | import freightForwarderIndex from '@/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue'; |
| | | import LoadUnload from '@/pages/loadUnload-page/loadUnload-page.vue' |
| | | import selectTarget from '@/pages/loadUnload-page/selectTarget/selectTarget.vue' |
| | | import qualityIndex from '@/pages/quality-inspection-page/qualityIndex/qualityIndex' |
| | | import doorkeepIndex from '@/pages/doorkeeper-page/doorkeeper-index/doorkeeper-index.vue'; |
| | | import { mapState, mapMutations } from 'vuex'; |
| | | import { webSocketUrl } from '@/api/request.js'; |
| | | |
| | |
| | | driverIndex, |
| | | freightForwarderIndex, |
| | | LoadUnload, |
| | | selectTarget, |
| | | qualityIndex, //化验 |
| | | doorkeepIndex, |
| | | selectTarget |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | //首页下拉刷新 |
| | | onPullDownRefresh() { |
| | | uni.showLoading({ title: '加载中...' }); |
| | | if(this.roleType!==6){ |
| | | uni.showLoading({ title: '加载中...' }); |
| | | } |
| | | // 获取历史提煤单 |
| | | if (this.roleType == 1 || this.roleType == 2) { |
| | | this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => { |
| | |
| | | this.$store.dispatch('websocketInit') |
| | | this.$store.commit('changeisLogin', true) |
| | | console.log(this.globalisconnect, 'index的ws数据'); |
| | | /* #ifdef MP-WEIXIN */ |
| | | this.userAuthorization(); |
| | | /* #endif */ |
| | | this.messageReq(); |
| | | // 开启双人通话 |
| | | /* #ifdef MP-WEIXIN */ |
| | | wx.setEnable1v1Chat({ |
| | | enable: true, |
| | | backgroundType: 1, |
| | |
| | | console.log('开启双人通话成功Complete'); |
| | | } |
| | | }); |
| | | /* #endif */ |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | init() { |
| | | this.roleType = uni.getStorageSync('roleType'); |
| | | console.log(this.roleType,'this.roleType=====') |
| | | switch (this.roleType) { |
| | | case 1: |
| | | console.log('customerIndexRef'); |
| | |
| | | } |
| | | }); |
| | | break; |
| | | case 7: |
| | | console.log('qualityIndexRef'); |
| | | this.$nextTick(() => { |
| | | console.log(this.count,'count') |
| | | if(this.count <=1){ |
| | | this.$refs.qualityIndexRef.init(); |
| | | } |
| | | }); |
| | | break; |
| | | case 6: |
| | | console.log('doorkeepIndexRef'); |
| | | this.$nextTick(() => { |
| | | this.$refs.doorkeepIndexRef.init(); |
| | | }); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }, |
| | | // 要求用户授权相机/麦克风权限 |
| | | /* #ifdef MP-WEIXIN */ |
| | | userAuthorization() { |
| | | wx.getSetting({ |
| | | success(res) { |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | /* #endif */ |
| | | messageconfirm() { |
| | | this.messagePushShow = false; |
| | | uni.navigateTo({ |