<template>
  <div class="app-container">
    <el-table 
      v-loading="loading" 
      :data="parityCorrectionList" 
      style="width: 100%"
      border
      stripe
    >
      <el-table-column 
        label="胎次" 
        align="center" 
        prop="parity" 
        width="120"
      />
      <el-table-column 
        label="系数" 
        align="center" 
        prop="coef" 
        width="120"
      />
    </el-table>
  </div>
</template>

<script setup name="ParityCorrection">
import { ref, onMounted } from 'vue'

const loading = ref(false)
const parityCorrectionList = ref([])

// 预定义胎次校正数据（1-8胎次）
const fixedParityData = [
  { id: 1, parity: 1, coef: 1.2 },
  { id: 2, parity: 2, coef: 1.0 },
  { id: 3, parity: 3, coef: 0.96 },
  { id: 4, parity: 4, coef: 0.96 },
  { id: 5, parity: 5, coef: 1.0 },
  { id: 6, parity: 6, coef: 1.0 },
  { id: 7, parity: 7, coef: 1.0 },
  { id: 8, parity: 8, coef: 1.0 }
]

// 组件挂载时加载数据
onMounted(() => {
  loading.value = true
  // 模拟异步加载
  setTimeout(() => {
    parityCorrectionList.value = fixedParityData
    loading.value = false
  }, 500)
})
</script>

<style scoped>
.app-container {
  padding: 20px;
}
</style>