深基坑(实时数据):echartsy轴变化 以及单位处理

This commit is contained in:
骆乐 2022-10-10 11:37:51 +08:00
parent 5f514a330b
commit ca076b2f81
2 changed files with 46 additions and 23 deletions

View File

@ -40,7 +40,6 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
// tag: 本地
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1
axios.defaults.baseURL = 'http://192.168.34.216:6023/' // 邱平毅本地
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1

View File

@ -684,8 +684,8 @@ export default {
echartData7: {
xAxis: [],
data: [],
unit: 'mm'
}
},
unit:'mm',//
};
},
created() {
@ -716,8 +716,8 @@ export default {
pageNo:this.pageNo1,
pageSize:this.pageSize1,
}).then(res => {
this.echartData7.unit = res.result.unit;
console.log("默认第一次进来的时候单位", res.result)
this.unit = res.result.unit;
console.log("默认第一次进来的时候单位", this.unit)
if (res.code == 200 && res.result) {
this.total1 = res.result.data.total
this.tableData2 = res.result.data.records;
@ -1598,8 +1598,19 @@ export default {
},
yAxis: {
type: "value",
// name:'/mm',
name:`${'单位/'} ${this.echartData7.unit }`,
max:function(obj){//线
var ma=obj.max;
var mi=obj.min;
var val=Math.ceil((ma+(ma-mi)/2))
return val
},
min:function(obj){
var ma=obj.max;
var mi=obj.min;
var val=Math.ceil((mi-(ma-mi)/2))
return mi==0?0:val
},
name:`单位/${ this.unit }`,
boundaryGap: [0, '100%'],
splitLine: {
lineStyle: {
@ -1619,16 +1630,28 @@ export default {
},
dataZoom:[
{
type: 'inside',
start: 0,
end: 20
type: 'inside', //
orient: 'vertical',
},
{
start: 0,
end: 20,
top:"90%",
}
// {
// type: 'inside',
// }
],
// dataZoom: [
// // {
// // type: 'inside',
// // start: 0,
// // end: 20
// // },
// // {
// // start: 0,
// // end: 20,
// // top:"90%",
// // }
// // {
// // orient: 'vertical',
// // }
// ],
axisPointer: {
lineStyle: {
color: "#F4F5F8",
@ -1721,6 +1744,7 @@ export default {
return timer;
},
showDetail(val) {
console.log('unit',this.unit)
// console.log('',val)
this.dateTime = []
this.pageSize1= 10,
@ -1728,11 +1752,11 @@ export default {
this.visibleDialog = true;
this.relaId = val.id;
this.selectDeepExcavationAllMeasurePointList(); //
// this.$nextTick(() => {
// // this.createdEchart5()
// // this.createdEchart6()
// this.createdEchart7();
// });
this.$nextTick(() => {
// this.createdEchart5()
// this.createdEchart6()
this.createdEchart7();
});
},
checkDate(val) {
this.searchDate = val;
@ -1830,8 +1854,8 @@ export default {
pageNo:this.pageNo1,
pageSize:this.pageSize1,
}).then(res => {
this.echartData7.unit = res.result.unit
console.log('第二个选择时的单位',res.result)
this.unit = res.result.unit
// console.log('',this.unit)
if (res.code == 200 && res.result) {
this.total1 = res.result.data.total
this.tableData2 = res.result.data.records;