import service from "@/utils/requestSystem";


export function GetLoginResourceTree(params) {
    return service({
        url: '/api/sys/Resources/GetLoginResourceTree',
        method: 'get',
        params
    })
}

export function GetOwnerUnitPage(params) {
    return service({
        url: '/api/sys/OwnerUnit/GetPage',
        method: 'get',
        params
    })
}

export function PostOwnerUnit(data) {
    return service({
        url: '/api/sys/OwnerUnit/Post',
        method: 'post',
        data
    })
}

export function PutOwnerUnit(data) {
    return service({
        url: '/api/sys/OwnerUnit/Put',
        method: 'put',
        data
    })
}

export function DeleteOwnerUnit(data) {
    return service({
        url: `/api/sys/OwnerUnit/Delete/${data}`,
        method: 'delete',
    })
}

export function GetSectionPage(params) {
    return service({
        url: '/api/sys/Section/GetPage',
        method: 'get',
        params
    })
}

export function PostSection(data) {
    return service({
        url: '/api/sys/Section/Post',
        method: 'post',
        data
    })
}

export function PutSection(data) {
    return service({
        url: '/api/sys/Section/Put',
        method: 'put',
        data
    })
}

export function DeleteSection(data) {
    return service({
        url: `/api/sys/Section/Delete/${data}`,
        method: 'delete',
    })
}


export function UploadAttachment(data, config) {
    return service({
        url: '/api/sys/AttachmentConfig/UploadAttachment',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'multipart/form-data',
            'Custom-Header': 'CustomValue',
        },
        ...config
    })
}

export function UpdateFile(params) {
    return service({
        url: '/api/sys/OtherAttachments/UpdateFile',
        method: 'put',
        params
    })
}

export function GetAttacBusinessId(params) {
    return service({
        url: '/api/sys/OtherAttachments/GetAttacBusinessId',
        method: 'get',
        params
    })
}

export function DeleteAttachment(data) {
    return service({
        url: `/api/sys/AttachmentConfig/DeleteAttachment/`,
        method: 'delete',
        data,
    })
}

// export function DeleteAttachment(params) {
//     return service({
//         url: '/api/sys/OtherAttachments/DeleteAttachment',
//         method: 'delete',
//         params
//     })
// }


export function GetProjectInfoPage(params) {
    return service({
        url: '/api/sys/ProjectInfo/GetPage',
        method: 'get',
        params
    })
}

export function PostProjectInfo(data) {
    return service({
        url: '/api/sys/ProjectInfo/Post',
        method: 'post',
        data
    })
}

export function PutProjectInfo(data) {
    return service({
        url: '/api/sys/ProjectInfo/Put',
        method: 'put',
        data
    })
}

export function DeleteProjectInfo(data) {
    return service({
        url: `/api/sys/ProjectInfo/Delete/${data}`,
        method: 'delete',
    })
}


export function GetLaborTeamPage(params) {
    return service({
        url: '/api/sys/LaborTeam/GetPage',
        method: 'get',
        params
    })
}

export function PostLaborTeam(data) {
    return service({
        url: '/api/sys/LaborTeam/Post',
        method: 'post',
        data
    })
}

export function PutLaborTeam(data) {
    return service({
        url: '/api/sys/LaborTeam/Put',
        method: 'put',
        data
    })
}

export function DeleteLaborTeam(data) {
    return service({
        url: `/api/sys/LaborTeam/Delete/${data}`,
        method: 'delete',
    })
}


export function GetWorkerGroupPage(params) {
    return service({
        url: '/api/sys/WorkerGroup/GetPage',
        method: 'get',
        params
    })
}


export function GetDictionaryGetPage(params) {
    return service({
        url: '/api/sys/Dictionary/GetPage',
        method: 'get',
        params
    })
}

export function GetDictionaryidDicItems(params) {
    return service({
        url: '/api/sys/Dictionary/GetDictionaryidDicItems',
        method: 'get',
        params
    })
}

export function ResetPassword(data) {
    return service({
        url: `/api/sys/User/ResetPassword/ResetPassword`,
        method: 'post',
        data
    })
}

