|
|
|
@ -32,6 +32,11 @@
|
|
|
|
prop="value"
|
|
|
|
prop="value"
|
|
|
|
min-width="180"
|
|
|
|
min-width="180"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column label="采集时间" align="center" prop="collectionTime" min-width="180">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
{{ formatTime(scope.row?.collectionTime) }}
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<Pagination
|
|
|
|
<Pagination
|
|
|
|
:total="to"
|
|
|
|
:total="to"
|
|
|
|
@ -129,6 +134,11 @@
|
|
|
|
prop="remark"
|
|
|
|
prop="remark"
|
|
|
|
min-width="180"
|
|
|
|
min-width="180"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column label="录入时间" align="center" prop="updateTime" min-width="180">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
{{ formatTime(scope.row?.updateTime) }}
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="120">
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="120">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
<el-button link type="primary" @click="openReferDialog(scope.row)">补录</el-button>
|
|
|
|
<el-button link type="primary" @click="openReferDialog(scope.row)">补录</el-button>
|
|
|
|
@ -172,6 +182,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
import { RecipePointRecordApi } from '@/api/iot/recipepointrecord'
|
|
|
|
import { RecipePointRecordApi } from '@/api/iot/recipepointrecord'
|
|
|
|
import { RecipeDeviceRecordApi } from '@/api/iot/recipeDeviceRecord'
|
|
|
|
import { RecipeDeviceRecordApi } from '@/api/iot/recipeDeviceRecord'
|
|
|
|
import { RecipePointVO } from '@/api/iot/recipePoint'
|
|
|
|
import { RecipePointVO } from '@/api/iot/recipePoint'
|
|
|
|
@ -212,6 +223,24 @@ const getUnitLabel = (dataUnit: unknown) => {
|
|
|
|
return unit?.name ?? id
|
|
|
|
return unit?.name ?? id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const formatTime = (value: unknown) => {
|
|
|
|
|
|
|
|
if (value === undefined || value === null || value === '') return '-'
|
|
|
|
|
|
|
|
if (typeof value === 'number') {
|
|
|
|
|
|
|
|
if (!Number.isFinite(value)) return '-'
|
|
|
|
|
|
|
|
const ms = value < 1e12 ? value * 1000 : value
|
|
|
|
|
|
|
|
return dayjs(ms).isValid() ? dayjs(ms).format('YYYY-MM-DD HH:mm:ss') : '-'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const raw = String(value).trim()
|
|
|
|
|
|
|
|
if (!raw) return '-'
|
|
|
|
|
|
|
|
if (/^\d+$/.test(raw)) {
|
|
|
|
|
|
|
|
const num = Number(raw)
|
|
|
|
|
|
|
|
if (!Number.isFinite(num)) return '-'
|
|
|
|
|
|
|
|
const ms = num < 1e12 ? num * 1000 : num
|
|
|
|
|
|
|
|
return dayjs(ms).isValid() ? dayjs(ms).format('YYYY-MM-DD HH:mm:ss') : raw
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return dayjs(raw).isValid() ? dayjs(raw).format('YYYY-MM-DD HH:mm:ss') : raw
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const queryFormRef = ref()
|
|
|
|
const queryFormRef = ref()
|
|
|
|
const queryParams = reactive({
|
|
|
|
const queryParams = reactive({
|
|
|
|
pageNo: 1,
|
|
|
|
pageNo: 1,
|
|
|
|
|