/* eslint-disable camelcase */
/*
 * @Description:
 * @Author: leizhe
 * @Date: 2021-07-23 10:42:58
 * @LastEditTime: 2021-12-03 11:26:01
 * @LastEditors: leizhe
 */
import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';

// 加载台账
export const GetCM_Ledger_LoadLedgers = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Ledger_LoadLedgers`, query);

// 加载台账表
export const GetCM_Ledger_LoadLedgerTable = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Ledger_LoadLedgerTable`, query);

// 查看对应台账
export const GetCMLedger_QueryLedgers = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCMLedger_QueryLedgers`, query);

// 编辑或新增台账
export const GetCMLedger_OperateLedger = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCMLedger_OperateLedger`, data);

// 删除台账
export const CM_Ledger_RmoveLedger = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Ledger_RmoveLedger`, query);

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

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

// 根据触发事件加载字段
export const LoadEventFields = query =>
  get(`${PUBLISH_SERVICE}/CaseManage/LoadEventFields`, query);

// 加载事件权限部门角色
export const CM_Event_LoadDepartmentAndRoles = query =>
  get(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_LoadDepartmentAndRoles`,
    query,
  );

// 修改事件类型
export const CM_Event_EditEventTable = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_EditEventTable`, data);

// 加载事件权限部门角色
export const GetCM_Event_QueryEventType = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Event_QueryEventType`, query);

// 添加事件类型表
export const CM_Event_AddEventTable = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_AddEventTable`, data);

// 删除事件类型表
export const CM_Event_RemoveEventTable = eventTypeIDs =>
  post(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_RemoveEventTable?eventTypeIDs=${eventTypeIDs}`,
  );

// 事件类型调序
export const CM_Event_ReOrder = eventTypeIDs =>
  post(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_ReOrder?eventTypeIDs=${eventTypeIDs}`,
  );

// 点击受理流程之后加载受理流程和权限,显示字段为FlowName，FlowRoles
export const GetCM_Event_LoadEvenFlows = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Event_LoadEvenFlows`, query);

// 点击添加之后加载受理流程集
export const CM_Event_ReloadFlows = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_ReloadFlows`, query);

// 添加受理流程
export const CM_Event_AddEvenFlow = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_AddEvenFlow`, query);

// 编辑受理流程
export const CM_Event_EditEvenFlow = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_EditEvenFlow`, query);

// 删除受理流程
export const CM_Event_RemoveEvenFlow = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_RemoveEvenFlow`, query);

// 加载事件辅助视图配置信息
export const CM_Event_ReloadEventExtendPages = query =>
  get(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_ReloadEventExtendPages`,
    query,
  );

// 添加或修改事件辅助视图配置
export const CM_Event_OperateEventExtendPage = data =>
  post(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_OperateEventExtendPage`,
    data,
  );

// 查询事件辅助视图配置信息
export const GetEventExtendPage = query =>
  get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetEventExtendPage`, query);

// 删除事件辅助视图配置
export const CM_Event_RemoveEventExtendPage = query =>
  get(
    `${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_RemoveEventExtendPage`,
    query,
  );
