派生自 wuyushui/SewerAndRainNetwork

src/components/base-page/WasteWater/Detail.vue
@@ -1,5 +1,5 @@
<template>
  <div class="detail" style="width: 5rem">
  <div id="wasteWaterDetailBox" class="detail" style="width: 5rem">
    <el-table :data="tableData" style="width: 100%;" height="2.07rem">
      <el-table-column prop="LabMonTime" label="检测时间"></el-table-column>
      <el-table-column label="COD">
@@ -56,16 +56,35 @@
      timeStart: dayjs().subtract(3, 'minute').format('YYYY-MM-DD HH:mm:ss')
    }
  },
  props: {
    LabMonPointId: {
      type: Number
    }
  },
  mounted () {
    this.initdetail()
    this.$nextTick(() => {
      this.initdetail()
    })
  },
  methods: {
    async initdetail () {
      const timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss')
      const timeStart = dayjs().subtract(3, 'minute').format('YYYY-MM-DD HH:mm:ss')
      var timeStart = null
      var oDate = new Date()
      var year = oDate.getFullYear()
      if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) { // 判断是平年还是闰年
        timeStart = dayjs().subtract(366, 'day').format('YYYY-MM-DD HH:mm:ss')
      } else {
        timeStart = dayjs().subtract(365, 'day').format('YYYY-MM-DD HH:mm:ss')
      }
      const data = {
        companyId: 3900100145,
        labMonPointId: 219,
        companyCode: '',
        poltSourceId: '',
        labMonPointId: this.LabMonPointId ? this.LabMonPointId : '',
        poltMtrlId: '',
        monItemId: '28,31,35',
        emissTypeId: '',
        beginTime: timeStart,
        endTime: timeEnd
      }
@@ -73,7 +92,6 @@
      // console.log(result)
      this.tableData = result
      for (let i = 0; i < result.length; i++) {
        console.log(result[i].LabMonValue)
        if (result[i].LabMonValue === '0') {
          return '-'
        }