import http from '../common/http'

const JobExecutionManagementService = {
    getAllOperationList: (payload) => {
        return http.post(`/jobExecManagement/all`, payload)
            .then(({ data }) => {
                return data
            })
            .catch(err => {
                console.log("job execution service err", err);
                throw err
            })
    },
    getErrorOperationList: (data={}) => {
        return http.post(`/jobExecManagement/error`, data)
            .then(({ data }) => {
                return data
            })
            .catch(err => {
                console.log("job execution service err", err);
                throw err
            })
    },
    getDuringOperationList: (data={}) => {
        return http.post(`/jobExecManagement/during`, data)
            .then(({ data }) => {
                return data
            })
            .catch(err => {
                console.log("job execution service err", err);
                throw err
            })
    },
    getTimeZone: (data) => {
        return http.post(`/jobExecutionResult/getTimeZone`, data)
        .then(({ data }) => {
                return data
            })
            .catch(err => {
                console.log("Auth service err", err);
                throw err
            })
    },
    getJobArrangerStandardTime: (data) => {
        return http.post(`/jobExecutionResult/getJobArrangerStandardTime`, data)
        .then(({ data }) => {
            return data
        })
        .catch(err => {
            console.log("Auth service err", err);
            throw err
        })
    }
};

export default JobExecutionManagementService;