import 'antd/es/table/style';
import _Table from 'antd/es/table';
import 'antd/es/button/style';
import _Button from 'antd/es/button';
import 'antd/es/tag/style';
import _Tag from 'antd/es/tag';
import { s as styleInject, d as __assign } from './index.js';
import { mchcModal__ } from '@lm_fe/pages';
import { SZsy_CtgRecord } from '@lm_fe/service';
import React__default from 'react';
var css_248z = ":global(.ant-carousel .slick-prev,\n    .ant-carousel .slick-next,\n    .ant-carousel .slick-prev:hover,\n    .ant-carousel .slick-next:hover) {\n  font-size: inherit;\n  color: red;\n  background: yellow;\n}\n";
styleInject(css_248z);
function HistoryTable(_a) {
  var dataSource = _a.dataSource,
    pagination = _a.pagination,
    loading = _a.loading,
    size = _a.size,
    type = _a.type;
  function clickHandler(pv) {
    SZsy_CtgRecord.getReport(pv.id, type).then(function (printData) {
      mchcModal__.open('print_modal', {
        modal_data: {
          printData: printData
        }
      });
    });
  }
  return /*#__PURE__*/React__default.createElement(_Table, {
    size: size,
    loading: loading,
    rowKey: "id",
    pagination: pagination,
    bordered: true,
    style: {
      marginTop: 24
    },
    dataSource: dataSource,
    columns: [{
      title: '姓名',
      width: 100,
      render: function render(a, b) {
        return b.name;
      }
    }, {
      title: '就诊卡号',
      width: 60,
      render: function render(a, b) {
        return b.outpatientNo;
      }
    }, {
      title: '档案号',
      width: 200,
      render: function render(a, b) {
        return b.docNo;
      }
    }, {
      title: '日期',
      width: 200,
      render: function render(a, b) {
        return b.visitDate;
      }
    }, {
      title: '判图状态',
      width: 40,
      ellipsis: true,
      align: 'center',
      render: function render(a, b) {
        return b.state == 1 ? /*#__PURE__*/React__default.createElement(_Tag, {
          color: "green"
        }, "\u5DF2\u5224\u56FE") : /*#__PURE__*/React__default.createElement(_Tag, {
          color: "yellow"
        }, "\u672A\u5224\u56FE");
      }
    }, {
      title: '操作',
      render: function render(a, b) {
        return /*#__PURE__*/React__default.createElement(_Button, {
          onClick: function onClick() {
            return clickHandler(b);
          }
        }, "\u67E5\u770B");
      },
      width: 200
    }].map(function (_) {
      return __assign(__assign({}, _), {
        align: 'center'
      });
    })
  });
}
export { HistoryTable as H };
//# sourceMappingURL=HistoryTable.js.map
