rax-medical/src/views/home/index.vue

177 lines
5.4 KiB
Vue
Raw Normal View History

2023-12-14 18:29:40 +08:00
<template>
2023-12-15 18:08:45 +08:00
<div class="home-page">
<div class="background-box">
<div class="left-content">
2023-12-18 14:29:28 +08:00
<div class="header-box swing_skew_1">
2023-12-21 17:31:28 +08:00
<div class="header-item">
2023-12-15 18:08:45 +08:00
<span class="main-color f20" style="font-weight: 600;">{{ userInfo.name }}</span>
<span class="text2-color f14">{{ userInfo.permissions }}</span>
</div>
<div class="header-item">
2023-12-16 20:49:32 +08:00
<el-icon class="text1-color" style="font-size: 26px;margin-right: 20px;">
<Calendar />
</el-icon>
2023-12-15 18:08:45 +08:00
<div>
<p class="text1-color f14">待办任务</p>
<p class="main-color f20">{{ total }}</p>
</div>
</div>
</div>
<div class="echart-box">
2023-12-18 14:29:28 +08:00
<div class="echart-item swing_skew_2">
2023-12-16 20:49:32 +08:00
<NumberChart />
</div>
2023-12-21 17:31:28 +08:00
<div class="echart-item swing_skew_2">
<NumberPieChart />
</div>
2023-12-18 14:29:28 +08:00
<div class="echart-item swing_skew_1">
2023-12-16 20:49:32 +08:00
<TimeChart />
</div>
2023-12-21 17:31:28 +08:00
<div class="echart-item swing_skew_1">
<TimeBarChart />
</div>
2023-12-15 18:08:45 +08:00
</div>
</div>
<div class="right-content">
2023-12-15 18:27:23 +08:00
<div class="week-calendar">
2023-12-16 20:49:32 +08:00
<WeekCalendar />
2023-12-15 18:27:23 +08:00
</div>
2023-12-16 20:49:32 +08:00
<div class="system-logs move_2">
<div class="title">
<span>系统日志</span>
<span class="f14" style="cursor: pointer;" @click="router.push('./logs-manage')">更多</span>
</div>
<div class="content move_2">
<SystemLogs />
</div>
2023-12-15 18:27:23 +08:00
</div>
2023-12-15 18:08:45 +08:00
</div>
</div>
2023-12-14 18:29:40 +08:00
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
2023-12-16 20:49:32 +08:00
import { useRouter } from 'vue-router'
2023-12-15 18:08:45 +08:00
import { useLoginStore } from '@/stores/user-info-store'
import NumberChart from "./number-chart.vue";
2023-12-21 17:31:28 +08:00
import NumberPieChart from "./number-pie-chart.vue";
2023-12-15 18:08:45 +08:00
import TimeChart from "./time-chart.vue";
2023-12-21 17:31:28 +08:00
import TimeBarChart from "./time-bar-chart.vue";
2023-12-16 20:49:32 +08:00
import WeekCalendar from "./week-calendar.vue";
2023-12-15 18:27:23 +08:00
import SystemLogs from "@/components/system-logs.vue";
2023-12-15 18:08:45 +08:00
2023-12-16 20:49:32 +08:00
const router = useRouter()
2023-12-15 18:08:45 +08:00
const userInfo = useLoginStore().getlogin()
const total = ref(0) // 日历添加的记录提醒统计
2023-12-14 18:29:40 +08:00
</script>
<style lang='scss' scoped>
2023-12-15 18:08:45 +08:00
.home-page {
width: 100%;
height: 100%;
padding: 15px;
.background-box {
width: 100%;
height: 100%;
background: white;
padding: 20px 35px;
2023-12-15 18:27:23 +08:00
display: flex;
justify-content: space-between;
2023-12-15 18:08:45 +08:00
}
.left-content {
width: calc(100% - 550px);
height: 100%;
2023-12-16 20:49:32 +08:00
2023-12-15 18:08:45 +08:00
.header-box {
width: 100%;
height: 140px;
display: flex;
justify-content: space-between;
2023-12-16 20:49:32 +08:00
2023-12-15 18:08:45 +08:00
.header-item {
2023-12-21 17:31:28 +08:00
width: calc(100% - 600px);
2023-12-15 18:08:45 +08:00
height: 100%;
border: 1px solid $border-color;
border-radius: 5px;
2023-12-21 17:31:28 +08:00
box-shadow: 1px 1px 5px $border2-color;
2023-12-15 18:08:45 +08:00
padding: 0 90px;
line-height: 1.5;
display: flex;
flex-direction: column;
justify-content: center;
2023-12-16 20:49:32 +08:00
&~.header-item {
2023-12-21 17:31:28 +08:00
width: 580px;
2023-12-15 18:08:45 +08:00
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
}
}
2023-12-16 20:49:32 +08:00
2023-12-15 18:08:45 +08:00
.echart-box {
width: 100%;
height: calc(100% - 160px);
margin-top: 20px;
2023-12-21 17:31:28 +08:00
display: flex;
flex-wrap: wrap;
justify-content: space-between;
2023-12-16 20:49:32 +08:00
2023-12-15 18:08:45 +08:00
.echart-item {
2023-12-21 17:31:28 +08:00
width: calc(100% - 600px);
height: calc(50% - 10px);
border: 1px solid $border-color;
border-radius: 5px;
padding: 20px;
box-shadow: 1px 1px 5px $border2-color;
&:nth-child(even) {
width: 580px;
}
&:nth-child(n + 3) {
margin-top: 20px;
}
2023-12-15 18:08:45 +08:00
}
}
}
2023-12-14 18:29:40 +08:00
2023-12-15 18:08:45 +08:00
.right-content {
width: 530px;
height: 100%;
2023-12-16 20:49:32 +08:00
.week-calendar {
width: 100%;
height: 50%;
}
.system-logs {
width: 100%;
height: calc(50% - 20px);
margin-top: 20px;
overflow: hidden;
.title {
width: 100%;
height: 40px;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.content {
width: 100%;
height: calc(100% - 50px);
margin-top: 10px;
border: 1px solid $border-color;
padding: 30px;
overflow-x: hidden;
overflow-y: auto;
}
}
2023-12-15 18:08:45 +08:00
}
}</style>