12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import { getInpatientNotice, getHospitalizationInfo } from './service';
- import history from '../../utils/history';
- import { reportApi } from '../../utils/cloudMonitorHelper';
- Component({
- data: {
- hospitalizationInfo: {},
- inpatientNotice: '',
- inpatientId: '',
- showOtherButton: false
- },
- didMount() {
- const {
- inpatientId,
- showOtherButton
- } = JSON.parse(JSON.stringify(this.$page.data.query));
- console.log(showOtherButton);
- this.setData({
- inpatientId,
- showOtherButton: showOtherButton === 'true'
- }, () => {
-
- this.getHospitalizationInfo();
- });
- this.getInpatientNoticeInfo();
-
- reportApi('入院登记成功');
- },
- methods: {
-
- async getInpatientNoticeInfo() {
- const inpatientNoticeResult = await getInpatientNotice();
- this.setData({
- inpatientNotice: inpatientNoticeResult.inpatientNotice || ''
- });
- },
-
- async getHospitalizationInfo() {
- const {
- inpatientId
- } = this.data;
- const hospitalizationInfo = await getHospitalizationInfo({
- inpatientId
- });
- this.setData({
- hospitalizationInfo
- });
- },
-
- onFinish() {
- history.push({
- title: '入院登记',
- pageType: 'admission-record'
- });
- },
-
- onPremiumReceived() {
- history.push({
- query: {
- inpatientId: this.data.inpatientId
- },
- title: '押金缴纳',
- pageType: 'deposit'
- });
- }
- }
- });
|