<template>
  <div id="body"
    ref="bodyContainer">
    <el-card class="box-card"
      shadow="always">
      <div slot="header"
        class="clearfix">
        <span>基本信息</span>
      </div>
      <div class="main_p"
        style="margin-top: 0;">
        <el-descriptions direction="horizontal"
          :column="2"
          size="medium"
          style="width: 100%;"
          border>
          
          <el-descriptions-item label="增益值">
            {{ data1.gpsSignalGain }}
          </el-descriptions-item>
          <el-descriptions-item label="卫星数量">{{ data.num_satellites }}</el-descriptions-item>

          <el-descriptions-item label="输出状态">
            <el-tag v-if="data1.outputPortStatus === 0">开路</el-tag>
            <el-tag v-if="data1.outputPortStatus === 1"
              type="success">正常</el-tag>
            <el-tag v-if="data1.outputPortStatus === 2"
              type="danger">短路</el-tag>
          </el-descriptions-item>

          <el-descriptions-item label="输入状态">
            <el-tag v-if="data1.inputPortStatus === 0">开路</el-tag>
            <el-tag v-if="data1.inputPortStatus === 1"
              type="success">正常</el-tag>
            <el-tag v-if="data1.inputPortStatus === 2"
              type="danger">短路</el-tag>
          </el-descriptions-item>
          <el-descriptions-item label="高度">{{ data.altitude }} M</el-descriptions-item>
          <el-descriptions-item label="hdop">{{ data.hdop }}</el-descriptions-item>
          <el-descriptions-item label="纬度">{{ data.latitude }}</el-descriptions-item>
          <el-descriptions-item label="经度">{{ data.longitude }}</el-descriptions-item>
        </el-descriptions>

      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: {
        altitude: '1000',
        hdop: '0.5',
        latitude: '30.123456',
        longitude: '120.123456',
        num_satellites: '12',
        time: '2024-07-24 12:00:00'
      },
      data1: {
        stationId: 'ST-001',
        stationName: '台站A',
        gpsSignalGain: '10',
        outputPortStatus: 1,
        inputPortStatus: 0
      },
    };
  },





}
</script>

<style scoped>
#body {
  position: relative;
  width: 100%;
  height: 100%;
}

.box-card {
  height: 100%;
}
</style>
