|
|
@@ -40,8 +40,10 @@ const hasActiveFlow = computed(() => !!detail.value?.activeFlowInstanceId);
|
|
|
const activeBizType = computed(() => detail.value?.activeFlowBizType ?? '');
|
|
|
const canClaim = computed(() => currentStatus.value === 'NEW');
|
|
|
const canStartProgress = computed(() => currentStatus.value === 'ASSIGNED');
|
|
|
-const canTransfer = computed(() => !['', 'CLOSED'].includes(currentStatus.value));
|
|
|
-const canUpgrade = computed(() => !hasActiveFlow.value && ['ASSIGNED', 'IN_PROGRESS'].includes(currentStatus.value));
|
|
|
+// BUG-16:转派只在已分派后允许,NEW(未认领/未分派)和 CLOSED 禁用,避免后端 400 无反馈。
|
|
|
+const canTransfer = computed(() => ['ASSIGNED', 'IN_PROGRESS', 'PENDING_VERIFICATION', 'REJECTED'].includes(currentStatus.value));
|
|
|
+// BUG-15:本轮不实现 escalation。前端永久禁用升级按钮,避免点击调用不存在的 /escalate 接口(404)。
|
|
|
+const canUpgrade = computed(() => false);
|
|
|
const canReject = computed(() => ['NEW', 'ASSIGNED', 'IN_PROGRESS'].includes(currentStatus.value));
|
|
|
const canSubmitVerification = computed(
|
|
|
() => currentStatus.value === 'IN_PROGRESS' && !!detail.value?.assigneeId
|
|
|
@@ -187,6 +189,16 @@ function ruleTypeLabel(t: string | null | undefined) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// BUG-3:部门字段兜底。优先 deptName;deptName 为空时若 deptId 为 0/"0"/null/undefined 显示"未分派",
|
|
|
+// 否则显示 deptId(保留有意义的 id 引用)。
|
|
|
+function formatDept(deptName: string | null | undefined, deptId: number | string | null | undefined) {
|
|
|
+ if (deptName) return deptName;
|
|
|
+ if (deptId === null || deptId === undefined) return '未分派';
|
|
|
+ const idStr = String(deptId).trim();
|
|
|
+ if (idStr === '' || idStr === '0') return '未分派';
|
|
|
+ return idStr;
|
|
|
+}
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
await loadDetail();
|
|
|
await loadEmployees();
|
|
|
@@ -204,8 +216,11 @@ onMounted(async () => {
|
|
|
<el-descriptions-item label="状态">{{ detail.statusLabel }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="严重度">{{ detail.severityLabel }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="场景">{{ detail.sceneName || detail.sceneCode }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="发生部门">{{ detail.occurrenceDeptName || detail.occurrenceDeptId || '—' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="责任部门">{{ detail.responsibleDeptName || detail.responsibleDeptId || '—' }}</el-descriptions-item>
|
|
|
+ <!-- BUG-9/24:补异常类型,优先 typeName,回退 typeCode,无则 '—' -->
|
|
|
+ <el-descriptions-item label="异常类型">{{ detail.exceptionTypeName || detail.exceptionTypeCode || '—' }}</el-descriptions-item>
|
|
|
+ <!-- BUG-3:部门 0/"0"/null/undefined 都视为未分派,不显示裸 0 -->
|
|
|
+ <el-descriptions-item label="发生部门">{{ formatDept(detail.occurrenceDeptName, detail.occurrenceDeptId) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="责任部门">{{ formatDept(detail.responsibleDeptName, detail.responsibleDeptId) }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="处理人">{{ detail.assigneeName || detail.assigneeId || '—' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="检验人">{{ detail.verifierName || detail.verifierId || '—' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="检验结果">{{ detail.verificationResult || '—' }}</el-descriptions-item>
|
|
|
@@ -233,7 +248,9 @@ onMounted(async () => {
|
|
|
<el-button type="primary" :disabled="!canClaim" @click="openAction('claim')">认领</el-button>
|
|
|
<el-button type="primary" :disabled="!canStartProgress" @click="openAction('startProgress')">开始处理</el-button>
|
|
|
<el-button :disabled="!canTransfer" @click="openAction('transfer')">转派</el-button>
|
|
|
- <el-button type="warning" :disabled="!canUpgrade" @click="openAction('upgrade')">升级</el-button>
|
|
|
+ <el-tooltip content="升级功能暂未启用" placement="top">
|
|
|
+ <el-button type="warning" disabled>升级</el-button>
|
|
|
+ </el-tooltip>
|
|
|
<el-button type="danger" :disabled="!canReject" @click="openAction('reject')">驳回</el-button>
|
|
|
<el-button type="primary" :disabled="!canSubmitVerification" @click="openAction('submitVerification')">提交复检</el-button>
|
|
|
<el-button type="success" :disabled="!canApproveVerification" @click="openAction('approveVerification')">检验通过</el-button>
|