From bda4243d007a9791bf1df0e14d2053cf92a9eb94 Mon Sep 17 00:00:00 2001
From: yz <yz_0812@outlook.com>
Date: 星期五, 19 三月 2021 02:11:58 +0800
Subject: [PATCH] 添加首页延时加载

---
 src/views/dashboard/ctUser.vue |   32 +++++-----
 src/views/dashboard/qjUser.vue |    8 +-
 src/views/dashboard/ywUser.vue |   14 ++--
 src/views/dashboard/lzUser.vue |   14 ++--
 src/views/dashboard/ygUser.vue |   32 +++++-----
 src/views/dashboard/HtUser.vue |    8 +-
 src/views/dashboard/gsUser.vue |   14 ++--
 src/views/dashboard/sbUser.vue |   20 +++---
 src/views/dashboard/tgUser.vue |    8 +-
 src/views/dashboard/tjUser.vue |   14 ++--
 10 files changed, 92 insertions(+), 72 deletions(-)

diff --git a/src/views/dashboard/HtUser.vue b/src/views/dashboard/HtUser.vue
index 03da2c2..3b2cc60 100644
--- a/src/views/dashboard/HtUser.vue
+++ b/src/views/dashboard/HtUser.vue
@@ -109,9 +109,11 @@
     }
   },
   mounted() {
-    this.getDicts('CONTRACTSTATUS').then(response => {
-      this.contractStatusOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('CONTRACTSTATUS').then(response => {
+        this.contractStatusOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     contractStatusFormat(row, column) {
diff --git a/src/views/dashboard/ctUser.vue b/src/views/dashboard/ctUser.vue
index 8846878..1336805 100644
--- a/src/views/dashboard/ctUser.vue
+++ b/src/views/dashboard/ctUser.vue
@@ -129,21 +129,23 @@
     }
   },
   mounted() {
-    this.getDicts('EDUCATION').then(response => {
-      this.educationOptions = response.data
-    })
-    this.getDicts('NATIVEPLACE').then(response => {
-      this.nativePlaceOptions = response.data
-    })
-    this.getDicts('sex').then(response => {
-      this.sexOptions = response.data
-    })
-    this.getDicts('empType').then(response => {
-      this.empTypeOptions = response.data
-    })
-    this.getDicts('NATION').then(response => {
-      this.nationOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('EDUCATION').then(response => {
+        this.educationOptions = response.data
+      })
+      this.getDicts('NATIVEPLACE').then(response => {
+        this.nativePlaceOptions = response.data
+      })
+      this.getDicts('sex').then(response => {
+        this.sexOptions = response.data
+      })
+      this.getDicts('empType').then(response => {
+        this.empTypeOptions = response.data
+      })
+      this.getDicts('NATION').then(response => {
+        this.nationOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     educationFormat(row, column) {
diff --git a/src/views/dashboard/gsUser.vue b/src/views/dashboard/gsUser.vue
index 27b32af..363200a 100644
--- a/src/views/dashboard/gsUser.vue
+++ b/src/views/dashboard/gsUser.vue
@@ -119,12 +119,14 @@
     }
   },
   mounted() {
-    this.getDicts('hospitalizatioFlag').then(response => {
-      this.hospitalizatioFlagOptions = response.data
-    })
-    this.getDicts('settleStatus').then(response => {
-      this.settleStatusOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('hospitalizatioFlag').then(response => {
+        this.hospitalizatioFlagOptions = response.data
+      })
+      this.getDicts('settleStatus').then(response => {
+        this.settleStatusOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     hospitalizatioFlagFormat(row, column) {
diff --git a/src/views/dashboard/lzUser.vue b/src/views/dashboard/lzUser.vue
index 8c058e8..924a3df 100644
--- a/src/views/dashboard/lzUser.vue
+++ b/src/views/dashboard/lzUser.vue
@@ -112,12 +112,14 @@
     }
   },
   mounted() {
-    this.getDicts('ZCTYPE').then(response => {
-      this.arbitrationTypeOptions = response.data
-    })
-    this.getDicts('archivesStatus').then(response => {
-      this.archivesStatusOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('ZCTYPE').then(response => {
+        this.arbitrationTypeOptions = response.data
+      })
+      this.getDicts('archivesStatus').then(response => {
+        this.archivesStatusOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     arbitrationTypeFormat(row, column) {
diff --git a/src/views/dashboard/qjUser.vue b/src/views/dashboard/qjUser.vue
index f914ebf..fe42daa 100644
--- a/src/views/dashboard/qjUser.vue
+++ b/src/views/dashboard/qjUser.vue
@@ -111,9 +111,11 @@
     }
   },
   mounted() {
-    this.getDicts('LEAVETYPE').then(response => {
-      this.leaveTypeOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('LEAVETYPE').then(response => {
+        this.leaveTypeOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     leaveTypeFormat(row, column) {
diff --git a/src/views/dashboard/sbUser.vue b/src/views/dashboard/sbUser.vue
index bb8438e..56daddd 100644
--- a/src/views/dashboard/sbUser.vue
+++ b/src/views/dashboard/sbUser.vue
@@ -112,15 +112,17 @@
     }
   },
   mounted() {
-    this.getDicts('insuranceGaers').then(response => {
-      this.insuranceGaersOptions = response.data
-    })
-    this.getDicts('applayStatus').then(response => {
-      this.applayStatusOptions = response.data
-    })
-    this.getDicts('reportStatus').then(response => {
-      this.reportStatusOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('insuranceGaers').then(response => {
+        this.insuranceGaersOptions = response.data
+      })
+      this.getDicts('applayStatus').then(response => {
+        this.applayStatusOptions = response.data
+      })
+      this.getDicts('reportStatus').then(response => {
+        this.reportStatusOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     insuranceGaersFormat(row, column) {
diff --git a/src/views/dashboard/tgUser.vue b/src/views/dashboard/tgUser.vue
index 171b265..2dc9f78 100644
--- a/src/views/dashboard/tgUser.vue
+++ b/src/views/dashboard/tgUser.vue
@@ -110,9 +110,11 @@
     }
   },
   mounted() {
-    this.getDicts('changeType').then(response => {
-      this.changeTypeOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('changeType').then(response => {
+        this.changeTypeOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     changeTypeFormat(row, column) {
diff --git a/src/views/dashboard/tjUser.vue b/src/views/dashboard/tjUser.vue
index 149120d..028e773 100644
--- a/src/views/dashboard/tjUser.vue
+++ b/src/views/dashboard/tjUser.vue
@@ -113,12 +113,14 @@
     }
   },
   mounted() {
-    this.getDicts('PHYSICALEXAMTYPE').then(response => {
-      this.physicalExamTypeOptions = response.data
-    })
-    this.getDicts('ECG').then(response => {
-      this.ecgOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('PHYSICALEXAMTYPE').then(response => {
+        this.physicalExamTypeOptions = response.data
+      })
+      this.getDicts('ECG').then(response => {
+        this.ecgOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     typeFormat(row, column) {
diff --git a/src/views/dashboard/ygUser.vue b/src/views/dashboard/ygUser.vue
index e860193..5f859e8 100644
--- a/src/views/dashboard/ygUser.vue
+++ b/src/views/dashboard/ygUser.vue
@@ -126,21 +126,23 @@
     }
   },
   mounted() {
-    this.getDicts('EDUCATION').then(response => {
-      this.educationOptions = response.data
-    })
-    this.getDicts('NATIVEPLACE').then(response => {
-      this.nativePlaceOptions = response.data
-    })
-    this.getDicts('sex').then(response => {
-      this.sexOptions = response.data
-    })
-    this.getDicts('empType').then(response => {
-      this.empTypeOptions = response.data
-    })
-    this.getDicts('NATION').then(response => {
-      this.nationOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('EDUCATION').then(response => {
+        this.educationOptions = response.data
+      })
+      this.getDicts('NATIVEPLACE').then(response => {
+        this.nativePlaceOptions = response.data
+      })
+      this.getDicts('sex').then(response => {
+        this.sexOptions = response.data
+      })
+      this.getDicts('empType').then(response => {
+        this.empTypeOptions = response.data
+      })
+      this.getDicts('NATION').then(response => {
+        this.nationOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     educationFormat(row, column) {
diff --git a/src/views/dashboard/ywUser.vue b/src/views/dashboard/ywUser.vue
index 7dbdf2e..5e85bd5 100644
--- a/src/views/dashboard/ywUser.vue
+++ b/src/views/dashboard/ywUser.vue
@@ -119,12 +119,14 @@
     }
   },
   mounted() {
-    this.getDicts('hospitalizatioFlag').then(response => {
-      this.hospitalizatioFlagOptions = response.data
-    })
-    this.getDicts('settleStatus').then(response => {
-      this.settleStatusOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('hospitalizatioFlag').then(response => {
+        this.hospitalizatioFlagOptions = response.data
+      })
+      this.getDicts('settleStatus').then(response => {
+        this.settleStatusOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     hospitalizatioFlagFormat(row, column) {

--
Gitblit v1.8.0