|
@@ -182,6 +182,7 @@ const planCalendarList = ref([])
|
|
|
const showCommonForms = ref(false)
|
|
|
const commonExpressionsHaveBeenAdded = ref([])
|
|
|
const commonExpressionsHaveBeenNodded = ref([])
|
|
|
+const areYouRequesting = ref(false)
|
|
|
|
|
|
function toContactDetails(item) {
|
|
|
router.navigateTo({
|
|
@@ -320,15 +321,27 @@ function getPlanCalendarList() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+function getAllData() {
|
|
|
+ if (areYouRequesting.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ areYouRequesting.value = true
|
|
|
+ Promise.all([
|
|
|
+ getVisitorPlan(),
|
|
|
+ getCommonlyUsedModules(),
|
|
|
+ getFrequentlyUsedContacts(),
|
|
|
+ getPlanCalendarList()
|
|
|
+ ]).finally(() => {
|
|
|
+ areYouRequesting.value = false
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
useLifecycle({
|
|
|
load: () => {
|
|
|
- // 添加加载逻辑
|
|
|
- getVisitorPlan()
|
|
|
- getCommonlyUsedModules()
|
|
|
- getFrequentlyUsedContacts()
|
|
|
- getPlanCalendarList()
|
|
|
+ getAllData()
|
|
|
},
|
|
|
init: () => {
|
|
|
+ getAllData()
|
|
|
setTimeout(() => {
|
|
|
if (expandAndCollapse.value) {
|
|
|
calendarHeight.value = calendarRef.value.$el.offsetHeight
|