|
@ -143,9 +143,9 @@ var cfg = { |
|
|
break; |
|
|
break; |
|
|
case "5"://图表
|
|
|
case "5"://图表
|
|
|
|
|
|
|
|
|
if(cid==6){ |
|
|
if(cid>=4){ |
|
|
w = "345px"; |
|
|
w = "260px"; |
|
|
h = "345px"; |
|
|
h = "260px"; |
|
|
}else{ |
|
|
}else{ |
|
|
w = "400px"; |
|
|
w = "400px"; |
|
|
h = "200px"; |
|
|
h = "200px"; |
|
@ -360,9 +360,15 @@ var cfg = { |
|
|
}else if(app.cid=="5"||app.cid==6){ |
|
|
}else if(app.cid=="5"||app.cid==6){ |
|
|
app.propertyModuleName=app.cid==5?"仪表盘设置":"压力表设置"; |
|
|
app.propertyModuleName=app.cid==5?"仪表盘设置":"压力表设置"; |
|
|
app.pimax = obj.attr("pimax") ; |
|
|
app.pimax = obj.attr("pimax") ; |
|
|
|
|
|
app.pimin= obj.attr("pimin"); |
|
|
// 增加切换复原属性 边框和形状
|
|
|
// 增加切换复原属性 边框和形状
|
|
|
app.piCompany = obj.attr("picompany") ; |
|
|
app.piCompany = obj.attr("picompany") ; |
|
|
app.splitNumber = obj.attr('splitnumber'); |
|
|
app.splitNumber = obj.attr('splitnumber'); |
|
|
|
|
|
if(app.cid==6){ |
|
|
|
|
|
app.angleStyle = obj.attr('angle-style'); |
|
|
|
|
|
app.piRect= JSON.parse(obj.attr('pi-rect')); |
|
|
|
|
|
app.changePiRect(app.piRect); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
break ; |
|
|
break ; |
|
@ -879,6 +885,8 @@ function initSensorDashChart(){ |
|
|
app.pimax = current_edit_obj.attr("pimax",100) ; |
|
|
app.pimax = current_edit_obj.attr("pimax",100) ; |
|
|
current_edit_obj.attr("picompany",'') ; |
|
|
current_edit_obj.attr("picompany",'') ; |
|
|
current_edit_obj.attr('splitnumber',10) ; |
|
|
current_edit_obj.attr('splitnumber',10) ; |
|
|
|
|
|
current_edit_obj.attr("pimin",0) ; |
|
|
|
|
|
current_edit_obj.attr('splitnumber',10) ; |
|
|
} |
|
|
} |
|
|
//初始化压力表
|
|
|
//初始化压力表
|
|
|
function initSensorPiezometerchart(){ |
|
|
function initSensorPiezometerchart(){ |
|
@ -890,19 +898,14 @@ function initSensorPiezometerchart(){ |
|
|
name: 'hour', |
|
|
name: 'hour', |
|
|
type: 'gauge', |
|
|
type: 'gauge', |
|
|
radius : "100%", |
|
|
radius : "100%", |
|
|
startAngle: 90, |
|
|
startAngle: -90, |
|
|
endAngle: -270, |
|
|
endAngle: 270, |
|
|
min: 0, |
|
|
min: 0, |
|
|
max: 100, |
|
|
max: 100, |
|
|
splitNumber: 10, |
|
|
splitNumber: 10, |
|
|
clockwise: true, |
|
|
clockwise: true, |
|
|
axisLine: { |
|
|
axisLine: { |
|
|
lineStyle: { |
|
|
show:false |
|
|
width: 15, |
|
|
|
|
|
color: [[1, 'rgba(0,0,0,0.7)']], |
|
|
|
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)', |
|
|
|
|
|
shadowBlur: 3 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
splitLine: { |
|
|
splitLine: { |
|
|
lineStyle: { |
|
|
lineStyle: { |
|
@ -914,13 +917,8 @@ function initSensorPiezometerchart(){ |
|
|
}, |
|
|
}, |
|
|
axisLabel: { |
|
|
axisLabel: { |
|
|
fontSize: 24, |
|
|
fontSize: 24, |
|
|
distance: 25, |
|
|
distance: 12, |
|
|
formatter: function (value) { |
|
|
formatter: '{value}' |
|
|
if (value === 0) { |
|
|
|
|
|
return ''; |
|
|
|
|
|
} |
|
|
|
|
|
return value + ''; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
pointer: { |
|
|
pointer: { |
|
|
show:true, |
|
|
show:true, |
|
@ -945,10 +943,35 @@ function initSensorPiezometerchart(){ |
|
|
}, |
|
|
}, |
|
|
data: [ |
|
|
data: [ |
|
|
{ |
|
|
{ |
|
|
|
|
|
name:"MPa", |
|
|
value: 0 |
|
|
value: 0 |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: 'background', |
|
|
|
|
|
type: 'gauge', |
|
|
|
|
|
radius : "100%", |
|
|
|
|
|
startAngle: 90, |
|
|
|
|
|
endAngle: -270, |
|
|
|
|
|
axisLine: { |
|
|
|
|
|
lineStyle: { |
|
|
|
|
|
width: 5, |
|
|
|
|
|
color: [[1, 'rgba(0,0,0,0.7)']], |
|
|
|
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)', |
|
|
|
|
|
shadowBlur: 3 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
splitLine:{ |
|
|
|
|
|
show:false |
|
|
|
|
|
}, |
|
|
|
|
|
axisTick:{ |
|
|
|
|
|
show:false |
|
|
|
|
|
}, |
|
|
|
|
|
axisLabel:{ |
|
|
|
|
|
show:false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
] |
|
|
] |
|
|
} ; |
|
|
} ; |
|
|
chart.setOption(option,true); |
|
|
chart.setOption(option,true); |
|
@ -956,6 +979,9 @@ function initSensorPiezometerchart(){ |
|
|
current_edit_obj.attr("pimax",100) ; |
|
|
current_edit_obj.attr("pimax",100) ; |
|
|
current_edit_obj.attr("picompany",'') ; |
|
|
current_edit_obj.attr("picompany",'') ; |
|
|
current_edit_obj.attr('splitnumber',10) ; |
|
|
current_edit_obj.attr('splitnumber',10) ; |
|
|
|
|
|
current_edit_obj.attr("pimin",0) ; |
|
|
|
|
|
current_edit_obj.attr("angle-style","style1") ; |
|
|
|
|
|
current_edit_obj.attr("pi-rect",'[-90,270]'); |
|
|
} |
|
|
} |
|
|
//初始化传感器液位图
|
|
|
//初始化传感器液位图
|
|
|
function initSensorLiquidChart(){ |
|
|
function initSensorLiquidChart(){ |
|
@ -978,6 +1004,7 @@ function initSensorLiquidChart(){ |
|
|
name:'传感器', |
|
|
name:'传感器', |
|
|
value:bai |
|
|
value:bai |
|
|
}], |
|
|
}], |
|
|
|
|
|
radius: '98%', |
|
|
direction:'right',//波浪方向或者静止
|
|
|
direction:'right',//波浪方向或者静止
|
|
|
shape:'container', |
|
|
shape:'container', |
|
|
//color:['rgba(43, 110, 204, 0.7)'],//水球颜色
|
|
|
//color:['rgba(43, 110, 204, 0.7)'],//水球颜色
|
|
@ -1061,7 +1088,7 @@ function disableLiquidFillAnimation(nodeId){ |
|
|
} |
|
|
} |
|
|
var optionByNid5cid=new Map(); |
|
|
var optionByNid5cid=new Map(); |
|
|
// 更新Charts属性
|
|
|
// 更新Charts属性
|
|
|
function updateChartsOption(propertyName,value,funcname,func){ |
|
|
function updateChartsOptions(modiflyMap){ |
|
|
// 当前地图容器
|
|
|
// 当前地图容器
|
|
|
var current_edit_obj = cfg.current_edit_obj; |
|
|
var current_edit_obj = cfg.current_edit_obj; |
|
|
// let max=current_edit_obj.attr("max");
|
|
|
// let max=current_edit_obj.attr("max");
|
|
@ -1073,8 +1100,14 @@ function updateChartsOption(propertyName,value,funcname,func){ |
|
|
const option=JSON.parse(optionStr); |
|
|
const option=JSON.parse(optionStr); |
|
|
// 获取地图
|
|
|
// 获取地图
|
|
|
var chart = getEchartObj(); |
|
|
var chart = getEchartObj(); |
|
|
if(propertyName){ |
|
|
|
|
|
analysisProp(option,propertyName,value); |
|
|
if(modiflyMap.size>0){ |
|
|
|
|
|
modiflyMap.forEach( |
|
|
|
|
|
(value,key,map)=>{ |
|
|
|
|
|
analysisProp(option,key,value); |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 写入属性
|
|
|
// 写入属性
|
|
@ -1088,6 +1121,10 @@ function analysisProp(option,propName,value){ |
|
|
const pLen=propertys.length; |
|
|
const pLen=propertys.length; |
|
|
let data=option.series[0]; |
|
|
let data=option.series[0]; |
|
|
let finally_obj=null; |
|
|
let finally_obj=null; |
|
|
|
|
|
if(propertys.length==1){ |
|
|
|
|
|
data[propName]=value; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
for (let i=0;i<pLen;i++){ |
|
|
for (let i=0;i<pLen;i++){ |
|
|
const propertyName=propertys[i]; |
|
|
const propertyName=propertys[i]; |
|
|
if(i==pLen-1){ |
|
|
if(i==pLen-1){ |
|
|