Newer
Older
CloudBrainNew / src / api / construction.js
zhangyingjie on 30 Mar 2021 1 KB 工地部分接口调用
import request from '@/utils/request'
import config from '@/utils/baseConfig'

// 工地接口
// 所有工地信息
export function fetchConstructions (type) {
  return request({
    baseURL: config.jingyiService,
    url: 'services/resource/singleSearch/B-ZH-0701',
    params: {
      'F-Auth-Key': 'P66MVOIBXJ'
    },
    data: {},
    method: 'post'
  })
}

// 工地总数量
export function fetchConstructionCount (year) {
  return request({
    baseURL: config.baseUrl,
    url: '/construction/count',
    method: 'get',
    params: {
      params: year
    }
  })
}

// 工地总投资
export function fetchConstructionInvestment (year) {
  return request({
    baseURL: config.baseUrl,
    url: '/construction/investment',
    method: 'get',
    params: {
      params: year
    }
  })
}

// 某年各类工地数量
export function fetchConstructionByType (year) {
  return request({
    baseURL: config.baseUrl,
    url: '/construction/countByType',
    method: 'get',
    params: {
      params: year
    }
  })
}

// 某年各状态工地数量
export function fetchConstructionByState (year) {
  return request({
    baseURL: config.baseUrl,
    url: '/construction/countByState',
    method: 'get',
    params: {
      params: year
    }
  })
}

// 工地环境监测
export function fetchConstructionEnvoriment (year) {
  return request({
    baseURL: config.baseUrl,
    url: '/construction/envoriment',
    method: 'get',
    params: {
      params: year
    }
  })
}

// 工地报警状态
export function fetchConstructionAlarmByState (year) {
  return request({
    baseURL: config.baseUrl,
    url: '/construction/alarmByState',
    method: 'get',
    params: {
      params: year
    }
  })
}