<template>
  <div id="dataCurve">
    <el-main>

      <div style="margin-bottom: 10px">
        <el-button size="medium" icon="el-icon-back" type="text" @click="back">返回</el-button>
        <span style="margin-left: 20px; font-size: 18px">数据曲线</span>
      </div>

      <div style="display: flex;flex-direction: row;margin-left: 600px">
        <div id="myChartWD" style="width: 230px;height: 230px"></div>

        <div id="myChartSD" style="width: 230px;height: 230px"></div>
      </div>
      <div id="chartLineBox" style="width: 96%;margin-left: 30px;height: 500px;background-color: white"></div>


    </el-main>
  </div>

</template>

<script>

export default {
  name: 'dataCurve',
  data() {
    return {
      formData: {
        WD_1: '',
        SD_1: '',
        QX: '2', //星期
        WD_SJ: '12',
        SD_SJ: '23',
        WD_SD: '34',
        SD_SD: '45',
      },

      WDdata: {
        WD1: '',
        WD2: '',
        WD3: '',
        WD4: '',
        WD5: '',
        WD6: '',
        WD7: '',
        WD8: '',
        WD9: '',
        WD10: '',
        WD11: '',
        WD12: '',
        WD13: '',
        WD14: '',
        WD15: '',
        WD16: '',
        WD17: '',
        WD18: '',
        WD19: '',
        WD20: '',
        WD21: '',
        WD22: '',
        WD23: '',
        WD24: '',
      },

      SDdata: {
        SD1: '',
        SD2: '',
        SD3: '',
        SD4: '',
        SD5: '',
        SD6: '',
        SD7: '',
        SD8: '',
        SD9: '',
        SD10: '',
        SD11: '',
        SD12: '',
        SD13: '',
        SD14: '',
        SD15: '',
        SD16: '',
        SD17: '',
        SD18: '',
        SD19: '',
        SD20: '',
        SD21: '',
        SD22: '',
        SD23: '',
        SD24: '',
      },

      WDSDdata: {
        WDSD1: '',
        WDSD2: '',
        WDSD3: '',
        WDSD4: '',
        WDSD5: '',
        WDSD6: '',
        WDSD7: '',
        WDSD8: '',
        WDSD9: '',
        WDSD10: '',
        WDSD11: '',
        WDSD12: '',
        WDSD13: '',
        WDSD14: '',
        WDSD15: '',
        WDSD16: '',
        WDSD17: '',
        WDSD18: '',
        WDSD19: '',
        WDSD20: '',
        WDSD21: '',
        WDSD22: '',
        WDSD23: '',
        WDSD24: '',
      },

      SDSDdata: {
        SDSD1: '',
        SDSD2: '',
        SDSD3: '',
        SDSD4: '',
        SDSD5: '',
        SDSD6: '',
        SDSD7: '',
        SDSD8: '',
        SDSD9: '',
        SDSD10: '',
        SDSD11: '',
        SDSD12: '',
        SDSD13: '',
        SDSD14: '',
        SDSD15: '',
        SDSD16: '',
        SDSD17: '',
        SDSD18: '',
        SDSD19: '',
        SDSD20: '',
        SDSD21: '',
        SDSD22: '',
        SDSD23: '',
        SDSD24: '',
      },
    }
  },

  created() {
    this.getWD_1()
    this.getSD_1()

    this.getWD_SJ()
    this.getSD_SJ()

    this.getWD1()
    this.getWD2()
    this.getWD3()
    this.getWD4()
    this.getWD5()
    this.getWD6()
    this.getWD7()
    this.getWD8()
    this.getWD9()
    this.getWD10()
    this.getWD11()
    this.getWD12()
    this.getWD13()
    this.getWD14()
    this.getWD15()
    this.getWD16()
    this.getWD17()
    this.getWD18()
    this.getWD19()
    this.getWD20()
    this.getWD21()
    this.getWD22()
    this.getWD23()
    this.getWD24()

    this.getSD1()
    this.getSD2()
    this.getSD3()
    this.getSD4()
    this.getSD5()
    this.getSD6()
    this.getSD7()
    this.getSD8()
    this.getSD9()
    this.getSD10()
    this.getSD11()
    this.getSD12()
    this.getSD13()
    this.getSD14()
    this.getSD15()
    this.getSD16()
    this.getSD17()
    this.getSD18()
    this.getSD19()
    this.getSD20()
    this.getSD21()
    this.getSD22()
    this.getSD23()
    this.getSD24()

    this.getWDSD1()
    this.getWDSD2()
    this.getWDSD3()
    this.getWDSD4()
    this.getWDSD5()
    this.getWDSD6()
    this.getWDSD7()
    this.getWDSD8()
    this.getWDSD9()
    this.getWDSD10()
    this.getWDSD11()
    this.getWDSD12()
    this.getWDSD13()
    this.getWDSD14()
    this.getWDSD15()
    this.getWDSD16()
    this.getWDSD17()
    this.getWDSD18()
    this.getWDSD19()
    this.getWDSD20()
    this.getWDSD21()
    this.getWDSD22()
    this.getWDSD23()
    this.getWDSD24()

    this.getSDSD1()
    this.getSDSD2()
    this.getSDSD3()
    this.getSDSD4()
    this.getSDSD5()
    this.getSDSD6()
    this.getSDSD7()
    this.getSDSD8()
    this.getSDSD9()
    this.getSDSD10()
    this.getSDSD11()
    this.getSDSD12()
    this.getSDSD13()
    this.getSDSD14()
    this.getSDSD15()
    this.getSDSD16()
    this.getSDSD17()
    this.getSDSD18()
    this.getSDSD19()
    this.getSDSD20()
    this.getSDSD21()
    this.getSDSD22()
    this.getSDSD23()
    this.getSDSD24()
  },

  mounted: function () {
  },

  methods: {
    back() {
      let vm = this;
      vm.$router.back()
    },
    getWD_1() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '207'
        }
      }).then((res) => {
        this.formData.WD_1 = res.data.data.deviceParam.value;
        this.myChartWD()
      })
    },
    getSD_1() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '293'
        }
      }).then((res) => {
        this.formData.SD_1 = res.data.data.deviceParam.value;
        console.log(this.formData.SD_1)
        this.myChartSD()
      })
    },
    getWD_SJ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '292'
        }
      }).then((res) => {
        this.formData.WD_SJ = res.data.data.deviceParam.value;
      })
    },
    getSD_SJ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '280'
        }
      }).then((res) => {
        this.formData.SD_SJ = res.data.data.deviceParam.value;
      })
    },

    //获取24个小时的温度
    getWD1() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '311'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD1 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD1)

      })
    },
    getWD2() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '312'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD2 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD2)
      })
    },
    getWD3() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '313'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD3 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD3)

      })
    },
    getWD4() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '314'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD4 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD4)

      })
    },
    getWD5() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '315'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD5 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD5)

      })
    },
    getWD6() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '316'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD6 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD6)

      })
    },
    getWD7() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '317'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD7 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD7)

      })
    },
    getWD8() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '318'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD8 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD8)

      })
    },
    getWD9() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '319'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD9 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD9)
      })
    },
    getWD10() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '320'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD10 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD10)

      })
    },
    getWD11() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '321'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD11 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD11)

      })
    },
    getWD12() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '322'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD12 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD12)

      })
    },
    getWD13() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '323'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD13 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD13)

      })
    },
    getWD14() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '324'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD14 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD14)

      })
    },
    getWD15() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '325'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD15 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD15)

      })
    },
    getWD16() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '326'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD16 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD16)

      })
    },
    getWD17() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '327'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD17 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD17)

      })
    },
    getWD18() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '328'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD18 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD18)

      })
    },
    getWD19() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '329'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD19 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD19)

      })
    },
    getWD20() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '330'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD20 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD20)

      })
    },
    getWD21() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '331'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD21 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD21)

      })
    },
    getWD22() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '332'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD22 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD22)

        this.myChartLine()
      })
    },
    getWD23() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '333'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD23 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD23)

      })
    },
    getWD24() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '334'
        }
      }).then((res) => {
        console.log(res)
        this.WDdata.WD24 = res.data.data.deviceParam.value;
        console.log(this.WDdata.WD24)

        this.myChartLine()
      })
    },

    //获取24个小时的湿度
    getSD1() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '335'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD1 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD1)

      })
    },
    getSD2() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '336'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD2 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD2)

      })
    },
    getSD3() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '337'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD3 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD3)

      })
    },
    getSD4() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '338'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD4 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD4)

      })
    },
    getSD5() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '339'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD5 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD5)

      })
    },
    getSD6() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '340'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD6 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD6)

      })
    },
    getSD7() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '341'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD7 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD7)

      })
    },
    getSD8() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '342'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD8 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD8)

      })
    },
    getSD9() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '343'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD9 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD9)

      })
    },
    getSD10() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '344'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD10 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD10)

      })
    },
    getSD11() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '345'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD11 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD11)

      })
    },
    getSD12() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '346'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD12 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD12)


      })
    },
    getSD13() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '347'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD13 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD13)


      })
    },
    getSD14() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '348'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD14 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD14)


      })
    },
    getSD15() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '349'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD15 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD15)


      })
    },
    getSD16() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '350'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD16 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD16)


      })
    },
    getSD17() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '351'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD17 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD17)


      })
    },
    getSD18() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '352'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD18 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD18)


      })
    },
    getSD19() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '353'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD19 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD19)


      })
    },
    getSD20() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '354'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD20 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD20)


      })
    },
    getSD21() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '355'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD21 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD21)


      })
    },
    getSD22() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '356'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD22 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD22)


      })
    },
    getSD23() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '357'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD23 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD23)


      })
    },
    getSD24() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '358'
        }
      }).then((res) => {
        console.log(res)
        this.SDdata.SD24 = res.data.data.deviceParam.value;
        console.log(this.SDdata.SD24)

        this.myChartLine()
      })
    },

    //获取24个小时的温度设定
    getWDSD1() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '359'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD1 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD1)

      })
    },
    getWDSD2() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '360'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD2 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD2)

      })
    },
    getWDSD3() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '361'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD3 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD3)

      })
    },
    getWDSD4() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '362'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD4 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD4)

      })
    },
    getWDSD5() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '363'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD5 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD5)

      })
    },
    getWDSD6() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '364'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD6 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD6)

      })
    },
    getWDSD7() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '365'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD7 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD7)

      })
    },
    getWDSD8() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '366'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD8 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD8)

      })
    },
    getWDSD9() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '367'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD9 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD9)

      })
    },
    getWDSD10() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '368'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD10 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD10)

      })
    },
    getWDSD11() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '369'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD11 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD11)


      })
    },
    getWDSD12() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '370'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD12 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD12)


      })
    },
    getWDSD13() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '371'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD13 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD13)


      })
    },
    getWDSD14() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '372'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD14 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD14)


      })
    },
    getWDSD15() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '373'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD15 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD15)


      })
    },
    getWDSD16() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '374'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD16 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD16)


      })
    },
    getWDSD17() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '375'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD17 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD17)


      })
    },
    getWDSD18() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '376'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD18 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD18)


      })
    },
    getWDSD19() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '377'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD19 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD19)


      })
    },
    getWDSD20() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '378'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD20 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD20)


      })
    },
    getWDSD21() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '379'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD21 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD21)


      })
    },
    getWDSD22() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '380'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD22 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD22)


      })
    },
    getWDSD23() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '381'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD23 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD23)


      })
    },
    getWDSD24() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '382'
        }
      }).then((res) => {
        console.log(res)
        this.WDSDdata.WDSD24 = res.data.data.deviceParam.value;
        console.log(this.WDSDdata.WDSD24)

        this.myChartLine()
      })
    },

    //获取24个小时的湿度设定
    getSDSD1() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '383'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD1 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD1)

      })
    },
    getSDSD2() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '384'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD2 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD2)

      })
    },
    getSDSD3() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '385'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD3 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD3)

      })
    },
    getSDSD4() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '386'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD4 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD4)

      })
    },
    getSDSD5() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '387'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD5 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD5)

      })
    },
    getSDSD6() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '388'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD6 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD6)

      })
    },
    getSDSD7() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '389'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD7 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD7)

      })
    },
    getSDSD8() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '390'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD8 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD8)

      })
    },
    getSDSD9() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '391'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD9 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD9)

      })
    },
    getSDSD10() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '392'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD10 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD10)

      })
    },
    getSDSD11() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '393'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD11 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD11)


      })
    },
    getSDSD12() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '394'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD12 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD12)


      })
    },
    getSDSD13() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '395'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD13 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD13)


      })
    },
    getSDSD14() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '396'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD14 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD14)


      })
    },
    getSDSD15() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '397'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD15 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD15)


      })
    },
    getSDSD16() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '398'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD16 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD16)


      })
    },
    getSDSD17() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '399'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD17 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD17)


      })
    },
    getSDSD18() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '400'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD18 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD18)


      })
    },
    getSDSD19() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '401'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD19 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD19)


      })
    },
    getSDSD20() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '402'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD20 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD20)


      })
    },
    getSDSD21() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '403'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD21 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD21)


      })
    },
    getSDSD22() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '404'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD22 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD22)


      })
    },
    getSDSD23() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '405'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD23 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD23)


      })
    },
    getSDSD24() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.getTimeData, {
        params: {
          id: '406'
        }
      }).then((res) => {
        console.log(res)
        this.SDSDdata.SDSD24 = res.data.data.deviceParam.value;
        console.log(this.SDSDdata.SDSD24)

        this.myChartLine()
      })
    },


    myChartWD() {
      let myChart = this.$echarts.init(document.getElementById('myChartWD'));
      // 绘制图表
      myChart.setOption({
        tooltip: {
          formatter: "{a} <br/>{b} : {c}%",
        },
        toolbox: {
          show: false,
          feature: {
            restore: {},
            saveAsImage: {},
          },
        },
        // 配置
        series: [
          {
            name: "CK1排风温度显示",
            type: "gauge",
            axisLabel: {distance: 0, fontWeight: 100, shadowOffsetY: 100, height: 100},
            axisLine: {
              lineStyle: {
                width: 12 // 修改仪表盘宽度的属性
              }
            },
            splitLine: {//分隔线样式相关
              length: 15,//分割线的长度
              lineStyle: {
                width: 1,
                color: '#b0b3b8'
              }
            },
            title: {offsetCenter: [0, '85%'], color: 'cornflowerblue'},
            detail: {formatter: "{value}%", offsetCenter: [0, '65%'], fontStyle: "oblique", fontSize: 16},
            pointer: {width: 4},
            data: [{value: this.formData.WD_1, name: "CK1排风温度显示"}]
          },
        ],
      });
    },

    myChartSD() {
      let myChart = this.$echarts.init(document.getElementById('myChartSD'));
      // 绘制图表
      myChart.setOption({
        tooltip: {
          formatter: "{a} <br/>{b} : {c}%",
        },
        toolbox: {
          show: false,
          feature: {
            restore: {},
            saveAsImage: {},
          },
        },
        // 配置
        series: [
          {
            name: "CK1排风湿度显示",
            type: "gauge",
            axisLabel: {distance: 0, fontWeight: 100, shadowOffsetY: 100, height: 100},
            axisLine: {
              lineStyle: {
                width: 12 // 修改仪表盘宽度的属性
              }
            },
            splitLine: {//分隔线样式相关
              length: 15,//分割线的长度
              lineStyle: {
                width: 1,
                color: '#b0b3b8'
              }
            },
            title: {offsetCenter: [0, '85%'], color: 'cornflowerblue'},
            detail: {formatter: "{value}%", offsetCenter: [0, '65%'], fontStyle: "oblique", fontSize: 16},
            pointer: {width: 4},
            data: [{value: this.formData.SD_1, name: "CK1排风湿度显示"}]
          },
        ],
      });
    },

    myChartLine() {
      this.chartLine = this.$echarts.init(document.getElementById('chartLineBox'));

      // 指定图表的配置项和数据
      var option = {
        tooltip: {              //设置tip提示
          trigger: 'axis'
        },

        legend: {               //设置区分（哪条线属于什么）
          data: ['排风温度变化', '排风湿度变化', '排风温度设定', '排风湿度设定']
        },
        color: ['#32CD32', '#E3170D', '#007AFF', '#FF8C00'],       //设置区分（每条线是什么颜色，和 legend 一一对应）
        xAxis: {                //设置x轴
          type: 'category',
          boundaryGap: false,     //坐标轴两边不留白
          data: ['1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '21时', '22时', '23时', '24时'],
          name: '',           //X轴 name
          nameTextStyle: {        //坐标轴名称的文字样式
            color: 'black',
            fontSize: 16,
            padding: [0, 0, 0, 20]
          },
          axisLine: {             //坐标轴轴线相关设置。
            lineStyle: {
              color: 'black',
            }
          }
        },
        yAxis: {
          nameTextStyle: {
            color: 'black',
            fontSize: 16,
            padding: [0, 0, 10, 0]
          },
          axisLine: {
            lineStyle: {
              color: 'black',
            }
          },
          type: 'value'
        },
        series: [
          {
            name: '排风温度变化',
            data: [this.WDdata.WD1, this.WDdata.WD2, this.WDdata.WD3, this.WDdata.WD4, this.WDdata.WD5, this.WDdata.WD6
              , this.WDdata.WD7, this.WDdata.WD8, this.WDdata.WD9, this.WDdata.WD10, this.WDdata.WD11, this.WDdata.WD12
              , this.WDdata.WD13, this.WDdata.WD14, this.WDdata.WD15, this.WDdata.WD16, this.WDdata.WD17, this.WDdata.WD18
              , this.WDdata.WD19, this.WDdata.WD20, this.WDdata.WD21, this.WDdata.WD22, this.WDdata.WD23, this.WDdata.WD24],
            type: 'line',               // 类型为折线图
            lineStyle: {                // 线条样式 => 必须使用normal属性
              normal: {
                color: '#32CD32',
              }
            },
          },
          {
            name: '排风湿度变化',
            data: [this.SDdata.SD1, this.SDdata.SD2, this.SDdata.SD3, this.SDdata.SD4, this.SDdata.SD5, this.SDdata.SD6
              , this.SDdata.SD7, this.SDdata.SD8, this.SDdata.SD9, this.SDdata.SD10, this.SDdata.SD11, this.SDdata.SD12
              , this.SDdata.SD13, this.SDdata.SD14, this.SDdata.SD15, this.SDdata.SD16, this.SDdata.SD17, this.SDdata.SD18
              , this.SDdata.SD19, this.SDdata.SD20, this.SDdata.SD21, this.SDdata.SD22, this.SDdata.SD23, this.SDdata.SD24],
            type: 'line',
            lineStyle: {
              normal: {
                color: '#E3170D',
              }
            },
          }
          ,
          {
            name: '排风温度设定',
            data: [this.WDSDdata.WDSD1, this.WDSDdata.WDSD2, this.WDSDdata.WDSD3, this.WDSDdata.WDSD4, this.WDSDdata.WDSD5, this.WDSDdata.WDSD6
              , this.WDSDdata.WDSD7, this.WDSDdata.WDSD8, this.WDSDdata.WDSD9, this.WDSDdata.WDSD10, this.WDSDdata.WDSD11, this.WDSDdata.WDSD12
              , this.WDSDdata.WDSD13, this.WDSDdata.WDSD14, this.WDSDdata.WDSD15, this.WDSDdata.WDSD16, this.WDSDdata.WDSD17, this.WDSDdata.WDSD18
              , this.WDSDdata.WDSD19, this.WDSDdata.WDSD20, this.WDSDdata.WDSD21, this.WDSDdata.WDSD22, this.WDSDdata.WDSD23, this.WDSDdata.WDSD24],
            type: 'line',
            lineStyle: {
              normal: {
                color: '#007AFF',
              }
            },
          }
          ,
          {
            name: '排风湿度设定',
            data: [this.SDSDdata.SDSD1, this.SDSDdata.SDSD2, this.SDSDdata.SDSD3, this.SDSDdata.SDSD4, this.SDSDdata.SDSD5, this.SDSDdata.SDSD6
              , this.SDSDdata.SDSD7, this.SDSDdata.SDSD8, this.SDSDdata.SDSD9, this.SDSDdata.SDSD10, this.SDSDdata.SDSD11, this.SDSDdata.SDSD12
              , this.SDSDdata.SDSD13, this.SDSDdata.SDSD14, this.SDSDdata.SDSD15, this.SDSDdata.SDSD16, this.SDSDdata.SDSD17, this.SDSDdata.SDSD18
              , this.SDSDdata.SDSD19, this.SDSDdata.SDSD20, this.SDSDdata.SDSD21, this.SDSDdata.SDSD22, this.SDSDdata.SDSD23, this.SDSDdata.SDSD24],
            type: 'line',
            lineStyle: {
              normal: {
                color: '#FF8C00',
              }
            },
          }
        ]
      };

      // 使用刚指定的配置项和数据显示图表。
      this.chartLine.setOption(option);
    },
  }
}
</script>

<style scoped>
.button {
  background-color: cornflowerblue;
}
</style>
