|
|
@@ -1,5 +1,66 @@
|
|
1
|
1
|
<template>
|
|
2
|
2
|
<div class="wisdom-discovery">
|
|
|
3
|
+ <!-- 工单列表弹框 -->
|
|
|
4
|
+ <el-dialog
|
|
|
5
|
+ v-model="workOrderDialogVisible"
|
|
|
6
|
+ title="工单列表"
|
|
|
7
|
+ :modal="false"
|
|
|
8
|
+ width="80%"
|
|
|
9
|
+ class="work-order-dialog"
|
|
|
10
|
+ :border="false"
|
|
|
11
|
+
|
|
|
12
|
+ >
|
|
|
13
|
+ <el-table
|
|
|
14
|
+ :data="workOrderList"
|
|
|
15
|
+ style="width: 100%; height:432px;border: none !important;"
|
|
|
16
|
+ :header-cell-style="{ background: '#0c1e3e', color: '#62ABEB',border: 'none' }"
|
|
|
17
|
+ :cell-style="{ background: '#0a1e40', color: '#D0DEEE',border: 'none' }"
|
|
|
18
|
+ >
|
|
|
19
|
+ <el-table-column
|
|
|
20
|
+ prop="discoverMethod"
|
|
|
21
|
+ label="发现方式"
|
|
|
22
|
+ >
|
|
|
23
|
+ </el-table-column>
|
|
|
24
|
+ <el-table-column
|
|
|
25
|
+ prop="typeName"
|
|
|
26
|
+ label="事项类型"
|
|
|
27
|
+ >
|
|
|
28
|
+ </el-table-column>
|
|
|
29
|
+ <el-table-column
|
|
|
30
|
+ prop="pushtime"
|
|
|
31
|
+ label="推送时间"
|
|
|
32
|
+ >
|
|
|
33
|
+ </el-table-column>
|
|
|
34
|
+ <el-table-column
|
|
|
35
|
+ prop="pushDept"
|
|
|
36
|
+ label="推送部门"
|
|
|
37
|
+ >
|
|
|
38
|
+ </el-table-column>
|
|
|
39
|
+ <el-table-column
|
|
|
40
|
+ prop="receiveDept"
|
|
|
41
|
+ label="接收部门"
|
|
|
42
|
+ >
|
|
|
43
|
+ </el-table-column>
|
|
|
44
|
+ <el-table-column
|
|
|
45
|
+ prop="fState"
|
|
|
46
|
+ label="处置状态"
|
|
|
47
|
+ >
|
|
|
48
|
+ </el-table-column>
|
|
|
49
|
+ </el-table>
|
|
|
50
|
+ <!-- 分页组件 -->
|
|
|
51
|
+ <div class="pagination-container" style="margin-top: 20px;">
|
|
|
52
|
+ <el-pagination
|
|
|
53
|
+ v-model:current-page="currentPage"
|
|
|
54
|
+ v-model:page-size="pageSize"
|
|
|
55
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
|
56
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
57
|
+ :total="totalWorkOrders"
|
|
|
58
|
+ @size-change="handleSizeChange"
|
|
|
59
|
+ @current-change="handleCurrentChange"
|
|
|
60
|
+ style="color: #fff; background-color: #002461;"
|
|
|
61
|
+ />
|
|
|
62
|
+ </div>
|
|
|
63
|
+ </el-dialog>
|
|
3
|
64
|
<!-- 2x2 网格布局 -->
|
|
4
|
65
|
<div class="discovery-grid">
|
|
5
|
66
|
<!-- 左上:累计发现 -->
|
|
|
@@ -10,7 +71,10 @@
|
|
10
|
71
|
<img src="@/assets/icon1.png" alt="累计发现" class="icon-wrapper" />
|
|
11
|
72
|
</div>
|
|
12
|
73
|
<div class="metric-content">
|
|
13
|
|
- <div class="metric-number">{{ discoveryStats.totalDiscovery.toLocaleString() }}</div>
|
|
|
74
|
+ <div
|
|
|
75
|
+ class="metric-number cursor-pointer"
|
|
|
76
|
+ @click="handleTotalDiscoveryClick"
|
|
|
77
|
+ >{{ discoveryStats.totalDiscovery.toLocaleString() }}</div>
|
|
14
|
78
|
<div class="metric-label">累计发现</div>
|
|
15
|
79
|
</div>
|
|
16
|
80
|
</div>
|
|
|
@@ -83,7 +147,8 @@
|
|
83
|
147
|
|
|
84
|
148
|
<script setup>
|
|
85
|
149
|
import { computed, ref, onMounted, watch } from 'vue'
|
|
86
|
|
-import { getPageListData } from '@/api/index'
|
|
|
150
|
+import { getPageListData,createPageData } from '@/api/index'
|
|
|
151
|
+import { ElDialog, ElTable, ElTableColumn, ElPagination } from 'element-plus'
|
|
87
|
152
|
|
|
88
|
153
|
// 定义 props
|
|
89
|
154
|
const props = defineProps({
|
|
|
@@ -102,6 +167,13 @@ const discoveryStats = ref({
|
|
102
|
167
|
bigDataAnalysis: 1236
|
|
103
|
168
|
})
|
|
104
|
169
|
|
|
|
170
|
+// 工单列表弹框相关数据
|
|
|
171
|
+const workOrderDialogVisible = ref(false)
|
|
|
172
|
+const workOrderList = ref([])
|
|
|
173
|
+const currentPage = ref(1)
|
|
|
174
|
+const pageSize = ref(10)
|
|
|
175
|
+const totalWorkOrders = ref(0)
|
|
|
176
|
+
|
|
105
|
177
|
// 进度条分段数量(总共显示的分段数)
|
|
106
|
178
|
const totalSegments = 20
|
|
107
|
179
|
|
|
|
@@ -145,6 +217,71 @@ const unresolvedSegments = computed(() => {
|
|
145
|
217
|
const filledCount = Math.round((discoveryStats.value.unresolved / discoveryStats.value.totalDiscovery) * totalSegments)
|
|
146
|
218
|
return Array(totalSegments).fill(false).map((_, i) => i < filledCount)
|
|
147
|
219
|
})
|
|
|
220
|
+
|
|
|
221
|
+// 处理累计发现点击事件
|
|
|
222
|
+const handleTotalDiscoveryClick = async () => {
|
|
|
223
|
+ // 重置为第一页
|
|
|
224
|
+ currentPage.value = 1
|
|
|
225
|
+ workOrderDialogVisible.value = true
|
|
|
226
|
+ await fetchWorkOrderList()
|
|
|
227
|
+}
|
|
|
228
|
+
|
|
|
229
|
+// 分页大小变化处理
|
|
|
230
|
+const handleSizeChange = (newSize) => {
|
|
|
231
|
+ pageSize.value = newSize
|
|
|
232
|
+ fetchWorkOrderList()
|
|
|
233
|
+}
|
|
|
234
|
+
|
|
|
235
|
+// 页码变化处理
|
|
|
236
|
+const handleCurrentChange = (newPage) => {
|
|
|
237
|
+ currentPage.value = newPage
|
|
|
238
|
+ fetchWorkOrderList()
|
|
|
239
|
+}
|
|
|
240
|
+
|
|
|
241
|
+// 获取工单列表数据
|
|
|
242
|
+const fetchWorkOrderList = async () => {
|
|
|
243
|
+ try {
|
|
|
244
|
+ const response = await createPageData('/woworkorderbase/searchWorkGState?stateid=0',{
|
|
|
245
|
+ current: currentPage.value,
|
|
|
246
|
+ size: pageSize.value,
|
|
|
247
|
+ deptType: 1,
|
|
|
248
|
+ fCode: "",
|
|
|
249
|
+ fOvertimes: 0,
|
|
|
250
|
+ fSguserid: props.selectedProjectId || '',
|
|
|
251
|
+ fSgusername: "",
|
|
|
252
|
+ fStateid: 0,
|
|
|
253
|
+ fWorkorderid: 0,
|
|
|
254
|
+ fWorkordertypeid: 0,
|
|
|
255
|
+ })
|
|
|
256
|
+ console.log('response', response)
|
|
|
257
|
+ if (response && response.status === 200 && response.data.data) {
|
|
|
258
|
+ // 转换数据格式,确保与表格列名匹配
|
|
|
259
|
+ workOrderList.value = (response.data.data || []).map(item => ({
|
|
|
260
|
+ discoverMethod: item.discoverMethod || '视频捕捉',
|
|
|
261
|
+ typeName: item.typeName || '客流预警',
|
|
|
262
|
+ pushtime: item.pushtime || '',
|
|
|
263
|
+ pushDept: item.pushDept || '园林中心',
|
|
|
264
|
+ receiveDept: item.receiveDept || '龙源湖公园',
|
|
|
265
|
+ fState: item.fState,
|
|
|
266
|
+ statusText: item.status === 1 ? '完结' : '待处理'
|
|
|
267
|
+ }))
|
|
|
268
|
+ // 设置总数
|
|
|
269
|
+ totalWorkOrders.value = response.data.total || 0
|
|
|
270
|
+ }
|
|
|
271
|
+ } catch (error) {
|
|
|
272
|
+ console.error('获取工单列表失败:', error)
|
|
|
273
|
+ // 提供模拟数据
|
|
|
274
|
+ workOrderList.value = []
|
|
|
275
|
+ totalWorkOrders.value = 0
|
|
|
276
|
+ }
|
|
|
277
|
+}
|
|
|
278
|
+
|
|
|
279
|
+// 格式化状态显示
|
|
|
280
|
+const formatStatus = (row) => {
|
|
|
281
|
+ return row.statusText === '完结'
|
|
|
282
|
+ ? '<span style="color: #00FF88;">完结</span>'
|
|
|
283
|
+ : '<span style="color: #FF6B6B;">待处理</span>'
|
|
|
284
|
+}
|
|
148
|
285
|
</script>
|
|
149
|
286
|
|
|
150
|
287
|
<style lang="scss" scoped>
|
|
|
@@ -208,6 +345,16 @@ const unresolvedSegments = computed(() => {
|
|
208
|
345
|
-webkit-text-fill-color: transparent;
|
|
209
|
346
|
}
|
|
210
|
347
|
|
|
|
348
|
+ .cursor-pointer {
|
|
|
349
|
+ cursor: pointer;
|
|
|
350
|
+ transition: all 0.3s ease;
|
|
|
351
|
+ }
|
|
|
352
|
+
|
|
|
353
|
+ .cursor-pointer:hover {
|
|
|
354
|
+ transform: scale(1.05);
|
|
|
355
|
+ filter: brightness(1.2);
|
|
|
356
|
+ }
|
|
|
357
|
+
|
|
211
|
358
|
.metric-label {
|
|
212
|
359
|
font-size: 0.7vw;
|
|
213
|
360
|
color: #677693;
|
|
|
@@ -379,5 +526,122 @@ const unresolvedSegments = computed(() => {
|
|
379
|
526
|
}
|
|
380
|
527
|
}
|
|
381
|
528
|
}
|
|
|
529
|
+
|
|
|
530
|
+// 弹框样式
|
|
|
531
|
+:deep(.work-order-dialog) {
|
|
|
532
|
+ background-color:rgba(0, 45, 117, 0.9) ;
|
|
|
533
|
+
|
|
|
534
|
+ .el-dialog {
|
|
|
535
|
+ background: linear-gradient(135deg, #081E3E 0%, #0A1633 100%);
|
|
|
536
|
+ border: 1px solid rgba(7, 185, 255, 0.3);
|
|
|
537
|
+ box-shadow: 0 0 20px rgba(7, 185, 255, 0.2);
|
|
|
538
|
+ border-radius: 8px;
|
|
|
539
|
+ }
|
|
|
540
|
+
|
|
|
541
|
+ .el-dialog__header {
|
|
|
542
|
+ border-bottom: 1px solid rgba(7, 185, 255, 0.3);
|
|
|
543
|
+ }
|
|
|
544
|
+
|
|
|
545
|
+ .el-dialog__title {
|
|
|
546
|
+ color: #62ABEB;
|
|
|
547
|
+ font-size: 1.2vw;
|
|
|
548
|
+ }
|
|
|
549
|
+
|
|
|
550
|
+ .el-dialog__headerbtn .el-dialog__close {
|
|
|
551
|
+ color: #62ABEB;
|
|
|
552
|
+ }
|
|
|
553
|
+
|
|
|
554
|
+ .el-table {
|
|
|
555
|
+ background: #002461 !important;
|
|
|
556
|
+ border-color: none;
|
|
|
557
|
+ }
|
|
|
558
|
+ .el-table__row:hover {
|
|
|
559
|
+ background: rgba(7, 185, 255, 0.2) !important;
|
|
|
560
|
+ }
|
|
|
561
|
+
|
|
|
562
|
+}
|
|
|
563
|
+ // 分页样式
|
|
|
564
|
+ .pagination-container {
|
|
|
565
|
+ display: flex;
|
|
|
566
|
+ justify-content: center;
|
|
|
567
|
+ align-items: center;
|
|
|
568
|
+ }
|
|
|
569
|
+
|
|
|
570
|
+ // 总数文本
|
|
|
571
|
+ :deep(.el-pagination__total) {
|
|
|
572
|
+ color: #fff !important;
|
|
|
573
|
+ }
|
|
|
574
|
+
|
|
|
575
|
+ // 页面大小选择
|
|
|
576
|
+ :deep(.el-pagination__sizes .el-input__inner) {
|
|
|
577
|
+ color: #fff !important;
|
|
|
578
|
+ background-color: #002461 !important;
|
|
|
579
|
+ border: 1px solid rgba(7, 185, 255, 0.3) !important;
|
|
|
580
|
+ }
|
|
|
581
|
+
|
|
|
582
|
+ // 跳转输入框
|
|
|
583
|
+ :deep(.el-pagination__jump .el-input__inner) {
|
|
|
584
|
+ color: #fff !important;
|
|
|
585
|
+ background-color: #002461 !important;
|
|
|
586
|
+ border: 1px solid rgba(7, 185, 255, 0.3) !important;
|
|
|
587
|
+ }
|
|
|
588
|
+
|
|
|
589
|
+ // 箭头按钮
|
|
|
590
|
+ :deep(.el-pagination button) {
|
|
|
591
|
+ color: #fff !important;
|
|
|
592
|
+ background-color: #002461 !important;
|
|
|
593
|
+ border: 1px solid rgba(7, 185, 255, 0.3) !important;
|
|
|
594
|
+ }
|
|
|
595
|
+
|
|
|
596
|
+ // 按钮悬停效果
|
|
|
597
|
+ :deep(.el-pagination button:hover:not(:disabled)) {
|
|
|
598
|
+ color: #fff !important;
|
|
|
599
|
+ background-color: #00307a !important;
|
|
|
600
|
+ border-color: rgba(7, 185, 255, 0.6) !important;
|
|
|
601
|
+ }
|
|
|
602
|
+
|
|
|
603
|
+ // 页码样式
|
|
|
604
|
+ :deep(.el-pager li) {
|
|
|
605
|
+ color: #fff !important;
|
|
|
606
|
+ background-color: #002461 !important;
|
|
|
607
|
+ }
|
|
|
608
|
+
|
|
|
609
|
+ // 激活状态页码
|
|
|
610
|
+ :deep(.el-pager li.is-active) {
|
|
|
611
|
+ color: #fff !important;
|
|
|
612
|
+ background-color: #0056b3 !important;
|
|
|
613
|
+ }
|
|
|
614
|
+
|
|
|
615
|
+ // 页码悬停效果
|
|
|
616
|
+ :deep(.el-pager li:hover:not(.is-active)) {
|
|
|
617
|
+ color: #fff !important;
|
|
|
618
|
+ background-color: #00307a !important;
|
|
|
619
|
+ }
|
|
|
620
|
+
|
|
|
621
|
+ // 下拉菜单样式
|
|
|
622
|
+ :deep(.el-select-dropdown) {
|
|
|
623
|
+ background-color: #002461 !important;
|
|
|
624
|
+ border: 1px solid rgba(7, 185, 255, 0.3) !important;
|
|
|
625
|
+ }
|
|
|
626
|
+ :deep(.el-select__wrapper) {
|
|
|
627
|
+ background-color: #002461 !important;
|
|
|
628
|
+ border: 1px solid rgba(7, 185, 255, 0.3) !important;
|
|
|
629
|
+ }
|
|
|
630
|
+ :deep(.el-input__wrapper) {
|
|
|
631
|
+ color: #fff !important;
|
|
|
632
|
+ background-color: #002461 !important;
|
|
|
633
|
+ border:none !important;
|
|
|
634
|
+ }
|
|
|
635
|
+ :deep(.el-select-dropdown__item) {
|
|
|
636
|
+ color: #fff !important;
|
|
|
637
|
+ }
|
|
|
638
|
+
|
|
|
639
|
+ :deep(.el-select-dropdown__item:hover) {
|
|
|
640
|
+ background-color: #00307a !important;
|
|
|
641
|
+ }
|
|
|
642
|
+
|
|
|
643
|
+ :deep(.el-select-dropdown__item.selected) {
|
|
|
644
|
+ background-color: #00307a !important;
|
|
|
645
|
+ }
|
|
382
|
646
|
</style>
|
|
383
|
647
|
|