
import {
  splicingParam,
  get,
  post
} from '../utils/request'


// 获取menu
const getMenu = () => {
  return get(systemConfig.dataUrl + '/general/getMenuData')
}
// 获取一级分类
const getFirstClassify = () => {
  return get(systemConfig.dataUrl + '/general/getClassify')
}
// 获取二级分类
const getSecondClassify = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.dataUrl + '/model/selectByType?' + str)
}
// 获取图层数据
const getLayerData = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.dataUrl + '/content/selectByModelId?' + str)
}
// 根据id筛选获取模型
const getModelByID = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.dataUrl + '/model/selectById?' + str)
}
// 根据id获取点位详细信息
const getPointDetailByID = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.dataUrl + '/content/selectById?' + str)
}
// 根据标题筛选获取模型
const getModelByTitle = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.dataUrl + '/model/selectByTitle?' + str)
}
// 获取统计数据
const getStatisticalData = (params) => {
  let str = splicingParam(params)
  return post(systemConfig.dataUrl + '/content/selectByAreaCode?' + str)
}

export default {
  getMenu,
  getFirstClassify,
  getSecondClassify,
  getLayerData,
  getModelByID,
  getPointDetailByID,
  getModelByTitle,
  getStatisticalData
}