"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.BaseService = void 0;
var _utils = require("@vtx/utils");
var _ahooks = require("ahooks");
var BaseService = exports.BaseService = {
  useBaseInfo: function useBaseInfo(id) {
    var _useRequest = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/kanban/getOrderTask', {
          data: {
            id: id,
            coorType: 'bd09'
          }
        });
      }, {
        refreshDeps: [id]
      }),
      baseInfoRes = _useRequest.data;
    var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
    var baseInfo = [{
      label: '上报人',
      key: 'reportStaffName',
      value: info === null || info === void 0 ? void 0 : info.reportStaffName
    }, {
      label: '上报单位',
      key: 'reportManageUnitName',
      value: info === null || info === void 0 ? void 0 : info.reportManageUnitName
    }, {
      label: '上报时间',
      key: 'score',
      value: info === null || info === void 0 ? void 0 : info.reportDateTimeStr
    }, {
      label: '问题来源',
      key: 'problemFromStr',
      value: info === null || info === void 0 ? void 0 : info.problemFromStr
    }, {
      label: '问题分类',
      key: 'problemCategoryName',
      value: info === null || info === void 0 ? void 0 : info.problemCategoryName
    }, {
      label: '问题地址',
      key: 'address',
      value: info === null || info === void 0 ? void 0 : info.address
    }, {
      label: '责任人员',
      key: 'responsibleStaffNames',
      value: info === null || info === void 0 ? void 0 : info.responsibleStaffNames
    }, {
      label: '责任单位',
      key: 'responsibleUnitName',
      value: info === null || info === void 0 ? void 0 : info.responsibleUnitName
    }];
    var photos = (info === null || info === void 0 ? void 0 : info.photos) ? JSON.parse(info.photos) : [];
    var feedbackPhotos = (info === null || info === void 0 ? void 0 : info.feedbackPhotos) ? JSON.parse(info.feedbackPhotos) : [];
    var logs = (info === null || info === void 0 ? void 0 : info.logs) || [];
    return {
      baseInfo: baseInfo,
      photos: photos,
      feedbackPhotos: feedbackPhotos,
      logs: logs,
      baseInfoRes: baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data
    };
  }
};
//# sourceMappingURL=api.js.map
