{"size": 621, "ext": "js", "max_stars_repo_path": "src/store/module/power.js", "max_stars_repo_name": "chenghei/kitlink", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/store/module/power.js", "max_issues_repo_name": "chenghei/kitlink", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/store/module/power.js", "max_forks_repo_name": "chenghei/kitlink", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.0322580645, "max_line_length": 56, "alphanum_fraction": 0.4895330113}
import { getLampPlanAll, getHistory } from '@/api/power'

export default {
  state: {
  },
  mutations: {
  },
  actions: {
    // 获取所有控制计划
    getLampPlanAll({ commit }, params) {
      return new Promise((resolve, reject) => {
        getLampPlanAll(params).then(res => {
          resolve(res)
        }).catch(err => {
          reject(err)
        })
      })
    },

    // 获取灯控能耗历史数据
    getHistory ({ commit }, params) {
      return new Promise((resolve, reject) => {
        getHistory(params).then(res => {
          resolve(res)
        }).catch(err => {
          reject(err)
        })
      })
    },
  }
}