update
1.优化
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<public-title title="睡眠" :theme-type="themeType" />
|
<public-title title="睡眠" :theme-type="themeType" />
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="lightSleep">平均睡眠 {{ nums.avg }} 深睡 {{ nums.avgLong }} 浅睡 {{ nums.avgShort }}</span>
|
<span class="lightSleep">平均睡眠 {{ nums.avg || 0 }} 深睡 {{ nums.avgLong || 0 }} 浅睡 {{ nums.avgShort || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="sleepChart" ref="sleepChart"></div>
|
<div class="sleepChart" ref="sleepChart"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<!--预警查看详情-->
|
<!--预警查看详情-->
|
||||||
<EarlyWarningDialog ref="earlyWarningRef"></EarlyWarningDialog>
|
<EarlyWarningDialog ref="earlyWarningRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|||||||
+4
-2
@@ -50,6 +50,10 @@ const router: Router = createRouter({
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
debugger;
|
||||||
|
if (to.path !== '/login') {
|
||||||
|
setCurrentPath(to.path);
|
||||||
|
}
|
||||||
if (to.path == '/login') {
|
if (to.path == '/login') {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
@@ -61,7 +65,5 @@ router.beforeEach((to, from, next) => {
|
|||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next();
|
|
||||||
});
|
});
|
||||||
export default router;
|
export default router;
|
||||||
|
|||||||
@@ -354,6 +354,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
if (qhInterval.value) clearInterval(qhInterval.value);
|
||||||
|
if (cInterval.value) clearInterval(cInterval.value);
|
||||||
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
|
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
|
||||||
window.onbeforeunload = function () {
|
window.onbeforeunload = function () {
|
||||||
closeSocket();
|
closeSocket();
|
||||||
|
|||||||
@@ -247,7 +247,6 @@
|
|||||||
...formRecord.value,
|
...formRecord.value,
|
||||||
...result,
|
...result,
|
||||||
};
|
};
|
||||||
console.log(formRecord.value);
|
|
||||||
}
|
}
|
||||||
function handleClicksearch() {
|
function handleClicksearch() {
|
||||||
formState.value = {
|
formState.value = {
|
||||||
@@ -264,7 +263,6 @@
|
|||||||
orgCode2.value = '';
|
orgCode2.value = '';
|
||||||
orgCode1.value = '';
|
orgCode1.value = '';
|
||||||
formState.value = {};
|
formState.value = {};
|
||||||
console.log(formState.value, formRecord.value, 'asjshj');
|
|
||||||
formRecord.value = {};
|
formRecord.value = {};
|
||||||
closeDialog();
|
closeDialog();
|
||||||
}
|
}
|
||||||
@@ -277,7 +275,6 @@
|
|||||||
...formRecord.value,
|
...formRecord.value,
|
||||||
salvageUserDepart: '',
|
salvageUserDepart: '',
|
||||||
};
|
};
|
||||||
console.log(formState.value, formRecord.value);
|
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog,
|
openDialog,
|
||||||
|
|||||||
@@ -78,13 +78,16 @@
|
|||||||
condition: chooseType.value,
|
condition: chooseType.value,
|
||||||
centerId: props.centerId,
|
centerId: props.centerId,
|
||||||
};
|
};
|
||||||
statisticsNewApi(params).then((res) => {
|
statisticsNewApi(params)
|
||||||
console.log(res);
|
.then((res) => {
|
||||||
if (res.code != 200 || !res.result) {
|
if (res.code != 200 || !res.result) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSession(LEFT_KEY1, JSON.stringify(res.result));
|
setSession(LEFT_KEY1, JSON.stringify(res.result));
|
||||||
setValue(res.result);
|
setValue(res.result);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,11 +96,14 @@
|
|||||||
twoLApi({
|
twoLApi({
|
||||||
sex: chooseType.value,
|
sex: chooseType.value,
|
||||||
depart: selectValue.value,
|
depart: selectValue.value,
|
||||||
}).then((res) => {
|
})
|
||||||
console.log(res, 'resessss');
|
.then((res: any) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
initChart(res.result);
|
initChart(res.result);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,12 +147,16 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
twoRApi({}).then((res) => {
|
twoRApi({})
|
||||||
|
.then((res: any) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
localStorage.removeItem('twoRList');
|
localStorage.removeItem('twoRList');
|
||||||
twoRList.value = res.result;
|
twoRList.value = res.result;
|
||||||
localStorage.setItem('twoRList', JSON.stringify(res.result));
|
localStorage.setItem('twoRList', JSON.stringify(res.result));
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function handleClickNum1(type, date, normal) {
|
function handleClickNum1(type, date, normal) {
|
||||||
|
|||||||
Reference in New Issue
Block a user