From 7b38cbd5c0af64e2f11e02d4d2e0ea6cbb1c09f5 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 09 十一月 2026 17:05:06 +0800
Subject: [PATCH] 测试完成
---
src/main.js | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/main.js b/src/main.js
index ebc84a8..c179d8e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -51,6 +51,7 @@
import {
parseTime,
formatTime,
+ followupAuthority,
resetForm,
addDateRange,
selectDictLabel,
@@ -92,6 +93,14 @@
Vue.filter(key, filters[key]);
}
import moment from "moment"
+// 1. 鍦╩ain.js涓坊鍔犻敊璇洃鍚�
+window.addEventListener('unhandledrejection', (event) => {
+ if (event.reason && event.reason.message &&
+ event.reason.message.includes('Loading chunk')) {
+ // 閲嶆柊鍔犺浇椤甸潰
+ window.location.reload();
+ }
+});
Vue.prototype.$moment = moment;
@@ -103,6 +112,7 @@
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;
@@ -142,6 +152,19 @@
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,
--
Gitblit v1.9.3