update
1.修改新疆反馈问题(12.24) 2.修改健康咨询大屏不定时刷新问题
This commit is contained in:
@@ -13,16 +13,16 @@
|
||||
</div>
|
||||
<div class="sun-body-content">
|
||||
<div class="sun-body-content-top">
|
||||
<health-content-top />
|
||||
<health-content-top :b-key="bKey" />
|
||||
</div>
|
||||
<div class="sun-body-content-middle">
|
||||
<health-content-middle />
|
||||
<health-content-middle :b-key="bKey" />
|
||||
</div>
|
||||
<div class="sun-body-content-bottom">
|
||||
<health-content-bottom-item1 class="item" />
|
||||
<health-content-bottom-item2 class="item" />
|
||||
<health-content-bottom-item3 class="item" />
|
||||
<health-content-bottom-item4 class="item" />
|
||||
<health-content-bottom-item1 :b-key="bKey" class="item" />
|
||||
<health-content-bottom-item2 :b-key="bKey" class="item" />
|
||||
<health-content-bottom-item3 :b-key="bKey" class="item" />
|
||||
<health-content-bottom-item4 :b-key="bKey" class="item" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,6 +60,8 @@
|
||||
const rightDate = ref<string>('');
|
||||
const initDate = ref(startTime);
|
||||
const timer = ref<number | null>(null);
|
||||
const interval = ref();
|
||||
const bKey = ref(0);
|
||||
const pageRef = ref();
|
||||
|
||||
const getTime = () => {
|
||||
@@ -79,6 +81,18 @@
|
||||
updateRightDate();
|
||||
}, 1000);
|
||||
};
|
||||
// 定时器,定时刷新接口
|
||||
const startInterval = () => {
|
||||
if (interval.value) {
|
||||
clearInterval(interval.value);
|
||||
}
|
||||
interval.value = setInterval(
|
||||
() => {
|
||||
bKey.value++;
|
||||
},
|
||||
5 * 60 * 1000
|
||||
);
|
||||
};
|
||||
|
||||
const updateRightDate = () => {
|
||||
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
|
||||
@@ -88,6 +102,7 @@
|
||||
getTime();
|
||||
updateRightDate();
|
||||
startTimer(); // 启动定时器
|
||||
startInterval(); // 启动定时器
|
||||
document.title = '健康咨询平台';
|
||||
});
|
||||
|
||||
@@ -103,6 +118,9 @@
|
||||
if (timer.value) {
|
||||
clearInterval(timer.value);
|
||||
}
|
||||
if (interval.value) {
|
||||
clearInterval(interval.value);
|
||||
}
|
||||
});
|
||||
|
||||
// 健康监测工具报警
|
||||
|
||||
Reference in New Issue
Block a user