123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view class="popup-warpper"
- :class="{
- 'popup-warpper-show': isShow
- }"
- >
- <u-overlay
- :show="isShow"
- @click="close"
- v-if="isShow"
- :duration="350"
- :opacity="0.5"
- ></u-overlay>
-
- <view class="popup-container">
- <view class="munes"
- :class="{
- 'events-none': $store.state.realtimeWatch.loading
- }"
- >
- <view v-for="(item,index) in typeList" :key="index"
- class="munes-item"
- :class="{
- 'munes-item-active': item.value == tabStyle
- }"
- @click="handleActive(item)"
- >
- <text>{{item.label}}</text>
- </view>
- </view>
- <eleChoose v-if="tabStyle=='vehicle'" ref="eleChooseRef" :queryType='2' key="vehicle" @getDataed="getDataed"></eleChoose>
- <eleChoose v-else-if="tabStyle=='personnel'" ref="eleChooseRef" :queryType='1' key="personnel" @getDataed="getDataed"></eleChoose>
- </view>
- </view>
- </template>
- <script>
- import {isArray,clone,isObject } from 'lodash'
- import {realTimeList, realTimeMap} from '@/api/realtimeWatch.js'
- import {getImages} from '@/plugins/images'
- import {copyProps,clearProps} from '@/utils/gdtq.js'
- //资源引入
- import eleChoose from './eleChoose.vue'
- export default {
- props: {
- },
- components: {
- eleChoose
- },
- data() {
- return {
- isShow: false,
- tabStyle: 'vehicle',
- typeList: [
- {label: '车辆',value: 'vehicle'},
- {label: '人员',value: 'personnel'},
- ],
- firstLoade: true,
- }
- },
- mounted() {
-
- },
-
- methods: {
- handleActive(item) {
- if(this.tabStyle == item.value) return
- this.tabStyle = item.value
- this.$store.dispatch('setVheicleCheckArr',[])
- this.$store.dispatch('setPeopleCheckArr',[])
-
- },
- show() {
- this.isShow= true;
- },
- getDataed() {
- if(this.firstLoade) {
- setTimeout(() => {
- this.$refs.eleChooseRef.handleChooseAll()
- this.close()
- this.firstLoade = false
- },500)
-
- }
-
- },
- close() {
- this.$refs.eleChooseRef.getChoosed()
- this.isShow = false
- },
-
- },
-
- }
- </script>
- <style lang="scss" scoped>
- .popup-warpper-show {
- bottom: 0 !important;
- }
- .popup-warpper {
- position: fixed;
- bottom: -100vh;
- right: 0;
- width: 100%;
- height: 100vh;
- z-index: 90000;
- transition: all ease 0.35s;
-
- .popup-container {
-
- position: absolute;
- bottom: 0;
- right: 0;
- width: 100%;
- z-index: 90002;
- background: #fff;
- max-height: 85vh;
-
- .munes {
- height: 80rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- background: #fff;
- .munes-item {
- flex: 1;
- height: 100%;
- // background: #F2f2f2;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 30rpx;
- font-weight: bold;
- }
- .munes-item-active {
- // background: #fff;
- color: #2979ff;
- position: relative;
-
- &::after {
- position: absolute;
- bottom: 0;
- content: '';
- width: 50rpx;
- border-bottom: 4rpx solid #2979ff;
- }
- }
- }
-
- }
- }
-
- .choosed-image {
- width: 40rpx;
- height: 40rpx;
- margin-right: 10rpx;
- }
-
- .events-none {
- pointer-events: none;
- }
- </style>
|