0917
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
<div class="nav-tab" @click="handleInspection6">工单管理</div>
|
||||
<div class="nav-tab" @click="handleInspection7">运维组织</div>
|
||||
</div>
|
||||
|
||||
<!-- 页面标题 -->
|
||||
<TitleComponent title="运维巡检管理" subtitle="制定巡检计划,安排巡检任务,跟进巡检记录"></TitleComponent>
|
||||
|
||||
@ -58,12 +59,12 @@
|
||||
|
||||
<!-- 任务卡片列表 -->
|
||||
<div class="task-cards">
|
||||
<div class="task-card" v-for="(task, index) in pagedTasks" :key="index">
|
||||
<div class="task-card" v-for="(task, index) in pagedTasks" :key="index" :class="task.statusClass">
|
||||
<div class="task-header">
|
||||
<div class="task-title">
|
||||
{{ task.title }}
|
||||
</div>
|
||||
<div class="task-status" :class="task.statusClass">
|
||||
<div class="task-status" :class="task.tagClass">
|
||||
{{ task.statusText }}
|
||||
</div>
|
||||
</div>
|
||||
@ -199,13 +200,14 @@ const taskStatus = ref('');
|
||||
const planType = ref('');
|
||||
const executor = ref('');
|
||||
|
||||
// 任务数据
|
||||
// 任务数据 - 分离卡片状态类和标签状态类
|
||||
const tasks = ref([
|
||||
{
|
||||
title: '生产服务器日常巡检',
|
||||
status: 'pending',
|
||||
statusText: '待执行',
|
||||
statusClass: 'status-pending',
|
||||
statusClass: 'card-pending', // 仅用于卡片左侧线和阴影
|
||||
tagClass: 'tag-pending', // 仅用于标签样式
|
||||
planTime: '2025-06-16 08:30',
|
||||
target: '生产服务器集群(12台)',
|
||||
executor: '张明',
|
||||
@ -217,7 +219,8 @@ const tasks = ref([
|
||||
title: '机房环境检查',
|
||||
status: 'delayed',
|
||||
statusText: '已延期',
|
||||
statusClass: 'status-delayed',
|
||||
statusClass: 'card-delayed',
|
||||
tagClass: 'tag-delayed',
|
||||
planTime: '2025-06-16 08:30',
|
||||
target: '机房温度、湿度、电源',
|
||||
executor: '李华',
|
||||
@ -230,7 +233,8 @@ const tasks = ref([
|
||||
title: '网络设备安全巡检',
|
||||
status: 'executing',
|
||||
statusText: '执行中',
|
||||
statusClass: 'status-executing',
|
||||
statusClass: 'card-executing',
|
||||
tagClass: 'tag-executing',
|
||||
planTime: '2025-06-16 09:30',
|
||||
target: '核心交换机、防火墙',
|
||||
executor: '王强',
|
||||
@ -244,7 +248,8 @@ const tasks = ref([
|
||||
title: '数据库性能巡检',
|
||||
status: 'completed',
|
||||
statusText: '已完成',
|
||||
statusClass: 'status-completed',
|
||||
statusClass: 'card-completed',
|
||||
tagClass: 'tag-completed',
|
||||
planTime: '2025-06-16 10:30',
|
||||
target: '生产数据库集群(2组)',
|
||||
executor: '赵伟',
|
||||
@ -258,7 +263,8 @@ const tasks = ref([
|
||||
title: '生产服务器日常巡检',
|
||||
status: 'pending',
|
||||
statusText: '待执行',
|
||||
statusClass: 'status-pending',
|
||||
statusClass: 'card-pending',
|
||||
tagClass: 'tag-pending',
|
||||
planTime: '2025-06-16 13:30',
|
||||
target: '生产服务器集群(12台)',
|
||||
executor: '张明',
|
||||
@ -270,7 +276,8 @@ const tasks = ref([
|
||||
title: '机房环境检查',
|
||||
status: 'delayed',
|
||||
statusText: '已延期',
|
||||
statusClass: 'status-delayed',
|
||||
statusClass: 'card-delayed',
|
||||
tagClass: 'tag-delayed',
|
||||
planTime: '2025-06-16 14:00',
|
||||
target: '机房温度、湿度、电源',
|
||||
executor: '李华',
|
||||
@ -283,7 +290,8 @@ const tasks = ref([
|
||||
title: '网络设备安全巡检',
|
||||
status: 'executing',
|
||||
statusText: '执行中',
|
||||
statusClass: 'status-executing',
|
||||
statusClass: 'card-executing',
|
||||
tagClass: 'tag-executing',
|
||||
planTime: '2025-06-16 15:00',
|
||||
target: '核心交换机、防火墙',
|
||||
executor: '王强',
|
||||
@ -297,7 +305,8 @@ const tasks = ref([
|
||||
title: '数据库性能巡检',
|
||||
status: 'completed',
|
||||
statusText: '已完成',
|
||||
statusClass: 'status-completed',
|
||||
statusClass: 'card-completed',
|
||||
tagClass: 'tag-completed',
|
||||
planTime: '2025-06-16 16:00',
|
||||
target: '生产数据库集群(2组)',
|
||||
executor: '赵伟',
|
||||
@ -456,37 +465,6 @@ const handleInspection7 = () => {
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.custom-tabs {
|
||||
border-bottom: none;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.custom-tabs .el-tabs__header {
|
||||
margin: 0 -20px 0 -20px;
|
||||
padding: 0 20px;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.custom-tabs .el-tabs__nav-wrap::after {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.custom-tabs .el-tabs__item {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
padding: 12px 20px;
|
||||
margin-right: 20px;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
.custom-tabs .el-tabs__item.is-active {
|
||||
color: #409eff;
|
||||
border-bottom-color: #409eff;
|
||||
}
|
||||
|
||||
.custom-tabs .el-tabs__item:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
/* 筛选栏样式 */
|
||||
.filter-bar {
|
||||
background-color: #fff;
|
||||
@ -513,17 +491,6 @@ const handleInspection7 = () => {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.filter-bar .el-select .el-input__inner {
|
||||
border-radius: 4px;
|
||||
border-color: #dcdfe6;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.filter-bar .el-select .el-input__inner:focus {
|
||||
border-color: #165dff;
|
||||
box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
@ -534,92 +501,74 @@ const handleInspection7 = () => {
|
||||
background-color: #f2f3f5;
|
||||
color: #303133;
|
||||
border-color: #f2f3f5;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.search-btn:hover {
|
||||
background-color: #e5e6eb;
|
||||
color: #303133;
|
||||
border-color: #e5e6eb;
|
||||
}
|
||||
|
||||
.create-btn {
|
||||
background-color: #165dff;
|
||||
border-color: #165dff;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.create-btn:hover {
|
||||
background-color: #0e42d2;
|
||||
border-color: #0e42d2;
|
||||
}
|
||||
|
||||
/* 任务卡片样式 */
|
||||
.task-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.task-card {
|
||||
background-color: #fff;
|
||||
background-color: #fff; /* 强制卡片背景为白色 */
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
|
||||
padding: 16px 16px 60px 16px; /* 底部留出更多空间给按钮 */
|
||||
transition: box-shadow 0.2s ease;
|
||||
padding: 16px 16px 60px 24px; /* 左侧留空间给状态线 */
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 280px; /* 确保有足够高度显示所有内容 */
|
||||
min-height: 280px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.task-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #f0f2f5;
|
||||
position: absolute;
|
||||
bottom: 16px;
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
background-color: #fff;
|
||||
padding: 12px 0 0 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.task-actions .el-button {
|
||||
border-radius: 16px;
|
||||
padding: 6px 16px;
|
||||
}
|
||||
/* 卡片左侧状态竖线 */
|
||||
.task-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 4px;
|
||||
width: 6px; /* 加宽状态线 */
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.task-card.status-pending::before {
|
||||
/* 卡片状态类 - 仅控制左侧线和阴影 */
|
||||
.card-pending::before {
|
||||
background-color: #1677ff;
|
||||
}
|
||||
|
||||
.task-card.status-delayed::before {
|
||||
.card-delayed::before {
|
||||
background-color: #ff4d4f;
|
||||
}
|
||||
|
||||
.task-card.status-executing::before {
|
||||
.card-executing::before {
|
||||
background-color: #fa8c16;
|
||||
}
|
||||
|
||||
.task-card.status-completed::before {
|
||||
.card-completed::before {
|
||||
background-color: #52c41a;
|
||||
}
|
||||
|
||||
/* 卡片阴影效果 */
|
||||
.card-pending {
|
||||
box-shadow: 0 4px 16px rgba(22, 119, 255, 0.15);
|
||||
}
|
||||
.card-delayed {
|
||||
box-shadow: 0 4px 16px rgba(255, 77, 79, 0.15);
|
||||
}
|
||||
.card-executing {
|
||||
box-shadow: 0 4px 16px rgba(250, 140, 22, 0.15);
|
||||
}
|
||||
.card-completed {
|
||||
box-shadow: 0 4px 16px rgba(82, 196, 26, 0.15);
|
||||
}
|
||||
|
||||
.task-card:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.task-header {
|
||||
@ -635,43 +584,39 @@ const handleInspection7 = () => {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #1d2129;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* 状态标签样式 - 仅作用于标签本身 */
|
||||
.task-status {
|
||||
padding: 4px 10px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
/* 待执行状态 - 蓝色 */
|
||||
.status-pending {
|
||||
/* 标签状态类 - 仅控制标签样式 */
|
||||
.tag-pending {
|
||||
background-color: #e6f7ff;
|
||||
color: #1677ff;
|
||||
border-color: #91d5ff;
|
||||
border: 1px solid #91d5ff;
|
||||
}
|
||||
|
||||
/* 已延期状态 - 红色 */
|
||||
.status-delayed {
|
||||
.tag-delayed {
|
||||
background-color: #fff2f0;
|
||||
color: #ff4d4f;
|
||||
border-color: #ffccc7;
|
||||
border: 1px solid #ffccc7;
|
||||
}
|
||||
|
||||
/* 执行中状态 - 黄色 */
|
||||
.status-executing {
|
||||
.tag-executing {
|
||||
background-color: #fffbe6;
|
||||
color: #fa8c16;
|
||||
border-color: #ffe58f;
|
||||
border: 1px solid #ffe58f;
|
||||
}
|
||||
|
||||
/* 已完成状态 - 绿色 */
|
||||
.status-completed {
|
||||
.tag-completed {
|
||||
background-color: #f6ffed;
|
||||
color: #52c41a;
|
||||
border-color: #b7eb8f;
|
||||
border: 1px solid #b7eb8f;
|
||||
}
|
||||
|
||||
.task-details {
|
||||
@ -709,23 +654,12 @@ const handleInspection7 = () => {
|
||||
margin: 10px 0;
|
||||
padding-top: 8px;
|
||||
border-top: 1px dashed #f0f2f5;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
flex: 1;
|
||||
padding-left: 80px;
|
||||
margin-top: 4px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
}
|
||||
|
||||
.task-result {
|
||||
@ -755,7 +689,6 @@ const handleInspection7 = () => {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
background-color: #fff;
|
||||
padding: 12px 0 0 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@ -768,51 +701,26 @@ const handleInspection7 = () => {
|
||||
color: #165dff;
|
||||
}
|
||||
|
||||
.view-btn:hover {
|
||||
color: #0e42d2;
|
||||
background-color: #e8f3ff;
|
||||
}
|
||||
|
||||
.start-btn {
|
||||
background-color: #165dff;
|
||||
border-color: #165dff;
|
||||
}
|
||||
|
||||
.start-btn:hover {
|
||||
background-color: #0e42d2;
|
||||
border-color: #0e42d2;
|
||||
}
|
||||
|
||||
.reschedule-btn {
|
||||
background-color: #ff7d00;
|
||||
border-color: #ff7d00;
|
||||
}
|
||||
|
||||
.reschedule-btn:hover {
|
||||
background-color: #e86a00;
|
||||
border-color: #e86a00;
|
||||
}
|
||||
|
||||
.complete-btn {
|
||||
background-color: #00b42a;
|
||||
border-color: #00b42a;
|
||||
}
|
||||
|
||||
.complete-btn:hover {
|
||||
background-color: #008718;
|
||||
border-color: #008718;
|
||||
}
|
||||
|
||||
.report-btn {
|
||||
background-color: #86909c;
|
||||
border-color: #86909c;
|
||||
}
|
||||
|
||||
.report-btn:hover {
|
||||
background-color: #6b7785;
|
||||
border-color: #6b7785;
|
||||
}
|
||||
|
||||
/* 分页区域样式 */
|
||||
.pagination-section {
|
||||
display: flex;
|
||||
@ -820,53 +728,6 @@ const handleInspection7 = () => {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pagination-controls .el-pagination {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.pagination-controls .el-pagination button,
|
||||
.pagination-controls .el-pagination .el-pager li {
|
||||
min-width: 36px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.pagination-controls .el-pagination .el-pager li.active {
|
||||
background-color: #165dff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 1200px) {
|
||||
.task-cards {
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.inspection-tasks {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.filter-container {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
margin-left: 0;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.filter-bar .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.task-cards {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
/* 导航栏样式 */
|
||||
.navigation-tabs {
|
||||
display: flex;
|
||||
@ -904,8 +765,25 @@ const handleInspection7 = () => {
|
||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
||||
}
|
||||
|
||||
.nav-tab {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 1200px) {
|
||||
.task-cards {
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.inspection-tasks {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.filter-container {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.task-cards {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user