import request from '@/utils/request.js'
import {server_url} from '@/utils/config.js'

//  文件上传
export const uploadUrl = `${server_url}/system/common/upload`

// 获取路线详细信息
export function routeDetail(params) {
	return request({
		url: '/system/system/route/detail',
		method: 'GET', 
		params
	})
}

// 查询全部部门
export function commonDeptAll(query) {
  return request({
    url: '/system/dept/common/deptAll',
    method: 'get',
    params: query,
    throttle: false
  })
}

// 根据参数键名查询参数值
export function getConfigKey(configKey) {
  return request({
    url: '/system/system/config/configKey/' + configKey,
    method: 'get'
  })
}

// 通过父级code查询code下所有树结构区域
export function getCodeAreaTree(query) {
  return request({
    url: '/system/system/area/areaTree',
    method: 'get',
    params: query
  })
}

// 车辆作业类型下拉列表(全部)
export function dropDownList(query) {
    return request({
        url: '/system/vehicle/common/workType/dropDown/list',
        method: 'get',
        params: query
    })
}

// 获取手机路由
export function getMobileRouters(query) {
    return request({
        url: '/system/getMobileRouters',
        method: 'POST',
        params: query
    })
}

// 钉钉内购
export function getH5SkuUrl(query) {
    return request({
        url: '/system/ding/getH5SkuUrl',
        method: 'get',
        params: query
    })
}

// 基础数据
export function boardDetail() {
  return request({
    url: '/system/data/board/detail',
    method: 'get'
  })
}

// 消息数量
export function getMessageNum(data) {
  return request({
    url: '/system/sysMessage/getMessageNum',
    method: 'post',
	data
  })
}
// 维保类型
export function mtTypeTreeList(data) {
  return request({
    url: '/wf-api/system/mtType/queryTreeList',
    method: 'post',
	data
  })
}