forked from liweijie/education
首页
This commit is contained in:
@@ -1,89 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container home">
|
<div class="app-container home">
|
||||||
<!-- 第一行:信息/日志/公告 -->
|
<!-- 通知公告 -->
|
||||||
<el-row :gutter="20" class="bottom-row">
|
<el-row :gutter="20" class="bottom-row">
|
||||||
<el-col :xs="24" :sm="24" :md="12" :lg="8">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24">
|
||||||
<el-card class="module-card info-card" shadow="hover">
|
|
||||||
<div slot="header" class="card-header">
|
|
||||||
<span><i class="el-icon-phone-outline card-icon"></i> 联系信息</span>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="contact-item">
|
|
||||||
<div class="contact-icon"><i class="el-icon-s-promotion"></i></div>
|
|
||||||
<div class="contact-text">
|
|
||||||
<div class="label">官网</div>
|
|
||||||
<el-link href="http://www.roomroot.vip" target="_blank">http://www.roomroot.vip</el-link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="contact-item">
|
|
||||||
<div class="contact-icon"><i class="el-icon-user-solid"></i></div>
|
|
||||||
<div class="contact-text">
|
|
||||||
<div class="label">QQ群</div>
|
|
||||||
<a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=M9y5NjAl44lAL_Vh2crmEehZU_PMU6KS&authKey=ZSDz8hEREWSaPuxQV3gEwqGIaGjfRNnkB4rJjf0IvXhrSUGSGwQFmBA%2Boe8HFxyl&noverify=0&group_code=127358632" target="_blank">127358632</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="contact-item">
|
|
||||||
<div class="contact-icon"><i class="el-icon-chat-dot-round"></i></div>
|
|
||||||
<div class="contact-text">
|
|
||||||
<div class="label">微信</div>
|
|
||||||
<span>风影随行</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="contact-item">
|
|
||||||
<div class="contact-icon"><i class="el-icon-money"></i></div>
|
|
||||||
<div class="contact-text">
|
|
||||||
<div class="label">支付宝</div>
|
|
||||||
<span>风影随行</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :xs="24" :sm="24" :md="12" :lg="8">
|
|
||||||
<el-card class="module-card log-card" shadow="hover">
|
|
||||||
<div slot="header" class="card-header">
|
|
||||||
<span><i class="el-icon-time card-icon"></i> 登录日志</span>
|
|
||||||
</div>
|
|
||||||
<div class="card-body" v-loading="loginLogLoading">
|
|
||||||
<table v-if="loginLogList.length > 0" class="data-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>登录人</th>
|
|
||||||
<th>登录时间</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="item in loginLogList" :key="item.infoId">
|
|
||||||
<td>
|
|
||||||
<i class="el-icon-user table-icon"></i>
|
|
||||||
{{ item.userName }}
|
|
||||||
</td>
|
|
||||||
<td>{{ parseTime(item.loginTime) }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div v-else class="empty-state">
|
|
||||||
<i class="el-icon-folder-opened empty-icon"></i>
|
|
||||||
<p>暂无记录</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-footer">
|
|
||||||
<el-pagination
|
|
||||||
@size-change="handleLoginLogSizeChange"
|
|
||||||
@current-change="handleLoginLogCurrentChange"
|
|
||||||
:current-page="loginLogPage.currentPage"
|
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
:page-size="loginLogPage.pageSize"
|
|
||||||
:total="loginLogPage.total"
|
|
||||||
layout="total, prev, pager, next"
|
|
||||||
small
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :xs="24" :sm="24" :md="12" :lg="8">
|
|
||||||
<el-card class="module-card notice-card" shadow="hover">
|
<el-card class="module-card notice-card" shadow="hover">
|
||||||
<div slot="header" class="card-header">
|
<div slot="header" class="card-header">
|
||||||
<span><i class="el-icon-bell card-icon"></i> 通知公告</span>
|
<span><i class="el-icon-bell card-icon"></i> 通知公告</span>
|
||||||
@@ -131,7 +50,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listNotice } from "@/api/system/notice"
|
import { listNotice } from "@/api/system/notice"
|
||||||
import { homeList } from "@/api/monitor/logininfor"
|
|
||||||
import NoticeDetailView from "@/layout/components/HeaderNotice/DetailView"
|
import NoticeDetailView from "@/layout/components/HeaderNotice/DetailView"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -142,13 +60,6 @@ export default {
|
|||||||
version: "3.9.2",
|
version: "3.9.2",
|
||||||
noticeList: [],
|
noticeList: [],
|
||||||
noticeLoading: false,
|
noticeLoading: false,
|
||||||
loginLogList: [],
|
|
||||||
loginLogLoading: false,
|
|
||||||
loginLogPage: {
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
noticePage: {
|
noticePage: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -158,7 +69,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadNoticeList()
|
this.loadNoticeList()
|
||||||
this.loadLoginLogList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goTarget(href) {
|
goTarget(href) {
|
||||||
@@ -208,28 +118,6 @@ export default {
|
|||||||
handleViewNotice(item) {
|
handleViewNotice(item) {
|
||||||
this.$refs.noticeViewRef.open(item)
|
this.$refs.noticeViewRef.open(item)
|
||||||
},
|
},
|
||||||
loadLoginLogList() {
|
|
||||||
this.loginLogLoading = true
|
|
||||||
homeList({
|
|
||||||
pageNum: this.loginLogPage.currentPage,
|
|
||||||
pageSize: this.loginLogPage.pageSize
|
|
||||||
}).then(response => {
|
|
||||||
this.loginLogList = response.rows || []
|
|
||||||
this.loginLogPage.total = response.total || 0
|
|
||||||
this.loginLogLoading = false
|
|
||||||
}).catch(() => {
|
|
||||||
this.loginLogLoading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleLoginLogSizeChange(val) {
|
|
||||||
this.loginLogPage.pageSize = val
|
|
||||||
this.loginLogPage.currentPage = 1
|
|
||||||
this.loadLoginLogList()
|
|
||||||
},
|
|
||||||
handleLoginLogCurrentChange(val) {
|
|
||||||
this.loginLogPage.currentPage = val
|
|
||||||
this.loadLoginLogList()
|
|
||||||
},
|
|
||||||
handleNoticeSizeChange(val) {
|
handleNoticeSizeChange(val) {
|
||||||
this.noticePage.pageSize = val
|
this.noticePage.pageSize = val
|
||||||
this.noticePage.currentPage = 1
|
this.noticePage.currentPage = 1
|
||||||
@@ -371,102 +259,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 14px 0;
|
|
||||||
border-bottom: 1px solid #f5f5f5;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-icon {
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: linear-gradient(135deg, var(--edu-green-dark) 0%, var(--edu-green-primary) 100%);
|
|
||||||
color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 16px;
|
|
||||||
margin-right: 12px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
box-shadow: 0 2px 8px rgba(15, 25, 86, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-text {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #909399;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a, .el-link {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--edu-green-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover, .el-link:hover {
|
|
||||||
color: var(--edu-green-dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
font-size: 13px;
|
|
||||||
color: #606266;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
font-size: 13px;
|
|
||||||
|
|
||||||
thead {
|
|
||||||
tr {
|
|
||||||
background: linear-gradient(135deg, rgba(0, 135, 90, 0.06) 0%, rgba(0, 135, 90, 0.04) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
padding: 10px 20px;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--edu-green-dark);
|
|
||||||
border-bottom: 1px solid rgba(0, 135, 90, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody {
|
|
||||||
tr {
|
|
||||||
transition: background 0.2s;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: rgba(0, 135, 90, 0.04);
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
padding: 10px 20px;
|
|
||||||
color: #4a4f6b;
|
|
||||||
border-bottom: 1px solid #f0f1f7;
|
|
||||||
|
|
||||||
.table-icon {
|
|
||||||
color: var(--edu-green-light);
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child td {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.notice-list {
|
.notice-list {
|
||||||
.notice-item {
|
.notice-item {
|
||||||
padding: 14px 0;
|
padding: 14px 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user