省侧大屏跳转施工大屏
This commit is contained in:
parent
9306dcbbdb
commit
5fb459b9d8
|
|
@ -1,6 +1,3 @@
|
|||
const baseUrl = 'http://127.0.0.1:18080/zhgd'
|
||||
// const baseUrl = 'http://192.168.0.7:18080/zhgd'
|
||||
|
||||
var loader = {
|
||||
get: function (url, data = null, scb) {
|
||||
let reqData = {
|
||||
|
|
@ -15,7 +12,7 @@ var loader = {
|
|||
}
|
||||
|
||||
$.ajax({
|
||||
url: baseUrl + url,
|
||||
url: commonUrl + url,
|
||||
type: 'get',
|
||||
headers: {
|
||||
"authorization": sessionStorage.getItem("zhgd_token")
|
||||
|
|
@ -25,12 +22,12 @@ var loader = {
|
|||
});
|
||||
}
|
||||
}
|
||||
let gtList=[];
|
||||
let gtList = [];
|
||||
var terrainMap;
|
||||
let element, layer, table;
|
||||
// 选中标段工程
|
||||
let checkBidCode = null;
|
||||
layui.use(['form','layer', 'element', 'table'], function () {
|
||||
layui.use(['form', 'layer', 'element', 'table'], function () {
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
|
|
@ -84,8 +81,10 @@ layui.use(['form','layer', 'element', 'table'], function () {
|
|||
form.on('select(bidPro)', function (data) {
|
||||
let value = data.value;
|
||||
let valueArr = value.split('@');
|
||||
loadBidProTower(valueArr[0],valueArr[1]);
|
||||
loadBidProTower(valueArr[0], valueArr[1]);
|
||||
});
|
||||
$("#quality-ranking-table").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true });
|
||||
$("#alarm-reminder-table").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true });
|
||||
});
|
||||
|
||||
$('#indexIframe').attr('src', './views/main.html');
|
||||
|
|
@ -117,52 +116,70 @@ const tooltip = {
|
|||
*/
|
||||
// 工程统计
|
||||
function initEngineeringStatistic() {
|
||||
const url = '/screen/largeScreen/scIndex/proStatusStatistics'
|
||||
const url = 'screen/largeScreen/scIndex/proStatusStatistics'
|
||||
loader.get(url, null, function (res) {
|
||||
const {djNum, zjNum, allNum, tcNum, tgNum} = res.data
|
||||
$('#engineering-statistic-item-1').text(djNum)
|
||||
$('#engineering-statistic-item-2').text(zjNum)
|
||||
$('#engineering-statistic-item-3').text(allNum)
|
||||
$('#engineering-statistic-item-4').text(tcNum)
|
||||
$('#engineering-statistic-item-5').text(tgNum)
|
||||
if (res.code === 200) {
|
||||
const { djNum, zjNum, allNum, tcNum, tgNum } = res.data
|
||||
$('#engineering-statistic-item-1').text(djNum)
|
||||
$('#engineering-statistic-item-2').text(zjNum)
|
||||
$('#engineering-statistic-item-3').text(allNum)
|
||||
$('#engineering-statistic-item-4').text(tcNum)
|
||||
$('#engineering-statistic-item-5').text(tgNum)
|
||||
} else if (res.code === 401) {
|
||||
loginout(1);
|
||||
} else {
|
||||
console.error('工程统计:' + res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 施工质量排名
|
||||
function initQualityRanking() {
|
||||
const url = '/screen/largeScreen/scIndex/constrQuality'
|
||||
const url = 'screen/largeScreen/scIndex/constrQuality'
|
||||
loader.get(url, null, function (res) {
|
||||
res.data.forEach((item, index) => {
|
||||
const {bidName, teamName, teamLeader, score} = item
|
||||
var newRow = `<li>
|
||||
<div class="quality-ranking quality-ranking-${index+1}">${index + 1}</div>
|
||||
<div title="${bidName}">${bidName}</div>
|
||||
<div title="${teamName}">${teamName}</div>
|
||||
<div title="${teamLeader}">${teamLeader}</div>
|
||||
<div title="${score}">${score}</div>
|
||||
</li>`;
|
||||
$("#quality-ranking-table").append(newRow);
|
||||
})
|
||||
if (res.data && res.data.length === 0) {
|
||||
$("#quality-ranking-table").append('<li class="layout"><p>无数据</p></li>');
|
||||
if (res.code === 200) {
|
||||
res.data.forEach((item, index) => {
|
||||
const { bidName, teamName, teamLeader, score } = item
|
||||
var newRow = `<li>
|
||||
<div class="quality-ranking quality-ranking-${index + 1}">${index + 1}</div>
|
||||
<div title="${bidName}">${bidName}</div>
|
||||
<div title="${teamName}">${teamName}</div>
|
||||
<div title="${teamLeader}">${teamLeader}</div>
|
||||
<div title="${score}">${score}</div>
|
||||
</li>`;
|
||||
$("#quality-ranking-table").append(newRow);
|
||||
})
|
||||
if (res.data && res.data.length === 0) {
|
||||
$("#quality-ranking-table").append('<li class="layout"><p>无数据</p></li>');
|
||||
}
|
||||
} else if (res.code === 401) {
|
||||
loginout(1);
|
||||
} else {
|
||||
console.error('施工质量排名:' + res.msg);
|
||||
}
|
||||
$("#quality-ranking-table").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true });
|
||||
})
|
||||
}
|
||||
|
||||
// 环境分析
|
||||
function initEnvironmentAnalysis() {
|
||||
const url = '/screen/largeScreen/scIndex/environmentDetection'
|
||||
const url = 'screen/largeScreen/scIndex/environmentDetection'
|
||||
loader.get(url, null, function (res) {
|
||||
const data = res.data[0]
|
||||
if (!data) { return }
|
||||
const {aqiNormalNum, aqiErrorNum, dbNormalNum, dbErrorNum, hcNormalNum, hcErrorNum} = data
|
||||
$('#environment-analysis-1').find('div:first').find('p:first span').text(aqiNormalNum)
|
||||
$('#environment-analysis-1').find('div:first').find('p:last span').text(aqiErrorNum)
|
||||
$('#environment-analysis-2').find('div:first').find('p:first span').text(dbNormalNum)
|
||||
$('#environment-analysis-2').find('div:first').find('p:last span').text(dbErrorNum)
|
||||
$('#environment-analysis-3').find('div:first').find('p:first span').text(hcNormalNum)
|
||||
$('#environment-analysis-3').find('div:first').find('p:last span').text(hcErrorNum)
|
||||
if (res.code === 200) {
|
||||
const data = res.data[0]
|
||||
if (!data) { return }
|
||||
const { aqiNormalNum, aqiErrorNum, dbNormalNum, dbErrorNum, hcNormalNum, hcErrorNum } = data
|
||||
$('#environment-analysis-1').find('div:first').find('p:first span').text(aqiNormalNum)
|
||||
$('#environment-analysis-1').find('div:first').find('p:last span').text(aqiErrorNum)
|
||||
$('#environment-analysis-2').find('div:first').find('p:first span').text(dbNormalNum)
|
||||
$('#environment-analysis-2').find('div:first').find('p:last span').text(dbErrorNum)
|
||||
$('#environment-analysis-3').find('div:first').find('p:first span').text(hcNormalNum)
|
||||
$('#environment-analysis-3').find('div:first').find('p:last span').text(hcErrorNum)
|
||||
} else if (res.code === 401) {
|
||||
loginout(1);
|
||||
} else {
|
||||
console.error('环境分析:' + res.msg);
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -174,21 +191,27 @@ function initDeviceStatus() {
|
|||
let data2 = []
|
||||
let data3 = []
|
||||
|
||||
const url = '/screen/largeScreen/scIndex/deviceStatus'
|
||||
const url = 'screen/largeScreen/scIndex/deviceStatus'
|
||||
loader.get(url, null, function (res) {
|
||||
|
||||
const {allTotalNum, onlineTotalNum, offTotalNum, valueList} = res.data;
|
||||
$('#device-status__total').text(allTotalNum)
|
||||
$('#device-status__online').text(onlineTotalNum)
|
||||
$('#device-status__offline').text(offTotalNum)
|
||||
// console.log(valueList)
|
||||
valueList.forEach(item => {
|
||||
const {proName, totalNum, onlineNum, offLineNum} = item
|
||||
xLabel.push(proName)
|
||||
data1.push(totalNum)
|
||||
data2.push(onlineNum)
|
||||
data3.push(offLineNum)
|
||||
})
|
||||
if (res.code === 200) {
|
||||
const { allTotalNum, onlineTotalNum, offTotalNum, valueList } = res.data;
|
||||
$('#device-status__total').text(allTotalNum)
|
||||
$('#device-status__online').text(onlineTotalNum)
|
||||
$('#device-status__offline').text(offTotalNum)
|
||||
// console.log(valueList)
|
||||
valueList.forEach(item => {
|
||||
const { proName, totalNum, onlineNum, offLineNum } = item
|
||||
xLabel.push(proName)
|
||||
data1.push(totalNum)
|
||||
data2.push(onlineNum)
|
||||
data3.push(offLineNum)
|
||||
})
|
||||
} else if (res.code === 401) {
|
||||
loginout(1);
|
||||
} else {
|
||||
console.error('设备状态:' + res.msg);
|
||||
}
|
||||
// console.log(xLabel)
|
||||
let option = {
|
||||
tooltip,
|
||||
|
|
@ -209,14 +232,14 @@ function initDeviceStatus() {
|
|||
color: "#08A0A3",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "inside", // 支持内部鼠标滚动平移
|
||||
startValue: 0,
|
||||
endValue: 4,
|
||||
zoomOnMouseWheel: false, // 关闭滚轮缩放
|
||||
moveOnMouseWheel: true, // 开启滚轮平移
|
||||
moveOnMouseMove: true, // 鼠标移动能触发数据窗口平移
|
||||
}],
|
||||
{
|
||||
type: "inside", // 支持内部鼠标滚动平移
|
||||
startValue: 0,
|
||||
endValue: 4,
|
||||
zoomOnMouseWheel: false, // 关闭滚轮缩放
|
||||
moveOnMouseWheel: true, // 开启滚轮平移
|
||||
moveOnMouseMove: true, // 鼠标移动能触发数据窗口平移
|
||||
}],
|
||||
grid: {
|
||||
top: '20%',
|
||||
left: '8%',
|
||||
|
|
@ -355,19 +378,19 @@ function initDeviceStatus() {
|
|||
normal: {
|
||||
//线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#1ED6FF30',
|
||||
},
|
||||
{
|
||||
offset: 0.6,
|
||||
color: '#1ED6FF20',
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#1ED6FF10',
|
||||
},
|
||||
],
|
||||
{
|
||||
offset: 0,
|
||||
color: '#1ED6FF30',
|
||||
},
|
||||
{
|
||||
offset: 0.6,
|
||||
color: '#1ED6FF20',
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#1ED6FF10',
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
|
|
@ -472,13 +495,13 @@ function initMainMap(dataMap = []) {
|
|||
textStyle: {
|
||||
color: '#fff'
|
||||
},
|
||||
formatter (res) {
|
||||
const dom = '<div>'+ `标段工程名称:${res.data.bidName}` + '</div>' +
|
||||
'<div>'+ `标段编码:${res.data.bidCode}` + '</div>' +
|
||||
'<div>'+ `班组名称:${res.data.teamName}` + '</div>' +
|
||||
'<div>'+ `班组长:${res.data.workManager}` + '</div>' +
|
||||
'<div>'+ `风险等级:${res.data.riskLevel}` + '</div>' +
|
||||
'<div>'+ `工作内容:${res.data.workContent}` + '</div>'
|
||||
formatter(res) {
|
||||
const dom = '<div>' + `标段工程名称:${res.data.bidName}` + '</div>' +
|
||||
'<div>' + `标段编码:${res.data.bidCode}` + '</div>' +
|
||||
'<div>' + `班组名称:${res.data.teamName}` + '</div>' +
|
||||
'<div>' + `班组长:${res.data.workManager}` + '</div>' +
|
||||
'<div>' + `风险等级:${res.data.riskLevel}` + '</div>' +
|
||||
'<div>' + `工作内容:${res.data.workContent}` + '</div>'
|
||||
return dom
|
||||
},
|
||||
extraCssText: "max-width:300px;height:auto;word-break:break-all;white-space:pre-wrap;",
|
||||
|
|
@ -597,6 +620,20 @@ function initMainMap(dataMap = []) {
|
|||
|
||||
myChart.clear();
|
||||
myChart.setOption(option, true);
|
||||
myChart.off('dblclick').on("dblclick", function (params) {
|
||||
if(params.componentType === 'series'){
|
||||
const paramsData = {
|
||||
'bidCode': params.data.bidCode,
|
||||
'token': token
|
||||
};
|
||||
// 将参数转换为查询字符串
|
||||
const queryString = Object.keys(paramsData)
|
||||
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(encryptCBC(paramsData[key])))
|
||||
.join('&');
|
||||
const hrefUrl = login_sg_index + "?" + queryString;
|
||||
const newWindow = window.open(hrefUrl, 'newWindow');
|
||||
}
|
||||
})
|
||||
});
|
||||
window.addEventListener("resize", function () {
|
||||
myChart.resize();
|
||||
|
|
@ -664,7 +701,7 @@ function mapSearch() {
|
|||
}
|
||||
|
||||
function initRiskData() {
|
||||
const url = '/screen/largeScreen/scIndex/riskStatistics'
|
||||
const url = 'screen/largeScreen/scIndex/riskStatistics'
|
||||
loader.get(url, null, function (res) {
|
||||
const data = res.data
|
||||
mainMapPointList = data
|
||||
|
|
@ -673,7 +710,7 @@ function initRiskData() {
|
|||
})
|
||||
}
|
||||
|
||||
function initMap(){
|
||||
function initMap() {
|
||||
createMap()
|
||||
// madeBoundary(); //加载区域图
|
||||
// addMapControl(); // 添加自定义控件
|
||||
|
|
@ -682,7 +719,7 @@ function initMap(){
|
|||
}
|
||||
|
||||
// 设置杆塔连线
|
||||
function setTowerLine(gtList){
|
||||
function setTowerLine(gtList) {
|
||||
let allOverlayList = terrainMap.getOverlays();
|
||||
//循坏所有点并清除指定的点
|
||||
if (allOverlayList.length > 0) {
|
||||
|
|
@ -693,64 +730,64 @@ function setTowerLine(gtList){
|
|||
}
|
||||
}
|
||||
}
|
||||
var points=[];
|
||||
for(var i = 0; i < gtList.length; i++) {
|
||||
var point=new Object();
|
||||
point.lng=gtList[i].lon;
|
||||
point.lat=gtList[i].lat;
|
||||
point.proName=gtList[i].proName;
|
||||
point.img='../../../img/map/bdz.png';
|
||||
point.place=gtList[i].gtName;
|
||||
var points = [];
|
||||
for (var i = 0; i < gtList.length; i++) {
|
||||
var point = new Object();
|
||||
point.lng = gtList[i].lon;
|
||||
point.lat = gtList[i].lat;
|
||||
point.proName = gtList[i].proName;
|
||||
point.img = '../../../img/map/bdz.png';
|
||||
point.place = gtList[i].gtName;
|
||||
points.push(point);
|
||||
}
|
||||
console.log(points)
|
||||
for(var i=0, len = points.length; i<len; i++) {
|
||||
for (var i = 0, len = points.length; i < len; i++) {
|
||||
//自定义图标
|
||||
var pointIcon = new BMap.Icon(points[i].img,new BMap.Size(27,27));
|
||||
var pointIcon = new BMap.Icon(points[i].img, new BMap.Size(27, 27));
|
||||
//将标注点转化为地图上的点
|
||||
var point = new BMap.Point(points[i].lat, points[i].lng);
|
||||
var infoWindow = new BMap.InfoWindow( points[i].place);
|
||||
var infoWindow = new BMap.InfoWindow(points[i].place);
|
||||
//将点转化为标注点
|
||||
var marker = new BMap.Marker(point,{icon:pointIcon});
|
||||
var marker = new BMap.Marker(point, { icon: pointIcon });
|
||||
//添加点图层
|
||||
terrainMap.addOverlay(marker);
|
||||
(function() {
|
||||
let title= '<p class="map-p">工程名称:' + points[i].proName+ '</p>' +
|
||||
(function () {
|
||||
let title = '<p class="map-p">工程名称:' + points[i].proName + '</p>' +
|
||||
'<p class="map-p">杆塔名称:' + points[i].place + '</p>' +
|
||||
'<p class="map-p">经度:' +points[i].lat + '</p>' +
|
||||
'<p class="map-p">维度:' + points[i].lng+ '</p>';
|
||||
'<p class="map-p">经度:' + points[i].lat + '</p>' +
|
||||
'<p class="map-p">维度:' + points[i].lng + '</p>';
|
||||
|
||||
//创建label图层 points[i].place
|
||||
var label = new BMap.Label(title,{position:point});
|
||||
marker.addEventListener("mouseover",function() {
|
||||
var label = new BMap.Label(title, { position: point });
|
||||
marker.addEventListener("mouseover", function () {
|
||||
terrainMap.addOverlay(label);
|
||||
});
|
||||
marker.addEventListener("mouseout",function() {
|
||||
marker.addEventListener("mouseout", function () {
|
||||
terrainMap.removeOverlay(label);
|
||||
});
|
||||
})();
|
||||
}
|
||||
//将所有点连线,连线图层polyline
|
||||
var line = [];
|
||||
for(var i=0; i<points.length; i++){
|
||||
for (var i = 0; i < points.length; i++) {
|
||||
console.log(points[i].lng, points[i].lat)
|
||||
line.push(new BMap.Point(points[i].lat, points[i].lng));
|
||||
}
|
||||
line.push(new BMap.Point(points[0].lat, points[0].lng));
|
||||
console.log(line,'line')
|
||||
console.log(line, 'line')
|
||||
console.log(line)
|
||||
var polyline = new BMap.Polyline(line,{strokeColor:'#00aa00',strokeWeight:2,strokeOpacity:1});
|
||||
var polyline = new BMap.Polyline(line, { strokeColor: '#00aa00', strokeWeight: 2, strokeOpacity: 1 });
|
||||
terrainMap.addOverlay(polyline);
|
||||
terrainMap.centerAndZoom(line[0],10); //设置中心点和缩放层级
|
||||
terrainMap.centerAndZoom(line[0], 10); //设置中心点和缩放层级
|
||||
}
|
||||
|
||||
function createMap(){
|
||||
function createMap() {
|
||||
terrainMap = new BMap.Map("map", {});
|
||||
terrainMap.centerAndZoom('合肥', 8);
|
||||
madeBoundary(); //加载区域图
|
||||
addMapControl(); // 添加自定义控件
|
||||
setMapEvent(); //地图控件设置
|
||||
$('#allMap').css({'zIndex': 999, 'backgroundColor': 'transparent'});
|
||||
$('#allMap').css({ 'zIndex': 999, 'backgroundColor': 'transparent' });
|
||||
}
|
||||
|
||||
//设置区域图 start
|
||||
|
|
@ -788,32 +825,32 @@ function addMapControl() {
|
|||
"lightness": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "railway",
|
||||
"elementType": "all",
|
||||
"stylers": {
|
||||
"visibility": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "local",
|
||||
"elementType": "labels",
|
||||
"stylers": {
|
||||
"visibility": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "water",
|
||||
"elementType": "all",
|
||||
"stylers": {
|
||||
"color": "#d1e5ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "highway",
|
||||
"elementType": "labels",
|
||||
"stylers": {}
|
||||
{
|
||||
"featureType": "railway",
|
||||
"elementType": "all",
|
||||
"stylers": {
|
||||
"visibility": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "local",
|
||||
"elementType": "labels",
|
||||
"stylers": {
|
||||
"visibility": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "water",
|
||||
"elementType": "all",
|
||||
"stylers": {
|
||||
"color": "#d1e5ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"featureType": "highway",
|
||||
"elementType": "labels",
|
||||
"stylers": {}
|
||||
}
|
||||
];
|
||||
terrainMap.setMapStyle({
|
||||
styleJson: mystyleJson
|
||||
|
|
@ -834,17 +871,23 @@ function setMapEvent() {
|
|||
// 工程安全隐患分析
|
||||
function initSafetyAnalysis() {
|
||||
|
||||
const url = '/screen/largeScreen/scIndex/potentialSafetyHazard'
|
||||
const url = 'screen/largeScreen/scIndex/potentialSafetyHazard'
|
||||
loader.get(url, null, function (res) {
|
||||
let xLabel = []
|
||||
let dataValue = []
|
||||
let dataValue1 = []
|
||||
res.data.forEach(item => {
|
||||
const {orgName, planNum, dangerNum} = item
|
||||
xLabel.push(orgName)
|
||||
dataValue.push(planNum)
|
||||
dataValue1.push(dangerNum)
|
||||
})
|
||||
if(res.code === 200){
|
||||
res.data.forEach(item => {
|
||||
const { orgName, planNum, dangerNum } = item
|
||||
xLabel.push(orgName)
|
||||
dataValue.push(planNum)
|
||||
dataValue1.push(dangerNum)
|
||||
})
|
||||
}else if(res.code === 401){
|
||||
loginout(1);
|
||||
}else {
|
||||
console.error("工程安全隐患分析:"+res.msg);
|
||||
}
|
||||
|
||||
|
||||
let option = {
|
||||
|
|
@ -867,14 +910,14 @@ function initSafetyAnalysis() {
|
|||
color: "#08A0A3",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "inside", // 支持内部鼠标滚动平移
|
||||
startValue: 0,
|
||||
endValue: 4,
|
||||
zoomOnMouseWheel: false, // 关闭滚轮缩放
|
||||
moveOnMouseWheel: true, // 开启滚轮平移
|
||||
moveOnMouseMove: true, // 鼠标移动能触发数据窗口平移
|
||||
}],
|
||||
{
|
||||
type: "inside", // 支持内部鼠标滚动平移
|
||||
startValue: 0,
|
||||
endValue: 4,
|
||||
zoomOnMouseWheel: false, // 关闭滚轮缩放
|
||||
moveOnMouseWheel: true, // 开启滚轮平移
|
||||
moveOnMouseMove: true, // 鼠标移动能触发数据窗口平移
|
||||
}],
|
||||
legend: {
|
||||
show: true,
|
||||
top: '15%',
|
||||
|
|
@ -1070,19 +1113,19 @@ function initSafetyAnalysis() {
|
|||
normal: {
|
||||
//线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#FE533C30',
|
||||
},
|
||||
{
|
||||
offset: 0.6,
|
||||
color: '#FE533C20',
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ffba0010',
|
||||
},
|
||||
],
|
||||
{
|
||||
offset: 0,
|
||||
color: '#FE533C30',
|
||||
},
|
||||
{
|
||||
offset: 0.6,
|
||||
color: '#FE533C20',
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ffba0010',
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
|
|
@ -1104,13 +1147,19 @@ function initEfficiencyAnalysis() {
|
|||
let xLabel = []
|
||||
let data = []
|
||||
|
||||
const url = '/screen/largeScreen/scIndex/efficiencyAnalysis'
|
||||
const url = 'screen/largeScreen/scIndex/efficiencyAnalysis'
|
||||
loader.get(url, null, function (res) {
|
||||
res.data.forEach(item => {
|
||||
const {proName, value} = item
|
||||
xLabel.push(proName)
|
||||
data.push(value)
|
||||
})
|
||||
if(res.code === 200){
|
||||
res.data.forEach(item => {
|
||||
const { proName, value } = item
|
||||
xLabel.push(proName)
|
||||
data.push(value)
|
||||
})
|
||||
}else if(res.code === 401){
|
||||
loginout(1);
|
||||
}else{
|
||||
console.error("工人效率分析:" + res.msg);
|
||||
}
|
||||
|
||||
let option = {
|
||||
tooltip,
|
||||
|
|
@ -1130,7 +1179,7 @@ function initEfficiencyAnalysis() {
|
|||
moveHandleStyle: {
|
||||
color: "#08A0A3",
|
||||
},
|
||||
},{
|
||||
}, {
|
||||
type: "inside", // 支持内部鼠标滚动平移
|
||||
startValue: 0,
|
||||
endValue: 3,
|
||||
|
|
@ -1266,7 +1315,7 @@ function initEfficiencyAnalysis() {
|
|||
|
||||
// 资源利用
|
||||
function initResourceRate() {
|
||||
const url = '/screen/largeScreen/scIndex/resourceUse'
|
||||
const url = 'screen/largeScreen/scIndex/resourceUse'
|
||||
let element = document.getElementsByClassName('resource-rate-item')
|
||||
const config = [
|
||||
{
|
||||
|
|
@ -1292,7 +1341,7 @@ function initResourceRate() {
|
|||
},
|
||||
]
|
||||
loader.get(url, null, function (res) {
|
||||
const {personnelRate, deviceRate, energyValue} = res.data
|
||||
const { personnelRate, deviceRate, energyValue } = res.data
|
||||
config[0].dataNum = personnelRate
|
||||
config[1].dataNum = deviceRate
|
||||
config[2].dataNum = energyValue
|
||||
|
|
@ -1309,7 +1358,7 @@ function initResourceRate() {
|
|||
})
|
||||
}
|
||||
function getResourceChartOption(config) {
|
||||
const {dataTitle, dataNum, dataNumColor, dashboardBgc, dashboardColor} = config
|
||||
const { dataTitle, dataNum, dataNumColor, dashboardBgc, dashboardColor } = config
|
||||
let option = {
|
||||
series: [
|
||||
{
|
||||
|
|
@ -1395,21 +1444,27 @@ function getResourceChartOption(config) {
|
|||
|
||||
// 告警提醒
|
||||
function initAlarmReminder() {
|
||||
const url = '/screen/largeScreen/scIndex/alarmReminder'
|
||||
const url = 'screen/largeScreen/scIndex/alarmReminder'
|
||||
loader.get(url, null, function (res) {
|
||||
res.data.forEach((item, index) => {
|
||||
const {proName, warningContent} = item
|
||||
var newRow = `<li>
|
||||
<div title="${proName}">${proName}</div>
|
||||
<div title="${warningContent}">${warningContent}</div>
|
||||
</li>`;
|
||||
$("#alarm-reminder-table").append(newRow);
|
||||
})
|
||||
if (res.data && res.data.length === 0) {
|
||||
$("#alarm-reminder-table").append('<li class="layout" style="justify-content: center;"><p>无数据</p></li>');
|
||||
if(res.code === 200){
|
||||
res.data.forEach((item, index) => {
|
||||
const { proName, warningContent } = item
|
||||
var newRow = `<li>
|
||||
<div title="${proName}">${proName}</div>
|
||||
<div title="${warningContent}">${warningContent}</div>
|
||||
</li>`;
|
||||
$("#alarm-reminder-table").append(newRow);
|
||||
})
|
||||
if (res.data && res.data.length === 0) {
|
||||
$("#alarm-reminder-table").append('<li class="layout" style="justify-content: center;"><p>无数据</p></li>');
|
||||
}
|
||||
}else if(res.code === 401){
|
||||
loginout(1);
|
||||
}else {
|
||||
console.error("告警提醒:"+res.msg);
|
||||
}
|
||||
$("#alarm-reminder-table").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true });
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/* 标段工程数据 */
|
||||
|
|
@ -1431,16 +1486,16 @@ function loadBidPro() {
|
|||
errorFn(xhr, status, error)
|
||||
setData(null);
|
||||
}, aqEnnable);
|
||||
|
||||
function setData(bidCodeList){
|
||||
|
||||
function setData(bidCodeList) {
|
||||
let html = '';
|
||||
if (bidCodeList && bidCodeList.length > 0) {
|
||||
$.each(bidCodeList, function (index, item) {
|
||||
if(index === 0){
|
||||
if (index === 0) {
|
||||
checkBidCode = item.bidCode;
|
||||
html += '<option value="' + (item.bidCode + "@" + item.proName) + '" checked>' + item.proName + '</option>'
|
||||
loadBidProTower(item.bidCode,item.proName);
|
||||
}else{
|
||||
loadBidProTower(item.bidCode, item.proName);
|
||||
} else {
|
||||
html += '<option value="' + (item.bidCode + "@" + item.proName) + '">' + item.proName + '</option>'
|
||||
}
|
||||
})
|
||||
|
|
@ -1452,7 +1507,7 @@ function loadBidPro() {
|
|||
}
|
||||
|
||||
/* 标段工程杆塔数据 */
|
||||
function loadBidProTower(bidCode,proName) {
|
||||
function loadBidProTower(bidCode, proName) {
|
||||
const paramData = 'bidCode=' + bidCode;
|
||||
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
|
||||
const url = commonUrl + 'screen/largeScreen/scIndex/getGtList?params=' + montageParam;
|
||||
|
|
@ -1469,40 +1524,40 @@ function loadBidProTower(bidCode,proName) {
|
|||
errorFn(xhr, status, error)
|
||||
}, aqEnnable);
|
||||
|
||||
function setData(data){
|
||||
if(data && data.length == 0){
|
||||
function setData(data) {
|
||||
if (data && data.length == 0) {
|
||||
data = [
|
||||
{
|
||||
lat:118.07138310,
|
||||
lon:31.05344367,
|
||||
proName:proName,
|
||||
gtName:'A1',
|
||||
lat: 118.07138310,
|
||||
lon: 31.05344367,
|
||||
proName: proName,
|
||||
gtName: 'A1',
|
||||
},
|
||||
{
|
||||
lat:118.07050390,
|
||||
lon:31.05571928,
|
||||
proName:proName,
|
||||
gtName:'A2',
|
||||
lat: 118.07050390,
|
||||
lon: 31.05571928,
|
||||
proName: proName,
|
||||
gtName: 'A2',
|
||||
},
|
||||
{
|
||||
lat:118.06960770,
|
||||
lon:31.05803784,
|
||||
proName:proName,
|
||||
gtName:'A3',
|
||||
lat: 118.06960770,
|
||||
lon: 31.05803784,
|
||||
proName: proName,
|
||||
gtName: 'A3',
|
||||
},
|
||||
{
|
||||
lat:118.0684919,
|
||||
lon:31.06092441,
|
||||
proName:proName,
|
||||
gtName:'A4',
|
||||
lat: 118.0684919,
|
||||
lon: 31.06092441,
|
||||
proName: proName,
|
||||
gtName: 'A4',
|
||||
},
|
||||
{
|
||||
lat:118.07093833,
|
||||
lon:31.06312931,
|
||||
proName:proName,
|
||||
gtName:'A5',
|
||||
lat: 118.07093833,
|
||||
lon: 31.06312931,
|
||||
proName: proName,
|
||||
gtName: 'A5',
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue