import {httpApi} from "../../request/httpApi";

export default {
    //分页获取计划列表
    async getPage(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentMonthPlan/getPage',
            method: 'get',
            params: form
        }, msg);
    },
 //获取部门列表
    async getDepartmentDict(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentMonthPlan/getDepartmentDict',
            method: 'get',
            params: form
        }, msg);
    },
    //查询部门月度计划
    async getDepartmentPlan(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentMonthPlan/getDepartmentPlan',
            method: 'post',
            data: form
        }, msg);
    },
    //新增部门月计划
    async addDepartmentPlan(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentMonthPlan/addDepartmentPlan',
            method: 'post',
            data: form
        }, msg);
    },
    //开启时获取计划
    async getPlanInOpen(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentPlanLog/getPlanInOpen',
            method: 'get',
            params: form
        }, msg);
    },
    //暂停时获取计划
    async getPlanInPause(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentPlanLog/getPlanInPause',
            method: 'get',
            params: form
        }, msg);
    },
    //修改部门月度计划
    async updateDepartmentPlan(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentMonthPlan/updateDepartmentPlan',
            method: 'post',
            data: form
        }, msg);
    },
    //删除部门月度计划
    async deleteById(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentMonthPlan/deleteById',
            method: 'get',
            params: form
        }, msg);
    },
    //开启计划保存
    async savePlanInOpen(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentPlanLog/savePlanInOpen',
            method: 'post',
            data: form
        }, msg);
    },
    //暂停计划保存
    async savePlanInPause(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/departmentPlanLog/savePlanInPause',
            method: 'post',
            data: form
        }, msg);
    },


}
