项目初始化
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div class="schedule-card">
|
||||
<div class="card-title">
|
||||
<span>日程信息</span>
|
||||
<el-button class="card-title__more" link type="primary" @click="goMore">更多</el-button>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="schedule-overview">
|
||||
@@ -21,7 +22,7 @@
|
||||
<div class="panel-header">
|
||||
<div>
|
||||
<div class="panel-title">今日安排</div>
|
||||
<div class="panel-subtitle">连续刻度展示 08:00 - 18:00 日程</div>
|
||||
<div class="panel-subtitle">展示 08:00 - 18:00 日程</div>
|
||||
</div>
|
||||
<div class="panel-tag">{{ todayLabel }} {{ currentTimeLabel }}</div>
|
||||
</div>
|
||||
@@ -45,10 +46,6 @@
|
||||
>
|
||||
<template #content>
|
||||
<div class="timeline-tip">
|
||||
<div class="timeline-tip__title">
|
||||
<span class="timeline-tip__label">标题:</span>
|
||||
<span>{{ item.title }}</span>
|
||||
</div>
|
||||
<div class="timeline-tip__type">
|
||||
<span class="timeline-tip__label">类型:</span>
|
||||
<span>{{ item.typeLabel }}</span>
|
||||
@@ -58,12 +55,8 @@
|
||||
<span>{{ item.startTime }} - {{ item.endTime }}</span>
|
||||
</div>
|
||||
<div class="timeline-tip__desc">
|
||||
<span class="timeline-tip__label">说明:</span>
|
||||
<span>{{ item.desc }}</span>
|
||||
</div>
|
||||
<div class="timeline-tip__status" :style="{ color: item.color }">
|
||||
<span class="timeline-tip__label">状态:</span>
|
||||
<span>{{ item.status }}</span>
|
||||
<span class="timeline-tip__label">内容:</span>
|
||||
<span class="timeline-tip__desc-text">{{ item.desc }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -90,8 +83,15 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { DictData, dictDataListData } from '@jeesite/core/api/sys/dictData';
|
||||
import { MySchedule, myScheduleListAll } from '@jeesite/biz/api/biz/mySchedule';
|
||||
import { useUserStore } from '@jeesite/core/store/modules/user';
|
||||
import { formatToDate } from '@jeesite/core/utils/dateUtil';
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const userinfo = computed(() => userStore.getUserInfo);
|
||||
|
||||
const typeDict = ref<DictData[]>([]);
|
||||
const statusDict = ref<DictData[]>([]);
|
||||
@@ -99,7 +99,13 @@
|
||||
|
||||
async function getList() {
|
||||
try {
|
||||
const res = await myScheduleListAll();
|
||||
const startTime = formatToDate(new Date());
|
||||
const reqParams = {
|
||||
ustatus: '0',
|
||||
startTime_gte: startTime,
|
||||
createUser: userinfo.value.loginCode,
|
||||
};
|
||||
const res = await myScheduleListAll(reqParams);
|
||||
scheduleData.value = res || [];
|
||||
} catch (error) {
|
||||
scheduleData.value = [];
|
||||
@@ -117,6 +123,10 @@
|
||||
console.error('获取数据失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
function goMore() {
|
||||
router.push('/biz/mySchedule/list');
|
||||
}
|
||||
|
||||
interface SummaryCard {
|
||||
key: string;
|
||||
@@ -160,8 +170,8 @@
|
||||
return typeDict.value.slice(0, 4).map((item, index) => {
|
||||
const total = scheduleData.value.filter((schedule) => schedule.scheduleType === item.dictValue).length;
|
||||
return {
|
||||
key: item.dictValue,
|
||||
label: item.dictLabelRaw,
|
||||
key: item.dictValue || `${index}`,
|
||||
label: item.dictLabelRaw || '-',
|
||||
value: `${total}`,
|
||||
extra: '',
|
||||
color: colors[index % colors.length],
|
||||
@@ -326,6 +336,11 @@
|
||||
color: rgb(51 65 85);
|
||||
border-bottom: 1px solid rgb(226 232 240);
|
||||
background: transparent;
|
||||
|
||||
&__more {
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-content {
|
||||
@@ -428,6 +443,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
@@ -456,7 +472,7 @@
|
||||
flex-shrink: 0;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: rgb(248 250 252);
|
||||
background: rgb(255, 255, 255);
|
||||
color: rgb(71 85 105);
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
@@ -467,7 +483,7 @@
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
border-radius: 10px;
|
||||
background: rgb(248 250 252);
|
||||
background: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.timeline-body {
|
||||
@@ -651,6 +667,15 @@
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
&__desc-text {
|
||||
display: inline-block;
|
||||
max-width: 180px;
|
||||
max-height: 72px;
|
||||
overflow-y: auto;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
&__label {
|
||||
@@ -670,6 +695,10 @@
|
||||
.card-title {
|
||||
color: rgb(203 213 225);
|
||||
border-bottom-color: rgb(51 65 85);
|
||||
|
||||
&__more:deep(.el-button) {
|
||||
color: rgb(147 197 253);
|
||||
}
|
||||
}
|
||||
|
||||
.summary-item,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default {
|
||||
dashboard: '控制面板',
|
||||
workbench: '我的工作',
|
||||
analysis: '仪表盘',
|
||||
analysis: '首页',
|
||||
hr: '人力资源',
|
||||
about: '关于我们',
|
||||
bigScreen: '大屏可视化',
|
||||
|
||||
Reference in New Issue
Block a user