|
|
@@ -43,20 +43,6 @@
|
|
43
|
43
|
</div>
|
|
44
|
44
|
</div>
|
|
45
|
45
|
|
|
46
|
|
- <div class="cards-container">
|
|
47
|
|
- <div class="cards-grid" style="overflow-x: auto; white-space: nowrap;">
|
|
48
|
|
- <div class="card" v-for="(item, index) in summaryCards" :key="index"
|
|
49
|
|
- style="display: inline-block; width: 200px; flex-shrink: 0;">
|
|
50
|
|
- <div class="card-header">
|
|
51
|
|
- <i :class="item.icon"></i>
|
|
52
|
|
- <h3>{{ item.title }}</h3>
|
|
53
|
|
- <span class="card-badge">{{ item.badge }}</span>
|
|
54
|
|
- </div>
|
|
55
|
|
- <div class="value-large" :style="{ color: item.color }">{{ item.value }}</div>
|
|
56
|
|
- </div>
|
|
57
|
|
- </div>
|
|
58
|
|
- </div>
|
|
59
|
|
-
|
|
60
|
46
|
<div class="employee-section">
|
|
61
|
47
|
<div class="section-title">
|
|
62
|
48
|
<i class="fas fa-users" style="color:#dc2626;"></i> 员工综合预警
|
|
|
@@ -101,6 +87,11 @@
|
|
101
|
87
|
<span v-else>{{ getAlertLabel(row.statusLabel) }}</span>
|
|
102
|
88
|
</template>
|
|
103
|
89
|
</el-table-column>
|
|
|
90
|
+ <el-table-column label="详情" width="80">
|
|
|
91
|
+ <template #default="{ row }">
|
|
|
92
|
+ <span class="detail-link" @click="goToDetail(row)">详情</span>
|
|
|
93
|
+ </template>
|
|
|
94
|
+ </el-table-column>
|
|
104
|
95
|
</el-table>
|
|
105
|
96
|
<el-pagination v-show="total > 0" :total="total" v-model:current-page="queryParams.pageNum"
|
|
106
|
97
|
v-model:page-size="queryParams.pageSize" :page-sizes="[10, 20, 50, 100]"
|
|
|
@@ -124,13 +115,15 @@
|
|
124
|
115
|
</template>
|
|
125
|
116
|
|
|
126
|
117
|
<script setup>
|
|
127
|
|
-import { ref, computed, onMounted, watch } from 'vue'
|
|
|
118
|
+import { ref, computed, reactive, onMounted, watch } from 'vue'
|
|
|
119
|
+import { useRouter } from 'vue-router'
|
|
128
|
120
|
import { getDeptUserTree } from '@/api/item/items'
|
|
129
|
|
-import { getWarningPageData, getEmployeeWarningPageData } from '@/api/warningPage/warningPage'
|
|
|
121
|
+import { getEmployeeWarningPageData } from '@/api/warningManage/warningPage'
|
|
130
|
122
|
import { useDict } from '@/utils/dict'
|
|
131
|
123
|
import { useRoute } from 'vue-router'
|
|
132
|
124
|
|
|
133
|
125
|
const route = useRoute()
|
|
|
126
|
+const router = useRouter()
|
|
134
|
127
|
|
|
135
|
128
|
const { alert_level } = useDict('alert_level')
|
|
136
|
129
|
|
|
|
@@ -143,18 +136,6 @@ const selectedAlertLevel = ref('')
|
|
143
|
136
|
const selectedOrg = ref('')
|
|
144
|
137
|
const cascadeOptions = ref([])
|
|
145
|
138
|
|
|
146
|
|
-const summaryCards = ref([
|
|
147
|
|
- { icon: 'fas fa-clipboard-list', title: '部门监察问题', badge: '部门级', value: '13项', color: '#b45309' },
|
|
148
|
|
- { icon: 'fas fa-microchip', title: '实时质控拦截', badge: '部门级', value: '347次', color: '#2563eb' },
|
|
149
|
|
- { icon: 'fas fa-bug', title: '不安全事件', badge: '一级预警', value: '18起', color: '#dc2626' },
|
|
150
|
|
- { icon: 'fas fa-shield-virus', title: '安保测试记录', badge: '部门级', value: '4项', color: '#e67e22' },
|
|
151
|
|
- { icon: 'fas fa-comment-dots', title: '旅客服务投诉', badge: '服务响应', value: '11件', color: '#e67e22' },
|
|
152
|
|
- { icon: 'fas fa-clipboard-check', title: '服务巡查', badge: '部门级', value: '5项', color: '#333' },
|
|
153
|
|
- { icon: 'fas fa-graduation-cap', title: '培训及考试成绩', badge: '平均分数', value: '92.4分', color: '#333' },
|
|
154
|
|
- { icon: 'fas fa-plane-departure', title: '航站楼', badge: '吞吐量', value: '2.8万', color: '#059669' },
|
|
155
|
|
- { icon: 'fas fa-gift', title: '小额奖励', badge: '奖励次数', value: '156次', color: '#7c3aed' }
|
|
156
|
|
-])
|
|
157
|
|
-
|
|
158
|
139
|
const newNames = [
|
|
159
|
140
|
"刘孟", "王苡衡", "周海涵", "何欣怡", "王崎",
|
|
160
|
141
|
"黄政", "刘韵儿", "汪安霖", "张诗敏", "张维", "陈凯琳"
|
|
|
@@ -326,6 +307,23 @@ const getRowClass = ({ row }) => {
|
|
326
|
307
|
return ""
|
|
327
|
308
|
}
|
|
328
|
309
|
|
|
|
310
|
+const goToDetail = (row) => {
|
|
|
311
|
+ const query = { }
|
|
|
312
|
+ if (startDate.value && endDate.value) {
|
|
|
313
|
+ query.startDate = formatDate(startDate.value)
|
|
|
314
|
+ query.endDate = formatDate(endDate.value)
|
|
|
315
|
+ } else {
|
|
|
316
|
+ query.activeRange = activeRange.value
|
|
|
317
|
+ }
|
|
|
318
|
+ if (selectedAlertLevel.value) {
|
|
|
319
|
+ query.alertLevel = selectedAlertLevel.value
|
|
|
320
|
+ }
|
|
|
321
|
+ if (selectedOrg.value) {
|
|
|
322
|
+ query.org = selectedOrg.value
|
|
|
323
|
+ }
|
|
|
324
|
+ router.push({ path: '/warningManage/redLineWarning', query })
|
|
|
325
|
+}
|
|
|
326
|
+
|
|
329
|
327
|
const getAlertLabel = (value) => {
|
|
330
|
328
|
if (!value) return ''
|
|
331
|
329
|
const item = alert_level.value.find(d => d.value === value)
|
|
|
@@ -379,18 +377,6 @@ const getDateRangeFromActive = () => {
|
|
379
|
377
|
return { startDate: formatDate(start), endDate: formatDate(now) }
|
|
380
|
378
|
}
|
|
381
|
379
|
|
|
382
|
|
-const warningDataMap = {
|
|
383
|
|
- ledgerSupervisionProblem: 0,
|
|
384
|
|
- ledgerRealtimeInterception: 1,
|
|
385
|
|
- ledgerUnsafeEvent: 2,
|
|
386
|
|
- ledgerSecurityTest: 3,
|
|
387
|
|
- ledgerComplaint: 4,
|
|
388
|
|
- ledgerServicePatrol: 5,
|
|
389
|
|
- ledgerExamScore: 6,
|
|
390
|
|
- ledgerTerminalBonus: 7,
|
|
391
|
|
- ledgerRewardApproval: 8
|
|
392
|
|
-}
|
|
393
|
|
-
|
|
394
|
380
|
const fetchWarningData = async () => {
|
|
395
|
381
|
queryParams.pageNum = 1
|
|
396
|
382
|
let params = {}
|
|
|
@@ -414,21 +400,7 @@ const fetchWarningData = async () => {
|
|
414
|
400
|
}
|
|
415
|
401
|
|
|
416
|
402
|
try {
|
|
417
|
|
- const [r1, r2] = await Promise.all([
|
|
418
|
|
- getWarningPageData(params),
|
|
419
|
|
- getEmployeeWarningPageData(params)
|
|
420
|
|
- ])
|
|
421
|
|
- if (r1.data) {
|
|
422
|
|
- const d = r1.data
|
|
423
|
|
- summaryCards.value.forEach((card, idx) => {
|
|
424
|
|
- for (const [key, i] of Object.entries(warningDataMap)) {
|
|
425
|
|
- if (i === idx) {
|
|
426
|
|
- card.value = d[key] !== undefined ? String(d[key]) : card.value
|
|
427
|
|
- break
|
|
428
|
|
- }
|
|
429
|
|
- }
|
|
430
|
|
- })
|
|
431
|
|
- }
|
|
|
403
|
+ const r2 = await getEmployeeWarningPageData(params)
|
|
432
|
404
|
if (r2.data) {
|
|
433
|
405
|
employeesData.value = r2.data
|
|
434
|
406
|
}
|
|
|
@@ -633,78 +605,6 @@ watch(() => route.query, (query) => {
|
|
633
|
605
|
background: #1d4ed8;
|
|
634
|
606
|
}
|
|
635
|
607
|
|
|
636
|
|
-.cards-container {
|
|
637
|
|
- width: 100%;
|
|
638
|
|
- margin-bottom: 36px;
|
|
639
|
|
- overflow-x: auto;
|
|
640
|
|
-}
|
|
641
|
|
-
|
|
642
|
|
-.cards-grid {
|
|
643
|
|
- display: flex;
|
|
644
|
|
-
|
|
645
|
|
- gap: 16px;
|
|
646
|
|
- flex-wrap: nowrap;
|
|
647
|
|
- min-width: max-content;
|
|
648
|
|
-}
|
|
649
|
|
-
|
|
650
|
|
-.card {
|
|
651
|
|
- background: #ffffff;
|
|
652
|
|
- border-radius: 20px;
|
|
653
|
|
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
654
|
|
- transition: all 0.2s;
|
|
655
|
|
- border: 1px solid #eef2f6;
|
|
656
|
|
- padding: 1rem 0.5rem;
|
|
657
|
|
- display: flex;
|
|
658
|
|
- flex-direction: column;
|
|
659
|
|
- text-align: center;
|
|
660
|
|
- min-width: 280px;
|
|
661
|
|
- flex-shrink: 0;
|
|
662
|
|
-}
|
|
663
|
|
-
|
|
664
|
|
-.card:hover {
|
|
665
|
|
- transform: translateY(-3px);
|
|
666
|
|
- box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.1);
|
|
667
|
|
- border-color: #cbd5e1;
|
|
668
|
|
-}
|
|
669
|
|
-
|
|
670
|
|
-.card-header {
|
|
671
|
|
- display: flex;
|
|
672
|
|
- flex-direction: column;
|
|
673
|
|
- align-items: center;
|
|
674
|
|
- gap: 6px;
|
|
675
|
|
- border-bottom: none;
|
|
676
|
|
- padding-bottom: 0;
|
|
677
|
|
- margin-bottom: 12px;
|
|
678
|
|
-}
|
|
679
|
|
-
|
|
680
|
|
-.card-header i {
|
|
681
|
|
- font-size: 1.5rem;
|
|
682
|
|
- color: #2563eb;
|
|
683
|
|
-}
|
|
684
|
|
-
|
|
685
|
|
-.card-header h3 {
|
|
686
|
|
- font-size: 0.85rem;
|
|
687
|
|
- font-weight: 700;
|
|
688
|
|
- margin: 0;
|
|
689
|
|
- white-space: nowrap;
|
|
690
|
|
-}
|
|
691
|
|
-
|
|
692
|
|
-.card-badge {
|
|
693
|
|
- font-size: 0.6rem;
|
|
694
|
|
- background: #f1f5f9;
|
|
695
|
|
- padding: 2px 8px;
|
|
696
|
|
- border-radius: 30px;
|
|
697
|
|
- margin-top: 4px;
|
|
698
|
|
- display: inline-block;
|
|
699
|
|
-}
|
|
700
|
|
-
|
|
701
|
|
-.value-large {
|
|
702
|
|
- font-size: 1.8rem;
|
|
703
|
|
- font-weight: 800;
|
|
704
|
|
- line-height: 1.2;
|
|
705
|
|
- margin: 8px 0 4px 0;
|
|
706
|
|
-}
|
|
707
|
|
-
|
|
708
|
608
|
.employee-section {
|
|
709
|
609
|
margin-top: 20px;
|
|
710
|
610
|
width: 100%;
|
|
|
@@ -792,6 +692,16 @@ watch(() => route.query, (query) => {
|
|
792
|
692
|
font-size: 0.85rem;
|
|
793
|
693
|
}
|
|
794
|
694
|
|
|
|
695
|
+.detail-link {
|
|
|
696
|
+ color: #2563eb;
|
|
|
697
|
+ cursor: pointer;
|
|
|
698
|
+ font-weight: 500;
|
|
|
699
|
+}
|
|
|
700
|
+
|
|
|
701
|
+.detail-link:hover {
|
|
|
702
|
+ text-decoration: underline;
|
|
|
703
|
+}
|
|
|
704
|
+
|
|
795
|
705
|
footer {
|
|
796
|
706
|
text-align: center;
|
|
797
|
707
|
margin-top: 32px;
|