深基坑(监测):添加预警线
This commit is contained in:
parent
a73a91a73b
commit
ae210f8a7a
@ -686,6 +686,8 @@ export default {
|
|||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
unit:'mm',//单位
|
unit:'mm',//单位
|
||||||
|
max:'',
|
||||||
|
min:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -716,6 +718,9 @@ export default {
|
|||||||
pageNo:this.pageNo1,
|
pageNo:this.pageNo1,
|
||||||
pageSize:this.pageSize1,
|
pageSize:this.pageSize1,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.max = res.result.alarmValue;
|
||||||
|
this.min = res.result.alarmValue * ('-1');
|
||||||
|
console.log('默认第一次进来的报警值',this.max,this.min)
|
||||||
this.unit = res.result.unit;
|
this.unit = res.result.unit;
|
||||||
console.log("默认第一次进来的时候单位", this.unit)
|
console.log("默认第一次进来的时候单位", this.unit)
|
||||||
if (res.code == 200 && res.result) {
|
if (res.code == 200 && res.result) {
|
||||||
@ -1576,7 +1581,7 @@ export default {
|
|||||||
grid: {
|
grid: {
|
||||||
top: "30px",
|
top: "30px",
|
||||||
left: "60px",
|
left: "60px",
|
||||||
right: "35px",
|
right: "65px",
|
||||||
bottom: "50px"
|
bottom: "50px"
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
@ -1598,18 +1603,20 @@ export default {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: "value",
|
||||||
max:function(obj){//解决因数据值范围相差太大或是太小曲线显示不美观问题
|
// max:this.max + 1,
|
||||||
var ma=obj.max;
|
min:this.min -1,
|
||||||
var mi=obj.min;
|
// max:function(obj){//解决因数据值范围相差太大或是太小曲线显示不美观问题
|
||||||
var val=Math.ceil((ma+(ma-mi)/2))
|
// var ma=obj.max;
|
||||||
return val
|
// var mi=obj.min;
|
||||||
},
|
// var val=Math.ceil((ma+(ma-mi)/2))
|
||||||
min:function(obj){
|
// return val
|
||||||
var ma=obj.max;
|
// },
|
||||||
var mi=obj.min;
|
// min:function(obj){
|
||||||
var val=Math.ceil((mi-(ma-mi)/2))
|
// var ma=obj.max;
|
||||||
return mi==0?0:val
|
// var mi=obj.min;
|
||||||
},
|
// var val=Math.ceil((mi-(ma-mi)/2))
|
||||||
|
// return mi==0?0:val
|
||||||
|
// },
|
||||||
name:`单位/${ this.unit }`,
|
name:`单位/${ this.unit }`,
|
||||||
boundaryGap: [0, '100%'],
|
boundaryGap: [0, '100%'],
|
||||||
splitLine: {
|
splitLine: {
|
||||||
@ -1694,7 +1701,7 @@ export default {
|
|||||||
position:"end",
|
position:"end",
|
||||||
},
|
},
|
||||||
data:[{
|
data:[{
|
||||||
silent:false,
|
silent:true,
|
||||||
// 警告线的样式
|
// 警告线的样式
|
||||||
lineStyle:{
|
lineStyle:{
|
||||||
type:"solid",
|
type:"solid",
|
||||||
@ -1702,9 +1709,22 @@ export default {
|
|||||||
},
|
},
|
||||||
label:{
|
label:{
|
||||||
position:'end',
|
position:'end',
|
||||||
formatter:'报警值(3)'
|
formatter:`报警值(${this.max})`
|
||||||
},
|
},
|
||||||
yAxis:3
|
yAxis:this.max
|
||||||
|
},
|
||||||
|
{
|
||||||
|
silent:true,
|
||||||
|
// 警告线的样式
|
||||||
|
lineStyle:{
|
||||||
|
type:"solid",
|
||||||
|
color:"#f76462",
|
||||||
|
},
|
||||||
|
label:{
|
||||||
|
position:'end',
|
||||||
|
formatter:`报警值(${this.min})`
|
||||||
|
},
|
||||||
|
yAxis:this.min
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
// markLine:{
|
// markLine:{
|
||||||
@ -1874,7 +1894,9 @@ export default {
|
|||||||
pageSize:this.pageSize1,
|
pageSize:this.pageSize1,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.unit = res.result.unit
|
this.unit = res.result.unit
|
||||||
// console.log('第二个选择时的单位',this.unit)
|
this.max = res.result.alarmValue;
|
||||||
|
this.min = res.result.alarmValue * ('-1');
|
||||||
|
console.log('第二个选择时的单位',this.unit)
|
||||||
if (res.code == 200 && res.result) {
|
if (res.code == 200 && res.result) {
|
||||||
this.total1 = res.result.data.total
|
this.total1 = res.result.data.total
|
||||||
this.tableData2 = res.result.data.records;
|
this.tableData2 = res.result.data.records;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user