import service from '../utils/js/request' const taskManage = { /** * 获取任务列表 * @param {Object} param */ getTask: function(param) { return service({ url: '/task/mp/page', method: 'POST', data: param }) }, /** * 建议获取个人任务 */ getSuggest: function(data) { return service({ url: "/task/mp/getSuggest", method: "get", data: data }) }, /** * 添加到今日任务 * @param {Object} params */ addToday: function(params) { return service({ url: "/task/today/add", method: "post", data: params }) }, /** * 完结结个人任务 * @param {Object} params */ taskFinish: function(params) { return service({ url: "/task/persontask/taskfinish", method: "post", data: params }) }, /** * 反完结个人任务 * @param {Object} params */ taskUnFinish: function(params) { return service({ url: "/task/persontask/taskunfinish", method: "post", data: params }) }, /** * 更改个人任务的重要性 * @param {Object} params */ changeImportant: function(params) { return service({ url: "/task/persontask/changeimportant", method: "post", data: params }) }, /** * 新增个人任务并添加到今日任务 * @param {Object} params */ addTodayTask: function(params) { return service({ url: "/task/persontask/addtoday", method: "post", data: params }) }, /** * 新增个人任务 * @param {Object} params */ addTask: function(params) { return service({ url: "/task/persontask/add", method: "post", data: params }) }, /** * 获取任务步骤 * @param {任务id} taskId */ getTaskStep: function(taskId) { return service({ url: "/task/step/list", method: "get", data: { taskId: taskId } }) }, /** * 新增任务步骤 * @param {任务步骤参数} params */ addStep: function(params) { return service({ url: "/task/step/add", method: "post", data: params }) }, /** * 完结任务步骤 * @param {任务步骤参数}} params */ stepFinish: function(params) { return service({ url: "/task/step/finish", method: "post", data: params }) }, /** * 反完结任务步骤 * @param {任务步骤参数} params */ stepUnFinish: function(params) { return service({ url: "/task/step/unfinish", method: "post", data: params }) }, /** * 删除步骤 * @param {任务步骤参数} params */ deleteStep: function(params) { return service({ url: "/task/step/delete", method: "post", data: params }) }, /** * 更新任务 * @param {任务参数}} params */ taskEdit: function(params) { return service({ url: "/task/persontask/edit", method: "post", data: params }) }, /** * 删除今日任务 * @param {任务参数} params * @returns */ deleteToday: function(params) { return service({ url: "/task/today/delete", method: "post", data: params }) }, /** * 获取今日任务 * @param {Object} taskId */ getFile: function(taskId) { return service({ url: "/task/file/list", method: "get", data: { "taskId": taskId } }) }, /** * 删除今日任务 * @param {Object} id * @param {Object} fileId */ deleteFile(id, fileId) { return service({ url: "/task/file/delete", method: "get", data: { id: id, fileId: fileId }, }) }, /** * 删除任务、今日任务、任务步骤、任务汇报等 * @param {任务参数} params */ deleteTask(params) { return service({ url: "/task/persontask/delete", method: "post", data: params }) }, } export default taskManage