|
|
@@ -764,7 +764,7 @@
|
|
|
</el-card>
|
|
|
|
|
|
<!-- 评价信息 -->
|
|
|
- <el-card class="detail-card" shadow="never" v-if="orderDetail.evaluationScore">
|
|
|
+ <el-card class="detail-card" shadow="never" v-if="orderDetail.evaluationScore || orderDetail.evaluationContent">
|
|
|
<template #header>
|
|
|
<div class="card-header">
|
|
|
<span class="card-title"
|
|
|
@@ -783,7 +783,6 @@
|
|
|
<label>评价时间:</label>
|
|
|
<span class="detail-value">{{ orderDetail.evaluationTime || '暂未评价' }}</span>
|
|
|
</div>
|
|
|
- <!-- 新增:评价内容展示 -->
|
|
|
<div class="detail-item full-width" v-if="orderDetail.evaluationContent">
|
|
|
<label>评价内容:</label>
|
|
|
<span class="detail-value description">{{ orderDetail.evaluationContent }}</span>
|
|
|
@@ -1398,7 +1397,9 @@ const detailDialog = reactive<DialogOption>({
|
|
|
});
|
|
|
|
|
|
const detailLoading = ref(false);
|
|
|
-const orderDetail = ref<RepairOrderVO>();
|
|
|
+// 扩展 RepairOrderVO 类型以补充评价内容字段,避免模板校验错误
|
|
|
+type RepairOrderVOExt = RepairOrderVO & { evaluationContent?: string };
|
|
|
+const orderDetail = ref<RepairOrderVOExt>();
|
|
|
|
|
|
// 进度查看对话框
|
|
|
const progressDialog = reactive<DialogOption>({
|
|
|
@@ -2028,18 +2029,6 @@ const handleDetail = async (row: RepairOrderVO) => {
|
|
|
// 适配不同的响应格式
|
|
|
orderDetail.value = (res as any).data || res;
|
|
|
|
|
|
- // 如果服务评价内容缺失,则尝试单独拉取
|
|
|
- if (!orderDetail.value.evaluationContent) {
|
|
|
- try {
|
|
|
- const evaRes = await getServiceEvaluation(row.id);
|
|
|
- if (evaRes && evaRes.data) {
|
|
|
- orderDetail.value.evaluationContent = evaRes.data.evaluationContent || evaRes.data.evaluationContent;
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.warn('获取服务评价内容失败', e);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 自动加载附件信息
|
|
|
if (orderDetail.value.attachmentCount && orderDetail.value.attachmentCount > 0) {
|
|
|
await loadAttachments(orderDetail.value.id);
|