1.副屏标题
This commit is contained in:
2024-06-15 16:21:54 +08:00
parent 0f391ffc22
commit dcf14220b3
6 changed files with 38 additions and 13 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
<template>
<div class="left-pie">
<public-title :title="props.title">
<public-title :title="props.title" :theme-type="themeType">
<template #right>
{{ props.tips }}
</template>
@@ -38,6 +38,10 @@
userCount: {
type: Number,
},
themeType: {
type: String,
default: () => '',
},
});
const healthChart = ref<HTMLElement>();
onMounted(() => {
@@ -113,4 +117,4 @@
font-weight: normal;
}
}
</style>
</style>
@@ -1,6 +1,14 @@
<template>
<template v-for="(item, index) in dataList" :key="`list${index}`">
<item-d :keu="spinning" :title="item.title" :data="item.data" :tips="item.tips" :color="item.color" :userCount="item.userCount" />
<item-d
:themeType="themeType"
:keu="spinning"
:title="item.title"
:data="item.data"
:tips="item.tips"
:color="item.color"
:userCount="item.userCount"
/>
</template>
</template>
@@ -70,6 +78,7 @@
const props = defineProps({
orgCode: String,
type: String,
themeType: String,
});
onMounted(() => {});
watch(props, () => {
@@ -108,4 +117,4 @@
});
</script>
<style scoped></style>
<style scoped></style>
@@ -1,6 +1,6 @@
<template>
<div class="terminal-container self">
<public-title title="睡眠" />
<public-title title="睡眠" :theme-type="themeType" />
<div class="inner">
<div class="title">
<span class="lightSleep">平均睡眠 {{ nums.avg }} 深睡 {{ nums.avgLong }} 浅睡 {{ nums.avgShort }}</span>
@@ -22,6 +22,7 @@
const props = defineProps({
orgCode: String,
type: String,
themeType: String,
});
const sleepChart = ref<HTMLElement>();
watch(
@@ -110,4 +111,4 @@
height: 80%;
}
}
</style>
</style>
@@ -1,6 +1,6 @@
<template>
<div>
<public-title title="预警" />
<public-title title="预警" :theme-type="themeType" />
<div class="inner-screen">
<a-table
:scroll="{
@@ -36,6 +36,7 @@
const props = defineProps({
orgCode: String,
type: String,
themeType: String,
});
const { setSession, getSession } = useSession();
const { PAGE2_RIGHT3 } = caching;
@@ -1,6 +1,6 @@
<template>
<div class="pie-container self">
<public-title title="步数" />
<public-title title="步数" :theme-type="themeType" />
<div class="inner" ref="healthChart"></div>
<div class="count">
<div class="t">总人数</div>
@@ -21,6 +21,7 @@
const props = defineProps({
orgCode: String,
type: String,
themeType: String,
});
const { setSession, getSession } = useSession();
const { PAGE2_RIGHT2 } = caching;
@@ -102,4 +103,4 @@
font-weight: normal;
}
}
</style>
</style>
+13 -4
View File
@@ -14,7 +14,7 @@
</div>
<div class="body-d">
<div class="body-d-left">
<screen-left :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
<screen-left :themeType="themeType" :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
</div>
<div class="body-d-middle">
<SecondMap :orgCode="orgCode" :type="type">
@@ -31,9 +31,9 @@
</SecondMap>
</div>
<div class="body-d-right">
<one-r :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
<two-r :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
<three-r :orgCode="orgCode" :type="type" :refreshState="refreshState" />
<one-r :themeType="themeType" :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
<two-r :themeType="themeType" :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
<three-r :themeType="themeType" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
</div>
</div>
<div class="bottom-d"></div>
@@ -54,8 +54,17 @@
import { useRefresh } from '/@/hooks/autoRefresh';
import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts';
import { onUnmounted } from 'vue';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { ThemeType } from '/@/utils/settings.ts';
const { refreshState } = useRefresh(DEFAULT_TIME);
const store = useUserStore();
onMounted(() => {
store.setThemeType(ThemeType.dark);
});
const { themeType } = useTheme();
const useStore = useUserStore();
const { orgCode, option, fieldNames, setOrgCode } = useDepart();
onMounted(() => {