<template>
	<div class="Screen cm-layout">
		<div class="a_0">
			<div id="cesiumContainer" class="cesium-ctn"></div>
			<div class="a0_">
				<header id="header">
					<div class="b1_bg">
						<h2>高区应急管理平台</h2>
					</div>
					<div class="a0a_" id="a0a_">
						<ul>
							<li data-id="5" :class="{'active':navActive === 5}">风险分析管控</li>
							<li data-id="6" :class="{'active':navActive === 6}">隐患排查治理</li>
							<li data-id="7" :class="{'active':navActive === 7}">安全教育培训</li>
							<li data-id="8" :class="{'active':navActive === 8}">数据统计分析</li>
						</ul>
						<ul>
							<li data-id="1" :class="{'active':navActive === 1}">行业信息预警</li>
							<li data-id="2" :class="{'active':navActive === 2}">危险作业备案</li>
							<li data-id="3" :class="{'active':navActive === 3}">企业安全档案</li>
							<li data-id="4" :class="{'active':navActive === 4}">分类分级管理</li>
						</ul>
					</div>
					<div class="more">
						<ul>
							<li data-id="0" :class="{'active':navActive === 0}"></li>
							<li class="sys"><a href="javascript:void(0)"></a></li>
						</ul>
					</div>
					
					<!-- 
					<div class="home">
						<a class="el-icon-right" href="http://39.164.225.220:5002/#/login">进入后台</a>
					</div> -->
				</header>
			</div>
		</div>
		<div class="b_0">
			<section class="b0_" id="b0_">
				<div class="b0_a" :class="{'active':navActive === 0}">
					<div class="side b0_left" :class="{'show':view0.show}">
						<div class="a-md31" id="amd31">
							<div class="abs-full">
								<div class="m-tt">
									<h4>安全监管指标</h4>
								</div>
								<div class="ct-box">
									<div class="wrap"><ul>
										<li v-for="(item, i) in view0.aqjgzb"><h6>{{item.name}}</h6><font>{{item.value}}</font></li>
									</ul></div>
								</div>
							</div>
						</div>
						<div class="a-md32" id="amd32">
							<div class="abs-full">
								<div class="m-tt">
									<h4>企业隐患排查</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
										<dl class="scrolling4">
											<dt>
												<span>序号</span>
												<span>企业名称</span>
												<span>检查时间</span>
												<span>隐患问题</span>
											</dt>
											<dd v-for="(item, i) in view0.qyyhpc">
												<span>{{i}}</span>
												<span>{{item.companyName}}</span>
												<span>{{item.hdInspectDate}}</span>
												<span>{{item.hdName}}</span>
											</dd>
										</dl>
									</div>
								</div>
							</div>
						</div>
						<div class="a-md33" id="amd33">
							<div class="abs-full">
								<div class="m-tt">
									<h4>隐患分析预警</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="ft-ctn" id="footer">
						<ul>
							<li v-for="(item, i) in view0.footer" :class="{'active':i === view0.f_actv}" :data-id="i+1">
								<h5>{{item.name}}</h5>
								<span>{{item.value}}</span>
							</li>
						</ul>
					</div>
					<div class="side b0_right" :class="{'show':view0.show}">
						<div class="a-md34">
							<div class="abs-full">
								<div class="m-tt">
									<h4>上周工作安排</h4>
								</div>
								<div class="ct-box">
									<div class="ct-pl">
										<h4>工作总量</h4>
										<font>{{view0.szgzap.sum}}</font>
									</div>
									<div class="chart">
										<div class="wrap">
											<dl class="scrolling4">
												<dd v-for="(item, i) in view0.szgzap.list">
													<span>{{item.name}}</span>
													<div class="progress">
														<div class="progress-bar" :style="'width:'+item.ratio+'%'">
														</div>
													</div>
													<font>{{item.value}}</font>
												</dd>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="a-md32 a-md35" id="amd35">
							<div class="abs-full">
								<div class="m-tt">
									<h4>年度安全培训计划</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
										<!-- <dl class="scrolling4 items"> -->
										<dl class="scrolling4">
											<dt>
												<span>序号</span>
												<span>培训主题</span>
												<span>完成情况</span>
											</dt>
											<dd v-for="(item, i) in view0.ndaqpx">
												<span>{{item.rownum}}</span>
												<span>{{item.trainingTopic}}</span>
												<span>{{~~item.trainingStatus ? '已完成' : '未完成'}}</span>
											</dd>
										</dl>
									</div>
								</div>
							</div>
						</div>
						<div class="a-md36" id="amd36">
							<div class="abs-full">
								<div class="m-tt">
									<h4>企业演练情况</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_b" :class="{'active':navActive === 1}">
					<div class="side b0_left l-panel">
						<div class="menu-l1" id="amd37">
							<div class="rel-full">
								<div class="m-t1">
									<h4>行业信息预警</h4>
								</div>
								<div class="m-t2">
									<div></div>
								</div>
								<div class="m-t3">
									<h5>隐患分析排行</h5>
									<div class="ct-box">
										<div class="wrap">
											<dl class="list1 scrolling4">
												<dd v-for="(item, index) in view1.list37" :data-id="item.id">
													<span>{{index+1}}</span>
													<span>{{item.name}}</span>
													<span>{{item.num}}</span>
												</dd>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_c" :class="{'active':navActive === 2}">
					<div class="side b0_left l-panel">
						<div class="menu-l1" id="amd38">
							<div class="rel-full">
								<div class="m-t1">
									<h4>危险作业备案</h4>
								</div>
								<div class="m-t3">
									<h5>行业主管部门</h5>
									<div class="ct-box">
										<div class="wrap">
											<dl class="list1 scrolling4">
												<dd v-for="(item, index) in view2.list38" :data-id="item.id">
													<span>{{index+1}}</span>
													<span>{{item.name}}</span>
													<span>{{item.num}}</span>
												</dd>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_d" :class="{'active':navActive === 3}">
					<div class="side b0_left l-panel">
						<div class="menu-l1 menu-l2">
							<div class="rel-full">
								<div class="m-t1">
									<h4>企业安全档案</h4>
								</div>
								<ul class="m-t4 menu2">
									<li v-for="(item, i) in view3.menu2" :data-id="item.id" :class="{'active':!i}">
										<h5>{{item.num}}</h5>
										<span>{{item.name}}</span>
									</li>
								</ul>
							</div>
						</div>
						<div class="menu-l1 menu-l3">
							<div class="rel-full">
								<div class="m-t1">
									<h4>行业主管部门</h4>
								</div>
								<div class="m-t3">
									<div class="ct-box">
										<div class="wrap">
											<dl class="list1 scrolling4 menu3">
												<dd v-for="(item, index) in view3.list38" :data-id="item.id">
													<span>{{index+1}}</span>
													<span>{{item.name}}</span>
													<span>{{item.num}}</span>
												</dd>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_e" :class="{'active':navActive === 4}">
					<div class="side b0_left l-panel">
						<div class="menu-l2 menu-t7">
							<div class="rel-full">
								<ul class="m-t4 list">
									<li v-for="(item, i) in view4.menu1" :data-type="item.type" :class="{'active':!i}">
										<span>{{item.num}}</span>
									</li>

								</ul>
							</div>
						</div>
						<div class="menu-l1 menu-c7">
							<div class="rel-full">
								<div class="m-t1-1">
									<h4>{{view7.ctactvtt}}</h4>
								</div>
								<div class="m-t3">
									<div class="ct-box">
										<div class="wrap" :class="{'active':1}">
											<div class="m-sl">
												<span v-for="(item, i) in view4.menu2" :data-per="item.name" :class="{'active':item.name === view4.m2actv}">{{item.name}}<font>({{item.num}})</font></span>
											</div>
											<div class="m-sr">
												<dl class="list1 scrolling4 list3">
													<dd v-for="(item, index) in view4.menu3" :data-id="item.id">
														<span>{{index+1}}</span>
														<span>{{item.name}}</span>
														<span>{{item.num}}</span>
													</dd>
												</dl>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_f" :class="{'active':navActive === 5}">
					<div class="side b0_left l-panel">
						<div class="menu-l1 menu-l2">
							<div class="rel-full">
								<div class="m-t1">
									<h4>风险分析</h4>
								</div>
								<ul class="m-t4 menu2">
									<li v-for="(item, i) in view5.menu2" :data-id="item.id" :class="{'active':!i}">
										<h5>{{item.num}}</h5>
										<span>{{item.name}}</span>
									</li>
								</ul>
							</div>
						</div>
						<div class="menu-l1 menu-l3">
							<div class="rel-full">
								<div class="m-t1">
									<h4>行业主管部门</h4>
								</div>
								<div class="m-t3">
									<div class="ct-box">
										<div class="wrap">
											<dl class="list1 scrolling4 menu3">
												<dd v-for="(item, index) in view5.list38" :data-id="item.id">
													<span>{{index+1}}</span>
													<span>{{item.name}}</span>
													<span>{{item.num}}</span>
												</dd>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_g" :class="{'active':navActive === 6}">
					<div class="side b0_left l-panel">
						<div class="menu-l2 menu-l21">
							<div class="rel-full">
								<div class="m-t1">
									<h4>隐患统计</h4>
								</div>
								<div class="m-t2">
									<div></div>
								</div>
								<ul class="m-t4 list">
									<li v-for="(item, i) in view6.menu2" :data-id="item.id" :class="{'active':!i}">
										<h5>{{item.num}}</h5>
										<span>{{item.name}}</span>
									</li>
								</ul>
							</div>
						</div>
						<div class="menu-l1 menu-l3">
							<div class="rel-full">
								<div class="m-t1">
									<h4>行业主管部门</h4>
								</div>
								<div class="m-t3">
									<div class="ct-box">
										<div class="wrap">
											<dl class="list1 scrolling4 menu3">
												<dd v-for="(item, index) in view6.list38" :data-id="item.id">
													<span>{{index+1}}</span>
													<span>{{item.name}}</span>
													<span>{{item.num}}</span>
												</dd>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_h" :class="{'active':navActive === 7}">
					<div class="side b0_left l-panel">
						<div class="menu-l2 menu-t7">
							<div class="rel-full">
								<div class="m-t2">
									<div></div>
								</div>
								<ul class="m-t4 list">
									<li v-for="(item, i) in view7.menu2" :data-id="item.id" :class="{'active':!i}">
										<span>{{item.name}}</span>
									</li>
								</ul>
							</div>
						</div>
						<div class="menu-l1 menu-c7"">
							<div class="rel-full">
								<div class="m-t1-1">
									<h4>{{view7.ctactvtt}}</h4>
								</div>
								<div class="m-t3">
									<div class="ct-box">
										<div class="wrap" :class="{'active':view7.ctactv === 0}">
											<dl class="list1 scrolling4 list2">
												<dd v-for="(item, index) in view7.list38" :data-id="item.id">
													{{item.trainingTopic}}
												</dd>
											</dl>
										</div>
										<div class="wrap" :class="{'active':view7.ctactv === 1}">
											<div class="m-sl">
												<span data-id="0" class="active">参加培训企业</span>
												<span data-id="1">今日参加企业</span>
											</div>
											<div class="m-sr">
												<dl class="list1 scrolling4 list3">
													<dd v-for="(item, index) in view7.md2list" :data-id="item.id">
														<span>{{index+1}}</span>
														<span>{{item.name}}</span>
														<span>{{item.num}}</span>
													</dd>
												</dl>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="b0_i b0_a" :class="{'active':navActive === 8}">
					<div class="side b0_left" :class="{'show':view0.show}">
						<div class="a-md31" id="imd31">
							<div class="abs-full">
								<div class="m-tt">
									<h4>筛选条件</h4>
								</div>
								<div class="ct-box">
									<div class="wrap"></div>
								</div>
							</div>
						</div>
						<div class="a-md32" id="imd32">
							<div class="abs-full">
								<div class="m-tt">
									<h4>检查企业数量</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
						<div class="a-md33" id="imd33">
							<div class="abs-full">
								<div class="m-tt">
									<h4>行业安全隐患分布</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="side b0_right" :class="{'show':view0.show}">
						<div class="a-md27 a-md34" id="imd34">
							<div class="abs-full">
								<div class="m-tt">
									<h4>安全隐患类别分布</h4>
								</div>
								<div class="item_2 shadow1">
									<!-- <select>
										<option value="安全资料类">安全资料类</option>
										<option value="现场检查类">现场检查类</option>
									</select> -->
								</div>
								<div class="ct-box">
									<div class="chart">
										<div class="wrap">
										</div>
									</div>
								</div>
							</div>
						</div>

						<div class="a-md32 a-md35" id="imd35">
							<div class="abs-full">
								<div class="m-tt">
									<h4>安全隐患整改率</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
									</div>
								</div>
							</div>
						</div>
						<div class="a-md36" id="imd36">
							<div class="abs-full">
								<div class="m-tt">
									<h4>企业风险分级情况</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
									</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';

export default {
	data() {
		return {
			navActive:null,
			view0:{
				aqjgzb:[],
				qyyhpc:[],
				szgzap:{
					sum:0,
					list:[],
				},
				ndaqpx:[],
				footer:[],
				f_actv:0,
			},
			view1:{
				date:'',
				list37:[],
			},

			view2:{
				list38:[],
			},
			view3:{
				menu2:[],
				list38:[],
			},
			view4:{
				menu1:[],
				menu2:[],
				m1actv:0,
				m2actv:'A',
				menu3:[],
			},
			view5:{
				menu2:[],
				list38:[],
			},
			view6:{
				menu2:[],
				list38:[],
			},
			view7:{
				menu2:[{"name":"专家线下培训","num":0,"id":0},{"num":0,"id":1,"name":"企业自主培训"}],
				list38:[],
				ctactv:0,
				ctactvtt:'',
				md2list:[],
			},
			view8:{
				//
			},
			common:{},
		}
	},
	mounted() {
		var that = this;
		this.$nextTick(() => {
			var views = that.$el.querySelectorAll("#b0_>div");
			var header = that.$el.querySelector("#header");

			// 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, t.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.getCodeImg = function(){
					return reqApi.common.requst('get', t.LOCAL_API + '/auth/code');
				};

				m.getRegion = function(){
					return reqApi.common.requstEdge('get', '/api/large/screen/findTown', {}).then((res)=>{
						return res.body || []
					});
				};

				m.init = function(){
					m.createFilter().then(function(){
						// 加载地图
						that.createCesium(m, t, f);

						that.navActive = 0;
	
						/* m.first(); */ f(that.navActive), setTimeout(() => {m.tagModel = t.models[that.navActive];},50);

						// Event
						header.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;}, 50);
									};
								}else{
									var prevId = that.navActive;
									that.navActive = id;
									t.models[id] ? m.setTagModel(id, prevId) : setTimeout(() => {start(id);m.setTagModel(id, prevId);}, 100);
								};
							};
						};
						
						// 计时刷新
						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)
							};
						});
					});
				};

				// filter
				m.createFilter = function(){
					return m.getRegion().then(function(list){
						var checkHtml = '';
						for(var item of list){
							checkHtml += '<div><input type="checkbox" data-type="list" value="'+item.areaCode+'"/>'+item.name+'</div>';
						};

						t.filter = qf.UI.popWindow({
							name:'filter',
							container:that.$el,		// id || Element对象
							html:'<div class="filter"></div>',
							onload: function(o){
								var el = o.el, wrap = o.Wrap;
								o.setStyle(wrap, {
									display:'flex', top:'1.5rem', left:'50%',
									transformOrigin:'0px 0px',
									justifyContent:'center',
									height:0, width:0, zIndex:1,display:'none',
								});

								// 数据绑定
								Object.defineProperty(o, 'shrink', {
									set: function(f){
										if(f){
											wrap.classList.add('f-prepare');
											wrap.classList.add('f-shrink');
											wrap.classList.remove('f-anim-revert'); 
										}else{
											wrap.classList.add('f-anim-revert');
											setTimeout(() => {
												wrap.classList.remove('f-shrink'); 
												wrap.classList.remove('f-prepare');
											}, 200);
										};
									}
								});
								
								// <input type="checkbox" value="0" checked />全选</div>
								el.innerHTML = `<div class="limit">
									<div><input type="checkbox" value="0" />全选</div>
									`+checkHtml+` <i class="el-icon-news"></i></div><div class="el-icon-cold-drink"></div>`;

								var limit = el.firstElementChild;
								var fcheck = limit.querySelector("input[value='0']");
								var checks = limit.querySelectorAll("input[data-type='list']");
								var setChecks = function(f){
									for(var i=0, len=checks.length; i<len; i++){
										checks[i].checked = f
									};
								};
								o.getValues = function(){
									var arr = [];
									for(var item of checks){
										item.checked && arr.push(item.value);
									}; return o.values = arr;
								}, o.values = [];
								// 事件
								wrap.onclick = function(e){
									var tag = e.target || e.srcElement;
									if(tag.className === 'el-icon-news'){
										o.shrink = true;
									}else if(tag.className === 'el-icon-cold-drink'){
										o.shrink = false;
									}else if(tag.nodeName === 'INPUT'){
										var value = ~~tag.value;
										if(!value){
											setChecks(tag.checked)
										}else{
											fcheck.checked = 0
										};
										m.tagModel.reload && m.tagModel.reload({name:o.name, values:o.getValues()});
									};
								};
							},
						});
					});
				};

				// 登录权限获取
				(t.getInfo = function(){
					var url = t.LOCAL_API + '/auth/info';
					return reqApi.common.requst.call(that.$route, 'get', url).then((res)=>{
						if(!res.error && res.user){
							m.init();
						}else{
							m.loginView = qf.UI.popWindow({
								cover:true,
								coverFull: true,
								className:'login-ctn',
								//container:b0_e,		// id || Element对象
								//backgroundColor:'rgba(0,0,0,.4);backdrop-filter:blur(15px);',
								closeEvent:true,
								html:'<div class="liner"></div>',
								onload: function(v){
									m.loginView = v;
									var el = v.el;
									v.setStyle(v.Wrap, {height:'5.04rem', width:'9.12rem', zIndex:10, borderRadius:'.06rem',overflow:'hidden'});

									el.innerHTML = `<div class="l-left"><h3>Welcome!</h3><h4>高区应急综合管理平台</h4></div><div class="pop-login" ><div class="inbox-range"><div class="ctn-fix"><form class="el-form login-form el-form--label-left"><h3 class="title">登录</h3><div class="el-form-item is-required el-form-item--small"><div class="el-form-item__content" style=""><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><div class="el-form-item__error">用户名不能为空</div></div>
									<div class="el-form-item is-required el-form-item--small"><div class="el-form-item__content" style=""><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><div class="el-form-item__error">密码不能为空</div></div>
									<div class="el-form-item is-required el-form-item--small">
									<div class="el-form-item__content" style="display:flex;justify-content:space-between;">
									<div class="el-input el-input--small el-input--prefix" style="width:50%;">
									<input type="text" autocomplete="off" placeholder="验证码" class="el-input__inner">
									<span class="el-input__prefix el-icon-circle-check"></span></div>
									<div class="login-code"><img src=""></div>
									</div><div class="el-form-item__error">验证码不能为空</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){
										var itemContent = el.parentNode.parentNode;
										if(qf.trim(el.value)){
											return itemContent.nextElementSibling.classList.remove('open'), 1;
										}else{
											itemContent.nextElementSibling.classList.add('open');
											el.focus()
										};
									};

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

									// 验证码
									(m.loginView.refreshCodeImg = function(){
										m.getCodeImg().then((res)=>{
											var img = el.querySelector(".login-code>img");
											img.src = res.img;
											m.loginView.uuid = res.uuid;
										});
									})();

									m.loginView.loginCheck = function(){
										var inputs = m.loginView.inputs;
										var username = inputs[0], password = inputs[1], captcha = inputs[2];
										if(m.loginView.check(username) && m.loginView.check(password) && m.loginView.check(captcha)){
											var param = {
												username: username.value, password: encrypt(password.value),
												code:captcha.value, uuid: m.loginView.uuid,
											};
											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 || res.msg || '',
													});
													m.loginView.refreshCodeImg();
												};
											}).catch(function(e){
												console.log('catch ________________ ', e);
											});
										};
									};

									// 回车事件
									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();
									}else if(tag.nodeName === 'IMG'){
										m.loginView.refreshCodeImg();
									};
								},
								close: function(e){
									window.removeEventListener('keyup', m.loginView.keyup);
									delete m.loginView
								},
							});
						};
					});
				})();


				t.VueDateWidget = function(ctn, change){
					var toDay = new Date();
					var toMonth = new Date(toDay.getFullYear(), toDay.getMonth()-1, 1).getTime();
					var month = qf.Utils.Dates(toMonth).format('yyyy-MM-dd');
					var toDay = qf.Utils.Dates().format('yyyy-MM-dd');
					var daterange = [month, toDay];
					//var query = {daterange:daterange.join(','), sort:'date,desc'};

					// 时间渲染
					var dateObj = qf.Vue.renderTo.call(that, {
						el:ctn,
						name:'el-date-picker',
						//style: "width:380px",
						data:{
							'timeSpace':daterange,
						},
						attrs: {
							type: "daterange",
							"value-format": "yyyy-MM-dd",
							"range-separator": "至",
							"start-placeholder": "开始日期",
							"end-placeholder": "结束日期",
							clearable: ""
						},
						'value':'timeSpace',
						change: function(e) {
							if(e){
								// 刷新行业信息预警
								change && change(e)
							}else{
								setTimeout(() => {
									dateObj.timeSpace = daterange
								}, 500);
							};
						}
					});

					return dateObj;
				};
			}, (function(){
				var arr = [];
				for(var item of views){
					arr.push(function(t, f, i){
						f('init').models[i] = that['module'+i](this, t, f, i, views[i]);
					});
				}; return arr
			})());

			return ;

			// 禁右键
			document.addEventListener('contextmenu', function(e){
				if(e.button == 2){
					e.preventDefault();
					return false
				}
			});
		});
	},
	methods: {

		// 首页
		module0(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init'), thisApi = fm.models[dmIndex];
			
			// 单位类型
			m.ftype = 1;

			var amd33 = view.querySelector("#amd33");
			var wrap33 = amd33.querySelector(".wrap");
			var amd36 = view.querySelector("#amd36");
			var wrap36 = amd36.querySelector(".wrap");
			var footer = view.querySelector("#footer");

			// 安全监管指标
			m.aqjgzb = function(){
				var param = {
					//towns: (fm.filter && fm.filter.values || []).toString(),
					size:9,
				};
				return reqApi.common.requstEdge('get', '/api/dataAnalysis/analyzeSafetySupervisionIndicators', param).then((res)=>{
					return res.body || []
				});
			};
			// 企业隐患排查
			m.qyyhpc = function(){
				var param = {size:10,}, url = '/api/thHiddenDanger/enterpriseHiddenDangerCondition';
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					return res.body || []
				});
			};
			// 隐患分析预警
			m.yhfxyj = function(){
				var param = {size:10,}, url = '/api/enterpriseSafetyInspectionContent/industryInfoEWFive';
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					return res.body || []
				});
			};
			// 上周工作安排
			m.szgzap = function(){
				var url = '/api/thTownWorks/annualTownWorks';
				return reqApi.common.requstEdge('get', url, {}).then((res)=>{
					return res.body || []
				});
			};
			// 年度安全培训
			m.ndaqpx = function(){
				var url = '/api/expertTrainings/annualSafetyTraining';
				return reqApi.common.requstEdge('get', url, {}).then((res)=>{
					return res.body || []
				});
			};
			// 企业演练情况
			m.qyylqk = function(){
				var url = '/api/enterpriseDrillPlans/enterpriseExerciseSituation';
				return reqApi.common.requstEdge('get', url, {}).then((res)=>{
					return res.body || []
				});
			};
			// 单位分类统计(底部模块)
			m.dwfltj = function(){
				var url = '/api/large/screen/informationKindsSubjects';
				return reqApi.common.requstEdge('get', url, {}).then((res)=>{
					return res.body || []
				});
			};
			// 企业位置信息
			m.locationMessage = function(json){
				var param = json || {}, url = '/api/large/screen/findCompanyLocationMessage';
				param.type = m.ftype;
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					return res.body || []
				});
			};

			return (function(){
				// 监管指标
				m.aqjgzb().then(function(list){
					viewData.aqjgzb = list;
				});
				// 隐患排查
				m.qyyhpc().then(function(list){
					viewData.qyyhpc = list;
				});
				// 隐患分析
				m.yhfxyj().then(function(list){
					var data = [], colors = ['#2CAFFE', '#90ED7D', '#8085E9', '#F15C80', '#E4D354'];
					var len = list.length;
					for(var i=0; i<len; i++){
						var item = list[i]
						data.push({name:item.name, y:item.value, color:colors[i]})
					};
					var options = {
						chartConfig:{
							chart: {
								type: 'pie',
								options3d: {
									enabled: true,
									alpha: 50,
									beta: 0,
									viewDistance:100,
									depth: 0,
								},
								marginTop:0,
								marginLeft:0,
								marginBottom:0,
								spacingLeft:0,
								backgroundColor:'transparent',
							},
							title: {
								text: ''
							},
							tooltip: {
								pointFormat: '{series.name}: <b>{point.y}</b>'
							},
							plotOptions: {
								pie: {
									allowPointSelect: true,
									cursor: 'pointer',
									depth: 25,
									dataLabels: {
										enabled: true,
										format: '<span style="font-size:0.13rem;line-height:1;">{point.name}</span><br><span style="font-family:diget year;font-size:0.24rem;line-height:.14rem;color:{point.color};">{point.y}</soan>'
									}
								}
							},
							credits: {
								enabled: false
							},
							series: [{
								type: 'pie',
								name: '数量',
								dataLabels:{
									useHTML:true,
									borderWidth:0,
									style:{
										textOutline:'none',
										color: '#fff',
									},
								},
								data: data
							}]
						},
						isSeriesData:true,
						notExtendsOptions:true,
					};
					m.peroverviewChart = Highchart.template.high(wrap33, {}, options);
				});
				// 上周工作
				m.szgzap().then(function(list){
					var maxVal = 0, sum = 0;
					list.filter(function(item){
						var val = item.value;
						sum += val;
						maxVal = val > maxVal ? val : maxVal;
					});
					// 添加百分比
					maxVal = maxVal + 10;
					list.flatMap(function(item){
						item.ratio = ~~(item.value / maxVal * 100);
					});
					viewData.szgzap = {sum:sum, list:list};
				});
				// 安全培训
				m.ndaqpx().then(function(list){
					viewData.ndaqpx = list;
				});
				// 企业演练
				m.qyylqk().then(function(data){
					var opts = {
						chartConfig:{
							xAxis: {
								labels: {
									rotation: 0,  // 设置轴标签旋转角度
								},
							},
						},
					};
					Highchart.template.high(wrap36, data, opts);
				});

				// 首次加载
				(m.init = function(){
					// 底部模块
					m.dwfltj().then(function(list){
						viewData.footer = list;
					});

					// 底部模块事件
					footer.onclick = function(e){
						var tag = e.target || e.srcElement;
						var li = tag.nodeName === 'LI' ? tag : tag.parentNode;
						qf.UI.tabStyleActive(footer, li, 'active');
						m.ftype = li.dataset.id;


						// 隐藏其它标记点
						self.Entities.setMarkers({});

						// 加载数据
						fm.models[dmIndex].reload({name:'filter', values:fm.filter.values});
					};
				})();

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

				return {
					reload: function(o){
						//t.loadViewVisual();
						o = o || fm.filter;
						if(o && o.name === 'filter'){
							var values = o.values;
							m.locationMessage({town:values.toString()}).then(function(list){
								var dictkey = 'companyId';
								if(list[0] && list[0].type > 1){
									dictkey = 'typeId';
									list.find(function(item){
										item[dictkey] = item.type + '_' + item.companyId;
									});
								};
								
								var dict = qf.Utils.arrayToJsonDict(list, dictkey, 1);
								var bbdMap = self.Entities.getBbdCollection();
								var dk0 = Object.keys(dict)[0];
								if(dk0 && !bbdMap[dk0]){
									

									// 添加标记点
									self.Entities.addMarkers(list);
								}else{
									self.Entities.setMarkers(dict);
								};
							});
						};

						var mLayer = self.commonLayer(dmIndex);
						mLayer.enterpriseInfo.close();
					},
					timerUpdate: function(){
						m.loadData()
					},
					mapClick: function(pick){
						var entity = pick.id;
						var id = pick.id, entity = pick.primitive;
						var position = entity.position;
						var item = self.Entities.getBbdCollection()[id].data;
						var amd8View = qf.UI.popWindow({
							pointer:{
								point:'bottom',
								show:true,
								x:80,
							},
							closeButton:{},
							close: function(){
								fg3d.Entity.remove(entity);
							},
							container:document.createElement('div'),		// id || Element对象
							html:'<div class="popupBgImage" style="color:#fff;width:150px;font-size:12px;padding:10px;">'+item.companyName+'<div style="margin-top:15px;text-align:right;"></div></div>',
							onload: function(md){
								var el = md.el;
							},
						});
						
						// 创建窗口
						var map8View = new fg3d.Plugins.View(position, amd8View.Wrap, {
							render: function(){
								return {
									position:position,
									y:-45,
									x:-90,
								};
							},
						});
					},
					unload: function(){
						//t.unload();

						// 隐藏所有标记
						self.Entities.setMarkers({});
					},
					resize: function(){
						m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},
		
		// 行业预警信息
		module1(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu();

			var amd37 = view.querySelector("#amd37");
			var t2 = amd37.querySelector(".m-t2");
			var amd37dl = amd37.querySelector("dl");
			var amd38 = view.querySelector("#amd38");
			
			// 日期渲染
			var dateObj = fm.VueDateWidget(t2.firstElementChild, function(){
				// 刷新行业信息预警
				m.loadIndustryInfoEW();
			});

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 请求隐患分析排行
			m.reqIndustryInfoEW = function(values){
				var param = {
					dateString: dateObj.timeSpace.toString(),
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', '/api/enterpriseSafetyInspectionContent/industryInfoEW', param).then((res)=>{
					return res.body || []
				});
			};
			// 请求行业主管部门
			m.reqCountEachIcdEnt = function(req){
				var param = {
					dateString: dateObj.timeSpace.toString(),
					towns: (fm.filter && fm.filter.values || []).toString(),
					id:req.id,
				};
				var l1 = qf.UI.loading({zIndex:2051, timer:10000});
				return reqApi.common.requstEdge('get', '/api/dataAnalysis/countEachIcdEnt', param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};
			// 请求行业分类
			m.reqCountEachIndEnt = function(req){
				var param = {
					dateString: dateObj.timeSpace.toString(),
					towns: (fm.filter && fm.filter.values || []).toString(),
					itId:req.itId,
					icdId:req.icdId,
				};
				return m.requst('get', '/api/dataAnalysis/countEachIndEnt', param);
			};
			// 请求企业列表
			m.reqFindEns = function(req){
				var param = {
					dateString: dateObj.timeSpace.toString(),
					towns: (fm.filter && fm.filter.values || []).toString(),
					itId:req.itId,
					indId:req.indId,
				};
				return m.requst('get', '/api/dataAnalysis/findEns', param);
			};

			// 请求企业位置信息
			m.reqCompanyPoint = function(id){
				return m.requst('get', '/api/large/screen/findCompanyHdLocationDe', {companyId: id});
			};
			
			m.eventActive = function(row, ctn){
				var active = ctn.querySelector(".active");
				active && active.classList.remove('active');
				row.classList.add('active');
			};
			
			return (function(){
				// 主模块视角
				t.loadViewVisual = function(){
					// 删除数据
					self.Entities.removeAll();
					
					// 创建模型
					m.createModel();
				};
				
				// 获取数据并渲染
				m.loadIndustryInfoEW = function(){
					var l1 = qf.UI.loading({zIndex:2051, timer:10000});
					m.reqIndustryInfoEW().then(function(list){
						l1.close();
						viewData.list37 = list;
					});
				};

				var popupHooks = {
					'popupView1': {
						title:'行业主管部门',
						request:function(req){
							var param = {
								dateString: dateObj.timeSpace.toString(),
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:req.id,
							};
							return m.requst('get', '/api/dataAnalysis/countEachIcdEnt', param);
						},
					},

					'popupView2': {
						title:'行业分类',
						request:function(req){
							var param = {
								dateString: dateObj.timeSpace.toString(),
								towns: (fm.filter && fm.filter.values || []).toString(),
								itId:req.itId,
								icdId:req.icdId,
							};
							return m.requst('get', '/api/dataAnalysis/countEachIndEnt', param);
						},
					},

					'popupView3': {
						title:'企业列表',
						request:function(req){
							var param = {
								dateString: dateObj.timeSpace.toString(),
								towns: (fm.filter && fm.filter.values || []).toString(),
								itId:req.itId,
								indId:req.indId,
							};
							return m.requst('get', '/api/dataAnalysis/findEns', param);
						},
					},
				};


				// 首次加载
				(m.init = function(){
					// evnet
					amd37dl.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							Menus.listTrigger({id:dd.dataset.id}, dd, amd37dl, 'popupView1', m, popupHooks);
						};
					};
					
					// 创建企业信息模块
					m.commonLayer = self.commonLayer();
				})();

				// 栏目数据加载
				m.timerUpdate = function(){
				};

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 清除标记View
						Menus.onlyMarkView && Menus.onlyMarkView.remove();
						
						// 获取行业预警
						m.loadIndustryInfoEW();
					},
					timerUpdate: function(){
						m.timerUpdate()
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭菜单
						Menus.close();
						// 关闭标记
						Menus.tagBillboard && (Menus.tagBillboard.show = false);
						// 清除标记View
						Menus.onlyMarkView && Menus.onlyMarkView.remove();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},

		// 危险作业备案
		module2(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu();

			
			var amd38 = view.querySelector("#amd38");
			var amd38dl = amd38.querySelector("dl");

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};


			// 请求隐患分析排行
			m.reqIndustryInfoEW = function(values){
				var param = {
					//dateString: dateObj.timeSpace.toString(),
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', '/api/dangerJobReport/countEachDeptEnt', param).then((res)=>{
					return res.body || []
				});
			};

			return (function(){
				
				// 获取数据并渲染
				m.loadIndustryInfoEW = function(){
					var l1 = qf.UI.loading({zIndex:2051, timer:10000});
					m.reqIndustryInfoEW().then(function(list){
						l1.close();
						viewData.list38 = list;
					});
				};
				
				//
				var popupHooks = {
					'popupView1': {
						title:'行业分类',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:req.id,
							};
							return m.requst('get', '/api/dangerJobReport/countEachIcdEnt', param);
						},
					},
					'popupView2': {
						title:'企业列表',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								emergencyIndustries:req.icdId,
							};
							return m.requst('get', '/api/dangerJobReport/findEns', param);
						},
					},
					'popupView3': {
						title:'备案列表',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								companyId:req.indId,
							};
							return m.requst('get', '/api/dangerJobReport/companyId', param);
						},
						setValue: function(list){
							var dds = '';
							for(var item of list){
								var files = JSON.stringify(item.filePathList || []);
								dds += '<dd data-id="'+item.id+'" data-file='+files+'>'+item.name+'</dd>';
							}; return dds
						},
						onclick: function(tag){
							var files = JSON.parse(tag.dataset.file || '[]');
							qf.UI.popWindow({
								name:'filePreview',
								container:view,		// id || Element对象
								closeButton:true,
								close: function(){},
								html:'<div style="display:flex;color:#fff;border:1px solid #3EB7EA;height:100%;width:100%;background-color:rgba(2,12,57,.8);"></div>',
								onload: function(o){
									var el = o.el;
									o.setStyle(o.Wrap, {display:'flex',width:'15rem',height:'80vh',left:'9.6rem',marginLeft:'-7.5rem', marginTop:'-40vh'});
									
									el.innerHTML = `<div style="position:relative;flex:1;margin:30px;">
										<div class="scrolling4" style="text-align:center;background:#fff;padding:10px;"></div>
									</div>`;
									var imgs = '';
									for(var file of files){
										imgs += '<img src="'+fm.LOCAL_API+'/'+file+'"/>';
									};
									el.firstElementChild.firstElementChild.innerHTML = imgs;
								},
							});
						},
					},
				};

				// 首次加载
				(m.init = function(){
					// evnet
					amd38dl.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							Menus.listTrigger({id:dd.dataset.id}, dd, amd38dl, 'popupView1', m, popupHooks);
						};
					};
				})();

				// 栏目数据加载
				m.timerUpdate = function(){};

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 清除标记View
						//Menus.onlyMarkView && Menus.onlyMarkView.remove();
						
						// 获取危险作业信息
						m.loadIndustryInfoEW();
					},
					timerUpdate: function(){
						m.timerUpdate()
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭标记
						Menus.tagBillboard && (Menus.tagBillboard.show = false);
						// 清除标记View
						Menus.onlyMarkView && Menus.onlyMarkView.remove();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},
		
		// 企业安全档案
		module3(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu();

			var menu2 = view.querySelector(".menu2");
			var menu3 = view.querySelector(".menu3");

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 请求安全档案主菜单
			m.reqAnalyzeCategory = function(values){
				var param = {
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', '/api/enterpriseCertificate/analyzeCategory', param).then((res)=>{
					return res.body || []
				});
			};

			// 行业主管部门
			m.reqAnalyzeCategoryDept = function(id){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					id:id,
				};
				return reqApi.common.requstEdge('get', '/api/enterpriseCertificate/analyzeCategoryDept', param).then((res)=>{
					return res.body || []
				});
			};

			return (function(){
				// 加载数据
				m.loadMenu2 = function(){
					var l1 = qf.UI.loading({zIndex:2051, timer:10000});
					m.reqAnalyzeCategory().then(function(list){
						l1.close();
						viewData.menu2 = list;
						m.menu1id = m.menu1id || list[0].id;
						m.loadMenu3(m.menu1id);
					});
				};
				// 主管部门
				m.loadMenu3 = function(id){
					m.reqAnalyzeCategoryDept(id).then(function(list){
						viewData.list38 = list;

						Menus.popup1 && Menus.popup1.remove()
					});
				};

				//
				var popupHooks = {
					'popupView1': {
						title:'行业分类',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:m.menu1id,
								icdId:req.id,
							};
							return m.requst('get', 'api/enterpriseCertificate/analyzeCategoryDeptIndustry', param);
						},
					},
					'popupView2': {
						title:'企业列表',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:m.menu1id,
								emergencyIndustries:req.icdId,
							};
							return m.requst('get', '/api/enterpriseCertificate/analyzeCategoryDeptIndustryCom', param);
						},
					},
					'popupView3': {
						title:'备案列表',
						request:function(req){
							var param = {
								companyId:req.indId,
							};
							return m.requst('get', '/api/enterpriseCertificate/findCertificateName', param);
						},
						setValue: function(list){
							var dds = '';
							for(var item of list){
								dds += '<dd data-id="'+item.id+'" data-file='+item.filePath+'>'+item.name+'</dd>';
							}; return dds
						},
						onclick: function(tag){
							//var files = JSON.parse(tag.dataset.file);
							qf.UI.popWindow({
								name:'filePreview',
								container:view,		// id || Element对象
								closeButton:true,
								close: function(){},
								html:'<div style="display:flex;color:#fff;border:1px solid #3EB7EA;height:100%;width:100%;background-color:rgba(2,12,57,.8);"></div>',
								onload: function(o){
									var el = o.el;
									o.setStyle(o.Wrap, {display:'flex',width:'15rem',height:'80vh',left:'9.6rem',marginLeft:'-7.5rem', marginTop:'-40vh', zIndex:'10'});
									
									el.innerHTML = `<div style="position:relative;flex:1;margin:30px;">
										<div class="scrolling4" style="text-align:center;background:#fff;padding:10px;"><img src="`+fm.LOCAL_API+`/`+tag.dataset.file+`" style="width:100%"/></div>
									</div>`;
								},
							});
						},
					},
				};

				// 首次加载
				(m.init = function(){
					// evnet
					menu2.onclick = function(e){
						var tag = e.target || e.srcElement;
						qf.UI.tabStyleActive(menu2, tag, 'active', function(){
							m.menu1id = ~~tag.dataset.id;
							m.loadMenu3(m.menu1id);
						});
					};

					// evnet
					menu3.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							Menus.listTrigger({id:dd.dataset.id}, dd, menu3, 'popupView1', m, popupHooks);
						};
					};
				})();

				// 栏目数据加载
				m.timerUpdate = function(){};

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 获取安全档案主菜单
						m.loadMenu2();
					},
					timerUpdate: function(){
						m.timerUpdate()
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭标记
						Menus.tagBillboard && (Menus.tagBillboard.show = false);
						// 清除标记View
						Menus.onlyMarkView && Menus.onlyMarkView.remove();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},
		
		// 分类分级
		module4(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu2();
			
			var ctBox = view.querySelector(".ct-box");
			var menul2 = view.querySelector(".menu-l2");
			var menu2List = menul2.querySelector(".list");
			var mt3 = view.querySelector(".m-t3");
			var list3 = mt3.querySelector(".list3");

			var msl = ctBox.lastElementChild.firstElementChild;

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 菜单一
			(m.reqPerRegNum = function(type){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', '/api/regPer/perRegNum', param).then((res)=>{
					var list = res.body || [];
					m.reg = list && list[0].type || 1;
					
					m.reqPerPerNum();
					viewData.menu1 = res.body || [];
				});
			})();
			
			// 菜单二
			m.reqPerPerNum = function(reg){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					reg: m.reg
				};
				return reqApi.common.requstEdge('get', '/api/regPer/perPerNum', param).then((res)=>{
					var list = res.body || [];
					m.per = list && list[0].name || 'A';
					viewData.menu2 = list;
					m.reqPerIcdNum();
				});
			};

			// 菜单三
			m.reqPerIcdNum = function(){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					reg: m.reg,
					per: m.per,
				};
				return reqApi.common.requstEdge('get', '/api/regPer/perIcdNum', param).then((res)=>{
					viewData.menu3 = res.body || [];
				});
			};
			
			return (function(){
				// 加载数据
				m.loadMenu2 = function(){
					m.loadMenu3(self.view7.ctactv);
				};

				//menuHook
				var popupHooks = [
					{
						name:'popupView1',
						title:'行业分类',
						style:{display:'flex',top:'0',right:'-2.9rem', maxHeight:'100%'},
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:req.id,
								reg: m.reg,
								per: m.per,
							};
							return m.requst('get', '/api/regPer/perIndNum', param);
						},
					},
					{
						name:'popupView2',
						title:'企业分类',
						maxHeight: '38vh',
						getLists: function(list){
							var dds = '';
							for(var item of list){
								dds += '<dd data-id="'+item.company_id+'">'+item.company_name+'</dd>';
							}; return dds
						},
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:req.indId,
								reg: m.reg,
								per: m.per,
							};
							return m.requst('get', '/api/regPer/findComs', param);
						},
					},
				];

				// 首次加载
				(m.init = function(){
					// evnet
					menu2List.onclick = function(e){
						var tag = e.target || e.srcElement;
						qf.UI.tabStyleActive(menu2List, tag, 'active', function(){
							viewData.ctactv = ~~tag.dataset.id;
							if(!viewData.ctactv){
								
							}else{
								m.reqDrillNum(m.menu2date)
							};
						});
					};

					// 子 tab
					msl.onclick = function(e){
						var tag = e.target || e.srcElement;
						m.per = tag.dataset.per;
						viewData.m2actv = m.per;
						m.reqPerIcdNum();
						// 关闭菜单
						Menus.popup1 && Menus.popup1.remove();
					};

					list3.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							m.typeId = dd.dataset.id;
							Menus.listTrigger({id:m.typeId}, dd, list3, m, popupHooks, 0);
						};
					};
				})();

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 更新企业自主培训
						m.reqPerRegNum(m.menu2date)
					},
					timerUpdate: function(){
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭菜单
						Menus.close();
						// 关闭标记
						Menus.tagBillboard && (Menus.tagBillboard.show = false);
						// 清除标记View
						Menus.onlyMarkView && Menus.onlyMarkView.remove();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},

		// 风险分析管控
		module5(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu();

			var menu2 = view.querySelector(".menu2");
			var menu3 = view.querySelector(".menu3");

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 请求安全档案主菜单
			m.reqAnalyzeCategory = function(values){
				var param = {
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', '/api/riskControl/countEnNum', param).then((res)=>{
					return res.body || []
				});
			};

			// 行业主管部门
			m.reqAnalyzeCategoryDept = function(id){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					id:id,
				};
				return reqApi.common.requstEdge('get', '/api/riskControl/countIcdEnNum', param).then((res)=>{
					return res.body || []
				});
			};

			return (function(){
				// 加载数据
				m.loadMenu2 = function(){
					var l1 = qf.UI.loading({zIndex:2051, timer:10000});
					m.reqAnalyzeCategory().then(function(list){
						l1.close();
						viewData.menu2 = list;
						m.menu1id = m.menu1id || list[0].id;
						m.loadMenu3(m.menu1id);
					});
				};
				// 主管部门
				m.loadMenu3 = function(id){
					m.reqAnalyzeCategoryDept(id).then(function(list){
						viewData.list38 = list;

						Menus.popup1 && Menus.popup1.remove()
					});
				};

				//
				var popupHooks = {
					'popupView1': {
						title:'行业分类',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:m.menu1id,
								icdId:req.id,
							};
							return m.requst('get', '/api/riskControl/countIndEnNum', param);
						},
					},
					'popupView2': {
						title:'企业列表',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:m.menu1id,
								emergencyIndustries:req.icdId,
							};
							return m.requst('get', '/api/riskControl/countIndEn', param);
						},
					},
				};

				// 首次加载
				(m.init = function(){
					// evnet
					menu2.onclick = function(e){
						var tag = e.target || e.srcElement;
						qf.UI.tabStyleActive(menu2, tag, 'active', function(){
							m.menu1id = ~~tag.dataset.id;
							m.loadMenu3(m.menu1id);
						});
					};

					// evnet
					menu3.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							Menus.listTrigger({id:dd.dataset.id}, dd, menu3, 'popupView1', m, popupHooks);
						};
					};
				})();

				// 栏目数据加载
				m.timerUpdate = function(){};

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 获取安全档案主菜单
						m.loadMenu2();
					},
					timerUpdate: function(){
						m.timerUpdate()
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭菜单
						Menus.close();
						// 关闭标记
						Menus.tagBillboard && (Menus.tagBillboard.show = false);
						// 清除标记View
						Menus.onlyMarkView && Menus.onlyMarkView.remove();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},

		// 隐患排查治理
		module6(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu();

			var menu2 = view.querySelector(".menu-l2");
			var t2 = menu2.querySelector(".m-t2");
			var menu2List = menu2.querySelector(".list");
			var menu3 = view.querySelector(".menu3");
			
			// 日期渲染
			var dateObj = fm.VueDateWidget(t2.firstElementChild, function(){
				// 刷新行业信息预警
				m.loadMenu2();
			});

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 请求隐患统计主菜单
			m.reqCountHdEnNum = function(){
				var param = {
					dateString: dateObj.timeSpace.toString(),
					towns: (fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', '/api/hiddenDangerInspection/countHdEnNum', param).then((res)=>{
					return res.body || []
				});
			};

			// 行业主管部门
			m.reqCountHdIcdEnNum = function(id){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					dateString: dateObj.timeSpace.toString(),
					id:id,
				};
				return reqApi.common.requstEdge('get', '/api/hiddenDangerInspection/countHdIcdEnNum', param).then((res)=>{
					return res.body || []
				});
			};

			return (function(){
				// 加载数据
				m.loadMenu2 = function(){
					var l1 = qf.UI.loading({zIndex:2051, timer:10000});
					m.reqCountHdEnNum().then(function(list){
						l1.close();
						viewData.menu2 = list;
						m.menu1id = m.menu1id || list[0].id;
						m.loadMenu3(m.menu1id);
					});
				};
				// 主管部门
				m.loadMenu3 = function(id){
					m.reqCountHdIcdEnNum(id).then(function(list){
						viewData.list38 = list;

						Menus.popup1 && Menus.popup1.remove()
					});
				};

				//menuHook
				var popupHooks = {
					'popupView1': {
						title:'行业分类',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:m.menu1id,
								icdId:req.id,
							};
							return m.requst('get', '/api/hiddenDangerInspection/countHdIndEnNum', param);

							
						},
					},
					'popupView2': {
						title:'企业列表',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								id:m.menu1id,
								emergencyIndustries:req.icdId,
							};
							return m.requst('get', '/api/hiddenDangerInspection/countHdIndEn', param);
						},
					},
				};

				// 首次加载
				(m.init = function(){
					// evnet
					menu2List.onclick = function(e){
						var tag = e.target || e.srcElement;
						qf.UI.tabStyleActive(menu2List, tag, 'active', function(){
							m.menu1id = ~~tag.dataset.id;
							m.loadMenu3(m.menu1id);
						});
					};

					// evnet
					menu3.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							Menus.listTrigger({id:dd.dataset.id}, dd, menu3, 'popupView1', m, popupHooks);
						};
					};
				})();

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 获取安全档案主菜单
						m.loadMenu2();
					},
					timerUpdate: function(){
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭菜单
						Menus.close();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},
		
		// 安全教育
		module7(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');
			var Menus = this.cascadeMenu2();
			
			var ctBox = view.querySelector(".ct-box");
			var menul2 = view.querySelector(".menu-l2");
			var t2 = menul2.querySelector(".m-t2");
			var menu2List = menul2.querySelector(".list");
			var mt3 = view.querySelector(".m-t3");
			var list2 = mt3.querySelector(".list2");
			var list3 = mt3.querySelector(".list3");

			var msl = ctBox.lastElementChild.firstElementChild;
			
			// 日期渲染
			var dateObj = fm.VueDateWidget(t2.firstElementChild, function(){
				// 刷新行业信息预警
				//m.loadMenu2();
			});

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 专家线下培训列表
			m.reqCountHdIcdEnNum = function(id){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					//dateString: dateObj.timeSpace.toString(),
					//id:id,
				};
				return reqApi.common.requstEdge('get', '/api/expertTrainings/annualSafetyTraining', param).then((res)=>{
					return res.body || []
				});
			};

			// 企业自主培训
			m.reqDrillNum = function(date){
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
					date: date,
				};
				return reqApi.common.requstEdge('get', '/api/trainNature/large', param).then((res)=>{
					var list = res.body || [];
					viewData.md2list = list;
				});
			}
			

			return (function(){
				// 加载数据
				m.loadMenu2 = function(){
					m.loadMenu3(self.view7.ctactv);
				};

				//menuHook
				var popupHooks = [
					{
						name:'popupView1',
						title:'行业主管部门',
						style:{display:'flex',top:'0',right:'-2.9rem', maxHeight:'100%'},
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								nature_id:req.id,
								date:m.menu2date,
							};
							return m.requst('get', '/api/trainImage/countEnNum', param);
						},
					},
					{
						name:'popupView2',
						title:'企业分类',
						maxHeight: '38vh',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								nature_id:m.typeId,
								icdId:req.indId,
								date:m.menu2date,
							};
							return m.requst('get', '/api/trainImage/countIcdEnNum', param);
						},
					},
					{
						name:'popupView3',
						title:'企业列表',
						maxHeight: '60vh',
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								nature_id:m.typeId,
								emergencyIndustries:req.indId,
							};
							return m.requst('get', '/api/trainImage/countIndEn', param);
						},
						getLists: function(list){
							var dds = '';
							for(var item of list){
								dds += '<dd data-id="'+item.id+'">'+item.name+'</dd>';
							}; return dds
						},
						onclick: function(tag, tm){
							tm.locationCompany(tag.dataset.id);
						},
					},
					{
						name:'popupView4',
						title:'培训列表',
						style:{display:'flex',top:'.8rem',right:'-2.9rem'},
						request:function(req){
							var param = {
								towns: (fm.filter && fm.filter.values || []).toString(),
								nature_id:m.typeId,
								companyId:req.indId,
							};
							return m.requst('get', '/api/trainImage/company', param);
						},
						getLists: function(list){
							var dds = '';
							for(var item of list){
								var files = JSON.stringify(item.files);
								dds += '<dd data-id="'+item.id+'" data-files=\''+files+'\'>'+item.briefIntroduction+'</dd>';
							}; return dds
						},
						onclick: function(tag){
							var list = JSON.parse(tag.dataset.files);
							var dds = '';
							for(var item of list){
								dds += '<dd><h4 style="color:#000;text-align:left;font-size:18px;">'+item.name+'</h4><img src="'+fm.LOCAL_API+'/'+item.path+'" style="width:100%"/></dd>';
							};
							qf.UI.popWindow({
								name:'filePreview',
								container:view,		// id || Element对象
								closeButton:true,
								close: function(){},
								html:'<div style="display:flex;color:#fff;border:1px solid #3EB7EA;height:100%;width:100%;background-color:rgba(2,12,57,.8);"></div>',
								onload: function(o){
									var el = o.el;
									o.setStyle(o.Wrap, {display:'flex',width:'15rem',height:'80vh',left:'9.6rem',marginLeft:'-7.5rem', marginTop:'-40vh', zIndex:'10'});
									
									el.innerHTML = `<div style="position:relative;flex:1;margin:30px;">
										<div class="scrolling4" style="text-align:center;background:#fff;padding:10px;"><dl>`+dds+`</dl></div>
									</div>`;
								},
							});

							// 隐藏菜单
							//Menus.popup1.hide();
						},
					},
				];

				// 首次加载
				(m.init = function(){
					// 二级列表标题
					viewData.ctactvtt = viewData.menu2[0].name;

					// 专家线下培训列表
					m.reqCountHdIcdEnNum().then(function(list){
						viewData.list38 = list;
					});

					// evnet
					menu2List.onclick = function(e){
						var tag = e.target || e.srcElement;
						qf.UI.tabStyleActive(menu2List, tag, 'active', function(){
							viewData.ctactv = ~~tag.dataset.id;
							if(!viewData.ctactv){
								
							}else{
								m.reqDrillNum(m.menu2date)
							};
						});
					};

					// 子 tab
					msl.onclick = function(e){
						var tag = e.target || e.srcElement;
						qf.UI.tabStyleActive(msl, tag, 'active', function(){
							m.menu2date = ~~tag.dataset.id ? 'today' : void 0;
							m.reqDrillNum(m.menu2date);

							// 关闭菜单
							Menus.popup1 && Menus.popup1.remove();
						});
					};

					// list2
					list2.onclick = function(e){
						var tag = e.target || e.srcElement;
		
						if(tag.nodeName === 'DD'){
							m.requst('get', '/api/expertTrainings/getInfo', {id:tag.dataset.id}).then((res)=>{
								var pictures = res.trainingPicture;
								var imgs = '';
								for(var img of pictures){
									imgs += '<img src="data:image/jpg;base64,'+img+'" style="width:100%"/>';
								};

								qf.UI.popWindow({
									name:'filePreview',
									container:view,		// id || Element对象
									closeButton:true,
									close: function(){},
									html:'<div style="display:flex;color:#fff;border:1px solid #3EB7EA;height:100%;width:100%;background-color:rgba(2,12,57,.8);"></div>',
									onload: function(o){
										var el = o.el;
										o.setStyle(o.Wrap, {display:'flex',width:'15rem',height:'80vh',left:'9.6rem',marginLeft:'-7.5rem', marginTop:'-45vh', zIndex:'10'});
										
										el.innerHTML = `<div style="position:relative;flex:1;margin:30px;">
											<div class="scrolling4" style="text-align:center;background:#fff;padding:10px;">
												<dl style="color:#000;text-align:left;font-size:18px;">
													<dd><font>培训主题：</font><span>`+res.trainingTopic+`</span></dd>
													<dd><font>培训日期：</font><span>`+res.trainingDate+`</span></dd>
													<dd><font>培训地点：</font><span>`+res.trainingLocation+`</span></dd>
													<dd><font>培训参加人数：</font><span>`+res.participants+`</span></dd>
													<dd><font>培训内容：</font><span>`+res.trainingContent+`</span></dd>
													<dd><font>培训照片：</font><span></span></dd>
												</dl>
												`+imgs+`
											</div>
										</div>`;
									},
								});
							});  
						};
					};

					list3.onclick = function(e){
						var tag = e.target || e.srcElement;
						var dd = tag.parentNode;
						if(dd.nodeName === 'DD'){
							m.typeId = dd.dataset.id;
							Menus.listTrigger({id:m.typeId}, dd, list3, m, popupHooks, 0);
						};
					};
				})();

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							Menus.popup1 && Menus.popup1.remove()
						}else{
							
						};
						
						// 更新企业自主培训
						viewData.ctactv && m.reqDrillNum(m.menu2date)
					},
					timerUpdate: function(){
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
						Menus.showPointView(entity);
					},
					unload: function(){
						// 关闭菜单
						Menus.close();
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},
		
		// 数据统计分析
		module8(m, t, f, dmIndex, view){
			var self = this, viewData = self['view'+dmIndex], fm = f('init');

			var imd32 = view.querySelector("#imd32");
			var wrap32 = imd32.querySelector(".wrap");

			var imd33 = view.querySelector("#imd33");
			var wrap33 = imd33.querySelector(".wrap");


			var imd34 = view.querySelector("#imd34");
			var wrap34 = imd34.querySelector(".wrap");
			var title34 = imd34.querySelector(".item_2");

			var imd35 = view.querySelector("#imd35");
			var wrap35 = imd35.querySelector(".wrap");

			var imd36 = view.querySelector("#imd36");
			var wrap36 = imd36.querySelector(".wrap");

			// 检查企业数量
			(m.jcqysl = function(){
				var url = '/api/dataAnalysis/countDetectedHdIndEnNum';
				var param = {
					towns: (fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					var data = res.body || [];
					var opts = {
						chartConfig:{
							chart:{
								type: 'column',
								marginTop:0,
								marginLeft:25,
								marginBottom:0,
								spacingLeft:0,
								spacingBottom:-5,
							},
							series: [{
								name: '',
								tooltip: {
									valueDecimals: 2
								},
								dataLabels: {	// 柱内显示文字内容
									enabled: true,
									rotation: 90,
									color: '#FFFFFF',
									align: 'top',
									formatter: function(e){
										return this.key + ' ' + this.y;
									},
									y:10,
									style:{
										fontSize:10,
										textShadow:'none',
									},
								}
							}]
						},
						notExtendsOptions:false,
					};
					Highchart.template.stock(wrap32, data, opts);
				});
			})();

			// 行业安全隐患分布
			(m.aqyhlbfb = function(values, type){
				var url = '/api/dataAnalysis/countDetectedHdIndHdNum';
				var param = {
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					var list = res.body || [];
					var data = [], colors = ['#2CAFFE', '#90ED7D', '#8085E9', '#F15C80', '#E4D354'];
					var series = Highchart.formatSeriesList(list, {value:'num', colors:colors});
					var options = {
						chartConfig:{
							chart: {
								type: 'pie',
								//styledMode: true,
								marginTop:0,
								marginLeft:0,
								marginBottom:0,
								spacingLeft:0,
								backgroundColor:'transparent',
							},
							title: {
								text: ''
							},
							tooltip: {
								pointFormat: '{series.name}: <b>{point.y}</b>'
							},
							plotOptions: {
								pie: {
									allowPointSelect: false,
									cursor: 'pointer',
									depth: 25,
									dataLabels: {
										enabled: false,
									},
								}
							},
							legend:{
								layout: 'vertical',
								align: 'right',
								verticalAlign: 'top',
								x: 10,
								y: 10,
								floating: true,
								//borderWidth: 1,
								padding:1,
								backgroundColor: 'transparent',
								//shadow: true
								itemStyle:{
									color:'#fff',
									"fontSize": "0.14rem"
								},
							},
							credits: {
								enabled: false
							},
							series: [{
								type: 'pie',
								allowPointSelect: true,
								keys: ['name', 'y', 'selected', 'sliced'],
								data: series.seriesData,
								showInLegend: true
							}]
						},
						isSeriesData:true,
						notExtendsOptions:true,
					};

					Highchart.template.rich(wrap33, {}, options);
				});
			})('371071004000,371002009000,371071108000,371071400000');

			// 安全隐患类别分布
			(m.aqyhlbfb = function(values, type){
				var url = '/api/dataAnalysis/countIndInfoEW';
				var param = {
					towns: (values || fm.filter && fm.filter.values || []).toString(),
					category: type || '安全资料类',
				};
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					var list = res.body || [];
					var data = [], colors = ['#2CAFFE', '#90ED7D', '#8085E9', '#F15C80', '#E4D354'];
					var len = list.length;
					for(var i=0; i<len; i++){
						var item = list[i]
						data.push({name:item.name, y:item.num, color:colors[i]})
					};
					var options = {
						chartConfig:{
							chart: {
								type: 'pie',
								options3d: {
									enabled: true,
									alpha: 50,
									beta: 0,
									viewDistance:100,
									depth: 0,
								},
								marginTop:0,
								marginLeft:0,
								marginBottom:0,
								spacingLeft:0,
								backgroundColor:'transparent',
							},
							title: {
								text: ''
							},
							tooltip: {
								pointFormat: '{series.name}: <b>{point.y}</b>'
							},
							plotOptions: {
								pie: {
									allowPointSelect: true,
									cursor: 'pointer',
									depth: 25,
									dataLabels: {
										enabled: true,
										format: '<span style="font-size:0.13rem;line-height:1;">{point.name}</span><br><span style="font-family:diget year;font-size:0.24rem;line-height:.14rem;color:{point.color};">{point.y}</soan>'
									}
								}
							},
							credits: {
								enabled: false
							},
							series: [{
								type: 'pie',
								name: '数量',
								dataLabels:{
									useHTML:true,
									borderWidth:0,
									style:{
										textOutline:'none',
										color: '#fff',
									},
								},
								data: data
							}]
						},
						isSeriesData:true,
						notExtendsOptions:true,
					};
					Highchart.template.high(wrap34, {}, options);
				});
			})('371071004000,371002009000,371071108000,371071400000');

			// 安全隐患整改率
			(m.aqyhzgl = function(values){
				var url = '/api/dataAnalysis/countDetectedHdIndHdRecRatio';
				var param = {
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					var list = res.body || [];
					var chartData = Highchart.formatSeriesList(list, {value:'ratio'});
					var opts = {
						chartConfig:{
							chart:{
								type: 'column',
							},
							series: [{
								name: '',
								data:chartData.seriesData,
							}],
						},
						isSeriesData:true,
						//notExtendsOptions:true,
					};
					Highchart.template.high(wrap35, {}, opts);
				});
			})('371071004000,371002009000,371071108000,371071400000');

			// 企业风险分级情况
			(m.qyfxfj = function(values){
				var url = '/api/riskControl/countEnNum';
				var param = {
					towns: (values || fm.filter && fm.filter.values || []).toString(),
				};
				return reqApi.common.requstEdge('get', url, param).then((res)=>{
					var list = res.body || [];
					var data = [], colors = ['#2CAFFE', '#90ED7D', '#8085E9', '#F15C80', '#E4D354'];
					var len = list.length;
					for(var i=0; i<len; i++){
						var item = list[i]
						data.push({name:item.name, y:item.num, color:colors[i]})
					};
					var options = {
						chartConfig:{
							chart: {
								type: 'pie',
								options3d: {
									enabled: true,
									alpha: 50,
									beta: 0,
									viewDistance:100,
									depth: 0,
								},
								marginTop:0,
								marginLeft:0,
								marginBottom:0,
								spacingLeft:0,
								backgroundColor:'transparent',
							},
							title: {
								text: ''
							},
							tooltip: {
								pointFormat: '{series.name}: <b>{point.y}</b>'
							},
							plotOptions: {
								pie: {
									allowPointSelect: true,
									cursor: 'pointer',
									depth: 25,
									dataLabels: {
										enabled: true,
										format: '<span style="font-size:0.13rem;line-height:1;">{point.name}</span><br><span style="font-family:diget year;font-size:0.24rem;line-height:.14rem;color:{point.color};">{point.y}</soan>'
									}
								}
							},
							credits: {
								enabled: false
							},
							series: [{
								type: 'pie',
								name: '数量',
								dataLabels:{
									useHTML:true,
									borderWidth:0,
									style:{
										textOutline:'none',
										color: '#fff',
									},
								},
								data: data
							}]
						},
						isSeriesData:true,
						notExtendsOptions:true,
					};
					Highchart.template.high(wrap36, {}, options);
				});
			})('371071004000,371002009000,371071108000,371071400000');

			return (function(){
			
				// 首次加载
				(m.init = function(){
					
					// 安全隐患类别分布 事件
					var list34 = [{name:'安全资料类',value:'安全资料类'},{name:'现场检查类',value:'现场检查类'}];
					var select = document.createElement("select");
					qf.UI.selectRender(select, list34, {
						onchange: function(val){
							m.aqyhlbfb('371071004000,371002009000,371071108000,371071400000', val);
						},
					});
					title34.appendChild(select);
				})();

				return {
					reload: function(o){
						if(o && o.name === 'filter'){
							// 检查企业数量
							m.jcqysl();

							// 安全隐患类别分布
							m.aqyhlbfb();

							// 安全隐患整改率
							m.aqyhzgl();

							// 企业风险分级情况
							m.qyfxfj();
						}else{
							
						};
						
						// 更新企业自主培训
						//viewData.ctactv && m.reqDrillNum(m.menu2date)
					},
					timerUpdate: function(){
					},
					mapClick: function(pick){
						var id = pick.id, entity = pick.primitive;
					},
					unload: function(){
					},
					resize: function(){
						//m.percarCountChart && m.percarCountChart.reflow();
					},
				};
			})();
		},

		cascadeMenu2: function(){
			var self = this, m = {};
			m.commonLayer = this.commonLayer();
			//m.hooks = hooks;
			
			m.eventActive = function(row, ctn){
				var active = ctn.querySelector(".active");
				active && active.classList.remove('active');
				row.classList.add('active');
			};

			m.listTrigger = function(param, tag, dl, o, hooks, index){
				var hook = hooks[index];
				hook.request(param).then(function(list){
					// 激活样式
					m.eventActive(tag, dl);

					// 下一个弹窗
					new m['popupView'](dl.parentNode, list, o, param, hooks, index);
				}); 
			};

			m.listClick = function(tag, hook){
				hook.onclick ? hook.onclick(tag, m) : m.openEnterpriseInfo(tag.dataset.id);
			};

			m.request = function(data){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000});
				return reqApi.common.requstEdge('get', data.url, data.param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			m.popupView = function(ctn, list, layer, param, hooks, index){
				var hook = hooks[index]; index++;
				if(layer.child && layer.child.show){
					layer.child.listCtn = layer.child.setLists(list, layer.child);
				}else{
					layer.child = m['popup' + index] = qf.UI.popWindow({
						name:'p2',
						container:ctn,		// id || Element对象
						pointer:{
							point:'left',
							show:true,
							x:0,
							y:3,
						},
						closeButton:true,
						close: function(){},
						html:'<div class="amd37_pop amd37_v1" style="color:#fff;width:2.6rem;height:auto;border:1px solid #3EB7EA;border-radius:5px;overflow-y:hidden;"></div>',
						onload: function(o){
							var el = o.el, style={display:'flex',top:'.8rem',right:'-2.9rem', maxHeight:'100%'};
							o.setStyle(o.Wrap, hook.style || style);
							el.innerHTML = `<div style="position:relative;height:100%;display:flex;flex-direction:column;">
								<div class="m-t1">
									<h4>`+(hook.title || '')+`</h4>
								</div>
								<dl class="scrolling4"></dl>
							</div>`;

							var dl = el.querySelector("dl");
							// 数据绑定
							Object.defineProperty(o, 'listCtn', {
								set: function(f){
									dl.innerHTML = f;
								}
							});

							o.listCtn = (o.setLists = hook.getLists || function(list, o){
								var dds = '';
								for(var item of list){
									dds += '<dd data-id="'+item.id+'">'+item.name+'('+item.num+')</dd>';
								};
								return o.child && o.child.remove(), dds
							})(list, o);

							if(index === 1){
								o.Wrap.classList.add('cascade');
								var tab = document.createElement("font");
								tab.className = 'trigger';
								tab.style.cssText = 'position:absolute;height:24px; width:11px;background:rgba(0, 0, 0, .8);font-size:14px;border-radius:0 9px 9px 0;line-height:24px;cursor:pointer;left:-12rem;';
								o.Wrap.appendChild(tab);
								o.show = function(){
									o.Wrap.classList.remove('hide');
								};
								o.hide = function(){
									var num = o.Wrap.querySelectorAll(".amd37_pop");
									tab.innerText = num.length;
									o.Wrap.classList.add('hide');
								};
								tab.onclick = function(e){
									o.show();
								};
							};
							o.param = param;
						
							var ctn = el.firstElementChild.lastElementChild;
							// 事件
							ctn.onclick = function(e){
								var tag = e.target || e.srcElement;
								if(tag.nodeName === 'DD'){
									if(hooks[index]){
										param.itId = o.param.itId;
										param.indId = tag.dataset.id;
										m.listTrigger(param, tag, el, o, hooks, index);
										// 触发回调
										hook.onclick && hook.onclick(tag, m);
									}else{
										m.listClick(tag, hook);
									};
								};
							};
						},
					});
				};
			};

			m.close = function(){
				m.tagBillboard && (m.tagBillboard.show = false);
				// 清除标记View
				m.onlyMarkView && m.onlyMarkView.remove();
				// 关闭企业信息
				m.commonLayer.enterpriseInfo.close();
			};

			// 请求企业位置信息
			m.reqCompanyPoint = function(id){
				var req = {
					param:{companyId: id},
					url: '/api/large/screen/findCompanyHdLocationDe',
				};
				return m.request(req)
			};

			// 定位企业位置
			m.locationCompany = function(id){
				// reqCompanyPoint
				return m.reqCompanyPoint(id).then(function(item){
					// 创建目的地
					m.createDestination(id, item);

					// 隐藏级联窗体
					//m.popup1.hide();
				});
			};

			// 打开企业信息窗口
			m.openEnterpriseInfo = function(id){
				// reqCompanyPoint
				return m.reqCompanyPoint(id).then(function(item){

					// 创建目的地
					m.createDestination(id, item);
					
					// 隐藏级联窗体
					m.popup1.hide();
					m.commonLayer.enterpriseInfo.load(id);
				});
			};

			m.createDestination = function(id, item){
				var bbdMap = self.Entities.getBbdCollection();

				var dict = {[id]:{}}, ddb;
				// 判断
				if(bbdMap[id]){
					self.Entities.setMarkers(dict);
					ddb = m.tagBillboard = dict[id];
				}else{
					ddb = m.tagBillboard = dict[id] = self.Entities.addMarker(item);
				};

				// 创建目的
				ddb.entity = ddb.entity || fg3d.Entity.create({position: ddb._position});
				ddb.entity.billboard = ddb;

				self.viewer.flyTo(ddb.entity, {
					duration:1.8, 
					offset:{
						heading: 6.278107743384024,
						pitch: -1.3858600351063641,
						range : 600,
					}
				}).then(function(){
					fg3d.Entity.remove(ddb.entity);
					delete ddb.entity;
					// 打开地图mark窗口
					m.showPointView(ddb);
				});
			};

			// 标记点窗口
			m.showPointView = function(entity){
				// 标记点的id是数字
				if(entity.id && entity.id.constructor.name === 'Number'){
					// 清除上一个
					m.onlyMarkView && m.onlyMarkView.remove();
					
					var item = entity.data;
					var view = qf.UI.popWindow({
						pointer:{
							point:'bottom',
							show:true,
							x:80,
						},
						closeButton:{},
						close: function(){
						},
						container:document.createElement('div'),		// id || Element对象
						html:'<div class="popupBgImage" style="color:#fff;width:150px;font-size:12px;padding:10px;">'+item.companyName+'<div style="margin-top:15px;text-align:right;"></div></div>',
						onload: function(md){
							var el = md.el;
						},
					});
					
					// 创建窗口
					var position = entity.position;
					m.onlyMarkView = new fg3d.Plugins.View(position, view.Wrap, {
						render: function(){
							return {
								position:position,
								y:-45,
								x:-90,
							};
						},
					});
				};
			};

			return m;
		},

		cascadeMenu: function(){
			var self = this, m = {};
			m.commonLayer = this.commonLayer();
			//m.hooks = hooks;
			
			m.eventActive = function(row, ctn){
				var active = ctn.querySelector(".active");
				active && active.classList.remove('active');
				row.classList.add('active');
			};

			m.listTrigger = function(param, tag, dl, next, o, hooks){
				var hook = hooks[next];
				hook.request(param).then(function(list){
					// 激活样式
					m.eventActive(tag, dl);

					// 下一个弹窗
					m[next](dl.parentNode, list, o, param, hooks, hook);
				}); 
			};

			m.listClick = function(tag, hook){
				hook.onclick ? hook.onclick(tag) : m.openEnterpriseInfo(tag.dataset.id);
			};

			m.request = function(data){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000});
				return reqApi.common.requstEdge('get', data.url, data.param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			m.popupView1 = function(ctn, list, layer, param, hooks, hook){
				if(layer.popup && layer.popup.show){
					layer.popup.setValue(list);
					layer.popup.show();
					layer.popup.param = param;
				}else{
					layer.popup = m.popup1 = qf.UI.popWindow({
						name:'p1',
						container:ctn,		// id || Element对象
						pointer:{point:'left',show:true,x:0,y:3,},
						closeButton:true,
						close: function(){},
						html:'<div class="amd37_pop amd37_v1" style="color:#fff;width:2.6rem;height:auto;border:1px solid #3EB7EA;border-radius:5px;overflow-y:hidden;"></div>',
						onload: function(o){
							var el = o.el;
							o.setStyle(o.Wrap, {display:'flex',top:'0rem', right:'-2.9rem', maxHeight:'100%'});
							o.Wrap.classList.add('cascade');
							el.innerHTML = `<div style="position:relative;height:100%;display:flex;flex-direction:column;">
								<div class="m-t1">
									<h4>`+(hook.title || '')+`</h4>
								</div>
								<div class="scrolling4">
									<dl></dl>
								</div>
							</div>`;
							var dl = el.querySelector("dl");
							(o.setValue = function(list){
								var dds = '';
								for(var item of list){
									dds += '<dd data-id="'+item.id+'">'+item.name+'('+item.num+')</dd>';
								}; dl.innerHTML = dds;
								o.child && o.child.remove()
							})(list);

							var tab = document.createElement("font");
							tab.className = 'trigger';
							tab.style.cssText = 'position:absolute;height:24px; width:11px;background:rgba(0, 0, 0, .8);font-size:14px;border-radius:0 9px 9px 0;line-height:24px;cursor:pointer;left:-12rem;';
							o.Wrap.appendChild(tab);
							o.show = function(){
								o.Wrap.classList.remove('hide');
							};
							o.hide = function(){
								var num = o.Wrap.querySelectorAll(".amd37_pop");
								tab.innerText = num.length;
								o.Wrap.classList.add('hide');
							};
							tab.onclick = function(e){
								o.show();
							};

							o.param = param;

							var ctn = el.firstElementChild.lastElementChild;
							// 事件
							ctn.onclick = function(e){
								var tag = e.target || e.srcElement;
								if(tag.nodeName === 'DD'){
									param.itId = o.param.id;
									param.icdId = tag.dataset.id;
									m.listTrigger(param, tag, el, 'popupView2', o, hooks);
								};
							};
						},
					});
				};
			};

			m.popupView2 = function(ctn, list, layer, param, hooks, hook){
				if(layer.child && layer.child.show){
					layer.child.setValue(list);
					layer.child.param = param;
				}else{
					layer.child = qf.UI.popWindow({
						name:'p2',
						container:ctn,		// id || Element对象
						pointer:{
							point:'left',
							show:true,
							x:0,
							y:3,
						},
						closeButton:true,
						close: function(){},
						html:'<div class="amd37_pop amd37_v2" style="color:#fff;width:2.6rem;height:auto;border:1px solid #3EB7EA;border-radius:5px;overflow-y:hidden;"></div>',
						onload: function(o){
							var el = o.el;
							o.setStyle(o.Wrap, {display:'flex',top:'.8rem', left:'2.80rem', maxHeight:'60vh'});
							
							el.innerHTML = `<div style="position:relative;height:100%;display:flex;flex-direction:column;">
								<div class="m-t1">
									<h4>`+(hook.title || '')+`</h4>
								</div>
								<dl class="scrolling4"></dl>
							</div>`;
							var dl = el.querySelector("dl");
							(o.setValue = function(list){
								var dds = '';
								for(var item of list){
									dds += '<dd data-id="'+item.id+'">'+item.name+'('+item.num+')</dd>';
								}; dl.innerHTML = dds;
								o.child && o.child.remove()
							})(list);

							o.param = param;
							
							var ctn = el.firstElementChild.lastElementChild;
							// 事件
							ctn.onclick = function(e){
								var tag = e.target || e.srcElement;
								if(tag.nodeName === 'DD'){
									var next = 'popupView3';
									if(hooks[next]){
										param.itId = o.param.itId;
										param.indId = tag.dataset.id;
										m.listTrigger(param, tag, el, next, o, hooks);
									}else{
										m.listClick(tag, hook);
									};
								};
							};
						},
					});
				};
			};

			m.popupView3 = function(ctn, list, layer, param, hooks, hook){
				if(layer.child && layer.child.show){
					layer.child.listCtn = layer.child.setValue(list);
				}else{
					layer.child = qf.UI.popWindow({
						name:'p2',
						container:ctn,		// id || Element对象
						pointer:{
							point:'left',
							show:true,
							x:0,
							y:3,
						},
						closeButton:true,
						close: function(){},
						html:'<div class="amd37_pop amd37_v2" style="color:#fff;width:2.6rem;height:auto;border:1px solid #3EB7EA;border-radius:5px;overflow-y:hidden;"></div>',
						onload: function(o){
							var el = o.el;
							o.setStyle(o.Wrap, {display:'flex',top:'.8rem', left:'2.80rem', maxHeight:'60vh'});
							
							el.innerHTML = `<div style="position:relative;height:100%;display:flex;flex-direction:column;">
								<div class="m-t1">
									<h4>`+(hook.title || '')+`</h4>
								</div>
								<dl class="scrolling4"></dl>
							</div>`;

							var dl = el.querySelector("dl");
							// 数据绑定
							Object.defineProperty(o, 'listCtn', {
								set: function(f){
									dl.innerHTML = f;
								}
							});

							o.listCtn = (o.setValue = hook.setValue || function(list){
								var dds = '';
								for(var item of list){
									dds += '<dd data-id="'+item.company_id+'">'+item.company_name+'</dd>';
								}; return dds
							})(list);
						
							var ctn = el.firstElementChild.lastElementChild;
							// 事件
							ctn.onclick = function(e){
								var tag = e.target || e.srcElement;
								if(tag.nodeName === 'DD'){
									var next = 'popupView4';
									if(hooks[next]){
										param.itId = o.param.itId;
										param.indId = tag.dataset.id;
										m.listTrigger(param, tag, el, next, o, hooks);
									}else{
										m.listClick(tag, hook);
									};
								};
							};
						},
					});
				};
			};

			m.close = function(){
				m.tagBillboard && (m.tagBillboard.show = false);
				// 清除标记View
				m.onlyMarkView && m.onlyMarkView.remove();
				// 关闭企业信息
				m.commonLayer.enterpriseInfo.close();
			};

			// 请求企业位置信息
			m.reqCompanyPoint = function(id){
				var req = {
					param:{companyId: id},
					url: '/api/large/screen/findCompanyHdLocationDe',
				};
				return m.request(req)
			};

			// 打开企业信息窗口
			m.openEnterpriseInfo = function(id){
				var bbdMap = self.Entities.getBbdCollection();
				
				// reqCompanyPoint
				m.reqCompanyPoint(id).then(function(item){
					var dict = {[id]:{}}, ddb;

					// 判断
					if(bbdMap[id]){
						self.Entities.setMarkers(dict);
						ddb = m.tagBillboard = dict[id];
					}else{
						ddb = m.tagBillboard = dict[id] = self.Entities.addMarker(item);
					};

					// 创建目的
					ddb.entity = ddb.entity || fg3d.Entity.create({position: ddb._position});
					ddb.entity.billboard = ddb;

					self.viewer.flyTo(ddb.entity, {
						duration:1.8, 
						offset:{
							heading: 6.278107743384024,
							pitch: -1.3858600351063641,
							range : 600,
						}
					}).then(function(){
						fg3d.Entity.remove(ddb.entity);
						delete ddb.entity;
						// 打开地图mark窗口
						m.showPointView(ddb);
					});

					// 隐藏级联窗体
					m.popup1.hide();
					m.commonLayer.enterpriseInfo.load(id);
				});
			};

			// 标记点窗口
			m.showPointView = function(entity){
				// 标记点的id是数字
				if(entity.id && entity.id.constructor.name === 'Number'){
					// 清除上一个
					m.onlyMarkView && m.onlyMarkView.remove();
					
					var item = entity.data;
					var view = qf.UI.popWindow({
						pointer:{
							point:'bottom',
							show:true,
							x:80,
						},
						closeButton:{},
						close: function(){
						},
						container:document.createElement('div'),		// id || Element对象
						html:'<div class="popupBgImage" style="color:#fff;width:150px;font-size:12px;padding:10px;">'+item.companyName+'<div style="margin-top:15px;text-align:right;"></div></div>',
						onload: function(md){
							var el = md.el;
						},
					});
					
					// 创建窗口
					var position = entity.position;
					m.onlyMarkView = new fg3d.Plugins.View(position, view.Wrap, {
						render: function(){
							return {
								position:position,
								y:-45,
								x:-90,
							};
						},
					});
				};
			};

			return m;
		},

		commonLayer: function(index){
			var self = this, m = {};
			var b0_ = self.$el.querySelector("#b0_");

			// requst
			m.requst = function(type, url, param){
				var l1 = qf.UI.loading({zIndex:2051, timer:10000, mask:'none'});
				return reqApi.common.requstEdge(type, url, param).then((res)=>{
					l1.close();
					return res.body || []
				});
			};

			// 请求企业综合信息
			m.reqThCompany = function(id){
				return m.requst('get', '/api/large/screen/findCompanyDetailedMessage', {companyId: id,});
			};

			// 风险隐患
			m.reqCompanyHdRisky = function(id){
				return m.requst('get', '/api/large/screen/findCompanyHdRiskyCompanyId', {companyId: id,});
			};

			// 企业隐患详情
			m.reqPitfallDetails = function(id){
				return m.requst('get', '/api/thHiddenDanger/large', {hdId: id,});
			};

			m.enterpriseInfo = m.enterpriseInfo || qf.UI.popWindow({
				name:'p1',
				container:b0_,		// id || Element对象
				close: function(){},
				html:'<div class="pop-md38" style="width:4.6rem;height:0;display:flex;flex-direction:column;justify-content:center;"></div>',
				onload: function(o){
					var el = o.el;
					o.setStyle(o.Wrap, {display:'flex', left:'14.5rem', width:'4.6rem'});
					el.innerHTML = `
						<div class="a-md3822" id="amd38">
							<div class="panel1">
								<div class="m-t1">
									<h4>企业综合信息</h4>
								</div>
								<div class="ct-box">
									<div class="wrap">
										<dl class="list1 scrolling4">
											<dd>
												<span>威海锦汇物业服务有限公司</span>
												<a>查看</a>
											</dd>
											<dd>
												<span>安全总监设置情况</span>
												<!-- <a>查看</a> -->
											</dd>
											<dd>
												<span>企业分级分类：A级 Ⅱ类企业</span>
												<!-- <a>查看</a> -->
											</dd>
										</dl>
									</div>
								</div>
							</div>
							<div class="panel2">
								<div class="m-t1">
									<h4>企业风险</h4>
								</div>
								<div class="m-t2">
									<ul>
									</ul>
								</div>
								<div class="dt">
									<span>风险点</span>
									<span>位置区域</span>
									<span>责任单位</span>
									<span>负责人</span>
									<span>监控视频</span>
								</div>
								<div class="ct-box">
									<div class="wrap">
										<dl class="list1 scrolling4">
										</dl>
									</div>
								</div>
							</div>
							<div class="panel3">
								<div class="m-t1">
									<h4>企业隐患</h4>
								</div>
								<div class="m-t2">
									<ul>
									</ul>
								</div>
								<div class="dt">
									<span>隐患名称</span>
									<span>查看</span>
								</div>
								<div class="ct-box">
									<div class="wrap">
										<dl class="list1 scrolling4">
										</dl>
									</div>
								</div>
							</div>
							<i class="trigger"></i>
						</div>
					`;
					var amd38 = el.firstElementChild;
					var panel1 = amd38.firstElementChild;
					var panel2 = panel1.nextElementSibling;
					var p2tu2 = panel2.firstElementChild.nextElementSibling.firstElementChild;
					var p2td2 = panel2.lastElementChild.firstElementChild.firstElementChild;
					var panel3 = panel2.nextElementSibling;
					var p2tu3 = panel3.firstElementChild.nextElementSibling.firstElementChild;
					var p2td3 = panel3.lastElementChild.firstElementChild.firstElementChild;
					var p1dl = panel1.querySelector(".list1");

					o.setInfo = function(res){
						o.m1data = res;
						p1dl.children[0].firstElementChild.innerText = res.companyName;
						p1dl.children[1].firstElementChild.innerText = '安全总监设置情况';
						p1dl.children[2].firstElementChild.innerText = '企业分级分类：A级 Ⅱ类企业';
					};

					o.setInfo2 = function(list){
						var index = 0;
						var dict = qf.Utils.arrayToJsonDict(list);
						
						var lis = '';
						for(var i=index, len=list.length; i<len; i++){
							var item = list[i];
							var class_ = i===index ? 'actv' : '';
							lis += '<li data-id="'+i+'" class="'+class_+'"><font>'+item.count+'</font><span>'+item.name+'</span></li>';
						};
						p2tu2.innerHTML = lis;

						(o.setView2List = function(i){
							var list = dict[i].list;
							var dds = '';
							for(var item of list){
								dds += '<dd><span>'+item.riskPoint+'</span><span>'+item.riskArea+'</span><span>'+item.riskChargeDepartment+'</span><span>'+item.riskChargePer+'</span><span class="el-icon-video-camera-solid"></span></dd>';
							};
							!dds && (dds = '<p class="no-data">暂无数据！</p>');
							p2td2.innerHTML = dds;
						})(index)

						// event
						if(!p2tu2.onclick){
							p2tu2.onclick = function(e){
								var tag = e.target || e.srcElement;
								var li = tag.nodeName === 'LI' ? tag : tag.parentNode;
								// tab 切换
								qf.UI.tabStyleActive(p2tu2, li, 'actv', function(){
									o.setView2List(~~li.dataset.id);
								});
							};
						};
					};
					o.setInfo3 = function(list){
						var index = 0;
						var dict = qf.Utils.arrayToJsonDict(list);
						var lis = '';
						for(var i=index, len=list.length; i<len; i++){
							var item = list[i];
							var class_ = i===index ? 'actv' : '';
							lis += '<li data-id="'+i+'" class="'+class_+'"><font>'+item.count+'</font><span>'+item.name+'</span></li>';
						};

						p2tu3.innerHTML = lis;
						(o.setView3List = function(i){
							var list = dict[i].list;
							var dds = ''
							for(var item of list){
								dds += '<dd><span>'+item.hdName+'</span><span data-hdid="'+item.hdId+'" class="el-icon-view"></span></dd>';
							};
							!dds && (dds = '<p class="no-data">暂无数据！</p>');
							p2td3.innerHTML = dds;
						})(index)

						// event
						if(!p2tu3.onclick){
							p2tu3.onclick = function(e){
								var tag = e.target || e.srcElement;
								var li = tag.nodeName === 'LI' ? tag : tag.parentNode;
								// tab 切换
								qf.UI.tabStyleActive(p2tu3, li, 'actv', function(){
									o.setView3List(~~li.dataset.id);
								});
							};
						};
					};

					o.close = function(){
						amd38.classList.remove('open', 'hide');
					};

					o.load = function(id){
						// 业详情
						m.reqThCompany(id).then(function(res){
							m.reqCompanyHdRisky(id).then(function(res){
								o.setInfo2(res.risk);
								o.setInfo3(res.hiddenDanger);
							});
							o.open(res);
						});
					};
					o.open = function(res){
						o.setInfo(res);
						amd38.classList.remove('hide');
						amd38.classList.add('open');
					};


					// 模块1事件
					p1dl.onclick = function(e){
						var tag = e.target || e.srcElement;
						if(tag.nodeName === 'A'){
							m.openBaseinfo(o.m1data);
						};
					};

					// 耳朵事件
					el.onclick = function(e){
						var tag = e.target || e.srcElement;
						if(tag.className === 'trigger'){
							var amd38Class = amd38.classList;
							amd38Class.contains('hide') ? amd38Class.remove('hide') : amd38Class.add('hide');
						};
					};

					// 模块3事件
					p2td3.onclick = function(e){
						var tag = e.target || e.srcElement;
						if(tag.className === 'el-icon-view'){
							var id = tag.dataset.hdid;
							m.openPitfallinfo(id);
						};
					};
				},
			});

			// 综合信息详情弹窗
			m.openBaseinfo = function(res){
				qf.UI.popWindow({
					name:'comprehensiveInfo',
					container:b0_,		// id || Element对象
					closeButton:true,
					close: function(){},
					html:'<div style="display:flex;color:#fff;border:1px solid #3EB7EA;height:100%;width:100%;background-color:rgba(2,12,57,.8);"></div>',
					onload: function(o){
						var el = o.el;
						o.setStyle(o.Wrap, {display:'flex',width:'15rem',height:'80vh',left:'9.6rem',marginLeft:'-7.5rem', marginTop:'-1rem', zIndex:'10'});
						el.innerHTML = `<div style="position:relative;flex:1;margin:30px;">
							<div class="scrolling4" style="text-align:center;background:#fff;padding:10px;">
								<dl style="color:#000;text-align:left;font-size:18px;line-height:2.5;">
									<dd><font>企业名称：</font><span>`+res.companyName+`</span></dd>
									<dd><font>经营范围：</font><span>`+res.companyBusinessNature+`</span></dd>
									<dd><font>负责人姓名：</font><span>`+res.companyChargePer+`</span></dd>
									<dd><font>负责人电话：</font><span>`+res.companyChargeTel+`</span></dd>
									<dd><font>企业状态：</font><span>`+res.companyStatus+`</span></dd>
									<dd><font>通讯地址：</font><span>`+res.companyCommunicationAddr+`</span></dd>
									<dd><font>安全总监姓名：</font><span>`+(res.companySecurityPer || '')+`</span></dd>
									<dd><font>安全总监电话：</font><span>`+(res.companySecurityTel || '')+`</span></dd>
								</dl>
							</div>
						</div>`;
					},
				});
			};

			// 企业隐患弹窗
			m.openPitfallinfo = function(id){
				m.reqPitfallDetails(id).then(function(res){
					var beforeImg = '';
					for(var img of res.hdPic){
						beforeImg += '<img src="data:image/jpg;base64,'+img+'" style="width:100%"/>';
					};

					var afterImg = '';
					for(var img of res.hdRectificationPic){
						afterImg += '<img src="data:image/jpg;base64,'+img+'" style="width:100%"/>';
					};

					qf.UI.popWindow({
						name:'pitfallinfo',
						container:b0_,		// id || Element对象
						closeButton:true,
						close: function(){},
						html:'<div style="display:flex;color:#fff;border:1px solid #3EB7EA;height:100%;width:100%;background-color:rgba(2,12,57,.8);"></div>',
						onload: function(o){
							var el = o.el;
							var hdStatus = ['整改中', '整改完成'];

							o.setStyle(o.Wrap, {display:'flex',width:'15rem',height:'80vh',left:'9.6rem',marginLeft:'-7.5rem', marginTop:'-1rem', zIndex:'10'});
							el.innerHTML = `<div style="position:relative;flex:1;margin:30px;">
								<div class="scrolling4" style="text-align:center;background:#020c39;display:flex;">
									<div style="flex:1;margin-right:.50rem;border:1px solid #024A9C;padding:10px;height:max-content;">
										<h3 style="font-size:.20rem;">整改前</h3>
										<dl style="text-align:left;font-size:.18rem;line-height:2.5;">
											<dd><span>`+beforeImg+`</span></dd>
											<dd><font>检查日期：</font><span>`+res.hdInspectDate+`</span></dd>
											<dd><font>检查人员：</font><span>`+res.hdInspectExpert+`</span></dd>
											<dd><font>检查主体：</font><span>`+res.inspectionSubject+`</span></dd>
											<dd><font>整改建议：</font><span>`+res.suggestion+`</span></dd>
											<dd><font>检查依据：</font><span>`+res.basis+`</span></dd>
										</dl>
									</div>

									<div style="flex:1;border:1px solid #024A9C;padding:10px;height:max-content;">
										<h3 style="font-size:.20rem;">整改后</h3>
										<dl style="text-align:left;font-size:.18rem;line-height:2.5;">
											<dd><span>`+afterImg+`</span></dd>
											<dd><font>复查日期：</font><span>`+res.hdRectificationDate+`</span></dd>
											<dd><font>状态：</font><span>`+hdStatus[res.hdStatus]+`</span></dd>
											<dd><font>复查人员：</font><span>`+res.hdAcceptancePerson+`</span></dd>
											<dd><font>审核记录：</font><span>`+res.hdRectificationRecord+`</span></dd>
										</dl>
									</div>
								</div>
							</div>`;
						},
					});
				});
			};

			return m
		},

		// Cesium
		createCesium: function(m, t, f){
			var that = this, fm = f('init');

			fg3d.init({
				createViewer: function(){
					return {
						el:'cesiumContainer',
						options:{
							//sceneMode : Cesium.SceneMode.COLUMBUS_VIEW,
							infoBox: false,
							selectionIndicator: false,
							navigation: false,
							animation: false,
							timeline: false,
							baseLayerPicker: false,
							geocoder: false,
							homeButton: false,
							sceneModePicker: false,
							navigationHelpButton: false,
							shouldAnimate: true,
							//skyAtmosphere: true, // 大气
							fullscreenButton:false,		// 全屏按钮
							/* terrainProvider:new Cesium.CesiumTerrainProvider({
								url:'http://192.168.3.226:9003/terrain/RkUoBCaP',
							}), */

							// 本地影像
							/* imageryProvider: new Cesium.UrlTemplateImageryProvider({
								url: "http://192.168.3.226:9003/image/wmts/ClpumnTs/{z}/{x}/{y}",
								//url: "http://192.168.3.226:9003/image/wmts/4d2ydADu/{z}/{x}/{y}",
								//url: "http://192.168.3.226:9003/image/wmts/c4Aps5yJ/{z}/{x}/{y}",
								maximumLevel:18,
							}), */

							imageryProvider:false,
							
							// 天地图
							/* imageryProvider: new Cesium.UrlTemplateImageryProvider({
								//url: "https://t5.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=d2bd55b7fa31f99ced2205fb6aa4cc5e"
								url: "http://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=d2bd55b7fa31f99ced2205fb6aa4cc5e"
							}), */

							orderIndependentTranslucency: false,
							contextOptions: {
								webgl: {
									alpha: true
								}
							},
						}
					};
				}, 
				mounted: async function(viewer){

					//return ;
					var self = this
					this.viewer = that.viewer = viewer;
					this.imageryLayers = {};

					this.viewer.cesiumWidget.creditContainer.style.display = "none";
					this.viewer.scene.backgroundColor = new Cesium.Color(0.0, 0.0, 0.0, 0.0);
					//抗锯齿
					this.viewer.scene.fxaa = true;
					this.viewer.scene.postProcessStages.fxaa.enabled = true;
					this.viewer.scene.sun.show = false; //在Cesium1.6(不确定)之后的版本会显示太阳和月亮，不关闭会影响展示
					this.viewer.scene.skyBox.show = false;//关闭天空盒，否则会显示天空颜色
					this.viewer.scene.undergroundMode = true; //重要，开启地下模式，设置基色透明，这样就看不见黑色地球了
					//this.viewer.scene.globe.show = false;

					// 影像
					this.localMap = new Cesium.TileMapServiceImageryProvider({
						url: process.env.VUE_APP_GIS + "/gis/map",
						maximumLevel:18,
						loadTileError: false, // 不要生成错误处理逻辑
					});

					// 入场动画
					//await this.playTour(viewer);

					// 最终定位
					await this.cutInScene(viewer);

					// Create a billboard collection  
					this.bbdCollection = viewer.scene.primitives.add(new Cesium.BillboardCollection());
					this.billboardDict = {}; 

					// assets
					that.Entities = {
						setMarkers: function(dict){
							self.setMarkersAttr(dict);
						},
						addMarkers: function(list){
							if(Object.prototype.toString.call(list) === '[object Array]'){
								//self.billboardDict = {};
								for(var item of list){
									var bbdid = item.type > 1 ? item.type + '_' + item.companyId : item.companyId;
									var billbd = self.billboardDict[bbdid];
									if(!billbd){
										self.billboardDict[bbdid] = self.createMarker(item);
									}else{
									};
								};
							};

							/*
							let pointcluster = new fg3d.Entities.ClusterPoint(list, {
								pixelRange: 30, //聚合像素
								minimumClusterSize: 3, //最低聚合数
								billboardImg: "/static/images/bluecamera.png", //单个点的图片
								clusterImage: "/static/images/pointcluster", //聚合图标路径
								Color: new Cesium.Color(1, 1, 1, 1),
								lableOption:{
									namekey:'companyName',
									//'fillColor': Cesium['Color']['WHITE'],
									'scale': 0.4,
									'font': 'normal 40px MicroSoft YaHei',
									//'distanceDisplayCondition': new Cesium['DistanceDisplayCondition'](0x0,0x7a120),
									//'scaleByDistance': new Cesium['NearFarScalar'](0xc350,0x1,0xf4240,0.4),
									horizontalOrigin : Cesium['HorizontalOrigin']['LEFT'],
									'verticalOrigin': Cesium['VerticalOrigin']['BOTTOM'],
									'style': Cesium['LabelStyle']['FILL_AND_OUTLINE'],
									'pixelOffset': new Cesium['Cartesian2'](20, 0),
									'outlineWidth': 0x14,
									//'outlineColor': Cesium['Color']['BLACK']
								},
							});*/
						},
						addMarker: this.createMarker.bind(this),
						remove: this.remove,
						removes: this.removes,
						removeWidget: this.removeWidget,
						removeAll: function(){
							self.removeEntities();
							self.removeWidget();
						},
						getBbdCollection: function(){
							//return self.bbdCollection._billboards
							return self.billboardDict
						},
					};
				},

				playTour: async function(viewer){
					var self = this;

					// 视角
					this.setGlobeView(viewer);

					// 地球效果图层
					await this.loadInitAssets(viewer).then(function(){
						self.setInitGlobeInitStyle(viewer);
					});

					var point1 = new Cesium.KmlLookAt({x:-2961457.693902081,y: 4861227.755294779,z: 4208016.356344739}, {heading: 6.1868903537531,pitch: -1.5656943450517242,roll: 0,});

					var point2 = new Cesium.KmlCamera({x: -2728879.539330432,y: 4345943.930803351,z: 3897413.93401338}, {heading: 6.1868903439516485,pitch: -1.5656745179103266,roll: 0,});

					var point3 = new Cesium.KmlCamera({x: -2692117.9442886626,y: 4303242.391819677,z: 3857490.882483855}, {heading: 0.019184216237102092,pitch: -0.6311988620729023,roll: 0,});

					var point4 = new Cesium.KmlCamera({x: -2686902.587712886,y: 4294122.6061769035,z: 3863166.9436050635}, {heading: 5.470220731689401,pitch: -0.2945002414320481,roll: 0.000004991406174603696,});

					point1.id = 1;
					point2.id = 2;
					point3.id = 3;
					point4.id = 4;

					var tour = new Cesium.KmlTour('sssss', 123456);
					tour.addPlaylistEntry(new Cesium.KmlTourFlyTo(2, 'BOUNCE_IN_OUT', point1));
					tour.addPlaylistEntry(new Cesium.KmlTourFlyTo(2, 'SINUSOIDAL_OUT', point2));
					tour.addPlaylistEntry(new Cesium.KmlTourFlyTo(5, 'SINUSOIDAL_OUT', point3));
					tour.addPlaylistEntry(new Cesium.KmlTourFlyTo(4, 'SINUSOIDAL_OUT', point4));


					// entryStart
					tour.entryStart.addEventListener(function (entry) {
						if(entry.view.id === 3){
							setTimeout(() => {
								tour.stop();
							}, 0);

							setTimeout(() => {
								entry.play(function(a, b, c){
									tour.playlist[3].play(function(){
										setTimeout(() => {
											viewer.scene.primitives.remove(tour.loadBuildTileset);

											// 地形
											self.addDem(viewer);

											// load Map 标注
											self.addLabelLayer(viewer);

											// 打开 filter
											fm.filter.open();
										}, 500);
									}, viewer.camera);
									
								}, viewer.camera);
							}, 1500);
						};
					});
					// entryEnd
					tour.entryEnd.addEventListener(function (entry) {
						if(entry.view.id === 1){
							m.vlocalMap.show = true;
							viewer.scene.imageryLayers.remove(self.imageryLayers.earthBg);
							//viewer.scene.imageryLayers.addImageryProvider(localMap);

							// 近场景
							self.setScene(viewer);
						}else if(entry.view.id === 2){
							// 边界
							self.addRegion();
							
							// 显示白模
							tour.loadBuildTileset.show = true;
						};
					});

					// 加载地图层
					m.vlocalMap = viewer.scene.imageryLayers.addImageryProvider(self.localMap);
					m.vlocalMap.show = false;

					// 白膜
					tour.loadBuildTileset = self.loadBuildData();

					var position = {"x":-2686273.730145489,"y":4293961.185794622,"z":3863430.5618300107};
					var m1Pointer = qf.UI.popWindow({
						name:'',
						pointer:{ point:'bottom', show:true, x:42,},
						container:document.createElement('div'),		// id || Element对象
						html:'<div class="popupBgImage" style="color:#fff;width:100px;height:30x;font-size:15px;padding:5px;text-align:center;cursor:pointer;user-select:none;">山东威海</div>',
						onload: function(md){
							// onclick
							md.Wrap.onclick = function(){
								md.mapView.remove();
								tour.play(viewer);
							};

							// 创建窗口
							md.mapView = new fg3d.Plugins.View(position, md.Wrap, {
								render: function(){
									return {position:position, y:-5, x:-50,};
								},
							});
						},
					});
				},

				loadInitAssets: async function(viewer){
					var self = this, tileBg;
					var cesiumContainer = document.getElementById("cesiumContainer");
					var loadMask = qf.UI.loading({container:cesiumContainer, zIndex:2051, timer:100000});
					
					// 背景
					var img = document.createElement("img");
					img.src = "/static/images/sky_background.png";

					return new Promise(function(fn, err){
						img.onload = function(res){
							img.src = "/static/images/map_bg_liner.png";
							img.onload = function(){
								let customBgImage = new fg3d.View.BgImage("/static/images/sky_background.png");
								(tileBg = new Cesium.SingleTileImageryProvider({
									url: '/static/images/earth_2.jpg',
								})).readyPromise.then(function(res){
									self.imageryLayers.earthBg = viewer.scene.imageryLayers.addImageryProvider(tileBg);
									viewer.scene.globe.show = true;
									//viewer.scene.screenSpaceCameraController.enableZoom = false;//禁止缩放
									loadMask.close();
									fn();
								});
							};
						}
					});
				},

				setGlobeView: function(viewer){
					viewer.camera.setView({
						destination: {
							x: -7255040.647702713,
							y: 21817301.891456507,
							z: 10860944.141331952
						},
						orientation:{
							// 指向
							heading: 6.1868904852065745,
							// 视角
							pitch: -1.5659685065285598,
							// 倾斜
							roll: 0,
						},
					});
				},

				setInitGlobeInitStyle: function(viewer){
					var globe = viewer.scene.globe;

					// 启用从 lightingFadeInDistance 和 lightingFadeOutDistance 之间的距离观察时绘制在地球上的地面大气
					globe.showGroundAtmosphere = true;
					
					// 启用使用场景的光源为地球照明。
					globe.enableLighting = false;

					// 用于突出显示地形填充图块的颜色
					//globe.fillHighlightColor = Cesium.Color.RED;
					// 恢复照明的距离。这只会生效当 enableLighting 或 showGroundAtmosphere 为 true 时。
					globe.lightingFadeInDistance = 20000000000000000.0;
					// 一切都变亮的距离。这只会生效当 enableLighting 或 showGroundAtmosphere 为 true 时。
					globe.lightingFadeOutDistance = 10000000.0;
					
					// 亮度变化适用于大气。默认为0.0（无移位）。-1.0的亮度偏移是完全黑暗，这将使空间显示出来。
					globe.atmosphereBrightnessShift = -1.0;

					// 色调变化适用于大气。默认为0.0（无移位）。色相偏移1.0表示可用色相完全旋转。
					globe.atmosphereHueShift = 1.0;

					// 饱和度偏移将应用于大气。默认为0.0（无移位）。-1.0的饱和度偏移是单色的。
					globe.atmosphereSaturationShift = -1.0;
					
					// 对大气和雾启用动态照明效果。这只会生效当 enableLighting 为 true 时。
					globe.dynamicAtmosphereLighting = true;

					// 动态气氛照明是否使用太阳方向而不是场景的方向灯光方向。仅在 enableLighting 和 dynamicAtmosphereLighting 是 true 。
					globe.dynamicAtmosphereLightingFromSun = true;

					// 地球透明
					//globe.baseColor = Cesium.Color.TRANSPARENT;
					//globe.translucency.enabled = true;
					//globe.undergroundColor = Cesium.Color.BLACK;

					
					// setBaseLayer
					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.0;
					
					// 地图层调色(bold)
					baseLayer.brightness = 0.95;
					baseLayer.contrast = 1.4;
					baseLayer.hue = 0.0;
					baseLayer.saturation = 1.08;
					baseLayer.gamma = 1.14;

					// setSkyAtmosphere		天气颜色
					var skyAtmosphere = viewer.scene.skyAtmosphere;
					//skyAtmosphere.show = true;
					skyAtmosphere['hueShift'] = 1;
					skyAtmosphere['saturationShift'] = 1;
					skyAtmosphere['brightnessShift'] = 0.1;
				},

				// 跳过动画
				cutInScene: function(viewer){
					
					// 加载地图层
					m.vlocalMap = viewer.scene.imageryLayers.addImageryProvider(this.localMap);

					//return ;
					
					// 视角
					this.setView();

					// 场景
					this.setScene(viewer);

					// 地形
					this.addDem(viewer);

					// 边界
					this.addRegion();

					// 标注
					this.addLabelLayer(viewer);

					// 瓦片
					this.loadPark();

					// 打开 filter
					fm.filter.open();
				},

				// setView
				setView: function(){
					// 视角-环翠
					this.viewer.scene.camera.setView({
						duration: 1,
						destination: {
							x: -2739843.563038797,
							y: 4357442.794747324,
							z: 3880768.3292693933
						},
						orientation: {
							heading: 6.037000745578596,
							pitch: -1.2499586064720978,
							roll: 0.000005306352659495417,
						}
					});

					// lable 测试
					/* this.viewer.scene.camera.setView({
						duration: 1,
						destination: {
							x: -2689636.548026065,
							y: 4294364.29334456,
							z: 3862453.478875718
						},
						orientation: {
							heading: 6.204207130855485,
							pitch: -1.5706566198408844,
							roll: 0,
						}
					}); */


					// 视角-管委
					/* this.viewer.scene.camera.setView({
						duration: 1,
						destination: {
							x: -2686902.587712886,
							y: 4294122.6061769035,
							z: 3863166.9436050635
						},
						orientation: {
							heading: 5.470220731689401,
							pitch: -0.2945002414320481,
							roll: 0.000004991406174603696,
						}
					}); */
				},

				// setScene
				setScene: function(viewer){
					//场景设置
					viewer.scene.skyBox.show = false;
					//viewer.scene.backgroundColor = new Cesium.Color(0.0, 0.0, 0.0, 0.0);
					viewer.scene.sun.show = false; //隐藏太阳
					viewer.scene.moon.show = false; //隐藏月亮 

					viewer.scene.fxaa = false;
					viewer.scene.globe.maximumScreenSpaceError = 1;

					// 获取当前的图层
					let layer0 = viewer.scene.imageryLayers.get(0);
					layer0.brightness = 1.2;	// 亮度
					layer0.contrast = 1.2;		// 对比度
					layer0.hue = 0.05;			// 色温
					layer0.saturation = 1.50;	// 饱合
					layer0.gamma = 1.14;		// 伽玛

					// 天空
					var skyAtmosphere = viewer.scene.skyAtmosphere;
					skyAtmosphere['hueShift'] = 0.0;
					skyAtmosphere['saturationShift'] = 0.5;
					skyAtmosphere['brightnessShift'] = 0.01;
				

					// 改变当前地图的组织结构
					layer0.minificationFilter=Cesium.TextureMagnificationFilter.NEAREST;
					layer0.magnificationFilter=Cesium.TextureMagnificationFilter.NEAREST;


					//地球设置
					let globe = this.viewer.scene.globe;
					globe.depthTestAgainstTerrain = true;
					globe.showGroundAtmosphere = false;
					//globe.baseColor = Cesium.Color.RED;
					//globe.baseColor = Cesium.Color.RED.withAlpha(.1);
					globe.baseColor = new Cesium.Color(0.0, 0.0, 0.0, 0.0);
					
					globe.translucency.fillHighlightColor = Cesium.Color.YELLOW,
					globe.undergroundColor = undefined;

					// 适用于地球背面的恒定透明度(打开这一项地图层有裂缝)
					//globe.translucency.enabled = true;

					//this.viewer.imageryLayers.removeAll(true); //删除所有底图  

					this.viewer.scene.fxaa = true;
					this.viewer.scene.postProcessStages.fxaa.enabled = true;
					//this.viewer.scene.terrainProvider.isCreateSkirt = false;

					// 光影效果
					/* viewer.scene.globe.enableLighting = true
					viewer.shadows = true
					viewer.terrainShadows = Cesium.ShadowMode.RECEIVE_ONLY
					viewer.shadowMap.darkness = 0.02 //阴影透明度--越大越透明
					let time = 0
					var inter = setInterval(() => {
						// 改变时间设置光照效果
						let date = new Date().getTime() + time
						let utc = Cesium.JulianDate.fromDate(new Date(date))
						//北京时间
						viewer.clockViewModel.currentTime = Cesium.JulianDate.addHours(utc, 0, new Cesium.JulianDate())
						time = time + 1000 * 60
					}, 100); */


					let customBgImage = new fg3d.View.BgImage("/static/images/map_bg_liner.png");

					// 限高
					viewer.scene.screenSpaceCameraController.maximumZoomDistance = 80000;

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

					// 去除版权信息
					viewer._cesiumWidget._creditContainer.style.display = "none";
				},

				addLabelLayer: function(viewer){
					var localGisLabel = new Cesium.TileMapServiceImageryProvider({
						url: process.env.VUE_APP_GIS + "/gis/routeLabel",
						tileWidth:300,
						tileHeight:300,
						//maximumLevel:18,
		
						/* tileDiscardPolicy:new Cesium.DiscardMissingTileImagePolicy({
							missingImageUrl:'/static/images/poi-marker-red.png',
							disableCheckIfAllPixelsAreTransparent:true,
							shouldDiscardImage: function(){
								console.log('shouldDiscardImage ________________ ', 1111111111);
							},
							isReady: function(a){
								console.log('test ________________ ', a);
								return false;
							},
						}), */
						/* tileDiscardPolicy:{
							shouldDiscardImage: function(a,b,c){
								return false
							},
							isReady: function(a){
								return true;
							},
						}, */
					});
					// 添加标注层
					var lable = viewer.imageryLayers.addImageryProvider(localGisLabel);
					// 地图层调色(bold)
					lable.brightness = 1.0;	// 亮度
					lable.contrast = 1.4;		// 对比度
					lable.hue = 0;			// 色温
					lable.saturation = 1.50;	// 饱合
					lable.gamma = 0.9;		// 伽玛
				},

				// 边界
				addRegion: function() {
					var viewer = this.viewer;
					fetch("/static/data/huancui_v4_format.json").then(function(e) {
						return e.json()
					}).then(function(res) {
						var self = this, features = res.features;
						// 环翠
						var huancui = features[0];
						var coordinates = huancui.geometry.coordinates;
						var len = coordinates.length, tagArea = [0, 2, 3];
						for(var i=0; i<len; i++){
							if(tagArea.includes(i)){
								var coords = coordinates[i][0];
								var config = {
									wall: {
										positions: coords,
										material: new Cesium.ImageMaterialProperty({
											image: "/static/images/wallgradients.png",
											repeat: new Cesium.Cartesian2(0, 1),
											transparent: !0,
											color: Cesium.Color.fromCssColorString("#008EAF")
										})
									},
								};
								if(!!i){
									config = Object.assign(config, {
										polygon: {
											hierarchy: coords,
											material: Cesium.Color.fromCssColorString("#27444B").withAlpha(.8),
										},
									});
								};
								viewer.entities.add(config);
							};
						};

						// 高区外
						var gaoquouts = features[2].geometry.coordinates[0];
						for(var coords of gaoquouts){
							viewer.entities.add({
								polygon: {
									hierarchy: coords,
									material: Cesium.Color.fromCssColorString("#27444B").withAlpha(.8),
								},
								corridor: {		// 走廊
									positions: coords,
									width: 200.0,
									material: Cesium.Color.GREEN.withAlpha(0.6),
								},
							})
						};

						// 高区
						setTimeout(() => {
							var gaoqu = features[1].geometry.coordinates[0];
							viewer.entities.add({
								corridor: {		// 走廊
									positions: gaoqu,
									width: 180.0,
									material: Cesium.Color.PURPLE.withAlpha(0.6),
								},
							});
						}, 50);
					});

					// 白膜
					//this.loadBuildData();
					//this.loadPark()
				},
				
				// DEM
				addDem: function(viewer){
					viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
						url: process.env.VUE_APP_GIS + "/gis/dem",
						requestVertexNormals: true
					});
				},

				loadBuildData(){
					var viewer = this.viewer1;
					let tileset = this.viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						//url: "http://localhost:9003/model/tOWVixrZW/tileset.json",
						url: "http://192.168.3.226:8080/Apps/assets/media/whiteModel/WH_Custom_BigDEM/tileset.json",
					}));

					tileset.readyPromise.then((tileset) => {
						let cs = new fg3d.Entities.BuildingShader(tileset, {
							//color: new Cesium.Color.BLUR, //颜色 rgba 浮点型 
							//color: new Cesium.Color(0.2, 0.5, 1.0, 1.0), //颜色 rgba 浮点型 
							color: new Cesium.Color(0.37, 0.55, 0.59, 0.5),
							glowRange: false,	//	是否显示光渲
							transparent:true,	// 是否开启透明色
							gradient: true,		// 是否开启颜色过度(不透明下开启无效)
							glowRangeHeight: '100.0', //光渲高度范围 浮点型
							clickHighlight:true,
						});

						//setTimeout(() => {
						//	cs.setColor(Cesium.Color.YELLOW);
						//}, 10000);
						
						// 先隐藏
						setTimeout(() => {
							tileset.show = false;
						}, 500);
						
						// 加载瓦片
						this.loadPark()
					}).otherwise(function(error) {
						console.error(error);
					});
					return tileset;
				},

				setMarkersAttr: function(dict){
					var list = this.bbdCollection._billboards;
					for(var i=0, len=list.length; i<len; i++){
						var bbd = list[i];
						if(dict[bbd.id]){
							bbd.show = true, dict[bbd.id] = bbd;
						}else{
							bbd.show = false
						};
					};
				},
				
				// 园区瓦片
				loadPark: function(){
					var viewer = this.viewer;
					var gisurl = process.env.VUE_APP_GIS;
					
					// 高区管委
					this.tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						url: gisurl + '/tiles/01_guanwei/tileset.json',
						// 优化
						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: 2048, // 内存分配变小有利于倾斜摄影数据回收，提升性能体验
						progressiveResolutionHeightFraction: 0.5, // 数值偏于0能够让初始加载变得模糊
						dynamicScreenSpaceError: true, // 根据测试，有了这个后，会在真正的全屏加载完之后才清晰化房屋(优化选项。减少离相机更远的磁贴的屏幕空间错误)
						dynamicScreenSpaceErrorDensity: 0.00278, // 数值加大，能让周边加载变快
						dynamicScreenSpaceErrorFactor: 4.0, // 不知道起了什么作用没，反正放着吧先
						dynamicScreenSpaceErrorHeightFalloff: 0.25,

						//modelMatrix: Cesium.Matrix4.IDENTITY,	// 一个 4x4 转换矩阵，用于转换图块集的根图块。
						
						//控制切片视角显示的数量，可调整性能
						maximumNumberOfLoadedTiles: 1000, //最大加载瓦片个数
					}));
					var fps1 = {"x":-2686273.730145489,"y":4293961.185794622,"z":3863430.5618300107};
					var mark1 = new fg3d.Entities.Billboard(fps1, {
						scale:.8,
						width:100,
						height:70,
						fontSize:18,
						fontX:12,
						fontY:16,
						text:'高区管委',
						color:'#D6D608',
						pixelOffset: [0, 0],
						heightReference:0,
						//scaleByDistance: new Cesium['NearFarScalar'](1000, 1, 5000, .6),
						distanceDisplayCondition: new Cesium['DistanceDisplayCondition'](0x0, 400000),
						draw: function(ctx){
							mark1.setStyle1({height:28, width:98, color:'#06E1FB', fillColor:'rgba(0,26,57,.8)', round:6});
						},
					});


					this.tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						url: gisurl + '/tiles/02_chuangyejidi/tileset.json',
						// 优化
						scene3DOnly: true, //如果设置为true，则所有几何图形以3D模式绘制以节约GPU资源
						skipLevelOfDetail: true,
						skipScreenSpaceErrorFactor: 64,		// 默认 16
						skipLevels: 1,	// 如果为0，则不会跳过任何级别。与skipScreenSpaceErrorFactor一起使用，以确定要加载的磁贴
						immediatelyLoadDesiredLevelOfDetail: false,		// 当 skipLevelOfDetail 为true时，将只下载满足最大屏幕空间错误的磁贴。忽略跳过因素，只加载所需的磁贴。
						baseScreenSpaceError: 1920,
						maximumScreenSpaceError: 1, // 数值加大，能让最终成像变模糊
						maximumMemoryUsage: 2048, // 内存分配变小有利于倾斜摄影数据回收，提升性能体验
					}));
					var fps2 = {"x":-2687333.757373931,"y":4293549.619856948,"z":3863265.7365335915};
					var mark2 = new fg3d.Entities.Billboard(fps2, {
						scale:.8,
						width:100,
						height:70,
						fontSize:18,
						fontX:12,
						fontY:16,
						text:'创业基地',
						color:'#D6D608',
						pixelOffset: [0, 0],
						heightReference:0,
						//scaleByDistance: new Cesium['NearFarScalar'](1000, 1, 5000, .6),
						distanceDisplayCondition: new Cesium['DistanceDisplayCondition'](0x0, 400000),
						draw: function(ctx){
							mark2.setStyle1({height:28, width:98, color:'#06E1FB', fillColor:'rgba(0,26,57,.8)', round:6});
						},
					});

					//return ;
					
					// 海水浴场
					this.tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						url: gisurl + '/tiles//03_yuchang/tileset.json',
						// 优化
						scene3DOnly: true, //如果设置为true，则所有几何图形以3D模式绘制以节约GPU资源
						skipLevelOfDetail: true,
						skipScreenSpaceErrorFactor: 64,		// 默认 16
						skipLevels: 1,	// 如果为0，则不会跳过任何级别。与skipScreenSpaceErrorFactor一起使用，以确定要加载的磁贴
						immediatelyLoadDesiredLevelOfDetail: false,		// 当 skipLevelOfDetail 为true时，将只下载满足最大屏幕空间错误的磁贴。忽略跳过因素，只加载所需的磁贴。
						baseScreenSpaceError: 1920,
						maximumScreenSpaceError: 1, // 数值加大，能让最终成像变模糊
						maximumMemoryUsage: 2048, // 内存分配变小有利于倾斜摄影数据回收，提升性能体验
					}));
					var fps3 = {"x":-2686576.4905412863,"y":4293352.708031848,"z":3863876.9610397317};
					var mark3 = new fg3d.Entities.Billboard(fps3, {
						scale:.8,
						width:100,
						height:70,
						fontSize:18,
						fontX:12,
						fontY:16,
						text:'海水浴场',
						color:'#D6D608',
						pixelOffset: [0, 0],
						heightReference:0,
						//scaleByDistance: new Cesium['NearFarScalar'](1000, 1, 5000, .6),
						distanceDisplayCondition: new Cesium['DistanceDisplayCondition'](0x0, 400000),
						draw: function(ctx){
							mark3.setStyle1({height:28, width:98, color:'#06E1FB', fillColor:'rgba(0,26,57,.8)', round:6});
						},
					});

					// 威高
					var tileset4 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						url: gisurl + '/tiles/04_weigao/tileset.json',
						// 优化
						scene3DOnly: true, //如果设置为true，则所有几何图形以3D模式绘制以节约GPU资源
						skipLevelOfDetail: true,
						skipScreenSpaceErrorFactor: 64,		// 默认 16
						skipLevels: 1,	// 如果为0，则不会跳过任何级别。与skipScreenSpaceErrorFactor一起使用，以确定要加载的磁贴
						immediatelyLoadDesiredLevelOfDetail: false,		// 当 skipLevelOfDetail 为true时，将只下载满足最大屏幕空间错误的磁贴。忽略跳过因素，只加载所需的磁贴。
						baseScreenSpaceError: 1920,
						maximumScreenSpaceError: 16, // 数值加大，能让最终成像变模糊
						maximumMemoryUsage: 2048, // 内存分配变小有利于倾斜摄影数据回收，提升性能体验
					}));
					var fps4 = {"x":-2685681.486257544,"y":4305151.126106858,"z":3851485.909567981};
					var mark4 = new fg3d.Entities.Billboard(fps4, {
						scale:.8,
						width:100,
						height:70,
						fontSize:18,
						fontX:12,
						fontY:16,
						text:'威高园区',
						color:'#D6D608',
						pixelOffset: [0, 0],
						heightReference:0,
						//scaleByDistance: new Cesium['NearFarScalar'](1000, 1, 5000, .6),
						distanceDisplayCondition: new Cesium['DistanceDisplayCondition'](0x0, 400000),
						draw: function(ctx){
							mark4.setStyle1({height:28, width:98, color:'#06E1FB', fillColor:'rgba(0,26,57,.8)', round:6});
						},
					});
					/* var terrainProvider = this.viewer.scene.terrainProvider;
					tileset4.readyPromise.then(function (tileset) {               
						var boundingSphere = tileset.boundingSphere;
						var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);//获取到倾斜数据中心点的经纬度坐标（弧度）
						var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);//倾斜数据中心点的笛卡尔坐标      
						var positions = [Cesium.Cartographic.fromDegrees(cartographic.longitude,cartographic.latitude)];
						 var promise = Cesium.sampleTerrainMostDetailed(terrainProvider, positions);//其中terrainProvider是当前场景使用的高程Provider
						 Cesium.when(promise, function(updatedPositions) {
							var terrainHeight = updatedPositions[0].height;//高程
							var offset=Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, terrainHeight);//带高程的新笛卡尔坐标
							var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());//做差得到变换矩阵
							tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
						});
					 }).otherwise(function (error) {
						console.log(error);
					}); */


					// 富士康
					this.tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
						url: gisurl + '/tiles/05_fushikang/tileset.json',
						// 优化
						scene3DOnly: true, //如果设置为true，则所有几何图形以3D模式绘制以节约GPU资源
						skipLevelOfDetail: true,
						skipScreenSpaceErrorFactor: 64,		// 默认 16
						skipLevels: 1,	// 如果为0，则不会跳过任何级别。与skipScreenSpaceErrorFactor一起使用，以确定要加载的磁贴
						immediatelyLoadDesiredLevelOfDetail: false,		// 当 skipLevelOfDetail 为true时，将只下载满足最大屏幕空间错误的磁贴。忽略跳过因素，只加载所需的磁贴。
						baseScreenSpaceError: 1920,
						maximumScreenSpaceError: 16, // 数值加大，能让最终成像变模糊
						maximumMemoryUsage: 2048, // 内存分配变小有利于倾斜摄影数据回收，提升性能体验
					}));
					var fps5 = {"x":-2685873.175179993,"y":4302021.609099423,"z":3854821.8739365735};
					var mark5 = new fg3d.Entities.Billboard(fps5, {
						scale:.8,
						width:100,
						height:70,
						fontSize:18,
						fontX:20,
						fontY:16,
						text:'富士康',
						color:'#D6D608',
						pixelOffset: [0, 0],
						heightReference:0,
						//scaleByDistance: new Cesium['NearFarScalar'](1000, 1, 5000, .6),
						distanceDisplayCondition: new Cesium['DistanceDisplayCondition'](0x0, 400000),
						draw: function(ctx){
							mark5.setStyle1({height:28, width:98, color:'#06E1FB', fillColor:'rgba(0,26,57,.8)', round:6});
						},
					});
				},

				createMarker: function(item){
					item.position = Cesium.Cartesian3.fromDegrees(item.companyLng, item.companyLat, item.companyHig || 50);

					//var position = fg3d.Assist.getLnglatToCartesian(item.companyLng, item.companyLat);
					//var position = fg3d.Assist.getLnglatToPosition(item.companyLng, item.companyLat);

					var bbdid = item.type > 1 ? item.type + '_' + item.companyId : item.companyId;
					var bbd = this.bbdCollection.add({
						position: item.position,
						image: '/static/images/marker'+item.type+'.png',
						verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
						scale: 1,
						width: 25, // default: undefined
						height: 35,
						//id:item.companyId,
						id:bbdid,
						//show:false,
					});
					return bbd.data = item, bbd;
				},
				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:"ShuHei";src: url("~@/assets/fonts/AlimamaShuHeiTi-Bold.ttf");};
	.font_digit{font-family:diget year;}
	.font_ShuHei{font-family:ShuHei;}

	
	.Screen {
		position:relative;height:100%;width:100%;overflow:hidden;

		
		/* filter 动画 */
		.filter{
			color:#fff;
			width:0;height:0;
			display:flex;justify-content:center;align-items:center;user-select:none;
			.limit{
				position:relative;display:flex;background-color:rgba(0,0,0,.5);padding:.25rem;border:1px solid #3EB7EA;opacity:1;
				>div{width:1rem;display:flex;}
			}
			.el-icon-news{
				position:absolute;top:.05rem;right:.05rem;font-size:.20rem;cursor:pointer;
				color:#8CCEE6;
			}
			.el-icon-cold-drink{
				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;
				}
			}
		}
		.f-prepare{
			transition:transition .8s ease 0s;
			.limit{
				transition:all .5s ease 0s;
			}
			.el-icon-cold-drink{
				transition: all .5s ease 0s;
			}
		}
		.f-shrink{
			z-index:100;cursor:pointer;transform:scale(1.3);
			.filter{
				.limit{
					transform:rotateX(0deg) rotateY(87deg) scaleY(0.5);
					transform-origin:center 0px; opacity:0;
				}
			}
			.el-icon-cold-drink{
				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(7.8rem, -1.28rem, 0) scale(1.0);
			}
		}
		@-webkit-keyframes anim-revert{
			0% {
				transform: translate3d(7.8rem, -1.28rem, 0);
			}
			100% {
				transform: translateY(0)
			}
		}

		/* 级联层动画 */
		.cascade{
			transition:transform .3s ease-out .25s;
			&.hide{
				transition:transform .3s ease-out 0s;
				transform:rotateX(0deg) rotateY(0deg) scaleX(0.01) scaleY(0.01);
				.trigger{
					transition:transform .3s ease-out .3s;
					transform:rotateX(0deg) rotateY(0deg) scaleX(177.11) scaleY(168.01);
				}
				.kmb-popmd-e3d8{display:none !important;}
			}
			.trigger{
				transition:transform .3s ease-out 0s;
				transform:rotateX(0deg) rotateY(0deg) scaleX(0) scaleY(0);
				transform-origin:.085rem center;
				color:#e5a22b;
			}
			transform-origin:.0rem center;
		}


		.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%;position:relative;z-index:1;
				.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:relative;height:.84rem;width:100%;
						margin: 0 auto;
						background:no-repeat top center url('~@/assets/images/layout/s_hd_m.png');
						background-size:auto .84rem;
						display:flex;justify-content:center;pointer-events:none;
						h2{
							font-size:.36rem;line-height:1;margin:.15rem 0 0 .0rem;font-weight:bold;
							font-style:italic;
							font-family:'element-icons';color:#fff;
							background-image:-webkit-linear-gradient(top,#fff,#c6dafb,#90b6f5);-webkit-background-clip:text;-webkit-text-fill-color:transparent;letter-spacing:.06rem;
						}
					}

					.a0a_{
						position:absolute;top:0;left:0;height:0;width:100%;
						display:flex;justify-content:space-between;
						ul{
							height:0;display:flex;margin-top:.42rem;width:5.15rem;
							li{
								width:1.17rem;height:.40rem;cursor:pointer;border-radius:.05rem;
								background-repeat:no-repeat;background-position:top center;background-size:100% 100%; background-image:url('~@/assets/images/layout/h_btn.png');
								display:flex;justify-content:center;align-items:center;font-size:.16rem;
								&:hover{
									box-shadow:inset 0 0 0.08rem 0.03rem rgba(42,248,251, .8);
								}
							}
							li.active{background-image:url('~@/assets/images/layout/h_btn_a.png');}
							li:last-child{
								margin-right:0;
							}
						}
						ul:first-child{
							margin-left:.14rem;
							li{margin-right:.13rem;}
						}
						ul:last-child{
							margin-right:.14rem;
							li{margin-left:.13rem;}
						}
					}

					.more{
						position:absolute;top:.07rem;right:.30rem;
						ul{display:flex;}
						li{
							height:.31rem;width:.31rem;margin-left:.20rem;cursor:pointer;
							background-repeat:no-repeat;background-position:center center;background-size:.29rem .29rem;border-radius:.29rem;
							&:hover{
								box-shadow:inset 0 0 0.04rem 0.02rem rgba(42,248,251, .8);
							}
						}
						li:first-child{
							background-image:url('~@/assets/images/layout/home_normal.png');
							&.active{background-image:url('~@/assets/images/layout/home_click.png');}

						}
						li:last-child{
							background-image:url('~@/assets/images/layout/enter_normal.png');
						}
					}
				}
			}
		}
		.b_0{
			display:flex;top:0.96rem;left:0;bottom:0;width:0;background-color:rgba(0,0,0,.15);z-index:2;
			
			.b0_{
				display:flex;flex-direction:column;justify-content:center;height:100%;width:0;

				.kmb-checkbox{
					dd{line-height:.35rem;}
				}
				
				.side{
					// display:none;
					width:4.60rem;height:0;
					display:flex;flex-direction:column;justify-content:center;user-select:none;color:#fff;
					
					.abs-full{
						display:flex;flex-direction:column;padding:.08rem .10rem;
						.chart{position:relative;}
					}

					.m-tt{
						height:.41rem;width:4.36rem;
						h4{
							height:100%;line-height:.40rem;font-size:.18rem;
							font-family:serif;font-style:italic;letter-spacing:.01rem;
							background-image:linear-gradient(to bottom,#fff,#f3fffc,#e4fff9);
							-webkit-background-clip:text;-webkit-text-fill-color:transparent;
						}
					}

					.ct-box{
						flex:1;display:flex;position:relative;font-size:.13rem;

						.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%;
						}
						.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-md27{
						height:3.00rem;
						.item_2{
							position:absolute;top:.56rem;left:.50rem;z-index:10;
							select{background-color:transparent;color:#e1ffff;font-size:.14rem;padding:.02rem;}
							select:focus{outline:none;}
							option{color:#d8f9ff;background-color:rgba(1,35,62,.7);}
						}
						.ct-box{}
					}

					.a-md31{
						height:3.00rem;
						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;line-height:1;
								&:before{
									content:"";position:absolute;top:0;left:0;height:100%;width:.40rem;
									background-repeat:no-repeat;background-position:center center;background-size:100% auto;
									//background-image:url('~@/assets/images/layout/md31_i1.png');
								}
								display:flex;justify-content:center;flex-direction:column;
								padding-left:.43rem;
								h6{
									font-size:.12rem;color:#a3e4f6;margin-top:.04rem;
								}
								font{
									font-size:.26rem;font-family:diget year;margin-top:.08rem;
									line-height:.18rem;
								}
							}
							/* li:nth-child(4), li:nth-child(5), li:nth-child(6){
								&:before{
									background-image:url('~@/assets/images/layout/md31_i2.png');
								}
							} */
							li:nth-child(1){
								&:before{
									background-image:url('~@/assets/images/layout/md31-01.png');
								}
							}
							li:nth-child(2){
								&:before{
									background-image:url('~@/assets/images/layout/md31-02.png');
								}
							}
							li:nth-child(3){
								&:before{
									background-image:url('~@/assets/images/layout/md31-03.png');
								}
							}
							li:nth-child(4){
								&:before{
									background-image:url('~@/assets/images/layout/md31-04.png');
								}
							}
							li:nth-child(5){
								&:before{
									background-image:url('~@/assets/images/layout/md31-05.png');
								}
							}
							li:nth-child(6){
								&:before{
									background-image:url('~@/assets/images/layout/md31-06.png');
								}
							}
							li:nth-child(7){
								&:before{
									background-image:url('~@/assets/images/layout/md31-07.png');
								}
							}
							li:nth-child(8){
								&:before{
									background-image:url('~@/assets/images/layout/md31-08.png');
								}
							}
							li:nth-child(9){
								&:before{
									background-image:url('~@/assets/images/layout/md31-09.png');
								}
							}
						}
					}
					.a-md32{
						height:3.00rem;
						.scrolling4{
							position:absolute;top:0;left:0;height:100%;width:100%;overflow-y:auto;
							font-size:.14rem;
							dt, dd{padding:.10rem 0;line-height:.18rem;}
							dt{
								margin-top:.05rem;color:#aaecff;
								display:grid;grid-template-columns:.37rem 1.25rem .91rem 1.50rem;
							}
							dd{
								margin-bottom:.08rem;color:#fff;margin-right:.03rem;
								display:grid;grid-template-columns:.37rem 1.25rem .91rem 1.50rem;
								span{margin-right:.10rem;display:flex;align-items:center;}
								span:first-child{color:#94e2ff;justify-content:center;}
							}
							dd{
								background-color:rgba(37, 102, 195, .3);
							}
						}
					}

					.a-md33{
						height:3.00rem;
					}

					.a-md34{
						height:3.00rem;
						.ct-pl{
							display:flex;flex-direction:column;justify-content:center;align-items:center;
							width:1.47rem;margin-right:.02rem;line-height:1;
							background:no-repeat center center url('~@/assets/images/layout/md34_i1.png');
							background-size:1.06rem 1.46rem;;
							h4{
								font-size:.16rem;font-style:italic;color:#48e2fc;letter-spacing:.01rem;
							}
							font{
								font-size:.32rem;font-family:diget year;line-height:.22rem;
								margin:.15rem 0 .48rem 0;
								-webkit-background-clip:text;-webkit-text-fill-color:transparent;
								background-image:-webkit-linear-gradient(top,#fff,#daf8ff,#95ecff);
							}
						}
						.chart{
							flex:1;
							dd{
								display:grid;grid-template-columns:26% 58% 16%;align-items:center;
								height:.36rem;line-height:1;margin-right:.03rem;
								font:last-child{
									text-align:right;font-size:.19rem;font-family:diget year;
								}
							}
							dd:nth-child(2){
								.progress-bar{
									background-image:linear-gradient(to right, rgba(18,202,148,.20), rgba(18,202,148,.80));
									&:before{background-color:rgba(18,202,148, 1);}
									&:after{background-color:rgba(18,202,148, .4);}
								}
							}
							dd:nth-child(3){
								.progress-bar{
									background-image:linear-gradient(to right, rgba(235,168,19,.20), rgba(235,168,19,.80));
									&:before{background-color:rgba(235,168,19, 1);}
									&:after{background-color:rgba(235,168,19, .4);}
								}
							}
						}
					}

					.a-md35{
						height:3.00rem;
						dl.scrolling4{
							dt{
								grid-template-columns:10% 75% 15%;
							}
							dd{
								grid-template-columns:10% 75% 15%;
								span:last-child{color:#39effc;justify-content:center;}
							}
						}
					}
					.a-md36{
						height:3.00rem;
					}

					.menu-l1{
						position:relative;display:flex;
						flex:none;height:9.42rem;max-height:85.5vh;
						background:no-repeat center center url('~@/assets/images/layout/a-md37.png');background-size:100% 100%;

						.rel-full{
							flex:1;position:relative;display:flex;flex-direction:column;
						}
						.m-t1{
							margin:.19rem .20rem 0 .20rem;
							h4{
								height:.46rem;width:1.47rem;
								display:flex;flex-direction:column;justify-content:center;align-items:center;
								background:no-repeat center center url('~@/assets/images/layout/a-md37_1.png');background-size:100% 100%;
								font-size:.17rem;
							}
						}
						.m-t2{
							margin:.19rem .20rem 0 .20rem;
							.el-date-editor{
								height:.40rem;width:100%;
							}
							.el-range-separator{
								line-height:.30rem;
							}
							.el-input__icon{
								display:flex;align-items:center;
							}
						}
						.m-t3{
							flex:1;display:flex;flex-direction:column;margin:.15rem .03rem .15rem 0;
							h5{
								margin:0 .20rem;
								height:.46rem;display:flex;align-items:center;padding-left:.45rem;
								background:no-repeat center center url('~@/assets/images/layout/a-md37_2.png');background-size:100% 100%;
								font-size:.16rem;font-style:italic;font-weight:normal;
							}
						}
						.ct-box{
							margin-left:.15rem;
						}
						.list1{
							dd{
								display:grid;grid-template-columns:8% 72% 20%;height:.50rem;
							}
						}
						.scrolling4{
							position:absolute;top:0;left:0;height:100%;width:100%;overflow-y:auto;
							font-size:.14rem;padding:0 .20rem;
							dt, dd{line-height:.18rem;}
							dd{
								color:#fff;cursor:pointer;
								span{display:flex;align-items:center;}
								span:first-child{color:#63e3fe;justify-content:center;}
								span:last-child{
									justify-content:center;
									font-size:.27rem;font-family:diget year;
									-webkit-background-clip:text;
									-webkit-text-fill-color:transparent;
									background-image:linear-gradient(to bottom, #fff, #daf8ff, #95ecff);
								}
								//background-color:rgba(12, 40, 80, .4);
								background-image:linear-gradient(to bottom, rgba(30, 89, 165, .4), rgba(30, 89, 165, .8));
								margin-top:.12rem;
							}
							/* dd:nth-child(even){
								background-color:rgba(10, 45, 115, .7);
							} */
							dd:hover{
								background-color:rgba(18,80,185, .95);
							}
							dd.active{
								background-image:linear-gradient(to bottom, rgba(50,125,241, .75), rgba(58,179,242, 1));
							}
						}
						
						.amd37_pop{
							background-color:rgba(11,39,78, .6);padding:.01rem;
							box-shadow:inset 0 0 0.15rem 0.05rem rgba(28,104,211, .8);
							.m-t1{margin:.10rem 0 0 .10rem;}
							.scrolling4{
								position:relative;width:auto;padding:0.12rem;max-height:100%;
								dd{
									position:relative;height:.36rem;display:flex;align-items:center;
									border:1px solid #68aef4;border-radius:.05rem;padding:0 .08rem;
									&:after{
										content:"\E6E0";font-family:"element-icons" !important;color:#fff;
										position:absolute;right:.08rem;
									}
								}
							}
						}

						.m-t1-1{
							display:flex;align-items:center;margin:.20rem 0  0 .20rem;height:.84rem;
							background:no-repeat left center url('~@/assets/images/layout/menu3/t1_1.png');background-size:2.67rem 100%;
							font-size:.18rem;
							h4{margin-left:.97rem;}
						}
					}

					.menu-l2{
						display:flex;position:absolute;top:.14rem;
						height:2.44rem;width:5.94rem;;
						background:no-repeat center center url('~@/assets/images/layout/menu_l2.png');background-size:100% 100%;

						.rel-full{
							flex:1;position:relative;display:flex;flex-direction:column;
						}

						.m-t4{
							flex:1;display:flex;
							li{
								position:relative;flex:1;display:flex;flex-direction:column;align-items:center;
								text-align:center;line-height:1;cursor:pointer;
								&:after{
									content:"";position:absolute;bottom:.07rem;height:100%;width:1.03rem;
									background-repeat:no-repeat;background-position:bottom center;background-size:1.03rem 1.16rem;z-index:1;
								}
							}
							h5{
								margin-top:.15rem;font-weight:bold;
								background-clip:text;
								color:transparent;
								background-image:linear-gradient(to bottom, #ffe027, #ffc714, #ffb601);
								font-size:.38rem;font-family:'diget year';
							}
							span{font-size:.16rem;width:1.03rem;line-height:.18rem;}

							li:nth-child(1){
								&:after{
									background-image:url('~@/assets/images/layout/menu2/i1.png');
								}
							}
							li:nth-child(2){
								&:after{
									background-image:url('~@/assets/images/layout/menu2/i2.png');
								}
							}
							li:nth-child(3){
								&:after{
									background-image:url('~@/assets/images/layout/menu2/i3.png');
								}
							}
							li:nth-child(4){
								&:after{
									background-image:url('~@/assets/images/layout/menu2/i4.png');
								}
							}
							li.active{
								cursor:default;
								&:after{
									background-image:url('~@/assets/images/layout/menu2/ic.png');
								}
							}
						}
					}

					.menu-l21{
						.m-t1{
							margin:.19rem .20rem 0 .20rem;
							h4{
								height:.46rem;width:1.47rem;
								display:flex;flex-direction:column;justify-content:center;align-items:center;
								background:no-repeat center center url('~@/assets/images/layout/a-md37_1.png');background-size:100% 100%;
								font-size:.17rem;
							}
						}
						.m-t2{
							position:absolute;width:3.9rem;top:.28rem;left:1.78rem;
							>div{
								width:100%;height:.45rem;padding:0;max-width:260px;max-height:35px;
							}
						}
					}

					.menu-l3{
						position:absolute;top:2.8rem;height:58vh;width:4.2rem;
					}
					
					.menu-l4{
						position:absolute;top:2.8rem;height:58vh;width:4.2rem;
					}

					.menu-t7{
						.m-t2{
							position:absolute;width:3.5rem;top:.1rem;left:.10rem;
							>div{
								width:100%;height:.45rem;padding:0;max-height:35px;
							}
						}
						.m-t4{
							margin-top:.90rem;
							span{
								width:auto;font-size:.20rem;font-weight:bold;
								background-image:linear-gradient(to bottom, #ffde26, #ffc512, #ffb702);
								-webkit-background-clip:text;
								-webkit-text-fill-color:transparent;
							}
							li{
								&:after{width:.96rem;height:1.34rem;bottom:.11rem;}
							}
							li:nth-child(1){
								&:after{
									background-image:url('~@/assets/images/layout/menu3/i1.png');
								}
							}
							li:nth-child(2){
								&:after{
									background-image:url('~@/assets/images/layout/menu3/i1.png');
								}
							}
							li.active{
								cursor:default;
								&:after{
									background-image:url('~@/assets/images/layout/menu3/ic.png');
								}
							}
						}
					}

					.menu-c7{
						position:absolute;top:2.8rem;height:58vh;width:4.2rem;

						.m-t3{margin:.10rem .03rem .20rem 0}
						.wrap{
							display:none;position:relative;
						}
						.wrap.active{display:flex;}
						.wrap{
							.list2{
								dd{
									display:flex;align-items:center;
									padding-left:.10rem;font-size:.16rem;
								}
							}
						}
						.wrap:last-child{
							padding-left:.5rem;
						}
						.m-sl{
							position:absolute;top:0;left:0;height:100%;width:.60rem;
							display:flex;flex-direction:column;
							span{
								position:relative;
								flex:1;display:flex;justify-content:center;align-items:center;
								flex-direction:column;
								writing-mode:vertical-rl;
								cursor:pointer;font-size:.18rem;color:#ffb702;
								box-shadow:inset 0rem 0rem 0.2rem 0rem rgba(178,252,252, .5);
								&:before{content:"";position:absolute;top:0;left:0;height:100%;width:100%;}
							}
							span.active{
								cursor:normal;
								box-shadow:inset 0rem 0rem 0.4rem 0rem rgba(21,245,252, 1);
							}
						}
						.m-sr{flex:1;position:relative;}
					}
				}
				>div{
					display:none;
					//display:flex;
					width:19.2rem;height:0;justify-content:space-between;
					.b0_left{
						margin-left:.10rem;
						.m-tt{
							background:no-repeat center center url('~@/assets/images/layout/md_hd_l.png');
							background-size:100% 100%;
							h4{
								padding-left:.40rem;
							}
						}
						
						.abs-full{
							background:no-repeat center center url('~@/assets/images/layout/side_l_md.png');background-size:100% 100%;
							
							//background-color:rgba(18,35,65,.6);
						}
						/* .ct-box{
							margin-top:.06rem;
							background-image:linear-gradient(to right, rgba(21, 59, 85, .5), rgba(21, 59, 85, .1));
						} */	
					}
					.b0_right{
						margin-right:.10rem;
						.m-tt{
							background:no-repeat center center url('~@/assets/images/layout/md_hd_l.png');
							background-size:100% 100%;
							h4{
								padding-left:.40rem;
							}
						}
						.abs-full{
							background:no-repeat center center url('~@/assets/images/layout/side_r_md.png');background-size:100% 100%;
					
							//background-color:rgba(18,35,65,.6);
						}
					}
				};
				div.active{
					display:flex;
					//.side{display:flex;}
				}

				.b0_a{
					.ft-ctn{
						position:absolute;bottom:0;left:0;height:0;width:19.2rem;
						display:flex;justify-content:center;
						&:before{
							content:"";position:absolute;bottom:0;left:0;height:1.70rem;width:100%;
							pointer-events:none;
							background-image:linear-gradient(to bottom, transparent, rgba(7,33,72, .8));
						}
						ul{
							position:absolute;bottom:.28rem;user-select:none;
							display:flex;
							li{
								height:.69rem;padding:0 .40rem 0 .66rem;position:relative;cursor:pointer;
								display:flex;flex-direction:column;line-height:1;justify-content:center;
								&:before{
									content:"";position:absolute;left:0;height:.59rem;width:.65rem;
									background-repeat:no-repeat;background-position:top center;background-size:100% 100%;z-index:1;
								}
								h5,span{
									-webkit-background-clip:text;-webkit-text-fill-color:transparent;
									position:static;z-index:1;
								}
								h5{
									font-size:.15rem;font-style:italic;letter-spacing:.02rem;
									margin-top:.05rem;
									&:before, &:after{
										content:"";position:absolute;left:0;height:.02rem;width:100%;
										border-width:0 0 2px 0;border-style:hidden;
									}
									&:before{top:0;}
									&:after{bottom:0;}
								}
								span{
									font-size:.28rem;font-family:diget year;
									line-height:.19rem;margin-top:.08rem;
								}
								&.active{
									cursor:default;
									&:after{
										content:"";position:absolute;top:0;left:0;height:100%;width:100%;
										z-index:0;
									}
									h5{
										&:before, &:after{border-style:solid;}
									}
								}
							}
							li:nth-child(1){
								&:before{background-image:url('~@/assets/images/layout/m_btm_i1.png');}
								h5{
									background-image:-webkit-linear-gradient(top,#beddff,#8bc1ff,#449bff);
								}
								span{
									background-image:-webkit-linear-gradient(top,#fff,#d2e8ff,#73b7ff);
								}
								&.active{
									&:after{
										background-image:linear-gradient(to right,transparent,rgba(60,150,250,.3) 40%,rgba(60,150,250,.3) 50%,transparent);
									}
									h5{
										&:before, &:after{
											border-image:linear-gradient(to right, transparent 10%, #449bff 40%, #449bff 60%, transparent 90%) 1 1;
										}
									}
								}
							}
							li:nth-child(2){
								&:before{background-image:url('~@/assets/images/layout/m_btm_i2.png');}
								h5{
									background-image:-webkit-linear-gradient(top,#90ebff,#4fcef1,#23c1eb);
								}
								span{
									background-image:-webkit-linear-gradient(top,#fff,#daf8ff,#95ecff);
								}
								&.active{
									&:after{
										background-image:linear-gradient(to right,transparent,rgba(41,188,228,.3) 40%,rgba(41,188,228,.3) 50%,transparent);
									}
									h5{
										&:before, &:after{
											border-image:linear-gradient(to right, transparent 10%, #29bce4 40%, #29bce4 60%, transparent 90%) 1 1;
										}
									}
								}
							}
							li:nth-child(3){
								&:before{background-image:url('~@/assets/images/layout/m_btm_i3.png');}
								h5{
									background-image:-webkit-linear-gradient(top,#a5fedf,#72ebbb,#30c890);
								}
								span{
									background-image:-webkit-linear-gradient(top,#fff,#c2f4db,#2ade9f);
								}
								&.active{
									&:after{
										background-image:linear-gradient(to right,transparent,rgba(17,190,130,.3) 40%,rgba(17,190,130,.3) 50%,transparent);
									}
									h5{
										&:before, &:after{
											border-image:linear-gradient(to right, transparent 10%, #11be82 40%, #11be82 60%, transparent 90%) 1 1;
										}
									}
								}
							}
							li:nth-child(4){
								margin-right:0;
								&:before{background-image:url('~@/assets/images/layout/m_btm_i4.png');}
								h5{
									background-image:-webkit-linear-gradient(top,#fef7cb,#f2c97e,#e5a22b);
								}
								span{
									background-image:-webkit-linear-gradient(top,#fff,#eddfb8,#cfa924);
								}
								&.active{
									&:after{
										background-image:linear-gradient(to right,transparent,rgba(229,162,43,.3) 40%,rgba(229,162,43,.3) 50%,transparent);
									}
									h5{
										&:before, &:after{
											border-image:linear-gradient(to right, transparent 10%, #e5a22b 40%, #e5a22b 60%, transparent 90%) 1 1;
										}
									}
								}
							}
						}
					}

					.side{
						&>div{
							flex:none;position:relative;margin-bottom:.10rem;
							min-height:2.60rem;max-height:28.5vh;
						}
					}
				}
				div.el-date-editor{
					border-color:#2F8DC2;background:rgba(0,0,0,.5);
					input{background-color:transparent;color:#eee;}
					span{color:#aaa;width:20px;}
				}

				.b0_b{
					.l-panel{
						width:5.00rem;height:0;
						display:flex;flex-direction:column;justify-content:center;
					}


					.a-md38{
						position:relative;display:none;flex-direction:column;justify-content:center;
						flex:none;height:9.42rem;max-height:85.5vh;
						transition:transform .3s ease-out 0s;

						//&.open{display:flex;}
						&.hide{
							transform:translateX(4.7rem);
							.trigger{
								&:before{content:"\E6DD";}
							}
						}

						>div{
							margin-top:.10rem;display:flex;flex-direction:column;
							.m-t1{
								margin:.20rem 0 0 .14rem;
								background:no-repeat left center url('~@/assets/images/layout/md38_p_t1.png');background-size:auto 100%;
								h4{
									line-height:1;height:.37rem;letter-spacing:.02rem;
									display:flex;align-items:center;margin-left:.38rem;font-size:.16rem;
								}
							}

							.m-t2{
								border:1px solid #0650b1;margin:.15rem .15rem 0 .15rem;border-radius:.10rem;
								overflow:hidden;
								background-image:linear-gradient(to bottom, #08346f, #1c61c6);

								ul{display:flex;}
								li{
									flex:1;height:.62rem;padding:0 .02rem;border:1px solid transparent;
									cursor:pointer;
									display:flex;flex-direction:column;align-items:center;justify-content:center;
								}
								font{font-family:diget year;font-size:.23rem;}
								span{text-align:center;font-size:.14rem;line-height:.15rem;}
								.actv{
									border:1px solid #4b9ff3;
									border-radius:.10rem;
									background-image:linear-gradient(to bottom, #327ef1, #3ab2f2);
									cursor:default;
								}
							}
							.ct-box{
								flex:1;margin:0 .15rem .15rem .15rem;display:flex;flex-direction:column;
								background-color:rgba(58, 116, 166, .5);
								dd{
									color:#fff;margin-right:.03rem;align-items:center;
									display:grid;height:.36rem;border-bottom:1px solid #4B9FF3;
									span:last-child{
										font-size:.22rem;cursor:pointer;text-align:center;
									}
								}
							}
							.dt{
								display:grid;margin:0 .22rem 0 .15rem;height:.36rem;align-items:center;color:#08dcea;
								span{text-align:center;padding:0 .02rem;}
							}
						}
						.panel1{
							height:2.23rem;margin-top:0;
							background:no-repeat center center url('~@/assets/images/layout/md38_p1.png');background-size:100% 100%;
							.ct-box{
								flex:1;margin:.15rem;
								dl{
									display:flex;flex-direction:column;
									dd{
										position:relative;font-size:.14rem;flex:1;padding-left:.36rem;
										display:flex;align-items:center;justify-content:space-between;
										&:before{
											content:"";position:absolute;top:0;left:0;height:100%;width:.36rem;
											background:no-repeat center center url('~@/assets/images/layout/md38_p1_1.png');
											background-size:auto .19rem;
										}
										span{z-index:10;position:relative;}
										a{
											z-index:10;position:relative;
											width:.54rem;height:.22rem;text-align:center;font-size:.13rem;
											border-radius:.10rem;color:black;cursor:pointer;
											background-image:linear-gradient(to bottom, #00d8ff, #0ffefc);
											line-height:.22rem;
										}
										&:after{
											content:"";position:absolute;bottom:0;left:0;height:.15rem;width:100%;
											background-image:linear-gradient(to bottom, rgba(38, 63, 85, .30), rgba(46, 81, 111, .80));
										}
										border-bottom:1px solid #406884;
									}
								}
							}
						}
						.panel2{
							height:3.50rem;
							background:no-repeat center center url('~@/assets/images/layout/md38_p2.png');background-size:100% 100%;
							.m-t2{
								li:nth-child(1){font{color:#ff3740;}}
								li:nth-child(2){font{color:#ff8839;}}
								li:nth-child(3){font{color:#fff330;}}
								li:nth-child(4){font{color:#0e6dfb;}}
								li:nth-child(5){font{color:#ff3740;}}
								li:nth-child(6){font{color:#ff8839;}}
								//.actv{.font{color:#fff;}}
							}
							.dt{
								grid-template-columns:20% 20% 20% 20% 20%;
							}
							.ct-box{
								flex:1;margin:0 .15rem .15rem .15rem;display:flex;flex-direction:column;
								background-color:rgba(58, 116, 166, .5);
								dd{
									grid-template-columns:20% 20% 20% 20% 20%;
									span{text-align:center;padding:0 .02rem;}
								}
							}
						}
						.panel3{
							height:3.50rem;
							background:no-repeat center center url('~@/assets/images/layout/md38_p2.png');background-size:100% 100%;
							.m-t2{
								li{font{color:#00e2ff;}}
							}
							.dt{
								grid-template-columns:85% 15%;
								span{padding:0 .02rem;}
							}
							.ct-box{
								flex:1;margin:0 .15rem .15rem .15rem;display:flex;flex-direction:column;
								background-color:rgba(58, 116, 166, .5);
								dd{
									grid-template-columns:85% 15%;
									span{padding:0 .02rem;}
									span:first-child{padding-left:.10rem;}
								}
							}
						}
						.trigger{
							position:absolute;left:-19px;height:45px;width:19px;
							background-color:rgba(0,0,0,.7);font-size:23px;
							display:flex;align-items:center;justify-content:center;
							border-radius:8px 0 0 8px;cursor:pointer;
							&:before{
								content:"\E6DC";font-family:"element-icons";font-style:normal;
							}
						}
					}
				}

				.b0_e{
					.side{
						.menu-t7{
							height: 2.21rem;
							width:3.36rem;
							background-image:url('~@/assets/images/layout/menu4/t4-m1.png');
					
							.m-t4{
								span{
									position:relative;width:auto;font-size:.32rem;font-weight:bold;margin-top:-.05rem;
									background-image:linear-gradient(to bottom, #ffde26, #ffc512, #ffb702);
									-webkit-background-clip:text;
									-webkit-text-fill-color:transparent;
									line-height:1;z-index:2;
								}
								li{
									&:before{
										position:absolute;height:.50rem;width:.50rem;bottom:.45rem;
										border-radius:.50rem;border:1px solid #41bef8;
										display:flex;align-items:center;justify-content:center;
										background-image: radial-gradient(#40c0fa, #229eeb, #0b8ae1);
										z-index:2;font-size:.25rem;
									}
									&:after{width:1.10rem;height:1.45rem;bottom:.22rem;background-size:100%;}
									&:hover{
										&:after{background-image:url('~@/assets/images/layout/menu4/ih.png') !important;}
									};
								}
								li:nth-child(1){
									&:before{content:"Ⅰ";}
									&:after{
										background-image:url('~@/assets/images/layout/menu4/i1.png');
									}
								}
								li:nth-child(2){
									&:before{content:"Ⅱ";}
									&:after{
										background-image:url('~@/assets/images/layout/menu4/i1.png');
									}
								}
								li.active{
									cursor:default;
									&:after{
										background-image:url('~@/assets/images/layout/menu4/ic.png') !important;
										width:1.20rem;height:1.55rem;bottom:.17rem;
									}
								}
							}
						}


						.menu-c7{
							.m-sl{
								span{
									writing-mode:lr;word-break:break-all;text-align:center;
									font-size:.24rem;

									font{font-size:.16rem;color:#fff;font-weight:normal;}
								}
							}
						}
					}
				}

				
				.pop-md38{
					.ct-box{position:relative;font-size:.13rem;}
					.wrap{position:absolute;top:0;left:0;height:100%;width:100%;}

					.a-md3822{
						position:relative;display:none;flex-direction:column;justify-content:center;
						flex:none;height:9.42rem;max-height:85.5vh;user-select:none;
						transition:transform .3s ease-out 0s;

						&.open{display:flex;}
						&.hide{
							transform:translateX(4.7rem);
							.trigger{
								&:before{content:"\E6DD";}
							}
						}
						>div{
							margin-top:.10rem;display:flex;flex-direction:column;
							.m-t1{
								margin:.20rem 0 0 .14rem;
								background:no-repeat left center url('~@/assets/images/layout/md38_p_t1.png');background-size:auto 100%;
								h4{
									line-height:1;height:.37rem;letter-spacing:.02rem;
									display:flex;align-items:center;margin-left:.38rem;font-size:.16rem;
								}
							}
							.m-t2{
								border:1px solid #0650b1;margin:.15rem .15rem 0 .15rem;border-radius:.10rem;
								overflow:hidden;
								background-image:linear-gradient(to bottom, #08346f, #1c61c6);

								ul{display:flex;}
								li{
									flex:1;height:.62rem;padding:0 .02rem;border:1px solid transparent;
									cursor:pointer;
									display:flex;flex-direction:column;align-items:center;justify-content:center;
								}
								font{font-family:diget year;font-size:.23rem;}
								span{text-align:center;font-size:.14rem;line-height:.15rem;}
								.actv{
									border:1px solid #4b9ff3;
									border-radius:.10rem;
									background-image:linear-gradient(to bottom, #327ef1, #3ab2f2);
									cursor:default;
								}
							}
							.ct-box{
								flex:1;margin:0 .15rem .15rem .15rem;display:flex;flex-direction:column;
								background-color:rgba(58, 116, 166, .5);
								dd{
									color:#fff;margin-right:.03rem;align-items:center;
									display:grid;height:.36rem;border-bottom:1px solid #4B9FF3;
								}
							}
							.dt{
								display:grid;margin:0 .22rem 0 .15rem;height:.36rem;align-items:center;color:#08dcea;
								span{text-align:center;padding:0 .02rem;}
							}
						}
						.panel1{
							height:2.23rem;margin-top:0;
							background:no-repeat center center url('~@/assets/images/layout/md38_p1.png');background-size:100% 100%;
							.ct-box{
								flex:1;margin:.15rem;
								dl{
									display:flex;flex-direction:column;
									dd{
										position:relative;font-size:.14rem;flex:1;padding-left:.36rem;
										display:flex;align-items:center;justify-content:space-between;
										&:before{
											content:"";position:absolute;top:0;left:0;height:100%;width:.36rem;
											background:no-repeat center center url('~@/assets/images/layout/md38_p1_1.png');
											background-size:auto .19rem;
										}
										span{z-index:10;position:relative;}
										a{
											z-index:10;position:relative;
											width:.54rem;height:.22rem;text-align:center;font-size:.13rem;
											border-radius:.10rem;color:black;cursor:pointer;
											background-image:linear-gradient(to bottom, #00d8ff, #0ffefc);
											line-height:.22rem;
										}
										&:after{
											content:"";position:absolute;bottom:0;left:0;height:.15rem;width:100%;
											background-image:linear-gradient(to bottom, rgba(38, 63, 85, .30), rgba(46, 81, 111, .80));
										}
										border-bottom:1px solid #406884;
									}
								}
							}
						}
						.panel2{
							height:3.50rem;
							background:no-repeat center center url('~@/assets/images/layout/md38_p2.png');background-size:100% 100%;
							.m-t2{
								li:nth-child(1){font{color:#ff3740;}}
								li:nth-child(2){font{color:#ff8839;}}
								li:nth-child(3){font{color:#fff330;}}
								li:nth-child(4){font{color:#0e6dfb;}}
								li:nth-child(5){font{color:#ff3740;}}
								li:nth-child(6){font{color:#ff8839;}}
								//.actv{.font{color:#fff;}}
							}
							.dt{
								grid-template-columns:20% 20% 20% 20% 20%;
							}
							.ct-box{
								flex:1;margin:0 .15rem .15rem .15rem;display:flex;flex-direction:column;
								background-color:rgba(58, 116, 166, .5);
								dd{
									grid-template-columns:20% 20% 20% 20% 20%;
									span{text-align:center;padding:0 .02rem;}
								}
							}
						}
						.panel3{
							height:3.50rem;
							background:no-repeat center center url('~@/assets/images/layout/md38_p2.png');background-size:100% 100%;
							.m-t2{
								li{font{color:#00e2ff;}}
							}
							.dt{
								grid-template-columns:85% 15%;
								span{padding:0 .02rem;}
							}
							.ct-box{
								flex:1;margin:0 .15rem .15rem .15rem;display:flex;flex-direction:column;
								background-color:rgba(58, 116, 166, .5);
								dd{
									grid-template-columns:85% 15%;
									span{padding:0 .02rem;}
									span:first-child{padding-left:.10rem;}
									span:last-child{
										font-size:.22rem;text-align:center;cursor:pointer;
									}
								}
							}
						}
						.trigger{
							position:absolute;left:-25px;height:45px;width:25px;
							background-color:rgba(0,0,0,.7);font-size:23px;
							display:flex;align-items:center;justify-content:center;
							border-radius:8px 0 0 8px;cursor:pointer;
							&:before{
								content:"\E6DC";font-family:"element-icons";font-style:normal;
							}
						}
					}
				}
			}

			.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:4px;overflow:visible;border-radius:.15rem;
			background-color:rgba(0, 28, 64, .8);
		}
		.progress-bar{
			position:relative;border-radius:.15rem;
			background-image:linear-gradient(to right, rgba(0, 77, 225, .80), #01bbff);
			width:100%;height:100%;color:#fff;transition:width .6s ease;font-size:.13rem;
			display:flex;align-items:center;
			&:before{
				content:"";position:absolute;right:-3px;height:6px;width:6px;
				border-radius:6px;background-color:#01bbff;
			}
			&:after{
				content:"";position:absolute;right:-8px;height:16px;width:16px;
				border-radius:16px;background-color:rgba(1,187,255, .4);
			}
		}
		@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;}

		.weather{
			flex:1;display:flex;font-size:.14rem;
			.mleft{display:none;}
			.wtpath{display:none;}
			.mright{flex:1;text-align:center;}
			img{display:block;width:2vw !important;height:auto !important;margin:0 auto;}
			ul{margin:5px 0;color:#d0d2ff;}
			#mobile05{
				flex:1;display:flex;flex-direction:column;position:relative;margin:0 .05rem;
				.today{
					height:.60rem;display:flex;
					background-image:linear-gradient(to right, rgba(0,28,53,.7), rgba(0,28,53,.4), transparent);
					>div{
						flex:1;display:flex;
						>a{
							display:flex;align-items:center;
							font{margin-left:.15rem;color:#eee;}
						}
						.wt{
							display:flex;align-items:center;
							margin-left:.15rem;
							font{margin-left:.10rem;}
						}
						.zl{
							display:flex;align-items:center;margin-left:.20rem;
							a{color:#eee;}
						}
					}
				}
				.more{
					flex:1;display:flex;margin-top:.08rem;
					>div{
						margin-right:.07rem;
						background-image:linear-gradient(to bottom, rgba(24,69,99,.8), rgba(24,69,99,.5), transparent);
					}
					>div:nth-child(4){margin-right:0;}
					.mright:last-child{display:none;}
					.wt{
						margin-top:.25rem;
						li{margin-top:.15rem;}
					}
				}
			}
			//#mobile05>div:last-child{display:none;}
			/* #mright_1{
				top:0;left:0;height:auto;width:100%;display:flex;
				ul{margin:0;color:#03d3fe;}
				.wt{display:flex;align-items:center;margin-left:140px;}
				.day{display:none;}
				span:last-child{display:block;
					position:absolute;top:4px;left:0px;height:auto;
					font-size:26px;
				}
				font{margin:6px 0 0 10px;color:#35ecfa}
			} */

			//a{text-decoration:none;}
		}
	}

	/* 登录 */
	.login-ctn{
		user-select:none;
		background:no-repeat top left url('/static/images/login-min.jpg');background-size:100% 100%;

		.liner{
			height:100%;width:100%;display:flex;
			.l-left{
				flex:1;display:flex;flex-direction:column;justify-content:center;width:50%;padding-left:.30rem;
				background-color:rgba(9,119,198,.55);
				h3,h4{line-height:1;color:#fff;text-shadow:rgba(0,0,0,.4) -.01rem .07rem .07rem;}
				h3{font-size:.30rem;margin-top:-.10rem;}
				h4{font-size:.37rem;margin-top:.15rem;letter-spacing:.03rem;}
			}
		}
		
		.pop-login{
			position:relative;display:flex;align-items:center;justify-content:center;
			width:50%;background-color:rgba(255,255,255,.90);
			.inbox-range{
				position:absolute;flex:1;width:75%;max-width:260px;min-width:190px;
				.el-form{
					.title{
						position:relative;color:#000;letter-spacing:.04rem;text-indent:.04rem;font-size:.28rem;
						line-height:1;padding-bottom:.13rem;margin-bottom:.60rem;
						display:flex;justify-content:center;
						&:after{
							content:"";position:absolute;bottom:0;height:.04rem;width:.76rem;
							background-color:#1890ff;border-radius:20%;
						}
					}
					.el-form-item{margin-bottom:20px;position:relative;}
					.el-form-item:last-child{margin-bottom:0;}
					//>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}

					.login-code{
						img{width:100px;display:flex;cursor:pointer;}
					}
					.el-form-item__content{
						&:after, &:before{content:none}
					}
					.el-button--medium{margin-top:5px;}
				}
			}
		}
	}

	

	@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);
		}
	}
</style>