import request from '@/utils/request'

// 预警消息
export function update(data) {
	return request({
		url: '/system/warning',
		method: 'put',
		data:data
	})
}

// 预警消息
export function warningList(query) {
	return request({
		url: '/system/warning/list',
		method: 'get',
		params: query
	})
}

// 新增投诉工单
export function addOrder(data) {
	return request({
		url: '/system/order',
		method: 'post',
		data: data
	})
}

// 查询投诉列表
export function listuser(query) {
	return request({
		url: '/system/order/listuser',
		method: 'get',
		params: query
	})
}

// 查询工单列表
export function listOrder(query) {
	return request({
		url: '/system/order/list',
		method: 'get',
		params: query
	})
}

// 查询工单列表
export function recordOrder(id) {
	return request({
		url: '/system/record/list?workOrderId=' + id,
		method: 'get'
	})
}

// 签到/完成任务
export function record(query) {
	return request({
		url: '/system/order/task/record',
		method: 'post',
		data: query
	})
}

// 查询工单详情
export function getOrder(id) {
	return request({
		url: '/system/order/' + id,
		method: 'get'
	})
}