"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _config = _interopRequireDefault(require("../../../_mapUtil/config"));
var _request = _interopRequireDefault(require("../../../_mapUtil/request"));
var _PublicService = _interopRequireDefault(require("../../../_mapUtil/PublicService"));
var _config2 = _interopRequireDefault(require("./config"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
 * 工单相关接口调用
 */
var changeUrlParams = _config2["default"].changeUrlParams;
var tenantId = _PublicService["default"].getQueryString('tenantId') || _PublicService["default"].getSystemInfo('tenantId') || '';
// 工单流程key
var otherParams = {
  processDefinitionKey: 'customer_service_process'
};
var _default = exports["default"] = {
  // 工单来源下拉选  code
  getSourceData: function getSourceData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get('/cloud/zhxt/case/source/list', {
      body: _objectSpread(_objectSpread({
        gradeType: 1
      }, otherParams), params)
    });
  },
  // 工单来源小类   code
  getSourceSmallData: function getSourceSmallData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    // parentId 工单来源id
    return _request["default"].get('/cloud/zhxt/case/source/list', {
      body: _objectSpread(_objectSpread({
        gradeType: 2
      }, otherParams), params)
    });
  },
  // 工单类别
  getOrderTypeData: function getOrderTypeData() {
    return _request["default"].get('/cloud/management/rest/np/param/getByParamTypeCode', {
      body: {
        parameters: JSON.stringify({
          paramTypeCode: 'zhsw_word_order_type',
          tenantId: tenantId
        })
      }
    });
  },
  // 工单性质
  getOrderNatureData: function getOrderNatureData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get('/cloud/zhxt/urgency/config/list', {
      body: _objectSpread(_objectSpread({}, otherParams), params)
    });
  },
  // 工单类别
  getOrderCategoryData: function getOrderCategoryData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get('/cloud/zhxt/event/and/component/manage/tree/loadConfigTree', {
      body: _objectSpread(_objectSpread({}, otherParams), params)
    });
  },
  // 根据当前为值查找所属网格
  getOrderAreaData: function getOrderAreaData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get('/cloud/zhxt/key/area/getByLngLats', {
      body: _objectSpread(_objectSpread({
        shapeType: 'point',
        coordinateType: 'wgs84',
        lngLats: '120.66827827693118,31.17674777352176'
      }, otherParams), params)
    });
  },
  // 获取事发区域、所属街道、所属社区
  getOrderAddress: function getOrderAddress() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    // levelEnd: 1省,2 市,3 区, 4 街道  5：社区 等级
    return _request["default"].get('/cloud/management/api/v101/tree/loadDivisionTree', {
      body: _objectSpread({
        isControlPermission: true
      }, params)
    });
  },
  // 办理状态
  getOrderStatusData: function getOrderStatusData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get("".concat(_config["default"].publicUrlSJGD, "/api/workOrder/allStatusList"), {
      body: _objectSpread(_objectSpread({}, otherParams), params)
    });
  },
  // 办理状态 --- 客服工单
  getOrderStatusDataService: function getOrderStatusDataService() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get("".concat(_config["default"].publicUrlZHXT, "/case/info/hang/zhou/hzKfAllStatusList"), {
      body: _objectSpread({}, params)
    });
  },
  // 案件超时数量
  getOrderOverTimeData: function getOrderOverTimeData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    // return http.get(`${config.publicUrlSJGD}/api/workOrder/overtimeStatistic`, {
    return _request["default"].get("".concat(_config["default"].publicUrlZHXT, "/case/info/overtimeStatistic"), {
      body: _objectSpread(_objectSpread({}, otherParams), params)
    });
  },
  // 办理状态数量统计
  getTicketNumberData: function getTicketNumberData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].get("".concat(_config["default"].publicUrlZHXT, "/case/info/hzStatistics"), {
      body: _objectSpread(_objectSpread({}, otherParams), params)
    });
  },
  // 工单统计数量
  getOrderNumberData: function getOrderNumberData() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return _request["default"].post("".concat(_config["default"].publicUrlSJGD, "/api/workOrderStatistics/workOrderStatus"), {
      body: _objectSpread(_objectSpread({}, otherParams), params)
    });
  },
  // 子公司撤回部门列表
  getBackDeptList: function getBackDeptList() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    var _params = changeUrlParams(params);
    return _request["default"].post("".concat(_config["default"].publicUrlZHXT, "/case/info/hang/zhou/backDeptList").concat(_params));
  },
  // 信息中心撤回子公司列表
  getBackCompanyList: function getBackCompanyList() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    var _params = changeUrlParams(params);
    return _request["default"].post("".concat(_config["default"].publicUrlZHXT, "/case/info/hang/zhou/backCompanyList").concat(_params));
  }
};
//# sourceMappingURL=service.js.map
