import 'antd/es/button/style';
import _Button from 'antd/es/button';
import { b as __awaiter, c as __generator } from './index.js';
import { MyBaseList } from '@lm_fe/pages';
import { getMomentRange, formatDate, request } from '@lm_fe/utils';
import React__default from 'react';
import '@lm_fe/env';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/size';
import 'lodash/get';
import 'lodash/orderBy';
import 'lodash/map';
import '@lm_fe/components';
import 'antd/es/collapse/style';
import 'antd/es/collapse';
import 'antd/es/badge/style';
import 'antd/es/badge';
import 'lodash/assign';
import '@ant-design/icons';
import '@lm_fe/components_m';
import '@lm_fe/service';
function BreastCancerDataReport(prop) {
  var _this = this;
  return /*#__PURE__*/React__default.createElement(MyBaseList, {
    needChecked: true,
    useListSourceCount: true,
    initialSearchValue: {
      validateDate: getMomentRange().近一周.map(formatDate)
    },
    searchConfig: [{
      label: '建档日期',
      name: 'validateDate',
      inputType: 'rangeDate'
    }, {
      label: '就诊卡号',
      name: 'outpatientNO',
      inputType: 'Input'
    }, {
      label: '姓名',
      name: 'name',
      inputType: 'Input'
    }, {
      label: '上报状态',
      name: 'uploadState',
      inputType: 'MS',
      inputProps: {
        optionKey: '上报状态'
      }
    }],
    name: "/api/pregnancies/upload-logs",
    showAction: false,
    showAdd: false,
    RenderBtns: function RenderBtns(ctx) {
      var selectRows = ctx.getCheckRows();
      return /*#__PURE__*/React__default.createElement(_Button, {
        disabled: !selectRows.length,
        onClick: function onClick() {
          return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
              request.post('/api/dataReport/reportPregnancy', {
                ids: selectRows.map(function (_) {
                  return _.id;
                })
              });
              ctx.handleSearch();
              return [2];
            });
          });
        }
      }, "\u4E0A\u62A5");
    },
    tableColumns: [{
      title: '建档日期',
      dataIndex: 'validateDate'
    }, {
      title: '姓名',
      dataIndex: 'name'
    }, {
      title: '就诊卡号',
      dataIndex: 'outpatientNO'
    }, {
      title: '身份证号',
      dataIndex: 'idNO'
    }, {
      title: '审核人',
      dataIndex: 'auditorName'
    }, {
      title: '上报状态',
      dataIndex: 'uploadState',
      inputType: 'MS',
      inputProps: {
        optionKey: '上报状态',
        marshal: 0
      }
    }, {
      title: '上报说明',
      dataIndex: 'uploadMsg'
    }, {
      title: '上报时间',
      dataIndex: 'uploadDate'
    }]
  });
}
export { BreastCancerDataReport as default };
//# sourceMappingURL=pages.data-report.admission-visit.js.map
