修改正式检测,使其能按照通道进行页面展示
This commit is contained in:
@@ -1,42 +1,28 @@
|
||||
<template>
|
||||
|
||||
<div class="table-main">
|
||||
<el-collapse v-model="activeName" accordion style="width: 100%;height:335px">
|
||||
<el-collapse-item v-for="(item, index) in tableData" :key="index+1" :title="'通道'+ (index+1)" :name="'通道'+ (index+1)">
|
||||
|
||||
<el-table :data="item.rawDataItems" stripe border :header-cell-style="{ textAlign: 'center' } "
|
||||
:cell-style="{ textAlign: 'center' }" height="335px" style="width: 100%;max-height: 250px;overflow-y: auto;">
|
||||
<el-table-column type="index" fixed="left" label="序号" width="70"/>
|
||||
<el-table-column prop="updateTime" label="数据时间"/>
|
||||
<el-table-column prop="L1" label="L1(V)"/>
|
||||
<el-table-column prop="L2" label="L2(V)"/>
|
||||
<el-table-column prop="L3" label="L3(V)"/>
|
||||
</el-table>
|
||||
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } "
|
||||
:cell-style="{ textAlign: 'center' }" height="335px"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="index" label="序号" width="70" fixed="left"/>
|
||||
<el-table-column prop="updateTime" label="数据时间"/>
|
||||
<el-table-column prop="L1" label="L1(V)"/>
|
||||
<el-table-column prop="L2" label="L2(V)"/>
|
||||
<el-table-column prop="L3" label="L3(V)"/>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
|
||||
import type {RawData} from "@/api/check/interface";
|
||||
import type {RawDataItem} from "@/api/check/interface";
|
||||
|
||||
const {tableData} = defineProps<{
|
||||
tableData:RawData[]
|
||||
tableData: RawDataItem[]
|
||||
}>()
|
||||
|
||||
const activeName = ref('通道1')
|
||||
|
||||
// 清空数据
|
||||
const clear = () => {
|
||||
activeName.value = '通道1'
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
clear
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user