index.vue 109 KB
Newer Older
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
<template>
	<div class="Screen cm-layout">
		<div class="a_0">
			<div id="cesiumContainer" class="cesium-ctn"></div>
			<div class="a0_">
				<header>
					<div class="b1_bg">
						<h2>宫家北饰面花岗岩矿山综合管理平台</h2>
					</div>
					<div class="a0a_" id="a0a_">
						<ul>
							<li data-id="0" :class="{'active':navActive === 0}"></li>
							<!-- <li data-id="1" :class="{'active':navActive === 1}"></li>
							<li data-id="2" :class="{'active':navActive === 2}"></li> -->
							<li data-id="4" :class="{'active':navActive === 4}"></li>
						</ul>
						<ul>
							<li data-id="3" :class="{'active':navActive === 3}"></li>
							<li data-link="goback"></li>
							<!-- <li><font class="date">02-24 12:56</font></li> -->
						</ul>
					</div>
				</header>
			</div>
		</div>
		<div class="b_0">
			<section class="b0_" id="b0_">
				<div class="b0_a" :class="{'active':navActive === 0}" id="b0_a" data-id="0" >
					<div class="side b0_left">
						<div class="a-md5" id="amd5">
							<div class="abs-full">
								<h4>设备实时状态总览</h4>
								<div class="ct-box">
									<div class="wrap shadow1">
										<ul>
											<li v-for="item in view0.realTime">
												<div class="chart" :data-num="item.count/(item.count+item.online)*100"></div>
												<dl>
													<dt>{{item.name}}</dt>
													<dd>
														<span>在线:</span>
														<font>{{item.online}}</font>
													</dd>
													<dd>
														<span>离线:</span>
														<font>{{item.count-item.online}}</font>
													</dd>
												</dl>
											</li>
										
										</ul>
									</div>
								</div>
							</div>
						</div>
						<div class="a-md1">
							<div class="abs-full">
								<h4>产量总览(m³)</h4>
								<div class="ct-box">
									<div class="wrap">
										<div class="col" v-for="item in view0.production">
											<span>{{item.name}}</span>
											<font>{{item.num}}</font>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<!-- <div class="alarm-view" id="alarm">
						<div class="fixd">
							<span class="lable">报警信息:</span>
							<div class="scroll-msg photo-frame">
								<div class="in-box" id="scrollMsg">
									<ul>
										<li v-for="item in view0.alarmList">
											<h5><i ></i>{{item.name}}</h5>
											<span>{{view0.Dict.alarmmodule[item.alarmmodule][item.type]}}</span>
											<font>{{item.time}}</font>
										</li>
									</ul>
								</div>
							</div>
						</div>
					</div> -->
					<div class="side b0_right">
						<div class="a-md2" id="amd2">
							<div class="abs-full">
								<h4>人员在线统计(周模拟数据)</h4>
								<div class="ct-box">
									<div class="wrap shadow1">
									</div>
								</div>
							</div>
						</div>
						<div class="a-md3" id="amd3">
							<div class="abs-full">
								<h4>环境监测实时数据</h4>
								<div class="item_2 shadow1">当前降雨量:<font class="num_blue1">{{view0.envir.rgdata}}</font> mm</div>
								<div class="ct-box shadow1">
									<!-- <div class="info">
										<span class="el-icon-location" style="cursor:pointer;">{{view0.envir.name}}</span>
										<font class="num_blue1">{{view0.envir.time}}</font>
									</div> -->
									<div class="ctn">
										<ul>
											<li>
												<div>
													<span>{{view0.envir.data.statusDev}}</span>
													<font></font>
												</div>
												<p>连接状态</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.ws}}</span>
													<font>s</font>
												</div>
												<p>风速</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.ta}}</span>
													<font>°C</font>
												</div>
												<p>温度</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.pa}}</span>
													<font>kpa</font>
												</div>
												<p>大气压</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.pm25}}</span>
													<font>ug/m3</font>
												</div>
												<p>PM2.5</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.noises}}</span>
													<font>db</font>
												</div>
												<p>噪音</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.pm10}}</span>
													<font>ug/m3</font>
												</div>
												<p>PM10</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.ua}}</span>
													<font>%</font>
												</div>
												<p>湿度</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.wd}}</span>
													<font></font>
												</div>
												<p>风向</p>
											</li>
										</ul>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_d" :class="{'active':navActive === 3}" id="b0_d" data-id="3">
					<div class="side b0_left">
						<div class="a-md20" id="amd20">
							<div class="abs-full">
								<h4>降雨量变化趋势图(日)</h4>
								<div class="ct-box shadow1">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
						<div class="a-md21" id="amd21">
							<div class="abs-full">
								<h4>表面位移变化量(周)</h4>
								<div class="item_2 shadow1">
									<span class="md-name el-icon-caret-bottom">表面位移1</span>
								</div>
								<div class="ct-box shadow1">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="side b0_right">
						<!-- <div class="a-md4 a-md22" id="amd22">
							<div class="abs-full">
								<h4>在线监测报警实时列表</h4>
								<div class="ct-box shadow1">
									<ul>
										<li>
											<span>{{view3.alarmString.alarmtotal}}</span>
											<font>报警总数</font>
										</li>
										<li>
											<span>{{view3.alarmString.jcalarmtotal}}</span>
											<font>已处理</font>
										</li>
										<li>
											<span>{{view3.alarmString.wjcalarmtotal}}</span>
											<font>未处理</font>
										</li>
									</ul>
									<div>
										<dl class="scrolling4">
											<dt>
												<span>报警设备</span>
												<span>设备类型</span>
												<span>报警时间</span>
												<span>状态</span>
											</dt>
											<dd v-for="item in view3.alassData">
												<span>{{item.name}}</span>
												<span>{{view3.alarm[item.type]}}</span>
												<span>{{item.time}}</span>
												<span v-if="item.state=== 1" class="red">报警中</span>
												<span v-if="item.state=== 2" class="blue">已解除</span>
											</dd>
										</dl>
									</div>
								</div>
							</div>
						</div> -->
						<div class="a-md3 a-md23" id="amd23">
							<div class="abs-full">
								<h4>环境监测实时数据</h4>
								<div class="item_2 shadow1">当前降雨量:<font class="num_blue1">{{view0.envir.rgdata}}</font> mm</div>
								<div class="ct-box shadow1">
									<!-- <div class="info">
										<span class="el-icon-location" style="cursor:pointer;">{{view0.envir.name}}</span>
										<font class="num_blue1">{{view0.envir.time}}</font>
									</div> -->
									<div class="ctn">
										<ul>
											<li>
												<div>
													<span>{{view0.envir.data.statusDev}}</span>
													<font></font>
												</div>
												<p>连接状态</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.ws}}</span>
													<font>s</font>
												</div>
												<p>风速</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.ta}}</span>
													<font>°C</font>
												</div>
												<p>温度</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.pa}}</span>
													<font>kpa</font>
												</div>
												<p>大气压</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.pm25}}</span>
													<font>ug/m3</font>
												</div>
												<p>PM2.5</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.noises}}</span>
													<font>db</font>
												</div>
												<p>噪音</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.pm10}}</span>
													<font>ug/m3</font>
												</div>
												<p>PM10</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.ua}}</span>
													<font>%</font>
												</div>
												<p>湿度</p>
											</li>
											<li>
												<div>
													<span>{{view0.envir.data.wd}}</span>
													<font></font>
												</div>
												<p>风向</p>
											</li>
										</ul>
									</div>
								</div>
							</div>
						</div>
						<div class="a-md24" id="amd24">
							<div class="abs-full">
								<h4>环境监测趋势图(日)</h4>
								<div class="item_2 shadow1">
									<select>
									</select>
								</div>
								<div class="ct-box shadow1">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_e" :class="{'active':navActive === 4}" id="b0_e" data-id="4">
					<div class="side b0_left"></div>
					<!-- <div class="side-footer">
						<div class="area-ctrl">
							<dl>
								<dt>
									<span>区域划分</span>
									<span class="switch"></span>
								</dt>
							</dl>
						</div>
					</div> -->
					<div class="side b0_right">
						<div class="a-md10 a-md40" id="amd40">
							<div class="abs-full">
								<div class="ct-box shadow1">
									<div class="wrap">
										<dl class="scrolling4">
											<dt>
												<span>文件名</span>
												<span>预览</span>
											</dt>
											<dd v-for="item in view4.modelList" :data-name="item.filePath">
												<span>{{item.name}}</span>
												<span><a class="el-icon-view"></a></span>
											</dd>
										</dl>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</section>
		</div>
	</div>
</template>

<script>
import { Tools } from '@/assets/js/common.js';
import { reqApi } from '@/assets/js/httpApi.js';
import { Highchart } from '@/assets/js/chartTemplates.js';
import { CoordTransform } from '@/assets/js/CoordTransform.js';
import { getToken, setToken, removeToken } from '@/utils/auth';
import { encrypt } from '@/utils/rsaEncrypt';
xinzhedeai's avatar
xinzhedeai committed
379
import { openAlarm, closeAlarm } from '@/api/alarmEquCtrl.js';
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 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459

export default {
	data() {
		return {
			navActive:null,
			view0:{
				//产量总览
				production:[],

				//报警总览
				alarmOver:{},
				alarmList:[],
				// 环境监测
				envir:{
					data:{
					},
				},
				//设备实时状态总览
				realTime:[],
				Dict:{
					// 全局报警字典
					alarmmodule:{
						1:{
							1:'电子围栏',
							2:'求救报警',
							3:'电池欠压',
						},
						2:{
							1:'限入电子围栏报警',
							2:'限出电子围栏报警',
							3:'无故停车报警',
							4:'防碰撞预警',
						},
						3:{
							3:'表面位移',
							6:'降雨量',
						},
					},
				}
			},
			view3:{
				videoList:[],
				alarmString:{},
				alassData:[],
				alarm:{
					3:'表面位移',
					6:'降雨量',
				},
				envir:{
					data:{},
				},
				envirTypes: [
					{name:'风速', value:'ws'},
					{name:'温度', value:'ta'},
					{name:'大气压', value:'pa'},
					{name:'PM2.5', value:'pm25'},
					{name:'TSP', value:'tsp'},
					{name:'PM10', value:'pm10'},
					{name:'湿度', value:'ua'},
					{name:'风向', value:'wd'},
				],
				envirTypeDict:{
					'ws':'s',
					'ta':'°C',
					'pa':'kpa',
					'pm25':'ug/m3',
					'tsp':'ug/m3',
					'pm10':'ug/m3',
					'ua':'%',
					'wd':'',
				},
			},
			view4:{			// 采矿管理
				modelList:[],
				areaEvent:0,
			},
			title:'',
			finishNum:706,
			monitorNum:40,
			areaSwitchFalg:false,
forevertyler's avatar
forevertyler committed
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
			personnelList:[
				{
					longitude: 121.70710830038986,
					latitude: 36.853636402927986,
					height: 100,
					name: "张三",
					status: "online", // 在线
					avatar: "/static/images/avatars/zhangsan.png", // 头像
				},
				{
					longitude: 121.70810830038986,
					latitude: 36.854636402927986,
					height: 100,
					name: "李四",
					status: "offline", // 离线
					avatar: "/static/images/avatars/lisi.png", // 头像
				},
				// 其他人员数据...
			]
479 480 481 482 483 484 485 486
		}
	},
	mounted() {
		var that = this;
		this.$nextTick(() => {
			var views = that.$el.querySelectorAll("#b0_>div");
			var a0a_ = that.$el.querySelector("#a0a_");

forevertyler's avatar
forevertyler committed
487 488 489 490 491 492 493 494 495 496 497 498

			// var handler = new Cesium.ScreenSpaceEventHandler(that.viewer.scene.canvas);
			// handler.setInputAction(function(movement) {
			// 	var pickedObject = that.viewer.scene.pick(movement.endPosition);
			// 	if (Cesium.defined(pickedObject) && pickedObject.id && pickedObject.id.description) {
			// 		// 显示人员信息
			// 		var description = pickedObject.id.description;
			// 		that.showPersonInfo(description);
			// 	}
			// }, Cesium.ScreenSpaceEventType.LEFT_CLICK);


499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677
			// header 事件控制
			qf.funchain(function(start, t, f){
				var m = this;
				t.models = {}, m.setTagModel = function(id, prevId){
					m.prevModel = t.models[prevId]; m.prevModel && m.prevModel.unload && m.prevModel.unload();
					m.tagModel = t.models[id];m.tagModel.reload && m.tagModel.reload();
				};

				// LOCAL_API
				t.LOCAL_API = process.env.VUE_APP_LOCAL_API;

				m.login = function(param){
					return reqApi.common.requst('post', t.LOCAL_API + '/auth/login', param);
				};

				m.setToken = function(key){
					var tokenExpires = new Date(new Date()*1 + 43200000);		// 12小时
					//that.$route.query.key && setToken(that.$route.query.key, true, tokenExpires);
					key && setToken(key, true, tokenExpires);
				};
				m.init = function(){
					that.navActive = 0;
					//that.createCesium();
					/* m.first(); */ f(that.navActive), setTimeout(() => {m.tagModel = t.models[0];},500);
					
					// Event
					a0a_.onclick = function(e){
						var tag = e.target || e.srcElement;
						if(tag.dataset.id){
							var id = ~~tag.dataset.id;
							if(id === that.navActive){
								if(id === 4){
									that.navActive = void 0;
									t.models[id].unload()
								}else{
									views[id] && views[id].classList.add('close');
									setTimeout(() => {that.navActive = void 0;}, 350);
								};
							}else{
								var prevId = that.navActive;
								that.navActive = id;
								t.models[id] ? m.setTagModel(id, prevId) : setTimeout(() => {start(id);m.setTagModel(id, prevId);}, 300);
							};
						}else if(tag.dataset.link){
							var sysurl = 'http://' + location.hostname + ':' + process.env.VUE_APP_SYS_PORT;
							window.location.href = sysurl;
						};
					};
					
					// 计时刷新
					var timerA = new qf.Async.intervalLoop(60000, function(){
						(m.tagModel && m.tagModel.timerUpdate || function(){})()
					}, function(){
						(m.tagModel && m.tagModel.timerUpdate || function(){})()
					});

					// resize
					qf.resize(function(){
						setTimeout(() => {
							(m.tagModel && m.tagModel.resize || function(){})()
						}, 380);
					});

					// map Evnet
					var mEvent = fg3d.Event.leftClick(function(e){
						var pick = that.viewer.scene.pick(e.position);
						if(pick && pick.id){
							m.tagModel.mapClick && m.tagModel.mapClick(pick)
						};
					});
				};

				// 登录权限获取
				(t.getInfo = function(){
					var url = t.LOCAL_API + '/auth/info';
					return reqApi.common.requst.call(that.$route, 'get', url).then((res)=>{
						that.createCesium();
						if(!res.error && res.user){
							m.init();
						}else{
							m.loginView = qf.UI.popWindow({
								cover:true,
								coverFull: true,
								//container:b0_e,		// id || Element对象
								backgroundColor:'rgba(0,0,0,.4);backdrop-filter:blur(15px);',
								closeEvent:true,
								html:'<div style="height:100%;width:100%;background-color:rgba(0,0,0, .75);border-radius:.3rem;display:flex;justify-content:center;align-items:center;box-shadow: 0 0 0.10rem 0.06rem rgba(16, 88, 148, .8);"></div>',
								onload: function(v){
									m.loginView = v;
									var el = v.el;
									v.setStyle(v.Wrap, {height:'6rem', width:'6rem', zIndex:10});
									el.innerHTML = '<div class="ctn-place" ><div class="inbox-range"><div class="ctn-fix"><form class="el-form login-form el-form--label-left"><h3 class="title">乳山瑞博</h3><h3 class="title t-last">智慧矿山管理平台</h3><div class="el-form-item is-required el-form-item--small"><div class="el-form-item__content" style="margin-left: 0px;"><div class="el-input el-input--small el-input--prefix"><input type="text" autocomplete="off" placeholder="账号" class="el-input__inner"><span class="el-input__prefix el-icon-s-custom"></span></div><div class="el-form-item__error">用户名不能为空</div></div></div> <div class="el-form-item is-required el-form-item--small"><div class="el-form-item__content" style="margin-left: 0px;"><div class="el-input el-input--small el-input--prefix"><input type="password" autocomplete="off" placeholder="密码" class="el-input__inner"><span class="el-input__prefix el-icon-key"></span></div><div class="el-form-item__error">密码不能为空</div></div></div> <div class="el-form-item el-form-item--small" style="width: 100%;"><div class="el-form-item__content" style="margin-left: 0px;"><button type="button" class="el-button el-button--primary el-button--medium" style="width: 100%;">登 录</button></div></div></form></div></div></div>';
									
									// 校验
									m.loginView.check = function(el){
										if(qf.trim(el.value)){
											el.parentNode.nextElementSibling.classList.remove('open');
											return 1;
										}else{
											el.parentNode.nextElementSibling.classList.add('open');
											el.focus()
										};
									};

									m.loginView.inputs = el.querySelectorAll("input");
									for(var el of m.loginView.inputs){
										el.onblur = function(e){
											var tag = e.target || e.srcElement;
											m.loginView.check(tag);
										}
									};

									m.loginView.loginCheck = function(){
										var inputs = m.loginView.inputs;
										var username = inputs[0], password = inputs[1];
										if(m.loginView.check(username) && m.loginView.check(password)){
											var param = {
												username: username.value, password: encrypt(password.value)
											};
											var l1 = qf.UI.loading({zIndex:2051, timer:10000});
											m.login(param).then((res)=>{
												l1.close();
												if(res.token && res.user){
													m.init();
													m.setToken(res.token);
													m.loginView.remove();
												}else{
													new qf.UI.Notify({
														zIndex:2050,
														type: 'warning',
														duration: 3000,
														autoOpen:true,
														message: res.message,
													});
												};
											});
										};
									};

									// 回车事件
									m.loginView.keyup = function(e){
										if(e.keyCode === 13){
											m.loginView.loginCheck();
										};
									};
									window.addEventListener('keyup', m.loginView.keyup);
								},
								click: function(tag){
									if(tag.nodeName === 'BUTTON'){
										m.loginView.loginCheck();
									};
								},
								close: function(e){
									window.removeEventListener('keyup', m.loginView.keyup);
									delete m.loginView
								},
							});
						};
					});
				})();
			}, (function(){
				var arr = [], panels = [];
				for(var view of views){
					var id = ~~view.dataset.id;
					panels[id] = view;
					var f = function(t, f, i){
						f('init').models[i] = that['module'+i](this, t, f, i, panels[i]);
					}; id ? arr[id] = f : arr.push(f);
				}; return arr
			})());

			// 禁右键
			document.addEventListener('contextmenu', function(e){
				if(e.button == 2){
					e.preventDefault();
					return false
				}
			});
		});
forevertyler's avatar
forevertyler committed
678

679 680
	},
	methods: {
forevertyler's avatar
forevertyler committed
681 682 683 684 685 686 687 688 689 690 691
		showPersonInfo(description) {
			// 使用 Cesium 的 InfoBox 显示信息
			this.viewer.selectedEntity = this.viewer.entities.add({
				description: description,
			});
			this.viewer.infoBox.frame.sandbox = "allow-same-origin allow-top-navigation allow-pointer-lock allow-popups allow-forms allow-scripts";
			this.viewer.infoBox.frame.src = "about:blank";
			this.viewer.infoBox.frame.contentDocument.write(description);
			this.viewer.infoBox.frame.contentDocument.close();
			this.viewer.infoBox.viewModel.showInfo = true;
		},
692
		module0(m, t, f, dmIndex, view){		// 数据总览
forevertyler's avatar
forevertyler committed
693
			// console.log(m,t,f,dmIndex,'数据总览')
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724
			var self = this, Catch = {}, viewData = self['view'+dmIndex];
			var mediaUrlHost = process.env.VUE_APP_liveQing;

			// amd2
			var wrap2 = this.$el.querySelector("#amd2 .wrap");
			var amd3 = self.$el.querySelector("#amd3");
			
			var modelAlarmOptons = [
				{
					/* fillColor: Cesium.Color.BLACK,
					backgroundColor: new Cesium.Color(1, 1, 1, 0.7),
					WaveColor: Cesium.Color.fromCssColorString('#09FD77'), */
					fillColor: Cesium.Color.WHITE,
					backgroundColor: new Cesium.Color(0.0, 0.486, 0.650, .8),
					WaveColor: Cesium.Color.fromCssColorString('#09FD77'),
				},
				{
					fillColor: Cesium.Color.WHITE,
					backgroundColor: Cesium.Color.RED,
					WaveColor: Cesium.Color.fromCssColorString('#ff0000'),
				}
			];

			return (function(){
				// 主模块视角
				t.loadViewVisual = function(){
					// 删除数据
					self.Entities.removeAll();
					
					// 创建模型
					m.createModel();
forevertyler's avatar
forevertyler committed
725
					m.createPersonModel();
726 727 728
				};

				m.initDeviceVisual = function(){
forevertyler's avatar
forevertyler committed
729
					// m.openVisual();
730 731 732

					setTimeout(() => {
						m.createModel();
forevertyler's avatar
forevertyler committed
733
						m.createPersonModel();
734 735 736 737
					}, 1500);
				};

				// 视角
forevertyler's avatar
forevertyler committed
738 739 740 741 742 743 744 745 746 747 748
				// m.openVisual = function(){
				// 	fg3d.Assist.flyToLnglat({
				// 		longitude:'121.70710830038986',
				// 		latitude:'36.853636402927986',
				// 		height:'1000',
				// 		heading:'0',
				// 		pitch:Cesium.Math.toRadians(-45),
				// 		// roll:'6.283179332387251',
				// 		duration: 1.5,
				// 	});
				// };
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896

				// 创建模型
				m.createModel = function(){
					// 边坡设备列表
					m.equipdataList().then(function(list){

						//m.clearpreUpdateCallback();
						m.bgEntities = m.bgEntities || {};
						for(var item of list){
							var lng = item.longitude * 1;
							var lat = item.latitude * 1;
							var height = item.height * 1;
							var point = item.point, position = Cesium.Cartesian3.fromDegrees(lng, lat, height);
							var url = item.url;
							var pixelOffsetX = item.pixelOffsetX || 0;
							var eyeOffsetX = item.eyeOffsetX || 3;

							if(item.devicetype === "3"){
								url = "/static/glb/logo_gnss.glb";
								item.orientation = -4.3;
							}else if(item.devicetype === "6"){
								url = "/static/glb/logo_yuliangji.glb";
								item.orientation = -5.0;
							};

							var modelColor = modelAlarmOptons[item.isAlarm];
							var entity = self.viewer.entities.add({
								position: position,
								orientation: Cesium.Transforms.headingPitchRollQuaternion(position, new Cesium.HeadingPitchRoll(item.orientation, 0, 0.0)),
								'model': {
									'uri': url,
									'scale': 1.01,
									'shadows':'ENABLED',
									'color':Cesium.Color.WHEAT,
									//'colorBlendMode':'HIGHLIGHT',
									//'colorBlendAmount':0.1,
									//'lightColor':Cesium.Color.RED,
								},
								viewFrom: new Cesium.Cartesian3(50.0, -50.0, 50.0),
								//字体标签样式
								label: {
									text: item.equipname,
									font: 'normal 28px sans-serif' || 'normal 28px MicroSoft YaHei',
									scale:0.5,
									color: Cesium.Color.WHITE,
									//style: Cesium.LabelStyle.FILL_AND_OUTLINE,		// 字体边框
									showBackground: true,
									heightReference: 0,
									horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
									verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
									distanceDisplayCondition: new Cesium.DistanceDisplayCondition(10.0, 8000.0),
									disableDepthTestDistance: 2500.0,
									// 按像素偏移	(左右、上下)
									pixelOffset: new Cesium.Cartesian2(pixelOffsetX, 0),
									// 按视觉偏移, 距离越近越接近偏移值 (左右、上下)
									eyeOffset : new Cesium.Cartesian2(0, 5.5),
									fillColor: modelColor.fillColor,
									backgroundColor: modelColor.backgroundColor,
									//backgroundPadding: new Cesium.Cartesian2(15, 10),
									//pixelOffsetScaleByDistance:new Cesium.NearFarScalar (10, 10, 100),
								},
							});
							entity.info = item;
							m.bgEntities[item.equipno] = entity;

							// 监测效果
							entity.Wave = new fg3d.Materials.Circles.RadarRipple({
								position:position,
								semiMajorAxis: 20.0,
								semiMinorAxis: 20.0,
								color: new Cesium.Color(0.8, 0.0, 0.8, 0.8),
								duration: 10.0,
								glConfig:{
									trailing: '1.8',			// 拖尾
									density: '360.0',			// 波纹密度
									rippleWidth:'0.6',			// 波纹宽度
								},
							});

							/* canvase 弹出层
							var position2 = Cesium.Cartesian3.fromDegrees(lng, lat, height+6);
							m['Billboard' + item.equipno] = new fg3d.Plugins.Billboard(position2, {
								src:'/static/images/frame1-min.png',
								scale:0.8,
								width:425,
								height:266,
								fontSize:50,
								fontX:10,
								fontY:50,
								text:item.equipname,
							}); */
						};
						
						// 启用动画
						m.enableAlarmEffect();
					});
				};

				// 启用动画
				m.enableAlarmEffect = function(){
					m.clearpreUpdateCallback = self.viewer.scene.preUpdate.addEventListener(function(){
						for(var key in m.bgEntities){
							var entity = m.bgEntities[key];
							var isAlarm = entity.info.isAlarm, label = entity.label;
							if(isAlarm){
								var _value = label.backgroundColor._value;
								label.range = (label.range || 9000) % 18000;
								var moment = 9000-Math.abs(9000 - (label.range+=200));
								var level = moment / 10000;
								_value.alpha = 0.1 + level;
							}
						};
					});
				};

				// 更新模型监测数据
				m.updateModelData = function(){
					m.equipdataList().then(function(list){
						for(var item of list){
							var entity = m.bgEntities[item.equipno];
							entity && (entity.info = item);
							var modelColor = modelAlarmOptons[item.isAlarm];
	
							entity.label.fillColor.setValue(modelColor.fillColor);
							entity.label.backgroundColor.setValue(modelColor.backgroundColor);
							//entity.Wave.Entity.color.setValue(modelColor.WaveColor);

							if(entity.infoWindow){
								m.updateWindowContent(entity.md, entity.info);
							};
						};
					});
				};

				// 边坡设备列表
				m.equipdataList = function(){
					return reqApi.common.requstEdge('get', '/tab/Monitoring/equipdata', {}).then((res)=>{
						var list = res.body || [];
						return list;
					});
				};

				// 边坡设备信息
				m.bprealdata = function(devicetype, equipno){
					return reqApi.common.requstEdge('get', '/tab/Monitoring/bprealdata', {devicetype:devicetype, equipno:equipno}).then((res)=>{
						return res.body || []
					});
				};
forevertyler's avatar
forevertyler committed
897 898 899
				// 批次号管理(每次定时器触发时生成一个新的批次号)
				let currentBatch = 0;
				const batchMap = {};
forevertyler's avatar
forevertyler committed
900 901 902

				// 创建人员定位卡模型
				m.createPersonModel = function() {
forevertyler's avatar
forevertyler committed
903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967
						// 保存interval ID以便后续清除
						if (!m.personModelInterval) {
								m.personModelInterval = setInterval(() => {
										currentBatch++; // 每次定时器触发,生成新的批次号

										// console.log(m.bgEntities, '(m.bgEntities)');

										// 清除旧实体(只清除当前批次的实体)
										if (m.bgEntities) {
												for (let key in m.bgEntities) {
														if (m.bgEntities.hasOwnProperty(key)) {
																const entity = m.bgEntities[key];
																// 检查实体是否属于当前批次
																if (entity.batch === currentBatch - 1) {
																		self.viewer.entities.remove(entity);
																		delete m.bgEntities[key];
																}
														}
												}
										}

										m.personCardList().then(function(list) {
												// console.log(list, 'list');
												let perList = list; // 使用全部人员数据

												// 创建新实体
												for (let item of perList) {
														let lng = Number(item.lng);
														let lat = Number(item.lat);
														let height = Number(item.hight);
														let position = Cesium.Cartesian3.fromDegrees(lng, lat, height);
														let url = "/static/images/poi-marker-default.png";
														let entity = self.viewer.entities.add({
																		position: position,
																		label: {
																						text: item.perName,
																						font: 'normal 28px sans-serif',
																						scale: 0.5,
																						color: Cesium.Color.WHITE,
																						showBackground: true,
																						horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
																						verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
																						distanceDisplayCondition: new Cesium.DistanceDisplayCondition(10.0, 8000.0),
																						disableDepthTestDistance: 2500.0,
																						heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
																						pixelOffset: new Cesium.Cartesian2(0, -35),
																						fillColor: Cesium.Color.WHITE,
																						backgroundColor: new Cesium.Color(0.0, 0.486, 0.650, 0.8),
																		},
																		billboard: {
																						image: url,
																						scale: 0.5,
																						heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
																						distanceDisplayCondition: new Cesium.DistanceDisplayCondition(10.0, 8000.0),
																						horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
																						verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
																		},
																		description: `<div><h4>${item.perName}</h4></div>`,
														});
														entity.info = item;
														entity.batch = currentBatch; // 标记当前批次
														m.bgEntities[item.perName] = entity; // 存储新实体
												}
										});
								}, 10000);
forevertyler's avatar
forevertyler committed
968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997
						}
				};
				// 更新人员定位卡模型监测数据
				m.updatePersonModelData = function(){
					m.personCardList().then(function(list){
						for(var item of list){
							// var entity = m.bgEntities[item.equipno];
							// entity && (entity.info = item);
							// var modelColor = modelAlarmOptons[item.isAlarm];
	
							// entity.label.fillColor.setValue(modelColor.fillColor);
							// entity.label.backgroundColor.setValue(modelColor.backgroundColor);
							//entity.Wave.Entity.color.setValue(modelColor.WaveColor);

							if(entity.infoWindow){
								m.updateWindowContent(entity.md, entity.info);
							};
						};
					});
				};
				// 人员定位卡列表
				m.personCardList = function(){
					return reqApi.common.requstEdge('get', '/api/per/screen/real', {}).then((res)=>{
						var listPersonCard = res.body || [];
						return listPersonCard;
					});
				};

				// 添加人员定位卡窗口内容
				m.updatePersonWindowContent = function(md, item){
forevertyler's avatar
forevertyler committed
998 999
					// console.log(md, item,'md, item')
					
forevertyler's avatar
forevertyler committed
1000 1001 1002 1003
				};
				// 打开人员定位卡驱动窗口
				t.openPersonWindow = function(entity){
					var info = entity.info;
forevertyler's avatar
forevertyler committed
1004
					// console.log(info,'!!!!!!!!')
forevertyler's avatar
forevertyler committed
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026
					if(info && !entity.infoWindow){
						var position = entity.position._value;

						var popClass = info.isAlarm ? 'popupBgImage BgAlarm' : 'popupBgImage';
						
						// 生成窗口
						var popWindow = m['popWindow' + info.equipno] = qf.UI.popWindow({
							name:'',
							pointer:{
								point:'bottom',
								show:true,
								x:68,
							},
							closeButton:{},
							close: function(){
								entity.infoWindow.remove();
								delete entity.infoWindow;
								delete m['popWindow' + info.equipno];
							},
							container:document.createElement('div'),		// id || Element对象
							html:'<div class="'+popClass+'" style="color:#fff;width:150px;font-size:15px;padding:10px;"></div>',
							onload: function(md){
forevertyler's avatar
forevertyler committed
1027
								// console.log(md,'md')
forevertyler's avatar
forevertyler committed
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049
								var equipno = info.equipno;
								md.type = info.devicetype;
								if(equipno){
									m.updatePersonWindowContent(md, info);

									entity.md = md;
									// 创建窗口
									entity.infoWindow = new fg3d.Plugins.View(position, md.Wrap, {
										render: function(){
											return {
												position:position,
												y:-60,
												x:-75,
											};
										},
									});
								};
							},
						});
					};
				};

1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
				// 环境监测设备列表
				t.envirDeviceList = function(){
					return Catch.envirDevices && new Promise(function(a, b){return a(Catch.envirDevices)}) || reqApi.common.requstEdge('get', '/tab/datascreen/enviequip', {}).then((res)=>{
						return Catch.envirDevices = res.body || {};
					});
				};

				// 环境监测数据
				t.envirData = function(mn){
					Catch.mn = mn || Catch.mn;
					return reqApi.common.requstEdge('get', '/tab/datascreen/envirealdata', {mn:Catch.mn}).then((res)=>{
						var body = res.body || {};
						var envidata = body.envidata;
						viewData.envir.data = envidata;
						viewData.envir.name = envidata.deviceName;
						viewData.envir.time = envidata.time.replace('-', '@').split('@')[1];
						viewData.envir.rgdata = body.rgdata;
					});
				};
				// 环境监测模块
				m.EnvirMonitor = function(){
					t.envirDeviceList().then(function(list){
						var mn = list[0].mn;
						t.envirData(mn);

						// 激活事件
						var local = amd3.querySelector(".el-icon-location");
						local && (local.onclick = function(e){
							var tagEl = e.target || e.srcElement;
							if(!Catch.amd3 || !Catch.amd3.show){
								var checkValue = tagEl.dataset.value || mn;
								var html = qf.UI.checkListRender({
									type:"radio",
									list: list,
									select:[checkValue],
									name:'deviceName',				// name 字段名
									value:'mn',						// value 字段名
								});

								// 创建窗口
								Catch.amd3 = qf.UI.popWindow({
									container:tagEl.parentNode,		// id || Element对象
									pointer:{
										show:true,
										point:'left',
										x:0,
									},
									closeButton:{
										horizontal:'right',
										vertical:'top',
									},
									html:'<div style="color:#fff;height:2rem;width:3.5rem;border:1px solid #3EB7EA;background-color:rgba(0,0,0, .5);padding:.15rem;text-align:left;">sdfsdf</div>',
									onload: function(m){
										var el = m.el;
										m.setStyle(m.Wrap, {top:'0rem', left:'2.80rem', zIndex:10});
										
										// 事件
										el.onclick = function(e){
											var tag = e.target || e.srcElement;
											if(tag.nodeName === 'INPUT'){
												Catch.amd3.remove();
												tagEl.dataset.value = tag.value;
												t.envirData(tag.value);
											};
										};
										el.innerHTML = html;
									},
								});
							};
						});
					});
				};
				
				// 设备实时状态总览
				m.deviceRealtime = function(){
					reqApi.common.requstEdge('get', '/tab/datascreen/devicestatus', {}).then((res)=>{
						var list = res.body || [];
						viewData.realTime = list;
						setTimeout(()=>{
							var md5charts = amd5.querySelectorAll(".chart");
							var colors = [
								{styleColor:'#30d7f7', shadowColor:'#5bc2d1'},
								{styleColor:'#c8d842', shadowColor:'#9d793f'},
								{styleColor:'#fa6b2f', shadowColor:'#b33e34'},
								{styleColor:'#4091ec', shadowColor:'#2f7ca6'},
							];
							var len = list.length;
							for(var i=0; i<len; i++){
								var item = list[i], ratio = (item.online / item.count) * 100;
								new Tools.waveMapChart(md5charts[i], ratio, {textColor:'#fff', styleColor:colors[i].styleColor, shadowColor:colors[i].shadowColor});
							};
						}, 500);
					});
				};

				// 产量总览
				Catch.output = function(){
					reqApi.common.requstEdge('get', '/tab/datascreen/output', {}).then((res)=>{
						var body = res.body || {};
						viewData.production = body;
					});
				};

				// 报警总览
				m.alarmoverview = function(){
					var param = {page:0,size:20};
					return reqApi.common.requstEdge('get', '/tab/datascreen/alarmoverview', param).then((res)=>{
						var body = res.body || {}, list = body.data || [];
						return list;
					});
				};

				// 添加窗口内容
				m.updateWindowContent = function(md, item){
forevertyler's avatar
forevertyler committed
1164
					console.log(md,item)
1165 1166 1167 1168 1169 1170
					// 设置按钮颜色
					if(item.isAlarm){
						md.Wrap.classList.add('alarm');
					}else{
						md.Wrap.classList.remove('alarm');
					};
forevertyler's avatar
forevertyler committed
1171 1172
					if(item.perName){
						var part1 = '<p>姓名:'+item.perName+'</p>'
forevertyler's avatar
forevertyler committed
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186
						var part2 = '<p>性别:'+item.perSex+'</p>';
						var part3 = '<p>工号:'+item.perNumber+'</p>';
						var part4 = '<p>部门:'+item.perDept+'</p>';
						var part5 = '<p>职务:'+item.perOffice+'</p>';
						var part6 = '<p>定位卡ID:'+item.phone+'</p>';
						var part7 = '<p>手机号:'+item.perTel+'</p>';
						md.el.innerHTML = '<div style="margin:5px;">' + part1 + part2 +  part3 +  part4 +  part5 +  part6 + part7 + '</div>';
					}else{
						// 设置数值
						var val1Name = md.type === '6' ? '降雨量' : 'x';
						var part1 = '<p>'+item.equipname+'</p><p>'+val1Name+': '+item.x+'</p>';
						var part2 = item.y ? '<p>y: '+item.y+'</p>' + '<p>z: '+item.z+'</p>' : '';
						md.el.innerHTML = '<div style="margin:5px;">' +part1+ part2 + '</div>';
					}
1187

forevertyler's avatar
forevertyler committed
1188
					
1189 1190 1191 1192 1193
				};
				
				// 打开驱动窗口
				t.openDeviceWindow = function(entity){
					var info = entity.info;
forevertyler's avatar
forevertyler committed
1194
					if(info && !entity.infoWindow&& info.equipname){
1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220
						var position = entity.position._value;

						var popClass = info.isAlarm ? 'popupBgImage BgAlarm' : 'popupBgImage';
						
						// 生成窗口
						var popWindow = m['popWindow' + info.equipno] = qf.UI.popWindow({
							name:'',
							pointer:{
								point:'bottom',
								show:true,
								x:68,
							},
							closeButton:{},
							close: function(){
								entity.infoWindow.remove();
								delete entity.infoWindow;
								delete m['popWindow' + info.equipno];
							},
							container:document.createElement('div'),		// id || Element对象
							html:'<div class="'+popClass+'" style="color:#fff;width:150px;font-size:15px;padding:10px;"></div>',
							onload: function(md){
								var equipno = info.equipno;
								md.type = info.devicetype;
								if(equipno){
									m.updateWindowContent(md, info);

forevertyler's avatar
forevertyler committed
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234
									entity.md = md;
									// 创建窗口
									entity.infoWindow = new fg3d.Plugins.View(position, md.Wrap, {
										render: function(){
											return {
												position:position,
												y:-60,
												x:-75,
											};
										},
									});
								};
							},
						});
forevertyler's avatar
forevertyler committed
1235 1236
					}else if(info && !entity.infoWindow&&info.perName){
					
forevertyler's avatar
forevertyler committed
1237 1238 1239
						var position = entity.position._value;
						var popClass = info.isAlarm ? 'popupBgImage BgAlarm' : 'popupBgImage';
						// 生成窗口
forevertyler's avatar
forevertyler committed
1240
						var popWindow = m['popWindow' + info.perName] = qf.UI.popWindow({
forevertyler's avatar
forevertyler committed
1241 1242 1243 1244 1245 1246 1247 1248 1249 1250
							name:'',
							pointer:{
								point:'bottom',
								show:true,
								x:68,
							},
							closeButton:{},
							close: function(){
								entity.infoWindow.remove();
								delete entity.infoWindow;
forevertyler's avatar
forevertyler committed
1251
								delete m['popWindow' + info.perName];
forevertyler's avatar
forevertyler committed
1252 1253 1254 1255
							},
							container:document.createElement('div'),		// id || Element对象
							html:'<div class="'+popClass+'" style="color:#fff;width:150px;font-size:15px;padding:10px;"></div>',
							onload: function(md){
forevertyler's avatar
forevertyler committed
1256
								var perName = info.perName;
forevertyler's avatar
forevertyler committed
1257
								md.perDept = info.perDept;
forevertyler's avatar
forevertyler committed
1258
								if(perName){
forevertyler's avatar
forevertyler committed
1259 1260
									m.updateWindowContent(md, info);

1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
									entity.md = md;
									// 创建窗口
									entity.infoWindow = new fg3d.Plugins.View(position, md.Wrap, {
										render: function(){
											return {
												position:position,
												y:-60,
												x:-75,
											};
										},
									});
								};
							},
						});
					};
				};

				// 人员
				m.percarCount = function(){
					reqApi.common.requstEdge('get', '/tab/datascreen/percarcount', {time:'week'}).then((res)=>{
						var body = res.body || {};
						var colors = [Highchart.getRandomColor(0), Highchart.getRandomColor(2), "#38f1f3"];
						var series = Highchart.formatSeriesList(body.lists, {value:'values.person', categoriesKye:'dateUnit', colors:colors, serie:{name:'人员统计'}});

						var options2 = {
							chartConfig:{
								chart: {
									type: 'column',
									margin: 10,
									options3d: {
										enabled: true,
										alpha: 15,
										beta: 15,
										depth: 50,
										viewDistance: 25
									},
								},
								plotOptions: {
									series: {
										depth: 25,
										colorByPoint: true
									}
								},
								tooltip: {
									pointFormat: '<div>{seriesData.name}</div><b>在线:{point.y}人</b><br/>{point.category}'
								},
								xAxis: {
forevertyler's avatar
forevertyler committed
1308 1309
									// categories: series.categories,
									categories: ['2025-02-15','2025-02-16','2025-02-17','2025-02-18','2025-02-19','2025-02-20','2025-02-21','2025-02-22','2025-02-23','2025-02-24','2025-02-25','2025-02-26','2025-02-27',],
1310 1311 1312 1313
								},
								yAxis: {
									title: {
										text: null
forevertyler's avatar
forevertyler committed
1314 1315 1316 1317
									},
									max: 100,
									// startOnTick: false, // 防止自动调整到刻度开始
									// endOnTick: false   // 防止自动调整到刻度结束
1318 1319 1320
								},
								series: [
									{
forevertyler's avatar
forevertyler committed
1321
										data:[16,16,16,16,16,16,16,16,16,16,16,16,16]
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333
									}
								],
							},
							isSeriesData:true,
							notExtendsOptions:true,
						};
						m.percarCountChart = Highchart.template.high(wrap2, {}, options2);
					});
				};

				// 报警弹窗-可变形
				m.createAlarmView = function(){
xinzhedeai's avatar
xinzhedeai committed
1334
                    let that = this;
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350
					var checkHtml = '';

					var list = [{areaCode:1, name:'1111'}];
					for(var item of list){
						checkHtml += '<div><input type="checkbox" data-type="list" value="'+item.areaCode+'"/>'+item.name+'dfgdfg</div>';
					};

					return qf.UI.popWindow({
						name:'morphView1',
						container:self.$el,		// id || Element对象
						className:'morph1',
						html:'<div class="morphView"></div>',
						show:false,
						onload: function(o){
							var el = o.el, wrap = o.Wrap, morphView = wrap.firstElementChild;
							o.setStyle(wrap, {
xinzhedeai's avatar
xinzhedeai committed
1351
								bottom:'0.3rem', left:'50%', height:0, width:0, zIndex:1,
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373
								transformOrigin:'0px 0px',
								justifyContent:'center',
							});

							// 数据绑定
							Object.defineProperty(o, 'shrink', {
								set: function(f){
									if(f){
										morphView.classList.add('f-prepare');
										morphView.classList.add('f-shrink');
										morphView.classList.remove('f-anim-revert'); 
									}else{
										morphView.classList.add('f-anim-revert');
										setTimeout(() => {
											morphView.classList.remove('f-shrink'); 
											morphView.classList.remove('f-prepare');
										}, 200);
									};
								}
							});
							
							// <input type="checkbox" value="0" checked />全选</div>
xinzhedeai's avatar
xinzhedeai committed
1374 1375 1376 1377
							el.innerHTML = `
                            <div class="content">
                                <div class="fixed">
                                    <dl class="scrolling4"></dl>
xinzhedeai's avatar
xinzhedeai committed
1378
                                </div>
xinzhedeai's avatar
xinzhedeai committed
1379 1380 1381 1382 1383
                                <i class="el-icon-circle-close"></i>
                            </div>
                            <div class="el-icon-bell"></div>
                           
                            `;
1384 1385 1386

							var content = el.firstElementChild;
							o.scroll = content.firstElementChild.firstElementChild;
xinzhedeai's avatar
xinzhedeai committed
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404

                            const optBtnWrapper = document.createElement('div');
                            optBtnWrapper.className = 'optBtnWrapper';

                            const startAlarmBtn = document.createElement('a');
                            startAlarmBtn.className = 'button alarm';
                            startAlarmBtn.id = 'startAlarmBtn';
                            startAlarmBtn.innerHTML = '开始';

                            const stopAlarmBtn = document.createElement('a');
                            stopAlarmBtn.className = 'button stop';
                            stopAlarmBtn.id = 'stopAlarmBtn';
                            stopAlarmBtn.innerHTML = '停止';

                            el.appendChild(optBtnWrapper);
                            optBtnWrapper.appendChild(startAlarmBtn);
                            optBtnWrapper.appendChild(stopAlarmBtn);
                            
1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419
							o.updateList = function(list){
								var dds = '';
								for(var item of list){
									var state = item.state === 1 ? '报警中' : '已处理';
									dds += '<dd><span>'+item.name+'</span><span class="red">'+state+'</span><span>'+item.time+'</span></dd>';
								}; return o.scroll.innerHTML = dds, o.scroll
							};
		
							// 事件
							wrap.onclick = function(e){
								var tag = e.target || e.srcElement;
								if(tag.className === 'el-icon-circle-close'){
									o.shrink = true;
								}else if(tag.className === 'el-icon-bell'){
									o.shrink = false;
xinzhedeai's avatar
xinzhedeai committed
1420 1421 1422 1423 1424
								};
							};
                            startAlarmBtn.addEventListener('click', () => {
                                openAlarm().then(res=>{
                                    res.body===200?new qf.UI.Notify({
xinzhedeai's avatar
xinzhedeai committed
1425 1426 1427 1428 1429 1430
                                                position: 'top',
                                                zIndex:2050,
                                                type: 'success',
                                                duration: 3000,
                                                autoOpen:true,
                                                message: res.body,
xinzhedeai's avatar
xinzhedeai committed
1431
                                            }):new qf.UI.Notify({
xinzhedeai's avatar
xinzhedeai committed
1432 1433 1434 1435 1436 1437
                                                position: 'top',
                                                zIndex:2050,
                                                type: 'warning',
                                                duration: 3000,
                                                autoOpen:true,
                                                message: res.body,
xinzhedeai's avatar
xinzhedeai committed
1438 1439 1440 1441 1442 1443
                                            })
                                })
                            });
                            stopAlarmBtn.addEventListener('click', () => {
                                closeAlarm().then(res=>{
                                    res.body===200?new qf.UI.Notify({
xinzhedeai's avatar
xinzhedeai committed
1444 1445 1446 1447 1448 1449
                                                position: 'top',
                                                zIndex:2050,
                                                type: 'success',
                                                duration: 3000,
                                                autoOpen:true,
                                                message: res.body,
xinzhedeai's avatar
xinzhedeai committed
1450
                                            }):new qf.UI.Notify({
xinzhedeai's avatar
xinzhedeai committed
1451 1452 1453 1454 1455 1456
                                                position: 'top',
                                                zIndex:2050,
                                                type: 'warning',
                                                duration: 3000,
                                                autoOpen:true,
                                                message: res.body,
xinzhedeai's avatar
xinzhedeai committed
1457 1458 1459
                                            })
                                })
                            });
1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519
						},
					});

					// 打开 filter
					//t.morphView1.open();
				};

				// unload
				t.unload = function(){
					// 停止动画更新
					m.clearpreUpdateCallback && m.clearpreUpdateCallback();
					
					// 停止设备数据更新
					//m.timer01.stop();
				};

				// 首次加载
				(m.init = function(){
					// 产量总览
					Catch.output();

					// 环境监测模块
					m.EnvirMonitor();

					// 报警列表
					m.alarmView1 = m.createAlarmView();
					// init
					(m.initAlarmInfo = function(){
						// 报警总览滚动激活
						var ScrollView4 = qf.UI.scrollingPreview({
							container:m.alarmView1.scroll,
						});

						// 报警总览
						m.alarmoverview().then(function(list){
							m.alarmView1.updateList(list);
							m.alarmView1.show = true;
							
							// 激活滚动列表
							setTimeout(() => {
								ScrollView4.update();
							}, 5000);
						});
					})();

					// 计时更新报警列表
					m.alarmModule = new qf.Async.timerCtrl(60000, 'alarmModule');
					m.alarmModule(function(){
						m.alarmoverview().then(function(list){
							m.alarmView1.updateList(list);
						});
					});

					// 设备实时状态总览
					m.deviceRealtime();

					// 人员在线统计
					m.percarCount();

					// 边坡实时监测
forevertyler's avatar
forevertyler committed
1520
					m.timer01 = new qf.Async.timerCtrl(30000, 'timer01');
1521 1522
					m.timer01(function(){
						m.updateModelData();
forevertyler's avatar
forevertyler committed
1523
						m.updatePersonModelData()
forevertyler's avatar
forevertyler committed
1524 1525


1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139
					}); m.timer01.start();


					// 创建地图设备
					m.initDeviceVisual();

					// 添加围栏数据
					//t.createWall();
				})();

				// 栏目数据加载
				m.loadData = function(){
					// 产量总览
					Catch.output();

					// 环境监测实时数据
					t.envirData();

					// 人员与车辆在线统计
					m.percarCount();

					// 设备实时状态总览
					//m.deviceRealtime();
				};

				return {
					reload: function(){
						t.loadViewVisual();

						m.timer01.start();

						m.alarmModule.start(1);
					},
					timerUpdate: function(){
						m.loadData()
					},
					mapClick: function(pick){
						var entity = pick.id;
						t.openDeviceWindow(entity);
					},
					unload: function(){
						t.unload();
						// stop
						//m.alarmModule.stop();
					},
					resize: function(){
						m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},

		module3(m, t, f, dmIndex){
			var self = this, Catch = {};
			var viewData = self['view'+dmIndex];

			// 降雨量变化趋势图(日)
			var amd20 = document.getElementById("amd20");
			var wrap20 = amd20.querySelector(".wrap");

			// 表面位移变化量(周)
			var amd21 = document.getElementById("amd21");
			var wrap21 = amd21.querySelector(".wrap");
			var title_21 = amd21.querySelector(".item_2>span");

			// 激活事件
			var amd23 = self.$el.querySelector("#amd23");
			var el_amd23 = amd23.querySelector(".el-icon-location");

			// 环境监测近七天变化趋势图
			var amd24 = document.getElementById("amd24");
			var wrap24 = amd24.querySelector(".wrap");
			var title_24 = amd24.querySelector(".item_2");
			var b0_d = this.$el.querySelector("#b0_d");

			return (function(){

				// 视角
				//m.openVisual = function(){
				//	fg3d.Assist.flyToLnglat({
				//		longitude: 114.12785040588982,
				//		latitude: 35.689261801295714,
				//		height: 893.864392424467,
				//		heading: 0.6049227112346074,
				//		pitch: -0.37063033678868607,
				//		roll: 0.0000214519590597817,
				//		duration: 1
				//	});
				//};

				// 降雨量变化趋势图(日)
				m.jyldata = function(){
					reqApi.common.requstEdge('get', '/tab/Monitoring/jyldata', {}).then((res)=>{
						var body = res.body || {};
						var formatSeries = Highchart.seriesDataFormat(body, {datekey:'date', colors:["#4ea9fc"]});
						var options = {
							chartConfig:{
								chart: {
								  type: 'column'
								},
								xAxis: {
								  labels: {
									style:{
									  color:'#55ffff'
									},
								  },
								},
								yAxis: {
									min:0,
									max:10,
									gridLineColor:'tansparent',
									labels:{
										style:{
											color:'#fff'
										},
									},
									stackLabels: {  // 堆叠数据标签
										enabled: true,
									}
								},
								plotOptions: {
									column: {
										dataLabels: {
											enabled: true,
											color: 'white',
											style: {
												textOutline:'none',
											},
											//verticalAlign:'bottom',
											//y:50,
											//position:'right',
										},
										minPointLength:1,	// 柱的最小高度
									},
								},
								tooltip: {
									//valueSuffix: ' m/s'
									pointFormat: '<tr><td style="color:{series.color};padding:0"></td>' + '<td style="padding:0"><b>{series.name} {point.y}</b>mm </td></tr>',
									dateTimeLabelFormats: {
										millisecond: '%H:%M:%S.%L',
										second: '%m-%d %H:%M:%S',
										minute: '%m-%d %H:%M',
										hour: '%m-%d %H:%M',
										day: '%m-%d %H:%M',
										week: '%m-%d %H:%M',
										month: '%Y-%m',
										year: '%Y'
									},
									shared: true,
									//useHTML: true,
								},
								series: formatSeries.series,
							},
							isSeriesData:true,
							notExtendsOptions:true,
						};
						m.jyldataChart = Highchart.template.high(wrap20, {}, options);
					});
				};

				// 表面位移设备列表
				m.bmwyequip = function(){
					reqApi.common.requstEdge('get', '/tab/Monitoring/bmwyequip', {}).then((res)=>{
						var body = res.body || {};
						viewData.mpList = body;

						// 表面位移图表切换事件
						title_21.onclick = function(e){
							var mdName = e.target || e.srcElement;
							if(!Catch.amd21 || !Catch.amd21.show){
								var checkValue = mdName.dataset.equipno || viewData.mpList[0].equipno;
								var html = qf.UI.checkListRender({
									type:"radio",
									list: viewData.mpList,
									select:[checkValue],
									name:'equipname',
									value:'equipno',
								});
								// 创建窗口
								Catch.amd21 = qf.UI.popWindow({
									name:'ssss',
									container:mdName.parentNode,		// id || Element对象
									pointer:{
										point:'left',
										show:true,
										x:0,
									},
									closeButton:true,
									html:'<div style="color:#fff;height:2rem;width:4rem;border:1px solid #3EB7EA;background-color:rgba(0,0,0, .5);padding:.15rem;text-align:left;">sdfsdf</div>',
									onload: function(o){
										var el = o.el;
										o.setStyle(o.Wrap, {top:'0rem', left:'5.00rem'});
										
										// 事件
										el.onclick = function(e){
											var tag = e.target || e.srcElement;
											if(tag.nodeName === 'INPUT'){
												Catch.amd21.remove();
												mdName.innerText = tag.dataset.name;
												mdName.dataset.equipno = tag.value;

												m.setChart21(tag.value)
											};
										};
										el.innerHTML = html;
									},
								});
							};
						};

						m.setChart21(viewData.mpList[0].equipno)
					});
				};
	
				// 表面位移变化量(周)
				m.setChart21 = function(equipno){
					Catch.Chart21Val = equipno || Catch.Chart21Val;

					reqApi.common.requstEdge('get', '/tab/Monitoring/bmwydata', {sensorid:Catch.Chart21Val}).then((res)=>{
						var body = res.body || {};
						var formatSeries = Highchart.seriesDataFormat(body, {datekey:'date', serie:{
							type: 'spline',
							marker: {
								enabled: false
							},
						}, colors:["#fcaa00", "#20ef03", "#38f1f3"]});
						var options = {
							chartConfig:{
								chart: {
									//type: 'spline'
								},
								xAxis: {
									type: 'datetime',
									labels: {
										rotation:0,  // 设置轴标签旋转角度
										style:{
											color:'#fff'
										},
										y:15,
										overflow: 'justify'
									},
								},
								yAxis: {
									//min: 0,
									minorGridLineWidth: 0,
									gridLineWidth: 0,
									alternateGridColor: null,
									labels:{
										style:{
											color:'#fff'
										},
										x:-6,
									},
									gridLineColor:'#0F5680',
								},
								tooltip: {
									//valueSuffix: ' m/s'
									pointFormat: '<tr><td style="color:{series.color};padding:0"></td>' + '<td style="padding:0"><b>{series.name} {point.y}</b>mm </td></tr>',
									dateTimeLabelFormats: {
										millisecond: '%H:%M:%S.%L',
										second: '%m-%d %H:%M:%S',
										minute: '%m-%d %H:%M',
										hour: '%m-%d %H:%M',
										day: '%m-%d %H:%M',
										week: '%m-%d %H:%M',
										month: '%Y-%m',
										year: '%Y'
									},
									shared: true,
								},
								legend: {
									enabled:true,
									align: 'right',
									x:0,
									verticalAlign: 'top',
									y: -10,
									floating: true,
									borderColor:'none',
									borderWidth: 1,
									itemStyle:{color:'#fff',},
									itemHoverStyle:{color:'#fff',},
								},
								series:formatSeries.series,
							},
							isSeriesData:true,
							notExtendsOptions:true,
						};
						m.bmwydataChart = Highchart.template.rich(wrap21, {}, options);
					});
				};

				// 请求环境监测设备列表
				m.reqEnvirList = function(){
					return reqApi.common.requstEdge('get', '/tab/Monitoring/equipdataEnv', {}).then((res)=>{
						var list = res.body || {};

						// module 24 激活事件
						var select1 = title_24.querySelector("select");
						
						// 设备选项
						qf.UI.selectRender(select1, list, {
							value:'id',
							onchange: function(val){
								m.setChart24(val);
							},
							onload: function(val){
								m.setChart24(val);
							},
						});
					});
				};

				// 环境监测趋势图
				m.setChart24 = function(envirid){
					m.envirid = envirid || m.envirid;
					var param = {id:m.envirid, mn:m.envirmn};
					reqApi.common.requstEdge('get', '/tab/Monitoring/getsevendata', param).then((res)=>{
						var body = res.body || {};
						var formatSeries = Highchart.seriesDataFormat(body, {datekey:'date'});
						var unit = body.unit;
						var options24 = {
							chartConfig:{
								chart: {
									type: 'areaspline'
								},
								title: {
									text: ''
								},
								legend: {
									layout: 'vertical',
									align: 'left',
									verticalAlign: 'top',
									x: 150,
									y: 100,
									floating: true,
									borderWidth: 1,
								},
								xAxis: {
									plotBands: [{ // 标识出周末
										from: 4.5,
										to: 6.5,
										color: 'rgba(68, 170, 213, .2)'
									}]
								},
								yAxis: {
									title: {
										text: ''
									}
								},
								tooltip: {
									shared: true,
									pointFormat: '{series.name}:{point.y} ' + unit,
								},
								plotOptions: {
									areaspline: {
										fillOpacity: 0.5
									}
								},
								series: formatSeries.series
							},
							isSeriesData:true,
							notExtendsOptions:true,
						};
						Highchart.template.high(wrap24, {}, options24);
					});
				};

				// 初次加载
				(m.init = function(){
					// 降雨量
					m.jyldata();

					// 表面位移设备列表
					m.bmwyequip();

					// 环境设备列表
					m.reqEnvirList().then(function(list){
					});
				})();
				
				// 栏目数据加载
				m.loadData = function(){

					// 降雨量
					m.jyldata();

					// 环境监测模块
					//m.envirData();
					
					// 环境监测趋势图
					m.setChart24();

					// 表面位移变化量(周)
					m.setChart21();
				};		

				return {
					reload: function(){
						//f(0).loadViewVisual();
						//m.openVisual();

						//m.monitorAlarm.start(1);
					},
					timerUpdate: function(){
						m.loadData();
					},
					mapClick: function(pick){
						var entity = pick.id;
						f(0).openDeviceWindow(entity);
					},
					unload: function(){
						f(0).unload();
					},
					resize: function(){
						m.jyldataChart && m.jyldataChart.reflow();
						m.bmwydataChart && m.bmwydataChart.reflow();
					},
				};
			})();
		},

		module4(m, t, f, dmIndex, view){		// 采矿管理
			var self = this, viewData = self['view'+dmIndex], fm = f('init'), thisApi = fm.models[dmIndex];
			var amd40 = view.querySelector("#amd40");
			var areaCtrl = view.querySelector(".area-ctrl");

			return (function(){
				// 视角
				/* m.openVisual = function(){
					fg3d.Assist.flyToLnglat({
						longitude:'114.1674479475088',
						latitude:'35.682672515124445',
						height:'1707.996300209384',
						heading:'5.071707067373581',
						pitch:'-0.6203050977189695',
						roll:'0.00000739612826272662',
						duration: 1.5,
					});
				}; */

				// 在线监测报警实时列表
				m.getModelList = function(){
					var url = fm.LOCAL_API + '/api/dimensional';
					return reqApi.common.requstEdge('get', url, {page:0,size:50,}).then((res)=>{
						var body = res.body || [], list = body.list || [];
						return viewData.modelList = list;
					});
				};

				m.loadDefaultModel = function(){
					m.getModelList().then(function(list){
						m.previewModel(list[0].filePath);
					});
				};
				
				// 模型预览
				m.previewModel = function(filename){
					var filepath = fm.LOCAL_API + '/file/' + filename;

					if(m.popup4){
						m.popup4.i.contentWindow.onMessage(filepath);
					}else{
						qf.UI.popWindow({
							cover:true,
							//container:b0_e,		// id || Element对象
							/* closeButton:{
								horizontal:'right',
								vertical:'top',
							}, */
							closeEvent:true,
							html:'<div style="height:100%;width:100%;border:1px solid #3EB7EA;background-color:rgba(0,0,0, .5);"></div><div style="position:absolute;top:0.08rem;right:0.1rem;font-size:.30rem;color:#3eb7ea;display:flex;align-items:center;"><a href="webTo3DMine:\" style="font-size:.20rem;text-decoration:none;color:unset;margin-right:0.30rem;">3DM</a><i style="margin-right:0.12rem;cursor:pointer;" class="el-icon-zoom-in"></i><i style="cursor:pointer;font-size:.32rem;"class="el-icon-close close"></i></div>',
							onload: function(v){
								m.popup4 = v;
								var el = v.el;
								v.midStyle = {top:(qf.envir.dpr * 100 / 2)+'vh',left:(19.2-12.8)/2-2.8+'rem',marginTop:'-4.2rem',height:'8.6rem',width:'14.6rem'};
								v.maxStyle = {top:0, left:0, marginTop:'0',height:'100%', width:'19.2rem'};
								v.setStyle(v.Wrap, Object.assign(v.midStyle, {zIndex:10}));
								var i = v.i = document.createElement("iframe");
								i.src = process.env.VUE_APP_BASE_API + '/static/3dmine/index20231547.html';
								i.style.cssText = 'display:none;border:0;height:100%;width:100%;';
								i.onload = function(){
									i.style.display = 'block';
									i.contentWindow.onMessage(filepath);
								};
								el.appendChild(i);
								
								// 缩放事件
								v.Wrap.onclick = function(e){
									var tag = e.target || e.srcElement;
									if(tag.className === 'el-icon-zoom-in'){
										v.setStyle(v.Wrap, v.maxStyle);
										tag.className = 'el-icon-zoom-out';
									}else if(tag.className === 'el-icon-zoom-out'){
										v.setStyle(v.Wrap, v.midStyle);
										tag.className = 'el-icon-zoom-in';
									}else if(tag.classList.contains('close')){
										m.popup4.remove()
										delete m.popup4
									};
								};
							},
						});
					};
				};

				m.Overlay = new fg3d.Materials.Overlay();

				// 区域渲染
				m.createAreas = function(list){
					for(var item of list){
						(function(item1){
							item1.areaEntity = m.Overlay.create(item.area);
							var div = document.createElement("div");
							div.cssText = '';
							div.innerHTML = '<span style="font-weight:bold;color:'+item1.lable.color+';text-shadow:4px 4px 0 white, 4px -4px 0 white, -4px -4px 0 white, -4px 4px 0 white, 4px 3px 0 white, 4px -3px 0 white, -4px -3px 0 white, -4px 3px 0 white, 4px 2px 0 white, 4px -2px 0 white, -4px -2px 0 white, -4px 2px 0 white, 4px 1px 0 white, 4px -1px 0 white, -4px -1px 0 white, -4px 1px 0 white, 4px 0px 0 white, 4px 0px 0 white, -4px 0px 0 white, -4px 0px 0 white, 3px 4px 0 white, 3px -4px 0 white, -3px -4px 0 white, -3px 4px 0 white, 2px 4px 0 white, 2px -4px 0 white, -2px -4px 0 white, -2px 4px 0 white, 1px 4px 0 white, 1px -4px 0 white, -1px -4px 0 white, -1px 4px 0 white, 0px 4px 0 white, 0px -4px 0 white, 0px -4px 0 white, 0px 4px 0 white;user-select:none;">'+item1.lable.name+'</span>';
							item1.areaLabelEntity = new fg3d.Plugins.View(item1.lable.position, div, {
								render: function(){
									return {
										position:item1.lable.position,
										y:-10,
										x:-40,
									};
								},
							});
						})(item);
					};
				};

				// 矿山区域
				m.openAreaView = function(){
					m.areaData = [
						{
							lable:{
								name:'生产区域',
								color: 'rgba(201,201,5,1)',
								position:{"x":-2121959.148669658,"y":4732907.446724342,"z":3699688.329300404},
							},
							area:{
								type:'polygon',
								color: fg3d.Assist.convertColor('rgba(201,201,5,0.7)'),
								positions:[{"x":-2122121.69752553,"y":4732948.485187713,"z":3699480.7736413167},{"x":-2121532.6802133354,"y":4733004.795826415,"z":3699820.809463074},{"x":-2121579.3242312316,"y":4732918.078870975,"z":3699914.4527314305},{"x":-2121731.903524157,"y":4732895.190584821,"z":3699832.200684501},{"x":-2121891.970666071,"y":4732840.040141181,"z":3699784.4230823033},{"x":-2122002.2695298186,"y":4732828.6610931195,"z":3699720.5081576174},{"x":-2122030.862723658,"y":4732765.588219904,"z":3699783.130313781},{"x":-2122009.0677196844,"y":4732706.487491439,"z":3699855.875857564},{"x":-2122136.4814477907,"y":4732651.002686095,"z":3699841.1911163903},{"x":-2122182.258534114,"y":4732745.7051489595,"z":3699688.969579434}],
							},
						},
						{
							lable:{
								name:'办公区域',
								color: 'rgba(26,26,198,1)',
								position:{"x":-2121984.5246134335,"y":4732810.697839417,"z":3699767.0667978125},
							},
							area:{
								type:'polygon',
								color: fg3d.Assist.convertColor('rgba(26,26,198,0.7)'),
								positions:[{"x":-2121947.740673984,"y":4732836.739738038,"z":3699755.440539873},{"x":-2122001.7125650863,"y":4732828.060650823,"z":3699721.7572384505},{"x":-2122024.2093514916,"y":4732778.376787009,"z":3699771.581554226},{"x":-2121953.4057358783,"y":4732809.456473601,"z":3699780.121464073}],
							},
						},
						{
							lable:{
								name:'运输道路',
								color: 'green',
								position:{"x":-2121255.62295468,"y":4732688.030442115,"z":3700382.12769257},
							},
							area:{
								type:'polygon',
								color: Cesium['Color']['GREEN']['withAlpha'](0.8),
								positions:[{"x":-2121531.2740100883,"y":4733001.290832277,"z":3699826.151223126},{"x":-2121471.1277392665,"y":4732993.319641265,"z":3699870.481493262},{"x":-2121404.9117971375,"y":4732953.815513793,"z":3699961.724264286},{"x":-2121374.028721476,"y":4732883.284179721,"z":3700071.3308811085},{"x":-2121330.668495002,"y":4732818.472744264,"z":3700176.5342278914},{"x":-2121080.3865163056,"y":4732429.777509618,"z":3700776.4217324816},{"x":-2121099.384574161,"y":4732414.026278343,"z":3700784.5593299256},{"x":-2121346.0748288534,"y":4732806.58878116,"z":3700185.6254272475},{"x":-2121380.745037616,"y":4732857.536893442,"z":3700099.862802012},{"x":-2121415.4792679963,"y":4732936.417002095,"z":3699977.9403856895},{"x":-2121482.8336224435,"y":4732955.330203809,"z":3699911.9428409124},{"x":-2121552.2525749723,"y":4732960.497357658,"z":3699866.193625857}],
							},
						},
						{
							lable:{
								name:'矿山区域',
								color: 'red',
								position:{"x":-2120672.70872001,"y":4732381.842408981,"z":3701207.864998345},
							},
							area:{
								type:'polygon',
								color: Cesium['Color']['RED']['withAlpha'](0.6),
								positions:[{"x":-2120306.0254037874,"y":4732280.2541906275,"z":3701579.011785657},{"x":-2121033.6788596786,"y":4732178.872825701,"z":3701344.8140458036},{"x":-2121067.991964552,"y":4732339.3742958605,"z":3701014.357442467},{"x":-2121036.4552592617,"y":4732448.384141414,"z":3700780.6016604276},{"x":-2120812.2928324672,"y":4732625.405322184,"z":3700751.5119278603},{"x":-2120406.552262311,"y":4732757.367645288,"z":3700829.14458496},{"x":-2120116.857627231,"y":4732566.95730762,"z":3701283.1988117145}],
							},
						},
						{
							lable:{
								name:'临时堆场',
								color: 'rgba(216,160,111,1)',
								position:{x:-2120824.253108862, y:4732476.061036498, z:3700874.681253977},
							},
							area:{
								type:'polygon',
								color: fg3d.Assist.convertColor('rgba(216,160,111,0.8)'),
								positions:[{"x":-2120818.5409808634,"y":4732497.547528367,"z":3700854.1554808877},{"x":-2120785.7388974736,"y":4732470.511882864,"z":3700908.907636978},{"x":-2120851.1276103375,"y":4732451.493873717,"z":3700888.183313841},{"x":-2120842.7455381914,"y":4732489.309663085,"z":3700849.996797884}],
								zIndex:10,
							},
						},
					];
					m.createAreas(m.areaData);
				};
				// clear
				m.clearAreaView = function(){
					if(m.areaData){
						for(var item of m.areaData){
							self.Entities.remove(item.areaEntity);
							item.areaLabelEntity && item.areaLabelEntity.remove()
						};
					};
				};

				// module event
				amd40.onclick = function(e){
					var tag = e.target || e.srcElement;
					if(tag.className === 'el-icon-view'){
						var filename = tag.parentNode.parentNode.dataset.name;
						m.previewModel(filename);
					};
				};

forevertyler's avatar
forevertyler committed
2140
				
2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212
				(m.init = function(){
					// 设置视角
					//m.openVisual()
				})();
				
				return {
					reload: function(){
						// 删除数据
						self.Entities.removeAll();
						// 隐藏墙体
						//f(0).WallEntityHide();

						// 加载模型
						m.loadDefaultModel();

						// 设置视角
						//m.openVisual();
					},
					timerUpdate: function(){
						m.getModelList();
					},
					unload: function(){
						// 清空模型
						m.popup4 && m.popup4.remove(); delete m.popup4;
						// 清空区域展示
						m.clearAreaView();
						// 关闭开关
						//self.areaSwitch.dataModel = false;
						
						// 显示墙体
						//f(0).WallEntityShow();
					},
				};
			})();
		},

		// Cesium
		createCesium: function(fn){
			var that = this;
			fg3d.init({
				createViewer: function(){
					return {
						el:'cesiumContainer',
						options:{
							//sceneMode : Cesium.SceneMode.COLUMBUS_VIEW,

							/**
							  * 使用 Cesium 世界地形, 
							  * 
							  * @param: false								// 不显示地形
							  * @param: Cesium.createWorldTerrain()			// Cesium默认世界地形
							  * @createtime: 2021/10/30
							  */
							terrainProvider : Cesium.createWorldTerrain(),
							// 隐藏基本层选择器
							baseLayerPicker : false,
							imageryProvider: null,
							timeline:false,
							homeButton:false,
							fullscreenButton:false,
							infoBox:false,
							sceneModePicker:false,
							navigationInstructionsInitiallyVisible:false,
							navigationHelpButton:false,
							geocoder:false,
							animation:false,				// 底部指针
							selectionIndicator:false,
							shouldAnimate: true,
						}
					};
				}, 
				mounted: function(viewer){
forevertyler's avatar
forevertyler committed
2213

2214 2215 2216 2217 2218 2219 2220 2221 2222
					var self = this
					this.viewer = that.viewer = viewer;

					//取消双击锁定
					fg3d.Event.removeLeftDoubleClick()

					// 去除版权信息
					viewer._cesiumWidget._creditContainer.style.display = "none";
					var path = process.env.VUE_APP_D3Tileset + '/tileset.json';
forevertyler's avatar
forevertyler committed
2223
                    // console.log('path', path)
2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309
					var localTile = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						url: path,
						//maximumScreenSpaceError:1,
						//maximumMemoryUsage:1024,

						// 优化
						scene3DOnly: true, //如果设置为true,则所有几何图形以3D模式绘制以节约GPU资源
						skipLevelOfDetail: true,
						skipScreenSpaceErrorFactor: 64,		// 默认 16
						skipLevels: 1,	// 如果为0,则不会跳过任何级别。与skipScreenSpaceErrorFactor一起使用,以确定要加载的磁贴
						immediatelyLoadDesiredLevelOfDetail: false,		// 当 skipLevelOfDetail 为true时,将只下载满足最大屏幕空间错误的磁贴。忽略跳过因素,只加载所需的磁贴。
						baseScreenSpaceError: 1920,
						maximumScreenSpaceError: 1, // 数值加大,能让最终成像变模糊
						cullWithChildrenBounds: true,
						cullRequestsWhileMoving: true,
						cullRequestsWhileMovingMultiplier: 10, // 值越小能够更快的剔除
						preloadWhenHidden: true,
						preferLeaves: true,
						maximumMemoryUsage: 512, // 内存分配变小有利于倾斜摄影数据回收,提升性能体验
						progressiveResolutionHeightFraction: 0.5, // 数值偏于0能够让初始加载变得模糊
						dynamicScreenSpaceError: true, // 根据测试,有了这个后,会在真正的全屏加载完之后才清晰化房屋(优化选项。减少离相机更远的磁贴的屏幕空间错误)
						dynamicScreenSpaceErrorDensity: 0.1, // 数值加大,能让周边加载变快
						dynamicScreenSpaceErrorFactor: 4.0, // 不知道起了什么作用没,反正放着吧先
						dynamicScreenSpaceErrorHeightFalloff: 0.25,
						
						//控制切片视角显示的数量,可调整性能
						maximumNumberOfLoadedTiles: 1000, //最大加载瓦片个数
					}));

					// 瓦片默认视角
					localTile.readyPromise.then(function (tileset) {
						var boundingSphere = tileset.boundingSphere;
						viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.0, -0.5, boundingSphere.radius));
						viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
					}).otherwise(function (error) {
						throw (error);
					});

					//this.setView(viewer);
					

					// 环境设置 ---------------------------------------
					/* viewer.clockViewModel.clock.currentTime = Cesium.JulianDate.fromIso8601(
						"2017-07-11T22:30:00Z"
					); */

					//return ;
					// 光影效果
					viewer.scene.globe.enableLighting = true; //关闭光照
					viewer.shadows = false;//关闭阴影

					// 场景效果
					viewer.scene.light = new Cesium.DirectionalLight({
						color:new Cesium.Color(1.0, 1.0, 1.0, .1),
						direction: new Cesium.Cartesian3(0.35492591601301104, -0.8909182691839401, -0.2833588392420772),
					});
					// 太阳
					viewer.scene.sun.show = true;
					viewer.scene.sun.glowFactor = 20;	// 10倍
					// 天空
					var skyAtmosphere = viewer.scene.skyAtmosphere;
					skyAtmosphere['hueShift'] = 0.0;
					skyAtmosphere['saturationShift'] = 0.5;
					skyAtmosphere['brightnessShift'] = 0.01;
					
					// 地图层调色(bold)
					var baseLayer = viewer.scene.imageryLayers.get(0);
					//将Bing基础层上的海洋设置为透明
					baseLayer.colorToAlpha = new Cesium.Color(1.0, 1.0, 1.0, 1.0);
					// 地球颜色的覆盖高度 0 ~ 1
					//baseLayer.colorToAlphaThreshold = 0.5;
					baseLayer.brightness = 0.95;
					baseLayer.contrast = 1.2;
					baseLayer.hue = 0.0;
					//baseLayer.saturation = 1.08;
					//baseLayer.gamma = 1.14;

					that.Entities = {
						remove: this.remove,
						removes: this.removes,
						removeWidget: this.removeWidget,
						removeAll: function(){
							self.removeEntities();
							self.removeWidget();
						},
					};
forevertyler's avatar
forevertyler committed
2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332
					// 新增点击事件监听
					const handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
					handler.setInputAction((movement) => {
						this.pickPosition(movement.position);
					}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
				},
				pickPosition(position) {
					const scene = this.viewer.scene;
					const pickedObject = scene.pick(position);

					if (Cesium.defined(pickedObject) && pickedObject.primitive instanceof Cesium.Cesium3DTileset) {
						const ray = this.viewer.camera.getPickRay(position);
						const cartesian = scene.globe.pick(ray, scene);

						if (Cesium.defined(cartesian)) {
							const cartographic = Cesium.Cartographic.fromCartesian(cartesian);
							const longitude = Cesium.Math.toDegrees(cartographic.longitude);
							const latitude = Cesium.Math.toDegrees(cartographic.latitude);
							const height = cartographic.height;

							console.log(`拾取的坐标点:经度 ${longitude}, 纬度 ${latitude}, 高度 ${height}`);
						}
					}
2333 2334 2335
				},
				setView: function(viewer){
					viewer.camera.setView({
xinzhedeai's avatar
xinzhedeai committed
2336
						destination:Cesium.Cartesian3.fromDegrees(121.712245,36.86346, 200),
2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384
						orientation:{
							// 指向
							heading: 6.048855026902075,
							// 视角
							pitch: -0.29361284379937747,
							// 倾斜
							roll: 0.000003977430843349339,
						},
					});
				},
				removeWidget(){
					var widgetContainer = that.viewer.cesiumWidget.container;
					var popmds = widgetContainer.querySelectorAll(".kmb-popmd-e3d8");
					for(var item of popmds){
						//item.remove();
					};
				},
				remove(obj){
					that.viewer.entities.remove(obj);
				},
				removes(list){
					for(var item of list){
						that.viewer.entities.remove(item);
					};
				},
				removeEntities(){
					var entitys = that.viewer.entities._entities._array;
					var len = entitys.length;
					for(var i=0; i<len; i++){
						var obj = entitys[i];
						if(!obj.wall){
							that.viewer.entities.remove(obj);
							i--;len--;
						};
					};
					//that.viewer.entities.removeAll();
				},
			});
		},
	},
}
</script>

<style lang="scss" scope>
	@font-face {font-family:"diget year";src: url("~@/assets/fonts/DS-Digital.ttf");};
	@font-face {font-family:"zhengdao";src: url("~@/assets/fonts/pangmenzhengdao2.0.ttf");};
	.font_digit{font-family:diget year;}
	.font_zhengdao{font-family:zhengdao;}
xinzhedeai's avatar
xinzhedeai committed
2385
	 
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282
	.Screen {
		position:relative;height:100%;width:100%;overflow:hidden;

		.a_0, .b_0{position:absolute;}
		>.actv{display:block;}
		.a_0{
			top:0;left:0;height:100%;width:100%;
			.cesium-ctn{
				height:100%;width:100%;
				.kmb-popmd-e3d8.alarm{
					&>i:nth-child(2){border-color:#ff0000 transparent transparent #ff0000 !important;}
					&>i:nth-child(3){border-color:#ff0000 !important;color:#ff0000 !important;}
					
					&>.popupBgImage{
						background-image:url('/static/images/frame2-min.png');
					}
				}
			}
			
			.a0_{
				position:absolute;top:0;left:0;height:auto;width:100%;z-index:1;

				header{
					position:absolute;top:0;left:0;height:0;width:100%;z-index:5;
					display:flex;user-select:none;

					.b1_bg{
						position:absolute;top:0;left:5.10rem;height:1.10rem;width:8.65rem;
						background:no-repeat top center url('~@/assets/images/layout/s_hd_c.png');
						background-size:100% auto;
						display:flex;justify-content:center;align-items:center;

						&:before, &:after{content:"";position:absolute;top:0;height:.22rem;}
						&:before{
							width:5.10rem;left:-5.10rem;
							background:no-repeat top center url('~@/assets/images/layout/s_hd_l.png');
							background-size:100% auto;
						}
						&:after{
							width:5.45rem;right:-5.45rem;
							background:no-repeat top center url('~@/assets/images/layout/s_hd_r.png');
							background-size:100% auto;
						}
						h2{
							font-size:.38rem;line-height:1;margin:-.06rem 0 0 .2rem;letter-spacing:.03rem;font-weight:normal;
							font-family:zhengdao;color:#fff;text-shadow:#0160fd 0.0 .0 .05rem;
						}
					}

					.a0a_{
						position:absolute;top:.34rem;left:0;height:0;width:100%;
						display:flex;justify-content:space-between;
						ul{
							height:0;display:flex;
							li{
								width:1.64rem;height:.50rem;cursor:pointer;
								background-repeat:no-repeat;background-position:top center;background-size:100% .50rem;
								display:flex;justify-content:center;align-items:center;
								font{
									position:absolute;
									font-family:diget year;font-size:.28rem;text-shadow:#1f94e4 0px 0px .10rem;
									color:transparent;-webkit-text-fill-color:#fff;-webkit-text-stroke: 0.5px #1f94e4;
								}
							}
						}

						ul:first-child{
							margin-left:.22rem;
							li{margin-right:.14rem;}
							li:nth-child(1){
								background-image:url('~@/assets/images/layout/m_1.png');
							}
							li.active:nth-child(1){
								background-image:url('~@/assets/images/layout/m_1a.png');
							}
							li:nth-child(2){
								background-image:url('~@/assets/images/layout/m_5.png');
							}
							li.active:nth-child(2){
								background-image:url('~@/assets/images/layout/m_5a.png');
							}
							//li:nth-child(2){
							//	background-image:url('~@/assets/images/layout/m_2.png');
							//}
							//li.active:nth-child(2){
							//	background-image:url('~@/assets/images/layout/m_2a.png');
							//}
							//li:nth-child(3){
							//	background-image:url('~@/assets/images/layout/m_3.png');
							//}
							//li.active:nth-child(3){
							//	background-image:url('~@/assets/images/layout/m_3a.png');
							//}
						}

						ul:last-child{
							margin-right:.22rem;
							li{margin-right:.14rem;}
							//li:nth-child(1){
							//	background-image:url('~@/assets/images/layout/m_4.png');
							//}
							//li.active:nth-child(1){
							//	background-image:url('~@/assets/images/layout/m_4a.png');
							//}
							li:nth-child(1){
								background-image:url('~@/assets/images/layout/m_4.png');
							}
							li.active:nth-child(1){
								background-image:url('~@/assets/images/layout/m_4a.png');
							}
							li:nth-child(2){
								background-image:url('~@/assets/images/layout/m_6.png');
							}
						}
					}
				}
			}
		}
		.b_0{
			display:flex;top:1.00rem;left:0;bottom:0;width:0;background-color:rgba(0,0,0,.15);
			
			.b0_{
				display:flex;flex-direction:column;justify-content:center;height:100%;width:0;
				.kmb-checkbox{
					dd{line-height:.35rem;}
				}
				
				>div{
					display:none;
					//display:flex;
					width:19.2rem;height:0;justify-content:space-between;
					.side{transition:all .35s cubic-bezier(0.8, 0, 1, 1);}
					.side.b0_left{
						transform-origin:left center;margin-left:.15rem;
						//transform:scaleX(0) perspective(0px) rotateY(5deg);
						transform:scaleX(1) perspective(410px) rotateY(5deg);
						.ct-box{
							margin-top:.05rem;
						}
					}
					.side.b0_right{
						transform-origin:right center;margin-right:.15rem;
						//transform:scaleX(0) perspective(0px) rotateY(-5deg);
						transform:scaleX(1) perspective(410px) rotateY(-5deg);
						.ct-box{
							margin-top:.05rem;
						}
					}
				};
				.active.close{
					>.side:nth-child(1){
						transform:scaleX(0) perspective(0px) rotateY(5deg);
					}
					.side:last-child{
						transform:scaleX(0) perspective(0px) rotateY(-5deg);
					}
				}
				div.active{
					display:flex;
					//.side{display:flex;}
				}
				//div.active{visibility:visible;}

				.side{
					// display:none;
					width:4.80rem;height:0;
					display:flex;flex-direction:column;justify-content:center;user-select:none;color:#fff;
					&>div{
						flex:none;position:relative;min-height:2.70rem;margin:.10rem 0;
					}
					.abs-full{
						display:flex;flex-direction:column;
						.item_2{
							position:relative;margin-top:.05rem;height:.42rem;line-height:.41rem;text-align:center;
							font-size:.17rem;color:#d8f9ff;
							font{font-size:.30rem;}
							.md-name{
								display:flex;height:100%;justify-content:center;align-items:center;cursor:pointer;
								&:before{position:absolute;right:0.15rem;font-size:.28rem;}
							}
						}
					}

					.md-title{
						position:relative;
						ul{
							position:absolute;top:0;right:.38rem;height:100%;width:auto;
							display:flex;display:flex;align-items:center;
							li{
								text-align:center;line-height:.26rem;
								border:1px solid #1c6fbd;font-size:#afc8e6;
								margin:.03rem 0;height:.30rem;width:.30rem;margin-left:.12rem;font-size:.16rem;
								cursor: pointer;
							}
							.actv{
								background-color:rgba(29, 130, 220, .6);
							}
						}
					}
					h4{
						height:.43rem;line-height:.42rem;background:no-repeat center center url('~@/assets/images/layout/md_hd_liner.png');
						background-size:100% 100%;font-size:.26rem;padding-left:.46rem;
						font-family:serif;font-weight:normal;font-style:italic;letter-spacing:.02rem;
					}
					.ct-box{
						flex:1;display:flex;position:relative;
						.tab2{
							margin-top:.10rem;
							ul{
								display:flex;height:.24rem;margin:0 .10rem;
							}
							li{
								flex:1;text-align:center;line-height:.20rem;margin:0 .15rem;max-width:.99rem;
								border-radius:.05rem;font-size:.15rem;color:#37b5b4;
								border:1px solid #1e527a;cursor:pointer;
								box-shadow:inset 0 0 0.10rem 0.03rem rgba(16, 88, 148, .8);
							}
							li.actv{
								border:1px solid #01b0ff;
								color:#34fcfa;
							}
						}
						.wrap{
							position:absolute;top:0;left:0;height:100%;width:100%;
							border:1px solid #2d5b68;
						}
						.flex1{position:relative;}
					}

					.shadow1{
						box-shadow:inset 0 0 0.15rem 0.05rem rgba(1, 95, 121, .8);
						background-color:rgba(0,0,0,.4);
					}

					.a-md1{
						height:5.3rem;
						.wrap{
							display:grid;grid-template-columns:50% 50%;
							&>div:nth-child(1){
								font{text-shadow:#d9fa03 0px 0px .10rem;}
								font:before{background-color:#fece08;}
							}
							&>div:nth-child(2){
								font{text-shadow:#02fe81 0px 0px .10rem;}
								font:before{background-color:#09fd77;}
							}
							&>div:nth-child(3){
								font{text-shadow:#c0f507 0px 0px .10rem;}
								font:before{background-color:#c0f507;}
							}
							&>div:nth-child(4){
								font{text-shadow:#00aef7 0px 0px .10rem;}
								font:before{background-color:#00aef7;}
							}
							&>div:nth-child(5){
								font{text-shadow:#d9fa03 0px 0px .10rem;}
								font:before{background-color:#fece08;}
							}
							&>div:nth-child(6){
								font{text-shadow:#02fe81 0px 0px .10rem;}
								font:before{background-color:#09fd77;}
							}
							&>div:nth-child(7){
								font{text-shadow:#c0f507 0px 0px .10rem;}
								font:before{background-color:#c0f507;}
							}
							&>div:nth-child(8){
								font{text-shadow:#00aef7 0px 0px .10rem;}
								font:before{background-color:#00aef7;}
							}
						}
						.col{
							flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;
							box-shadow:inset 0 0 0.15rem 0.05rem rgba(1, 95, 121, .8);margin-top:.10rem;
							span{font-size:.20rem;}
							font{
								position:relative;font-family:diget year;font-size:.46rem;
								padding-left:0.25rem;line-height:.28rem;margin-top:.10rem;
								&:before{content:"";position:absolute;left:0;bottom:0;width:100%;height:0.21rem;width:0.21rem;}
							}
						}
						.col:nth-child(odd){
							margin-right:.05rem;
						}
						.col:nth-child(even){
							margin-left:.05rem;
						}
					}
					.a-md3{
						.ct-box{
							display:flex;flex-direction:column;
							>div{margin-top:.05rem;}

							.info{
								display:flex;justify-content:space-between;padding:0 .08rem;
								span{font-size:.16rem;color:#d1f1fc;}
								font{font-size:.25rem;}
							}
							.ctn{flex:1;position:relative;}
							ul{
								position:absolute;top:0;left:0;height:100%;width:100%;
								display:grid;grid-template-columns:33.33% 33.33% 33.33%;
								li{
									position:relative;padding-left:.75rem;
									display:flex;flex-direction:column;justify-content:center;
									&:before{
										content:"";position:absolute;top:0;left:0;height:100%;width:.80rem;
										background-repeat:no-repeat;background-position:center center;background-size:100% auto;
									}
									div{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-wrap:normal;}
									span{font-size:.16rem;}
									font{color:#54c3fb;font-size:.12rem;}
									p{color:#C9E9F9;font-size:.14rem;}
								}
								li:nth-child(1){
									&:before{background-image:url('~@/assets/images/icon/m_md_04.png');}
								}
								li:nth-child(2){
									&:before{background-image:url('~@/assets/images/icon/m_md_01.png');}
								}
								li:nth-child(3){
									&:before{background-image:url('~@/assets/images/icon/m_md_02.png');}
									span{color:#F5B62D;}
								}
								li:nth-child(4){
									&:before{background-image:url('~@/assets/images/icon/m_md_03.png');}
								}
								li:nth-child(5){
									&:before{background-image:url('~@/assets/images/icon/m_md_06.png');}
								}
								li:nth-child(6){
									&:before{background-image:url('~@/assets/images/icon/m_md_08.png');}
									span{color:#F5B62D;}
								}
								li:nth-child(7){
									&:before{background-image:url('~@/assets/images/icon/m_md_06.png');}
								}
								li:nth-child(8){
									&:before{background-image:url('~@/assets/images/icon/m_md_07.png');}
								}
								li:nth-child(9){
									&:before{background-image:url('~@/assets/images/icon/m_md_05.png');}
								}
							}
						}
					}
					.a-md4{
						.ct-box{
							display:flex;
							&>div{position:relative;flex:1;margin:0 .05rem;}
						}
						ul{
							display:flex;flex-direction:column;width:.86rem;
							li{
								flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;
								span{
									position:relative;width:100%;font-size:.28rem;line-height:1;margin-bottom:.03rem;
									font-family:'zhengdao';text-align:center;padding-bottom:.03rem;overflow:hidden;
									&:after{
										content:"";position:absolute;bottom:-00%;left:0%;height:100%;width:100%;
									}
								}
								font{line-height:1;}
							}
							li:nth-child(1){
								span:after{
									background-image:radial-gradient(circle at 50% 100%, #02a6fb 3%, rgba(2, 166, 251, .2) 30%, transparent 70%);
								}
							}
							li:nth-child(2){
								span:after{
									background-image:radial-gradient(circle at 50% 100%, #01f8fd 3%, rgba(1, 248, 251, .15) 30%, transparent 60%);
								}
							}
							li:nth-child(3){
								span:after{
									font-weight:bold;
									background-image:radial-gradient(circle at 50% 100%, #fdd9c1 3%, rgba(253, 217, 193, .15) 30%, transparent 60%);
								}
							}
						}

						.scrolling4{
							position:absolute;top:0;left:0;height:100%;width:100%;overflow-y:auto;color:#e1ffff;
							dt,dd{
								position:relative;
								margin-top:.12rem;line-height:1;padding:.04rem .08rem;
								display:grid;grid-template-columns:25% 25% 30% 20%;text-align:center;

								&:before, &:after{position:absolute;top:0;height:100%;font-size:.22rem;color:#21f1fe;}
								&:before{content:"[";left:0;}
								&:after{content:"]";right:0;}
							}
							dt{background-color:rgba(1,35,62,.7);font-size:.16rem;}
							dd{
								background-color:rgba(2,115,165,.3);font-size:.15rem;
								.red{color:#f9480b;font-weight:bold;}
								.orange{color:#fa750c;}
								.yellow{color:#d9f900;}
								.blue{color:#14b5ff;}
							}
						}
						dd{
							span:nth-child(2){
								//color:#13aef1;
							}
						}
						.scrolling4::-webkit-scrollbar{width:2px;}
					}
					.a-md4a{
						div.ct-box{
							flex-direction:column;
							>ul{
								flex-direction:row;height:.71rem;width:100%;
							}
						}
						dl.scrolling4{
							dt, dd{
								&:before, &:after{font-size:.34rem;}
								line-height:.32rem;
							}
							dd{
								span:nth-child(4){font-size:.32rem;}
							}
						}
						dd{
							//span:nth-child(2){color:unset;}
						}
					}
					.a-md5{
						.ct-box{
							ul{display:flex;height:100%;}
							li{
								flex:1;display:flex;flex-direction:column;align-items:center;
								position:relative;padding-top:1.15rem;

								.chart{position:absolute;top:.08rem;height:1.00rem;width:1.00rem;}
								.picture{
									height:.92rem;width:100%;margin-top:.12rem;background-size:.92rem 100%;
								}
								dl{
									position:relative;width:100%;display:flex;flex-direction:column;align-items:center;
									&:after{content:"";position:absolute;top:15%;right:0;height:70%;width:1px;background-color:#4b8090;}
								}
								dt, span{color:#b7fffb;}
								dd{margin-top:.02rem;line-height:1;}
								dt{font-size:.18rem;}
								span{font-size:.16rem;}
								font{font-size:.16rem;font-family:diget year;font-size:.38rem;}
								dd:nth-child(2){font{text-shadow:#00aef7 0px 0px .10rem;}}
								dd:nth-child(3){font{text-shadow:#d9fa03 0px 0px 0.1rem;}}
							}
							li:first-child{
								.picture{
									height:.92rem;width:100%;margin-top:.12rem;
									background:no-repeat center center url('~@/assets/images/icon/m_md_18.png');
									background-size:.92rem 100%;
								}
							}
							li:last-child{
								.picture{
									height:.92rem;width:100%;margin-top:.12rem;
									background:no-repeat center center url('~@/assets/images/icon/m_md_19.png');
									background-size:.92rem 100%;
								}
							}
						}
					}
					.a-md5a{
						.wrap{
							li{
								padding-top:1.14rem;align-items:normal;padding-top:0;
								dl{
									position:relative;margin:.05rem .09rem;flex:1;width:auto;
									border:1px solid #165b58;
									dt{
										margin-bottom:.02rem;padding:.02rem 0;
										width:100%;text-align:center;color:#01fffd;
										background-image:linear-gradient(to right, transparent, #0e5d6c, transparent);
									}
									dd{margin-top:0;line-height:.9;}
									&:before, &:after, dd:last-child:before, dd:last-child:after{
										position:absolute;height:.08rem;width:.08rem;border-style:solid;
										background-color:transparent;border-color:#09c3cf;
									}
									&:before{content:'';top:-1px;left:-1px;border-width:1px 0 0 1px;}
									&:after{top:-1px;right:-1px;border-width:1px 1px 0 0;}
									dd:last-child:before{content:'';bottom:-1px;left:-1px;border-width:0 0 1px 1px;}
									dd:last-child:after{content:'';bottom:-1px;right:-1px;border-width:0 1px 1px 0;}
								}
							}
						}
						.picture{}
					}
					.a-md6{
						.ctn{display:flex;}
						.in-box{
							flex:1;margin:.15rem;background-color:rgba(0,0,0,.8);position:relative;
							>video{position:absolute;object-fit:fill;}
						}
					}
					.a-md7{
						ul{
							display:flex;
							margin-top:.10rem;

							li{
								flex:1;height:.45rem;line-height:.43rem;text-align:center;
								font{font-size:.36rem;margin-right:.03rem;}
							}
							li:first-child{
								margin-right:.10rem;
							}
						}
						.ct-box{
							display:flex;
							.chart{
								position:relative;width:2.94rem;
							}
							dl{
								flex:1;display:flex;flex-direction:column;margin:.15rem;
								dd{
									flex:1;display:flex;flex-direction:column;
									span{position:relative;font-size:.16rem;padding-left:.12rem;}
									font{font-size:.34rem;margin-top:.04rem;}
								}

								dd:first-child{span{border-left:4px solid #44c2fd;}}
								dd:last-child{span{border-left:4px solid #00d6e8;}}
							}
						}
					}

					.a-md8{
						.scrolling4{
							dt,dd{
								display:grid;grid-template-columns:25% 25% 30% 20%;
							}
							dd{
								a{cursor:pointer;}
							}
						}
					}
					.a-md10{
						.scrolling4{
							position:absolute;top:0;left:0;height:100%;width:100%;overflow-y:auto;color:#e1ffff;
						}
						.scrolling4::-webkit-scrollbar{width:2px;}
						dt,dd{
							position:relative;
							margin:.12rem .12rem 0 .12rem;line-height:1;padding:.10rem .04rem;
							display:grid;grid-template-columns:25% 25% 25% 25%;text-align:center;

							&:before, &:after{position:absolute;top:0;height:100%;font-size:.22rem;color:#21f1fe;}
						}
						dt{background-color:rgba(1,35,62,.7);font-size:.16rem;}
						dd{
							background-color:rgba(2,115,165,.3);font-size:.16rem;line-height:.30rem;
							span:nth-child(2){color:#0dfdfe;font-size:.20rem;}
							span:nth-child(3){font-size:.30rem;}
							span:nth-child(4){font-size:.30rem;}
							a{cursor:pointer;}
							a.disabled{
								color:#666;cursor:default;
							}
						}
					}
					.a-md14{
						.ct-box{flex-direction:column;}
					}
					.a-md14.a-md4, .a-md15.a-md4{
						.scrolling4{
							dt,dd{grid-template-columns: 60% 40%;}
							dd span:nth-child(2) {
								font-size:.30rem;cursor:pointer;
							}
						}
					}
					.a-md15{
						.ct-box{flex-direction:column;}
					}
					.a-md17{
						.ct-box{
							flex-direction:column;
						}
					}
					.a-md18{
						.scrolling4::-webkit-scrollbar{width:2px;}
						.info-list{
							dd{
								display:flex;flex-direction:column;justify-content:center;
								border-bottom:1px solid #374d4a;margin:.06rem 0;padding:.10rem 0 .10rem .50rem;
								h5{font-weight:normal;color:#a0ebee;font-size:.16rem;margin-right:5px;}
								span{font-size:.16rem;display:inline-block;margin-right:5px;}
								h5, span, font, div{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-wrap:normal;}
								i{
									position:absolute;left:.10rem;width:.30rem;height:.24rem;
									display:flex;justify-content:center;
									&:before{
										content:"";position:absolute;height:0;width:0;bottom:0;
										border-width:.24rem .14rem;border-style:solid;
									}
									&:after{
										content:"!";position:absolute;font-style:normal;line-height:.30rem;font-size:.14rem;color:black;
									}
								}
								.level1{
									&:before{
										border-color:transparent transparent #F93C58 transparent;
									}
								}
								.level2{
									&:before{
										border-color:transparent transparent #FA953A transparent;
									}
								}
								.level3{
									&:before{
										border-color:transparent transparent #E9FA3C transparent;
									}
								}
								.level4{
									&:before{
										border-color:transparent transparent #3BAFFB transparent;
									}
								}
							}
						}
					}
					.a-md19{
						dd{
							span:nth-child(3){color:#0af3fa;}
							span:nth-child(4){cursor:pointer;}
						}
					}
					.a-md24{
						.item_2{
							select{background-color:transparent;color:#e1ffff;font-size:.16rem;}
							select:nth-child(1){width:60%;margin-right:.20rem;}
							select:nth-child(2){width:30%;}
							select:focus{outline:none;}
							option{color:#d8f9ff;background-color:rgba(1,35,62,.7);}
						}
					}
				}

				.b0_a, .b0_b{
				}

				.b0_a{
					.a-md2{height:3.80rem;}		// 人员
					.a-md3{height:3.80rem;}		// 环境
					.a-md5{height:2.80rem;}		// 实时
					.a-md6{height:2.90rem;}		// 监控

					.alarm-view{
						position:absolute;bottom:.2rem;left:50vw;height:.50rem;width:6rem;margin-left:-3rem;
						.fixd{
							position:relative;height:100%;width:100%;display:flex;align-items:center;
							background-color:rgba(0,0,0,.6);font-size:.15rem;
							padding:.05rem;
						}
						.lable{width:1rem;text-align:center;color:#54c3fb;}
						.photo-frame{
							position:relative;height:100%;width:100%;
							&:before, &:after, .in-box:before, .in-box:after{
								content:"";position:absolute;height:.10rem;width:.10rem;z-index:1;
								border-style:solid;border-color:#00AEF7;
							}
							&:before, &:after{top:-1px;}
							&:before{left:-1px;border-width:.02rem 0 0 .02rem;}
							&:after{right:-1px;border-width:.02rem .02rem 0 0;}
							.in-box{
								&:before, &:after{bottom:-1px;}
								&:before{left:-1px;border-width:0 0 .02rem .02rem;}
								&:after{right:-1px;border-width:0 .02rem .02rem 0;}
								ul{
									margin:0 .15rem;
									li{
										position:absolute;top:0;left:0;height:100%;width:100%;
										display:flex;justify-content:space-between;align-items:center;
										transform:scale(1);transform-origin:0px 0px;transform:translateY(100%);
									}
									h5{
										font-size:.15rem;
									}
									.is-animating{
										transition:transform .4s ease-in-out;
									}
									.scroll-in{
										transform:translateY(0%) scale(1);
									}
									.scroll-out{
										transform:translateY(-100%) scale(1);
									}

									.level1{
										color:#F93C58,
									}
									.level2{
										color:#FA953A,
									}
									.level3{
										color:#E9FA3C,
									}
									.level4{
										color:#3BAFFB,
									}
								}
							}
						}
					}
				}
	
				.b0_d{
					.a-md19{height:2.82rem;}
					.a-md20{height:3.80rem;}
					.a-md21{height:3.80rem;}
					.a-md22{height:2.82rem;}
					.a-md23{height:3.80rem;}
					.a-md24{height:3.80rem;}
				}
				.b0_e{
					div.b0_right{
						transform:none;width:3.8rem;
						.a-md40{
							min-height:7rem;margin-bottom:1.5rem;
							dd span:nth-child(1){
								overflow:hidden;text-overflow:ellipsis;word-break:break-all;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
							}
							dd span:nth-child(2){
								font-size:.25rem;
							}
						}
						.a-md10{
							dt,dd{
								margin:.10rem .12rem 0 .12rem;padding:.06rem .04rem;
								grid-template-columns:70% 30%;
								line-height:.30rem;
							}
						}
					}

					.side-footer{
						position:absolute;bottom:.30rem;left:0;height:0;width:19.2rem;
						display:flex;justify-content:center;
						.area-ctrl{
							position:absolute;bottom:0;height:auto;min-height:auto;user-select:none;
							dl{
								display:flex;
								dt{
									padding:0.12rem 0.22rem;font-size:.16rem;
									box-shadow:inset 0 0 0.15rem 0.05rem rgba(1, 95, 121, .8);
									background-color:rgba(0,0,0,.5);
									>span{margin-right:.20rem;}
								}
							}

							.el-switch{
								.el-switch__core{background-color:#ccc;}
							}

							.el-switch.is-checked{
								.el-switch__core{background-color:#1890ff;}
							}
						}
					}
				}

				div.el-date-editor{
					border-color:#2F8DC2;background:rgba(0,0,0,.5);
					input{background-color:transparent;color:#eee;}
					span{color:#aaa;width:20px;}
				}
			}

			.num_blue1{
				font-family:diget year;
				text-shadow:#00aef7 0px 0px .10rem;
			}
			.num_orange{
				font-family:diget year;
				text-shadow:#d9fa03 0px 0px 0.1rem;
			}
			.num_liuhuang{
				font-family:diget year;
				text-shadow:#C1FA00 0px 0px 0.1rem;
			}
			.num_qingse{
				font-family:diget year;
				text-shadow:#03CEE0 0px 0px 0.1rem;
			}
		}

		.scrolling4{position:absolute;top:0;left:0;height:100%;width:100%;overflow-y:auto;}
		.progress{position:relative;
			height:.15rem;overflow:visible;border-radius:.15rem;
			box-shadow:inset 0 1px 2px rgba(0,0,0,.1);
			border:1px solid #096d7d;
			box-sizing:content-box;text-align:center;line-height:10px;
		}
		.progress-bar{animation:reverse progress-bar-stripes 0.40s linear infinite, animate-positive 2s;
			border-radius:.15rem;
			position: relative;background-color: #5bc0de;background-image: -webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
			background-image: -o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
			background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
			-webkit-background-size:40px 40px;
			background-size:40px 40px;
			width:100%;height:100%;color:#fff;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease;font-size:.13rem;
			display:flex;align-items:center;justify-content:center;text-indent:40px;white-space:nowrap;
		}
		.progress .progress-value{display:block;padding:3px 7px;font-size:13px;color:#fff;border-radius:4px;background:#191919;border:1px solid #000;position:absolute;top:-40px;right:-10px;}
		@keyframes progress-bar-stripes{
			from{
				background-position:40px 0
			}
			to{
				background-position:0 0
			}
		}
		@keyframes animate-positive{0%{width:0;}}

		.half{
			flex:1;/* height:50%;width:100%; */display:flex;align-items:center;font-size:.15rem;
			.info{
				flex:1;display:flex;height:.73rem;margin:0 .20rem;border-radius:.73rem;
				background-image:linear-gradient(to right, transparent, rgba(2,93,148, .5), rgba(2,93,148, 1));
				li{
					flex:1;display:flex;flex-direction:column;justify-content:center;color:#fff;padding-left:.12rem;position:relative;
					font{margin-bottom:.05rem;font-size:.34rem;}
					em{font-style:normal;color:#a4f5f6;margin-left:.08rem;}
				}
				li:first-child{
					display:flex;align-items:center;
				}
				li:last-child:before{
					content:"";position:absolute;top:0;left:0;height:100%;
					border-width:0 0 0 2px;border-style:solid;
					border-image:linear-gradient(to bottom, transparent 15%, #286793 50%, transparent 85%) 1;
				}
				.chart-ctn{
					position:absolute;height:1.14rem;width:1.14rem;
				}
				.chart1{
					color:#3097fc;
				}
			}
		}
		.half.reverse{
			.info{
				flex-direction:row-reverse;
				background-image:linear-gradient(to right, rgba(60, 216, 216, .6), rgba(74, 216, 216, .3), transparent);
				li{padding-left:0.18rem;}
				li:last-child:before{
					left:auto;right:0;
					border-image:linear-gradient(to bottom, transparent 15%, #54909a 50%, transparent 85%) 1;
				}
			}
		}

		/* 弹窗背景图  */
		.popupBgImage{
			background-image:url('/static/images/frame1-min.png');
			background-repeat:no-repeat;background-position:center center;background-size:100% 100%;
		}

		/* 加载动画 */
		.loader {
			position:absolute;top:0;left:0;height:100%;width:100%;
			display:flex;justify-content:center;align-items:center;
			&:before{
				content:"";position:absolute;height:60px;width:60px;
				border: 4px solid #1276E3;
				border-left-color: transparent;
				border-bottom: 0;
				border-radius: 50%;
				animation:loader-1-outter 1s cubic-bezier(.42, .61, .58, .41) infinite;
			}
			&:after{
				content:"";position:absolute;height:40px;width:40px;
				border-radius: 50%;
				border: 4px solid #1276E3;
				border-right: 0;
				border-top-color: transparent;
				animation: loader-1-inner 1s cubic-bezier(.42, .61, .58, .41) infinite;
			}
		};

		//video:before{content:"";position:absolute;top:0;left:0;height:100%;width:auto;border:1px solid red;}


		/* 弹窗 */
		.morph1{
			.morphView{
				color:#fff;
				width:0;height:0;
				display:flex;justify-content:center;align-items:center;user-select:none;
xinzhedeai's avatar
xinzhedeai committed
3283
                position: relative;
3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431
				.content{
					position:absolute;bottom:0;background-color:rgba(0,0,0,.5);border:1px solid #3EB7EA;opacity:1;
				}

				.fixed{
					position:relative;width:5rem;height:1.10rem;margin:.25rem .10rem .10rem;

					.scrolling4{
						position:absolute;top:0;left:0;height:100%;width:100%;overflow-y:auto;color:#e1ffff;
						dt,dd{
							position:relative;
							margin-top:.12rem;line-height:1;padding:.04rem .08rem;
							display:grid;grid-template-columns:33.33% 33.33% 33.33%;text-align:center;

							&:before, &:after{position:absolute;top:0;height:100%;font-size:.22rem;color:#21f1fe;}
							&:before{content:"[";left:0;}
							&:after{content:"]";right:0;}
						}
						dt{background-color:rgba(1,35,62,.7);font-size:.16rem;}
						dd{
							background-color:rgba(2,115,165,.3);font-size:.15rem;
							.red{color:#f9480b;font-weight:bold;}
							.orange{color:#fa750c;}
							.yellow{color:#d9f900;}
							.blue{color:#14b5ff;}
						}
					}

					.scrolling4::-webkit-scrollbar{width:3px;}
				}
				.el-icon-circle-close{
					position:absolute;top:.01rem;right:.01rem;font-size:.25rem;cursor:pointer;
					color:#8CCEE6;
				}
				.el-icon-bell{
					position:absolute;height:.30rem;width:.30rem;
					display:flex;align-items:center;justify-content:center;
					border-radius: 1rem;
					border: 1px solid #10E2F3;
					opacity: 0;
					background-color: rgba(26, 93, 129, .6) !important;
					transform:scale(.5);
					&:before{
						font-size:.23rem;line-height:1;font-weight: bold;
						background-image:linear-gradient(to right, #3BD1F7, #049EC7, #B3E0ED);
						-webkit-background-clip: text;
						-webkit-text-fill-color: transparent;
					}
					&.close{display:none;}
				}
			}
			.f-prepare{		// 准备
				transition:transition .8s ease 0s;
				.content{
					transition:all .5s ease 0s;
				}
				.el-icon-bell{
					transition: all .5s ease 0s;
				}
			}
			.f-shrink{
				z-index:100;cursor:pointer;transform:scale(1.3);
				&.morphView{
					.content{
						transform:rotateX(0deg) rotateY(0deg) scaleY(0.1) scaleX(0.01);
						transform-origin:center bottom; opacity:0;
					}
				}
				.el-icon-bell{
					opacity:1; transform:scale(1);
				}
				animation:anim-shrink .8s ease both;
			}
			.f-anim-revert{
				//animation:anim-revert .5s ease both;
			}
			@-webkit-keyframes anim-shrink{
				0% {
					transform: translateY(0)
				}
				20% {
					transform: translateY(0)
				}
				100% {
					transform: translate3d(0rem, 0rem, 0rem) scale(1.0);
				}
			}
			@-webkit-keyframes anim-revert{
				0% {
					transform: translate3d(0rem, 14rem, 0rem);
				}
				100% {
					transform: translateY(0)
				}
			}
		}
	}

	/* 登录 */
	.ctn-place{
		background:no-repeat top center url('~@/assets/images/login_banel.png');background-size:100% 100%;
		display:flex;width:280px;height:300px;user-select:none;
		.inbox-range{
			flex:1;margin:23px 28px 0;
			.el-form{
				.title{margin:0 auto;text-align:center;color:#01d6fe;letter-spacing:6px;text-indent:4px;font-size:20px;}
				.t-last{margin:0 auto 20px;}
				.el-form-item{margin-bottom:25px;}
				>div:last-child{margin-top:45px;}
				.el-input__prefix{
					width:30px;left:0;font-size:20px;
					display:flex;align-items:center;justify-content:center;
				}
				.el-form-item__error{display:none;}
				.el-form-item__error.open{display:block}
			}
		}
	}

	@keyframes rotate{
		0%{
			transform: rotate(0)
		}
		100%{
			transform: rotate(360deg)
		}
	}

	@keyframes loader-1-outter {
		0% {
			-webkit-transform: rotate(0deg);
			transform: rotate(0deg);
		}
		100% {
			-webkit-transform: rotate(360deg);
			transform: rotate(360deg);
		}
	}
	@keyframes loader-1-inner {
		0% {
			-webkit-transform: rotate(0deg);
			transform: rotate(0deg);
		}
		100% {
			-webkit-transform: rotate(-360deg);
			transform: rotate(-360deg);
		}
	}
xinzhedeai's avatar
xinzhedeai committed
3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466
</style>

<style lang='scss'>
    // 20241207
    .optBtnWrapper{
        display: flex;
        gap: .1rem;
        position: absolute;
        right: -3.4rem;
        align-items: center;
        flex-direction: column;
        top: -0.7rem;
        transform: translateY(-50%);
        .button {
            padding: 0.1rem 0.2rem;
            font-size: 0.16rem;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
        .alarm {
            background-color: #f44336; /* 红色 */
        }
        .alarm:hover {
            background-color: #d32f2f; /* 深红色 */
        }
        .stop {
            background-color: #4caf50; /* 绿色 */
        }
        .stop:hover {
            background-color: #388e3c; /* 深绿色 */
        }
    }
3467
</style>