This commit is contained in:
dhr
2025-09-29 17:17:42 +08:00
parent db9e2e55ea
commit f58efb0e08
15 changed files with 411 additions and 364 deletions

View File

@ -24,6 +24,9 @@
<!-- 筛选栏 -->
<div class="filter-bar">
<div class="filter-container">
<div class="filter-item">
<el-input v-model="keyword" placeholder="关键字(标题/描述/创建人)" clearable @keyup.enter="handleSearch" />
</div>
<div class="filter-item">
<el-select v-model="workOrderType" placeholder="工单类型" clearable>
<el-option label="全部类型" value="all"></el-option>
@ -55,6 +58,7 @@
</div>
<div class="filter-actions">
<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>
@ -552,6 +556,7 @@ import ImageUpload from '@/components/ImageUpload/index.vue';
import { ElMessageBox, ElMessage } from 'element-plus';
// 筛选条件
const keyword = ref('');
const workOrderType = ref('all');
const workOrderStatus = ref('all');
const priority = ref('all');
@ -961,6 +966,18 @@ const pagedTableData = computed(() => {
// 筛选逻辑
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') {
// 转换筛选条件为显示文本进行匹配
let typeText = '';
@ -1114,6 +1131,16 @@ const handleSearch = () => {
currentPage.value = 1; // 重置到第一页
};
// 重置筛选
const resetFilters = () => {
keyword.value = '';
workOrderType.value = 'all';
workOrderStatus.value = 'all';
priority.value = 'all';
createDate.value = '';
currentPage.value = 1;
};
// 分页事件
const handleSizeChange = (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 {
@ -2711,17 +2699,7 @@ const handleCloseDetailDialog = () => {
}
/* 动画效果 */
@keyframes 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);
}
}
/* 重复的 pulse 动画移除(下方已存在统一定义) */
.custom-steps {
padding: 20px 10px;
@ -3122,17 +3100,7 @@ const handleCloseDetailDialog = () => {
position: relative;
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 {
@ -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 {
@ -3376,30 +3334,10 @@ 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);
}
/* 去重:重复 before 装饰定义移除 */
/* 右侧装饰 */
.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);
}
/* 去重:重复 before 装饰定义移除 */
/* 左侧装饰球 */
.custom-steps::before {