import {
	request
} from '../libs/request.js'

// 保存单个管控措施巡检记录
export function updateCheckTaskDoingRecord(data) {
	return request({
		url: '/check/task/doing/item/update',
		method: 'PUT',
		data
	})
}
/**
 * 添加CheckTask
 * @param data
 * @returns {AxiosPromise}
 */
export function createCheckTask(data) {
	return request({
		url: `/check/task/quick/add`,
		method: 'POST',
		data
	})
}

/**
 * 校验当前任务是否全部巡检完成
 */
export function verifyCheckTaskDoingIsComplete(taskId) {
	return request({
		url: `/check/task/doing/item/verifyCheckTaskDoingIsComplete/` + taskId
	})
}

//检查表全部通过
export function batchUpdateCheckTaskDoingRecord(taskId) {
	return request({
		url: '/check/task/doing/item/batchUpdate/' + taskId + "/1",
		method: 'PUT'
	})
}
//完成任务
export function completeCheckTaskDoingRecord(taskId) {
	return request({
		url: '/check/task/complete/' + taskId,
		method: 'PUT'
	})
}
//获取检查记录分页列表
export function getCheckRecordByPage(data) {
	return request({
		url: '/check/record/page/',
		data
	})
}
