import 'antd/es/button/style';
import _Button from 'antd/es/button';
import _map from 'lodash/map';
import _get from 'lodash/get';
import { b as __awaiter, c as __generator } from './index.js';
import { MyBaseList } from '@lm_fe/pages';
import { mchcEnv } from '@lm_fe/env';
import { getMomentRange, formatDate, request } from '@lm_fe/utils';
import React__default from 'react';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/size';
import 'lodash/orderBy';
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, {
    name: "/api/prenatal-visits/upload-logs",
    searchParams: {
      'visitType.equals': 0
    },
    needChecked: true,
    useListSourceCount: true,
    initialSearchValue: {
      validateDate: getMomentRange().近一周.map(formatDate)
    },
    searchConfig: [{
      label: '分娩日期',
      name: 'labourDate',
      inputType: 'rangeDate'
    }, {
      label: '就诊卡号',
      name: 'outpatientNO',
      inputType: 'Input'
    }, {
      label: '姓名',
      name: 'name',
      inputType: 'Input'
    }, {
      label: '上报状态',
      name: 'uploadState',
      inputType: 'MS',
      inputProps: {
        optionKey: '上报状态'
      }
    }],
    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/reportLabourRecord', {
                ids: selectRows.map(function (_) {
                  return _.id;
                })
              });
              ctx.handleSearch();
              return [2];
            });
          });
        }
      }, "\u4E0A\u62A5");
    },
    tableColumns: [{
      title: '产妇姓名',
      dataIndex: 'name'
    }, {
      title: '住院号',
      dataIndex: 'inpatientNO'
    }, {
      title: '证件号码',
      dataIndex: 'idNO'
    }, {
      title: '分娩孕周',
      dataIndex: 'labourWeek'
    }, {
      title: '分娩日期',
      dataIndex: 'labourDate'
    }, {
      title: '分娩时间',
      dataIndex: 'labourTime'
    }, {
      title: '第一产程',
      dataIndex: 'firststage',
      render: function render(value, record) {
        return "".concat(Number(_get(record, 'firststageh')), " \u65F6 ").concat(_get(record, 'firststagem') || 0, "\u5206");
      }
    }, {
      title: '第二产程',
      dataIndex: 'secondstage',
      render: function render(value, record) {
        return "".concat(Number(_get(record, 'secondstageh')), " \u65F6 ").concat(_get(record, 'secondstagem') || 0, "\u5206");
      }
    }, {
      title: '第三产程',
      dataIndex: 'thirdstage',
      render: function render(value, record) {
        return "".concat(Number(_get(record, 'thirdstageh')), " \u65F6 ").concat(_get(record, 'thirdstagem') || 0, "\u5206");
      }
    }, {
      title: '胎儿信息',
      align: 'center',
      children: [{
        title: '胎儿性别',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        inputType: 'MS',
        inputProps: {
          options: mchcEnv.get_options('性别4')
        }
      }, {
        title: '体重(kg)',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        render: function render(text) {
          return _map(text, function (item) {
            return /*#__PURE__*/React__default.createElement("div", {
              key: _get(item, 'id')
            }, _get(item, 'weight'));
          });
        }
      }, {
        title: '身长(cm)',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        render: function render(text) {
          return _map(text, function (item) {
            return /*#__PURE__*/React__default.createElement("div", {
              key: _get(item, 'id')
            }, _get(item, 'height'));
          });
        }
      }, {
        title: '阿氏评分1',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        render: function render(text) {
          return _map(text, function (item) {
            return /*#__PURE__*/React__default.createElement("div", {
              key: _get(item, 'id')
            }, _get(item, 'apgar1'));
          });
        }
      }, {
        title: '阿氏评分2',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        render: function render(text) {
          return _map(text, function (item) {
            return /*#__PURE__*/React__default.createElement("div", {
              key: _get(item, 'id')
            }, _get(item, 'apgar5'));
          });
        }
      }, {
        title: '阿氏评分3',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        render: function render(text) {
          return _map(text, function (item) {
            return /*#__PURE__*/React__default.createElement("div", {
              key: _get(item, 'id')
            }, _get(item, 'apgar10'));
          });
        }
      }, {
        title: '出生缺陷',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        render: function render(text) {
          return _map(text, function (item) {
            return /*#__PURE__*/React__default.createElement("div", {
              key: _get(item, 'id')
            }, _get(item, 'birthInjury'));
          });
        }
      }, {
        title: '分娩方式',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 100,
        inputType: 'MS',
        inputProps: {
          optionKey: '分娩方式'
        }
      }, {
        title: '胎方位',
        dataIndex: ['admission', 'noenateRecords'],
        key: 'noenateRecords',
        width: 130,
        inputType: 'MS',
        inputProps: {
          options: mchcEnv.get_options('胎方位12')
        }
      }]
    }, {
      title: '上报状态',
      dataIndex: 'uploadState',
      inputType: 'MS',
      inputProps: {
        optionKey: '上报状态',
        marshal: 0
      }
    }, {
      title: '上报说明',
      dataIndex: 'uploadMsg'
    }, {
      title: '上报时间',
      dataIndex: 'uploadDate'
    }]
  });
}
export { BreastCancerDataReport as default };
//# sourceMappingURL=pages.data-report.labour-record-common.js.map
