riku
2024-07-16 d00a9f035aec50c37c8e0a1363a1968672fb875f
src/stores/area.js
@@ -29,11 +29,18 @@
      this.area.districtcode = location.dCode
      this.area.districtname = location.dName
    },
    setTimePeriod(time, type) {
      const d = time ? dayjs(time) : dayjs()
      this.area.starttime = d.startOf(type).format('YYYY-MM-DD HH:mm:ss')
      this.area.endtime = d.endOf(type).format('YYYY-MM-DD HH:mm:ss')
    },
    // 设置时间为给定时间对应当日的头尾
    setTimeOneDay(time) {
      const d = time ? dayjs(time) : dayjs()
      this.area.starttime = d.startOf('day').format('YYYY-MM-DD HH:mm:ss')
      this.area.endtime = d.endOf('day').format('YYYY-MM-DD HH:mm:ss')
      this.setTimePeriod(time, 'day')
    },
    // 设置时间为给定时间对应当月的头尾
    setTimeOneMonth(time) {
      this.setTimePeriod(time, 'month')
    },
    // 设置场景类型
    setSceneType(t) {