| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047 |
- <template>
- <div class="home-container">
- <el-row :gutter="12" style="height: 148px;">
- <el-col :span="24" class="box-col">
- <el-card class="box-card">
- <div slot="header" class="clearfix">
- <span>常用功能</span>
- <span style="float: right; padding: 3px 0">
- <i class="el-icon-edit" @click="handleEdit" style="cursor: pointer; margin-right: 16px; font-size: 18px;"></i>
- <i class="el-icon-setting" @click="handleAdd" style="cursor: pointer; font-size: 18px;"></i>
- </span>
- </div>
- <div class="card-content">
- <vuedraggable v-model="commonFunctions" class="common-function">
- <div
- v-for="(item, index) in commonFunctions"
- :key="item.id"
- class="common-function-item"
- @click="handleDel(item, index)"
- :title="
- isDelFlag ? '点击删除' : ''
- "
- :class="
- isDelFlag ? 'div-del' : ''
- "
- >
- <!-- <div class="common-function-item-content"> -->
- <div class="common-function-item-icon">
- <!-- <i :class="item.icon || 'el-icon-s-opportunity'"></i> -->
- <img :src="getIconPath(item.pic)" alt="">
- </div>
- <div class="common-function-item-name">{{ item.name }}</div>
- <!-- </div> -->
- </div>
- </vuedraggable>
- </div>
- </el-card>
- </el-col>
- </el-row>
- <el-row :gutter="12" class="mt-20" style="height: 242px;">
- <el-col :span="18" class="box-col">
- <el-card class="box-card">
- <div slot="header" class="clearfix">
- <span>数据概览</span>
- </div>
- <div class="card-content">
- <el-row :gutter="20" class="overview-container">
- <el-col :span="8">
- <div class="overview">
- <div class="overview-top">
- <div class="overview-top-img"><img src="~@/assets/home/my-project.svg" alt=""></div>
- <div class="overview-top-content">
- <div class="overview-top-content-name">我的项目</div>
- <div class="overview-top-content-count">{{ myProjectList['总数量'] || 0 }}</div>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="overview-bottom">
- <div
- v-for="(value, key) in myProjectList"
- :key="key"
- v-if="key !== '总数量'"
- class="overview-bottom-item"
- @click="handleTo(key)"
- >
- <div class="overview-bottom-item-name">{{ key }}</div>
- <div class="overview-bottom-item-count">{{ value || 0 }}</div>
- </div>
- </div>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="overview">
- <div class="overview-top">
- <div class="overview-top-img"><img src="~@/assets/home/my-project.svg" alt=""></div>
- <div class="overview-top-content">
- <div class="overview-top-content-name">我的工单</div>
- <div class="overview-top-content-count">{{ myWorkOrderList['总数量'] || 0 }}</div>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="overview-bottom">
- <div
- v-for="(value, key) in myWorkOrderList"
- :key="key"
- v-if="key !== '总数量'"
- class="overview-bottom-item"
- @click="handleTo(key)"
- >
- <div class="overview-bottom-item-name">{{ key }}</div>
- <div class="overview-bottom-item-count">{{ value || 0 }}</div>
- </div>
- </div>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="overview">
- <div class="overview-top">
- <div class="overview-top-img"><img src="~@/assets/home/my-project.svg" alt=""></div>
- <div class="overview-top-content">
- <div class="overview-top-content-name">我的任务</div>
- <div class="overview-top-content-count">{{ myTaskList['总数量'] || 0 }}</div>
- </div>
- </div>
- <el-divider></el-divider>
- <div class="overview-bottom">
- <div
- v-for="(value, key) in myTaskList"
- :key="key"
- v-if="key !== '总数量'"
- class="overview-bottom-item"
- @click="handleTo(key)"
- >
- <div class="overview-bottom-item-name">{{ key }}</div>
- <div class="overview-bottom-item-count">{{ value || 0 }}</div>
- </div>
- </div>
- </div>
- </el-col>
- </el-row>
- </div>
- </el-card>
- </el-col>
- <el-col :span="6" class="box-col">
- <el-card class="box-card">
- <div slot="header" class="clearfix">
- <span>统一门户</span>
- </div>
- <div class="card-content portal-content">
- <div class="portal">
- <el-row :gutter="12">
- <el-col :span="8" v-for="item in portals" :key="item.name" class="portal-item">
- <div class="portal-item-content">
- <div class="portal-item-img"><img :src="item.img" alt=""></div>
- <div class="portal-item-name">{{ item.name }}</div>
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
- </el-card>
- </el-col>
- </el-row>
- <el-row :gutter="12" class="mt-20" style="height: 404px;">
- <el-col :span="18" class="box-col">
- <el-card class="box-card">
- <div class="card-content">
- <el-tabs v-model="activeTab" @tab-click="handleTabClick">
- <el-tab-pane label="通知公告" name="notice"></el-tab-pane>
- <!-- <el-tab-pane label="行业动态" name="industry"></el-tab-pane> -->
- <el-tab-pane label="系统通知" name="system"></el-tab-pane>
- </el-tabs>
-
- <div v-if="notifications.length > 0" class="notification-list">
- <div v-for="(item, index) in notifications" :key="index" class="notification-item" @click="handleNotificationsClick(item)">
- <div class="notification-dot"></div>
- <div class="notification-content">
- <div class="notification-header">
- <div class="notification-title">{{ item.title }}</div>
- <div v-if="activeTab == 'notice'" class="notification-text">
- {{ item.content }}
- <!-- <div v-if="item.images && item.images.length > 0" class="notification-images">
- <div v-for="(img, imgIndex) in item.images" :key="imgIndex" class="image-url">{{ img }}</div>
- </div> -->
- </div>
- <div v-else class="notification-text">{{ item.content }}</div>
- </div>
- <div class="notification-info">{{ item.createUser }} <span style="margin-left: 20px;">{{ item.department }}</span></div>
- </div>
- <div class="notification-date">{{ item.createTime }}</div>
- </div>
- <div class="notification-more" @click="loadMoreNotifications">
- 更多......
- </div>
- </div>
- <div v-else class="no-notification">
- <el-empty description="暂无数据"></el-empty>
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="6" class="box-col">
- <el-card class="box-card">
- <div slot="header" class="clearfix">
- <span>工作日历</span>
- </div>
- <div class="card-content calendar-content">
- <el-calendar class="calendar" v-model="currentDate" :range="calendarRange">
- <template
- slot="dateCell"
- slot-scope="{date, data}">
- <div class="calendar-day-content" @click="handleDateClick(data.day)">
- <div :class="data.isSelected ? 'is-selected-day' : ''">{{ data.day.split('-')[2] }} </div>
- <div class="dot-container" v-if="hasSchedule(data.day)"><span class="dot"></span></div>
- </div>
- </template>
- </el-calendar>
- <div class="calendar-more">
- <!-- el-icon-caret-top -->
- <i :class="calendarShowMore ? 'el-icon-caret-top' : 'el-icon-caret-bottom'" style="font-size: 24px; color: #d7d7d7; cursor: pointer;" @click="handleCalendarMoreClick"></i>
- </div>
- <div class="schedule">
- <div class="schedule-item" v-for="(item, index) in getScheduleListByDate()" :key="index">
- <el-row :gutter="20">
- <el-col :span="10">
- <div class="schedule-item-time">
- <div>{{ item.startTime }}</div>
- <div>~</div>
- <div>{{ item.endTime }}</div>
- </div>
- </el-col>
- <el-col :span="14">
- <div class="schedule-item-name">
- {{ item.title || item.name || '日程安排' }}
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
- </div>
- </el-card>
- </el-col>
- </el-row>
- <commonDialog
- ref="commonDialogRef"
- v-if="commonDialogFlag"
- :common-dialog-flag.sync="commonDialogFlag"
- @reload="getCommonFunctionsList"
- ></commonDialog>
- </div>
- </template>
- <script>
- import { notifyMessagePageAPI } from '@/api/bpm/task';
- import {
- userResourceDeleteAPI,
- userResourceListAPI,
- getList,
- getMyProjectTotal,
- getMyWorkOrderTotal,
- getMyTaskTotal,
- getMyWorkCalendar
- } from '@/api/home';
- import { deepClone } from 'ele-admin/lib/utils/core';
- import { mapGetters } from 'vuex';
- import vuedraggable from 'vuedraggable';
- import commonDialog from '@/views/home/common-dialog.vue';
- import { noticeDocumentPageV1API } from '@/api/documents/noticeIssuance/index.js';
- export default {
- name: 'HomePage',
- components: {
- vuedraggable,
- commonDialog
- },
- data() {
- return {
- currentDate: new Date(),
- calendarRange: [],
- commonFunctions: [],
- activeTab: 'notice',
- notifications: [],
- currentPage: 1,
- pageSize: 4,
- portals: [],
- calendarShowMore: false,
- isDelFlag: false,
- commonDialogFlag: false,
- myProjectList: {},
- myWorkOrderList: {},
- myTaskList: {},
- myWorkCalendar: {},
- groupedWorkCalendar: {}, // 分组后的工作日历数据
- selectedScheduleDate: '', // 当前选中的日期
- };
- },
- computed: {
- ...mapGetters(['user']),
- currentNotifications() {
- const notifications = this.notifications[this.activeTab] || [];
- return notifications;
- }
- },
- watch: {
- currentDate: {
- handler(newVal, oldVal) {
- // 检查月份是否变化
- if (newVal.getMonth() !== oldVal.getMonth() || newVal.getFullYear() !== oldVal.getFullYear()) {
- // 重新计算日期范围
- this.calendarRange = this.getMonthRange();
- // 重新获取日程数据
- this.getMyWorkCalendar();
- }
- // 日期变化时,处理选中日期的日程
- if (newVal !== oldVal) {
- const year = newVal.getFullYear();
- const month = String(newVal.getMonth() + 1).padStart(2, '0');
- const day = String(newVal.getDate()).padStart(2, '0');
- const dateStr = `${year}-${month}-${day}`;
- this.handleDateClick(dateStr);
- }
- },
- deep: true
- }
- },
- created() {
- this.calendarRange = this.getWeekRange();
- this.getPortalsList();
- this.getCommonFunctionsList();
- this.getMyProjectTotal();
- this.getMyWorkOrderTotal();
- this.getMyTaskTotal();
- this.getMessageList();
- this.getMyWorkCalendar();
- },
- methods: {
- handleNotificationsClick(item) {
- console.log('item~~~', item);
- this.$router.push({
- path: '/page-wt/documents/noticeIssuance/add-or-edit',
- // query
- query: {
- id: item.id,
- type: 'detail'
- }
- });
- },
- async getMyWorkCalendar() {
- const res = await getMyWorkCalendar({
- startDate: this.calendarRange[0],
- endDate: this.calendarRange[1]
- });
- console.log('myWorkCalendar~~~', res);
- // 数据分组
- if (res) {
- const groupedData = {};
- res.forEach(item => {
- if (item.startTime) {
- // 分割 startTime 为日期和时间
- const dateTime = item.startTime.split(' ');
- const date = dateTime[0];
- const time = dateTime[1] || '';
-
- // 添加日期和时间属性
- item.date = date;
- item.time = time;
-
- // 按日期分组
- if (!groupedData[date]) {
- groupedData[date] = [];
- }
- groupedData[date].push(item);
- }
- });
- console.log('分组后的数据:', groupedData);
- // 可以将分组后的数据存储到一个新的变量中,以便在模板中使用
- this.groupedWorkCalendar = groupedData;
-
- // 获取当天日期并设置为选中日期
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, '0');
- const day = String(today.getDate()).padStart(2, '0');
- const todayStr = `${year}-${month}-${day}`;
-
- // 如果当天有日程,则自动选中当天
- if (groupedData[todayStr] && groupedData[todayStr].length > 0) {
- this.selectedScheduleDate = todayStr;
- }
- }
- },
- hasSchedule(day) {
- return this.groupedWorkCalendar && this.groupedWorkCalendar[day] && this.groupedWorkCalendar[day].length > 0;
- },
- handleDateClick(day) {
- console.log('day~~~', day);
- this.selectedScheduleDate = day;
- },
- getScheduleListByDate() {
- if (this.selectedScheduleDate && this.groupedWorkCalendar[this.selectedScheduleDate]) {
- return this.groupedWorkCalendar[this.selectedScheduleDate];
- }
- return [];
- },
- handleTo(key) {
- switch(key) {
- case '测试项目':
- case '研发项目':
- case '实施项目':
- case '开发项目':
- this.handelRouterTo('/page-pro/project-initiation')
- break;
- case '运维工单':
- this.handelRouterTo('/page-eam/maintenance/patrol')
- break;
- case '质检工单':
- this.handelRouterTo('/page-qms/inspectionWork')
- break;
- case '生产工单':
- this.handelRouterTo('/page-mes/produceOrder?isWt=true')
- break;
- case '盘点工单':
- this.handelRouterTo('/page-wms/warehouseManagement/stocktaking/work')
- break;
- case '盘点任务':
- this.handelRouterTo('')
- break;
- case '生产任务':
- this.handelRouterTo('/page-mes/rw')
- break;
- case '质检任务':
- this.handelRouterTo('/page-qms/inspectionProjectTask')
- break;
- case '项目任务':
- this.handelRouterTo('/page-pro/task/myTaskList')
- break;
- }
- },
- async getMessageList() {
- let list = [];
- if(this.activeTab === 'notice') {
- const res = await noticeDocumentPageV1API({
- pageNum: 1,
- size: 5,
- approvalStatus: 2
- })
- console.log('noticeDocumentPageV1API~~~', res);
- list = (res.list || []).map((item) => {
- // 提取 HTML 中的图片地址
- const images = [];
- const content = item.content || '';
- const imgRegex = /<img[^>]+src=["']([^"']+)["']/gi;
- let match;
- while ((match = imgRegex.exec(content)) !== null) {
- images.push(match[1]);
- }
- // 提取纯文本内容(去除 HTML 标签)
- const textContent = content.replace(/<[^>]+>/g, '').trim();
-
- return {
- title: item.title,
- content: textContent,
- images: images,
- createUser: '拟稿人:' + item.draftAuthor,
- department: '发文机关:' + item.issuingAuthority,
- createTime: item.createTime
- }
- });
- } else if(this.activeTab === 'industry') {
- list = []
- } else if(this.activeTab === 'system') {
- const res = await notifyMessagePageAPI({
- pageNum: 1,
- size: 5,
- // userId: this.user.info.userId,
-
- });
- list = (res.list || []).map((item) => {
- return {
- title: item.templateName,
- content: item.templateContent,
- createUser: '创建人:' + item.userName,
- department: item.department,
- createTime: item.createTime
- }
- });
- }
-
- this.notifications = list;
- console.log('notifications~~~', this.notifications);
- },
- async getMyProjectTotal() {
- this.myProjectList = await getMyProjectTotal({});
- },
- async getMyWorkOrderTotal() {
- this.myWorkOrderList = await getMyWorkOrderTotal({});
- },
- async getMyTaskTotal() {
- this.myTaskList = await getMyTaskTotal({});
- },
- handleAdd() {
- if(this.commonFunctions.length > 12) return this.$message.warning('最多只能添加12个常用功能');
- this.commonDialogFlag = true;
- this.$nextTick(() => {
- this.$refs.commonDialogRef.init();
- });
- },
- handleEdit() {
- this.isDelFlag = !this.isDelFlag;
- },
- handleDel(item, index) {
- if (this.isDelFlag) return this.handleCommonListDel(item, index);
- let urlPath = item.topUrl + item.url;
- console.log('urlPath~~~', urlPath);
- this.handelRouterTo(urlPath);
- },
- async handleCommonListDel(item, index) {
- await userResourceDeleteAPI([item.id]);
- this.commonFunctions.splice(index, 1);
- },
- handelRouterTo(path) {
- window.history.pushState(null, '', path);
- },
- getIconPath(pic) {
- if (pic) {
- // 如果后端返回的是静态路径字符串,需要通过 require() 处理
- return require(`@/assets/home/commonIcon/${pic}`);
- }
- // 如果没有 pic 字段,使用默认图标
- return require('@/assets/home/commonIcon/icon_0.svg');
- },
- async getCommonFunctionsList() {
- this.commonFunctions = await userResourceListAPI();
- console.log('commonFunctions~~~', this.commonFunctions);
- },
- async getPortalsList() {
- let { list } = await getList({ pageNum: 1, size: 9999 });
- this.portals = list.map((item) => {
- return {
- ...item,
- img:
- window.location.origin +
- '/api/main/file/getFile?objectName=' +
- item.iconPath
- };
- });
- console.log(this.portals);
- },
- handleCalendarMoreClick() {
- this.calendarShowMore = !this.calendarShowMore;
- console.log(this.getMonthRange());
- if (this.calendarShowMore) {
- this.calendarRange = this.getMonthRange();
- } else {
- this.calendarRange = this.getWeekRange();
- }
- this.getMyWorkCalendar();
- },
- handleTabClick() {
- // 切换标签页时重置页码
- // this.currentPage = 1;
- this.getMessageList();
- },
- loadMoreNotifications() {
- // 加载更多通知(增加页码)
- // this.currentPage++;
- switch(this.activeTab) {
- case 'notice':
- this.handelRouterTo('/page-wt/documents/noticeIssuance');
- break;
- case 'industry':
- this.handelRouterTo('/industry');
- break;
- case 'system':
- this.handelRouterTo('/page-wt/message');
- break;
- }
- },
- // 获取当天所在周的范围,周一开头
- getWeekRange() {
- const now = new Date(this.currentDate);
- const dayOfWeek = now.getDay(); // 0 是周日,1 是周一,...,6 是周六
- // 计算与周一的差值:如果是周日(0),则差值为 -6,否则差值为 1 - dayOfWeek
- const diff = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
- const monday = new Date(now);
- monday.setDate(now.getDate() + diff);
- const sunday = new Date(monday);
- sunday.setDate(monday.getDate() + 6);
-
- const formatDate = (date) => {
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, '0');
- const day = String(date.getDate()).padStart(2, '0');
- return `${year}-${month}-${day}`;
- };
-
- return [
- formatDate(monday),
- formatDate(sunday)
- ];
- },
- // 获取选中当月的范围
- getMonthRange() {
- const now = new Date(this.currentDate);
- const year = now.getFullYear();
- const month = now.getMonth();
-
- // 当月第一天
- const firstDay = new Date(year, month, 1);
- // 下月第一天,减一天就是当月最后一天
- const lastDay = new Date(year, month + 1, 0);
-
- const formatDate = (date) => {
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, '0');
- const day = String(date.getDate()).padStart(2, '0');
- return `${year}-${month}-${day}`;
- };
-
- return [
- formatDate(firstDay),
- formatDate(lastDay)
- ];
- }
-
- }
- };
- </script>
- <style lang="scss" scoped>
- .home-container {
- width: 100%;
- padding: 10px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- // height: calc(100vh - 96px);
- .card-content {
- &.portal-content {
- max-height: 180px;
- overflow-y: auto;
- overflow-x: hidden;
- padding-right: 8px;
- flex-shrink: 0;
- min-height: 0;
-
- .portal {
- max-height: 100%;
- overflow-y: auto;
- overflow-x: hidden;
- }
-
- &::-webkit-scrollbar {
- width: 6px;
- }
-
- &::-webkit-scrollbar-track {
- background: #f1f1f1;
- border-radius: 3px;
- }
-
- &::-webkit-scrollbar-thumb {
- background: #c1c1c1;
- border-radius: 3px;
- }
-
- &::-webkit-scrollbar-thumb:hover {
- background: #a8a8a8;
- }
- }
-
- &.calendar-content {
- max-height: 332px;
- overflow-y: auto;
- overflow-x: hidden;
- padding-right: 8px;
-
- &::-webkit-scrollbar {
- width: 6px;
- }
-
- &::-webkit-scrollbar-track {
- background: #f1f1f1;
- border-radius: 3px;
- }
-
- &::-webkit-scrollbar-thumb {
- background: #c1c1c1;
- border-radius: 3px;
- }
-
- &::-webkit-scrollbar-thumb:hover {
- background: #a8a8a8;
- }
- }
-
- .common-function {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- align-items: center;
- .common-function-item {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin: 0 18px;
- border-radius: 5px;
- cursor: pointer;
- transition: all 0.3s ease-in-out;
- .common-function-item-icon {
- width: 50px;
- height: 50px;
- box-shadow: 0px 1px 2px 1px #eae7e7;
- background: #f8fafc;
- border-radius: 17px;
- display: flex;
- justify-content: center;
- align-items: center;
- img {
- width: 30px;
- height: 30px;
- }
- }
- .common-function-item-name {
- font-size: 14px;
- font-weight: 400;
- color: #3f3e3e;
- margin-top: 10px;
- }
- }
- .div-del {
- // background: #cccccc !important;
- position: relative;
- }
- .div-del::after {
- content: '—';
- position: absolute;
- padding: 5px; /* 按钮的内边距 */
- background-color: rgba(255, 0, 0, 0.91);
- color: white;
- border-radius: 50%;
- }
- }
- .overview-container {
- .overview {
- padding: 16px;
- box-sizing: border-box;
- border-radius: 17px;
- box-shadow: -1px 1px 0px 1px #ececec, 1px -1px 0px 1px #ececec;
- border: 1px solid #ececec;
- .overview-top {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .overview-top-img {
- width: 66px;
- height: 66px;
- border-radius: 50%;
- margin-right: 10px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .overview-top-content {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: flex-start;
- .overview-top-content-name {
- font-size: 18px;
- font-weight: 500;
- color: #525252;;
- }
- .overview-top-content-count {
- font-size: 28px;
- font-weight: 500;
- color: #2D80EE;
- line-height: 42px;
- // margin-top: 8px;
- }
- }
- }
- .el-divider {
- margin: 12px 0;
- }
- .overview-bottom {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- grid-gap: 10px;
- .overview-bottom-item {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- cursor: pointer;
- .overview-bottom-item-name {
- font-size: 14px;
- font-weight: 400;
- color: #686767;
- margin-right: 30px;
- }
- .overview-bottom-item-count {
- font-size: 15px;
- font-weight: 400;
- color: #303133;
- }
- }
- }
- }
- }
- .portal {
- .portal-item {
- margin-bottom: 12px;
- .portal-item-content {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- border-radius: 11px;
- border: 1px solid #ebebeb;
- box-shadow: 0px 4px 4px #a7a7a740;
- padding: 6px 4px;
- .portal-item-img {
- width: 32px;
- height: 32px;
- border-radius: 5px;
- margin-right: 10px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .portal-item-name {
- font-size: 13px;
- font-weight: bold;
- color: #303133;
- }
- }
-
- }
- }
- .calendar {
- background-color: #f9fbfd;
- border-radius: 8px;
- ::v-deep .el-calendar__header {
- .el-calendar__title {
- font-size: 16px;
- font-weight: bold;
- color: #303133;
- }
- }
- ::v-deep .el-calendar__body {
- padding-bottom: 16px;
- .el-calendar-table {
- tr {
- td {
- border: none;
- .el-calendar-day {
- height: 48px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .calendar-day-content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- flex-direction: column;
- height: 100%;
- width: 100%;
-
- .is-selected-day {
- background-color: #005dff;
- color: #fff;
- border-radius: 5px;
- box-shadow: 0 3px 7px rgba(0, 0, 0, 0.12);
- padding: 5px;
- }
- .dot-container {
- display: flex;
- justify-content: center;
- align-items: center;
- margin-top: 5px;
- .dot {
- width: 5px;
- height: 5px;
- border-radius: 50%;
- background-color: #00c951;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- .calendar-more {
- display: flex;
- justify-content: center;
- align-items: center;
-
- }
- .schedule {
- .schedule-item {
- margin-bottom: 10px;
- padding: 10px;
- border-radius: 5px;
- background-color: #f9fbfd;
- font-size: 13px;
- }
- }
- }
- }
- .mt-20 {
- margin-top: 16px;
- }
- .box-col {
- height: 100%;
- }
- .box-card {
- height: 100%;
- ::v-deep .el-card__body {
- padding: 12px;
- }
- }
- /* 通知公告样式 */
- .notification-list {
- margin-top: 16px;
- max-height: 328px;
- overflow-y: auto;
- overflow-x: hidden;
- padding-right: 8px;
-
- &::-webkit-scrollbar {
- width: 6px;
- }
-
- &::-webkit-scrollbar-track {
- background: #f1f1f1;
- border-radius: 3px;
- }
-
- &::-webkit-scrollbar-thumb {
- background: #c1c1c1;
- border-radius: 3px;
- }
-
- &::-webkit-scrollbar-thumb:hover {
- background: #a8a8a8;
- }
- }
- .no-notification {
- }
- .notification-item {
- display: flex;
- align-items: center;
- padding: 12px 0;
- border-bottom: 1px solid #f0f0f0;
- &:last-child {
- border-bottom: none;
- }
- }
- .notification-dot {
- width: 15px;
- height: 15px;
- background-color: #a6ccff;;
- border-radius: 50%;
- margin-right: 12px;
- margin-top: 5px;
- flex-shrink: 0;
- }
- .notification-content {
- flex: 1;
- min-width: 0;
- }
- .notification-header {
- display: flex;
- align-items: center;
- margin-bottom: 4px;
- }
- .notification-title {
- font-size: 15px;
- font-weight: 500;
- color: #333;
- margin-right: 12px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- flex-shrink: 1;
- max-width: 200px;
- }
- .notification-info {
- font-size: 12px;
- color: #333;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .notification-text {
- font-size: 12px;
- color: #333;
- line-height: 1.4;
- flex: 1;
- min-width: 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .notification-images {
- margin-top: 8px;
- }
- .image-url {
- font-size: 12px;
- color: #1890ff;
- cursor: pointer;
- margin-bottom: 4px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-
- &:hover {
- text-decoration: underline;
- }
- }
- .notification-date {
- font-size: 12px;
- color: #999;
- margin-left: 12px;
- flex-shrink: 0;
- }
- .notification-more {
- text-align: right;
- margin-top: 12px;
- font-size: 12px;
- color: #1890ff;
- cursor: pointer;
- &:hover {
- text-decoration: underline;
- }
- }
- </style>
|