123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view class="">
- <view class="cu-list menu-avatar">
- <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceData"
- :key="index" :data-target="'move-box-' + index" @tap="goVideoDetail">
- <view class="cu-avatar round lg" :style="`background-image:url(${item.imgUrl})`" style="opacity:.7"></view>
- <view class="content">
- <view class="">{{item.title}}</view>
- </view>
- <view class="nav-right num">
- <view v-if="item.status=='在线'" class="online" >
- {{item.status}}
- <text class="icon iconfont margin-right-xs margin-left-lg"></text>
- </view>
- <view v-else-if="item.status=='离线'" class="text-gray" >
- {{item.status}}
- <text class="icon iconfont margin-right-xs margin-left-lg"></text>
- </view>
- <view v-else="item.status=='异常'" class="error" >
- {{item.status}}
- <text class="icon iconfont margin-right-xs margin-left-lg"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- deviceData: [{
- status: '离线',
- imgUrl: '../../static/video-icon-off.png',
- title: 'C59360332',
- num: 6
- }, {
- status: '在线',
- imgUrl: '../../static/video-icon-on.png',
- title: 'C59360332',
- num: 11
- },
- {
- status: '异常',
- imgUrl: '../../static/video-icon-error.png',
- title: 'C59360332',
- num: 6
- }
- ],
- modalName: null,
- };
- },
- onLoad:function(option){
- this.getVideoList({'company_code':uni.getStorageSync('selectedCode')})
-
- },
- methods: {
-
- // 视频列表数据请求
- async getVideoList(params = {}) {
- const res = await this.$myRequest({
- url: 'VideoMonitoring/getVideoList',
- data:params,
- showLoading: true
- })
- this.getData=res.data.data;
- console.log(this.getData)
- },
-
- goVideoDetail() {
- uni.navigateTo({
- url: '/pages/videoList/videoDetail/videoDetail',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- }
- }
- </script>
- <style lang="scss">
-
- </style>
|