<template>
	<view>
		<view class="timeBox flex justify-between align-center padding-lr-sm">
			<view class="time">火点侦测摄像机</view>
		</view>
		<view class="basic-info">
			<view class="info-tit margin-left-xs">
				<text class="cuIcon-titles margin-right-xs"></text>
				基本信息
			</view>
			<view class="info-content">
				<view class="info-one-info ">
					<text>设备名称：</text>
					<text>{{videoDetail.deviceName}}</text>
				</view>
				<view>
					<text>设备编号：</text>
					<text>{{videoDetail.deviceCode}}</text>
				</view>
				<view>
					<text style="width:auto!important">物联网卡号：</text>
					<text>{{videoDetail.sim}}</text>
				</view>
				<view>
					<text>安装位置：</text>
					<text>{{videoDetail.deviceInstallationPosition}}</text>
				</view>
				<view>
					<text>添加时间：</text>
					<text>{{videoDetail.addTime}}</text>
				</view>
				<view>
					<text>设备地址：</text>
					<text>{{videoDetail.address}}</text>
				</view>
			</view>
		</view>

		<!-- 处理状态start -->
		<view class="processStatus">
			<view class="info-tit margin-left-xs">
				<text class="cuIcon-titles margin-right-xs"></text>
				视频
			</view>
			<view class="padding-lr padding-bottom-lg ">

				<video id="myVideo" :src="videoUrl" style="width:100%" loop="loop" autoplay="autoplay"></video>

				      <!--  <view class="video-js" ref="video" style="text-align:center;width:100%;height:400rpx">  
				
				        </view>  -->
				
			</view>
		</view>
		<!-- 处理状态end -->

	</view>
</template>

<script>
	export default {
		data() {
			return {
				videoDetail: '',
				videoUrl:""

			}
		},
		 onReady() {  
	     
		        },  

		onLoad: function(option) {


			console.log(111)
			console.log(option.deviceCode)
			this.companyCode = option.companyCode
			this.deviceType = option.deviceType
			this.videoUrl = 'http://47.103.74.123/hls/'+option.deviceCode+'.m3u8';
			this.getDeviceDetail({
				"companyCode": option.companyCode,
				"deviceType": option.deviceType,
				"deviceCode": option.deviceCode
			})
			
			
			
			
		},


		methods: {

			async getDeviceDetail(ming = {}) {
				const res = await this.$myRequest({
					url: 'OperationMonitoring/getMonitoringScreen',
					data: ming
				})
				console.log(res.data.data[0])
				this.videoDetail = res.data.data[0]

			},
		}
	}
</script>

<style lang="scss">






</style>
