<template>
  <div class="index-center-home">
    <div class="real-time-line">
      <span class="real-time-title">实时温度监测</span>
    </div>
    <div>
      <table class="tableleft">
        <thead class="data-list-header-screen">
        <tr class="data-list-header-home2">
          <td style="width:38%;">锅炉房/换热站</td>
          <td style="width:20%;">数据时间</td>
          <td style="width:10%;">供水温度</td>
          <td style="width:10%;">回水温度</td>
          <!--                  <td style="width:10%;">供水压力</td>-->
          <!--                  <td style="width:10%;">回水压力</td>-->
        </tr>
        </thead>
        <tbody class="data-list1-home">
        <tr v-for="(item,index) in list" :key="item.id" :class="index%2==0?'data-list-data-screen':'data-list-data3-screen'">
          <td class="tabulation-screen">{{ item.view004Name!=null?item.view004Name:item.view002Name }}</td>
          <td style="width:20%; text-align: center;">{{ item.datatime }}</td>
          <td style="width:10%; text-align: center;">{{ item.view005 }}</td>
          <td style="width:10%; text-align: center;">{{ item.view006 }}</td>
          <!--                  <td style="width:10%; text-align: center;">{{ item.view007 }}</td>-->
          <!--                  <td style="width:10%; text-align: center;">{{ item.view008 }}</td>-->
        </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>

<script lang="ts" name="screen-heatanalysisList" setup>
  import { ref, onMounted } from 'vue';
  import { heatanalysisList } from '../scress.api';

  const list = ref();
  async function getHeatanalysisList(){
    const resData = await heatanalysisList();
    list.value = resData;
  }

  onMounted(() => {
    getHeatanalysisList();
  });

  //定时2分钟
  setInterval(()=>{
    getHeatanalysisList();
  },1000 * 60 * 2)

</script>

<style lang="less" scoped>
  @import '/@/assets/loginmini/style/screen.less';
</style>
