首页更改
This commit is contained in:
parent
46a6eb8ae3
commit
c41ffa1852
@ -4,7 +4,7 @@ NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48081'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
@ -4,7 +4,7 @@ NODE_ENV=production
|
|||||||
VITE_DEV=false
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48081'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
@ -4,7 +4,7 @@ NODE_ENV=production
|
|||||||
VITE_DEV=false
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48081'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
391
src/views/Home/Index-bk.vue
Normal file
391
src/views/Home/Index-bk.vue
Normal file
@ -0,0 +1,391 @@
|
|||||||
|
<template>
|
||||||
|
<!-- <div>-->
|
||||||
|
<!-- <el-card shadow="never">-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <el-row :gutter="16" justify="space-between">-->
|
||||||
|
<!-- <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">-->
|
||||||
|
<!-- <div class="flex items-center">-->
|
||||||
|
<!-- <el-avatar :src="avatar" :size="70" class="mr-16px">-->
|
||||||
|
<!-- <img src="@/assets/imgs/avatar.gif" alt="" />-->
|
||||||
|
<!-- </el-avatar>-->
|
||||||
|
<!-- <div>-->
|
||||||
|
<!-- <div class="text-20px">-->
|
||||||
|
<!-- {{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="mt-10px text-14px text-gray-500">-->
|
||||||
|
<!-- {{ t('workplace.toady') }},20℃ - 32℃!-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">-->
|
||||||
|
<!-- <div class="h-70px flex items-center justify-end lt-sm:mt-10px">-->
|
||||||
|
<!-- <div class="px-8px text-right">-->
|
||||||
|
<!-- <div class="mb-16px text-14px text-gray-400">{{ t('workplace.project') }}</div>-->
|
||||||
|
<!-- <CountTo-->
|
||||||
|
<!-- class="text-20px"-->
|
||||||
|
<!-- :start-val="0"-->
|
||||||
|
<!-- :end-val="totalSate.project"-->
|
||||||
|
<!-- :duration="2600"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <el-divider direction="vertical" />-->
|
||||||
|
<!-- <div class="px-8px text-right">-->
|
||||||
|
<!-- <div class="mb-16px text-14px text-gray-400">{{ t('workplace.toDo') }}</div>-->
|
||||||
|
<!-- <CountTo-->
|
||||||
|
<!-- class="text-20px"-->
|
||||||
|
<!-- :start-val="0"-->
|
||||||
|
<!-- :end-val="totalSate.todo"-->
|
||||||
|
<!-- :duration="2600"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <el-divider direction="vertical" border-style="dashed" />-->
|
||||||
|
<!-- <div class="px-8px text-right">-->
|
||||||
|
<!-- <div class="mb-16px text-14px text-gray-400">{{ t('workplace.access') }}</div>-->
|
||||||
|
<!-- <CountTo-->
|
||||||
|
<!-- class="text-20px"-->
|
||||||
|
<!-- :start-val="0"-->
|
||||||
|
<!-- :end-val="totalSate.access"-->
|
||||||
|
<!-- :duration="2600"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<el-row class="mt-8px" :gutter="8" justify="space-between">
|
||||||
|
<el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||||
|
<!-- <el-card shadow="never">-->
|
||||||
|
<!-- <template #header>-->
|
||||||
|
<!-- <div class="h-3 flex justify-between">-->
|
||||||
|
<!-- <span>{{ t('workplace.project') }}</span>-->
|
||||||
|
<!-- <el-link-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- :underline="false"-->
|
||||||
|
<!-- href="https://github.com/yudaocode"-->
|
||||||
|
<!-- target="_blank"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- {{ t('action.more') }}-->
|
||||||
|
<!-- </el-link>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <el-row>-->
|
||||||
|
<!-- <el-col-->
|
||||||
|
<!-- v-for="(item, index) in projects"-->
|
||||||
|
<!-- :key="`card-${index}`"-->
|
||||||
|
<!-- :xl="8"-->
|
||||||
|
<!-- :lg="8"-->
|
||||||
|
<!-- :md="8"-->
|
||||||
|
<!-- :sm="24"-->
|
||||||
|
<!-- :xs="24"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-card shadow="hover" class="mr-5px mt-5px">-->
|
||||||
|
<!-- <div class="flex items-center">-->
|
||||||
|
<!-- <Icon :icon="item.icon" :size="25" class="mr-8px" />-->
|
||||||
|
<!-- <span class="text-16px">{{ item.name }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="mt-12px text-9px text-gray-400">{{ t(item.message) }}</div>-->
|
||||||
|
<!-- <div class="mt-12px flex justify-between text-12px text-gray-400">-->
|
||||||
|
<!-- <span>{{ item.personal }}</span>-->
|
||||||
|
<!-- <span>{{ formatTime(item.time, 'yyyy-MM-dd') }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
|
||||||
|
<!-- <el-card shadow="never" class="mt-8px">-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <el-row :gutter="20" justify="space-between">-->
|
||||||
|
<!-- <el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">-->
|
||||||
|
<!-- <el-card shadow="hover" class="mb-8px">-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <Echart :options="pieOptionsData" :height="280" />-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">-->
|
||||||
|
<!-- <el-card shadow="hover" class="mb-8px">-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <Echart :options="barOptionsData" :height="280" />-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||||
|
<!-- <el-card shadow="never">-->
|
||||||
|
<!-- <template #header>-->
|
||||||
|
<!-- <div class="h-3 flex justify-between">-->
|
||||||
|
<!-- <span>{{ t('workplace.shortcutOperation') }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <el-row>-->
|
||||||
|
<!-- <el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-8px">-->
|
||||||
|
<!-- <div class="flex items-center">-->
|
||||||
|
<!-- <Icon :icon="item.icon" class="mr-8px" />-->
|
||||||
|
<!-- <el-link type="default" :underline="false" @click="setWatermark(item.name)">-->
|
||||||
|
<!-- {{ item.name }}-->
|
||||||
|
<!-- </el-link>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- <el-card shadow="never" class="mt-8px">-->
|
||||||
|
<!-- <template #header>-->
|
||||||
|
<!-- <div class="h-3 flex justify-between">-->
|
||||||
|
<!-- <span>{{ t('workplace.notice') }}</span>-->
|
||||||
|
<!-- <el-link type="primary" :underline="false">{{ t('action.more') }}</el-link>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <el-skeleton :loading="loading" animated>-->
|
||||||
|
<!-- <div v-for="(item, index) in notice" :key="`dynamics-${index}`">-->
|
||||||
|
<!-- <div class="flex items-center">-->
|
||||||
|
<!-- <el-avatar :src="avatar" :size="35" class="mr-16px">-->
|
||||||
|
<!-- <img src="@/assets/imgs/avatar.gif" alt="" />-->
|
||||||
|
<!-- </el-avatar>-->
|
||||||
|
<!-- <div>-->
|
||||||
|
<!-- <div class="text-14px">-->
|
||||||
|
<!-- <Highlight :keys="item.keys.map((v) => t(v))">-->
|
||||||
|
<!-- {{ item.type }} : {{ item.title }}-->
|
||||||
|
<!-- </Highlight>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="mt-16px text-12px text-gray-400">-->
|
||||||
|
<!-- {{ formatTime(item.date, 'yyyy-MM-dd') }}-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <el-divider />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-skeleton>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { set } from 'lodash-es'
|
||||||
|
import { EChartsOption } from 'echarts'
|
||||||
|
import { formatTime } from '@/utils'
|
||||||
|
|
||||||
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
import { useWatermark } from '@/hooks/web/useWatermark'
|
||||||
|
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
|
||||||
|
import { pieOptions, barOptions } from './echarts-data'
|
||||||
|
|
||||||
|
defineOptions({ name: 'Home' })
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const { setWatermark } = useWatermark()
|
||||||
|
const loading = ref(true)
|
||||||
|
const avatar = userStore.getUser.avatar
|
||||||
|
const username = userStore.getUser.nickname
|
||||||
|
const pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
|
||||||
|
// 获取统计数
|
||||||
|
let totalSate = reactive<WorkplaceTotal>({
|
||||||
|
project: 0,
|
||||||
|
access: 0,
|
||||||
|
todo: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
const getCount = async () => {
|
||||||
|
const data = {
|
||||||
|
project: 40,
|
||||||
|
access: 2340,
|
||||||
|
todo: 10
|
||||||
|
}
|
||||||
|
totalSate = Object.assign(totalSate, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取项目数
|
||||||
|
let projects = reactive<Project[]>([])
|
||||||
|
const getProject = async () => {
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
name: 'ruoyi-vue-pro',
|
||||||
|
icon: 'akar-icons:github-fill',
|
||||||
|
message: 'https://github.com/YunaiV/ruoyi-vue-pro',
|
||||||
|
personal: 'Spring Boot 单体架构',
|
||||||
|
time: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'yudao-ui-admin-vue3',
|
||||||
|
icon: 'logos:vue',
|
||||||
|
message: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
|
||||||
|
personal: 'Vue3 + element-plus',
|
||||||
|
time: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'yudao-ui-admin-vben',
|
||||||
|
icon: 'logos:vue',
|
||||||
|
message: 'https://github.com/yudaocode/yudao-ui-admin-vben',
|
||||||
|
personal: 'Vue3 + vben(antd)',
|
||||||
|
time: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'yudao-cloud',
|
||||||
|
icon: 'akar-icons:github',
|
||||||
|
message: 'https://github.com/YunaiV/yudao-cloud',
|
||||||
|
personal: 'Spring Cloud 微服务架构',
|
||||||
|
time: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'yudao-ui-mall-uniapp',
|
||||||
|
icon: 'logos:vue',
|
||||||
|
message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
|
||||||
|
personal: 'Vue3 + uniapp',
|
||||||
|
time: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'yudao-ui-admin-vue2',
|
||||||
|
icon: 'logos:vue',
|
||||||
|
message: 'https://github.com/yudaocode/yudao-ui-admin-vue2',
|
||||||
|
personal: 'Vue2 + element-ui',
|
||||||
|
time: new Date()
|
||||||
|
}
|
||||||
|
]
|
||||||
|
projects = Object.assign(projects, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取通知公告
|
||||||
|
let notice = reactive<Notice[]>([])
|
||||||
|
const getNotice = async () => {
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
title: '系统支持 JDK 8/17/21,Vue 2/3',
|
||||||
|
type: '通知',
|
||||||
|
keys: ['通知', '8', '17', '21', '2', '3'],
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构',
|
||||||
|
type: '公告',
|
||||||
|
keys: ['公告', 'Boot', 'Cloud'],
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '全部开源,个人与企业可 100% 直接使用,无需授权',
|
||||||
|
type: '通知',
|
||||||
|
keys: ['通知', '无需授权'],
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '国内使用最广泛的快速开发平台,超 300+ 人贡献',
|
||||||
|
type: '公告',
|
||||||
|
keys: ['公告', '最广泛'],
|
||||||
|
date: new Date()
|
||||||
|
}
|
||||||
|
]
|
||||||
|
notice = Object.assign(notice, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取快捷入口
|
||||||
|
let shortcut = reactive<Shortcut[]>([])
|
||||||
|
|
||||||
|
const getShortcut = async () => {
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
name: 'Github',
|
||||||
|
icon: 'akar-icons:github-fill',
|
||||||
|
url: 'github.io'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Vue',
|
||||||
|
icon: 'logos:vue',
|
||||||
|
url: 'vuejs.org'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Vite',
|
||||||
|
icon: 'vscode-icons:file-type-vite',
|
||||||
|
url: 'https://vitejs.dev/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Angular',
|
||||||
|
icon: 'logos:angular-icon',
|
||||||
|
url: 'github.io'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'React',
|
||||||
|
icon: 'logos:react',
|
||||||
|
url: 'github.io'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Webpack',
|
||||||
|
icon: 'logos:webpack',
|
||||||
|
url: 'github.io'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
shortcut = Object.assign(shortcut, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户来源
|
||||||
|
const getUserAccessSource = async () => {
|
||||||
|
const data = [
|
||||||
|
{ value: 335, name: 'analysis.directAccess' },
|
||||||
|
{ value: 310, name: 'analysis.mailMarketing' },
|
||||||
|
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||||
|
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||||
|
{ value: 1548, name: 'analysis.searchEngines' }
|
||||||
|
]
|
||||||
|
set(
|
||||||
|
pieOptionsData,
|
||||||
|
'legend.data',
|
||||||
|
data.map((v) => t(v.name))
|
||||||
|
)
|
||||||
|
pieOptionsData!.series![0].data = data.map((v) => {
|
||||||
|
return {
|
||||||
|
name: t(v.name),
|
||||||
|
value: v.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
|
||||||
|
|
||||||
|
// 周活跃量
|
||||||
|
const getWeeklyUserActivity = async () => {
|
||||||
|
const data = [
|
||||||
|
{ value: 13253, name: 'analysis.monday' },
|
||||||
|
{ value: 34235, name: 'analysis.tuesday' },
|
||||||
|
{ value: 26321, name: 'analysis.wednesday' },
|
||||||
|
{ value: 12340, name: 'analysis.thursday' },
|
||||||
|
{ value: 24643, name: 'analysis.friday' },
|
||||||
|
{ value: 1322, name: 'analysis.saturday' },
|
||||||
|
{ value: 1324, name: 'analysis.sunday' }
|
||||||
|
]
|
||||||
|
set(
|
||||||
|
barOptionsData,
|
||||||
|
'xAxis.data',
|
||||||
|
data.map((v) => t(v.name))
|
||||||
|
)
|
||||||
|
set(barOptionsData, 'series', [
|
||||||
|
{
|
||||||
|
name: t('analysis.activeQuantity'),
|
||||||
|
data: data.map((v) => v.value),
|
||||||
|
type: 'bar'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAllApi = async () => {
|
||||||
|
await Promise.all([
|
||||||
|
getCount(),
|
||||||
|
getProject(),
|
||||||
|
getNotice(),
|
||||||
|
getShortcut(),
|
||||||
|
getUserAccessSource(),
|
||||||
|
getWeeklyUserActivity()
|
||||||
|
])
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllApi()
|
||||||
|
</script>
|
@ -1,185 +1,349 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-card shadow="never">
|
<!-- <el-card shadow="hover" style="margin-bottom: 10px;height: 250px">-->
|
||||||
|
<!-- <el-carousel :interval="4000" height="205px">-->
|
||||||
|
<!-- <el-carousel-item v-for="item in image" :key="item.id">-->
|
||||||
|
<!-- <el-image style="width: 100%; height: 100%" :src="item.src" alt="无图片" :title="item.name"/>-->
|
||||||
|
<!-- </el-carousel-item>-->
|
||||||
|
<!-- </el-carousel>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<el-row class="mt-8px" :gutter="8" justify="space-between" >
|
||||||
|
<el-col :xl="7" :lg="7" :md="24" :sm="24" :xs="24">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<template #header >
|
||||||
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">要闻速递</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<el-skeleton :loading="loading" animated>
|
<el-skeleton :loading="loading" animated>
|
||||||
<el-row :gutter="16" justify="space-between">
|
<el-card shadow="hover" style="margin-bottom: 10px;height: 200px">
|
||||||
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
<el-carousel :interval="4000" height="200px" @change="handleCarouselChange" ref="carousel">
|
||||||
<div class="flex items-center">
|
<el-carousel-item v-for="item in image" :key="item.id">
|
||||||
<el-avatar :src="avatar" :size="70" class="mr-16px">
|
<el-image style="width: 100%; height: 100%" :src="item.src" alt="无图片" :title="item.name"/>
|
||||||
<img src="@/assets/imgs/avatar.gif" alt="" />
|
</el-carousel-item>
|
||||||
</el-avatar>
|
</el-carousel>
|
||||||
<div>
|
</el-card>
|
||||||
<div class="text-20px">
|
<el-row>
|
||||||
{{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}
|
<el-col :span="18">
|
||||||
</div>
|
<span v-if="image[pageNo - 1]">{{image[pageNo-1].title}}</span>
|
||||||
<div class="mt-10px text-14px text-gray-500">
|
|
||||||
{{ t('workplace.toady') }},20℃ - 32℃!
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
<el-col :span="6">
|
||||||
<div class="h-70px flex items-center justify-end lt-sm:mt-10px">
|
<el-pagination
|
||||||
<div class="px-8px text-right">
|
size="small"
|
||||||
<div class="mb-16px text-14px text-gray-400">{{ t('workplace.project') }}</div>
|
layout="prev, pager, next"
|
||||||
<CountTo
|
v-model:current-page="pageNo"
|
||||||
class="text-20px"
|
:total="image.length"
|
||||||
:start-val="0"
|
:page-size="1"
|
||||||
:end-val="totalSate.project"
|
@current-change="handlePageChange"
|
||||||
:duration="2600"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<el-divider direction="vertical" />
|
|
||||||
<div class="px-8px text-right">
|
|
||||||
<div class="mb-16px text-14px text-gray-400">{{ t('workplace.toDo') }}</div>
|
|
||||||
<CountTo
|
|
||||||
class="text-20px"
|
|
||||||
:start-val="0"
|
|
||||||
:end-val="totalSate.todo"
|
|
||||||
:duration="2600"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<el-divider direction="vertical" border-style="dashed" />
|
|
||||||
<div class="px-8px text-right">
|
|
||||||
<div class="mb-16px text-14px text-gray-400">{{ t('workplace.access') }}</div>
|
|
||||||
<CountTo
|
|
||||||
class="text-20px"
|
|
||||||
:start-val="0"
|
|
||||||
:end-val="totalSate.access"
|
|
||||||
:duration="2600"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
<el-card shadow="hover" class="mt-8px">
|
||||||
|
<template #header >
|
||||||
<el-row class="mt-8px" :gutter="8" justify="space-between">
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
<el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-8px">
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
<el-card shadow="never">
|
<span style="display: inline-block;">要闻速递</span>
|
||||||
<template #header>
|
|
||||||
<div class="h-3 flex justify-between">
|
|
||||||
<span>{{ t('workplace.project') }}</span>
|
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
:underline="false"
|
:underline="false"
|
||||||
href="https://github.com/yudaocode"
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
>
|
>
|
||||||
{{ t('action.more') }}
|
更多>>
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-skeleton :loading="loading" animated>
|
<el-skeleton :loading="loading" animated>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col
|
<el-col
|
||||||
v-for="(item, index) in projects"
|
v-for="(item,index) in todo"
|
||||||
:key="`card-${index}`"
|
:key="`card-${index}`"
|
||||||
:xl="8"
|
|
||||||
:lg="8"
|
|
||||||
:md="8"
|
|
||||||
:sm="24"
|
|
||||||
:xs="24"
|
|
||||||
>
|
>
|
||||||
<el-card shadow="hover" class="mr-5px mt-5px">
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
<div class="flex items-center">
|
|
||||||
<Icon :icon="item.icon" :size="25" class="mr-8px" />
|
|
||||||
<span class="text-16px">{{ item.name }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="mt-12px text-9px text-gray-400">{{ t(item.message) }}</div>
|
|
||||||
<div class="mt-12px flex justify-between text-12px text-gray-400">
|
|
||||||
<span>{{ item.personal }}</span>
|
|
||||||
<span>{{ formatTime(item.time, 'yyyy-MM-dd') }}</span>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card shadow="hover" class="mt-8px">
|
||||||
<el-card shadow="never" class="mt-8px">
|
<template #header >
|
||||||
<el-skeleton :loading="loading" animated>
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
<el-row :gutter="20" justify="space-between">
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
<el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
|
<span style="display: inline-block;">系统聚焦</span>
|
||||||
<el-card shadow="hover" class="mb-8px">
|
<el-link
|
||||||
<el-skeleton :loading="loading" animated>
|
type="primary"
|
||||||
<Echart :options="pieOptionsData" :height="280" />
|
:underline="false"
|
||||||
</el-skeleton>
|
target="_blank"
|
||||||
</el-card>
|
style="margin-top: 10px"
|
||||||
</el-col>
|
>
|
||||||
<el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
|
更多>>
|
||||||
<el-card shadow="hover" class="mb-8px">
|
</el-link>
|
||||||
<el-skeleton :loading="loading" animated>
|
|
||||||
<Echart :options="barOptionsData" :height="280" />
|
|
||||||
</el-skeleton>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-skeleton>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<template #header>
|
|
||||||
<div class="h-3 flex justify-between">
|
|
||||||
<span>{{ t('workplace.shortcutOperation') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-skeleton :loading="loading" animated>
|
<el-skeleton :loading="loading" animated>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-8px">
|
<el-col
|
||||||
<div class="flex items-center">
|
v-for="(item,index) in todo"
|
||||||
<Icon :icon="item.icon" class="mr-8px" />
|
:key="`card-${index}`"
|
||||||
<el-link type="default" :underline="false" @click="setWatermark(item.name)">
|
>
|
||||||
{{ item.name }}
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
</el-link>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" class="mt-8px">
|
</el-col>
|
||||||
<template #header>
|
<el-col :xl="11" :lg="11" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||||
<div class="h-3 flex justify-between">
|
<el-card shadow="hover">
|
||||||
<span>{{ t('workplace.notice') }}</span>
|
<template #header >
|
||||||
<el-link type="primary" :underline="false">{{ t('action.more') }}</el-link>
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">事务</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-skeleton :loading="loading" animated>
|
<el-skeleton :loading="loading" animated>
|
||||||
<div v-for="(item, index) in notice" :key="`dynamics-${index}`">
|
<el-tabs type="border-card" class="demo-tabs">
|
||||||
<div class="flex items-center">
|
<el-tab-pane label="待办">
|
||||||
<el-avatar :src="avatar" :size="35" class="mr-16px">
|
<el-row>
|
||||||
<img src="@/assets/imgs/avatar.gif" alt="" />
|
<el-col
|
||||||
</el-avatar>
|
v-for="(item,index) in todo"
|
||||||
<div>
|
:key="`card-${index}`"
|
||||||
<div class="text-14px">
|
>
|
||||||
<Highlight :keys="item.keys.map((v) => t(v))">
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
{{ item.type }} : {{ item.title }}
|
</el-col>
|
||||||
</Highlight>
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="待阅">
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
v-for="(item,index) in todo"
|
||||||
|
:key="`card-${index}`"
|
||||||
|
>
|
||||||
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;c" >* {{item.title}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="已办">
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
v-for="(item,index) in todo"
|
||||||
|
:key="`card-${index}`"
|
||||||
|
>
|
||||||
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="已阅">
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
v-for="(item,index) in todo"
|
||||||
|
:key="`card-${index}`"
|
||||||
|
>
|
||||||
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-skeleton>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="hover" class="mt-8px">
|
||||||
|
<template #header >
|
||||||
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">报销单</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-16px text-12px text-gray-400">
|
</template>
|
||||||
{{ formatTime(item.date, 'yyyy-MM-dd') }}
|
<el-skeleton :loading="loading" animated>
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
v-for="(item,index) in todo"
|
||||||
|
:key="`card-${index}`"
|
||||||
|
>
|
||||||
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-skeleton>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="hover" class="mt-8px">
|
||||||
|
<template #header >
|
||||||
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">会议室管理</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-skeleton :loading="loading" animated>
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
v-for="(item,index) in todo"
|
||||||
|
:key="`card-${index}`"
|
||||||
|
>
|
||||||
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;" >* {{item.title}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-skeleton>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="6" :lg="6" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<template #header >
|
||||||
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">公告</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-skeleton :loading="loading" animated>
|
||||||
|
<el-row>
|
||||||
|
<el-col
|
||||||
|
v-for="(item,index) in todo"
|
||||||
|
:key="`card-${index}`"
|
||||||
|
>
|
||||||
|
<span style="display: inline-block; margin-bottom: 10px;font-size: 15px;color: #105cfb" >* {{item.title}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-skeleton>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="hover" class="mt-8px">
|
||||||
|
<template #header >
|
||||||
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">邮件</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
<el-divider />
|
</template>
|
||||||
|
<el-skeleton :loading="loading" animated>
|
||||||
|
<el-row>
|
||||||
|
<el-table stripe :data="tableData" border style="width: 100%" max-height="300">
|
||||||
|
<el-table-column :formatter="dateFormatter2" prop="Date" label="时间" width="100" />
|
||||||
|
<el-table-column prop="Name" label="发件人" width="70" />
|
||||||
|
<el-table-column
|
||||||
|
prop="Address"
|
||||||
|
label="标题"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
</el-row>
|
||||||
|
</el-skeleton>
|
||||||
|
</el-card>
|
||||||
|
<!-- <el-card shadow="hover" class="mt-8px">-->
|
||||||
|
<el-card shadow="hover" class="mt-8px">
|
||||||
|
<template #header >
|
||||||
|
<div style="height: 2px;background-color: #ffbd00;margin: 0;padding: 0;"></div>
|
||||||
|
<div class="h-3 flex justify-between" style="height: 15px;margin: 0;padding: 0;">
|
||||||
|
<span style="display: inline-block;">日历</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
|
更多>>
|
||||||
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-skeleton :loading="loading" animated>
|
||||||
|
<el-calendar ref="calendar" class="custom-calendar">
|
||||||
|
<template #header = "{date}">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<span style="display: inline-block;font-size: 10px">{{ date }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-button-group style="display: flex; justify-content: space-between;">
|
||||||
|
<el-button size="small" @click="selectDate('prev-year')">上年</el-button>
|
||||||
|
<el-button size="small" @click="selectDate('prev-month')">上月</el-button>
|
||||||
|
<el-button size="small" @click="selectDate('today')">今天</el-button>
|
||||||
|
<el-button size="small" @click="selectDate('next-year')">下年</el-button>
|
||||||
|
<el-button size="small" @click="selectDate('next-month')">下月</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</el-calendar>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
<style>
|
||||||
|
.custom-calendar {
|
||||||
|
height: 310px; /* 根据需要调整高度 */
|
||||||
|
}
|
||||||
|
.custom-calendar .el-calendar-table__row {
|
||||||
|
height: 40px; /* 设置行高度,根据需要调整 */
|
||||||
|
}
|
||||||
|
.custom-calendar .el-calendar-day {
|
||||||
|
height: 100%; /* 设置每个日历单元格的高度为100% */
|
||||||
|
display: flex; /* 使用 flexbox */
|
||||||
|
align-items: center; /* 垂直居中 */
|
||||||
|
justify-content: center; /* 水平居中 */
|
||||||
|
}
|
||||||
|
.custom-shadow-hover:hover {
|
||||||
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4) !important; /* 悬停时更深的阴影 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import mn from '../../../src/assets/svgs/login-box-bg.svg'
|
||||||
import { set } from 'lodash-es'
|
import { set } from 'lodash-es'
|
||||||
import { EChartsOption } from 'echarts'
|
import { EChartsOption } from 'echarts'
|
||||||
import { formatTime } from '@/utils'
|
import { formatTime } from '@/utils'
|
||||||
|
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
import { useWatermark } from '@/hooks/web/useWatermark'
|
import { useWatermark } from '@/hooks/web/useWatermark'
|
||||||
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
|
import {WorkplaceTotal, Project, Notice, Shortcut, Todo, Email} from './types'
|
||||||
import { pieOptions, barOptions } from './echarts-data'
|
import { pieOptions, barOptions } from './echarts-data'
|
||||||
|
import {formatDate} from "@vueuse/core";
|
||||||
|
import {dateFormatter2} from "@/utils/formatTime";
|
||||||
|
import {CalendarDateType, CalendarInstance} from "element-plus";
|
||||||
|
|
||||||
defineOptions({ name: 'Home' })
|
defineOptions({ name: 'Home' })
|
||||||
|
|
||||||
@ -196,7 +360,25 @@ let totalSate = reactive<WorkplaceTotal>({
|
|||||||
access: 0,
|
access: 0,
|
||||||
todo: 0
|
todo: 0
|
||||||
})
|
})
|
||||||
|
const calendar = ref<CalendarInstance>()
|
||||||
|
const selectDate = (val: CalendarDateType) => {
|
||||||
|
if (!calendar.value) return
|
||||||
|
calendar.value.selectDate(val)
|
||||||
|
}
|
||||||
|
const handleCarouselChange = async (currentIndex:number) => {
|
||||||
|
pageNo.value=currentIndex+1
|
||||||
|
|
||||||
|
}
|
||||||
|
const handlePageChange = async (newPage:number) => {
|
||||||
|
const carousel = (document.querySelector('.el-carousel') as any);
|
||||||
|
carousel.setActiveItem(newPage - 1); // 设置轮播显示项与分页同步
|
||||||
|
|
||||||
|
}
|
||||||
|
const pageNo = ref<number | undefined>(1)
|
||||||
|
const image = ref<Array<{ id: number; src: string; name: string; title: string }>>([
|
||||||
|
{id: 1, src: mn, name: '02',title:'首页图片展示标题1'},
|
||||||
|
{id: 2, src: mn, name: '03',title:'首页图片展示标题2'},
|
||||||
|
])
|
||||||
const getCount = async () => {
|
const getCount = async () => {
|
||||||
const data = {
|
const data = {
|
||||||
project: 40,
|
project: 40,
|
||||||
@ -206,6 +388,37 @@ const getCount = async () => {
|
|||||||
totalSate = Object.assign(totalSate, data)
|
totalSate = Object.assign(totalSate, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let tableData = reactive<Email[]>([])
|
||||||
|
const getTableData = async () => {
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
Date:new Date(),
|
||||||
|
Name:'张三',
|
||||||
|
Address:'关于会议的审批关于会议的审批关于会议的',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Date:new Date(),
|
||||||
|
Name:'李四',
|
||||||
|
Address:'关于会议的审批关于会议的审批关于会议的',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Date:new Date(),
|
||||||
|
Name:'王二',
|
||||||
|
Address:'关于会议的审批关于会议的审批关于会议的',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Date:new Date(),
|
||||||
|
Name:'麻子',
|
||||||
|
Address:'关于会议的审批关于会议的审批关于会议的',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Date:new Date(),
|
||||||
|
Name:'张三',
|
||||||
|
Address:'关于会议的审批关于会议的审批关于会议的',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
tableData = Object.assign(tableData, data)
|
||||||
|
}
|
||||||
// 获取项目数
|
// 获取项目数
|
||||||
let projects = reactive<Project[]>([])
|
let projects = reactive<Project[]>([])
|
||||||
const getProject = async () => {
|
const getProject = async () => {
|
||||||
@ -255,7 +468,49 @@ const getProject = async () => {
|
|||||||
]
|
]
|
||||||
projects = Object.assign(projects, data)
|
projects = Object.assign(projects, data)
|
||||||
}
|
}
|
||||||
|
//获取待办已办信息
|
||||||
|
let todo = reactive<Todo[]>([])
|
||||||
|
const getTodo = async () => {
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
title: '集团政研会六届五次会员大会在贵州遵义召开',
|
||||||
|
type: '请假',
|
||||||
|
content: '',
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '总裁在“国际海运(中国)年会2010”发表主旨演讲',
|
||||||
|
type: '任务',
|
||||||
|
content: '',
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '(集团)总公司荣获《企业社会责任蓝皮书(2010)》卓越者企业',
|
||||||
|
type: '出差',
|
||||||
|
content: '',
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '总裁在“国际海运(中国)年会2010”发表主旨演讲',
|
||||||
|
type: '会议',
|
||||||
|
content: '需要你在某日某月开会',
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '集团政研会六届五次会员大会在贵州遵义召开',
|
||||||
|
type: '会议',
|
||||||
|
content: '需要你在某日某月开会',
|
||||||
|
date: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '(集团)总公司荣获《企业社会责任蓝皮书(2010)》卓越者企业',
|
||||||
|
type: '会议',
|
||||||
|
content: '需要你在某日某月开会',
|
||||||
|
date: new Date()
|
||||||
|
}
|
||||||
|
]
|
||||||
|
todo = Object.assign(todo, data)
|
||||||
|
}
|
||||||
// 获取通知公告
|
// 获取通知公告
|
||||||
let notice = reactive<Notice[]>([])
|
let notice = reactive<Notice[]>([])
|
||||||
const getNotice = async () => {
|
const getNotice = async () => {
|
||||||
@ -377,6 +632,8 @@ const getWeeklyUserActivity = async () => {
|
|||||||
|
|
||||||
const getAllApi = async () => {
|
const getAllApi = async () => {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
getTableData(),
|
||||||
|
getTodo(),
|
||||||
getCount(),
|
getCount(),
|
||||||
getProject(),
|
getProject(),
|
||||||
getNotice(),
|
getNotice(),
|
||||||
|
@ -4,6 +4,11 @@ export type WorkplaceTotal = {
|
|||||||
todo: number
|
todo: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type Email = {
|
||||||
|
Date:Date | number | string
|
||||||
|
Name:string
|
||||||
|
Address:string
|
||||||
|
}
|
||||||
export type Project = {
|
export type Project = {
|
||||||
name: string
|
name: string
|
||||||
icon: string
|
icon: string
|
||||||
@ -11,7 +16,12 @@ export type Project = {
|
|||||||
personal: string
|
personal: string
|
||||||
time: Date | number | string
|
time: Date | number | string
|
||||||
}
|
}
|
||||||
|
export type Todo = {
|
||||||
|
title: string
|
||||||
|
type: string
|
||||||
|
content: string
|
||||||
|
data: Date | number | string
|
||||||
|
}
|
||||||
export type Notice = {
|
export type Notice = {
|
||||||
title: string
|
title: string
|
||||||
type: string
|
type: string
|
||||||
|
Loading…
Reference in New Issue
Block a user