派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-30 a312e0dd96d8f7e96fb3341f1a55561b12394405
src/components/base-page/WasteWater/Detail.vue
@@ -62,8 +62,20 @@
  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 = {
        poltSourceId: '',
        poltMtrlId: '',
        companyCode: '',
        emissTypeId: '',
        monItemId: 28,
        companyId: 3900100145,
        labMonPointId: 219,
        beginTime: timeStart,
@@ -73,7 +85,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 '-'
        }