import config from "@/config"
import http from "@/utils/request"

export default {
	work: {
		list: {
			url: `${config.API_URL}/carbon/work/`,
			name: "获取列表",
			req: async function(data){
				return await http.get(this.url, data);
			}
		},
        my: {
			url: `${config.API_URL}/carbon/work/my/`,
			name: "获取列表",
			req: async function(data){
				return await http.get(this.url, data);
			}
		},
        item: {
            name: "获取单个核算工作",
            req: async function(id){
                return await http.get(`${config.API_URL}/carbon/work/${id}/`);
            }
        },
		create: {
			url: `${config.API_URL}/carbon/work/`,
			name: "新增",
			req: async function(data){
				return await http.post(this.url,data);
			}
		},
        cal_dq: {
            req: async function(id, data){
                return await http.post(`${config.API_URL}/carbon/work/${id}/cal_dq/`, data);
            }
        },
        cal_dh: {
            req: async function(id, data){
                return await http.post(`${config.API_URL}/carbon/work/${id}/cal_dh/`, data);
            }
        }
	},
}