|
|
|
@ -56,16 +56,20 @@ ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-to
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="寄存器地址" align="center" prop="address" min-width="140px" />
|
|
|
|
<el-table-column label="寄存器地址" align="center" prop="address" min-width="140px" />
|
|
|
|
<el-table-column label="最新值" align="center" prop="latestValue" min-width="120px">
|
|
|
|
<el-table-column label="最新值" align="center" prop="addressValue" min-width="120px">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
{{ scope.row.latestValue ?? '-' }}
|
|
|
|
{{ formatAddressValue(scope.row.addressValue) }}
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="单位" align="center" prop="dataUnit" width="80px" />
|
|
|
|
<el-table-column label="单位" align="center" prop="dataUnit" width="80px" />
|
|
|
|
<el-table-column label="倍率" align="center" prop="ratio" width="80px" />
|
|
|
|
<el-table-column label="倍率" align="center" prop="ratio" width="80px" />
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
label="最新采集时间" align="center" prop="latestCollectTime" :formatter="dateFormatter"
|
|
|
|
label="最新采集时间"
|
|
|
|
width="170px" />
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="latestCollectionTime"
|
|
|
|
|
|
|
|
:formatter="dateFormatter"
|
|
|
|
|
|
|
|
width="170px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
<el-table-column label="顺序" align="center" prop="sort" width="80px">
|
|
|
|
<el-table-column label="顺序" align="center" prop="sort" width="80px">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
{{ scope.row.sort ?? '-' }}
|
|
|
|
{{ scope.row.sort ?? '-' }}
|
|
|
|
@ -126,6 +130,16 @@ const queryFormRef = ref()
|
|
|
|
|
|
|
|
|
|
|
|
const exportLoading = ref(false)
|
|
|
|
const exportLoading = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const formatAddressValue = (value: unknown) => {
|
|
|
|
|
|
|
|
if (value === null || value === undefined) {
|
|
|
|
|
|
|
|
return '-'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof value === 'string' || typeof value === 'number') {
|
|
|
|
|
|
|
|
return value
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const selectedIds = ref<number[]>([])
|
|
|
|
const selectedIds = ref<number[]>([])
|
|
|
|
const handleSelectionChange = (rows: any[]) => {
|
|
|
|
const handleSelectionChange = (rows: any[]) => {
|
|
|
|
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
|
|
|
|
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
|
|
|
|
|