This commit is contained in:
zk
2023-12-21 09:02:45 +08:00
parent 1c65f18bab
commit 9230f659c1
34 changed files with 473 additions and 327 deletions
@@ -1,6 +1,6 @@
<template>
<template v-for="(item, index) in dataList" :key="`list${index}`">
<item-d :title="item.title" :data="item.data" :tips="item.tips" :color="item.color" :userCount="item.userCount" />
<item-d :keu="spinning" :title="item.title" :data="item.data" :tips="item.tips" :color="item.color" :userCount="item.userCount" />
</template>
</template>
@@ -9,7 +9,9 @@
import { cloneDeep } from 'lodash-es';
import ItemD from '/@/components/item-d/item-d.vue';
import { getWatchDataByOrgCode } from '/@/components/secondaryScreen/commonApi.ts';
import { useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
const { spinning, setSpin } = useSpin();
const dataList = ref([
{
title: '心率',
@@ -51,7 +53,7 @@
{
title: '体温',
data: [
{ name: '37.2', value: 0, key: 'normalCountCount' },
{ name: '<37.2', value: 0, key: 'normalCount' },
{ name: '37.2-38', value: 0, key: 'warnCount' },
{ name: '>38', value: 0, key: 'riskCount' },
],
@@ -73,6 +75,7 @@
async function init() {
const { code, result } = await getWatchDataByOrgCode(props);
// debugger;
if (code == 200) {
let data = cloneDeep(dataList.value);
data.forEach((item) => {
@@ -82,7 +85,9 @@
val.value = resData[val.key];
});
});
dataList.value = data;
setSpin(!spinning.value);
}
}