import request from '@/common/request.js';

// 获取当前登录人的菜单显示
export const queryTaskMenu = () => {
	return request.get('/api/v1/teaching_plan/collect/collection_task/query_task_menu')
}
// 学年学期列表
export const getSchoolYearList = () => {
	return request.get('/api/v1/teaching_plan/collect/target_loading/find_school_year')
}
// 归属分类
export const getCategoryList = () => {
	return request.get('/api/v1/teaching_plan/collect/file_category/file_category_data')
}
// 总览列表
export const findCollectionTask = (data) => {
	return request.post('/api/v1/teaching_plan/collect/collection_task/find_collection_task', data)
}
//删除采集任务
export const deleteCollectionTask = (taskId) => {
	return request.post(`/api/v1/teaching_plan/collect/collection_task/delete_collection_task?taskId=${taskId}`)
}
// 提交材料列表
export const findTeacherTaskTargetList = (data) => {
	return request.post('/api/v1/teaching_plan/collect/task_target/find_teacher_task_target_list', data)
}
// 审核人列表
export const queryTeacherInfo = (data) => {
	return request.get(`/api/v1/teaching_plan/collect/target_loading/query_teacher_info?accountName=${data}`)
}
// 审核的任务列表
export const getTaskTargetReview = (data) => {
	return request.post('/api/v1/teaching_plan/collect/task_target_review/get_task_target_review', data)
}
// 获取任务详情，用于编辑采集任务
export const getCollectionTaskInfo = (taskId) => {
	return request.post(`/api/v1/teaching_plan/collect/collection_task/get_collection_task_info?taskId=${taskId}`)
}
// 新建采集任务
export const insertCollectionTask = (data) => {
	return request.post('/api/v1/teaching_plan/collect/collection_task/insert_collection_task',data)
}
// 更新采集任务
export const UpdateCollectionTask = (data) => {
	return request.post('/api/v1/teaching_plan/collect/collection_task/update_collection_task',data)
}
// 获取指定的采集任务详情
export const GetCollectionTask = (data) => {
  return request.get(`/api/v1/teaching_plan/collect/collection_task/get_collection_task?taskId=${data}`)
}
// 获取当前采集任务具体采集详情列表
export const getTaskTargetList = (data) => {
  return request.post('/api/v1/teaching_plan/collect/Task_statistics_info/get_task_target_list',data)
}
// 获取当前任务的筛选表头 和数据表的表头
export const getTaskSelectCommon = (taskId) => {
  return request.post(`/api/v1/teaching_plan/collect/Task_statistics_info/get_task_select_common?taskId=${taskId}`)
}
// 获取指定状态的采集任务列表
export const getReviewTaskList = (data) => {
  return request.post('/api/v1/teaching_plan/collect/task_target_review/get_review_task_list',data)
}
// 获取当前教师提交的文件列表
export const getTaskTargetFileList = (targetId) => {
  return request.post(`/api/v1/teaching_plan/collect/task_target_file/get_task_target_file_list?targetId=${targetId}`)
}
// 批量删除OSS文件
export const DeleteFileList = (data) => {
  return request.post('/api/v1/teach/oss/file/oss/delete_file_list',data)
}
//删除指定的文件
export const DelTaskTargetFileList = (data) => {
  return request.post('/api/v1/teaching_plan/collect/task_target_file/del_task_target_file_list', data)
}
// 修改教师任务提交状态为待提交
export const updateTaskTarget = (taskTargetId) => {
  return request.post(`/api/v1/teaching_plan/collect/task_target/update_task_target?taskTargetId=${taskTargetId}`)
}
// 具体采集任务保存上传的文件地址
export const uploadTaskTargetFileList = (data) => {
  return request.post('/api/v1/teaching_plan/collect/task_target_file/upload_task_target_file_list',data)
}
// 待审核的通过和驳回
export const updateReviewStatus = (data) => {
  return request.post('/api/v1/teaching_plan/collect/task_target_review/update_review_status',data)
}
// 已审核的通过和驳回
export const ChangeReviewStatus = (data) => {
  return request.post('/api/v1/teaching_plan/collect/task_target_review/change_review_status',data)
}
// 查询本学校下的当前学年的所有部门及部门下的人
export const findDepartContainUser = (schoolYearId) => {
  return request.get(`/api/v1/teaching_plan/collect/target_loading/find_depart_contain_user?schoolYearId=${schoolYearId}`)
}
//查询本学校下的当前学年的所有学科、年级、权限数据及下的人
export const findCollectPersonalInfo = (schoolYearId) => {
  return request.get(`/api/v1/teaching_plan/collect/target_loading/find_collect_personal_info?schoolYearId=${schoolYearId}`)
}