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

export default {
    //分页数据
    async getPageData(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/fixedFlow/page',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取系统所有角色划分
    async queryAllRoleList(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/fixedFlow/queryAllRoleList',
            method: 'get',
            params: form,
        }, msg)
    },
    //详情
    async queryFixedFlowDetail(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/fixedFlow/detail',
            method: 'get',
            params: form,
        }, msg)
    },
    //新增
    async addFixedFlowData(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/fixedFlow/save',
            method: 'post',
            data: form,
        }, msg)
    },
    //修改
    async updateFixedFlowData(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/fixedFlow/update',
            method: 'post',
            data: form,
        }, msg)
    },
    //删除
    async removeFixedFlowData(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/fixedFlow/remove',
            method: 'post',
            params: form,
        }, msg)
    },
    //检查任务人是否存在签字证书信息
    async checkTaskUserCertificateInfo(form, msg = true) {
        return HcApi({
            url: '/api/blade-archive/archiveTask/checkTaskUserCertificateInfo',
            method: 'post',
            params: form,
        }, msg)
    },
    //批量上报
    async batchReportTaskArchive(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/task/batch-report-task-archive',
            method: 'post',
            data: form,
        }, msg)
    },
    //批量认证
    async batchCertification(form, msg = true) {
        return HcApi({
            url: '/api/blade-archive/archiveTask/batchCertification',
            method: 'post',
            params: form,
        }, msg)
    },
    //批量撤销 //数据类型，=1表示档案文件收集处的废除；=2时表示任务审批处的废除
    async batchRepealTaskArchive(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/task/batch-repeal-task-archive',
            method: 'post',
            data: form,
        }, msg)
    },

    //获取任务名称
    async reportTaskName(form) {
        return HcApi({
            url: '/api/blade-meter/task/name',
            method: 'get',
            params: form,
        }, false)
    },
    //任务上报
    async reportTaskForm(form) {
        return HcApi({
            url: '/api/blade-meter/task/report',
            method: 'post',
            data: form,
        }, false)
    },
}
