|
@@ -7,153 +7,209 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="right">
|
|
|
- <el-input v-model="conditions.goafDevName" class="search-input m-right-15" placeholder="请输入设备名称">
|
|
|
+ <el-input v-model="conditions.goafSensorName" class="search-input m-right-15" placeholder="请输入设备名称">
|
|
|
<el-button slot="append" icon="el-icon-search" @click="getData()" />
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+ <div class="tablefilter-wrap">
|
|
|
+ <el-dropdown :hide-on-click="false">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 过滤器<i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-checkbox-group v-model="tablefilter" class="tablefilter-column">
|
|
|
+ <el-checkbox v-for=" item in tablefilters" :key="item.value" :label="item.value">{{ item.name }}</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
<el-row class="m-top-15">
|
|
|
<el-table v-loading="listLoading" class="page-table" border fit :data="dataList">
|
|
|
<el-table-column header-align="center" type="index" label="序号" align="center" width="60" />
|
|
|
- <el-table-column header-align="center" align="center" prop="goafSensorName" label="设备名称" />
|
|
|
- <el-table-column header-align="center" align="center" label="振动烈度(mm/s)">
|
|
|
+ <el-table-column header-align="center" align="center" prop="goafDevName" label="待测设备名称" />
|
|
|
+ <el-table-column header-align="center" align="center" prop="goafDevTypename" label="待测设备类型" />
|
|
|
+ <el-table-column header-align="center" align="center" prop="goafSensorName" label="传感器名称" />
|
|
|
+ <el-table-column v-if="showColumn('goafSensorAlarmType')" header-align="center" align="center" prop="goafSensorAlarmType" label="告警类型" />
|
|
|
+ <el-table-column v-if="showColumn('goafSensorAlarmLevel')" header-align="center" align="center" prop="goafSensorAlarmLevel" label="告警级别">
|
|
|
+ <template v-slot="{row}">
|
|
|
+ <span>{{ row.goafSensorAlarmLevel|filtersLevel }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="showColumn('frequency')" header-align="center" align="center" label="频率(HZ)">
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="水平方向"
|
|
|
- width="95"
|
|
|
+ label="X轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ parseFloat((row.FAlarmVelX/100).toFixed(2)) }}</span>
|
|
|
+ <span>{{ parseFloat((row.frequencyX/10).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="垂直方向"
|
|
|
- width="95"
|
|
|
+ label="Y轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ parseFloat((row.FAlarmVelY/100).toFixed(2)) }}</span>
|
|
|
+ <span>{{ parseFloat((row.frequencyY/10).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="轴向"
|
|
|
- width="95"
|
|
|
+ label="Z轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ parseFloat((row.FAlarmVelZ/100).toFixed(2)) }}</span>
|
|
|
+ <span>{{ parseFloat((row.frequencyZ/10).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column header-align="center" label="加速度(m/s2)">
|
|
|
+ <el-table-column v-if="showColumn('vel')" header-align="center" align="center" label="速度(mm/s)">
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="水平方向"
|
|
|
- width="95"
|
|
|
+ label="X轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ row.FAlarmAccX }}</span>
|
|
|
+ <span>{{ parseFloat((row.velX/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="垂直方向"
|
|
|
- width="95"
|
|
|
+ label="Y轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ row.FAlarmAccY }}</span>
|
|
|
+ <span>{{ parseFloat((row.velY/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="轴向"
|
|
|
- width="95"
|
|
|
+ label="Z轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ row.FAlarmAccZ }}</span>
|
|
|
+ <span>{{ parseFloat((row.velZ/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column header-align="center" label="位移(um)">
|
|
|
+ <el-table-column v-if="showColumn('acc')" header-align="center" label="加速度(m/s2)">
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="水平方向"
|
|
|
- width="95"
|
|
|
+ label="X轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ row.FAlarmDisX }}</span>
|
|
|
+ <span>{{ parseFloat((row.accX/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="垂直方向"
|
|
|
- width="95"
|
|
|
+ label="Y轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ row.FAlarmDisY }}</span>
|
|
|
+ <span>{{ parseFloat((row.accY/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="轴向"
|
|
|
- width="95"
|
|
|
+ label="Z轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ row.FAlarmDisZ }}</span>
|
|
|
+ <span>{{ parseFloat((row.accZ/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column header-align="center" align="center" label="振动烈度(mm/s)">
|
|
|
+ <el-table-column v-if="showColumn('dis')" header-align="center" label="位移(um)">
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="水平方向"
|
|
|
- width="95"
|
|
|
+ label="X轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ parseFloat((row.frequencyX/10).toFixed(2)) }}</span>
|
|
|
+ <span>{{ row.disX }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="垂直方向"
|
|
|
- width="95"
|
|
|
+ label="Y轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ parseFloat((row.frequencyY/10).toFixed(2)) }}</span>
|
|
|
+ <span>{{ row.disY }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
- label="轴向"
|
|
|
- width="95"
|
|
|
+ label="Z轴"
|
|
|
+ width="80"
|
|
|
>
|
|
|
<template v-slot="{row}">
|
|
|
- <span>{{ parseFloat((row.frequencyZ/10).toFixed(2)) }}</span>
|
|
|
+ <span>{{ row.disZ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="showColumn('ang')" header-align="center" align="center" label="倾角(°)">
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ prop="name"
|
|
|
+ label="X轴"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ <template v-slot="{row}">
|
|
|
+ <span>{{ parseFloat((row.angX/100).toFixed(2)) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ prop="name"
|
|
|
+ label="Y轴"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ <template v-slot="{row}">
|
|
|
+ <span>{{ parseFloat((row.angY/100).toFixed(2)) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ prop="name"
|
|
|
+ label="Z轴"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ <template v-slot="{row}">
|
|
|
+ <span>{{ parseFloat((row.angZ/100).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
@@ -162,12 +218,12 @@
|
|
|
<span>{{ parseFloat((row.sensorTemperature/10).toFixed(2)) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column header-align="center" align="center" prop="goafDatareportTime" label="上传时间" />
|
|
|
- <!-- <el-table-column label="操作" header-align="center" align="center" width="180">
|
|
|
+ <el-table-column v-if="showColumn('goafDatareportTime')" header-align="center" align="center" prop="goafDatareportTime" label="上传时间" />
|
|
|
+ <el-table-column label="操作" header-align="center" align="center" min-width="60">
|
|
|
<template v-slot="{row}">
|
|
|
- <el-button size="mini" type="text" style="color:#1B81FF" @click="showDetail(row)">详情</el-button>
|
|
|
+ <el-button size="mini" type="text" style="color:#1B81FF" @click="showDetail(row)">波形</el-button>
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination-container" style="float:right;margin-right:40px;">
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
|
|
@@ -178,22 +234,40 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getSensorDataByPage } from '@/api/goaf/sensor'
|
|
|
+import { getWavedata } from '@/api/goaf/sensor'
|
|
|
+import { getAlarmByPage } from '@/api/goaf/alarm'
|
|
|
import { Pagination } from '@/components'
|
|
|
import { NumConvertLM } from '@/utils'
|
|
|
import MonitorChartDetail from './components/MonitorChartDetail'
|
|
|
|
|
|
export default {
|
|
|
components: { Pagination, MonitorChartDetail },
|
|
|
+ filters: {
|
|
|
+ filtersLevel(val) {
|
|
|
+ const obj = { 0: '一般', 1: '重大' }
|
|
|
+ return obj[val] || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
dataList: [],
|
|
|
total: 0,
|
|
|
+ tablefilters: [
|
|
|
+ { name: '告警类型', value: 'goafSensorAlarmType' },
|
|
|
+ { name: '告警级别', value: 'goafSensorAlarmLevel' },
|
|
|
+ { name: '频率', value: 'frequency' },
|
|
|
+ { name: '速度', value: 'vel' },
|
|
|
+ { name: '加速度', value: 'acc' },
|
|
|
+ { name: '倾角', value: 'ang' },
|
|
|
+ { name: '位移', value: 'dis' },
|
|
|
+ { name: '上传时间', value: 'goafDatareportTime' }
|
|
|
+ ],
|
|
|
+ tablefilter: ['frequency', 'vel', 'acc', 'ang', 'dis', 'goafDatareportTime', 'goafSensorAlarmType', 'goafSensorAlarmLevel'],
|
|
|
listLoading: false,
|
|
|
conditions: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
- goafDevName: ''
|
|
|
+ goafSensorName: ''
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -203,9 +277,12 @@ export default {
|
|
|
methods: {
|
|
|
// fetch data
|
|
|
NumConvertLM,
|
|
|
+ showColumn(name) {
|
|
|
+ return this.tablefilter.includes(name)
|
|
|
+ },
|
|
|
getData() {
|
|
|
this.listLoading = true
|
|
|
- getSensorDataByPage(this.conditions).then((resp) => {
|
|
|
+ getAlarmByPage(this.conditions).then((resp) => {
|
|
|
this.listLoading = false
|
|
|
const { code, msg, data, total } = resp
|
|
|
if (code === 0) {
|
|
@@ -218,25 +295,43 @@ export default {
|
|
|
console.log(error)
|
|
|
})
|
|
|
},
|
|
|
- showDetail(data) {
|
|
|
- const x = data.tdWaveValueX.split(',').map(item => parseFloat((item / 100).toFixed(2)))
|
|
|
- const y = data.tdWaveValueY.split(',').map(item => parseFloat((item / 100).toFixed(2)))
|
|
|
- const z = data.tdWaveValueZ.split(',').map(item => parseFloat((item / 100).toFixed(2)))
|
|
|
- const params = { x, y, z }
|
|
|
- this.$refs['chart-detail'].show(params)
|
|
|
+ showDetail(params) {
|
|
|
+ getWavedata(params.goafDataId).then((resp) => {
|
|
|
+ const { data } = resp
|
|
|
+ const x = data.tdWaveValueX.split(',').map(item => parseFloat((item / 100).toFixed(2)))
|
|
|
+ const y = data.tdWaveValueY.split(',').map(item => parseFloat((item / 100).toFixed(2)))
|
|
|
+ const z = data.tdWaveValueZ.split(',').map(item => parseFloat((item / 100).toFixed(2)))
|
|
|
+ const params = { x, y, z }
|
|
|
+ this.$refs['chart-detail'].show(params)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ ::v-deep{
|
|
|
+ .tablefilter-wrap{
|
|
|
+ text-align: right;
|
|
|
+ padding-top: 10px;
|
|
|
+ }
|
|
|
+ .tablefilter-column{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .el-dropdown-link {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #409EFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
.page-wrap{
|
|
|
min-height:90vh;
|
|
|
padding: 15px;
|
|
|
background-color: #071A29;
|
|
|
::v-deep {
|
|
|
.el-table thead.is-group th.el-table__cell{
|
|
|
- background-color: #132938;
|
|
|
- }
|
|
|
+ background-color: #132938;
|
|
|
+ }
|
|
|
.el-table__header-wrapper{
|
|
|
border-bottom: 1px solid #5994bb;
|
|
|
}
|