import { HcApi } from '../request/index'

//用户配置保存
export const userConfigSave = (form) => HcApi({
    url: '/api/blade-business/defaultConfig/saveOrUpdate',
    method: 'post',
    data: form,
})

//用户配置详情
export const userConfigInfo = (form = {}) => HcApi({
    url: '/api/blade-business/defaultConfig/detail',
    method: 'get',
    params: form,
})

//获取类型
export const getDictionary = (form) => HcApi({
    url: '/api/blade-system/dict/dictionary',
    method: 'get',
    params: form,
})
//业务字典
export const getDictionaryBiz = (form) => HcApi({
    url: '/api/blade-system/dict-biz/dictionary',
    method: 'get',
    params: form,
})
//获取用户列表
export const getContractUserList = (form) => HcApi({
    url: '/api/blade-manager/contractInfo/get-contract-userList',
    method: 'get',
    params: form,
})

//获取租户详情
export const getTenantDetail = (id) => HcApi({
    url: '/api/blade-system/tenant/detail',
    method: 'get',
    params: {
        tenantId: id,
    },
}, true)

//获取更新信息
export const getVersionJson = () => HcApi({
    url: 'version.json?time=' + new Date().getTime(),
    method: 'get',
})

//获取项目下的合同段信息
export const getContractInfo = (form) => HcApi({
    url: '/api/blade-manager/contractInfo/get-contractInfo',
    method: 'get',
    params: form,
})


//获取质检划分树
export const queryWbsTreeData = (form) => HcApi({
    url: '/api/blade-user/wbs/lazyQueryContractWbsTree',
    method: 'get',
    params: form,
})

//短信验证
export const sendNotice = (form) => HcApi({
    url: '/api/blade-business/task/send-notice',
    method: 'post',
    params: form,
})

//短信过期时间
export const saveSmsTimeout = (form) => HcApi({
    url: '/api/blade-business/task/save-sms-timeout',
    method: 'get',
    params: form,
})


//撤销上报， periodId 期数，type 类型(0中间，1材料，2开工，3变更令)
export const backMeterTask = (form) => HcApi({
    url: '/api/blade-meter/task/backMeterTask',
    method: 'get',
    params: form,
})
