|
|
@@ -2,7 +2,7 @@
|
|
2
|
2
|
<div class="dashboard">
|
|
3
|
3
|
<div class="header">
|
|
4
|
4
|
<div class="title-section">
|
|
5
|
|
- <h1><i class="fas fa-shield-alt" style="color:#2c5282; margin-right: 8px;"></i>综合预警工作台</h1>
|
|
|
5
|
+ <h1><i class="fas fa-shield-alt" style="color:#2c5282; margin-right: 8px;"></i>红线指标预警</h1>
|
|
6
|
6
|
<p>员工综合评估(<75分红色预警 | ≥90分优秀)</p>
|
|
7
|
7
|
</div>
|
|
8
|
8
|
<div class="badge-group">
|
|
|
@@ -44,7 +44,7 @@
|
|
44
|
44
|
|
|
45
|
45
|
<div class="employee-section">
|
|
46
|
46
|
<div class="section-title">
|
|
47
|
|
- <i class="fas fa-users" style="color:#dc2626;"></i> 员工综合预警
|
|
|
47
|
+ <i class="fas fa-users" style="color:#dc2626;"></i> 红线指标预警
|
|
48
|
48
|
<span
|
|
49
|
49
|
style="font-size:0.7rem; background:#eef2ff; padding:4px 12px; border-radius:30px; margin-left:12px;">
|
|
50
|
50
|
评分依据:员工配分表
|
|
|
@@ -60,30 +60,28 @@
|
|
60
|
60
|
</template>
|
|
61
|
61
|
</el-table-column>
|
|
62
|
62
|
<el-table-column prop="deptName" label="所属部门" />
|
|
63
|
|
- <el-table-column prop="eventTime" label="事件时间" sortable width="180" />
|
|
|
63
|
+ <!-- <el-table-column prop="eventTime" label="事件时间" sortable width="180" /> -->
|
|
64
|
64
|
<el-table-column prop="dimensionName" label="维度名称" />
|
|
65
|
65
|
<el-table-column prop="level2Name" label="二级指标名称" />
|
|
66
|
66
|
<el-table-column prop="totalScore" label="扣分分值合计" sortable />
|
|
67
|
67
|
<el-table-column prop="occurrenceCount" label="发生次数" sortable />
|
|
68
|
|
- <el-table-column prop="overallScore" label="预警等级">
|
|
|
68
|
+ <el-table-column prop="warningLevel" label="预警等级">
|
|
69
|
69
|
<template #default="{ row }">
|
|
70
|
|
- <span v-if="row.overallScore < 75" class="status-badge"
|
|
71
|
|
- style="animation: subtlePulse 1s infinite;"><i
|
|
72
|
|
- class="fas fa-exclamation-triangle"></i> 红色预警</span>
|
|
73
|
|
- <span v-else-if="row.overallScore >= 90" class="status-excellent"
|
|
74
|
|
- style="background:#d1fae5; color:#065f46;"><i class="fas fa-star"></i>
|
|
75
|
|
- 优秀标杆</span>
|
|
76
|
|
- <span v-else class="status-warning">正常范围</span>
|
|
|
70
|
+ <span v-if="row.warningLevel == '1'" style="color:#b91c1c;" class="status-badge">{{
|
|
|
71
|
+ getAlertLabel(row.warningLevel)
|
|
|
72
|
+ }}</span>
|
|
|
73
|
+ <span v-else class="status-excellent"><i class="fas fa-star"></i>
|
|
|
74
|
+ {{ getAlertLabel(row.warningLevel) }}</span>
|
|
|
75
|
+
|
|
77
|
76
|
</template>
|
|
78
|
77
|
</el-table-column>
|
|
79
|
78
|
<el-table-column prop="coreRisks" label="核心风险" />
|
|
80
|
79
|
<el-table-column prop="statusLabel" label="状态标签">
|
|
81
|
80
|
<template #default="{ row }">
|
|
82
|
|
- <span v-if="row.overallScore < 75" style="color:#b91c1c;"><i class="fas fa-bell"></i>
|
|
83
|
|
- {{ getAlertLabel(row.statusLabel) }}</span>
|
|
84
|
|
- <span v-else-if="row.overallScore >= 90" style="color:#15803d;"><i
|
|
85
|
|
- class="fas fa-crown"></i> {{ getAlertLabel(row.statusLabel) }}</span>
|
|
86
|
|
- <span v-else>{{ getAlertLabel(row.statusLabel) }}</span>
|
|
|
81
|
+ <span v-if="row.statusLabel == '1'" style="color:#b91c1c;"><i class="fas fa-bell"></i>
|
|
|
82
|
+ {{ getStatusLabel(row.statusLabel) }}</span>
|
|
|
83
|
+ <span v-else><i class="fas fa-crown"></i> {{ getStatusLabel(row.statusLabel) }}</span>
|
|
|
84
|
+
|
|
87
|
85
|
</template>
|
|
88
|
86
|
</el-table-column>
|
|
89
|
87
|
</el-table>
|
|
|
@@ -117,7 +115,7 @@ import { useRoute } from 'vue-router'
|
|
117
|
115
|
|
|
118
|
116
|
const route = useRoute()
|
|
119
|
117
|
|
|
120
|
|
-const { alert_level } = useDict('alert_level')
|
|
|
118
|
+const { alert_level, status_label } = useDict('alert_level', 'status_label')
|
|
121
|
119
|
|
|
122
|
120
|
const dateRangeInput = ref(null)
|
|
123
|
121
|
const activeRange = ref('month')
|
|
|
@@ -214,19 +212,7 @@ const allFilteredEmployees = computed(() => {
|
|
214
|
212
|
|
|
215
|
213
|
// 预警等级筛选
|
|
216
|
214
|
if (selectedAlertLevel.value) {
|
|
217
|
|
- // 根据字典值判断筛选条件(红色预警 <75,优秀标杆 >=90,正常范围 75-89)
|
|
218
|
|
- // 可以根据字典的 value 或 label 来判断
|
|
219
|
|
- const alertItem = alert_level.value.find(item => item.value === selectedAlertLevel.value)
|
|
220
|
|
- if (alertItem) {
|
|
221
|
|
- const label = alertItem.label
|
|
222
|
|
- if (label.includes('红色') || label.includes('预警')) {
|
|
223
|
|
- result = result.filter(emp => emp.overallScore < 75)
|
|
224
|
|
- } else if (label.includes('优秀') || label.includes('标杆')) {
|
|
225
|
|
- result = result.filter(emp => emp.overallScore >= 90)
|
|
226
|
|
- } else if (label.includes('正常')) {
|
|
227
|
|
- result = result.filter(emp => emp.overallScore >= 75 && emp.overallScore < 90)
|
|
228
|
|
- }
|
|
229
|
|
- }
|
|
|
215
|
+ result = result.filter(emp => emp.warningLevel == selectedAlertLevel.value)
|
|
230
|
216
|
}
|
|
231
|
217
|
|
|
232
|
218
|
return result
|
|
|
@@ -273,6 +259,12 @@ const getAlertLabel = (value) => {
|
|
273
|
259
|
return item ? item.label : value
|
|
274
|
260
|
}
|
|
275
|
261
|
|
|
|
262
|
+const getStatusLabel = (value) => {
|
|
|
263
|
+ if (!value) return ''
|
|
|
264
|
+ const item = status_label.value.find(d => d.value === value)
|
|
|
265
|
+ return item ? item.label : value
|
|
|
266
|
+}
|
|
|
267
|
+
|
|
276
|
268
|
const setActiveRange = (range) => {
|
|
277
|
269
|
activeRange.value = range
|
|
278
|
270
|
// 清除自定义日期
|