Browse Source

Merge remote-tracking branch 'origin/master'

master^2
lxc 2 years ago
parent
commit
a919d7c965
  1. 1
      lpro/src/main/webapp/lib/echarts/echarts-liquidfill.js.map
  2. 93867
      lpro/src/main/webapp/lib/echarts/echarts.js
  3. 93867
      lpro/src/main/webapp/lib/echarts/echarts.js.map
  4. 45
      lpro/src/main/webapp/lib/echarts/echarts.min.js
  5. 49
      lpro/src/main/webapp/page/visual/index.html
  6. 64
      lpro/src/main/webapp/page/visual/js/cfg.js
  7. 3
      lpro/src/main/webapp/page/visual/js/show.js
  8. 4
      lpro/src/main/webapp/page/visual/show.html

1
lpro/src/main/webapp/lib/echarts/echarts-liquidfill.js.map

File diff suppressed because one or more lines are too long

93867
lpro/src/main/webapp/lib/echarts/echarts.js

File diff suppressed because it is too large

93867
lpro/src/main/webapp/lib/echarts/echarts.js.map

File diff suppressed because it is too large

45
lpro/src/main/webapp/lib/echarts/echarts.min.js

File diff suppressed because one or more lines are too long

49
lpro/src/main/webapp/page/visual/index.html

@ -36,7 +36,7 @@
<!-- 视频播放 --> <!-- 视频播放 -->
<script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script> <script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script>
<script type="text/javascript" src="../../lib/webUploader/webuploader.min.js"></script> <script type="text/javascript" src="../../lib/webUploader/webuploader.min.js"></script>
<script type="text/javascript" src="../../lib/echarts/echarts.js"></script> <script type="text/javascript" src="../../lib/echarts/echarts.min.js"></script>
<script type="text/javascript" src="../../lib/echarts/echarts-liquidfill.js"></script> <script type="text/javascript" src="../../lib/echarts/echarts-liquidfill.js"></script>
<script type="text/javascript" src="js/cfg.js"></script> <script type="text/javascript" src="js/cfg.js"></script>
<link rel="stylesheet" href="css/cfg.css" /> <link rel="stylesheet" href="css/cfg.css" />
@ -938,14 +938,14 @@
</div> </div>
<!--@新增 isDisableAnimation属性对应元素--> <!--@新增 isDisableAnimation属性对应元素-->
<!-- 液位图属性 --> <!-- 液位图属性 -->
<div v-show="editType == 5 && cid == 4 "> <!-- <div v-show="editType == 5 && cid == 4 ">-->
<div style="padding: 10px;"> <!-- <div style="padding: 10px;">-->
<input v-model="isDisableAnimation" type="checkbox" @change="setLiquidFillAnimation"> <!-- <input v-model="isDisableAnimation" type="checkbox" @change="setLiquidFillAnimation">-->
<span style="padding-left: 10px;" class="tool-title "> <!-- <span style="padding-left: 10px;" class="tool-title ">-->
禁用动画 <!-- 禁用动画-->
</span> <!-- </span>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<!--@新增 shape属性对应元素--> <!--@新增 shape属性对应元素-->
<div v-show="editType == 5 && cid == 4 "> <div v-show="editType == 5 && cid == 4 ">
<div class="tool-title " style="padding: 10px;">容器形状</div> <div class="tool-title " style="padding: 10px;">容器形状</div>
@ -1030,16 +1030,16 @@
</div> </div>
</div> </div>
<!-- 仪表盘刻度单位 --> <!-- 仪表盘刻度单位 -->
<!-- <div v-show="editType == 5 && (cid == 5||cid==6) ">--> <div v-show="editType == 5 && (cid == 5||cid==6) ">
<!-- <div class="tool-title " style="padding: 10px;">刻度单位</div>--> <div class="tool-title " style="padding: 10px;">刻度单位</div>
<!-- <div style="padding-left: 10px;">--> <div style="padding-left: 10px;">
<!-- <input class="el-input__inner" v-model="piCompany" placeholder="刻度最大值" style="width:75%;" @blur="changePiCompany">--> <input class="el-input__inner" v-model="piCompany" placeholder="刻度最大值" style="width:75%;" @change="changePiCompany">
<!-- </div>--> </div>
<!-- </div>--> </div>
</div> </div>
<!-- 折线图,柱状图,饼状图切换 --> <!-- 折线图,柱状图,饼状图切换 -->
<div class="functionDetails" v-show="nid==5 && cid <= 4 "> <div class="functionDetails" v-show="nid==5 && cid < 4 ">
<span> <span>
图表设置 图表设置
</span> </span>
@ -1991,7 +1991,7 @@
var cl = cfg.current_edit_obj ; var cl = cfg.current_edit_obj ;
const maxM= Math.max(...value); const maxM= Math.max(...value);
const minM=Math.min(...value); const minM=Math.min(...value);
const radian=Math.abs(maxM)+Math.abs(minM); const radian=Math.abs(maxM-minM);
if(radian>360){ if(radian>360){
const rect=JSON.parse(cl.attr("pi-rect")); const rect=JSON.parse(cl.attr("pi-rect"));
if(value[0]==rect[0]){ if(value[0]==rect[0]){
@ -2048,21 +2048,8 @@
}, },
// 修改仪表盘刻度单位 // 修改仪表盘刻度单位
changePiCompany(){ changePiCompany(){
var formatter=null;
var cl = cfg.current_edit_obj ; var cl = cfg.current_edit_obj ;
var cid=cl.attr('cid'); updateChartsOptions(new Map([["data.0.name",this.piCompany]]));
if(cid=='5'){
formatter="{value}"+this.piCompany;
}else{
formatter= (value)=>{
if (value === 0) {
return '';
}
console.log(app);
return value + this.piCompany;
}
}
updateChartsOptions(new Map([["axisLabel.formatter",formatter]]));
cl.attr("picompany",this.piCompany); cl.attr("picompany",this.piCompany);
} }
}, },

64
lpro/src/main/webapp/page/visual/js/cfg.js

@ -944,14 +944,14 @@ function initSensorPiezometerchart(){
}, },
title: { title: {
offsetCenter: [0, '30%'], offsetCenter: [0, '30%'],
backgroundColor: '#FFFFFF' backgroundColor: '#FFFFFF',
}, },
data: [ data: [
{ {
name:"MPa", name:"MPa",
value: 0 value: 15
} }
] ],
}, },
{ {
name: 'background', name: 'background',
@ -982,7 +982,7 @@ function initSensorPiezometerchart(){
chart.setOption(option,true); chart.setOption(option,true);
current_edit_obj.children(".chartStyle").attr("option",JSON.stringify(option)); current_edit_obj.children(".chartStyle").attr("option",JSON.stringify(option));
current_edit_obj.attr("pimax",100) ; current_edit_obj.attr("pimax",100) ;
current_edit_obj.attr("picompany",'') ; current_edit_obj.attr("picompany",'MPa') ;
current_edit_obj.attr('splitnumber',10) ; current_edit_obj.attr('splitnumber',10) ;
current_edit_obj.attr("pimin",0) ; current_edit_obj.attr("pimin",0) ;
current_edit_obj.attr("angle-style","style1") ; current_edit_obj.attr("angle-style","style1") ;
@ -1046,7 +1046,7 @@ function initSensorLiquidChart(){
//使用刚指定的配置项和数据显示图表。 //使用刚指定的配置项和数据显示图表。
setChartOption(chart,option) ; setChartOption(chart,option) ;
const nodeId=current_edit_obj.attr("id"); // const nodeId=current_edit_obj.attr("id");
//@修订 定时任务抽象到方法中 //@修订 定时任务抽象到方法中
// setInterval(function() // setInterval(function()
// { // {
@ -1060,7 +1060,7 @@ function initSensorLiquidChart(){
// }] // }]
// }); // });
// },2000) // },2000)
ableLiquidFillAnimation(nodeId,chart); // ableLiquidFillAnimation(nodeId,chart);
} }
// 跟具节点id存放定时id // 跟具节点id存放定时id
@ -1103,31 +1103,35 @@ function updateChartsOptions(modiflyMap){
// 获取数据属性 // 获取数据属性
const optionStr= optionNode.getAttribute("option"); const optionStr= optionNode.getAttribute("option");
const option=JSON.parse(optionStr); const option=JSON.parse(optionStr);
const rect=JSON.parse(current_edit_obj.attr("pi-rect")); const nid=current_edit_obj.attr("nid");
const max_m= Math.max(...rect); const cid=current_edit_obj.attr("cid");
const min_m= Math.min(...rect); if(nid=="5"&&cid=="6"){
let isCircle=null; const rectAttr=current_edit_obj.attr("pi-rect");
if(max_m<0){ const rect=JSON.parse(rectAttr);
isCircle=false; const max_m= Math.max(...rect);
}else if(min_m>0){ const min_m= Math.min(...rect);
isCircle=false; let isCircle=null;
}else{ if(max_m<0){
isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360; isCircle=false;
} }else if(min_m>0){
const pimin=Number(current_edit_obj.attr('pimin')); isCircle=false;
if(isCircle){ }else{
option.series[0].axisLabel.formatter=function (value){ isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360;
if(value==pimin){ }
return ; const pimin=Number(current_edit_obj.attr('pimin'));
} if(isCircle){
return Number(value).toFixed(0); option.series[0].axisLabel.formatter=function (value){
}; if(value==pimin){
}else { return ;
option.series[0].axisLabel.formatter = function (value) { }
return Number(value).toFixed(0); return Number(value).toFixed(0);
}; };
}else {
option.series[0].axisLabel.formatter = function (value) {
return Number(value).toFixed(0);
};
}
} }
// 获取地图 // 获取地图
var chart = getEchartObj(); var chart = getEchartObj();

3
lpro/src/main/webapp/page/visual/js/show.js

@ -401,9 +401,10 @@ function refleshSensorList(){
// 仪表盘 // 仪表盘
getAjax(baseurl+'/service/sensor?id='+sensor_id,function(res){ getAjax(baseurl+'/service/sensor?id='+sensor_id,function(res){
if( isOK(res) ){ if( isOK(res) ){
var picompany =$(that).parent().attr("picompany") ;
app.chartMap[id].setOption({ app.chartMap[id].setOption({
series: [{ series: [{
data: [{value:cid==6?"MPa":res.data.sdata , name:res.data.name }] data: [{value:res.data.sdata , name:picompany }]
}] }]
}); });
} }

4
lpro/src/main/webapp/page/visual/show.html

@ -19,11 +19,11 @@
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=q5uqiBY29eEu0wNIAPoCXwq1HvUmDzqP"></script> <script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=q5uqiBY29eEu0wNIAPoCXwq1HvUmDzqP"></script>
<!-- 视频播放 --> <!-- 视频播放 -->
<script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script> <script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script>
<script type="text/javascript" src="../../lib/echarts/echarts.js"></script> <script type="text/javascript" src="../../lib/echarts/echarts.min.js"></script>
<script type="text/javascript" src="../../lib/echarts/echarts-liquidfill.js"></script> <script type="text/javascript" src="../../lib/echarts/echarts-liquidfill.js"></script>
<script type="text/javascript" src="../../lib/mqtt/mqtt.min.js"></script> <script type="text/javascript" src="../../lib/mqtt/mqtt.min.js"></script>
<script type="text/javascript" src="js/show.js"></script> <script type="text/javascript" src="js/show.js"></script>
<link rel="stylesheet" href="css/show.css" /> <link rel="stylesheet" href="css/show.css" />
</head> </head>
<body> <body>

Loading…
Cancel
Save