export default {
  SET_CURRENT_STREET(state, name) {
    if (!name) return
    state.currentStreetInfo = state.streets.find(street => {
      return street.name.indexOf(name) >= 0 || street.en.indexOf(name) >= 0
    })
  },
  SET_LOADING(state, val) {
    state.showLoading = val
  },
  SET_CURDATE(state, date) {
    state.curDate = date
  },
  SET_CUR_SMART_TYPE(state, val) {
    state.curSmartType = val
  },
  SET_COMMAND_MODAL(state, val) {
    state.showCommandModal = val
  },
  SET_LAND_POPULATION_INFO(state, data) {
    state.landPopulationInfo = data
  },
  SET_GREEN_INFO(state, data) {
    state.greenInfo = data
  },
  SET_DISCOVER_TREND(state, data) {
    state.discoverTrend = data
  },
  SET_REPAIR_RATE(state, data) {
    state.repairRate = data
  },
  SET_RESOURCE_SUM(state, data) {
    state.resourceSum = data
  },
  SET_CHECK_SUM(state, data) {
    state.checkSum = data
  },
  SET_GRID_SUM(state, data) {
    state.gridSum = data
  },
  SET_NOT_ALERT_SUM(state, data) {
    state.notAlertSum = data
  },
  SET_PATROL_LIST(state, data) {
    state.patrolList = data
  },
  SET_CAMERA_LIST(state, data) {
    state.cameraList = data
  },
  SET_DISCOVER_SUM(state, data) {
    state.discoverSum = data
  },
  SET_DISCOVER_INFO(state, data) {
    state.discoverInfo = data
  },
  SET_REPAIR_INFO(state, data) {
    state.repairInfo = data
  },
  SET_CUR_TAB(state, val) {
    state.handleCurTab = val
  },
  SET_HANDLE_LIST(state, data) {
    state.handleList = data
  },
  SET_DONE_LIST(state, data) {
    state.doneList = data
  },
  SET_HEALTH_INFO(state, data) {
    state.healthInfo = data
  },
}
