| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <div style="margin-bottom:10px;"> |
| | | <span>{{currentNode?currentNode.label:''}}测点参数列表</span> |
| | | <span>{{ currentNode ? currentNode.label : "" }}测点参数列表</span> |
| | | </div> |
| | | <el-table |
| | | :data="parameterTableData" |
| | | border |
| | | style="width: 100%" |
| | | @cell-click="openDialog"> |
| | | <el-table-column |
| | | prop="code" |
| | | label="指标编码" |
| | | width="180" |
| | | align="center"> |
| | | @cell-click="openDialog" |
| | | > |
| | | <el-table-column prop="code" label="指标编码" width="180" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="indexName" |
| | | label="指标名称" |
| | | align="center"> |
| | | <el-table-column prop="indexName" label="指标名称" align="center"> |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline;cursor:pointer">{{scope.row.indexName}}</div> |
| | | <div style="color:blue;text-decoration:underline;cursor:pointer"> |
| | | {{ scope.row.indexName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="indexUnit" |
| | | label="指标单位" |
| | | align="center" |
| | | :formatter="unitFormat"> |
| | | :formatter="unitFormat" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="value" |
| | | label="指标值(实时值)" |
| | | align="center"> |
| | | <el-table-column prop="value" label="指标值(实时值)" align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!--曲线图与表格--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false" @close="closeDialog"> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | @close="closeDialog" |
| | | > |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick" > |
| | | <el-tab-pane label="实时数据曲线图" name="first"> |
| | | <live-alarm-view ref="liveAlarmView" :code="code" :activeName="activeName"></live-alarm-view> |
| | | <live-alarm-view |
| | | ref="liveAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | ></live-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="历史数据曲线图" name="second"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName"></history-alarm-view> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | ></history-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="历史数据查询" name="third"> |
| | | <history-alarm-table ref="historyAlarmTable" :code="code" :indexName="indexName" :activeName="activeName" :indexUnit="indexUnit"></history-alarm-table> |
| | | <history-alarm-table |
| | | ref="historyAlarmTable" |
| | | :code="code" |
| | | :indexName="indexName" |
| | | :activeName="activeName" |
| | | :indexUnit="indexUnit" |
| | | ></history-alarm-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-row> |
| | |
| | | queryParams:{ |
| | | nodeId:undefined, |
| | | //指标index |
| | | indexType:"COLLECT", |
| | | indexType: "COLLECT" |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getDicts("sys_unit").then(response => { |
| | | this.unitOptions = response.data; |
| | | }); |
| | | }, |
| | | mounted() |
| | | { |
| | | this.getConfigKey("equipmentMonitor.realTimeMonitoring.intervalTime").then(response => { |
| | | mounted() { |
| | | this.getConfigKey("equipmentMonitor.realTimeMonitoring.intervalTime").then( |
| | | response => { |
| | | this.intervalTime = response.msg; |
| | | this.timer = setInterval(this.getList, this.intervalTime); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | beforeDestroy() { |
| | | //页面销毁时 要停止计时器,否则选项卡切换计时器不停止,会越来越快,多个线程 |
| | |
| | | }, |
| | | handleClick(tab, event){ |
| | | this.activeName = tab.name; |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |