|
|
@@ -97,24 +97,23 @@
|
|
97
|
97
|
<span v-else style="font-weight:600;">{{ row.overallScore }} 分</span>
|
|
98
|
98
|
</template>
|
|
99
|
99
|
</el-table-column>
|
|
100
|
|
- <el-table-column prop="overallScore" label="预警等级">
|
|
|
100
|
+ <el-table-column prop="warningLevel" label="预警等级">
|
|
101
|
101
|
<template #default="{ row }">
|
|
102
|
|
- <span v-if="row.overallScore < 75" class="status-badge" style="animation: subtlePulse 1s infinite;"><i
|
|
103
|
|
- class="fas fa-exclamation-triangle"></i> 红色预警</span>
|
|
104
|
|
- <span v-else-if="row.overallScore >= 90" class="status-excellent"
|
|
105
|
|
- style="background:#d1fae5; color:#065f46;"><i class="fas fa-star"></i>
|
|
106
|
|
- 优秀标杆</span>
|
|
107
|
|
- <span v-else class="status-warning">正常范围</span>
|
|
|
102
|
+ <span v-if="row.warningLevel == '1'" class="status-badge" style="color:#b91c1c;"><i
|
|
|
103
|
+ class="fas fa-exclamation-triangle"></i> {{ getAlertLabel(row.warningLevel) }}</span>
|
|
|
104
|
+ <span v-else class="status-excellent"><i class="fas fa-star"></i>
|
|
|
105
|
+ {{ getAlertLabel(row.warningLevel) }}</span>
|
|
|
106
|
+
|
|
108
|
107
|
</template>
|
|
109
|
108
|
</el-table-column>
|
|
110
|
109
|
<el-table-column prop="coreRisksOrOutstandingAchievements" label="核心风险/优秀事迹" />
|
|
111
|
110
|
<el-table-column prop="statusLabel" label="状态标签">
|
|
112
|
111
|
<template #default="{ row }">
|
|
113
|
|
- <span v-if="row.overallScore < 75" style="color:#b91c1c;"><i class="fas fa-bell"></i>
|
|
114
|
|
- {{ getAlertLabel(row.statusLabel) }}</span>
|
|
115
|
|
- <span v-else-if="row.overallScore >= 90" style="color:#15803d;"><i class="fas fa-crown"></i> {{
|
|
116
|
|
- getAlertLabel(row.statusLabel) }}</span>
|
|
117
|
|
- <span v-else>{{ getAlertLabel(row.statusLabel) }}</span>
|
|
|
112
|
+ <span v-if="row.statusLabel == '1'" style="color:#b91c1c;"><i class="fas fa-bell"></i>
|
|
|
113
|
+ {{ getStatusLabel(row.statusLabel) }}</span>
|
|
|
114
|
+ <span v-else ><i class="fas fa-crown"></i> {{
|
|
|
115
|
+ getStatusLabel(row.statusLabel) }}</span>
|
|
|
116
|
+
|
|
118
|
117
|
</template>
|
|
119
|
118
|
</el-table-column>
|
|
120
|
119
|
<el-table-column label="详情" width="80">
|
|
|
@@ -167,7 +166,7 @@ import { useRoute } from "vue-router";
|
|
167
|
166
|
const route = useRoute();
|
|
168
|
167
|
const router = useRouter();
|
|
169
|
168
|
|
|
170
|
|
-const { alert_level } = useDict("alert_level");
|
|
|
169
|
+const { alert_level, status_label } = useDict("alert_level", "status_label");
|
|
171
|
170
|
|
|
172
|
171
|
const dateRangeInput = ref(null);
|
|
173
|
172
|
const activeRange = ref("month");
|
|
|
@@ -366,21 +365,7 @@ const allFilteredEmployees = computed(() => {
|
|
366
|
365
|
|
|
367
|
366
|
// 预警等级筛选
|
|
368
|
367
|
if (selectedAlertLevel.value) {
|
|
369
|
|
- // 根据字典值判断筛选条件(红色预警 <75,优秀标杆 >=90,正常范围 75-89)
|
|
370
|
|
- // 可以根据字典的 value 或 label 来判断
|
|
371
|
|
- const alertItem = alert_level.value.find(
|
|
372
|
|
- (item) => item.value === selectedAlertLevel.value
|
|
373
|
|
- );
|
|
374
|
|
- if (alertItem) {
|
|
375
|
|
- const label = alertItem.label;
|
|
376
|
|
- if (label.includes("红色") || label.includes("预警")) {
|
|
377
|
|
- result = result.filter((emp) => emp.overallScore < 75);
|
|
378
|
|
- } else if (label.includes("优秀") || label.includes("标杆")) {
|
|
379
|
|
- result = result.filter((emp) => emp.overallScore >= 90);
|
|
380
|
|
- } else if (label.includes("正常")) {
|
|
381
|
|
- result = result.filter((emp) => emp.overallScore >= 75 && emp.overallScore < 90);
|
|
382
|
|
- }
|
|
383
|
|
- }
|
|
|
368
|
+ result = result.filter((emp) => emp.warningLevel == selectedAlertLevel.value);
|
|
384
|
369
|
}
|
|
385
|
370
|
|
|
386
|
371
|
return result;
|
|
|
@@ -463,6 +448,12 @@ const getAlertLabel = (value) => {
|
|
463
|
448
|
return item ? item.label : value;
|
|
464
|
449
|
};
|
|
465
|
450
|
|
|
|
451
|
+const getStatusLabel = (value) => {
|
|
|
452
|
+ if (!value) return "";
|
|
|
453
|
+ const item = status_label.value.find((d) => d.value === value);
|
|
|
454
|
+ return item ? item.label : value;
|
|
|
455
|
+};
|
|
|
456
|
+
|
|
466
|
457
|
const setActiveRange = (range) => {
|
|
467
|
458
|
activeRange.value = range;
|
|
468
|
459
|
if (range !== "custom") {
|