chore: 代码及文档变更自动提交

This commit is contained in:
zlwu committed 2025-07-14 13:15:35 +08:00
1 parent 4ef657d234
commit cbae932faa
127 files changed
+90 -21551

No files matched your search

-10
View File
@@ -89,16 +89,6 @@ export const constantRoutes: RouteRecordRaw[] = [
}
]
},
// 临时测试路由
{
path: '/test-collection-batch',
name: 'TestCollectionBatch',
component: () => import('@/views/xg-xx/collectionBatch/test.vue'),
meta: {
title: '信息采集批次测试',
icon: 'ep:setting'
}
}
];
// 动态路由,基于用户权限动态去加载
+70 -6
View File
@@ -573,6 +573,11 @@
<el-icon><Document /></el-icon>
<span class="file-ext">{{ getFileExt(file.name) }}</span>
</div>
<!-- loading 遮罩只在上传中显示 -->
<div v-if="file.status === 'uploading'" class="upload-file-loading">
<el-icon class="is-loading"><Loading /></el-icon>
<span class="loading-text">上传中...</span>
</div>
</div>
<!-- 文件名称 -->
@@ -649,7 +654,7 @@
</div>
<div class="detail-item full-width">
<label>问题描述:</label>
<span class="detail-value description">{{ orderDetail.description }}</span>
<span class="detail-value">{{ orderDetail.description }}</span>
</div>
<div class="detail-item full-width" v-if="orderDetail.cancelReason">
<label>取消原因:</label>
@@ -657,7 +662,7 @@
</div>
<div class="detail-item full-width" v-if="orderDetail.remark">
<label>备注信息:</label>
<span class="detail-value description">{{ orderDetail.remark }}</span>
<span class="detail-value">{{ orderDetail.remark }}</span>
</div>
</div>
</el-card>
@@ -750,7 +755,7 @@
<div class="detail-grid">
<div class="detail-item full-width" v-if="orderDetail.repairResult">
<label>维修结果:</label>
<span class="detail-value description">{{ orderDetail.repairResult }}</span>
<span class="detail-value">{{ orderDetail.repairResult }}</span>
</div>
<div class="detail-item full-width" v-if="orderDetail.usedMaterials">
<label>使用材料:</label>
@@ -758,7 +763,7 @@
</div>
<div class="detail-item full-width" v-if="orderDetail.followSuggestions">
<label>后续建议:</label>
<span class="detail-value description">{{ orderDetail.followSuggestions }}</span>
<span class="detail-value">{{ orderDetail.followSuggestions }}</span>
</div>
</div>
</el-card>
@@ -785,7 +790,7 @@
</div>
<div class="detail-item full-width" v-if="orderDetail.evaluationContent">
<label>评价内容:</label>
<span class="detail-value description">{{ orderDetail.evaluationContent }}</span>
<span class="detail-value">{{ orderDetail.evaluationContent }}</span>
</div>
</div>
</el-card>
@@ -969,7 +974,7 @@
<p class="detail-text">{{ progress.progressDetail }}</p>
</div>
<!-- 仅维修管理人员可见,且进度为完成维修 -->
<div v-if="progress.progressType === '6' && isMaintenanceAdmin.value" class="progress-extra-info">
<div v-if="progress.progressType === '6' && (isSuperAdmin || isMaintenanceAdmin)" class="progress-extra-info">
<div v-if="progress.usedMaterials">
<label>使用材料:</label>
<span>{{ progress.usedMaterials }}</span>
@@ -1224,6 +1229,7 @@ import { useUserStore } from '@/store/modules/user';
import { getInfo } from '@/api/login'; // 添加获取用户详细信息的API
import { getToken } from '@/utils/auth'; // 修复:添加getToken导入
import { vLoading, ElLoading } from 'element-plus';
import { Loading } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -2313,6 +2319,8 @@ const handleBeforeUpload = (file: File) => {
模式: form.value.id ? '编辑模式' : '新增模式'
});
file.uploading = true; // 新增:标记为上传中
return true;
};
@@ -2355,12 +2363,16 @@ const handleUploadSuccess = (response: any, file: any) => {
} else {
proxy?.$modal.msgError(`文件 ${file.name} 上传失败: ${response.msg || '未知错误'}`);
}
file.uploading = false; // 新增:上传成功后移除loading
};
/** 上传失败 */
const handleUploadError = (error: Error, file: any) => {
console.error('上传失败:', error, file);
proxy?.$modal.msgError(`文件 ${file.name} 上传失败`);
file.uploading = false; // 新增:上传失败后移除loading
};
/** 下载附件 */
@@ -3829,4 +3841,56 @@ const getFileExt = (fileName: string): string => {
}
}
}
.upload-file-loading {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
.is-loading {
font-size: 32px;
color: #409eff;
}
}
.upload-file-thumb {
position: relative;
}
.upload-file-loading {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.75);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 10;
pointer-events: all;
.is-loading {
font-size: 38px;
color: var(--el-color-primary);
margin-bottom: 6px;
animation: spin 1s linear infinite;
}
.loading-text {
font-size: 14px;
color: var(--el-color-primary);
font-weight: bold;
text-shadow: 0 1px 2px #fff;
}
}
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
</style>