diff --git a/lpro/src/main/webapp/page/visual/index.html b/lpro/src/main/webapp/page/visual/index.html index c143fb4..5e15888 100644 --- a/lpro/src/main/webapp/page/visual/index.html +++ b/lpro/src/main/webapp/page/visual/index.html @@ -12,34 +12,34 @@ - + - + - + - + - - + + - + - + - + - + - + - +
-
文本
+
文本
- +
@@ -114,11 +114,11 @@
-
双击编辑文本
+
双击编辑文本
- +
@@ -134,7 +134,7 @@
- +
@@ -150,7 +150,7 @@
- +
@@ -165,11 +165,11 @@
-
0.00
+
0.00
- +
@@ -185,7 +185,7 @@
- +
@@ -197,7 +197,7 @@
-
状态值
+
状态值
@@ -212,10 +212,10 @@
-
+
+
@@ -231,7 +231,7 @@
-
+
@@ -248,11 +248,11 @@
-
+
- +
@@ -263,14 +263,14 @@
-
- +
@@ -281,14 +281,14 @@
-
- +
@@ -306,7 +306,7 @@
- +
@@ -322,7 +322,7 @@
- +
@@ -339,8 +339,8 @@
- - + +
@@ -352,11 +352,11 @@
-
+
- +
@@ -368,7 +368,7 @@
-
+
@@ -424,7 +424,7 @@
- +
@@ -437,7 +437,7 @@
- +
@@ -582,9 +582,9 @@
- + - +
@@ -601,7 +601,7 @@
- +
@@ -614,7 +614,7 @@
- +
@@ -631,7 +631,7 @@
- +
@@ -650,7 +650,7 @@
- +
@@ -662,17 +662,17 @@
-
+
- +
- +
@@ -687,15 +687,15 @@
-
+
-
-
+ + @@ -706,7 +706,7 @@
-
+
@@ -733,31 +733,31 @@
辅助线
-
+
画布宽
-
+
画布高
-
+
画布颜色
-
+
背景颜色
-
+
画布背景图片
@@ -765,19 +765,19 @@
-
+
- +
修改文本
-
+
文本设置
@@ -847,7 +847,7 @@
- +
文本样式
@@ -858,7 +858,7 @@
- +
@@ -866,24 +866,24 @@
-
+
背景颜色
-
+
旋转
-
+
-
+
-
+
-
+
@@ -911,7 +911,7 @@ - +
位置
@@ -920,15 +920,15 @@ -
+ - +
图片显示
-
+

@@ -999,35 +999,34 @@ @change="changePiRect" > -
开始角度: - +
结束角度: - +
- +
仪表盘刻度最大值
- +
仪表盘刻度最小值
- +
仪表盘刻度分段数
- +
@@ -1067,16 +1066,16 @@ -
- +
+
事件绑定
- -
+ +
@@ -1088,14 +1087,14 @@
- +
功能设置
- -
+ +
@@ -1105,8 +1104,8 @@
- -
+ +
@@ -1114,8 +1113,8 @@
- -
+ +
@@ -1130,12 +1129,12 @@
- - - -
+ + + +
@@ -1143,14 +1142,14 @@
- +
数据源
- -
+ +
@@ -1163,13 +1162,13 @@
-
+
- -
+ +
-
-
+
- +
复制
@@ -1238,17 +1237,17 @@
下移一层
置于顶层
置于底层
-
删除
+
删除
- + - +
@@ -1289,7 +1288,7 @@ 确 定 - +
@@ -1298,19 +1297,19 @@
- + - + 取 消 确 定
- +
@@ -1341,14 +1340,14 @@
- + 取 消 新增 确 定
- + diff --git a/lpro/src/main/webapp/page/visual/js/cfg.js b/lpro/src/main/webapp/page/visual/js/cfg.js index 0ef2304..92026db 100644 --- a/lpro/src/main/webapp/page/visual/js/cfg.js +++ b/lpro/src/main/webapp/page/visual/js/cfg.js @@ -917,8 +917,13 @@ function initSensorPiezometerchart(){ }, axisLabel: { fontSize: 24, - distance: 12, - formatter: '{value}' + distance: 24, + formatter: function (value){ + if(value==0){ + return ; + } + return value; + } }, pointer: { show:true, @@ -1098,6 +1103,31 @@ function updateChartsOptions(modiflyMap){ // 获取数据属性 const optionStr= optionNode.getAttribute("option"); const option=JSON.parse(optionStr); + const rect=JSON.parse(current_edit_obj.attr("pi-rect")); + const max_m= Math.max(...rect); + const min_m= Math.min(...rect); + let isCircle=null; + if(max_m<0){ + isCircle=false; + }else if(min_m>0){ + isCircle=false; + }else{ + isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360; + } + const pimin=Number(current_edit_obj.attr('pimin')); + if(isCircle){ + option.series[0].axisLabel.formatter=function (value){ + if(value==pimin){ + return ; + } + return Number(value).toFixed(0); + }; + }else { + option.series[0].axisLabel.formatter = function (value) { + return Number(value).toFixed(0); + }; + } + // 获取地图 var chart = getEchartObj(); @@ -1559,14 +1589,29 @@ function reinitChartObj(){ var json = $(this).attr("option"); var option=JSON.parse(json); if(nid=='5'&&cid=='6'){ - var picompany=parentEl.attr('picompany'); - if(picompany){ + const rect=JSON.parse(parentEl.attr("pi-rect")); + const max_m= Math.max(...rect); + const min_m= Math.min(...rect); + let isCircle=null; + if(max_m<0){ + isCircle=false; + }else if(min_m>0){ + isCircle=false; + }else{ + isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360; + } + const pimin=Number(parentEl.attr('pimin')); + if(isCircle){ option.series[0].axisLabel.formatter=function (value){ - if (value === 0) { - return ''; + if(value==pimin){ + return ; } - return value + picompany; - } + return Number(value).toFixed(0); + }; + }else { + option.series[0].axisLabel.formatter = function (value) { + return Number(value).toFixed(0); + }; } } var myChart = echarts.init($(this)[0]); diff --git a/lpro/src/main/webapp/page/visual/js/show.js b/lpro/src/main/webapp/page/visual/js/show.js index 381ba61..2c7eba0 100644 --- a/lpro/src/main/webapp/page/visual/js/show.js +++ b/lpro/src/main/webapp/page/visual/js/show.js @@ -339,16 +339,32 @@ function reinitChartObj(){ }else if(cid == '6'&& nid =='5'){ // 液压图 var json = $(this).attr("option"); - var piCompany = $(this).parent().attr("picompany"); + var parentEl = $(this).parent(); var myChart = echarts.init($(this)[0]); var option = JSON.parse(json) ; - if(piCompany!=null){ + const rect=JSON.parse(parentEl.attr("pi-rect")); + const max_m= Math.max(...rect); + const min_m= Math.min(...rect); + let isCircle=null; + if(max_m<0){ + isCircle=false; + }else if(min_m>0){ + isCircle=false; + }else{ + isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360; + } + const pimin=Number(parentEl.attr('pimin')); + if(isCircle){ option.series[0].axisLabel.formatter=function (value){ - if (value === 0) { - return ''; + if(value==pimin){ + return ; } - return value + piCompany; - } + return Number(value).toFixed(0); + }; + }else { + option.series[0].axisLabel.formatter = function (value) { + return Number(value).toFixed(0); + }; } myChart.setOption(option); app.chartMap[id] = myChart;