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

export default {
    //分页
    async page(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/page',
            method: 'get',
            params: form,
        })
    },
    //详情
    async detail(id) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/getById',
            method: 'post',
            params: { id },
        })
    },
    //新增
    async add(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/save',
            method: 'post',
            data: form,
        })
    },
    //编辑
    async update(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/update',
            method: 'post',
            data: form,
        })
    },
    //删除
    async del(ids) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/remove',
            method: 'post',
            params: { ids },
        })
    },
    //注册
    async goRegister(data) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/goRegister',
            method: 'post',
            data: data,
        })
    },
    //获取当前系统下所有用户
    async findUserByName(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/findUserByName',
            method: 'get',
            params: form,
        })
    },
    //获取角色方
    async queryRole(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/queryRole',
            method: 'get',
            params: form,
        })
    },
    //获取项目和合同段
    async queryProjectAndContract(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/queryProjectAndContract',
            method: 'get',
            params: form,
        })
    },
    //上传图片
    async addFileInfo(form) {
        return HcApi({
            url: '/api/blade-resource/client/addFileInfo',
            method: 'post',
            data: form,
        })
    },
    //获取项目和合同段
    async findPfxType(form) {
        return HcApi({
            url: '/api/blade-business/task/query-task-type-status',
            method: 'get',
            params: form,
        })
    },
    async picPresave(form) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/picPresave',
            method: 'post',
            data: form,
        })
    },
    async prePicture(id) {
        return HcApi({
            url: '/api/blade-manager/signPfxFile/prePicture',
            method: 'post',
            data: { id },
        })
    },
}
