<template>
  <view class="px-20rpx">
    <view class="bg-white">
      <view class="h-80rpx px-20rpx flex items-center text-bold text-32rpx"
        >监控</view
      >
      <view>
        <u-line></u-line>
      </view>
      <view class="p-20rpx space-y-20rpx">
        <VideoComp
          v-for="(item, i) in list"
          :key="i"
          :id="item.id"
        ></VideoComp>
      </view>
    </view>
  </view>
</template>
<script>
import { http } from '@/api/index.js'
import VideoComp from '@/components/live-video/index1.vue'
export default {
  props: {
    baseId: {
      type: [String, Number],
    },
  },
  components: {
    VideoComp,
  },
  data() {
    return {
      list: [],
    }
  },
  created() {
    this.init()
  },
  methods: {
    async init() {
      try {
        const { data } = await http.get('/api/devices', {
          params: {
            base_id: this.baseId,
            type: 1,
            status: 1,
          },
        })
        const resData = data.data
        this.list = resData
      } catch (error) {}
    },
  },
}
</script>
