/* eslint-disable camelcase */
/*
 * @Description:
 * @Author: leizhe
 * @Date: 2021-07-23 10:42:58
 * @LastEditTime: 2023-02-08 17:02:25
 * @LastEditors: dengchao 754083046@qq.com
 */
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 CM_Event_EditBusinessType = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Event_EditBusinessType`, 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 =>
  post(`${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);
// 事件导入检查
export const CheckImportEventConfig = query =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CheckImportEventConfig`, query, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=UTF-8',
    },
  });
// 事件导入
export const ImportEventConfig = query =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/ImportEventConfig`, query, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=UTF-8',
    },
  });
// 导出
export const ExportEventConfig = query =>
  `${PUBLISH_SERVICE}/WorkOrderCenter/ExportEventConfig?eventTypeId=${query.eventTypeId}`;
// 导出台账
export const ExportLedgerConfig = query =>
  `${PUBLISH_SERVICE}/WorkOrderCenter/ExportLedgerConfig?ledgerId=${query.ledgerId}`;

// 导入台账检查
export const CheckImportLedgerConfig = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/CheckImportLedgerConfig`, data);

// 导入台账
export const ImportLedgerConfig = data =>
  post(`${PUBLISH_SERVICE}/WorkOrderCenter/ImportLedgerConfig`, data);
