index.vue 8.19 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
<template>
	<el-row   :gutter="10" style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden">
		<el-col :span="13" >
			<div id="map" class="maps">
				<showmap ref="map" @playvideo="playvideo"></showmap>
				<div class="eventlist-box">
					<!-- <eventList></eventList> -->
					<devInfo></devInfo>
				</div>
			</div>
	
			<div style="clear: both;"></div>
		</el-col>
		<el-col :span="11">
			<div class="video-box">
				<videoPlay ref="ocx" :playurl="playurl"></videoPlay>
			</div>
			<div class="collect-box">
				<div class="header-title">今日抓拍量</div>
				<div class="collect-content">
					<el-col :span="6" class="content-item">
						<div class="item-num">{{snapData.kakou_total_snap_num}}</div>
						<div>卡口总量</div>
					</el-col>
					<el-col :span="6" class="content-item">
						<div class="item-num">{{snapData.event_total_snap_num}}</div>
						<div>事件总量</div>
					</el-col>
					<el-col :span="6" class="content-item">
						<div class="item-num">{{snapData.illega_total_snap_num}}</div>
						<div>违法总量</div>
					</el-col>
					<el-col :span="6" class="content-item">
						<div class="item-num">{{snapData.key_vehicle_total_snap_num}}</div>
						<div>特殊车辆总量</div>
					</el-col>
				</div>
			</div>
			<div style="clear: both;"></div>
		</el-col>
		<el-col :span="24" class="clearpright">
			<el-row :gutter="12" class="bottom-box">
			<el-col :span="8">
				<div class="bottom-item-box">
					<illegaltrend></illegaltrend>
				</div>
			</el-col>
			<el-col :span="5">
				<div class="bottom-item-box">
					<eventTypedis></eventTypedis>
				</div>
			</el-col>
			<el-col :span="3">
				<div class="bottom-item-box">
						<div class="title">重点车辆分布</div>
						<!-- <div class="car-dis-info" v-for="(item, index) in keyVehicleData" :key="index">
							<div class="left-icon">
								<span class="icon-fanxin-bianzu2"></span>
							</div>
							<div class="right-content">
								<div class="">
									<span class="car-num">{{item.total_num}}</span>
								</div>
								<div>{{item.vehicle_name}}</div>
							</div>
						</div> -->
						<div class="car-dis-info">
								<div class="left-icon">
								<span class="icon-fanxin-bianzu2"></span>
							</div>
							<div class="right-content">
								<div class="">
									<span class="car-num">10</span>
								</div>
								<div>渣土车抓拍</div>
							</div>
						</div>
						<div class="car-dis-info">
								<div class="left-icon">
								<span class="icon-fanxin-bianzu2"></span>
							</div>
							<div class="right-content">
								<div class="">
									<span class="car-num">10</span>
								</div>
								<div>危险品车</div>
							</div>
						</div>
						<div class="car-dis-info">
								<div class="left-icon">
								<span class="icon-fanxin-bianzu2"></span>
							</div>
							<div class="right-content">
								<div class="">
									<span class="car-num">29</span>
								</div>
								<div>重型罐式车</div>
							</div>
						</div>
				</div>
			</el-col>
			<el-col :span="8" class="clearpright">
			<div  class="bottom-item-box">
				<div class="title">实时事件</div>
					<alarmEvent @event = "alarmevent"></alarmEvent>
				</div>
			</el-col>
		</el-row>
		</el-col>
	</el-row>
</template>

<script>
import showmap from './map'
import videoPlay from '../public/videoPlay'
import illegaltrend from './illegaltrend'
import eventTypedis from './eventTypedis'
import eventList from './eventList'
import alarmEvent from './alarmEvent'
import devInfo from '../behaviorShow/devInfo'
	export default{
		data(){
			return{
				typeList:[],
				tableData:[],
				eventTypeList:[],
				keyVehicleData:[],
				illageList:[],
				setShow:false,
				archiveUnid:0,
				snap_num:0,
				playurl:'',
				audit_num:0,
				snapData:{
					illega_total_snap_num:0,
					key_vehicle_total_snap_num:0,
					event_total_snap_num:0,
					kakou_total_snap_num:0,
				}
			}
		},
		components:{
			showmap,
			videoPlay,
			illegaltrend,
			eventTypedis,
			alarmEvent,
			devInfo,
			eventList
		},
		mounted(){
			
		},
		methods:{
			alarmevent(data){
				//移动地图
				this.$refs.map.movemap(data)
			},
			playvideo(data){
					let obj = {};
				if(data.vchan_name == "视频1"){
					obj.rtsp_url=	"rtsp://192.168.9.133:20090/6af6f0f9a445463d8b07273fe538694d"
				} else if(data.vchan_name == "视频2"){
					obj.rtsp_url=	"rtsp://192.168.9.133:20090/68504674201c4490bfe1a9d18c86b6ac"
				}
					this.playurl = obj

				setTimeout(() => {
					this.$refs.ocx.videoPlay()
				}, 0);
			
				// this.$api.device.getFxStream(this.dev_unid, data.vchan_refid).then(res => {
				// 	debugger
				// 	if(res.task_list.length >0) {
				// 			var taskarr = res.task_list;
				// 			let obj = {};
				// 			for(let i = 0; i < taskarr.length; i++){
				// 				if(taskarr[i].rtsp_url !=''){
				// 					obj.rtsp_url = res.task_list[i].rtsp_url
				// 					break;
				// 				}
				// 			}
				// 			this.playurl = obj
				// 			this.$refs.ocx.videoPlay()
				// 		} else {
				// 			  this.$message({
        //         message: '该相机下没有分析任务',
        //         type: 'error'
        //       });
				// 		}
				
				// })
			
			},
			getTrafficSnap(){
				this.$api.show.getTrafficSnap().then(res => {
					this.snapData = res;
				})
			},
			getKeyVehicle(){
				this.$api.show.getKeyVehicle().then(res => {
					this.keyVehicleData = res;
				})
			},

		},
		created(){
			this.getTrafficSnap()
			this.getKeyVehicle()
		}
	}
</script>

<style scoped="scoped" lang="stylus">
	.video-box{
		height: 46.5vh;
		margin-bottom: 1vh;
		background: #444444;
	}
	.collect-box{
		height 11.8vh
		background #fff
		.header-title{
			padding 10px 0px 0 20px
		}
		.collect-content{
			margin-top 1.6vh
			.content-item{
				text-align center
				border-right 1px solid #E5E5E5
			}
			.content-item:last-child{
				border-right 0
			}
		}
		.item-num{
			font-size 16px
			color #444444
		}
	}
	.left-box{
	}
	.infoChild{
		height: 8.5vh;
		display: inline-block;
	}
	.info-item-box{
		height 100%;
		background: #FFFFFF;
	}
	.infoChild:nth-child(1) img{
		width: 27px;
		height: 27px;
		margin: 22px 20px 21px 40px;
	}
	.infoChild:nth-child(2) img{
		width: 30px;
		height: 27px;
		margin: 22px 22px 21px 37px;
	}
	.infoChild:nth-child(3) img{
		width: 28px;
		height: 28px;
		margin: 22px 22px 20px 34px;
	}
	.infoChild:nth-child(4) img{
		width: 27px;
		height: 28px;
		margin: 22px 22px 20px 34px;
	}
	.textCon{
		display: inline-block;
		vertical-align: top;
		font-size: 12px;
		color: #666666;
		margin-top: 14px;
	}
	.textCon span{
		font-size: 20px;
		margin-right: 2px;
	}
	.colorText{
		margin-top: 6px;
		color: #444444;
	}
	.ol-control button{
	  display:none!important;
	  background:red!important
	}
	
	.pop-info{
	  float: left;
	  padding-left: 20px;
	  width :100px
	}

	.numBox{
		width: 307px;
		height: 125px;
		background: #FFFFFF;
		color: #444444;
		position: relative;
	}
	.numBox:nth-child(1){
		margin-bottom: 6px;
	}
	.num{
		font-size: 30px;
		margin: 27px 0 0 13px;
		display: inline-block;
		font-weight:bold;
	}
	.catch{
		width: 57px;
		position: absolute;
		top:59px;
		right: 16px;
	}
	.backSea{
		width: 100%;
		position: absolute;
		bottom: 0;
		left: 0;
	}


	.ltext{
		width: 71px;
		height: 100%;
		border-right:1px solid #E5E5E5;
	}
	.lnum{
		width: 37px;
	}
	.maps{
	  height: 59.3vh;
	  width:100%;
	  margin-bottom: 8px;
	  position: relative;
	}
	
	.el-table__body tr{
		background: #FFFFFF!important;
	}
	.bottom-box{
		width: 100%;
		height: 26.5vh;
		overflow: hidden;
	}
	.bottom-item-box {
		height: 27vh;
		background: #fff;
		overflow: hidden;
	}
	.bottom-item-box .title{
		padding-left: 5px;
		line-height 3vh
	}
	.car-dis-info{
		display flex
		flex-direction row
		margin 1vh .3vw
		.left-icon {
			width 3vw
			height 6vh
			line-height 6vh
			text-align center
			span{
				font-size 30px
			}
		}
	}
	.car-dis-info:nth-child(2){
		.left-icon {
			span{
				color #FF9630
			}
		}
	}
	.car-dis-info:nth-child(3){
		.left-icon {
			span{
				color #F56C6C
			}
		}
	}
	.car-dis-info:nth-child(4){
		.left-icon {
			span{
				color #36BEA6
			}
		}
	}
	.car-num{
		font-size 22px
		font-weight 600
		padding-right 5px
	}
	.eventlist-box{
		position absolute
		left 10px
		top 10px
		z-index 1000
}
	
</style>