"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _ahooks = require("ahooks");
var _vmTable = _interopRequireDefault(require("../vm-table"));
var _vmSubTabs = require("../vm-sub-tabs");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var List = function List(props) {
  var zgData = props.zgData,
    khData = props.khData;
  var _useSetState = (0, _ahooks.useSetState)({
      filterKey: 'kh'
    }),
    _useSetState2 = _slicedToArray(_useSetState, 2),
    state = _useSetState2[0],
    setState = _useSetState2[1];
  var filterKey = state.filterKey;
  // const { khData, zgData } = BaseService.useAppraisal(id, startTime, endTime);
  var columns = [{
    title: '考核扣分',
    dataIndex: 'totalDeductPoints',
    key: 'totalDeductPoints'
  }, {
    title: '考核时间',
    dataIndex: 'checkDate',
    key: 'checkDate',
    width: 140
  }, {
    title: '考核单位',
    dataIndex: 'checkDepartName',
    key: 'checkDepartName',
    width: 160,
    ellipsis: true
  }, {
    title: '考核人',
    dataIndex: 'checkUserName',
    key: 'checkUserName'
  }, {
    title: '记录状态',
    dataIndex: 'statusName',
    key: 'statusName'
  }, {
    title: '操作',
    dataIndex: 'operation',
    key: 'operation',
    render: function render() {
      return /*#__PURE__*/_react["default"].createElement("a", {
        onClick: function onClick() {}
      }, "\u67E5\u770B\u56FE\u7247\u96C6");
    }
  }];
  var zgColumns = [{
    title: '问题来源',
    dataIndex: 'problemFromStr',
    key: 'problemFromStr'
  }, {
    title: '问题分类',
    dataIndex: 'problemCategoryName',
    key: 'problemCategoryName'
  }, {
    title: '问题描述',
    dataIndex: 'memo',
    key: 'memo',
    ellipsis: true
  }, {
    title: '上报时间',
    dataIndex: 'reportDateTimeStr',
    key: 'reportDateTimeStr'
  }, {
    title: '上报单位',
    dataIndex: 'responsibleUnitName',
    key: 'responsibleUnitName'
  }, {
    title: '上报人员',
    dataIndex: 'reportStaffName',
    key: 'reportStaffName'
  }, {
    title: '状态',
    dataIndex: 'orderStatusStr',
    key: 'orderStatusStr'
  }, {
    title: '操作',
    dataIndex: 'operation',
    key: 'operation',
    render: function render() {
      return /*#__PURE__*/_react["default"].createElement("a", {
        onClick: function onClick() {}
      }, "\u67E5\u770B\u56FE\u7247\u96C6");
    }
  }];
  var tableProps = {
    height: 440,
    pagination: {
      current: 1,
      pageSize: 10
    }
  };
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "appraisal-content-list"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTabs.SubTabsLine, {
    items: [{
      label: "\u8003\u6838 (".concat(khData.length, ")"),
      key: 'kh'
    }, {
      label: "\u6574\u6539 (".concat(zgData.length, ")"),
      key: 'zg'
    }],
    activeKey: filterKey,
    onChange: function onChange(key) {
      setState({
        filterKey: key
      });
    }
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "appraisal-content-list-table"
  }, /*#__PURE__*/_react["default"].createElement(_vmTable["default"], Object.assign({
    columns: filterKey === 'kh' ? columns : zgColumns,
    rowKey: "key"
  }, tableProps, {
    dataSource: filterKey === 'kh' ? khData : zgData
  }))));
};
var _default = List;
exports["default"] = _default;
//# sourceMappingURL=List.js.map
