diff --git a/src/assets/js/http.js b/src/assets/js/http.js index e39128ae..0c074036 100644 --- a/src/assets/js/http.js +++ b/src/assets/js/http.js @@ -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 diff --git a/src/views/projectFront/deepFoundationPitManage/monitorData.vue b/src/views/projectFront/deepFoundationPitManage/monitorData.vue index a8591386..28a96f85 100644 --- a/src/views/projectFront/deepFoundationPitManage/monitorData.vue +++ b/src/views/projectFront/deepFoundationPitManage/monitorData.vue @@ -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: { @@ -1617,18 +1628,30 @@ export default { color: "#7F8694" } }, - dataZoom: [ + 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;