0929
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源场站智慧运维平台
|
|||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.149:18899'
|
VITE_APP_BASE_API = 'http://192.168.110.210:18899'
|
||||||
|
|
||||||
# 应用访问路径 例如使用前缀 /admin/
|
# 应用访问路径 例如使用前缀 /admin/
|
||||||
VITE_APP_CONTEXT_PATH = '/'
|
VITE_APP_CONTEXT_PATH = '/'
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
suffix-icon="el-icon-search"
|
suffix-icon="el-icon-search"
|
||||||
@keyup.enter="handleSearch"
|
@keyup.enter="handleSearch"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
<el-button icon="Refresh" @click="() => { searchKeyword = ''; handleSearch(); }">重置</el-button>
|
||||||
<el-button type="primary" class="new-team-btn" @click="handleCreateTeam"> <i class="el-icon-plus"></i> 新增班组 </el-button>
|
<el-button type="primary" class="new-team-btn" @click="handleCreateTeam"> <i class="el-icon-plus"></i> 新增班组 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,6 +22,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(名称/报修人/维修人)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="taskStatus" placeholder="任务状态">
|
<el-select v-model="taskStatus" placeholder="任务状态">
|
||||||
<el-option label="待执行" value="pending"></el-option>
|
<el-option label="待执行" value="pending"></el-option>
|
||||||
@ -46,6 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetFilters"> 重置 </el-button>
|
||||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -391,6 +395,7 @@ import { ElMessage, ElLoading } from 'element-plus';
|
|||||||
const activeTab = ref('task');
|
const activeTab = ref('task');
|
||||||
|
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
|
const keyword = ref('');
|
||||||
const taskStatus = ref('');
|
const taskStatus = ref('');
|
||||||
const planType = ref('');
|
const planType = ref('');
|
||||||
const executor = ref('');
|
const executor = ref('');
|
||||||
@ -580,12 +585,23 @@ const statusOrder = {
|
|||||||
|
|
||||||
// 分页处理后的数据(含排序)
|
// 分页处理后的数据(含排序)
|
||||||
const pagedTasks = computed(() => {
|
const pagedTasks = computed(() => {
|
||||||
// 先按状态排序
|
// 先关键词过滤
|
||||||
const sortedTasks = [...tasks.value].sort((a, b) => {
|
let filtered = [...tasks.value];
|
||||||
return statusOrder[a.status] - statusOrder[b.status];
|
if (keyword.value && keyword.value.trim()) {
|
||||||
});
|
const kw = keyword.value.trim();
|
||||||
|
filtered = filtered.filter((t) =>
|
||||||
|
(t.title && t.title.includes(kw)) ||
|
||||||
|
(t.reporter && t.reporter.includes(kw)) ||
|
||||||
|
(t.maintainer && t.maintainer.includes(kw)) ||
|
||||||
|
(t.id && String(t.id).includes(kw))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 再进行分页
|
// 按状态排序
|
||||||
|
const sortedTasks = filtered.sort((a, b) => statusOrder[a.status] - statusOrder[b.status]);
|
||||||
|
|
||||||
|
// 更新总数并分页
|
||||||
|
total.value = sortedTasks.length;
|
||||||
const startIndex = (currentPage.value - 1) * pageSize.value;
|
const startIndex = (currentPage.value - 1) * pageSize.value;
|
||||||
const endIndex = startIndex + pageSize.value;
|
const endIndex = startIndex + pageSize.value;
|
||||||
return sortedTasks.slice(startIndex, endIndex);
|
return sortedTasks.slice(startIndex, endIndex);
|
||||||
@ -597,6 +613,15 @@ const handleSearch = () => {
|
|||||||
getTaskList(); // 调用接口获取数据
|
getTaskList(); // 调用接口获取数据
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const resetFilters = () => {
|
||||||
|
keyword.value = '';
|
||||||
|
taskStatus.value = '';
|
||||||
|
planType.value = '';
|
||||||
|
executor.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
|
getTaskList();
|
||||||
|
};
|
||||||
|
|
||||||
// 创建报修任务弹窗相关
|
// 创建报修任务弹窗相关
|
||||||
const createTaskDialogVisible = ref(false);
|
const createTaskDialogVisible = ref(false);
|
||||||
const createTaskFormRef = ref(null);
|
const createTaskFormRef = ref(null);
|
||||||
|
|||||||
@ -23,6 +23,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(单号/内容/报修人/维修人)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="taskStatus" placeholder="任务状态">
|
<el-select v-model="taskStatus" placeholder="任务状态">
|
||||||
<el-option label="待执行" value="1"></el-option>
|
<el-option label="待执行" value="1"></el-option>
|
||||||
@ -56,6 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters"> 重置 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -379,6 +383,7 @@ const taskStatus = ref('');
|
|||||||
const priority = ref('');
|
const priority = ref('');
|
||||||
const executor = ref('');
|
const executor = ref('');
|
||||||
const dateRange = ref([]);
|
const dateRange = ref([]);
|
||||||
|
const keyword = ref('');
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
@ -438,8 +443,13 @@ const fetchRepairRecords = async () => {
|
|||||||
|
|
||||||
// 筛选后的记录
|
// 筛选后的记录
|
||||||
const filteredRecords = computed(() => {
|
const filteredRecords = computed(() => {
|
||||||
// 实际应用中这里会根据筛选条件过滤数据
|
const kw = keyword.value.trim().toLowerCase();
|
||||||
return repairRecords.value;
|
if (!kw) return repairRecords.value;
|
||||||
|
return repairRecords.value.filter((r) =>
|
||||||
|
[r.id, r.reportInfo, r.reportName, r.sendPersonVo?.userName, getStatusText(r.status)]
|
||||||
|
.filter(Boolean)
|
||||||
|
.some((v) => String(v).toLowerCase().includes(kw))
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 搜索处理
|
// 搜索处理
|
||||||
@ -448,6 +458,17 @@ const handleSearch = () => {
|
|||||||
fetchRepairRecords(); // 重新获取数据
|
fetchRepairRecords(); // 重新获取数据
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 重置筛选
|
||||||
|
const resetFilters = () => {
|
||||||
|
taskStatus.value = '';
|
||||||
|
priority.value = '';
|
||||||
|
executor.value = '';
|
||||||
|
dateRange.value = [];
|
||||||
|
keyword.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
|
fetchRepairRecords();
|
||||||
|
};
|
||||||
|
|
||||||
// 分页事件
|
// 分页事件
|
||||||
const handleSizeChange = (val) => {
|
const handleSizeChange = (val) => {
|
||||||
pageSize.value = val;
|
pageSize.value = val;
|
||||||
|
|||||||
@ -71,6 +71,11 @@
|
|||||||
<el-input v-model="plateNumber4" maxlength="1" class="plate-char"></el-input>
|
<el-input v-model="plateNumber4" maxlength="1" class="plate-char"></el-input>
|
||||||
<el-input v-model="plateNumber5" maxlength="1" class="plate-char"></el-input>
|
<el-input v-model="plateNumber5" maxlength="1" class="plate-char"></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end">
|
||||||
|
<el-input v-model="searchKeyword" placeholder="关键字(编号/类型/车牌)" clearable @keyup.enter="handleSearch" style="max-width: 220px" />
|
||||||
|
<el-button type="primary" icon="Search" @click="handleSearch">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetFilters">重置</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,6 +22,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(标题/描述/创建人/编号)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
|
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
|
||||||
<el-option label="全部类型" value="all"></el-option>
|
<el-option label="全部类型" value="all"></el-option>
|
||||||
@ -53,6 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch">搜索</el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters">重置</el-button>
|
||||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateWorkOrder">发起工单任务</el-button>
|
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateWorkOrder">发起工单任务</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -454,6 +458,7 @@ import { ElMessageBox } from 'element-plus';
|
|||||||
const activeTab = ref('list');
|
const activeTab = ref('list');
|
||||||
|
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
|
const keyword = ref('');
|
||||||
const workOrderType = ref('all');
|
const workOrderType = ref('all');
|
||||||
const workOrderStatus = ref('all');
|
const workOrderStatus = ref('all');
|
||||||
const priority = ref('all');
|
const priority = ref('all');
|
||||||
@ -604,10 +609,82 @@ const formatDate = (dateString) => {
|
|||||||
// 初始化加载数据
|
// 初始化加载数据
|
||||||
fetchWorkOrderList();
|
fetchWorkOrderList();
|
||||||
|
|
||||||
// 分页处理后的数据
|
// 分页处理后的数据(前端筛选+分页)
|
||||||
const pagedTableData = computed(() => {
|
const pagedTableData = computed(() => {
|
||||||
// 由于接口已经处理了分页和筛选,这里直接返回全部数据
|
let filteredData = [...rawTableData.value];
|
||||||
return rawTableData.value;
|
|
||||||
|
if (keyword.value && keyword.value.trim()) {
|
||||||
|
const kw = keyword.value.trim();
|
||||||
|
filteredData = filteredData.filter((item) =>
|
||||||
|
(item.title && item.title.includes(kw)) ||
|
||||||
|
(item.description && item.description.includes(kw)) ||
|
||||||
|
(item.creator && item.creator.includes(kw)) ||
|
||||||
|
(item.orderNo && item.orderNo.includes(kw))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (workOrderType.value !== 'all') {
|
||||||
|
let typeText = '';
|
||||||
|
switch (workOrderType.value) {
|
||||||
|
case 'maintenance':
|
||||||
|
typeText = '维护保养';
|
||||||
|
break;
|
||||||
|
case 'inspection':
|
||||||
|
typeText = '检查检测';
|
||||||
|
break;
|
||||||
|
case 'installation':
|
||||||
|
typeText = '安装调试';
|
||||||
|
break;
|
||||||
|
case 'upgrade':
|
||||||
|
typeText = '升级改造';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
filteredData = filteredData.filter((item) => item.type === typeText);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (workOrderStatus.value !== 'all') {
|
||||||
|
let statusText = '';
|
||||||
|
switch (workOrderStatus.value) {
|
||||||
|
case 'accepted':
|
||||||
|
statusText = '已接单';
|
||||||
|
break;
|
||||||
|
case 'pending':
|
||||||
|
statusText = '待处理';
|
||||||
|
break;
|
||||||
|
case 'executing':
|
||||||
|
statusText = '执行中';
|
||||||
|
break;
|
||||||
|
case 'completed':
|
||||||
|
statusText = '已完成';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
filteredData = filteredData.filter((item) => item.status === statusText);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priority.value !== 'all') {
|
||||||
|
let priorityText = '';
|
||||||
|
switch (priority.value) {
|
||||||
|
case 'high':
|
||||||
|
priorityText = '高';
|
||||||
|
break;
|
||||||
|
case 'medium':
|
||||||
|
priorityText = '中';
|
||||||
|
break;
|
||||||
|
case 'low':
|
||||||
|
priorityText = '低';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
filteredData = filteredData.filter((item) => item.priority === priorityText);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (createDate.value) {
|
||||||
|
filteredData = filteredData.filter((item) => item.createTime && item.createTime.includes(createDate.value));
|
||||||
|
}
|
||||||
|
|
||||||
|
total.value = filteredData.length;
|
||||||
|
const startIndex = (currentPage.value - 1) * pageSize.value;
|
||||||
|
const endIndex = startIndex + pageSize.value;
|
||||||
|
return filteredData.slice(startIndex, endIndex);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取类型标签样式
|
// 获取类型标签样式
|
||||||
@ -690,19 +767,26 @@ const getStepStatusText = (status) => {
|
|||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
currentPage.value = 1; // 重置到第一页
|
currentPage.value = 1; // 重置到第一页
|
||||||
fetchWorkOrderList(); // 重新获取数据
|
};
|
||||||
|
|
||||||
|
// 重置筛选
|
||||||
|
const resetFilters = () => {
|
||||||
|
keyword.value = '';
|
||||||
|
workOrderType.value = 'all';
|
||||||
|
workOrderStatus.value = 'all';
|
||||||
|
priority.value = 'all';
|
||||||
|
createDate.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 分页事件
|
// 分页事件
|
||||||
const handleSizeChange = (val) => {
|
const handleSizeChange = (val) => {
|
||||||
pageSize.value = val;
|
pageSize.value = val;
|
||||||
currentPage.value = 1;
|
currentPage.value = 1;
|
||||||
fetchWorkOrderList(); // 重新获取数据
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCurrentChange = (val) => {
|
const handleCurrentChange = (val) => {
|
||||||
currentPage.value = val;
|
currentPage.value = val;
|
||||||
fetchWorkOrderList(); // 重新获取数据
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选项卡点击
|
// 选项卡点击
|
||||||
@ -1539,46 +1623,7 @@ const handleInspectionManagement3 = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 导航栏样式 */
|
/* 导航栏样式 */
|
||||||
.navigation-tabs {
|
/* 已注释的导航栏样式移除 */
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 12px 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #606266;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:last-child {
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:hover {
|
|
||||||
color: #409eff;
|
|
||||||
background-color: #ecf5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab.active {
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 弹窗样式 */
|
/* 弹窗样式 */
|
||||||
.create-dialog {
|
.create-dialog {
|
||||||
|
|||||||
@ -24,6 +24,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(标题/描述/创建人/编号)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
|
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
|
||||||
<el-option label="全部类型" value="all"></el-option>
|
<el-option label="全部类型" value="all"></el-option>
|
||||||
@ -55,6 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch">搜索</el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -509,6 +513,7 @@ import ImageUpload from '@/components/ImageUpload/index.vue';
|
|||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
|
const keyword = ref('');
|
||||||
const workOrderType = ref('all');
|
const workOrderType = ref('all');
|
||||||
const workOrderStatus = ref('all');
|
const workOrderStatus = ref('all');
|
||||||
const priority = ref('all');
|
const priority = ref('all');
|
||||||
@ -750,6 +755,18 @@ const pagedTableData = computed(() => {
|
|||||||
// 筛选逻辑
|
// 筛选逻辑
|
||||||
let filteredData = [...rawTableData.value];
|
let filteredData = [...rawTableData.value];
|
||||||
|
|
||||||
|
if (keyword.value && keyword.value.trim()) {
|
||||||
|
const kw = keyword.value.trim();
|
||||||
|
filteredData = filteredData.filter((item) => {
|
||||||
|
return (
|
||||||
|
(item.title && item.title.includes(kw)) ||
|
||||||
|
(item.description && item.description.includes(kw)) ||
|
||||||
|
(item.creator && item.creator.includes(kw)) ||
|
||||||
|
(item.orderNo && item.orderNo.includes(kw))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (workOrderType.value !== 'all') {
|
if (workOrderType.value !== 'all') {
|
||||||
// 转换筛选条件为显示文本进行匹配
|
// 转换筛选条件为显示文本进行匹配
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
@ -862,6 +879,16 @@ const handleSearch = () => {
|
|||||||
currentPage.value = 1; // 重置到第一页
|
currentPage.value = 1; // 重置到第一页
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 重置筛选
|
||||||
|
const resetFilters = () => {
|
||||||
|
keyword.value = '';
|
||||||
|
workOrderType.value = 'all';
|
||||||
|
workOrderStatus.value = 'all';
|
||||||
|
priority.value = 'all';
|
||||||
|
createDate.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
|
};
|
||||||
|
|
||||||
// 分页事件
|
// 分页事件
|
||||||
const handleSizeChange = (val) => {
|
const handleSizeChange = (val) => {
|
||||||
pageSize.value = val;
|
pageSize.value = val;
|
||||||
@ -1763,46 +1790,7 @@ const handleCloseDetailDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 导航栏样式 */
|
/* 导航栏样式 */
|
||||||
.navigation-tabs {
|
/* 已注释的导航栏样式移除 */
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 12px 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #606266;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:last-child {
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:hover {
|
|
||||||
color: #409eff;
|
|
||||||
background-color: #ecf5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab.active {
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 弹窗样式 */
|
/* 弹窗样式 */
|
||||||
.create-dialog {
|
.create-dialog {
|
||||||
|
|||||||
@ -22,6 +22,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(名称/报修人/维修人/位置)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="taskStatus" placeholder="任务状态">
|
<el-select v-model="taskStatus" placeholder="任务状态">
|
||||||
<el-option label="待执行" value="pending"></el-option>
|
<el-option label="待执行" value="pending"></el-option>
|
||||||
@ -49,6 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters"> 重置 </el-button>
|
||||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -426,6 +430,7 @@ import { xunjianUserlist } from '@/api/zhinengxunjian/xunjian';
|
|||||||
const taskStatus = ref('all');
|
const taskStatus = ref('all');
|
||||||
const planType = ref('all');
|
const planType = ref('all');
|
||||||
const executor = ref('all');
|
const executor = ref('all');
|
||||||
|
const keyword = ref('');
|
||||||
// 任务数据 - 添加了更多字段以展示滚动效果
|
// 任务数据 - 添加了更多字段以展示滚动效果
|
||||||
const tasks = ref([]);
|
const tasks = ref([]);
|
||||||
// 分页相关
|
// 分页相关
|
||||||
@ -458,6 +463,16 @@ const handleSearch = () => {
|
|||||||
getTaskList(); // 调用接口获取数据
|
getTaskList(); // 调用接口获取数据
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 重置筛选
|
||||||
|
const resetFilters = () => {
|
||||||
|
taskStatus.value = 'all';
|
||||||
|
planType.value = 'all';
|
||||||
|
executor.value = 'all';
|
||||||
|
keyword.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
|
getTaskList();
|
||||||
|
};
|
||||||
|
|
||||||
// 创建紧急抢修任务弹窗相关
|
// 创建紧急抢修任务弹窗相关
|
||||||
const createTaskDialogVisible = ref(false);
|
const createTaskDialogVisible = ref(false);
|
||||||
const createTaskFormRef = ref(null); // 表单引用
|
const createTaskFormRef = ref(null); // 表单引用
|
||||||
@ -1090,9 +1105,8 @@ async function getTaskList() {
|
|||||||
const res = await qiangxiulist(requestParams);
|
const res = await qiangxiulist(requestParams);
|
||||||
|
|
||||||
if (res.code === 200 && res.rows) {
|
if (res.code === 200 && res.rows) {
|
||||||
total.value = res.total || 0;
|
|
||||||
// 将API返回的数据转换为前端显示所需的格式
|
// 将API返回的数据转换为前端显示所需的格式
|
||||||
tasks.value = res.rows.map((item) => ({
|
const mapped = res.rows.map((item) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
title: item.name || '未命名抢修任务',
|
title: item.name || '未命名抢修任务',
|
||||||
status: mapStatusToKey(item.status),
|
status: mapStatusToKey(item.status),
|
||||||
@ -1124,6 +1138,19 @@ async function getTaskList() {
|
|||||||
// 添加needSupport字段,确保从API返回数据中获取实际值
|
// 添加needSupport字段,确保从API返回数据中获取实际值
|
||||||
needSupport: item.support || ''
|
needSupport: item.support || ''
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// 关键词过滤
|
||||||
|
const kw = keyword.value.trim().toLowerCase();
|
||||||
|
const filtered = kw
|
||||||
|
? mapped.filter((t) =>
|
||||||
|
[t.title, t.reporter, t.maintainer, t.position, t.statusText]
|
||||||
|
.filter(Boolean)
|
||||||
|
.some((v) => String(v).toLowerCase().includes(kw))
|
||||||
|
)
|
||||||
|
: mapped;
|
||||||
|
|
||||||
|
tasks.value = filtered;
|
||||||
|
total.value = kw ? filtered.length : res.total || filtered.length;
|
||||||
} else {
|
} else {
|
||||||
tasks.value = [];
|
tasks.value = [];
|
||||||
total.value = 0;
|
total.value = 0;
|
||||||
@ -1578,7 +1605,8 @@ setTimeout(() => {
|
|||||||
.detail-value {
|
.detail-value {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
color: #4e5969;
|
color: #4e5969;
|
||||||
word-break: break-all;
|
word-break: break-word;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-result {
|
.task-result {
|
||||||
@ -1595,13 +1623,7 @@ setTimeout(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
border-top: 1px solid #f0f2f5;
|
border-top: 1px solid #f0f2f5;
|
||||||
position: absolute;
|
|
||||||
bottom: 16px;
|
|
||||||
right: 16px;
|
|
||||||
left: 16px;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 12px 0 0 0;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
@ -1705,10 +1727,11 @@ setTimeout(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.task-title {
|
.task-title {
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #1d2129;
|
color: #1d2129;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
word-break: break-word;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
@ -1721,35 +1744,32 @@ setTimeout(() => {
|
|||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 不同故障类型的颜色 */
|
/* 优先级标签背景色样式 - 与保修管理页面保持一致 */
|
||||||
/* 电力,设备故障为红色 */
|
.priority-high {
|
||||||
.task-type-tag.electric,
|
|
||||||
.task-type-tag.equipment {
|
|
||||||
background-color: #fff2f0;
|
background-color: #fff2f0;
|
||||||
color: #ff4d4f;
|
color: #ff4d4f;
|
||||||
border-color: #ffccc7;
|
border-color: #ffccc7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 供水,设备损坏为黄色 */
|
.priority-medium {
|
||||||
.task-type-tag.water,
|
|
||||||
.task-type-tag.damage {
|
|
||||||
background-color: #fffbe6;
|
background-color: #fffbe6;
|
||||||
color: #fa8c16;
|
color: #fa8c16;
|
||||||
border-color: #ffe58f;
|
border-color: #ffe58f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 其余为绿色 */
|
.priority-low {
|
||||||
.task-type-tag {
|
background-color: #e6f7ff;
|
||||||
background-color: #f6ffed;
|
color: #1890ff;
|
||||||
color: #52c41a;
|
border-color: #91d5ff;
|
||||||
border-color: #b7eb8f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-card:hover {
|
.task-card:hover {
|
||||||
transform: translateY(-3px);
|
transform: translateY(-3px);
|
||||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
.task-card[data-v-2668390e]::before {
|
|
||||||
|
/* 左侧状态线样式 - 与保修管理页面保持一致 */
|
||||||
|
.task-card::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -1757,6 +1777,22 @@ setTimeout(() => {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 4px;
|
width: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left-line-high::before {
|
||||||
|
background-color: #ff4d4f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-line-medium::before {
|
||||||
|
background-color: #fa8c16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-line-low::before {
|
||||||
|
background-color: #1677ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-line-completed::before {
|
||||||
|
background-color: #52c41a;
|
||||||
|
}
|
||||||
.task-details {
|
.task-details {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
@ -1769,8 +1805,9 @@ setTimeout(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.detail-label {
|
.detail-label {
|
||||||
flex: 0 0 70px;
|
flex: 0 0 85px;
|
||||||
color: #86909c;
|
color: #86909c;
|
||||||
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-value {
|
.detail-value {
|
||||||
|
|||||||
@ -22,6 +22,9 @@
|
|||||||
<!-- 筛选栏 (默认隐藏) -->
|
<!-- 筛选栏 (默认隐藏) -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(单号/内容/报修人/维修人)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="taskStatus" placeholder="任务状态">
|
<el-select v-model="taskStatus" placeholder="任务状态">
|
||||||
<el-option label="待执行" value="pending"></el-option>
|
<el-option label="待执行" value="pending"></el-option>
|
||||||
@ -54,6 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters"> 重置 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -366,6 +370,7 @@ const priority = ref('');
|
|||||||
const executor = ref('');
|
const executor = ref('');
|
||||||
const dateRange = ref([]);
|
const dateRange = ref([]);
|
||||||
const showFilter = ref(false);
|
const showFilter = ref(false);
|
||||||
|
const keyword = ref('');
|
||||||
|
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
const assignTaskRules = {
|
const assignTaskRules = {
|
||||||
@ -433,7 +438,7 @@ const getTaskList = async () => {
|
|||||||
|
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
// 更新表格数据,将接口返回的字段映射到表格期望的字段
|
// 更新表格数据,将接口返回的字段映射到表格期望的字段
|
||||||
repairRecords.value = Array.isArray(res.rows)
|
const mapped = Array.isArray(res.rows)
|
||||||
? res.rows.map((item) => ({
|
? res.rows.map((item) => ({
|
||||||
// 映射抢修单号
|
// 映射抢修单号
|
||||||
reportNo: `R-${item.id || '000'}`,
|
reportNo: `R-${item.id || '000'}`,
|
||||||
@ -460,7 +465,19 @@ const getTaskList = async () => {
|
|||||||
originalData: item
|
originalData: item
|
||||||
}))
|
}))
|
||||||
: [];
|
: [];
|
||||||
total.value = res.total || 0;
|
|
||||||
|
// 关键词过滤
|
||||||
|
const kw = keyword.value.trim().toLowerCase();
|
||||||
|
const filtered = kw
|
||||||
|
? mapped.filter((r) =>
|
||||||
|
[r.reportNo, r.content, r.reporter, r.handler, r.status]
|
||||||
|
.filter(Boolean)
|
||||||
|
.some((v) => String(v).toLowerCase().includes(kw))
|
||||||
|
)
|
||||||
|
: mapped;
|
||||||
|
|
||||||
|
repairRecords.value = filtered;
|
||||||
|
total.value = kw ? filtered.length : res.total || filtered.length;
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(`获取抢修记录失败:${res?.msg || '未知错误'}`);
|
ElMessage.error(`获取抢修记录失败:${res?.msg || '未知错误'}`);
|
||||||
repairRecords.value = [];
|
repairRecords.value = [];
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
<!-- 4. 筛选和操作区域(与试验系统filter-and-actions结构一致) -->
|
<!-- 4. 筛选和操作区域(与试验系统filter-and-actions结构一致) -->
|
||||||
<div class="filter-and-actions">
|
<div class="filter-and-actions">
|
||||||
<div class="filters">
|
<div class="filters">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(计划名/编号/负责人)" clearable @keyup.enter="handleSearch" style="width: 220px" />
|
||||||
<el-select v-model="filterStatus" placeholder="巡检状态" clearable>
|
<el-select v-model="filterStatus" placeholder="巡检状态" clearable>
|
||||||
<el-option label="全部状态" value="all"></el-option>
|
<el-option label="全部状态" value="all"></el-option>
|
||||||
<el-option label="正常" value="normal"></el-option>
|
<el-option label="正常" value="normal"></el-option>
|
||||||
@ -49,7 +50,8 @@
|
|||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
<el-button type="primary" icon="Search" class="search-btn"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetFilters"> 重置 </el-button>
|
||||||
<el-button type="primary" icon="Plus" class="create-btn" @click="openRecordDialog"> <i class="fas fa-plus"></i> 新增实验记录 </el-button>
|
<el-button type="primary" icon="Plus" class="create-btn" @click="openRecordDialog"> <i class="fas fa-plus"></i> 新增实验记录 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -581,6 +583,7 @@ const activeTab = ref('plan'); // 默认为"巡检计划"
|
|||||||
const timeRange = ref('month'); // 统计时间范围:月/周/日
|
const timeRange = ref('month'); // 统计时间范围:月/周/日
|
||||||
|
|
||||||
// 2. 筛选条件
|
// 2. 筛选条件
|
||||||
|
const keyword = ref('');
|
||||||
const filterStatus = ref('all');
|
const filterStatus = ref('all');
|
||||||
const filterType = ref('all');
|
const filterType = ref('all');
|
||||||
const dateRange = ref([]);
|
const dateRange = ref([]);
|
||||||
@ -628,6 +631,22 @@ const fetchExperimentData = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 搜索与重置(当前数据主要来自接口,保留前端筛选入口)
|
||||||
|
const handleSearch = () => {
|
||||||
|
// 可根据项目需要将 keyword/filter 传给接口;当前保持页内刷新
|
||||||
|
currentPage.value = 1;
|
||||||
|
fetchExperimentData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const resetFilters = () => {
|
||||||
|
keyword.value = '';
|
||||||
|
filterStatus.value = 'all';
|
||||||
|
filterType.value = 'all';
|
||||||
|
dateRange.value = [];
|
||||||
|
currentPage.value = 1;
|
||||||
|
fetchExperimentData();
|
||||||
|
};
|
||||||
|
|
||||||
// 辅助方法
|
// 辅助方法
|
||||||
const getTestObjectText = (type) => {
|
const getTestObjectText = (type) => {
|
||||||
const typeMap = {
|
const typeMap = {
|
||||||
@ -1237,41 +1256,7 @@ const formatDateTime = (dateString) => {
|
|||||||
background-color: #f9fbfd;
|
background-color: #f9fbfd;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
.navigation-tabs {
|
/* 已注释的导航栏样式移除 */
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 12px 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #606266;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:last-child {
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:hover {
|
|
||||||
color: #409eff;
|
|
||||||
background-color: #ecf5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab.active {
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 3. 页面标题 */
|
/* 3. 页面标题 */
|
||||||
.page-header {
|
.page-header {
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
<!-- 筛选和操作区域 -->
|
<!-- 筛选和操作区域 -->
|
||||||
<div class="filter-and-actions">
|
<div class="filter-and-actions">
|
||||||
<div class="filters">
|
<div class="filters">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(任务名/负责人/编号)" clearable @keyup.enter="handleSearch" style="width: 220px" />
|
||||||
<el-select v-model="filterStatus" placeholder="巡检状态" clearable>
|
<el-select v-model="filterStatus" placeholder="巡检状态" clearable>
|
||||||
<el-option label="全部状态" value="all"></el-option>
|
<el-option label="全部状态" value="all"></el-option>
|
||||||
<el-option label="正常" value="normal"></el-option>
|
<el-option label="正常" value="normal"></el-option>
|
||||||
@ -47,7 +48,8 @@
|
|||||||
class="date-picker"
|
class="date-picker"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
|
|
||||||
<el-button icon="Search" type="primary" class="search-btn"> 搜索 </el-button>
|
<el-button icon="Search" type="primary" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetFilters"> 重置 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -132,7 +134,7 @@
|
|||||||
<div class="test-records">
|
<div class="test-records">
|
||||||
<!-- 动态生成试验记录卡片 -->
|
<!-- 动态生成试验记录卡片 -->
|
||||||
<div
|
<div
|
||||||
v-for="(record, recordIndex) in testRecords"
|
v-for="(record, recordIndex) in filteredTestRecords"
|
||||||
:key="record.id"
|
:key="record.id"
|
||||||
class="test-record-card"
|
class="test-record-card"
|
||||||
:class="{ 'passed': record.status === 'completed', 'failed': record.status === 'failed' }"
|
:class="{ 'passed': record.status === 'completed', 'failed': record.status === 'failed' }"
|
||||||
@ -396,6 +398,7 @@ import { syrenwulist, syrenwujilu, syrenwuDetail } from '@/api/zhinengxunjian/sh
|
|||||||
const activeTab = ref('record'); // 默认显示"试验记录"
|
const activeTab = ref('record'); // 默认显示"试验记录"
|
||||||
|
|
||||||
// 2. 筛选条件
|
// 2. 筛选条件
|
||||||
|
const keyword = ref('');
|
||||||
const filterStatus = ref('all');
|
const filterStatus = ref('all');
|
||||||
const filterType = ref('all');
|
const filterType = ref('all');
|
||||||
const dateRange = ref([]);
|
const dateRange = ref([]);
|
||||||
@ -449,6 +452,37 @@ const getTestRecords = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 前端过滤后的试验记录
|
||||||
|
const filteredTestRecords = computed(() => {
|
||||||
|
let data = [...testRecords.value];
|
||||||
|
|
||||||
|
if (keyword.value && keyword.value.trim()) {
|
||||||
|
const kw = keyword.value.trim();
|
||||||
|
data = data.filter((rec) => {
|
||||||
|
return (
|
||||||
|
(rec.taskName && rec.taskName.includes(kw)) ||
|
||||||
|
(rec.personInfo?.userName && rec.personInfo.userName.includes(kw)) ||
|
||||||
|
(rec.id && String(rec.id).includes(kw))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 可根据筛选状态/类型进一步过滤(若后续需要)
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 搜索与重置
|
||||||
|
const handleSearch = () => {
|
||||||
|
// 若后端支持条件,可在此调用接口;当前保持前端过滤
|
||||||
|
};
|
||||||
|
|
||||||
|
const resetFilters = () => {
|
||||||
|
keyword.value = '';
|
||||||
|
filterStatus.value = 'all';
|
||||||
|
filterType.value = 'all';
|
||||||
|
dateRange.value = [];
|
||||||
|
};
|
||||||
|
|
||||||
// 8. 方法:获取统计数据
|
// 8. 方法:获取统计数据
|
||||||
const getStatisticsData = async () => {
|
const getStatisticsData = async () => {
|
||||||
try {
|
try {
|
||||||
@ -715,41 +749,7 @@ onMounted(async () => {
|
|||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation-tabs {
|
/* 已注释的导航栏样式移除 */
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 12px 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #606266;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:last-child {
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:hover {
|
|
||||||
color: #409eff;
|
|
||||||
background-color: #ecf5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab.active {
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 3. 选项卡样式 */
|
/* 3. 选项卡样式 */
|
||||||
.tabs-wrapper {
|
.tabs-wrapper {
|
||||||
|
|||||||
@ -24,6 +24,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(任务名/测试对象/执行人)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="taskStatus" placeholder="任务状态">
|
<el-select v-model="taskStatus" placeholder="任务状态">
|
||||||
<el-option label="待执行" value="1"></el-option>
|
<el-option label="待执行" value="1"></el-option>
|
||||||
@ -50,6 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters"> 重置 </el-button>
|
||||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -479,6 +483,7 @@ const loading = ref(false);
|
|||||||
// 筛选条件(与接口参数对应)
|
// 筛选条件(与接口参数对应)
|
||||||
const taskStatus = ref(''); // 任务状态:1=待执行,2=暂停(已延期),3=失败,4=执行中,5=已完成
|
const taskStatus = ref(''); // 任务状态:1=待执行,2=暂停(已延期),3=失败,4=执行中,5=已完成
|
||||||
const planType = ref(''); // 关联计划ID:1=每日,2=每周,3=每月
|
const planType = ref(''); // 关联计划ID:1=每日,2=每周,3=每月
|
||||||
|
const keyword = ref(''); // 关键词
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将节点数据按模块分组
|
* 将节点数据按模块分组
|
||||||
@ -716,8 +721,18 @@ const getTaskList = async () => {
|
|||||||
|
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
// 3. 接口数据映射为页面展示格式
|
// 3. 接口数据映射为页面展示格式
|
||||||
tasks.value = (response.rows || []).map((item) => mapApiToView(item));
|
const mapped = (response.rows || []).map((item) => mapApiToView(item));
|
||||||
total.value = response.total || 0; // 同步总条数
|
// 4. 前端关键词过滤
|
||||||
|
const kw = keyword.value.trim();
|
||||||
|
const filtered = kw
|
||||||
|
? mapped.filter((t) =>
|
||||||
|
[t.title, t.target, t.executor, t.relatedPlan, t.statusText]
|
||||||
|
.filter(Boolean)
|
||||||
|
.some((v) => String(v).toLowerCase().includes(kw.toLowerCase()))
|
||||||
|
)
|
||||||
|
: mapped;
|
||||||
|
tasks.value = filtered;
|
||||||
|
total.value = kw ? filtered.length : response.total || filtered.length; // 同步总条数
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('获取任务列表失败:' + (response.msg || '未知错误'));
|
ElMessage.error('获取任务列表失败:' + (response.msg || '未知错误'));
|
||||||
tasks.value = [];
|
tasks.value = [];
|
||||||
@ -833,6 +848,18 @@ const mapApiToView = (apiData) => {
|
|||||||
try {
|
try {
|
||||||
// 优先查找nodes数组中处于执行中或失败的节点来确定当前试验阶段
|
// 优先查找nodes数组中处于执行中或失败的节点来确定当前试验阶段
|
||||||
if (apiData && apiData.nodes && Array.isArray(apiData.nodes)) {
|
if (apiData && apiData.nodes && Array.isArray(apiData.nodes)) {
|
||||||
|
// 优先查找失败状态的节点(根据需求,优先显示status为3的数据)
|
||||||
|
const failedNode = apiData.nodes.find((node) => {
|
||||||
|
if (!node || node.status === undefined) return false;
|
||||||
|
return node.status === '3' || node.status === 3;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 如果有失败的节点,根据code判断阶段
|
||||||
|
if (failedNode && failedNode.code !== undefined) {
|
||||||
|
const stepName = failedNode.name || '未命名步骤';
|
||||||
|
return `第${failedNode.code}步(${stepName})`;
|
||||||
|
}
|
||||||
|
|
||||||
// 查找执行中状态的节点
|
// 查找执行中状态的节点
|
||||||
const executingNode = apiData.nodes.find((node) => {
|
const executingNode = apiData.nodes.find((node) => {
|
||||||
if (!node || node.status === undefined) return false;
|
if (!node || node.status === undefined) return false;
|
||||||
@ -845,18 +872,6 @@ const mapApiToView = (apiData) => {
|
|||||||
return `第${executingNode.code}步(${stepName})`;
|
return `第${executingNode.code}步(${stepName})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找失败状态的节点
|
|
||||||
const failedNode = apiData.nodes.find((node) => {
|
|
||||||
if (!node || node.status === undefined) return false;
|
|
||||||
return node.status === '3' || node.status === 3;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 如果有失败的节点,根据code判断阶段
|
|
||||||
if (failedNode && failedNode.code !== undefined) {
|
|
||||||
const stepName = failedNode.name || '未命名步骤';
|
|
||||||
return `第${failedNode.code}步(${stepName})`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查找已完成的节点,确定最后完成的阶段
|
// 查找已完成的节点,确定最后完成的阶段
|
||||||
const completedNodes = apiData.nodes.filter((node) => {
|
const completedNodes = apiData.nodes.filter((node) => {
|
||||||
if (!node || node.status === undefined) return false;
|
if (!node || node.status === undefined) return false;
|
||||||
@ -921,6 +936,16 @@ const handleSearch = () => {
|
|||||||
getTaskList();
|
getTaskList();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 重置筛选条件
|
||||||
|
const resetFilters = () => {
|
||||||
|
taskStatus.value = '';
|
||||||
|
planType.value = '';
|
||||||
|
executor.value = 'all';
|
||||||
|
keyword.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
|
getTaskList();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每页条数变化
|
* 每页条数变化
|
||||||
* @param {number} val - 新的每页条数
|
* @param {number} val - 新的每页条数
|
||||||
|
|||||||
@ -654,46 +654,7 @@ const handleInspectionManagement3 = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 导航栏样式 */
|
/* 导航栏样式 */
|
||||||
.navigation-tabs {
|
/* 已移除未使用的导航样式(模板中为注释状态) */
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 12px 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #606266;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:last-child {
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:hover {
|
|
||||||
color: #409eff;
|
|
||||||
background-color: #ecf5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab.active {
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 选项卡样式 */
|
/* 选项卡样式 */
|
||||||
.tabs-wrapper {
|
.tabs-wrapper {
|
||||||
|
|||||||
@ -23,6 +23,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(任务名/对象/执行人)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="taskStatus" placeholder="任务状态">
|
<el-select v-model="taskStatus" placeholder="任务状态">
|
||||||
<el-option label="待执行" value="pending"></el-option>
|
<el-option label="待执行" value="pending"></el-option>
|
||||||
@ -43,6 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters"> 重置 </el-button>
|
||||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -429,11 +433,13 @@ import { xjrenwuDetail, xjrenwulist, addxjrenwu, updatexjrenwu } from '@/api/zhi
|
|||||||
import { xunjianUserlist, xunjianlist } from '@/api/zhinengxunjian/xunjian/index';
|
import { xunjianUserlist, xunjianlist } from '@/api/zhinengxunjian/xunjian/index';
|
||||||
import { addjiedian } from '@/api/zhinengxunjian/jiedian/index';
|
import { addjiedian } from '@/api/zhinengxunjian/jiedian/index';
|
||||||
import { ElMessage, ElLoading, ElForm } from 'element-plus';
|
import { ElMessage, ElLoading, ElForm } from 'element-plus';
|
||||||
|
import { formatDate } from '@/utils/index';
|
||||||
|
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
const taskStatus = ref('');
|
const taskStatus = ref('');
|
||||||
const planType = ref('');
|
const planType = ref('');
|
||||||
const executor = ref('');
|
const executor = ref('');
|
||||||
|
const keyword = ref('');
|
||||||
|
|
||||||
// 任务数据 - 初始为空数组,通过API获取
|
// 任务数据 - 初始为空数组,通过API获取
|
||||||
const tasks = ref([]);
|
const tasks = ref([]);
|
||||||
@ -543,16 +549,13 @@ const getTaskList = async () => {
|
|||||||
const params = {
|
const params = {
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
pageNum: currentPage.value,
|
pageNum: currentPage.value,
|
||||||
personId: 1,
|
projectId: 1
|
||||||
taskType: taskStatus.value || undefined, // 任务状态
|
|
||||||
planType: planType.value || undefined, // 计划类型
|
|
||||||
personName: executor.value || undefined // 执行人
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await xjrenwulist(params);
|
const response = await xjrenwulist(params);
|
||||||
|
|
||||||
if (response.code === 200 && response.rows) {
|
if (response.code === 200 && response.rows) {
|
||||||
tasks.value = response.rows.map((item) => {
|
const mapped = response.rows.map((item) => {
|
||||||
// 获取原始数据中的id
|
// 获取原始数据中的id
|
||||||
const taskId = item.id || '';
|
const taskId = item.id || '';
|
||||||
if (!taskId) {
|
if (!taskId) {
|
||||||
@ -603,13 +606,16 @@ const getTaskList = async () => {
|
|||||||
|
|
||||||
return task;
|
return task;
|
||||||
});
|
});
|
||||||
|
const kw = keyword.value.trim();
|
||||||
total.value = response.total || tasks.value.length;
|
const filtered = kw
|
||||||
|
? mapped.filter((t) =>
|
||||||
// 搜索后如果没有结果,显示提示信息
|
[t.title, t.target, t.executor, t.relatedPlan, t.statusText]
|
||||||
if (tasks.value.length === 0) {
|
.filter(Boolean)
|
||||||
ElMessage.info('未找到符合条件的任务');
|
.some((v) => String(v).toLowerCase().includes(kw.toLowerCase()))
|
||||||
}
|
)
|
||||||
|
: mapped;
|
||||||
|
tasks.value = filtered;
|
||||||
|
total.value = kw ? filtered.length : response.total || filtered.length;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取巡检任务数据失败:', error);
|
console.error('获取巡检任务数据失败:', error);
|
||||||
@ -809,7 +815,7 @@ const handleSaveTask = async () => {
|
|||||||
|
|
||||||
createTime: new Date().toISOString(),
|
createTime: new Date().toISOString(),
|
||||||
updateTime: new Date().toISOString(),
|
updateTime: new Date().toISOString(),
|
||||||
startTime: new Date().toISOString().slice(0, 19).replace('T', ' '),
|
startTime: formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||||
params: {
|
params: {
|
||||||
property1: 'string',
|
property1: 'string',
|
||||||
property2: 'string'
|
property2: 'string'
|
||||||
@ -1045,7 +1051,7 @@ const handleAction = async (task) => {
|
|||||||
const updateData = {
|
const updateData = {
|
||||||
...originalTask.rawData,
|
...originalTask.rawData,
|
||||||
id: task.id,
|
id: task.id,
|
||||||
startTime: new Date().toISOString().slice(0, 19).replace('T', ' '),
|
startTime: formatDate(new Date().toString()),
|
||||||
taskType: '3', // 3表示执行中
|
taskType: '3', // 3表示执行中
|
||||||
status: 'executing',
|
status: 'executing',
|
||||||
taskProgress: 0
|
taskProgress: 0
|
||||||
@ -1072,14 +1078,7 @@ const handleAction = async (task) => {
|
|||||||
|
|
||||||
const originalTask = tasks.value[taskIndex];
|
const originalTask = tasks.value[taskIndex];
|
||||||
|
|
||||||
const now = new Date();
|
const finishTime = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss');
|
||||||
const year = now.getFullYear();
|
|
||||||
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
||||||
const day = String(now.getDate()).padStart(2, '0');
|
|
||||||
const hours = String(now.getHours()).padStart(2, '0');
|
|
||||||
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
||||||
const seconds = String(now.getSeconds()).padStart(2, '0');
|
|
||||||
const finishTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
||||||
|
|
||||||
const updateData = {
|
const updateData = {
|
||||||
...originalTask.rawData,
|
...originalTask.rawData,
|
||||||
|
|||||||
@ -24,6 +24,9 @@
|
|||||||
<!-- 筛选栏 -->
|
<!-- 筛选栏 -->
|
||||||
<div class="filter-bar">
|
<div class="filter-bar">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<div class="filter-item">
|
||||||
|
<el-input v-model="keyword" placeholder="关键字(标题/描述/创建人)" clearable @keyup.enter="handleSearch" />
|
||||||
|
</div>
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
|
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
|
||||||
<el-option label="全部类型" value="all"></el-option>
|
<el-option label="全部类型" value="all"></el-option>
|
||||||
@ -55,6 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="filter-actions">
|
<div class="filter-actions">
|
||||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch">搜索</el-button>
|
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" class="create-btn" @click="resetFilters">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -552,6 +556,7 @@ import ImageUpload from '@/components/ImageUpload/index.vue';
|
|||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
|
const keyword = ref('');
|
||||||
const workOrderType = ref('all');
|
const workOrderType = ref('all');
|
||||||
const workOrderStatus = ref('all');
|
const workOrderStatus = ref('all');
|
||||||
const priority = ref('all');
|
const priority = ref('all');
|
||||||
@ -961,6 +966,18 @@ const pagedTableData = computed(() => {
|
|||||||
// 筛选逻辑
|
// 筛选逻辑
|
||||||
let filteredData = [...rawTableData.value];
|
let filteredData = [...rawTableData.value];
|
||||||
|
|
||||||
|
if (keyword.value && keyword.value.trim()) {
|
||||||
|
const kw = keyword.value.trim();
|
||||||
|
filteredData = filteredData.filter((item) => {
|
||||||
|
return (
|
||||||
|
(item.title && item.title.includes(kw)) ||
|
||||||
|
(item.description && item.description.includes(kw)) ||
|
||||||
|
(item.creator && item.creator.includes(kw)) ||
|
||||||
|
(item.orderNo && item.orderNo.includes(kw))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (workOrderType.value !== 'all') {
|
if (workOrderType.value !== 'all') {
|
||||||
// 转换筛选条件为显示文本进行匹配
|
// 转换筛选条件为显示文本进行匹配
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
@ -1114,6 +1131,16 @@ const handleSearch = () => {
|
|||||||
currentPage.value = 1; // 重置到第一页
|
currentPage.value = 1; // 重置到第一页
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 重置筛选
|
||||||
|
const resetFilters = () => {
|
||||||
|
keyword.value = '';
|
||||||
|
workOrderType.value = 'all';
|
||||||
|
workOrderStatus.value = 'all';
|
||||||
|
priority.value = 'all';
|
||||||
|
createDate.value = '';
|
||||||
|
currentPage.value = 1;
|
||||||
|
};
|
||||||
|
|
||||||
// 分页事件
|
// 分页事件
|
||||||
const handleSizeChange = (val) => {
|
const handleSizeChange = (val) => {
|
||||||
pageSize.value = val;
|
pageSize.value = val;
|
||||||
@ -2191,46 +2218,7 @@ const handleCloseDetailDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 导航栏样式 */
|
/* 导航栏样式 */
|
||||||
.navigation-tabs {
|
/* 导航栏相关样式移除(对应模板已注释) */
|
||||||
display: flex;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 12px 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #606266;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:last-child {
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab:hover {
|
|
||||||
color: #409eff;
|
|
||||||
background-color: #ecf5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab.active {
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(64, 158, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 弹窗样式 */
|
/* 弹窗样式 */
|
||||||
.create-dialog {
|
.create-dialog {
|
||||||
@ -2711,17 +2699,7 @@ const handleCloseDetailDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 动画效果 */
|
/* 动画效果 */
|
||||||
@keyframes pulse {
|
/* 重复的 pulse 动画移除(下方已存在统一定义) */
|
||||||
0% {
|
|
||||||
box-shadow: 0 0 0 0 rgba(22, 93, 255, 0.4);
|
|
||||||
}
|
|
||||||
70% {
|
|
||||||
box-shadow: 0 0 0 10px rgba(22, 93, 255, 0);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
box-shadow: 0 0 0 0 rgba(22, 93, 255, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-steps {
|
.custom-steps {
|
||||||
padding: 20px 10px;
|
padding: 20px 10px;
|
||||||
@ -3122,17 +3100,7 @@ const handleCloseDetailDialog = () => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.custom-steps::before {
|
/* 去重:自定义步骤条顶部装饰在下方统一块中定义 */
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 4px;
|
|
||||||
background: linear-gradient(90deg, #165dff, #409eff, #69c0ff);
|
|
||||||
z-index: 0;
|
|
||||||
border-radius: 4px 4px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 重点跟踪区域样式 */
|
/* 重点跟踪区域样式 */
|
||||||
.tracking-section {
|
.tracking-section {
|
||||||
@ -3350,17 +3318,7 @@ const handleCloseDetailDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 顶部装饰条 */
|
/* 顶部装饰条 */
|
||||||
.custom-steps::before {
|
/* 去重:自定义步骤条顶部装饰重复定义移除 */
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 6px;
|
|
||||||
background: linear-gradient(90deg, #165dff, #409eff, #69c0ff);
|
|
||||||
border-radius: 6px 6px 0 0;
|
|
||||||
box-shadow: 0 2px 12px rgba(22, 93, 255, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 背景装饰 */
|
/* 背景装饰 */
|
||||||
.custom-steps::after {
|
.custom-steps::after {
|
||||||
@ -3376,30 +3334,10 @@ const handleCloseDetailDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 左侧装饰 */
|
/* 左侧装饰 */
|
||||||
.custom-steps::before {
|
/* 去重:重复 before 装饰定义移除 */
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 6px;
|
|
||||||
background: linear-gradient(90deg, #165dff, #409eff, #69c0ff);
|
|
||||||
border-radius: 6px 6px 0 0;
|
|
||||||
box-shadow: 0 2px 12px rgba(22, 93, 255, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 右侧装饰 */
|
/* 右侧装饰 */
|
||||||
.custom-steps::before {
|
/* 去重:重复 before 装饰定义移除 */
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 6px;
|
|
||||||
background: linear-gradient(90deg, #165dff, #409eff, #69c0ff);
|
|
||||||
border-radius: 6px 6px 0 0;
|
|
||||||
box-shadow: 0 2px 12px rgba(22, 93, 255, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 左侧装饰球 */
|
/* 左侧装饰球 */
|
||||||
.custom-steps::before {
|
.custom-steps::before {
|
||||||
|
|||||||
Reference in New Issue
Block a user