| | |
| | | import { |
| | | parseTime, |
| | | formatTime, |
| | | followupAuthority, |
| | | resetForm, |
| | | addDateRange, |
| | | selectDictLabel, |
| | |
| | | Vue.filter(key, filters[key]); |
| | | } |
| | | import moment from "moment" |
| | | // 1. 在main.js中添加错误监听 |
| | | window.addEventListener('unhandledrejection', (event) => { |
| | | if (event.reason && event.reason.message && |
| | | event.reason.message.includes('Loading chunk')) { |
| | | // 重新加载页面 |
| | | window.location.reload(); |
| | | } |
| | | }); |
| | | |
| | | Vue.prototype.$moment = moment; |
| | | |
| | |
| | | Vue.prototype.formatTime = formatTime; |
| | | Vue.prototype.daysBetween = daysBetween; |
| | | Vue.prototype.resetForm = resetForm; |
| | | Vue.prototype.followupAuthority = followupAuthority; |
| | | Vue.prototype.addDateRange = addDateRange; |
| | | Vue.prototype.selectDictLabel = selectDictLabel; |
| | | Vue.prototype.selectDictLabels = selectDictLabels; |
| | |
| | | |
| | | Vue.config.productionTip = false; |
| | | |
| | | // 全局注入机构判断(省立同德系列 / 纯省立同德院区)。 |
| | | // 所有组件无需单独注册 computed,模板与 this 中可直接使用 isTongdeOrg / isTongdeCampus |
| | | Vue.mixin({ |
| | | computed: { |
| | | isTongdeOrg() { |
| | | return this.$store.getters.isTongdeOrg; // 是否省立同德系列院区(含南华大学附属第一医院) |
| | | }, |
| | | isTongdeCampus() { |
| | | return this.$store.getters.isTongdeCampus;// 是否纯省立同德院区(不含南华大学附属第一医院) |
| | | }, |
| | | }, |
| | | }); |
| | | |
| | | new Vue({ |
| | | el: "#app", |
| | | router, |