修改冀北现场反馈问题
This commit is contained in:
@@ -11,78 +11,105 @@
|
||||
@current-change="currentChangeEvent"
|
||||
>
|
||||
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
||||
<vxe-column field="date" title="日期"></vxe-column>
|
||||
<vxe-column field="bdName" title="所属电站(场站)" width="120px"></vxe-column>
|
||||
<vxe-column field="monitorName" title="监测点名称" width="120px"></vxe-column>
|
||||
<vxe-column field="timeSum" title="异常时间(分钟)" width="80px"></vxe-column>
|
||||
<vxe-column field="errCount" title="异常次数" width="80px"></vxe-column>
|
||||
<!-- <vxe-column field="date" title="日期"></vxe-column> -->
|
||||
<vxe-column field="bdName" title="所属电站(场站)"></vxe-column>
|
||||
<vxe-column field="monitorName" title="监测点名称"></vxe-column>
|
||||
<vxe-column field="timeSum" title="异常天数" width="80px">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.dateList?.length }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<!-- <vxe-column field="errCount" title="异常次数" width="80px"></vxe-column> -->
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
<div :style="height" style="width: 920px" v-loading="loading1">
|
||||
<vxe-table
|
||||
height="auto"
|
||||
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
||||
v-bind="defaultAttribute"
|
||||
>
|
||||
<vxe-column type="seq" title="序号" width="80px">
|
||||
<template #default="{ rowIndex }">
|
||||
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="time" title="时间" width="150px"></vxe-column>
|
||||
<vxe-column field="targetName" title="指标类型" min-width="80px"></vxe-column>
|
||||
<vxe-column field="phaseType" title="相别" width="60px">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.phaseType == 'T' ? '/' : row.phaseType }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="rangeDesc" title="合理范围" min-width="90px"></vxe-column>
|
||||
<vxe-column
|
||||
field="max"
|
||||
title="最大"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="min"
|
||||
title="最小"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="avg"
|
||||
title="平均"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="cp95"
|
||||
title="CP95"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="featureAmplitude"
|
||||
title="幅值"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="!showColumn"
|
||||
></vxe-column>
|
||||
</vxe-table>
|
||||
<div class="table-pagination">
|
||||
<el-pagination
|
||||
v-model:currentPage="pageNum"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
background
|
||||
layout="sizes,total, ->, prev, pager, next, jumper"
|
||||
:total="TableData1.length"
|
||||
></el-pagination>
|
||||
<div style="width: 920px" v-loading="loading1">
|
||||
<el-form :inline="true" class="form">
|
||||
<el-form-item label="统计日期">
|
||||
<el-select
|
||||
v-model="timeList"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择异常天数"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option v-for="item in dateList" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="form_but">
|
||||
<span class="mr20">异常时间:<span class="title">{{ timeSum }}</span>分钟</span>
|
||||
<span class="mr10">异常次数:<span class="title">{{ errCount }}</span>次</span>
|
||||
|
||||
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div :style="height">
|
||||
<vxe-table
|
||||
height="auto"
|
||||
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
||||
v-bind="defaultAttribute"
|
||||
>
|
||||
<vxe-column type="seq" title="序号" width="80px">
|
||||
<template #default="{ rowIndex }">
|
||||
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="time" title="时间" width="150px"></vxe-column>
|
||||
<vxe-column field="targetName" title="指标类型" min-width="80px"></vxe-column>
|
||||
<vxe-column field="phaseType" title="相别" width="60px">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.phaseType == 'T' ? '/' : row.phaseType }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="rangeDesc" title="合理范围" min-width="90px"></vxe-column>
|
||||
<vxe-column
|
||||
field="max"
|
||||
title="最大"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="min"
|
||||
title="最小"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="avg"
|
||||
title="平均"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="cp95"
|
||||
title="CP95"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="showColumn"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="featureAmplitude"
|
||||
title="幅值"
|
||||
width="85px"
|
||||
:formatter="formatter"
|
||||
v-if="!showColumn"
|
||||
></vxe-column>
|
||||
</vxe-table>
|
||||
<div class="table-pagination">
|
||||
<el-pagination
|
||||
v-model:currentPage="pageNum"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
background
|
||||
layout="sizes,total, ->, prev, pager, next, jumper"
|
||||
:total="TableData1.length"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,17 +124,21 @@ import { monitorAbnormalTable, monitorAbnormalTableDetail } from '@/api/device-b
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const dialogVisible = ref(false)
|
||||
const height1 = mainHeight(-110, 2)
|
||||
const height = mainHeight(10, 2)
|
||||
const height = mainHeight(90, 2)
|
||||
const tableRef = ref()
|
||||
const title = ref('')
|
||||
const loading = ref(false)
|
||||
const loading1 = ref(false)
|
||||
const TableData = ref([])
|
||||
const TableData1 = ref([])
|
||||
const dateList: any = ref([])
|
||||
const pageNum = ref(1)
|
||||
const pageSize = ref(20)
|
||||
const numKey = ref(0)
|
||||
const targetKey = ref('')
|
||||
const errCount = ref('')
|
||||
const timeSum = ref('')
|
||||
const timeList = ref([])
|
||||
const showColumn = ref(true)
|
||||
const open = (data: anyObj, time: string[], num: number) => {
|
||||
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_异常监测点详情'
|
||||
@@ -134,16 +165,28 @@ const open = (data: anyObj, time: string[], num: number) => {
|
||||
dialogVisible.value = true
|
||||
}
|
||||
const currentChangeEvent = () => {
|
||||
loading1.value = true
|
||||
let data = tableRef.value.getCurrentRecord()
|
||||
|
||||
dateList.value = data.dateList
|
||||
console.log('🚀 ~ currentChangeEvent ~ dateList.value:', dateList.value)
|
||||
timeList.value = [data.dateList[0]]
|
||||
init()
|
||||
}
|
||||
const init = () => {
|
||||
if(timeList.value.length == 0) return ElMessage.warning('请选择异常天数!')
|
||||
loading1.value = true
|
||||
TableData1.value = []
|
||||
let data = tableRef.value.getCurrentRecord()
|
||||
monitorAbnormalTableDetail({
|
||||
monitorIds: [data.monitorId],
|
||||
time: timeList.value,
|
||||
searchBeginTime: data.date,
|
||||
targetKey: numKey.value == 0 ? targetKey.value : ''
|
||||
})
|
||||
.then(res => {
|
||||
TableData1.value = res.data
|
||||
errCount.value = res.data.errCount
|
||||
timeSum.value = res.data.timeSum
|
||||
TableData1.value = res.data.time
|
||||
showColumn.value = res.data[0]?.featureAmplitude == null ? true : false
|
||||
loading1.value = false
|
||||
pageNum.value = 1
|
||||
@@ -170,8 +213,19 @@ defineExpose({ open })
|
||||
border-bottom: 1px solid #e4e7e9;
|
||||
}
|
||||
:deep(.box) {
|
||||
.row--current {
|
||||
// background-color: var(--el-color-primary-light-8) !important;
|
||||
.row--current {
|
||||
// background-color: var(--el-color-primary-light-8) !important;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
position: relative;
|
||||
.form_but {
|
||||
position: absolute;
|
||||
right: -22px;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user