Commit 423625fe authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents e95b55ca 67ce4ee0
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7" cy="7" r="7" fill="url(#paint0_radial_113_233)"/>
<circle cx="7" cy="7" r="6.85" stroke="#DFB73E" stroke-width="0.3"/>
<defs>
<radialGradient id="paint0_radial_113_233" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(7 7) rotate(90) scale(7)">
<stop stop-color="#DFB73E"/>
<stop offset="1" stop-color="#DFB73E" stop-opacity="0"/>
</radialGradient>
</defs>
</svg>
......@@ -22,10 +22,7 @@
</div>
<div id="mainTitle">
<img src="images/top-banner01.png" alt="">
</div>
<div id="weather">
<iframe frameborder="0" scrolling="no" seamless="seamless" src="./weather.html"></iframe>
<!-- <img src="images/top-banner01.png" alt=""> -->
</div>
<!-- <div id="topBg"></div> -->
......@@ -97,19 +94,12 @@
</div>
<div id="escbox">
<div class="escbox-tip">
<div class="escbox-tip-a escbox-tip-b" style="width: 100%;height: 90px;">
<div class="loadingio-spinner-ripple-h9py4n9xxvv" style="display: inline">
<div class="escbox-tip-a escbox-tip-b" style="width: 100%;height: 70px;">
<div class="ldio-2q89h75hfq5">
<div class="radar"><img src="images/out.png" ></div>
</div>
<img src="images/vector9.png" style="width: 50px;height: 50px;margin-top: 10px;">
</div>
<!-- <img src="images/u517.gif" alt="" /> -->
<span class="escbox-txt item">事件接报中.....</span>
<span class="escbox-txt item">实时预警</span>
</div>
<!-- <div class="escbox-tip-b alarm" style="clear: both">
<div class="item"><span class="num currEvNum">0</span><span class="itemTitle">当前事件</span></div>
<div class="item"><span class="num hisEvNum">0</span><span class="itemTitle">历史事件</span></div>
</div> -->
</div>
<div class="escbox-top">
<div class="escbox-tit">应急事件</div>
......@@ -186,9 +176,36 @@
</div>
</div>
</div>
<div class="mapbanner" style="position: fixed;top: 0;width: 100%;height: auto;z-index: 10;">
<div style="width: 100%;height: auto;line-height: 60px;display: flex;justify-content: space-between;">
<div class="weather" style="margin-top: 10px;width: 30%;padding-left: 50px;">
<iframe scrolling="no" src="https://tianqiapi.com/api.php?style=tb&skin=pitaya&color=64FEFF" frameborder="0" width="350" height="24" allowtransparency="true"></iframe>
</div>
<div style="width: 40%;text-align: center;">
<img src="images/topban.png" alt="" style="width: 80%;margin-top: 10px;">
</div>
<div class="righttime" style="width: 30%;padding-right: 50px;text-align: right;">
<div id="top-right">
<div id="item">
<p id="itemone" style="color: #64FEFF;"></p>
<!-- <p id="itemtwo"></p> -->
</div>
<div id="item item1">
<div id="he-plugin-standard"></div>
</div>
</div>
</div>
</div>
</div>
<div id="border">
<img src="images/borderbantop.png" alt="" class="bordertop">
<img src="images/borderbanleft.png" alt="" class="borderleft">
<img src="images/borderbanright.png" alt="" class="borderright">
<img src="images/borderbanbottom.png" alt="" class="borderbottom">
</div>
<div id="leftBar">
<div id="bottomMenu">
<!-- <div id="bottomMenu">
<a href="#" class="btn span1">
<div>态势分析</div>
<span></span>
......@@ -224,16 +241,33 @@
<span></span>
<span></span>
</a>
</div>
</div> -->
<div class="alarm" id="alarm">
</div>
<div style="background: linear-gradient(to left,#111a2e,#64FEFF,#111a2e);height:1px;margin-top: 20px;margin-bottom: 20px;margin-left: 20px;width: 90%;"></div>
<div id="" class="leftBar-legend">
<div class="leftlegend">
应急资源监控
事件类型统计
<img src="images/vector8.png" alt="" style="width: 14px;margin-right: 10px;">
</div>
<div class="echarts deviceNumPie" id="deviceNumPie"></div>
<div style="background: linear-gradient(to left,#111a2e,#64FEFF,#111a2e);height:1px;margin-top: 20px;margin-bottom: 30px;margin-left: 10px;width: 95%;"></div>
<div id="alarmList" class="right-alarm">
<div class="leftlegend">安全生产实时预警数据
<img src="images/vector10.png" alt="" style="width: 14px;margin-right: 10px;">
</div>
<div class="listTitle">
<div style="width: 20%; overflow: hidden;color: #64FEFF;">所属单位</div>
<div style="width: 15%; overflow: hidden;color: #64FEFF;">设备类型</div>
<div style="width: 20%; overflow: hidden;color: #64FEFF;">预警信息</div>
<div style="width: 25%; overflow: hidden;color: #64FEFF;">预警时间</div>
<div style="width: 15%; overflow: hidden;color: #64FEFF;">状态</div>
</div>
<div class="listContent"></div>
</div>
<div class="echarts categoryAlarmNum" id="categoryAlarmNum" style="width: 430px;height: 260px;padding-left: 5px !important;padding-top: 3px !important;"></div>
<div style="background:linear-gradient(to left,#FFFFFF,#458dde,#FFFFFF);height:1px;"></div>
<ul id="legend">
<ul id="legend" class="legendcss">
</ul>
</div>
......@@ -241,48 +275,98 @@
</div>
<div id="rightBar">
<!-- <div class="echarts deviceNumBar" id="deviceNumBar"></div> -->
<div class="deviceNumPieout">
<div class="leftlegend">
事件类型统计
<div class="right-bar">
<div class="rightlegend">
<img src="images/vector2.png" alt="" style="width: 14px;margin-left: 10px;">
应急资源监控
</div>
<div style="width: 100%;height: auto;">
<div style="float: left;width: 45%;height: auto;">
<div class="echarts categoryAlarmNum" id="categoryAlarmNum" style="width: 100%;height: 200px;padding-left: 5px !important;padding-top: 3px !important;"></div>
<div class="inyuan">
<p style="letter-spacing: 2px;margin-top: 30px;">设备总数</p>
<span class="wu"
style="
font-family: 'arialbd';
letter-spacing: 2px;
color: #00ffff;
font-size: 20px;
"
></span
>
</div>
</div>
<div class="usernum">
<div class="usernumin">
<span class=" in1"> ● 安全生产企业 </span>
<p class="p1" style="font-family: 'arialbd';color: #cddbe4; letter-spacing: 2px">
</p
>
</div>
<div class="usernumin">
<span class=" in2"> ● 视频监控 </span>
<p class="p2" style="font-family: 'arialbd';color: #cddbe4; letter-spacing: 2px">
</p
>
</div>
<div class="usernumin">
<span class=" in3"> ● 移动设备 </span>
<p class="p3" style="font-family: 'arialbd';color: #cddbe4; letter-spacing: 2px">
</p
>
</div>
<div class="usernumin">
<span class=" in4"> ● 应急保障 </span>
<p class="p4" style="font-family: 'arialbd';color: #cddbe4; letter-spacing: 2px">
</p
>
</div>
<div class="usernumin">
<span class=" in5"> ● 应急物资 </span>
<p class="p5" style="font-family: 'arialbd';color: #cddbe4; letter-spacing: 2px">
</p
>
</div>
<div class="usernumin">
<span class=" in6"> ● 自然灾害 </span>
<p class="p6" style="font-family: 'arialbd';color: #cddbe4; letter-spacing: 2px">
</p
>
</div>
<div class="echarts deviceNumPie" id="deviceNumPie"></div>
</div>
</div>
</div>
<div style="background: linear-gradient(to left,#111a2e,#64FEFF,#111a2e);height:1px;margin-bottom: 20px;margin-left: 10px;width: 90%;"></div>
<div class="deviceNumLineout">
<div class="leftlegend">
<div class="rightlegend">
<img src="images/vector11.png" alt="" style="width: 14px;height: 14px;margin-left: 10px;">
预警数量
</div>
<div class="Linebutton">
<button type="button" class="linebtn active"></button>
<button type="button" class="linebtn"></button>
<button type="button" class="linebtn">日统计</button>
<button type="button" class="linebtn active">月统计</button>
</div>
<!-- 折线图 -->
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<div class="echarts deviceNumLine deviceNumLineday show" id="deviceNumLineday" style="width: 430px;height: 190px;margin-top: 50px;"></div>
<div class="echarts deviceNumLine deviceNumLinemouth" id="deviceNumLinemouth" style="width: 430px;height: 190px;margin-top: 50px;"></div>
<div class="echarts deviceNumLine deviceNumLineday" id="deviceNumLineday" style="width: 380px;height: 200px;margin-top: 50px;"></div>
<div class="echarts deviceNumLine deviceNumLinemouth show" id="deviceNumLinemouth" style="width: 380px;height: 200px;margin-top: 50px;"></div>
</div>
<div style="background: linear-gradient(to left,#111a2e,#64FEFF,#111a2e);height:1px;margin-bottom: 30px;margin-left: 10px;width: 90%;margin-top: 15px;"></div>
<div id="alarmList" class="right-alarm">
<div class="mktit">安全生产实时预警数据</div>
<div class="listTitle">
<div style="width: 20%; overflow: hidden">所属单位</div>
<div style="width: 15%; overflow: hidden">设备类型</div>
<div style="width: 20%; overflow: hidden">预警信息</div>
<div style="width: 30%; overflow: hidden">预警时间</div>
<div style="width: 10%; overflow: hidden">状态</div>
</div>
<div class="listContent"></div>
</div>
<!-- 值班信息 -->
<div class="msgWrap">
<div class="msgWraplegend">
<div class="rightlegend">
<img src="images/vector7.png" alt="" style="width: 14px;margin-left: 10px;">
当前值班信息
</div>
<div class="dutyinfo" id="tbmsg"style="overflow-y: auto;height:130px;">
<div class="dutyinfo" id="tbmsg"style="overflow-y: auto;height:150px;">
<dl>
<dt>部门</dt>
<dt>当班人员</dt>
......@@ -376,6 +460,10 @@
<script src="./js/app.js"></script>
<script>
// var legenditem=document.getElementById(".legendItem");
// var legendchild=document.getElementById(".legendchild");
setInterval("document.getElementById('itemone').innerHTML=new Date().toLocaleString();",1000);
// document.getElementById("itemtwo").innerHTML = "星期"+"日一二三四五六".charAt(new Date().getDay());
$(".saveImage").click(function () {
html2canvas(jQuery(".amap-layer")[0], {
......@@ -549,102 +637,77 @@
bottom:100%;
}
}
.radar {
/* background: -webkit-radial-gradient(center, rgba(32, 255, 77, 0.3) 0%, rgba(32, 255, 77, 0) 75%), -webkit-repeating-radial-gradient(rgba(32, 255, 77, 0) 5.8%, rgba(32, 255, 77, 0) 18%, #20ff4d 18.6%, rgba(32, 255, 77, 0) 18.9%), -webkit-linear-gradient(90deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%), -webkit-linear-gradient(0deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%);
background */: radial-gradient(center, rgba(32, 255, 77, 0.3) 0%, rgba(32, 255, 77, 0) 75%), repeating-radial-gradient(rgba(32, 255, 77, 0) 5.8%, rgba(32, 255, 77, 0) 18%, #20ff4d 18.6%, rgba(32, 255, 77, 0) 18.9%), linear-gradient(90deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%), linear-gradient(0deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%);
width: 80px;
height: 80px;
position: relative;
left: 48%;
top: 45%;
padding: 1px;
transform: translate(-50%, -50%);
/* border-radius: 50%;
border: 0.2rem solid */#20ff4d;
overflow: hidden;
}
.radar img{
width: 100%;
height: 100%;
}
.radar:before {
content: ' ';
display: block;
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
animation: blips 5s infinite;
animation-timing-function: linear;
animation-delay: 1.4s;
}
.radar:after {
content: ' ';
display: block;
background-image: linear-gradient(44deg, rgba(0, 255, 51, 0) 50%, #00ff33 100%);
width: 50%;
height: 50%;
position: absolute;
top: 0;
left: 0;
animation: radar-beam 5s infinite;
animation-timing-function: linear;
transform-origin: bottom right;
border-radius: 100% 0 0 0;
}
@keyframes radar-beam {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes blips {
14% {
background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);
}
14.0002% {
background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);
}
25% {
background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 56% 86%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);
}
26% {
background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 56% 86%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);
opacity: 1;
}
100% {
background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 56% 86%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);
opacity: 0;
}
}
.Linebutton{
width: 50%;
width: 60%;
float: right;
}
.linebtn{
margin: 10px 5px;
width: 80px;
padding: 5px;
width: 60px;
border: none;
outline: none;
background-color: #126f7599;
color: #00F7DE;
background: rgba(0,0,0,0);
color: #fff;
border-radius: 5px;
}
.deviceNumLine{
margin: 10px auto;
display: none;
}
.linebtn.active{
background-color: #00F7DE;
color: #000000;
}
.deviceNumLine.show{
display:block;
}
.inyuan {
width: 123px;
height: 123px;
border-radius: 50%;
/* border: 2px solid #125c9b; */
position: fixed;
margin-bottom: 10px;
margin-top: -161px;
margin-left: 34px;
font-size: 15px;
color: #cddbe4;
text-align: center;
line-height: 35px;
/* padding: 28px 0px 0px 0px; */
background-image: linear-gradient(to left, #112238, #003e8d, #112238);
}
.usernum {
float: left;
width: 55%;
text-align: center;
height: auto;
margin-top: 35px;
}
.usernumin {
float: left;
width: 50%;
height: 50px;
font-size: 15px;
}
.in1 {
color: #FDF070;
}
.in2 {
color: #50B06B;
}
.in3 {
color: #E8F2EE;
}
.in4 {
color: #F18231;
}
.in5 {
color: #009CF3;
}
.in6 {
color: #76D5F4;
}
</style>
</body>
</html>
$(function () {
layui.use(['layer', 'table', 'element'], function () {
layui.use(["layer", "table", "element"], function () {
layLayer = layui.layer;
layTable = layui.table;
element = layui.element;
......@@ -13,15 +13,15 @@ $(function () {
let circle = new AMap.Circle({
center: new AMap.LngLat(lng, lat), // 圆心位置
radius: radius, //半径
strokeColor: '#F33', //线颜色
strokeColor: "#F33", //线颜色
strokeOpacity: 1, //线透明度
strokeWeight: 1, //线粗细度
fillColor: '#ee2200', //填充颜色
fillColor: "#ee2200", //填充颜色
fillOpacity: 0.35, //填充透明度
});
let poiIcon = new AMap.Icon({
size: new AMap.Size(102, 102),
image: './images/flag.png',
image: "./images/flag.png",
imageSize: new AMap.Size(62, 62),
imageOffset: new AMap.Pixel(0, 0),
});
......@@ -48,63 +48,65 @@ $(function () {
function removeAllOverlay() {
map.clearMap();
map.setCenter(defaultCenter);
$('#legend a').removeClass('selected');
$("#legend a").removeClass("selected");
}
//搜索按钮
function getBtmSearchData(param) {
let opts = {
url: apis.mapSearch,
type: 'post',
type: "post",
data: JSON.stringify({ keywords: param }),
success: function (res) {
if (res.code === 0) {
let arr = res.data.pageData;
if (arr.length > 0) {
let html = '';
let html = "";
removeAllOverlay();
$('#legend li a').removeClass('selected');
$("#legend li a").removeClass("selected");
arr.map((ele) => {
html += `<div class="btm-list-item" data-id="${ele.id}">${ele.fullName}</div>`;
let ar = [];
ar.push(ele);
addMarker(ar, ele.showType, null);
});
$('#listWrap').html(html);
$("#listWrap").html(html);
// $('.btm-list-item').click(function(){
// let id = $(this).attr('data-id');
// let rowobj = arr.filter(ele => ele.id = id)
// addMarker(rowobj, rowobj.showType, null)
// })
} else {
$('#listWrap').html('<div class="btm-list-item" style="text-align:center;">无搜索结果!</div>');
$("#listWrap").html(
'<div class="btm-list-item" style="text-align:center;">无搜索结果!</div>'
);
}
}
},
};
jQueryAjax(opts);
}
$('.uative').on('click', function () {
$('#btmSearch > *').fadeIn(100);
$(".uative").on("click", function () {
$("#btmSearch > *").fadeIn(100);
$(this).hide();
});
$('.activebtn').on('click', function (e) {
let val = $('#btnInput').val();
$(".activebtn").on("click", function (e) {
let val = $("#btnInput").val();
getBtmSearchData(val);
});
$('.guan').click(function () {
$('#btmSearch > *').hide();
$('.uative').show();
$(".guan").click(function () {
$("#btmSearch > *").hide();
$(".uative").show();
});
$('#removeSerBtn').click(function () {
$("#removeSerBtn").click(function () {
removeAllOverlay();
});
$('#mulitVideoBtn').click(function () {
$("#mulitVideoBtn").click(function () {
showMulitVideo();
});
$('#btnInput').bind('input', function (e) {
$("#btnInput").bind("input", function (e) {
let val = e.target.value;
if (!val) {
$('#listWrap').html('');
$("#listWrap").html("");
removeAllOverlay();
}
});
......@@ -128,78 +130,174 @@ $(function () {
});*/
$('.controlBtn .button').mousedown(function () {
$(".controlBtn .button").mousedown(function () {
var self = this;
console.log($(self).data('action'),"dfdf===----------------===============",$("#controllerDeviceId").val());
videoControlling($("#controllerDeviceId").val(),0,$(self).data('action'));
})
console.log(
$(self).data("action"),
"dfdf===----------------===============",
$("#controllerDeviceId").val()
);
videoControlling($("#controllerDeviceId").val(), 0, $(self).data("action"));
});
$('.controlBtn .button').mouseup(function () {
$(".controlBtn .button").mouseup(function () {
var self = this;
console.log($(self).data('action'),"dfdf===----------------===============",$("#controllerDeviceId").val());
videoControlling($("#controllerDeviceId").val(),1,$(self).data('action'));
})
console.log(
$(self).data("action"),
"dfdf===----------------===============",
$("#controllerDeviceId").val()
);
videoControlling($("#controllerDeviceId").val(), 1, $(self).data("action"));
});
// 鼠标滚动放大缩小
$('.reset').on('mousewheel DOMMouseScroll', function (e) {
$(".reset").on("mousewheel DOMMouseScroll", function (e) {
var delta =
(e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie
(e.originalEvent.wheelDelta &&
(e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie
(e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox
if (!videoController) {
return;
}
if (videoController.getInChoiceVideo() === undefined) {
layLayer.msg('请先点击视频以选中');
layLayer.msg("请先点击视频以选中");
return;
}
if (delta > 0) {
// 向上滚
videoController.setChoiceWindow(0);
videoController.holder('zoomout', { speed: 4000, group: 0, present: 0, time: 0 }, false);
videoController.holder(
"zoomout",
{ speed: 4000, group: 0, present: 0, time: 0 },
false
);
var mousewheelUpTimer = setTimeout(function () {
videoController.holder('zoomout', { speed: 4000, group: 0, present: 0, time: 0 }, true);
videoController.holder(
"zoomout",
{ speed: 4000, group: 0, present: 0, time: 0 },
true
);
clearTimeout(mousewheelUpTimer);
}, 500);
} else if (delta < 0) {
// 向下滚
videoController.setChoiceWindow(0);
videoController.holder('zoomin', { speed: 4000, group: 0, present: 0, time: 0 }, false);
videoController.holder(
"zoomin",
{ speed: 4000, group: 0, present: 0, time: 0 },
false
);
var mousewheelDownTimer = setTimeout(function () {
videoController.holder('zoomin', { speed: 4000, group: 0, present: 0, time: 0 }, true);
videoController.holder(
"zoomin",
{ speed: 4000, group: 0, present: 0, time: 0 },
true
);
clearTimeout(mousewheelDownTimer);
}, 500);
}
});
// 监听图例点击事件
$('#legend').on('click', function (ev) {
let isJkelected = $('.layui-layer-btn .jkBtn').hasClass('selected');
$("#legend").on("click", function (ev) {
const target = $(ev.target);
const li = target.closest("li");
let isJkelected = $(".layui-layer-btn .jkBtn").hasClass("selected");
if (isJkelected) {
removeMaker('jk');
$('.layui-layer-btn .jkBtn').removeClass('selected');
removeMaker("jk");
$(".layui-layer-btn .jkBtn").removeClass("selected");
}
if (ev.target.tagName.toLowerCase() !== 'a') {
$(ev.target).closest('li').find('a').click();
// 当点的不是a标签
if (ev.target.tagName.toLowerCase() !== "a") {
// 根据li的active属性拍判断是否是选中状态,因为初始是undefind 所哟要!!转化为boolea,状态是在点击a标签的时候发生改变的
// 如果全选了 那li状态就味true,否则都是false
const aciveFlag = !!li.data("active");
const clickArr = li.find("a");
filterClick(clickArr, aciveFlag);
} else {
// 当点的是a
if ($(ev.target)[0].classList.toString().indexOf("selected") === -1) {
removeMaker($(ev.target).data("id"));
addCateMarker(
$(ev.target).data("id"),
$(ev.target).closest("li").data("id")
);
} else {
if ($(ev.target)[0].classList.toString().indexOf('selected') === -1) {
removeMaker($(ev.target).data('id'));
addCateMarker($(ev.target).data('id'), $(ev.target).closest('li').data('id'));
removeMaker($(ev.target).data("id"));
}
$(ev.target).toggleClass("selected");
// 获取当先元素下的a
const domArr = $(ev.target).closest(".legendchild").find("a");
// 计算a是否都被选中
const selectedFlag = domArr.get().every((item) => {
return $(item).hasClass("selected");
});
// 如果全被选中,就让li状态改为全选,否则状态就是未被全选
if (selectedFlag) {
$(ev.target).closest("li").data("active", true);
li.css({ backgroundImage: "url(images/vectorbot.png)" });
} else {
removeMaker($(ev.target).data('id'));
$(ev.target).closest("li").data("active", false);
}
}
});
// 当点击li时,如果a元素自身场景选择是否被点击,li选中状态的时候,a标签要全都选中,l没被选中的时候,a标签要全部清楚
function filterClick(clickArr, bool) {
$.each(clickArr, function (index, ele) {
if ($(ele).hasClass("selected") == bool) {
$(ele).click();
}
$(ev.target).toggleClass('selected');
});
}
let timer = null;
let timer2 = null;
$(".legendcss").on("mouseover", function (ev) {
const target = $(ev.target);
// if (target.get(0).tagName == "UL") return;
const li = target.closest("li");
// 当被li是被选中状态
if (li.data("active")) {
} else {
// 当li不是选中状态才触发自动换背景颜色
li.css({ backgroundImage: "url(images/vectorbot.png)" });
li.data("hover", true);
}
const arr = $("#legend").find("li");
// 全体归位清零
$.each(arr, function (index, ele) {
$(ele).children(".legendchild").hide();
});
// 当前div出现
li.find(".legendchild").show();
});
$(".legendcss").on("mouseout", function (ev) {
const target = $(ev.target);
const li = target.closest("li");
if (li.data("active")) {
} else {
// 当li不是选中状态才触发自动换背景颜色,只有移出的时候才切换北京颜色
li.css({ backgroundImage: "url(images/re.png)" });
li.data("hover", false);
}
li.find(".legendchild").hide();
});
/*全局变量*/
var currentEventObj = {}; //点击评估处理时当前事件obj
(currEventsArr = []), //当前事件Arrary
(getCurrEventsArr = []),
(socketCurrEventsArr = []),
(checkEventEype = ''), //回顾事件 review 处理当前 current
(checkEventEype = ""), //回顾事件 review 处理当前 current
(stepWord = 0); //处理中事件 到了哪一步了 0-3 step
/*
* 绑定window操作事件*
......@@ -207,21 +305,21 @@ $(function () {
window.CAEVT = {
//查看预案详情
check(d) {
$('.yjdetali').show();
$('.yjdetali').html(`<h1>${d.planTitle} ${d.planLevel + '级'}</h1>
$(".yjdetali").show();
$(".yjdetali").html(`<h1>${d.planTitle} ${d.planLevel + "级"}</h1>
<table id="members" lay-filter="members"></table>${d.planContents}`);
layTable.render({
elem: '#members',
size: 'sm',
skin: 'nob',
elem: "#members",
size: "sm",
skin: "nob",
cols: [
[{ align: 'center', title: '人员列表', colspan: 5 }],
[{ align: "center", title: "人员列表", colspan: 5 }],
[
{ field: 'deptName', title: '部门' },
{ field: 'userName', title: '联系人' },
{ field: 'mobilePhone', title: '手机号' },
{ field: 'phone', title: '电话' },
{ field: 'email', title: '邮箱' },
{ field: "deptName", title: "部门" },
{ field: "userName", title: "联系人" },
{ field: "mobilePhone", title: "手机号" },
{ field: "phone", title: "电话" },
{ field: "email", title: "邮箱" },
],
],
data: d.rdeptInfoList,
......@@ -229,7 +327,7 @@ $(function () {
},
//查看预案详情
checkPlan(planid) {
BOTMTOOLBAR.genericPlan('', planid);
BOTMTOOLBAR.genericPlan("", planid);
},
//关联预案
connect(d) {
......@@ -240,14 +338,14 @@ $(function () {
layLayer.confirm(`确定关联此预案《${d.planTitle}》吗?`, function () {
let opt = {
url: apis.contentPlan,
type: 'post',
type: "post",
data: JSON.stringify(obj),
success: function (res) {
if (res.code == 0) layLayer.msg('关联成功!', { icon: 1 });
if (res.code == 0) layLayer.msg("关联成功!", { icon: 1 });
//修改事件状态
STEPEVENTS.changeStatus('2');
STEPEVENTS.changeStatus("2");
//关联预案成功跳转到态势决策
$('#yingjlistbox').hide();
$("#yingjlistbox").hide();
},
};
jQueryAjax(opt);
......@@ -262,7 +360,7 @@ $(function () {
success: function (res) {
if (res.code == 0) {
if (res.data) {
$('#mainTitle span').html(res.data.value);
$("#mainTitle span").html(res.data.value);
}
}
},
......@@ -272,7 +370,7 @@ $(function () {
//评估处理
handleEvent(obj) {
currentEventObj = { ...obj };
if (obj.eventStatus == 0) STEPEVENTS.changeStatus('1');
if (obj.eventStatus == 0) STEPEVENTS.changeStatus("1");
else STEPEVENTS.toStepChange(obj.eventStatus);
},
//执行预案
......@@ -281,20 +379,20 @@ $(function () {
/* 启动预案 */ url: apis.carryPlan + currentEventObj.id,
success: function (res) {
if (res.code == 0) {
layLayer.msg('启动预案成功!', { icon: 1 });
STEPEVENTS.changeStatus('3');
layLayer.msg("启动预案成功!", { icon: 1 });
STEPEVENTS.changeStatus("3");
}
},
},
addOpt = {
/* 增补预案 */ type: 'post',
/* 增补预案 */ type: "post",
data: JSON.stringify({
addPlanContent: $('textarea[name=addPlan]').val(),
addPlanContent: $("textarea[name=addPlan]").val(),
}),
url: apis.addPlan + currentEventObj.id,
success: function (res) {
if (res.code == 0) {
layLayer.msg('增补预案成功!', { icon: 1 });
layLayer.msg("增补预案成功!", { icon: 1 });
jQueryAjax(carryOpt);
}
},
......@@ -306,11 +404,11 @@ $(function () {
let defaultHtml = `<div id="${id}" class="fixedbox">
<div class="fixedbox-tit">${title}<span class="cbtn"><i class="layui-icon layui-icon-close"></i></span></div></div>`;
if ($(`#${id}`).length == 0) {
$('body').append(defaultHtml);
$("body").append(defaultHtml);
$(`#${id} .fixedbox-tit`).after(addhtml);
$(`#${id}`).show();
}
$('body').on('click', `#${id} .cbtn`, function () {
$("body").on("click", `#${id} .cbtn`, function () {
$(`#${id}`).remove();
});
},
......@@ -327,7 +425,7 @@ $(function () {
getCurrEventsArr = [...currarr];
_this.renderEventList();
/* 历史事件 */
$('.hisEvNum').html(resData.historyEventNum);
$(".hisEvNum").html(resData.historyEventNum);
_this.historyEvent(resData.historyEventList);
}
},
......@@ -337,46 +435,48 @@ $(function () {
//渲染当前事件列表
renderEventList() {
currEventsArr = [...getCurrEventsArr, ...socketCurrEventsArr];
$('.currEvNum').html(currEventsArr.length);
if (getCurrEventsArr.length > 0) $('.escbox-txt').html('<font style="color:red">有待处理事件!</font>');
if (socketCurrEventsArr.length > 0) $('.escbox-txt').html('<font style="color:red">发生事件!</font>');
$(".currEvNum").html(currEventsArr.length);
if (getCurrEventsArr.length > 0)
$(".escbox-txt").html('<font style="color:red">有待处理事件!</font>');
if (socketCurrEventsArr.length > 0)
$(".escbox-txt").html('<font style="color:red">发生事件!</font>');
layTable.render({
elem: '#currEvents',
size: 'sm',
elem: "#currEvents",
size: "sm",
cols: [
[
{ field: 'alarmTime', title: '时间' },
{ field: "alarmTime", title: "时间" },
{
field: 'eventName',
title: '事件名称',
event: 'tanDetail',
field: "eventName",
title: "事件名称",
event: "tanDetail",
templet: function (d) {
return `<span style="text-decoration:underline;cursor:pointer">${d.eventName}</span>`;
},
},
{
field: '',
title: '操作',
field: "",
title: "操作",
templet: function (d) {
let txt;
if (d.eventStatus == 0) txt = '评估处理';
if (d.eventStatus == 0) txt = "评估处理";
else txt = evenStepNameArr[Number(d.eventStatus) - 1];
return '<span class="txtbtn">' + txt + '</span>';
return '<span class="txtbtn">' + txt + "</span>";
},
event: 'handle',
event: "handle",
},
],
],
data: currEventsArr,
});
layTable.on('tool(currEvents)', function (obj) {
layTable.on("tool(currEvents)", function (obj) {
let rowData = obj.data,
rowEvent = obj.event;
if (rowEvent == 'handle') {
if (rowEvent == "handle") {
//评估处理
checkEventEype = 'current';
checkEventEype = "current";
CARYEVENTS.handleEvent(rowData);
} else if (rowEvent == 'tanDetail') {
} else if (rowEvent == "tanDetail") {
let detaliHtml =
`<div class="eventDeatail">` +
`<P>事件名称:${rowData.eventName}</p>` +
......@@ -386,50 +486,50 @@ $(function () {
`<P>报案人联系电话:${rowData.alarmPeoplePhone}</p>` +
`<P>事发时间:${rowData.alarmTime}</p>` +
`</div>`;
CARYEVENTS.tanDialogFun('事件详情', 'eventDetail', detaliHtml);
CARYEVENTS.tanDialogFun("事件详情", "eventDetail", detaliHtml);
}
});
},
//渲染历史事件列表
historyEvent(historyList) {
layTable.render({
elem: '#esctable',
size: 'sm',
elem: "#esctable",
size: "sm",
cols: [
[
{ field: 'alarmTime', title: '时间' },
{ field: "alarmTime", title: "时间" },
{
field: 'eventName',
title: '事件名称',
event: 'tanDetail',
field: "eventName",
title: "事件名称",
event: "tanDetail",
templet: function (d) {
return `<span style="text-decoration:underline;cursor:pointer">${d.eventName}</span>`;
},
},
{
field: '',
title: '操作',
field: "",
title: "操作",
templet: function (d) {
return '<span class="txtbtn layui-tab layui-tab-brief">回顾</span>';
},
event: 'review',
event: "review",
},
],
],
data: historyList,
});
layTable.on('tool(esctable)', function (obj) {
layTable.on("tool(esctable)", function (obj) {
let rowData = obj.data,
rowEvent = obj.event;
if (rowEvent == 'review') {
if (rowEvent == "review") {
$(`#esc-tit`).show();
$(`#esc-tit .abt`).addClass('done').removeClass('not');
$(`#esc-tit .abt`).addClass("done").removeClass("not");
currentEventObj = { ...rowData };
checkEventEype = 'review';
checkEventEype = "review";
STEPEVENTS.switchItem(1);
// STEPEVENTS.estimateEvent();
}
if (rowEvent == 'tanDetail') {
if (rowEvent == "tanDetail") {
let detaliHtml =
`<div class="eventDeatail">` +
`<P>事件名称:${rowData.eventName}</p>` +
......@@ -439,7 +539,7 @@ $(function () {
`<P>报案人联系电话:${rowData.alarmPeoplePhone}</p>` +
`<P>事发时间:${rowData.alarmTime}</p>` +
`</div>`;
CARYEVENTS.tanDialogFun('事件详情', 'eventDetail', detaliHtml);
CARYEVENTS.tanDialogFun("事件详情", "eventDetail", detaliHtml);
}
});
},
......@@ -480,17 +580,17 @@ $(function () {
var STEPEVENTS = {
//初步研判
estimateEvent() {
if (checkEventEype == 'review') {
$('#connectPlanBtn').hide();
$('.resouce').show();
if (checkEventEype == "review") {
$("#connectPlanBtn").hide();
$(".resouce").show();
} else {
$('#connectPlanBtn').show();
$("#connectPlanBtn").show();
}
let obj = { ...currentEventObj };
/*加载应急资源*/
function getResource(keywords = '') {
function getResource(keywords = "") {
let opt = {
type: 'post',
type: "post",
url: apis.mapSearch,
data: JSON.stringify({
distance: 3000,
......@@ -501,13 +601,15 @@ $(function () {
success: function (res) {
let resArr = res.data.numList;
if (resArr.length > 0) {
let html = '';
let html = "";
resArr.map((ele, index) => {
html += `<p>${ele.legendName}<font class="num">${ele.num}</font></p>`;
});
$('#escboxBottomItem1 .resouce .tbl').html('<p>资源名称<font class="num">资源数量</font></p>' + html);
$("#escboxBottomItem1 .resouce .tbl").html(
'<p>资源名称<font class="num">资源数量</font></p>' + html
);
} else {
$('#escboxBottomItem1 .resouce .tbl').html('暂无资源!');
$("#escboxBottomItem1 .resouce .tbl").html("暂无资源!");
}
},
};
......@@ -521,7 +623,7 @@ $(function () {
mapSearch(
{
distance: 3000,
keywords: '',
keywords: "",
latitude: obj.latitude,
longitude: obj.longitude,
},
......@@ -533,7 +635,7 @@ $(function () {
addFlag();
}, 3000);
},
'close',
"close"
);
}
/*加中心点旗帜*/
......@@ -541,7 +643,7 @@ $(function () {
let overlays = [],
poiIcon = new AMap.Icon({
size: new AMap.Size(102, 102),
image: './images/flag.png',
image: "./images/flag.png",
imageSize: new AMap.Size(100, 100),
imageOffset: new AMap.Pixel(0, 0),
});
......@@ -559,7 +661,7 @@ $(function () {
},
//态势决策
carryPlan() {
let html = '',
let html = "",
_this = this,
opt = {
/* 查询已关联预案 */ url: apis.searchEventPlan + currentEventObj.id,
......@@ -571,18 +673,18 @@ $(function () {
`<p style="text-decoration: underline;cursor:pointer;" onclick="window.CAEVT.checkPlan(&quot;${obj.planId}&quot;)">预案标题:${obj.planTitle}</p>` +
`<p>预案等级:${obj.planLevel}级</p>` +
`<p>所属部门:${obj.deptName}</p>`;
if (checkEventEype == 'review') {
if (checkEventEype == "review") {
html += `<p>增补预案内容:${obj.addPlanContent}</p>`;
$('#addPlan, #carryPalnBtn').hide();
$("#addPlan, #carryPalnBtn").hide();
} else {
$('#addPlan, #carryPalnBtn').show();
$("#addPlan, #carryPalnBtn").show();
}
$('.item2 .cn').html(html);
$(".item2 .cn").html(html);
}
}
},
};
$('body').on('click', '#carryPalnBtn', function () {
$("body").on("click", "#carryPalnBtn", function () {
layLayer.confirm(`确定启动预案吗?`, function () {
CARYEVENTS.carryPlanEv();
});
......@@ -591,7 +693,7 @@ $(function () {
},
//事件处理过程
eventCirculate() {
let html = '',
let html = "",
opt = {
url: apis.checkCirculate + currentEventObj.id,
success: function (res) {
......@@ -600,12 +702,14 @@ $(function () {
res.data.map((ele, inde) => {
let date = ele.handleTime.substring(0, 10),
time = ele.handleTime.substring(11, 16);
html += `<li><p>${date}<br><span>${time}</span></p><div class="con">${inde + 1 + '.'} ${ele.handleContent}</div></li>`;
html += `<li><p>${date}<br><span>${time}</span></p><div class="con">${
inde + 1 + "."
} ${ele.handleContent}</div></li>`;
});
$('ul.timeLine').html(html);
$(`#esc-tit .abt:eq(2)`).addClass('done');
$("ul.timeLine").html(html);
$(`#esc-tit .abt:eq(2)`).addClass("done");
} else {
$('ul.timeLine').html('暂无处理过程!');
$("ul.timeLine").html("暂无处理过程!");
}
}
},
......@@ -619,10 +723,10 @@ $(function () {
success: function (res) {
if (res.code == 0) {
if (res.data && res.data.evaluateContent) {
$('#evaluatCon').html(res.data.evaluateContent);
$(`#esc-tit .abt:eq(3)`).addClass('done');
$("#evaluatCon").html(res.data.evaluateContent);
$(`#esc-tit .abt:eq(3)`).addClass("done");
} else {
$('#evaluatCon').html('暂无评估内容!');
$("#evaluatCon").html("暂无评估内容!");
}
}
},
......@@ -633,12 +737,16 @@ $(function () {
changeStatus(step, EventId = null) {
let _this = this,
opt = {
url: apis.changeStatus + `${EventId == null ? currentEventObj.id : EventId}/${step}`,
url:
apis.changeStatus +
`${EventId == null ? currentEventObj.id : EventId}/${step}`,
success: function (res) {
if (res.code == 0 && EventId == null) {
_this.toStepChange(step); //跳转
if (step == 1) {
let index = socketCurrEventsArr.findIndex((ele) => ele.id == currentEventObj.id);
let index = socketCurrEventsArr.findIndex(
(ele) => ele.id == currentEventObj.id
);
socketCurrEventsArr.splice(index, 1);
}
CARYEVENTS.getEventList(); //刷新列表
......@@ -653,22 +761,24 @@ $(function () {
let _this = this;
toIndex = Number(toIndex);
$(`.escbox-bottom, #esc-tit`).show();
$(`#esc-tit .abt`).addClass('not').removeClass('done');
$(`#esc-tit .abt`).addClass("not").removeClass("done");
if (toIndex > 0) {
let num = toIndex - 1;
while (num > 0) {
num--;
$(`#esc-tit .abt:eq(${num})`).addClass('done');
$(`#esc-tit .abt:eq(${num})`).addClass("done");
}
}
$(`#esc-tit .abt:eq(${toIndex - 1})`).removeClass('not');
$(`#esc-tit .abt:eq(${toIndex - 1})`).removeClass("not");
$(`.escbox-bottom .item${toIndex}`).show().siblings().hide();
_this.switchItem(toIndex);
},
//获取相应item的内容
switchItem(toIndex) {
let _this = this;
$(`.escbox-bottom .item${toIndex} h3`).html(`事件名称:${currentEventObj.eventName}`);
$(`.escbox-bottom .item${toIndex} h3`).html(
`事件名称:${currentEventObj.eventName}`
);
switch (toIndex) {
case 1:
_this.estimateEvent();
......@@ -690,7 +800,7 @@ $(function () {
*/
var cont = 0;
var heatmap;
marker['heatmk'] = [];
marker["heatmk"] = [];
var BOTMTOOLBAR = {
//GIS调度
eventDevelopAnalysis() {
......@@ -698,39 +808,46 @@ $(function () {
map.setCenter([114.195771, 38.247808]);
$('#legend a').removeClass('selected');*/
if(cont==0){
if (cont == 0) {
this.initEventDevelope();
cont++;
}else{
} else {
cont = 0;
heatmap.hide();
map.remove(marker['heatmk']);
map.remove(marker["heatmk"]);
map.setZoom(11);
}
},
//查询事件列表
getHeatmap() {
var data = {};
if("year" == $("#choiceTime input[type = 'radio']:checked").val()){
if(0==$("#sel_year").val() || '' == $("#sel_year").val()){
layLayer.alert('请选择年份!');
if ("year" == $("#choiceTime input[type = 'radio']:checked").val()) {
if (0 == $("#sel_year").val() || "" == $("#sel_year").val()) {
layLayer.alert("请选择年份!");
return;
}
data.year = $("#sel_year").val();
}else{
if((0==$("#sel_year").val() || '' == $("#sel_year").val()) || (00==$("#sel_month").val() || '' == $("#sel_month").val())){
layLayer.alert('请选择年月!');
} else {
if (
0 == $("#sel_year").val() ||
"" == $("#sel_year").val() ||
00 == $("#sel_month").val() ||
"" == $("#sel_month").val()
) {
layLayer.alert("请选择年月!");
return;
}
if($("#sel_month").val()<10){
data.yearAndMonth = $("#sel_year").val()+"-0"+ $("#sel_month").val();
}else{
data.yearAndMonth = $("#sel_year").val()+"-"+ $("#sel_month").val();
if ($("#sel_month").val() < 10) {
data.yearAndMonth =
$("#sel_year").val() + "-0" + $("#sel_month").val();
} else {
data.yearAndMonth =
$("#sel_year").val() + "-" + $("#sel_month").val();
}
}
if(heatmap){
if (heatmap) {
heatmap.hide();
map.remove(marker['heatmk']);
map.remove(marker["heatmk"]);
}
let _this = this,
opt = {
......@@ -740,12 +857,12 @@ $(function () {
if (res.code == 0) {
let resData = res.data.pageData;
let history = resData.historyEventList;
let data =[];
for(var i=0;i<history.length;i++){
let location ={};
let data = [];
for (var i = 0; i < history.length; i++) {
let location = {};
location.lat = history[i].latitude;
location.lng =history[i].longitude;
location.count=50;
location.lng = history[i].longitude;
location.count = 50;
data.push(location);
//_this.estimateEvent(aa[i]);
var poiIcon = new AMap.Icon({
......@@ -761,7 +878,7 @@ $(function () {
heatmk.setLabel({
offset: new AMap.Pixel(0, -5),
content: history[i].eventName,
direction: 'top',
direction: "top",
});
}
map.plugin(["AMap.Heatmap"], function () {
......@@ -769,15 +886,15 @@ $(function () {
heatmap = new AMap.Heatmap(map, {
radius: 27, //给定半径
opacity: [0, 0.8],
gradient:{
0.5: '#8CFC0A',
0.8: 'yellow',
1.0: 'red'
}
gradient: {
0.5: "#8CFC0A",
0.8: "yellow",
1.0: "red",
},
});
heatmap.setDataSet({
data: data,
max: 100
max: 100,
});
});
map.setZoom(12);
......@@ -787,47 +904,48 @@ $(function () {
jQueryAjax(opt);
},
//初始化事态查询
initEventDevelope(){
var date = new Date()
initEventDevelope() {
var date = new Date();
var y = date.getFullYear();
var m = date.getMonth()+1;
var m = date.getMonth() + 1;
var d = date.getDate();
var nowTime = ""+ y+"-0"+m+"-"+d;
var detaliHtml = '<div style="width: 570px;height: 200px;margin: 23px;" id="choiceTime">'+
var nowTime = "" + y + "-0" + m + "-" + d;
var detaliHtml =
'<div style="width: 570px;height: 200px;margin: 23px;" id="choiceTime">' +
'<div style="height: 30px;">' +
'<div>'+
'<input name="data" type="radio" style="float: left;position: relative;top: 3px;" value="year" checked/>'+
'<p style="float: left; margin-left: 5px;">年份</p>'+
' </div>'+
'<div>'+
'<input name="data" type="radio" style="float: left;margin-left: 50px;position: relative;top: 3px;" value="month"/>'+
'<p style="margin-left: 5px;">月份</p>'+
' </div>' +
'</div>'+
' <p style="float: left;height: 30px;line-height: 30px;">年份:</P>'+
'<select id="sel_year" style="float: left;position: relative;top: 6px;width: 73px;border: 1px solid #708090;border-radius: 2px;"></select>'+
' <p style="float: left;margin-left: 45px;height: 30px;line-height: 30px;">月份:</P>'+
'<select id="sel_month" style="position: relative;top: -5px;width: 60px;border: 1px solid #708090;border-radius: 2px;"></select>'+
'<button id="eventBtn" style="position: relative;top: 81px;left: -61px;background-color: #4476a7;color: white;width: 157px;height: 43px;border-radius: 5px;">事态分析查询</button>'+
'</div>';
CARYEVENTS.tanDialogFun('事态分析','qqfdsf',detaliHtml);
"<div>" +
'<input name="data" type="radio" style="float: left;position: relative;top: 3px;" value="year" checked/>' +
'<p style="float: left; margin-left: 5px;">年份</p>' +
" </div>" +
"<div>" +
'<input name="data" type="radio" style="float: left;margin-left: 50px;position: relative;top: 3px;" value="month"/>' +
'<p style="margin-left: 5px;">月份</p>' +
" </div>" +
"</div>" +
' <p style="float: left;height: 30px;line-height: 30px;">年份:</P>' +
'<select id="sel_year" style="float: left;position: relative;top: 6px;width: 73px;border: 1px solid #708090;border-radius: 2px;"></select>' +
' <p style="float: left;margin-left: 45px;height: 30px;line-height: 30px;">月份:</P>' +
'<select id="sel_month" style="position: relative;top: -5px;width: 60px;border: 1px solid #708090;border-radius: 2px;"></select>' +
'<button id="eventBtn" style="position: relative;top: 81px;left: -61px;background-color: #4476a7;color: white;width: 157px;height: 43px;border-radius: 5px;">事态分析查询</button>' +
"</div>";
CARYEVENTS.tanDialogFun("事态分析", "qqfdsf", detaliHtml);
$.ms_DatePicker({
YearSelector: ".sel_year",
MonthSelector: ".sel_month",
DaySelector: ".sel_day"
DaySelector: ".sel_day",
});
$.ms_DatePicker();
if("year" == $("#choiceTime input[type = 'radio']:checked").val()){
$("#sel_month").attr("disabled","disabled")
if ("year" == $("#choiceTime input[type = 'radio']:checked").val()) {
$("#sel_month").attr("disabled", "disabled");
}
$("#choiceTime input[type = 'radio']").click(function () {
if("year" == $(this).val()){
$("#sel_month").attr("disabled","disabled");
}else {
if ("year" == $(this).val()) {
$("#sel_month").attr("disabled", "disabled");
} else {
$("#sel_month").removeAttr("disabled");
}
})
});
$("#eventBtn").click(function () {
BOTMTOOLBAR.getHeatmap();
......@@ -835,26 +953,30 @@ $(function () {
},
//值守通讯
dutyBookFun() {
CARYEVENTS.tanDialogFun('值守通讯录', 'dutyBooklist', '<div id="Booklist"></div>');
CARYEVENTS.tanDialogFun(
"值守通讯录",
"dutyBooklist",
'<div id="Booklist"></div>'
);
layTable.render({
elem: '#Booklist',
url: iocUrl + '/frontApi/getDutyContactsList',
method: 'get',
elem: "#Booklist",
url: iocUrl + "/frontApi/getDutyContactsList",
method: "get",
cols: [
[
{ field: 'deptName', title: '部门', align: 'center' },
{ field: 'userName', title: '姓名', align: 'center' },
{ field: "deptName", title: "部门", align: "center" },
{ field: "userName", title: "姓名", align: "center" },
{
field: 'sex',
title: '姓别',
align: 'center',
field: "sex",
title: "姓别",
align: "center",
templet: function (obj) {
return obj.sex == 1 ? '男' : '女';
return obj.sex == 1 ? "男" : "女";
},
},
{ field: 'mobliePhone', title: '手机号', align: 'center' },
{ field: 'phone', title: '座机', align: 'center' },
{ field: 'email', title: '邮箱', align: 'center' },
{ field: "mobliePhone", title: "手机号", align: "center" },
{ field: "phone", title: "座机", align: "center" },
{ field: "email", title: "邮箱", align: "center" },
],
],
});
......@@ -869,44 +991,48 @@ $(function () {
// },
//事件回顾
EventReview() {
$('.escbox-top').show();
element.tabChange('layTAb', 'layTAb_hisy');
$(".escbox-top").show();
element.tabChange("layTAb", "layTAb_hisy");
},
//综合保障
guaranteeFun() {
let opt = {
url: iocUrl + '/frontApi/getSecurityInfoNum',
url: iocUrl + "/frontApi/getSecurityInfoNum",
success: function (res) {
let html = '';
CARYEVENTS.tanDialogFun('综合保障', 'ensurelistbox', '<div id="numbox" class="xstty"></div><div id="ensurelist"></div>');
let html = "";
CARYEVENTS.tanDialogFun(
"综合保障",
"ensurelistbox",
'<div id="numbox" class="xstty"></div><div id="ensurelist"></div>'
);
if (res.data.length > 0) {
res.data.map((ele) => {
html += `<div class="item" data-code="${ele.legendCode}"><span class="itemTitle">${ele.legendAliasName}</span>&ensp;<span class="num">${ele.num}</span></div>`;
});
$('#numbox').html(html);
$('body').on('click', '.xstty .item', function () {
$('#ensurelistbox .layui-table-view').show();
$(this).addClass('active').siblings().removeClass('active');
let lcode = $(this).attr('data-code');
$("#numbox").html(html);
$("body").on("click", ".xstty .item", function () {
$("#ensurelistbox .layui-table-view").show();
$(this).addClass("active").siblings().removeClass("active");
let lcode = $(this).attr("data-code");
layTable.render({
elem: '#ensurelist',
elem: "#ensurelist",
url: iocUrl + `/frontApi/getSecurityInfoList/${lcode}`,
method: 'get',
method: "get",
cols: [
[
{ field: 'fullName', title: '名称', align: 'center' },
{ field: 'contacts', title: '联系人', align: 'center' },
{ field: 'telephone', title: '电话', align: 'center' },
{ field: 'address', title: '地址', align: 'center' },
{ field: 'introduce', title: '介绍', align: 'center' },
{ field: "fullName", title: "名称", align: "center" },
{ field: "contacts", title: "联系人", align: "center" },
{ field: "telephone", title: "电话", align: "center" },
{ field: "address", title: "地址", align: "center" },
{ field: "introduce", title: "介绍", align: "center" },
],
],
});
});
} else {
$('#numbox').html('无记录!');
$("#numbox").html("无记录!");
}
$('#ensurelistbox').show();
$("#ensurelistbox").show();
},
};
jQueryAjax(opt);
......@@ -942,10 +1068,10 @@ $(function () {
// });
// },
//应急预案
genericPlan(key = '', planID = '') {
genericPlan(key = "", planID = "") {
function getPlansli() {
let opt = {
type: 'post',
type: "post",
url: apis.plansGetList,
data: JSON.stringify({
page: 1,
......@@ -954,40 +1080,45 @@ $(function () {
success: function (res) {
let Arr = res.data.pageData,
resArr;
if (planID != '') resArr = Arr.filter((ele) => ele.id == planID);
if (planID != "") resArr = Arr.filter((ele) => ele.id == planID);
else resArr = [...Arr];
if (resArr.length > 0) {
layTable.render({
elem: '#yingjlist',
size: 'sm',
elem: "#yingjlist",
size: "sm",
cols: [
[
{ field: 'deptName', title: '所属单位' },
{ field: 'planTitle', title: '预案标题' },
{ field: "deptName", title: "所属单位" },
{ field: "planTitle", title: "预案标题" },
{
field: 'planLevel',
title: '预案登记',
field: "planLevel",
title: "预案登记",
templet: function (d) {
return d.planLevel + '级';
return d.planLevel + "级";
},
},
{
field: '',
title: '操作',
field: "",
title: "操作",
templet: function (d) {
let s;
if (key == 'gl') {
s = `<span class="txtbtn yjck" onclick="window.CAEVT.check(${JSON.stringify(d).replace(
if (key == "gl") {
s = `<span class="txtbtn yjck" onclick="window.CAEVT.check(${JSON.stringify(
d
).replace(
/"/g,
'&quot;',
)})">查看</span>&nbsp;&nbsp;<span class="txtbtn glya" onclick="window.CAEVT.connect(${JSON.stringify(d).replace(
/"/g,
'&quot;',
)})">关联预案</span>`;
} else if (planID != '') {
s = `<span class="txtbtn yjck" onclick="window.CAEVT.check(${JSON.stringify(d).replace(/"/g, '&quot;')})">详情</span>`;
"&quot;"
)})">查看</span>&nbsp;&nbsp;<span class="txtbtn glya" onclick="window.CAEVT.connect(${JSON.stringify(
d
).replace(/"/g, "&quot;")})">关联预案</span>`;
} else if (planID != "") {
s = `<span class="txtbtn yjck" onclick="window.CAEVT.check(${JSON.stringify(
d
).replace(/"/g, "&quot;")})">详情</span>`;
} else {
s = `<span class="txtbtn yjck" onclick="window.CAEVT.check(${JSON.stringify(d).replace(/"/g, '&quot;')})">查看</span>`;
s = `<span class="txtbtn yjck" onclick="window.CAEVT.check(${JSON.stringify(
d
).replace(/"/g, "&quot;")})">查看</span>`;
}
return s;
},
......@@ -1001,8 +1132,12 @@ $(function () {
};
jQueryAjax(opt);
}
CARYEVENTS.tanDialogFun('应急预案', 'yingjlistbox', '<div id="yingjlist"></div><div class="yjdetali detali"></div>');
$('#yingjlistbox').addClass('yjbs');
CARYEVENTS.tanDialogFun(
"应急预案",
"yingjlistbox",
'<div id="yingjlist"></div><div class="yjdetali detali"></div>'
);
$("#yingjlistbox").addClass("yjbs");
getPlansli();
},
};
......@@ -1015,65 +1150,65 @@ $(function () {
function defalutMApP() {
cont = 0;
map.clearMap();
district.search('新乐市', function (status, result) {
district.search("新乐市", function (status, result) {
var bounds = result.districtList[0].boundaries;
var mask = [];
for (var i = 0; i < bounds.length; i += 1) {
mask.push([bounds[i]]);
}
var defaultCenter = [114.72995, 38.37417];
map = new AMap.Map('container', {
map = new AMap.Map("container", {
mask: mask,
center: defaultCenter,
// resizeEnable: true,
disableSocket: true,
viewMode: '3D',
viewMode: "3D",
showLabel: true,
// labelzIndex: 110,
pitch: 8,
zoom: 11.5,
// mapStyle: 'amap://styles/darkblue',
mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
mapStyle: "amap://styles/3b679a15f448a4740ba2ff7524e1a4ae",
});
//添加描边
for (var i = 0; i < bounds.length; i += 1) {
new AMap.Polyline({
path: bounds[i],
strokeColor: '#22eae4',
strokeColor: "#22eae4",
strokeWeight: 5,
strokeOpacity: 7,
map: map,
});
}
})
});
$('#esc-tit , .escbox-bottom, .escbox-bottom .item').hide();
$('.abt').addClass('not').removeClass('done');
$("#esc-tit , .escbox-bottom, .escbox-bottom .item").hide();
$(".abt").addClass("not").removeClass("done");
}
$('.escTitClose').click(function () {
$(".escTitClose").click(function () {
// defalutMApP();
$('#esc-tit ').hide();
$("#esc-tit ").hide();
});
$('.closeBtn').click(function () {
$('.escbox-top,.escbox-bottom,#esc-tit').hide();
$(".closeBtn").click(function () {
$(".escbox-top,.escbox-bottom,#esc-tit").hide();
defalutMApP();
});
$('.escbox-tip-b .item').click(function () {
let inde = $(this).index('.escbox-tip-b .item');
$('.escbox-top').show();
element.on('tab(layTAb)', function (data) {
$(".escbox-tip-b .item").click(function () {
let inde = $(this).index(".escbox-tip-b .item");
$(".escbox-top").show();
element.on("tab(layTAb)", function (data) {
defalutMApP();
});
if (inde == 0) element.tabChange('layTAb', 'layTAb_curr');
if (inde == 1) element.tabChange('layTAb', 'layTAb_hisy');
if (inde == 0) element.tabChange("layTAb", "layTAb_curr");
if (inde == 1) element.tabChange("layTAb", "layTAb_hisy");
});
//关联按钮事件
$('body').on('click', '#connectPlanBtn', function () {
BOTMTOOLBAR.genericPlan('gl');
$("body").on("click", "#connectPlanBtn", function () {
BOTMTOOLBAR.genericPlan("gl");
});
$('#bottomMenu .btn').click(function () {
let inde = $(this).index('#bottomMenu .btn');
$("#bottomMenu .btn").click(function () {
let inde = $(this).index("#bottomMenu .btn");
//if (inde == 0) BOTMTOOLBAR.GISFun();
if (inde == 0) BOTMTOOLBAR.eventDevelopAnalysis();
if (inde == 1) BOTMTOOLBAR.dutyBookFun();
......@@ -1083,18 +1218,18 @@ $(function () {
if (inde == 4) BOTMTOOLBAR.genericPlan();
// if (inde == 6) BOTMTOOLBAR.konwlegeFun();
});
$('body').on('click', '.cbtn', function () {
let id = $(this).parent().parent().attr('id');
$("body").on("click", ".cbtn", function () {
let id = $(this).parent().parent().attr("id");
$(`#${id}`).hide();
if (id == 'ensurelistbox') $('#ensurelistbox .layui-table-view').hide();
if (id == 'zsbox') $('.yjbs .detali').hide();
if (id == "ensurelistbox") $("#ensurelistbox .layui-table-view").hide();
if (id == "zsbox") $(".yjbs .detali").hide();
});
$('.ty')
.find('a.abt')
$(".ty")
.find("a.abt")
.click(function () {
if (checkEventEype == 'review') {
let ind = $(this).index('a.abt');
$('.escbox-bottom').show();
if (checkEventEype == "review") {
let ind = $(this).index("a.abt");
$(".escbox-bottom").show();
$(`.escbox-bottom .item${ind + 1}`)
.show()
.siblings()
......@@ -1106,11 +1241,11 @@ $(function () {
});
});
$('#mouseToolBtn').click(function () {
$('.toolsbox').show('fast');
$("#mouseToolBtn").click(function () {
$(".toolsbox").show("fast");
});
$('.toolsbox h3 span').click(function () {
$('.toolsbox').hide();
$(".toolsbox h3 span").click(function () {
$(".toolsbox").hide();
});
// 启动
......@@ -1123,11 +1258,11 @@ $(function () {
createLegendList();
// renderAlarmNum();
renderEventNum();
createDeviceNumPieChart('deviceNumPie');
createDeviceNumLineChartday('deviceNumLineday');
createDeviceNumLineChartmouth('deviceNumLinemouth');
renderLegendTypeNum('categoryAlarmNum');
initVideo('videoHandler');
createDeviceNumPieChart("deviceNumPie");
createDeviceNumLineChartday("deviceNumLineday");
createDeviceNumLineChartmouth("deviceNumLinemouth");
renderLegendTypeNum("categoryAlarmNum");
initVideo("videoHandler");
getAlarmData();
//调用当前值班信息接口
getDutyInfo();
......
......@@ -11,15 +11,15 @@ var MTOOL;
// function renderMap() {
// 渲染地图
district.search('河北省', function (status, result) {
district.search('赞皇', function (status, result) {
var bounds = result.districtList[0].boundaries;
var mask = [];
for (var i = 0; i < bounds.length; i += 1) {
mask.push([bounds[i]]);
}
// var mask = [];
// for (var i = 0; i < bounds.length; i += 1) {
// mask.push([bounds[i]]);
// }
var defaultCenter = [114.72995, 38.37417];
map = new AMap.Map('container', {
mask: mask,
// mask: mask,
center: defaultCenter,
// resizeEnable: true,
disableSocket: true,
......@@ -81,7 +81,7 @@ district.search('河北省', function (status, result) {
// // })
// }),
// );
map.addControl(new AMap.MapType({defaultType: 1 ,showroad: true }));
map.addControl(new AMap.MapType({defaultType: 0 ,showroad: true }));
map.addControl(new AMap.Scale({ visible: true }));
map.addControl(new AMap.ToolBar({ position: 'LT', ruler: false, direction: false }));
});
......@@ -607,7 +607,7 @@ function removeMaker(category) {
} else {
for (var i in marker) {
map.remove(marker[i]);
$('#legend').find('li').removeClass('selected');
// $('#legend').find('li').removeClass('selected');
}
}
}
......
......@@ -181,12 +181,13 @@ function createBarChart(options) {
createEchart(option);
}
// 生成不同类型设备报警数量图
// 生成不同类型设备报警数量图 应急资源监控
function createDeviceAlarmNumBarChart(options) {
var option = {
name: options.name,
eleId: options.eleId,
opts: {
color: ["#FDF070", "#E8F2EE", "#50B06B","#F18231", "#009CF3", "#76D5F4"],
title: {
left: 'left',
textStyle: {
......@@ -195,53 +196,76 @@ function createDeviceAlarmNumBarChart(options) {
lineHeight: '36',
},
},
grid: {
top: 35,
left: 30,
bottom: 80,
right: 10,
// tooltip: {
// trigger: 'item'
// },
toolbox: {
show: true,
feature: {
mark: { show: true },
// dataView: { show: true, readOnly: false },
// restore: { show: true },
// saveAsImage: { show: true }
}
},
xAxis: {
type: 'category',
data: options.xAxisData,
axisLabel: {
textStyle: {
color: '#ddd',
series: [
{
name: 'Access From',
type: 'pie',
radius: ["80%", "70%"],
// center: ["50%", "50%"],
itemStyle: {
borderRadius: 20,
},
interval: 0,
rotate: 60,
label: {
normal: {
show: false,
textStyle: {
fontSize: 13,
},
position: "outside",
},
yAxis: {
type: 'value',
emphasis: {
show: false,
},
series: [
{
type: 'bar',
label: {
show: true,
position: 'inside',
},
barWidth: 20,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#83bff6' },
{ offset: 0.5, color: '#188df0' },
{ offset: 1, color: '#188df0' },
]),
labelLine: {
normal: {
show: false,
length: 20,
length2: 35,
},
emphasis: {
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#2378f7' },
{ offset: 0.7, color: '#2378f7' },
{ offset: 1, color: '#83bff6' },
]),
show: true,
},
},
data: options.seriesData,
},
// {
// name: "外边框",
// type: "pie",
// clockWise: false, //顺时加载
// hoverAnimation: false, //鼠标移入变大
// center: ["50%", "50%"],
// radius: ["80%", "80%"],
// label: {
// normal: {
// show: false,
// },
// },
// data: [
// {
// value: 9,
// name: "",
// itemStyle: {
// normal: {
// borderWidth: 2,
// borderColor: "#61bad3",
// },
// },
// },
// ],
// },
],
},
};
......@@ -263,32 +287,8 @@ function createPieChart(options) {
lineHeight: '36',
},
},
// legend: {
// top: 'bottom'
// orient: 'vertical',
// top: 35,
// left: 6,
// formatter: function (name) {
// var index = 0;
// var clientlabels = options.legendData;
// var clientcounts = options.seriesData;
// for (var i = 0; i < clientlabels.length; ++i) {
// if (clientlabels[i] == name) {
// index = i;
// }
// }
// return '[ ' + clientcounts[index].value + ' ] ' + name;
// },
// textStyle: {
// color: '#ddd',
// fontSize: 14,
// lineHeight: 12,
// },
// inactiveColor: '#555',
// itemWidth: 12,
// itemHeight: 12,
// itemGap: 9,
// data: options.legendData,
// tooltip: {
// trigger: 'item'
// },
toolbox: {
show: true,
......@@ -301,25 +301,24 @@ function createPieChart(options) {
},
series: [
{
name: 'Nightingale Chart',
// name: 'Nightingale Chart',
type: 'pie',
radius: [15, 80],
// radius: [15, 80],
center: ['50%', '50%'],
label : {
    normal : {
      formatter: '{b} {c}',
      textStyle : {
        fontWeight : 'normal',
        fontSize : 14
      }
    }
  },
roseType: 'area',
itemStyle: {
borderRadius: 8
},
data: options.seriesData,
//[
// { value: 40, name: 'rose 1' },
// { value: 38, name: 'rose 2' },
// { value: 32, name: 'rose 3' },
// { value: 30, name: 'rose 4' },
// { value: 28, name: 'rose 5' },
// { value: 26, name: 'rose 6' },
// { value: 22, name: 'rose 7' },
// { value: 18, name: 'rose 8' }
// ]
}
],
......@@ -340,11 +339,13 @@ function createLineChartday(options) {
x2:20,
y2:60,
borderWidth:1,
bottom:'40%'
top: '10%',
bottom:'35%'
},
xAxis: {
type: 'category',
data: options.xAxisData,
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisLabel: {
textStyle: {
color: '#ddd',
......@@ -364,7 +365,40 @@ function createLineChartday(options) {
series: [
{
data: options.seriesData,
type: 'line'
// data: [50, 200, 150, 80, 70, 110, 130],
type: 'bar',
markPoint: {
symbol:'image://../ioc_frontweb/images/gr.svg',//url替换成你的图片地址
symbolSize:15,//图片大小
symbolOffset:[0,'-50%'],//图片相对于柱形图x,y轴偏移量,注意要往上移y要是负的
data:[{
coord:[0,40]//需要展示图片的柱型索引,y轴的value
}],
label:{
show:false,//顶部默认会展示y轴的值,可以设置false,不展示
}
},
barWidth: 8, //柱图宽度
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: "top", //在上方显示
textStyle: {
//数值样式
color: "#688AB6",
fontSize: 12,
},
},
barBorderRadius: [5, 5, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#DFB73E' },
{ offset: 0.5, color: '#DFB73E' },
{ offset: 1, color: '#141f364d' }
])
},
},
}
]
},
......@@ -381,17 +415,18 @@ function createLineChartmouth(options) {
x:50,
y:10,
x2:20,
y2:40,
y2:60,
borderWidth:1,
bottom:'40%'
top: '15%',
bottom:'25%'
},
xAxis: {
type: 'category',
data: options.xAxisData,
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisLabel: {
textStyle: {
color: '#ddd',
fontSize:'14',
},
rotate: 60,
},
......@@ -401,13 +436,47 @@ function createLineChartmouth(options) {
axisLabel: {
textStyle: {
color: '#ddd',
fontSize:'14',
},
},
},
series: [
{
data: options.seriesData,
type: 'line'
// data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
markPoint: {
symbol:'image://../ioc_frontweb/images/gr.svg',//url替换成你的图片地址
symbolSize:15,//图片大小
symbolOffset:[0,'-50%'],//图片相对于柱形图x,y轴偏移量,注意要往上移y要是负的
data:[{
coord:[0,40]//需要展示图片的柱型索引,y轴的value
}],
label:{
show:false,//顶部默认会展示y轴的值,可以设置false,不展示
}
},
barWidth: 8, //柱图宽度
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: "top", //在上方显示
textStyle: {
//数值样式
color: "#688AB6",
fontSize: 12,
},
},
barBorderRadius: [5, 5, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#DFB73E' },
{ offset: 0.5, color: '#DFB73E' },
{ offset: 1, color: '#141f364d' }
])
},
},
}
]
},
......@@ -551,25 +620,41 @@ function createLegendList() {
tmpLi +=
'<li data-id="' +
items[i].id +
'" class="legendItem"><div><img class="legendPic" style="padding: 7px;" src="./images/legend/' +
'" class="legendItem"><div class="first"><img class="legendPic" style="padding: 7px 0;" src="./images/legend/' +
items[i].legendCode +
'.png" alt=""/><p class="legendTitle">' +
'.png" alt=""/><span class="legendTitle">' +
items[i].legendName +
'</p></div><div>';
'</span></div><div class="legendchild">';
var children = items[i].childList;
for (var j = 0; j < children.length; ++j) {
tmpLi += '<a data-id="' + children[j].id + '" href="#" title="' + children[j].legendName + '">' + children[j].legendName + '</a>';
tmpLi += '<a data-id="' + children[j].id + '" href="#" class="childa" title="' + children[j].legendName + '">' + children[j].legendName + '</a>';
}
tmpLi += '</div></li>';
}
$('#legend').html(tmpLi);
var legenditem=document.getElementsByClassName("legendItem");
var legendchild=document.getElementsByClassName("legendchild");
for (var i=0; i<legenditem.length;i++){
// legenditem[i].index = i;
// legenditem[i].onclick = function(){
// if(this.lastChild.style.display == "none"){
// this.style.backgroundImage="url(images/vectorbot.png)";
// this.lastChild.style.display = "block";
// }else{
// this.style.backgroundImage="url(images/re.png)";
// this.lastChild.style.display = "none";
// }
// };
}
// 默认显示视频监控设备
// $('.legendItem').eq(0).click();
} else {
layLayer.alert('数据为空');
}
}
},
};
jQueryAjax(opts);
......@@ -873,6 +958,7 @@ function createDeviceNumPieChart(eleId) {
// value: res.data[i].deviceNum,
name: res.data[i].eventType,
value: res.data[i].eventNum,
});
options.series.push({
name: res.data[i].key,
......@@ -1006,6 +1092,14 @@ function renderLegendTypeNum(eleId) {
var opts = {
url: apis.getLegendTypeNum,
success: function (res) {
console.log("333333333",res.data)
$('.wu').append(res.data[0].num + res.data[1].num + res.data[2].num + res.data[3].num + res.data[4].num + res.data[5].num);
$('.p1').append(res.data[0].num);
$('.p2').append(res.data[1].num);
$('.p3').append(res.data[2].num);
$('.p4').append(res.data[3].num);
$('.p5').append(res.data[4].num);
$('.p6').append(res.data[5].num);
if (res.code === 0) {
var options = {
eleId: eleId,
......@@ -1015,17 +1109,22 @@ function renderLegendTypeNum(eleId) {
seriesData: [],
};
for (var i in res.data) {
options.xAxisData.push(res.data[i].legendName);
options.seriesData.push(res.data[i].num);
// options.series.push({
// name: res.data[i].key,
// type: 'bar',
// stack: 'all',
// label: {
// show: true
// },
// data: [res.data[i].value]
// })
// options.xAxisData.push(res.data[i].legendName);
// options.seriesData.push(res.data[i].num);
// options.legendData.push(res.data[i].typeName);
options.seriesData.push({
// name: res.data[i].typeName,
// value: res.data[i].deviceNum,
name: res.data[i].legendName,
value: res.data[i].num,
});
options.series.push({
name: res.data[i].key,
type: 'bar',
stack: 'all',
data: [res.data[i].value],
});
}
createDeviceAlarmNumBarChart(options);
// createBarChart(options);
......@@ -1040,16 +1139,17 @@ function renderAlarmList(obj) {
var totalTmpHtml = `
<div class="itemh2">
预警监控
<img src="images/vector12.png" alt="" style="width: 14px;margin-right: 10px;">
</div>
<div class="itemout">
<div class="item">
<span class="num">${obj.totalNum}</span><span class="itemTitle">预警总数</span>
<div class="itemTitle">预警总数</div><div class="num">${obj.totalNum}</div>
</div>
<div class="item">
<span class="num">${obj.handledNum}</span><span class="itemTitle">已处理</span>
<div class="itemTitle">已处理</div><div class="num">${obj.handledNum}</div>
</div>
<div class="item">
<span class="num">${obj.noHandeldNum}</span><span class="itemTitle">未处理</span>
<div class="itemTitle">未处理</div><div class="num">${obj.noHandeldNum}</div>
</div>
</div>
`;
......@@ -1064,10 +1164,10 @@ function renderAlarmList(obj) {
<div style="width: 20%; overflow: hidden;">${pageData[i].unitName}</div>
<div style="width: 15%; overflow: hidden;">${pageData[i].typeName}</div>
<div style="width: 20%; overflow: hidden;">${pageData[i].statusName}</div>
<div style="width: 30%; overflow: hidden;">${new Date(pageData[i].alarmTime).toLocaleString('zh-CN', {
<div style="width: 25%; overflow: hidden;">${new Date(pageData[i].alarmTime).toLocaleString('zh-CN', {
hour12: false,
})}</div>
<div style="width: 10%; overflow: hidden;">${pageData[i].handledStatus}</div>
<div style="width: 15%; overflow: hidden;">${pageData[i].handledStatus}</div>
</li>`;
}
tmpHtml += '</ul>';
......
......@@ -168,34 +168,22 @@ table.layui-table th {
/* 报警数量 */
.alarm {
/* display: flex; */
/* width: 100%; */
width: 100%;
height: auto !important;
padding: 10px;
margin-top: 80px;
margin-top: 30px;
margin-left: 5px;
width: 454px;
background: rgba(21,34,60,0.8);
overflow: hidden;
box-sizing: border-box;
/* justify-content: space-between; */
border-right: 2px solid ;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#123c7f,#00F7DE,#123c7f,#00F7DE) 30 30;
border-image: -moz-linear-gradient(#123c7f,#00F7DE,#123c7f,#00F7DE) 30 30;
border-image: linear-gradient(#123c7f,#00F7DE,#123c7f,#00F7DE) 30 30;
}
.alarm .itemout{
display: flex;
justify-content: space-between;
}
.alarm .item {
width: auto;
height: 55px;
background: url(../images/one1.png) no-repeat;
width: 33%;
height: 100px;
background-size: 100% 100%;
position: relative;
overflow: hidden;
/* padding: 0 16px; */
padding: 0px 20px;
......@@ -204,24 +192,27 @@ table.layui-table th {
}
.alarm .num {
color: #0cb0ef;
font-size: 1.6rem;
font-family: 'LED';
text-align: right;
width: auto;
display: inline-block;
background-image:-webkit-linear-gradient(bottom,#DFB73E,#FFFFFF);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
.alarm .itemh2 {
width: 100%;
width: 95%;
margin-left: 10px;
height: 30px;
font-size: 18px;
font-size: 15px;
text-align: right;
line-height: 30px;
color: #03ffff;
padding-left: 10px;
background-image: linear-gradient(to left,rgb(21 34 60 / 50%) 50%, rgb(0 247 222 / 40%));
color: #fff;
background-image: linear-gradient(to right,rgb(21 34 60 / 50%), rgb(29 45 78 / 70%) 50%);
}
.alarm .itemTitle {
color: #d8d8d8;
color: #64FEFF;
font-size: 12px;
}
......@@ -237,12 +228,12 @@ table.layui-table th {
overflow: hidden;
text-align: center;
height: 18px;
color: rgb(235, 232, 232);
color: #EFF;
margin: 5px 0;
}
#alarmList .listTitle {
border-bottom: 2px solid #fff;
border-bottom: 2px solid #c5bfbf;
margin-top: 25px;
}
......@@ -255,7 +246,7 @@ table.layui-table th {
}
#alarmList .listContent {
height: 150px;
height: 200px;
overflow: hidden;
}
......@@ -265,52 +256,49 @@ table.layui-table th {
}
#alarmList .listContent li.odd {
background-color: rgba(102, 239, 252, 0.3);
background-color: rgb(0 0 0 / 50%);
color: #fff;
}
/* 图表样式 */
.echarts,
#alarmList {
width: 445px;
width: 100%;
height: 240px;
background-size: 100% 100%;
position: relative;
/* margin-top: -20px; */
}
#alarmList {
/* #alarmList {
padding: 25px 10px 0px 10px;
}
} */
.deviceNumBar {
height: 70px;
}
/* 天气样式 */
#weather {
margin: 10px auto 0;
position: fixed;
top: 0;
right: 0;
margin-top: 30px;
z-index: 999;
}
#weather,
iframe {
height: 50px;
width: 480px;
}
/* 图例 */
#legend {
overflow: hidden;
margin: 0;
width: 94%;
margin-left: 3%;
width: 200%;
margin-left: 670px;
position: absolute;
bottom: 0;
margin-bottom: 10px;
color: #ddd;
}
/* .legendcss li:hover{
background-image:url(../images/vectorbot.png);
} */
/* .legendcss li:hover .legendchild{
display: block !important;
} */
#legend a {
display: inline-block;
text-align: center;
......@@ -325,38 +313,55 @@ iframe {
#legend div {
float: left;
clear: both;
width: 100%;
}
.legendItem {
margin: 3px 0;
background-size: 100% 100%;
overflow: hidden;
border-bottom: 1px solid #33faf7;
/* cursor: pointer; */
float: left;
background: url(../images/re.png);
background-size: 100% 100%;
background-repeat: no-repeat;
padding: 0 5px;
margin-left: 10px;
}
.legendItem .first{
cursor: pointer;
}
.legendchild{
display: none;
width: auto;
position: fixed;
bottom: 75px;
height: 40px;
/* background-color: red; */
}
/* .legendItem:active + .legendchild{
display: block;
} */
.legendItem:last-child{
border-bottom: 0;
}
.legendItem a.selected {
background: rgb(34 62 107) url('../images/legend/selected.png') right top no-repeat !important;
.childa.selected {
background: rgb(34 62 107) url('../images/legend/recta.png')no-repeat !important;
background-size: 100% 100%;
border-radius: 5px;
background-size: 16px !important;
}
.legendPic {
width: 24px;
height: 24px;
width: 20px;
height: 20px;
float: left;
overflow: hidden;
}
.legendTitle {
width: calc(100% - 70px);
/* width: calc(100% - 70px); */
float: left;
line-height: 35px;
margin-left: 10px;
font-size: 14px;
color: #fefefe;
}
......@@ -453,113 +458,137 @@ iframe {
left: 828px;
/* top: 7px; */
}
#leftBar,
#rightBar {
width: 450px;
height: 99.9%;
#border{
z-index: 2;
min-width: 1000px;
/* background: url(../images/borderban.png) no-repeat;
background-size: 100% 100%; */
position: absolute;
top: 0;
}
.bordertop{
position: fixed;
width: 100%;
top: 0;
height: 90px;
}
.borderleft{
position: fixed;
height: 100%;
top: 0;
left: 0;
width: 60px;
}
.borderright{
position: fixed;
height: 100%;
top: 0;
right: 0;
width: 60px;
}
.borderbottom{
position: fixed;
width: 100%;
bottom: 0;
height: 30px;
}
#leftBar{
/* background: url(../images/mapleft1.png); */
background-repeat: no-repeat;
background-size: 100%;
width: 22%;
height: 89.1%;
position: fixed;
left: 0;
top: 0;
bottom: 0;
z-index: 2;
background-size: 100% 100%;
margin-top: 4.4%;
margin-left: 1%;
background: url(../images/mapl.png)no-repeat;
background-size: 100% 100%;
}
#rightBar{
/* background: url(../images/mapright1.png); */
background-repeat: no-repeat;
background-size: 100%;
width: 22%;
height: 89.1%;
position: fixed;
right: 0;
top: 0;
bottom: 0;
z-index: 2;
background-size: 100% 100%;
margin-top: 4.4%;
margin-right: 1%;
background: url(../images/mapr.png)no-repeat;
background-size: 100% 100%;
}
.msgWraplegend{
.right-bar{
width: 100%;
height: 30px;
font-size: 18px;
line-height: 30px;
color: #03ffff;
padding-left: 10px;
margin: 10px 0 0 0px;
background-image: linear-gradient(to left,rgb(21 34 60 / 50%) 50%, rgb(0 247 222 / 40%));
}
#leftBar {
left: 0;
width: 450px;
height: 99.9%;
right: auto;
height: auto !important;
padding: 10px;
margin-right: 10px;
margin-top: 20px;
overflow: hidden;
box-sizing: border-box;
}
.leftBar-legend{
left: 0;
width: 100%;
height: auto;
right: auto;
margin-top: 10px;
margin-left: 5px;
padding-bottom: 10px;
background: rgba(21,34,60,0.8);
border-right: 2px solid ;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: -moz-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
width: 96%;
height: auto !important;
padding: 10px;
margin-left: 20px;
overflow: hidden;
box-sizing: border-box;
}
.leftlegend{
width: 95%;
margin-left: 10px;
height: 30px;
font-size: 18px;
font-size: 15px;
text-align: right;
line-height: 30px;
color: #03ffff;
padding-left: 10px;
margin: 10px 0 0 10px;
background-image: linear-gradient(to left,rgb(21 34 60 / 50%) 50%, rgb(0 247 222 / 40%));
color: #fff;
background-image: linear-gradient(to right,rgb(21 34 60 / 50%), rgb(29 45 78 / 70%) 50%);;
}
.rightlegend{
width: 95%;
height: 30px;
font-size: 15px;
line-height: 30px;
color: #fff;
text-align: left;
background-image: linear-gradient(to left,rgb(21 34 60 / 50%), rgb(29 45 78 / 70%) 50%);
}
.deviceNumPieout{
width: 440px;
width: 100%;
height: 240px;
margin-top: 80px;
-webkit-tap-highlight-color: transparent;
background: rgba(21,34,60,0.8);
border-right: 2px solid;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: -moz-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
user-select: none;
}
.deviceNumLineout{
width: 440px;
height: 280px;
margin-top: 10px;
-webkit-tap-highlight-color: transparent;
background: rgba(21,34,60,0.8);
border-right: 2px solid;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: -moz-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
user-select: none;
width: 92%;
height: auto !important;
padding: 10px;
margin-right: 5px;
overflow: hidden;
box-sizing: border-box;
}
.deviceNumPie{
width: 436px;
height: 190px;
width: 100%;
height: 250px;
}
.right-alarm{
width: 100%;
height: 270px;
background-size: 100% 100%;
position: relative;
margin-top: 10px;
background: rgba(21,34,60,0.8);
border-right: 2px solid;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: -moz-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
height: auto !important;
overflow: hidden;
box-sizing: border-box;
}
/* 云台 */
.controlBtn {
display: flex;
display: none;
flex-wrap: wrap;
}
......@@ -746,20 +775,13 @@ iframe {
border-top-right-radius: 5px;
/* background-image: url('../images/one11.png'); */
max-height: calc(100vh - 100px);
background: rgba(21,34,60,0.8);
border-right: 2px solid ;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: -moz-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
z-index: 3;
}
.escbox-txt {
line-height: 90px;
line-height: 70px;
display: inline;
/* margin-left: 120px; */
float: left;
margin-left: 10px;
}
.escbox-bottom .escbox-top {
height: auto;
......@@ -999,27 +1021,19 @@ iframe {
line-height: 2;
}
.msgWrap {
width: 99%;
width: 100%;
height: auto;
margin-top: 10px;
padding: 0px 10px 10px 10px;
overflow: hidden;
box-sizing: border-box;
background: rgba(21,34,60,0.8);
border-right: 2px solid;
border-left: 2px solid;
border-top: 2px solid;
border-bottom: 2px solid;
border-image: -webkit-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: -moz-linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
border-image: linear-gradient(#4987de,#00F7DE,#4987de) 30 30;
}
.msgWrap .dutyinfo {
background: transparent;
margin-top: 10px;
overflow: hidden;
text-align: center;
width: 100%;
width: 95%;
}
.msgWrap .dutyinfo::-webkit-scrollbar {
/*滚动条整体样式*/
......@@ -1058,12 +1072,22 @@ iframe {
height: 40px;
width: 100%;
}
.msgWrap .dutyinfo dl dt,
.dutyinfo dl dl:nth-child(odd){
background: rgb(0 0 0 / 50%);
}
.msgWrap .dutyinfo dl dt{
color: #64FEFF;
box-sizing: border-box;
width: 33%;
font-size: 0.9rem;
border-bottom: 1px solid #fff;
background: rgba(255, 255, 255, 0);
float: left;
}
.msgWrap .dutyinfo dl dd {
box-sizing: border-box;
width: 33%;
font-size: 0.9rem;
border: 1px solid #fff;
color: #fff;
float: left;
}
......@@ -1076,16 +1100,11 @@ iframe {
outline: none;
}
.mktit {
color: #03ffff;
font-size: 18px;
text-align: left;
margin-top: 10px;
width: 95%;
width: 100%;
height: 30px;
font-size: 18px;
line-height: 30px;
overflow: hidden;
position: absolute;
top: 0;
color: #03ffff;
padding-left: 10px;
background-image: linear-gradient(to left,rgb(21 34 60 / 50%) 50%, rgb(0 247 222 / 40%));
}
......@@ -1200,7 +1219,7 @@ iframe {
color: white;
}
.serBtn {
background: #fff;
background: #152136;
width: 50px;
height: 50px;
text-align: center;
......@@ -1225,7 +1244,7 @@ iframe {
font-size: 2em;
height: 38px;
line-height: 38px;
color: #2964cf;
color: #fff;
}
#btnInput {
width: 300px;
......@@ -1285,12 +1304,18 @@ iframe {
color: #fff;
}
.escbox-tip {
width: 180px;
background: rgba(24, 35, 62, 0.7);
position: fixed;
bottom: 0;
color: #0ff;
/* padding: 10px 0; */
padding: 0px 10px;
/* border-radius: 10px; */
margin: 10px;
margin-bottom: 40px;
margin-left: 30px;
border: 1px solid #183158;
background: url(../images/groupshi.png)no-repeat;
background-size: 100% 100%;
}
.escbox-tip-a {
}
......@@ -1306,7 +1331,6 @@ iframe {
display: flex;
justify-content: space-around;
cursor: pointer;
padding: 15px 0;
border-top: 1px solid rgba(0, 0, 0, 0.2);
}
/* .escbox-tip-b .item {
......@@ -1476,8 +1500,6 @@ div[lay-id='members'] thead tr:nth-child(1) {
background: rgba(NaN, NaN, NaN, 0);
}
.ldio-2q89h75hfq5 {
width: 100%;
height: 100%;
position: relative;
transform: translateZ(0) scale(1);
backface-visibility: hidden;
......@@ -1619,14 +1641,17 @@ div[lay-id='members'] thead tr:nth-child(1) {
left: 0;
width: 50px !important;
height: 20px;
color: #333;
color: #fff;
text-align: center;
font-size: 12px;
line-height: 20px;
background: #fff;
background: #152136;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
.amap-maptype-title:hover{
background: #152136;
}
.amap-maptype-list {
width: 50px !important;
border-radius: 5px !important;
......@@ -1645,7 +1670,7 @@ div[lay-id='members'] thead tr:nth-child(1) {
height: 20px;
margin: 0;
cursor: pointer;
background: #fff;
background: #152136;
}
.amap-maptype-check {
display: inline-block;
......@@ -1657,8 +1682,13 @@ div[lay-id='members'] thead tr:nth-child(1) {
display: inline-block;
width: 30px !important;
height: 15px;
color: #333;
color: #fff;
font-size: 12px;
line-height: 15px;
margin-left: 3px !important;
}
.linebtn.active{
background: url(../images/year.png);
background-size: 100% 100%;
color: #fff;
}
\ No newline at end of file
......@@ -157,8 +157,8 @@
key: '61b7aa520cb34e62a9eee4644a689fcf',
},
};
setInterval("document.getElementById('itemone').innerHTML=new Date().toLocaleString();",1000);
document.getElementById("itemtwo").innerHTML = "星期"+"日一二三四五六".charAt(new Date().getDay());
// setInterval("document.getElementById('itemone').innerHTML=new Date().toLocaleString();",1000);
// document.getElementById("itemtwo").innerHTML = "星期"+"日一二三四五六".charAt(new Date().getDay());
</script>
<script src="https://widget.heweather.net/standard/static/js/he-standard-common.js?v=1.1"></script>
<!-- <div id="he-plugin-standard"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment