UNPKG

zhu-jiang-yi-yuan-bigscreen

Version:

南方医科大学珠江医院大屏端

114 lines (111 loc) 4.43 kB
import "antd/es/col/style"; import _Col from "antd/es/col"; import "antd/es/row/style"; import _Row from "antd/es/row"; import "antd/es/spin/style"; import _Spin from "antd/es/spin"; import { BackgroundBox, Indicators, OnValue } from '../../..'; import { Const } from '../../../../utils'; import { NConst } from 'nsn-const'; import { NDate } from 'nsn-util'; import React, { useEffect } from 'react'; import { connect } from 'umi'; import './index.less'; var CLS_PREFIX = "".concat(Const.CLS_PREFIX, "-hospitalization-summarize-year"); var TITLE = '年度住院情况'; var HospitalizationSummarizeYear = function HospitalizationSummarizeYear(props) { var _data$occupancyRate; var data = props.data, loading = props.loading, dispatch = props.dispatch, reloadData = props.reloadData; useEffect(function () { if (dispatch) { var now = NDate.now(); dispatch({ type: 'screen_data/yearly_hospital', payload: { year: now.year } }); } }, [reloadData]); return /*#__PURE__*/React.createElement(_Spin, { spinning: !!loading }, /*#__PURE__*/React.createElement(BackgroundBox, Object.assign({ title: TITLE }, props), /*#__PURE__*/React.createElement("div", { className: CLS_PREFIX }, /*#__PURE__*/React.createElement(_Row, null, /*#__PURE__*/React.createElement(_Col, { span: 8 }, /*#__PURE__*/React.createElement(Indicators, { title: "\u5165\u9662\u4EBA\u6570", value: data === null || data === void 0 ? void 0 : data.inPeopleNumber, yearOnYearValue: data === null || data === void 0 ? void 0 : data.inPeopleNumberYoY })), /*#__PURE__*/React.createElement(_Col, { span: 8 }, /*#__PURE__*/React.createElement(Indicators, { title: "\u51FA\u9662\u4EBA\u6570", value: data === null || data === void 0 ? void 0 : data.outNumber, yearOnYearValue: data === null || data === void 0 ? void 0 : data.outNumberYoY })), /*#__PURE__*/React.createElement(_Col, { span: 8 }, /*#__PURE__*/React.createElement(Indicators, { title: "\u624B\u672F\u4EBA\u6570", value: data === null || data === void 0 ? void 0 : data.surgeryNumber, yearOnYearValue: data === null || data === void 0 ? void 0 : data.surgeryNumberYoY }))), /*#__PURE__*/React.createElement("div", { className: "ping-jun-zhu-yuan-ri" }, "\u5E73\u5747\u4F4F\u9662\u65E5\uFF1A", /*#__PURE__*/React.createElement("span", { className: "value" }, (data === null || data === void 0 ? void 0 : data.equalDay) || NConst.DASHED), /*#__PURE__*/React.createElement(OnValue, { title: "\u540C\u671F\uFF1A", value: data === null || data === void 0 ? void 0 : data.equalDayYoY, isYearOnYear: true, style: { display: 'inline' }, className: "onvalue", notPercent: true }), /*#__PURE__*/React.createElement(OnValue, { title: "\u524D\u671F\uFF1A", value: data === null || data === void 0 ? void 0 : data.equalDayQoQ, style: { display: 'inline' }, className: "onvalue", notPercent: true })), /*#__PURE__*/React.createElement("div", { className: "chuang-wei-shi-yong-lv" }, "\u5E8A\u4F4D\u4F7F\u7528\u7387\uFF1A", /*#__PURE__*/React.createElement("span", { className: "value" }, (_data$occupancyRate = data === null || data === void 0 ? void 0 : data.occupancyRate) !== null && _data$occupancyRate !== void 0 ? _data$occupancyRate : NConst.DASHED, (data === null || data === void 0 ? void 0 : data.occupancyRate) ? '%' : NConst.EMPTY), /*#__PURE__*/React.createElement(OnValue, { title: "\u540C\u671F\uFF1A", value: data === null || data === void 0 ? void 0 : data.occupancyRateYoY, isYearOnYear: true, style: { display: 'inline' }, className: "onvalue", notPercent: true }), /*#__PURE__*/React.createElement(OnValue, { title: "\u524D\u671F\uFF1A", value: data === null || data === void 0 ? void 0 : data.occupancyRateQoQ, style: { display: 'inline' }, className: "onvalue", notPercent: true }))))); }; var ConnectedComp = connect(function (_ref) { var screen_data = _ref.screen_data, loading = _ref.loading; return { loading: loading.effects["screen_data/yearly_hospital"], data: screen_data.yearlyHospital }; })(HospitalizationSummarizeYear); export default (function (props) { return /*#__PURE__*/React.createElement(ConnectedComp, Object.assign({}, props)); });