fix:监测数据测点展示nickname,坐标轴从小到大
This commit is contained in:
parent
34b2d4b4f0
commit
8c885e4cfc
|
@ -9,7 +9,7 @@
|
|||
>
|
||||
<div id="tableWap" style="height: 100%;">
|
||||
<el-tabs v-model="activeName" @tab-change="handleClick">
|
||||
<el-tab-pane v-for="item in mpointList" :label="item.name" :name="item.name" :key="item.id" lazy>
|
||||
<el-tab-pane v-for="item in mpointList" :label="item.nickname" :name="item.nickname" :key="item.id" lazy>
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
|
@ -103,7 +103,7 @@ export default {
|
|||
that.$API.enm.mpoint.list.req({ep_belong:that.equipmentId,page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.mpointList = res;
|
||||
that.activeName = res[0].name;
|
||||
that.activeName = res[0].nickname;
|
||||
that.params.mpoint = res[0].id;
|
||||
that.apiObj = that.$API.enm.mplogx;
|
||||
that.handleClick();
|
||||
|
@ -116,7 +116,7 @@ export default {
|
|||
console.log('handleClick',val)
|
||||
let that = this;
|
||||
that.mpointList.forEach(item=>{
|
||||
if(item.name == that.activeName){
|
||||
if(item.nickname == that.activeName){
|
||||
that.query.mpoint = item.id;
|
||||
that.query.page = 1;
|
||||
that.option.title.text = that.activeName;
|
||||
|
@ -129,9 +129,9 @@ export default {
|
|||
params.page = 0;
|
||||
that.$API.enm.mplogx.req(params).then((res) => {
|
||||
res.forEach(item=>{
|
||||
that.option.xAxis.data.push(item.timex);
|
||||
that.option.xAxis.data.unshift(item.timex);
|
||||
let value = Number(item.val_float).toFixed(3);
|
||||
that.option.series.data.push(value);
|
||||
that.option.series.data.unshift(value);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue