import 'antd/es/popconfirm/style';
import _Popconfirm from 'antd/es/popconfirm';
import _get from 'lodash/get';
import { _ as __extends, a as __spreadArray } from './index.js';
import React__default from 'react';
import { BaseTableOld, BaseQuery, formatTimeToStandard, BaseListOld } from '@lm_fe/components_m';
import { APP_CONFIG } from '@lm_fe/env';
import { EyeOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/size';
import '@lm_fe/utils';
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 'antd/es/button/style';
import 'antd/es/button';
import 'lodash/assign';
import '@lm_fe/service';
import '@lm_fe/pages';
var ProductsTable = function (_super) {
  __extends(ProductsTable, _super);
  function ProductsTable() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  return ProductsTable;
}(BaseTableOld);
var queryFormDescriptions = {
  name: {
    label: '孕妇姓名',
    inputType: 'input',
    filterType: ''
  },
  idNO: {
    label: '证件号码',
    inputType: 'input',
    filterType: ''
  }
};
var Query = function (_super) {
  __extends(Query, _super);
  function Query() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.state = {
      queryFormDescriptions: queryFormDescriptions
    };
    return _this;
  }
  return Query;
}(BaseQuery);
var tableColumns = [{
  title: '住院号',
  dataIndex: 'inpatientNO',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE
}, {
  title: '病区号',
  dataIndex: 'areaNO',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE
}, {
  title: '房号',
  dataIndex: 'roomNO',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_SMALL
}, {
  title: '床号',
  dataIndex: 'bedNO',
  key: 'bedNO',
  width: APP_CONFIG.CELL_WIDTH_SMALL
}, {
  title: '孕妇姓名',
  dataIndex: 'name',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE
}, {
  title: '孕妇年龄',
  dataIndex: 'age',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE
}, {
  title: '出生日期',
  dataIndex: 'dob',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE
}, {
  title: '预产期',
  dataIndex: 'edd',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE
}, {
  title: '住院日期',
  dataIndex: 'adminDate',
  align: 'center',
  width: APP_CONFIG.CELL_WIDTH_MIDDLE,
  render: function render(value) {
    return formatTimeToStandard(value);
  }
}];
var List = function (_super) {
  __extends(List, _super);
  function List() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.columns = __spreadArray(__spreadArray([], _this.props.tableColumns, true), [{
      title: '操作',
      showSorter: false,
      showFilter: false,
      fixed: 'right',
      width: 158,
      align: 'center',
      render: function render(value, rowData, index) {
        return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(EyeOutlined, {
          className: "global-table-action-icon global-table-action-view",
          title: "\u67E5\u770B",
          onClick: _this.handleView(rowData)
        }), /*#__PURE__*/React__default.createElement(EditOutlined, {
          className: "global-table-action-icon global-table-action-view",
          title: "\u7F16\u8F91",
          onClick: _this.handleEdit(rowData)
        }), /*#__PURE__*/React__default.createElement(_Popconfirm, {
          title: "\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A".concat(_get(_this.props, 'baseTitle'), "\u5417?"),
          onConfirm: _this.handleDelete(rowData),
          okText: "\u786E\u5B9A",
          cancelText: "\u53D6\u6D88"
        }, /*#__PURE__*/React__default.createElement(DeleteOutlined, {
          className: "global-table-action-icon global-table-action-delete",
          title: "\u5220\u9664"
        })));
      }
    }], false);
    _this.handleAdd = function () {
      var history = _this.props.history;
      history.push('/deliver-management/admission/add');
    };
    _this.handleView = function (rowData) {
      return function () {
        var id = rowData.id;
        var history = _this.props.history;
        history.push("/deliver-management/admission/deliver-edit?id=".concat(id));
      };
    };
    _this.handleEdit = function (rowData) {
      return function () {
        var id = rowData.id;
        var history = _this.props.history;
        history.push("/deliver-management/admission/edit?id=".concat(id));
      };
    };
    return _this;
  }
  List.defaultProps = {
    baseUrl: '/api/admissions',
    baseTitle: '统计',
    needPagination: true,
    showQuery: true,
    showAdd: true,
    tableColumns: tableColumns,
    rowKey: 'id',
    Table: ProductsTable,
    Query: Query,
    otherTableProps: {
      scroll: {
        x: 1596
      }
    }
  };
  return List;
}(BaseListOld);
var List$1 = List;
export { List$1 as default };
//# sourceMappingURL=pages.pregnant-school.statistics.js.map
