jiaxing.zhou

style(exceptionWorkorder):优化异常工单页面样式和交互

- 调整搜索区域布局和间距,统一组件尺寸
- 更新操作按钮样式,增加悬停效果
- 优化表格样式,改进表头和单元格布局
- 统一字体大小和颜色规范
- 重构分页控件样式,提升视觉一致性
- 修复导出功能参数传递问题
- 改进状态标签显示样式和颜色搭配
......@@ -116,7 +116,7 @@
<th>异常类型</th>
<th>严重程度</th>
<th class="sortable">日期 ↕️</th>
<th>操作</th>
<th class="action-header">操作</th>
</tr>
</thead>
<tbody>
......@@ -744,7 +744,7 @@ const handleExport = async () => {
ElMessage.info('正在导出数据,请稍候...')
const response = await exceptionWorkorderApi.exportExceptionWorkorders(searchParams.value)
const response = await exceptionWorkorderApi.exportExceptionWorkorders(searchParams)
// 创建下载链接
const blob = new Blob([response as unknown as BlobPart], {
......@@ -899,21 +899,20 @@ onMounted(() => {
<style scoped>
.exception-workorder-container {
padding: 0px;
background: #f5f5f5;
min-height: 100vh;
}
/* 搜索区域样式 */
/* 搜索区域 */
.search-section {
background: white;
padding: 16px 20px;
padding: 16px;
border-bottom: 1px solid #e0e0e0;
}
.search-row {
display: flex;
gap: 25px;
gap: 16px;
align-items: center;
flex-wrap: wrap;
margin-bottom: 12px;
......@@ -927,127 +926,147 @@ onMounted(() => {
display: flex;
align-items: center;
gap: 8px;
flex: 0 0 auto;
}
.search-item label {
color: #666;
font-size: 14px;
width: 90px;
font-size: 12px;
color: #333;
white-space: nowrap;
text-align: right;
}
.search-input {
width: 180px;
height: 32px;
border: 1px solid #ddd;
.search-input, .search-select {
padding: 6px 8px;
border: 1px solid #d9d9d9;
border-radius: 4px;
padding: 0 8px;
font-size: 14px;
font-size: 12px;
width: 120px;
}
.search-select {
width: 160px;
height: 32px;
border: 1px solid #ddd;
border-radius: 4px;
padding: 0 8px;
font-size: 14px;
background: white;
.search-input:focus, .search-select:focus {
outline: none;
border-color: #1890ff;
}
.search-actions {
margin-left: auto;
display: flex;
gap: 10px;
gap: 8px;
}
.search-btn, .reset-btn {
padding: 6px 16px;
.search-btn {
background: #1890ff;
color: white;
border: none;
border-radius: 4px;
padding: 4px 8px;
border-radius: 3px;
font-size: 11px;
cursor: pointer;
font-size: 14px;
height: 32px;
}
.search-btn {
background: #007bff;
color: white;
.search-btn:hover {
background: #40a9ff;
}
.reset-btn {
background: #6c757d;
background: #ff7875;
color: white;
border: none;
padding: 4px 8px;
border-radius: 3px;
font-size: 11px;
cursor: pointer;
height: 24px;
display: flex;
align-items: center;
}
.reset-btn:hover {
background: #ff9c99;
}
/* 操作按钮区域样式 */
/* 操作区域 */
.action-section {
background: white;
padding: 12px 20px 12px 20px;
padding: 12px 16px;
border-bottom: 1px solid #e0e0e0;
}
.action-section .action-buttons {
.action-buttons {
display: flex;
gap: 10px;
justify-content: flex-start;
align-items: center;
margin: 0;
padding: 0;
gap: 6px;
}
.action-btn {
padding: 6px 16px;
padding: 4px 8px;
border: none;
border-radius: 4px;
border-radius: 3px;
font-size: 11px;
cursor: pointer;
font-size: 14px;
height: 32px;
font-weight: 500;
transition: all 0.2s;
}
.action-btn.primary {
background: #007bff;
background: #1890ff;
color: white;
}
.action-btn.primary:hover {
background: #40a9ff;
}
.action-btn.success {
background: #28a745;
background: #52c41a;
color: white;
}
.action-btn.success:hover {
background: #73d13d;
}
.action-btn.secondary {
background: #6c757d;
background: #52c41a;
color: white;
}
/* 表格区域样式 */
.action-btn.secondary:hover {
background: #73d13d;
}
/* 表格区域 */
.table-section {
background: white;
margin-bottom: 0;
margin: 16px;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.table-header {
padding: 10px 20px;
border-bottom: 1px solid #eee;
padding: 8px 16px;
background: #fafafa;
border-bottom: 1px solid #e0e0e0;
display: flex;
justify-content: flex-end;
}
.table-controls {
display: flex;
gap: 5px;
gap: 4px;
}
.control-btn {
padding: 4px 8px;
border: 1px solid #ddd;
background: white;
border-radius: 4px;
border: 1px solid #d9d9d9;
border-radius: 3px;
padding: 4px 8px;
font-size: 11px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s;
}
.control-btn:hover {
background: #f0f8ff;
border-color: #1890ff;
color: #1890ff;
}
.table-container {
......@@ -1077,31 +1096,29 @@ onMounted(() => {
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.data-table th {
background: #f8f9fa;
border: 1px solid #ddd;
padding: 12px 8px;
.data-table th,
.data-table td {
padding: 8px 12px;
text-align: left;
border-bottom: 1px solid #f0f0f0;
font-size: 12px;
}
.data-table th {
background: #fafafa;
font-weight: 600;
color: #333;
white-space: nowrap;
}
.data-table td {
border: 1px solid #ddd;
padding: 12px 8px;
vertical-align: middle;
}
.data-table tbody tr:nth-child(even) {
background: #f8f9fa;
.data-table th.action-header {
text-align: center;
}
.data-table tbody tr:hover {
background: #e9ecef;
background: #f5f7fa;
}
.sortable {
......@@ -1109,26 +1126,31 @@ onMounted(() => {
user-select: none;
}
.table-checkbox {
width: 14px;
height: 14px;
cursor: pointer;
}
.select-all, .row-select {
margin: 0;
}
.status-badge, .severity-badge {
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
padding: 2px 6px;
border-radius: 3px;
font-size: 10px;
display: inline-block;
}
.status-badge.pending {
background: #fff3cd;
color: #856404;
background: #fff7e6;
color: #fa8c16;
}
.status-badge.processing {
background: #d1ecf1;
color: #0c5460;
background: #e6f7ff;
color: #1890ff;
}
.status-badge.resolved {
......@@ -1200,24 +1222,24 @@ onMounted(() => {
/* 表格内操作按钮容器 */
.table-actions {
display: flex;
gap: 8px;
gap: 4px;
justify-content: center;
align-items: center;
flex-wrap: wrap;
padding: 0 4px;
}
/* 操作按钮样式 */
.action-btn {
padding: 4px 8px;
font-size: 12px;
border-radius: 4px;
font-weight: 500;
min-width: 60px;
height: 28px;
/* 表格内操作按钮样式 */
.table-actions .action-btn {
padding: 2px 6px;
margin-right: 4px;
border: none;
border-radius: 3px;
font-size: 10px;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 2px;
white-space: nowrap;
}
......@@ -1228,49 +1250,52 @@ onMounted(() => {
/* 分页区域样式 */
.pagination-section {
background: white;
padding: 12px 20px;
border-top: 1px solid #e0e0e0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
background: #fafafa;
border-top: 1px solid #e0e0e0;
}
.pagination-info {
display: flex;
align-items: center;
gap: 10px;
font-size: 14px;
font-size: 12px;
color: #666;
}
.page-size-select {
height: 28px;
border: 1px solid #ddd;
padding: 4px 8px;
border: 1px solid #d9d9d9;
border-radius: 4px;
padding: 0 8px;
font-size: 14px;
font-size: 12px;
background: white;
cursor: pointer;
}
.pagination-controls {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
}
.page-btn {
padding: 4px 12px;
border: 1px solid #ddd;
padding: 4px 8px;
border: 1px solid #d9d9d9;
border-radius: 3px;
background: white;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-size: 11px;
transition: all 0.2s;
}
.page-btn:hover:not(:disabled) {
background: #f0f8ff;
border-color: #1890ff;
color: #1890ff;
}
.page-btn:disabled {
background: #f8f9fa;
color: #6c757d;
opacity: 0.5;
cursor: not-allowed;
}
......