2025-09-17 15:53:38 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div class="operation-inspection">
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 顶部导航选项卡 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div class="navigation-tabs">
|
|
|
|
|
|
<div class="nav-tab" @click="handleInspection1">待办事项</div>
|
|
|
|
|
|
<div class="nav-tab" @click="handleInspection2">巡检管理</div>
|
|
|
|
|
|
<div class="nav-tab active" @click="handleInspection3">试验管理</div>
|
|
|
|
|
|
<div class="nav-tab" @click="handleInspection4">报修管理</div>
|
|
|
|
|
|
<div class="nav-tab" @click="handleInspection5">抢修管理</div>
|
|
|
|
|
|
<div class="nav-tab" @click="handleInspection6">工单管理</div>
|
|
|
|
|
|
<div class="nav-tab" @click="handleInspection7">运维组织</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 头部操作按钮 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div class="header-container">
|
|
|
|
|
|
<div class="header-actions">
|
|
|
|
|
|
<el-button type="primary" class="export-btn">筛选</el-button>
|
|
|
|
|
|
<el-button type="primary" class="create-btn">导入数据</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 选项卡和按钮组合 -->
|
|
|
|
|
|
<div class="tabs-wrapper">
|
|
|
|
|
|
<div style="display: flex; align-items: center; gap: 10px">
|
|
|
|
|
|
<el-button type="primary" @click="handleInspectionManagement1">实验计划</el-button>
|
|
|
|
|
|
<el-button type="primary" @click="handleInspectionManagement2">实验任务</el-button>
|
|
|
|
|
|
<el-button type="primary" @click="handleInspectionManagement3">实验记录</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 筛选和操作区域 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div class="filter-and-actions">
|
|
|
|
|
|
<div class="filters">
|
|
|
|
|
|
<el-select v-model="filterStatus" placeholder="巡检状态" clearable>
|
|
|
|
|
|
<el-option label="全部状态" value="all"></el-option>
|
|
|
|
|
|
<el-option label="正常" value="normal"></el-option>
|
|
|
|
|
|
<el-option label="需关注" value="attention"></el-option>
|
|
|
|
|
|
<el-option label="有问题" value="problem"></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
|
|
<el-select v-model="filterType" placeholder="巡检类型" clearable>
|
|
|
|
|
|
<el-option label="全部类型" value="all"></el-option>
|
|
|
|
|
|
<el-option label="数据库" value="database"></el-option>
|
|
|
|
|
|
<el-option label="服务器" value="server"></el-option>
|
|
|
|
|
|
<el-option label="网络设备" value="network"></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="dateRange"
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
range-separator="至"
|
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
|
class="date-picker"
|
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<el-button type="primary" class="search-btn"> 搜索 </el-button>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 主内容区 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div class="content-container">
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 试验记录 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div v-if="activeTab === 'record'" class="record-container">
|
|
|
|
|
|
<h2 class="section-title">试验记录与报告</h2>
|
|
|
|
|
|
<p class="section-subtitle">截止至 {{ currentDate }}</p>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 统计卡片 -->
|
|
|
|
|
|
<div class="stat-grid">
|
|
|
|
|
|
<div class="stat-card">
|
|
|
|
|
|
<p class="stat-label">本月完成试验</p>
|
|
|
|
|
|
<p class="stat-value">{{ statData.completed }}<span class="stat-change up">较上月 ↑2.4%</span></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-card">
|
|
|
|
|
|
<p class="stat-label">试验通过率</p>
|
|
|
|
|
|
<p class="stat-value">{{ statData.passRate }}%<span class="stat-change up">较上月 ↑5.6%</span></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-card">
|
|
|
|
|
|
<p class="stat-label">待分析记录</p>
|
|
|
|
|
|
<p class="stat-value">{{ statData.pendingAnalysis }}<span class="stat-change warning">需要及时处理</span></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-card">
|
|
|
|
|
|
<p class="stat-label">平均试验时长</p>
|
|
|
|
|
|
<p class="stat-value">{{ statData.avgDuration }}<span class="stat-change down">较上月 ↓9.4分钟</span></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 试验记录列表 -->
|
|
|
|
|
|
<div class="test-records">
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 动态生成试验记录卡片 -->
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-for="(record, recordIndex) in testRecords"
|
|
|
|
|
|
:key="record.id"
|
|
|
|
|
|
class="test-record-card"
|
|
|
|
|
|
:class="{ 'passed': record.status === 'completed', 'failed': record.status === 'failed' }"
|
|
|
|
|
|
>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div class="record-header">
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<h3 class="record-title">{{ record.taskName || '试验任务' }}</h3>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<p class="record-date">
|
2025-09-25 20:03:08 +08:00
|
|
|
|
开始时间
|
|
|
|
|
|
{{ formatDate(record.beginTime) }}
|
|
|
|
|
|
<span class="record-time">计划完成时间: {{ record.planFinishTime ? formatDate(record.planFinishTime) : '未知' }}</span>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</p>
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<span class="status-tag" :class="getStatusClass(record.status)">
|
|
|
|
|
|
{{ getStatusText(record.status) }}
|
|
|
|
|
|
</span>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 动态生成试验进度步骤条 -->
|
|
|
|
|
|
<div class="test-progress" v-if="record.nodes && record.nodes.length">
|
|
|
|
|
|
<template v-for="(node, index) in sortedNodes(record.nodes)" :key="node.id">
|
|
|
|
|
|
<div class="progress-step" :class="getNodeStatusClass(node.status, record.status)">
|
|
|
|
|
|
<div class="step-number">{{ node.code }}</div>
|
|
|
|
|
|
<div class="step-name">步骤名称:{{ node.name }}</div>
|
|
|
|
|
|
<div class="step-name">预期试验目的:{{ node.intendedPurpose }}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 进度线,最后一个节点没有线 -->
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-if="index < sortedNodes(record.nodes).length - 1"
|
|
|
|
|
|
class="progress-line"
|
|
|
|
|
|
:class="getLineStatusClass(index, sortedNodes(record.nodes), record.status)"
|
|
|
|
|
|
></div>
|
|
|
|
|
|
</template>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 试验结果 -->
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<div class="test-result" :class="{ 'failure-analysis': record.status === 'failed' }">
|
|
|
|
|
|
<h4 class="result-title">
|
|
|
|
|
|
{{ record.status === 'failed' ? '失败原因分析' : '试验结果' }}
|
|
|
|
|
|
</h4>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<p class="result-content">
|
|
|
|
|
|
{{ record.status === 'failed' ? record.failReason || '未提供失败原因' : record.testFinal || '试验完成,未提供详细结果' }}
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</p>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<p class="result-details" v-if="record.status !== 'failed'">
|
|
|
|
|
|
计划时间: {{ formatDate(record.planBeginTime) }} | 进度: {{ record.progress }}% | 负责人:
|
|
|
|
|
|
{{ record.personInfo?.userName || '未知' }}
|
|
|
|
|
|
</p>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 改进建议(仅失败时显示) -->
|
|
|
|
|
|
<div class="improvement-suggestion" v-if="record.status === 'failed' && record.faileTips">
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<i class="fas fa-lightbulb"></i>
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<p>建议: {{ record.faileTips }}</p>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="record-actions">
|
|
|
|
|
|
<button class="operate-btn view-btn">查看详情</button>
|
|
|
|
|
|
<button class="operate-btn report-btn">生成报告</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-09-25 20:03:08 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 无数据提示 -->
|
|
|
|
|
|
<div v-if="!testRecords.length" class="no-records">暂无试验记录数据</div>
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 巡检计划表格 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div v-if="activeTab === 'plan'" class="table-container">
|
|
|
|
|
|
<el-table :data="planTableData" border>
|
|
|
|
|
|
<el-table-column prop="name" label="计划名称" width="220">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<div class="plan-name">{{ scope.row.name }}</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="type" label="巡检类型" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="cycle" label="巡检周期" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="dateRange" label="执行时间范围"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="progress" label="完成进度" width="120">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<div class="progress-bar">
|
|
|
|
|
|
<div class="progress-fill" :style="{ width: scope.row.progress + '%', backgroundColor: getProgressColor(scope.row.status) }"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<span :class="['status-tag', `status-${scope.row.status}`]">
|
|
|
|
|
|
{{ getStatusText(scope.row.status) }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="responsible" label="负责人" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" width="220">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<div class="operation-buttons">
|
|
|
|
|
|
<button class="operate-btn edit-btn" v-if="['drafted', 'paused'].includes(scope.row.status)">编辑</button>
|
|
|
|
|
|
<button class="operate-btn execute-btn" v-if="scope.row.status === 'drafted'">执行</button>
|
|
|
|
|
|
<button class="operate-btn pause-btn" v-if="scope.row.status === 'in-progress'">暂停</button>
|
|
|
|
|
|
<button class="operate-btn resume-btn" v-if="scope.row.status === 'paused'">恢复</button>
|
|
|
|
|
|
<button class="operate-btn view-btn">查看详情</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 巡检任务表格 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div v-if="activeTab === 'task'" class="table-container">
|
|
|
|
|
|
<el-table :data="taskTableData" border>
|
|
|
|
|
|
<el-table-column prop="name" label="任务名称" width="220"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="planName" label="所属计划" width="180"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="type" label="巡检类型" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="target" label="巡检对象" width="150"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="deadline" label="截止时间" width="160"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<span :class="['status-tag', `status-${scope.row.status}`]">
|
|
|
|
|
|
{{ getTaskStatusText(scope.row.status) }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="executor" label="执行人" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" width="180">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<div class="operation-buttons">
|
|
|
|
|
|
<button class="operate-btn accept-btn" v-if="scope.row.status === 'pending'">接受</button>
|
|
|
|
|
|
<button class="operate-btn complete-btn" v-if="scope.row.status === 'accepted'">完成</button>
|
|
|
|
|
|
<button class="operate-btn view-btn">查看详情</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
<!-- 分页 -->
|
2025-09-17 15:53:38 +08:00
|
|
|
|
<div class="pagination" v-if="activeTab !== 'record'">
|
|
|
|
|
|
<p class="total-records">显示1到{{ pageSize }}条,共{{ totalRecords }}条记录</p>
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
|
layout="prev, pager, next, jumper, sizes"
|
|
|
|
|
|
:total="totalRecords"
|
|
|
|
|
|
v-model:current-page="currentPage"
|
|
|
|
|
|
v-model:page-size="pageSize"
|
|
|
|
|
|
:page-sizes="[20, 50, 100]"
|
|
|
|
|
|
@current-change="handlePageChange"
|
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
|
></el-pagination>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-09-25 20:03:08 +08:00
|
|
|
|
import { ref, computed, onMounted } from 'vue';
|
2025-09-17 15:53:38 +08:00
|
|
|
|
import router from '@/router';
|
2025-09-25 20:03:08 +08:00
|
|
|
|
import { syrenwulist, syrenwujilu, syrenwuDetail } from '@/api/zhinengxunjian/shiyan/renwu';
|
2025-09-22 15:42:13 +08:00
|
|
|
|
|
2025-09-17 15:53:38 +08:00
|
|
|
|
// 1. 选项卡状态管理
|
2025-09-25 20:03:08 +08:00
|
|
|
|
const activeTab = ref('record'); // 默认显示"试验记录"
|
2025-09-17 15:53:38 +08:00
|
|
|
|
const showFilter = ref(false);
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 筛选条件
|
|
|
|
|
|
const filterStatus = ref('all');
|
|
|
|
|
|
const filterType = ref('all');
|
|
|
|
|
|
const dateRange = ref([]);
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
// 3. 试验记录数据
|
|
|
|
|
|
const testRecords = ref([]);
|
|
|
|
|
|
const planTableData = ref([]);
|
|
|
|
|
|
const taskTableData = ref([]);
|
|
|
|
|
|
|
2025-09-17 15:53:38 +08:00
|
|
|
|
// 4. 当前日期
|
|
|
|
|
|
const currentDate = computed(() => {
|
|
|
|
|
|
const date = new Date();
|
|
|
|
|
|
return `${date.getFullYear()}/${String(date.getMonth() + 1).padStart(2, '0')}/${String(date.getDate()).padStart(2, '0')} ${String(
|
|
|
|
|
|
date.getHours()
|
|
|
|
|
|
).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 5. 统计数据
|
|
|
|
|
|
const statData = ref({
|
2025-09-25 20:03:08 +08:00
|
|
|
|
completed: 0,
|
|
|
|
|
|
passRate: 0,
|
|
|
|
|
|
pendingAnalysis: 0,
|
|
|
|
|
|
avgDuration: '0分钟'
|
2025-09-17 15:53:38 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
// 6. 分页相关
|
|
|
|
|
|
const currentPage = ref(1);
|
|
|
|
|
|
const pageSize = ref(20);
|
|
|
|
|
|
const totalRecords = ref(0);
|
|
|
|
|
|
|
|
|
|
|
|
// 7. 方法:获取试验记录数据
|
|
|
|
|
|
const getTestRecords = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const response = await syrenwulist({
|
|
|
|
|
|
projectId: 1,
|
|
|
|
|
|
page: currentPage.value,
|
|
|
|
|
|
size: pageSize.value
|
|
|
|
|
|
});
|
|
|
|
|
|
console.log('syrenwulist API响应:', response);
|
|
|
|
|
|
|
|
|
|
|
|
if (response && response.code === 200 && response.rows) {
|
|
|
|
|
|
testRecords.value = response.rows;
|
|
|
|
|
|
totalRecords.value = response.total;
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.error('获取试验记录失败:', error);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 8. 方法:获取统计数据
|
|
|
|
|
|
const getStatisticsData = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const response = await syrenwujilu({ projectId: 1 });
|
|
|
|
|
|
console.log('syrenwujilu API响应:', response);
|
|
|
|
|
|
|
|
|
|
|
|
if (response && response.data) {
|
|
|
|
|
|
// 映射API返回的数据到statData
|
|
|
|
|
|
const apiData = response.data;
|
|
|
|
|
|
|
|
|
|
|
|
statData.value.completed = parseInt(apiData.finishCount) || 0;
|
|
|
|
|
|
statData.value.passRate = parseFloat(apiData.passValue) || 0;
|
|
|
|
|
|
statData.value.pendingAnalysis = parseInt(apiData.failCount) || 0;
|
|
|
|
|
|
|
|
|
|
|
|
// 格式化平均试验时长
|
|
|
|
|
|
const avgTime = parseInt(apiData.averageTestTime) || 0;
|
|
|
|
|
|
statData.value.avgDuration = `${avgTime}分钟`;
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.error('获取统计数据失败:', error);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 9. 辅助方法:对节点按code排序
|
|
|
|
|
|
const sortedNodes = (nodes) => {
|
|
|
|
|
|
return [...nodes].sort((a, b) => a.code - b.code);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 10. 辅助方法:格式化日期
|
|
|
|
|
|
const formatDate = (dateString) => {
|
|
|
|
|
|
if (!dateString) return '未知日期';
|
|
|
|
|
|
const date = new Date(dateString);
|
|
|
|
|
|
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 11. 辅助方法:格式化时长(假设单位为分钟)
|
|
|
|
|
|
const formatDuration = (minutes) => {
|
|
|
|
|
|
if (minutes < 60) {
|
|
|
|
|
|
return `${minutes}分钟`;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
const hours = Math.floor(minutes / 60);
|
|
|
|
|
|
const mins = minutes % 60;
|
|
|
|
|
|
return `${hours}小时${mins}分钟`;
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 12. 辅助方法:获取节点状态类名
|
|
|
|
|
|
const getNodeStatusClass = (nodeStatus, recordStatus) => {
|
|
|
|
|
|
// 节点状态: 2-未完成, 其他假设为已完成
|
|
|
|
|
|
// 记录状态: 'failed'-失败, 'completed'-完成, 其他为进行中
|
|
|
|
|
|
if (recordStatus === 'failed') {
|
|
|
|
|
|
// 如果记录失败,找到失败阶段的节点
|
|
|
|
|
|
return nodeStatus === '2' ? 'failed' : 'active';
|
|
|
|
|
|
} else if (recordStatus === 'completed') {
|
|
|
|
|
|
return 'active';
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 进行中状态,已完成的节点标记为active
|
|
|
|
|
|
return nodeStatus !== '2' ? 'active' : '';
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 13. 辅助方法:获取进度线状态类名
|
|
|
|
|
|
const getLineStatusClass = (index, nodes, recordStatus) => {
|
|
|
|
|
|
// 如果记录失败,找到第一个未完成的节点前的线为active
|
|
|
|
|
|
if (recordStatus === 'failed') {
|
|
|
|
|
|
return nodes[index].status !== '2' ? 'active' : 'failed';
|
|
|
|
|
|
} else if (recordStatus === 'completed') {
|
|
|
|
|
|
return 'active';
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 进行中状态,已完成节点之间的线为active
|
|
|
|
|
|
return nodes[index].status !== '2' ? 'active' : '';
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
2025-09-25 20:03:08 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 14. 辅助方法:获取进度颜色
|
|
|
|
|
|
const getProgressColor = (status) => {
|
|
|
|
|
|
const colorMap = {
|
|
|
|
|
|
'drafted': '#e5e7eb',
|
|
|
|
|
|
'in-progress': '#165dff',
|
|
|
|
|
|
'completed': '#00b42a',
|
|
|
|
|
|
'paused': '#86909c'
|
|
|
|
|
|
};
|
|
|
|
|
|
return colorMap[status] || '#e5e7eb';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 15. 辅助方法:获取状态文本
|
|
|
|
|
|
const getStatusText = (status) => {
|
|
|
|
|
|
const statusMap = {
|
|
|
|
|
|
'1': '进行中',
|
|
|
|
|
|
'completed': '通过',
|
|
|
|
|
|
'failed': '失败',
|
|
|
|
|
|
'paused': '已暂停',
|
|
|
|
|
|
'drafted': '草稿',
|
|
|
|
|
|
'in-progress': '进行中',
|
|
|
|
|
|
'normal': '正常',
|
|
|
|
|
|
'attention': '需关注',
|
|
|
|
|
|
'problem': '有问题'
|
|
|
|
|
|
};
|
|
|
|
|
|
return statusMap[status] || '未知状态';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 16. 辅助方法:获取任务状态文本
|
|
|
|
|
|
const getTaskStatusText = (status) => {
|
|
|
|
|
|
const statusMap = {
|
|
|
|
|
|
'pending': '待接受',
|
|
|
|
|
|
'accepted': '进行中',
|
|
|
|
|
|
'completed': '已完成',
|
|
|
|
|
|
'rejected': '已拒绝'
|
|
|
|
|
|
};
|
|
|
|
|
|
return statusMap[status] || '未知状态';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 17. 辅助方法:获取状态类名
|
|
|
|
|
|
const getStatusClass = (status) => {
|
|
|
|
|
|
const classMap = {
|
|
|
|
|
|
'1': 'status-in-progress',
|
|
|
|
|
|
'completed': 'status-passed',
|
|
|
|
|
|
'failed': 'status-failed',
|
|
|
|
|
|
'paused': 'status-paused',
|
|
|
|
|
|
'pending': 'status-pending',
|
|
|
|
|
|
'accepted': 'status-accepted',
|
|
|
|
|
|
'rejected': 'status-rejected',
|
|
|
|
|
|
'normal': 'status-normal',
|
|
|
|
|
|
'attention': 'status-attention',
|
|
|
|
|
|
'problem': 'status-problem'
|
|
|
|
|
|
};
|
|
|
|
|
|
return classMap[status] || 'status-pending';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 18. 分页事件处理
|
|
|
|
|
|
const handlePageChange = (page) => {
|
|
|
|
|
|
currentPage.value = page;
|
|
|
|
|
|
getTestRecords();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleSizeChange = (size) => {
|
|
|
|
|
|
pageSize.value = size;
|
|
|
|
|
|
currentPage.value = 1;
|
|
|
|
|
|
getTestRecords();
|
|
|
|
|
|
};
|
2025-09-17 15:53:38 +08:00
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
// 19. 导航方法
|
2025-09-17 15:53:38 +08:00
|
|
|
|
const handleInspection1 = () => {
|
|
|
|
|
|
router.push('/rili/rili');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspection2 = () => {
|
|
|
|
|
|
router.push('/rili/InspectionManagement');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspection3 = () => {
|
|
|
|
|
|
router.push('/rili/shiyanguanli');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspection4 = () => {
|
|
|
|
|
|
router.push('/rili/baoxiuguanli');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspection5 = () => {
|
|
|
|
|
|
router.push('/rili/qiangxiuguanli');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspection6 = () => {
|
|
|
|
|
|
router.push('/rili/gongdanliebiao');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspection7 = () => {
|
|
|
|
|
|
router.push('/rili/renyuanzhuangtai');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspectionManagement1 = () => {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
activeTab.value = 'plan';
|
2025-09-17 15:53:38 +08:00
|
|
|
|
router.push('/rili/shiyanguanli');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspectionManagement2 = () => {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
activeTab.value = 'task';
|
2025-09-17 15:53:38 +08:00
|
|
|
|
router.push('/rili/shiyanrenwu');
|
|
|
|
|
|
};
|
|
|
|
|
|
const handleInspectionManagement3 = () => {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
activeTab.value = 'record';
|
2025-09-17 15:53:38 +08:00
|
|
|
|
router.push('/rili/shiyanjilu');
|
|
|
|
|
|
};
|
2025-09-25 20:03:08 +08:00
|
|
|
|
|
|
|
|
|
|
// 20. 组件挂载时获取数据
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getStatisticsData();
|
|
|
|
|
|
getTestRecords();
|
|
|
|
|
|
});
|
2025-09-17 15:53:38 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2025-09-25 20:03:08 +08:00
|
|
|
|
@import url('./css/detail-dialog.css');
|
|
|
|
|
|
@import url('./css/step-bars.css');
|
2025-09-17 15:53:38 +08:00
|
|
|
|
/* 1. 基础容器样式 */
|
|
|
|
|
|
.operation-inspection {
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
background-color: #f9fbfd;
|
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
/* 2. 顶部导航选项卡 */
|
2025-09-17 15:53:38 +08:00
|
|
|
|
.navigation-tabs {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
2025-09-25 20:03:08 +08:00
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
overflow: hidden;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
.nav-tab {
|
|
|
|
|
|
padding: 12px 24px;
|
|
|
|
|
|
cursor: pointer;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
transition: all 0.2s;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
font-size: 14px;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
color: #6b7280;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
text-align: center;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
border-right: 1px solid #f0f0f0;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
.nav-tab:last-child {
|
|
|
|
|
|
border-right: none;
|
|
|
|
|
|
}
|
2025-09-25 20:03:08 +08:00
|
|
|
|
.nav-tab:hover:not(.active) {
|
|
|
|
|
|
background-color: #f3f4f6;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
.nav-tab.active {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
background-color: #165dff;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
color: #fff;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
font-weight: 500;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
/* 3. 选项卡样式 */
|
2025-09-17 15:53:38 +08:00
|
|
|
|
.tabs-wrapper {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
/* 4. 头部容器 */
|
|
|
|
|
|
.header-container {
|
2025-09-17 15:53:38 +08:00
|
|
|
|
display: flex;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
justify-content: space-between;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
align-items: center;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
margin-bottom: 16px;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
.header-actions {
|
2025-09-17 15:53:38 +08:00
|
|
|
|
display: flex;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
align-items: center;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
gap: 10px;
|
|
|
|
|
|
}
|
2025-09-25 20:03:08 +08:00
|
|
|
|
|
2025-09-17 15:53:38 +08:00
|
|
|
|
/* 5. 筛选和操作区域 */
|
|
|
|
|
|
.filter-and-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
|
border-radius: 0 0 4px 4px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.filters {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.action-buttons {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-select,
|
|
|
|
|
|
.date-picker {
|
|
|
|
|
|
width: 160px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.search-btn,
|
|
|
|
|
|
.export-btn {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
background-color: #165dff;
|
|
|
|
|
|
border-color: #165dff;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
.filter-btn {
|
|
|
|
|
|
background-color: #f3f4f6;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
border-color: #e5e7eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 6. 表格容器 */
|
|
|
|
|
|
.table-container {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-table {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-table th {
|
|
|
|
|
|
background-color: #f9fafb;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: #4b5563;
|
|
|
|
|
|
}
|
|
|
|
|
|
.plan-name {
|
|
|
|
|
|
white-space: pre-line;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 7. 进度条样式 */
|
|
|
|
|
|
.progress-bar {
|
|
|
|
|
|
height: 8px;
|
|
|
|
|
|
background-color: #f3f4f6;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
.progress-fill {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
transition: width 0.3s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 8. 状态标签样式 */
|
|
|
|
|
|
.status-tag {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-drafted {
|
|
|
|
|
|
background-color: #e0efff;
|
|
|
|
|
|
color: #165dff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-in-progress {
|
|
|
|
|
|
background-color: #e0f2fe;
|
|
|
|
|
|
color: #0284c7;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-completed {
|
|
|
|
|
|
background-color: #e6ffed;
|
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-paused {
|
|
|
|
|
|
background-color: #f2f3f5;
|
|
|
|
|
|
color: #86909c;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-pending {
|
|
|
|
|
|
background-color: #f9fafb;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-accepted {
|
|
|
|
|
|
background-color: #eff6ff;
|
|
|
|
|
|
color: #2563eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-rejected {
|
|
|
|
|
|
background-color: #fee2e2;
|
|
|
|
|
|
color: #dc2626;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-normal {
|
|
|
|
|
|
background-color: #e6ffed;
|
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-attention {
|
|
|
|
|
|
background-color: #fff7e0;
|
|
|
|
|
|
color: #ff7d00;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-problem {
|
|
|
|
|
|
background-color: #fff2f0;
|
|
|
|
|
|
color: #f5222d;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-passed {
|
|
|
|
|
|
background-color: #e6ffed;
|
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.status-failed {
|
|
|
|
|
|
background-color: #fee2e2;
|
|
|
|
|
|
color: #dc2626;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 9. 操作按钮样式 */
|
|
|
|
|
|
.operation-buttons {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.operate-btn {
|
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
.edit-btn {
|
|
|
|
|
|
color: #165dff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.edit-btn:hover {
|
|
|
|
|
|
background-color: #e8f3ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.execute-btn {
|
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.execute-btn:hover {
|
|
|
|
|
|
background-color: #e6ffed;
|
|
|
|
|
|
}
|
|
|
|
|
|
.pause-btn {
|
|
|
|
|
|
color: #ff7d00;
|
|
|
|
|
|
}
|
|
|
|
|
|
.pause-btn:hover {
|
|
|
|
|
|
background-color: #fff7e0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.resume-btn {
|
|
|
|
|
|
color: #722ed1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.resume-btn:hover {
|
|
|
|
|
|
background-color: #f3e8ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.view-btn {
|
|
|
|
|
|
color: #165dff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.view-btn:hover {
|
|
|
|
|
|
background-color: #e8f3ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.complete-btn {
|
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.complete-btn:hover {
|
|
|
|
|
|
background-color: #e6ffed;
|
|
|
|
|
|
}
|
|
|
|
|
|
.accept-btn {
|
|
|
|
|
|
color: #2563eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
.accept-btn:hover {
|
|
|
|
|
|
background-color: #eff6ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.report-btn {
|
|
|
|
|
|
color: #ff7d00;
|
|
|
|
|
|
}
|
|
|
|
|
|
.report-btn:hover {
|
|
|
|
|
|
background-color: #fff7e0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 10. 分页样式 */
|
|
|
|
|
|
.pagination {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 12px;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
.total-records {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-pagination {
|
|
|
|
|
|
--el-pagination-item-active-bg-color: #165dff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 11. 记录页面样式 */
|
|
|
|
|
|
.record-container {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #1f2329;
|
|
|
|
|
|
margin: 0 0 10px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-subtitle {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
margin: 0 0 20px 0;
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 12. 统计卡片样式 */
|
|
|
|
|
|
.stat-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(4, 1fr);
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
margin-bottom: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-card {
|
|
|
|
|
|
background-color: #f0f7ff;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
border-left: 4px solid #165dff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-label {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
margin: 0 0 8px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-value {
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #1f2329;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: baseline;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-change {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
padding: 1px 6px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-change.up {
|
|
|
|
|
|
background-color: #e6ffed;
|
|
|
|
|
|
color: #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-change.down {
|
|
|
|
|
|
background-color: #fff1f0;
|
|
|
|
|
|
color: #f5222d;
|
|
|
|
|
|
}
|
|
|
|
|
|
.stat-change.warning {
|
|
|
|
|
|
background-color: #fff7e0;
|
|
|
|
|
|
color: #ff7d00;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 13. 试验记录样式 */
|
|
|
|
|
|
.test-records {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.test-record-card {
|
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
transition: box-shadow 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.test-record-card:hover {
|
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.test-record-card.passed {
|
|
|
|
|
|
border-left: 4px solid #00b42a;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.test-record-card.failed {
|
|
|
|
|
|
border-left: 4px solid #dc2626;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.record-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
background-color: #f9fafb;
|
|
|
|
|
|
border-bottom: 1px solid #e5e7eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.record-title {
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: #1f2329;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.record-date {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.record-time {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #9ca3af;
|
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 14. 试验进度样式 */
|
|
|
|
|
|
.test-progress {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-step {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.step-number {
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background-color: #e5e7eb;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.step-name {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-line {
|
|
|
|
|
|
flex: 1;
|
2025-09-25 20:03:08 +08:00
|
|
|
|
height: 2px;
|
|
|
|
|
|
background-color: #e5e7eb;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-step.active .step-number {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
background-color: #165dff;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-step.active .step-name {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
color: #165dff;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-line.active {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
background-color: #165dff;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-step.failed .step-number {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
background-color: #dc2626;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-step.failed .step-name {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
color: #dc2626;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-line.failed {
|
2025-09-25 20:03:08 +08:00
|
|
|
|
background-color: #dc2626;
|
2025-09-17 15:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 15. 试验结果样式 */
|
|
|
|
|
|
.test-result {
|
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
|
border-top: 1px solid #e5e7eb;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-title {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: #1f2329;
|
|
|
|
|
|
margin: 0 0 12px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-content {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #4b5563;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
margin: 0 0 12px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-details {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.failure-analysis {
|
|
|
|
|
|
background-color: #fff5f5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.improvement-suggestion {
|
|
|
|
|
|
margin-top: 12px;
|
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
|
background-color: #fff8e6;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.improvement-suggestion i {
|
|
|
|
|
|
color: #ff7d00;
|
|
|
|
|
|
margin-top: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.improvement-suggestion p {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: #6b46c1;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 16. 记录操作按钮 */
|
|
|
|
|
|
.record-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
|
background-color: #f9fafb;
|
|
|
|
|
|
border-top: 1px solid #e5e7eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 20:03:08 +08:00
|
|
|
|
/* 17. 无数据提示样式 */
|
|
|
|
|
|
.no-records {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
padding: 40px 0;
|
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 18. 响应式适配 */
|
2025-09-17 15:53:38 +08:00
|
|
|
|
@media (max-width: 1200px) {
|
|
|
|
|
|
.stat-grid {
|
|
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
|
.stat-grid {
|
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.test-progress {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-step {
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.step-number {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.progress-line {
|
|
|
|
|
|
width: 2px;
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
align-self: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filters {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-select,
|
|
|
|
|
|
.date-picker {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.action-buttons {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.navigation-tabs {
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.nav-tab {
|
|
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
|
min-width: 100px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.record-header {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|