"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.BaseService = void 0;
var _utils = require("@vtx/utils");
var _ahooks = require("ahooks");
var BaseService = {
  useBaseInfo: function useBaseInfo(id) {
    var _useRequest = (0, _ahooks.useRequest)(function () {
        return _utils.request.post('/cloud/sjzt-reborn/api/v101/dataSet/execute', {
          data: JSON.stringify({
            code: 'ZYRY_STAFF_INFO',
            parameters: {
              staffId: id
            }
          })
        });
      }, {
        refreshDeps: [id]
      }),
      baseInfoRes = _useRequest.data;
    var info = baseInfoRes ? baseInfoRes.data[0] : {};
    var baseInfo = [{
      label: '编号',
      key: 'code',
      value: info === null || info === void 0 ? void 0 : info.code
    }, {
      label: '所属单位',
      key: 'deptName',
      value: info === null || info === void 0 ? void 0 : info.deptName
    }, {
      label: '性别',
      key: 'gender',
      value: info === null || info === void 0 ? void 0 : info.gender
    }, {
      label: '入职日期',
      key: 'updateTime',
      value: info === null || info === void 0 ? void 0 : info.updateTime
    }, {
      label: '在职状态',
      key: 'isLeaveName',
      value: info === null || info === void 0 ? void 0 : info.isLeaveName
    }, {
      label: '所属标段',
      key: 'tenderName',
      value: info === null || info === void 0 ? void 0 : info.tenderName
    }, {
      label: '行政区划',
      key: 'divisionName',
      value: info === null || info === void 0 ? void 0 : info.divisionName
    }];
    return {
      baseInfo: baseInfo,
      info: info
    };
  }
};
exports.BaseService = BaseService;
//# sourceMappingURL=api.js.map
