/* eslint-disable camelcase */
/*
 * @Description:
 * @Author: leizhe
 * @Date: 2021-09-27 09:42:21
 * @LastEditTime: 2022-07-22 10:46:09
 * @LastEditors: leizhe
 */
import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';

// 加载巡检反馈
export const CM_Feedback_LoadPatrolFeedbacks = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_LoadPatrolFeedbacks`, data);

// 添加或修改巡检反馈
export const CM_Feedback_OperatePatrolFeedback = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_OperatePatrolFeedback`, data);

// 删除巡检反馈
export const CM_Feedback_RemovePatrolFeedback = patrolFeedbackIDs =>
  post(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_RemovePatrolFeedback?patrolFeedbackIDs=${patrolFeedbackIDs}`,
  );

// 查询巡检反馈
export const CM_Feedback_QueryPatrolFeedback = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_QueryPatrolFeedback`, query);

// 加载事件反馈表
export const CM_Feedback_LoadFeedbackTables = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_LoadFeedbackTables`, query);

// 加载触发事件
export const CM_Feedback_LoadFeedbackEvent = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_LoadFeedbackEvent`, query);

// 根据反馈表加载关联的字段
export const CM_Feedback_LoadFields = feedbackTableName =>
  get(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_LoadFields?feedbackTableName=${feedbackTableName}`,
  );

// 调整巡检反馈顺序
export const CM_Feedback_ChangPatrolOrder = patrolOrder =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Feedback_ChangPatrolOrder?patrolOrder=${patrolOrder}`);
