ソースを参照

feat(portraitManagement): 新增团队画像统计相关接口与页面功能

1.  新增站级/部门级团队画像统计API接口
2.  调整滚动表格默认时长与表格字段映射
3.  优化搜索树默认选中逻辑与数据查询
4.  重构各页面数据请求方法,支持动态传参并修复参数传递问题
5.  新增站点 profile 小时流量统计图表功能
huoyi 3 週間 前
コミット
e1bafb90dd

+ 12 - 1
src/api/portraitManagement/portraitManagement.js

@@ -84,4 +84,15 @@ export function countSeizureStatsType(data) {
84
 // 10.不安全事件岗位分布
84
 // 10.不安全事件岗位分布
85
 export function countSeizureStatsPost(data) {
85
 export function countSeizureStatsPost(data) {
86
     return request({ url: '/ledger/unsafeEvent/countSeizureStatsPost', method: 'post', data })
86
     return request({ url: '/ledger/unsafeEvent/countSeizureStatsPost', method: 'post', data })
87
-}
87
+}
88
+
89
+//获取站级别下所有部门的团队画像统计
90
+export function countStationTeamStats(data) {
91
+    return request({ url: '/score/dept-portrait/station-team-stats', method: 'post', data })
92
+}
93
+
94
+//获取部门的团队画像统计
95
+export function countDeptTeamStats(data) {
96
+    return request({ url: '/score/dept-portrait/team-stats', method: 'post', data })
97
+}
98
+

+ 1 - 1
src/views/portraitManagement/components/ProfileMembers.vue

@@ -1,7 +1,7 @@
1
 <template>
1
 <template>
2
   <InfoCard title="团队成员">
2
   <InfoCard title="团队成员">
3
     <div class="table-container">
3
     <div class="table-container">
4
-      <RollingTable :columns="columns" :data="data" :duration="20" />
4
+      <RollingTable :columns="columns" :data="data" :duration="200" />
5
     </div>
5
     </div>
6
   </InfoCard>
6
   </InfoCard>
7
 </template>
7
 </template>

+ 53 - 4
src/views/portraitManagement/components/SearchBar.vue

@@ -35,8 +35,8 @@
35
           <!-- <div class="primary" style="border-radius: 6px;" @click="() => searchHandler()">模糊搜索</div> -->
35
           <!-- <div class="primary" style="border-radius: 6px;" @click="() => searchHandler()">模糊搜索</div> -->
36
         </div>
36
         </div>
37
         <div style="margin-top: 20px;">
37
         <div style="margin-top: 20px;">
38
-          <el-tree :data="departments" :default-expanded-keys="[100]" :props="{ value: 'id', showPrefix: false }"
39
-            accordion @node-click="handleNodeClick" />
38
+          <el-tree ref="treeRef" :data="departments" :default-expanded-keys="[100]" node-key="id"
39
+            :current-node-key="currentKey" :props="{ value: 'id', showPrefix: false }" accordion @node-click="handleNodeClick" />
40
         </div>
40
         </div>
41
       </div>
41
       </div>
42
     </el-popover>
42
     </el-popover>
@@ -45,7 +45,7 @@
45
 </template>
45
 </template>
46
 
46
 
47
 <script setup>
47
 <script setup>
48
-import { onMounted, onUnmounted } from 'vue'
48
+import { ref, nextTick, onMounted, onUnmounted } from 'vue'
49
 import { searchPortraitUsers } from '@/api/score/index'
49
 import { searchPortraitUsers } from '@/api/score/index'
50
 import { getDeptList,getDeptUserTree } from '@/api/item/items'
50
 import { getDeptList,getDeptUserTree } from '@/api/item/items'
51
 import { listDept } from '@/api/system/dept'
51
 import { listDept } from '@/api/system/dept'
@@ -63,6 +63,28 @@ const currentTime = ref('year')
63
 const personName = ref('')
63
 const personName = ref('')
64
 const departments = ref([])
64
 const departments = ref([])
65
 const dateRange = ref([])
65
 const dateRange = ref([])
66
+const treeRef = ref(null)
67
+const currentKey = ref(null)
68
+
69
+const defaultIdMap = {
70
+  user: 13,
71
+  BRIGADE: 103,
72
+  STATION: 103,
73
+  MANAGER: 104,
74
+  TEAMS: 110
75
+}
76
+
77
+const findNodeById = (nodes, id) => {
78
+  if (!nodes) return null
79
+  for (const node of nodes) {
80
+    if (node.id === id || node.deptId === id) return node
81
+    if (node.children) {
82
+      const found = findNodeById(node.children, id)
83
+      if (found) return found
84
+    }
85
+  }
86
+  return null
87
+}
66
 
88
 
67
 const queryUsers = async (query, cb) => {
89
 const queryUsers = async (query, cb) => {
68
   if (!query?.trim()) { cb([]); return }
90
   if (!query?.trim()) { cb([]); return }
@@ -215,11 +237,38 @@ onMounted(async () => {
215
   if (props.deptType === 'user') {
237
   if (props.deptType === 'user') {
216
     const res = await getDeptUserTree()
238
     const res = await getDeptUserTree()
217
     departments.value = res.data
239
     departments.value = res.data
218
-
219
   } else {
240
   } else {
220
     const res = await getDeptList({ deptType: props.deptType })
241
     const res = await getDeptList({ deptType: props.deptType })
221
     departments.value = filterDeptTree(res.data, props.deptType)
242
     departments.value = filterDeptTree(res.data, props.deptType)
222
   }
243
   }
244
+
245
+  const defaultId = defaultIdMap[props.deptType]
246
+  if (defaultId) {
247
+    const defaultNode = findNodeById(departments.value, defaultId)
248
+    if (defaultNode) {
249
+      currentKey.value = defaultId
250
+      if (props.deptType === 'user') {
251
+        personName.value = defaultNode.label
252
+        searchHandler({ personName: defaultNode.label })
253
+      } else {
254
+        personName.value = defaultNode.deptName || defaultNode.name || defaultNode.label
255
+        let obj = {}
256
+        if (props.deptType === 'BRIGADE' || props.deptType === 'STATION') {
257
+          obj = { deptId: defaultNode.deptId || defaultNode.id }
258
+        }
259
+        if (props.deptType === 'MANAGER') {
260
+          obj = { teamId: defaultNode.deptId || defaultNode.id, deptId: defaultNode.deptId || defaultNode.id }
261
+        }
262
+        if (props.deptType === 'TEAMS') {
263
+          obj = { groupId: defaultNode.deptId || defaultNode.id, deptId: defaultNode.deptId || defaultNode.id }
264
+        }
265
+        searchHandler(obj)
266
+      }
267
+      nextTick(() => {
268
+        treeRef.value?.setCurrentKey(defaultId)
269
+      })
270
+    }
271
+  }
223
 })
272
 })
224
 onUnmounted(() => {
273
 onUnmounted(() => {
225
   resetStyle()
274
   resetStyle()

+ 1 - 1
src/views/portraitManagement/components/SeizedInfo.vue

@@ -78,7 +78,7 @@ const setChartsOptionsBar = computed(() => {
78
     grid: {
78
     grid: {
79
       top: 20,
79
       top: 20,
80
       bottom: 40,
80
       bottom: 40,
81
-      left: 35,
81
+      left: 45,
82
       right: 15
82
       right: 15
83
     },
83
     },
84
     xAxis: {
84
     xAxis: {

+ 1 - 1
src/views/portraitManagement/components/rollingTable.vue

@@ -29,7 +29,7 @@ const props = defineProps({
29
   },
29
   },
30
   duration: {
30
   duration: {
31
     type: Number,
31
     type: Number,
32
-    default: 20
32
+    default: 60
33
   }
33
   }
34
 })
34
 })
35
 
35
 

+ 51 - 43
src/views/portraitManagement/deptProfile/component/runData.vue

@@ -97,18 +97,17 @@ const props = defineProps({
97
 })
97
 })
98
 
98
 
99
 const channelCheckData = ref([])
99
 const channelCheckData = ref([])
100
-const invokerCountLanePeakThroughput = () => {
101
-  countLanePeakThroughput(props.queryParams).then(res => {
100
+const invokerCountLanePeakThroughput = (params) => {
101
+  countLanePeakThroughput(params).then(res => {
102
     if (res.code === 200 && res.data) {
102
     if (res.code === 200 && res.data) {
103
       channelCheckData.value =  res.data || []
103
       channelCheckData.value =  res.data || []
104
     }
104
     }
105
-    
106
   })
105
   })
107
 }
106
 }
108
 
107
 
109
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
108
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
110
-const invokerCountSeizureInfoItem = () => {
111
-  countSeizureInfoItem(props.queryParams).then(res => {
109
+const invokerCountSeizureInfoItem = (params) => {
110
+  countSeizureInfoItem(params).then(res => {
112
     if (res.code === 200 && res.data) {
111
     if (res.code === 200 && res.data) {
113
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
112
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
114
     }
113
     }
@@ -116,8 +115,8 @@ const invokerCountSeizureInfoItem = () => {
116
 }
115
 }
117
 
116
 
118
 const countSeizeSubjectCategoryQuantityData = ref([])
117
 const countSeizeSubjectCategoryQuantityData = ref([])
119
-const invokerCountSeizeSubjectCategoryQuantity = () => {
120
-  countSeizeSubjectCategoryQuantity(props.queryParams).then(res => {
118
+const invokerCountSeizeSubjectCategoryQuantity = (params) => {
119
+  countSeizeSubjectCategoryQuantity(params).then(res => {
121
     if (res.code === 200 && res.data) {
120
     if (res.code === 200 && res.data) {
122
       countSeizeSubjectCategoryQuantityData.value = res.data || []
121
       countSeizeSubjectCategoryQuantityData.value = res.data || []
123
     }
122
     }
@@ -125,8 +124,8 @@ const invokerCountSeizeSubjectCategoryQuantity = () => {
125
 }
124
 }
126
 
125
 
127
 const countSeizureTotalQuantityData = ref([])
126
 const countSeizureTotalQuantityData = ref([])
128
-const invokerCountSeizureTotalQuantity = () => {
129
-  countSeizureTotalQuantity(props.queryParams).then(res => {
127
+const invokerCountSeizureTotalQuantity = (params) => {
128
+  countSeizureTotalQuantity(params).then(res => {
130
     if (res.code === 200 && res.data) {
129
     if (res.code === 200 && res.data) {
131
       countSeizureTotalQuantityData.value = res.data || []
130
       countSeizureTotalQuantityData.value = res.data || []
132
     }
131
     }
@@ -134,8 +133,8 @@ const invokerCountSeizureTotalQuantity = () => {
134
 }
133
 }
135
 
134
 
136
 const countSeizureSingleQuantityData = ref([])
135
 const countSeizureSingleQuantityData = ref([])
137
-const invokerCountSeizureSingleQuantity = () => {
138
-  countSeizureSingleQuantity(props.queryParams).then(res => {
136
+const invokerCountSeizureSingleQuantity = (params) => {
137
+  countSeizureSingleQuantity(params).then(res => {
139
     if (res.code === 200 && res.data) {
138
     if (res.code === 200 && res.data) {
140
       countSeizureSingleQuantityData.value = res.data || []
139
       countSeizureSingleQuantityData.value = res.data || []
141
     }
140
     }
@@ -143,8 +142,8 @@ const invokerCountSeizureSingleQuantity = () => {
143
 }
142
 }
144
 
143
 
145
 const countSeizeAreaQuantityData = ref([])
144
 const countSeizeAreaQuantityData = ref([])
146
-const invokerCountSeizeAreaQuantity = () => {
147
-  countSeizeAreaQuantity(props.queryParams).then(res => {
145
+const invokerCountSeizeAreaQuantity = (params) => {
146
+  countSeizeAreaQuantity(params).then(res => {
148
     if (res.code === 200 && res.data) {
147
     if (res.code === 200 && res.data) {
149
       countSeizeAreaQuantityData.value = res.data || []
148
       countSeizeAreaQuantityData.value = res.data || []
150
     }
149
     }
@@ -152,24 +151,24 @@ const invokerCountSeizeAreaQuantity = () => {
152
 }
151
 }
153
 
152
 
154
 const countSeizureStatsItemData = ref([])
153
 const countSeizureStatsItemData = ref([])
155
-const invokerCountSeizureStatsItem = () => {
156
-  countSeizureStatsItem(props.queryParams).then(res => {
154
+const invokerCountSeizureStatsItem = (params) => {
155
+  countSeizureStatsItem(params).then(res => {
157
     if (res.code === 200 && res.data) {
156
     if (res.code === 200 && res.data) {
158
       countSeizureStatsItemData.value = res.data || []
157
       countSeizureStatsItemData.value = res.data || []
159
     }
158
     }
160
   })
159
   })
161
 }
160
 }
162
 const countSeizureStatsTypeData = ref([])
161
 const countSeizureStatsTypeData = ref([])
163
-const invokerCountSeizureStatsType = () => {
164
-  countSeizureStatsType(props.queryParams).then(res => {
162
+const invokerCountSeizureStatsType = (params) => {
163
+  countSeizureStatsType(params).then(res => {
165
     if (res.code === 200 && res.data) {
164
     if (res.code === 200 && res.data) {
166
       countSeizureStatsTypeData.value = res.data || []
165
       countSeizureStatsTypeData.value = res.data || []
167
     }
166
     }
168
   })
167
   })
169
 }
168
 }
170
 const countSeizureStatsPostData = ref([])
169
 const countSeizureStatsPostData = ref([])
171
-const invokerCountSeizureStatsPost = () => {
172
-  countSeizureStatsPost(props.queryParams).then(res => {
170
+const invokerCountSeizureStatsPost = (params) => {
171
+  countSeizureStatsPost(params).then(res => {
173
     if (res.code === 200 && res.data) {
172
     if (res.code === 200 && res.data) {
174
       countSeizureStatsPostData.value = res.data || []
173
       countSeizureStatsPostData.value = res.data || []
175
     }
174
     }
@@ -177,8 +176,8 @@ const invokerCountSeizureStatsPost = () => {
177
 }
176
 }
178
 
177
 
179
 const securityTestItemClassificationData = ref([])
178
 const securityTestItemClassificationData = ref([])
180
-const invokerSecurityTestItemClassification = () => {
181
-  securityTestItemClassification(props.queryParams).then(res => {
179
+const invokerSecurityTestItemClassification = (params) => {
180
+  securityTestItemClassification(params).then(res => {
182
     if (res.code === 200 && res.data) {
181
     if (res.code === 200 && res.data) {
183
       securityTestItemClassificationData.value = res.data || []
182
       securityTestItemClassificationData.value = res.data || []
184
     }
183
     }
@@ -186,16 +185,16 @@ const invokerSecurityTestItemClassification = () => {
186
 }
185
 }
187
 
186
 
188
 const securityTestPassingStatusData = ref([])
187
 const securityTestPassingStatusData = ref([])
189
-const invokerSecurityTestPassingStatus = () => {
190
-    securityTestPassingStatus(props.queryParams).then(res => {
188
+const invokerSecurityTestPassingStatus = (params) => {
189
+  securityTestPassingStatus(params).then(res => {
191
     if (res.code === 200 && res.data) {
190
     if (res.code === 200 && res.data) {
192
       securityTestPassingStatusData.value = res.data || []
191
       securityTestPassingStatusData.value = res.data || []
193
     }
192
     }
194
   })
193
   })
195
 }
194
 }
196
 const securityTestRegionData = ref([])
195
 const securityTestRegionData = ref([])
197
-const invokerSecurityTestRegion = () => {
198
-    securityTestRegion(props.queryParams).then(res => {
196
+const invokerSecurityTestRegion = (params) => {
197
+  securityTestRegion(params).then(res => {
199
     if (res.code === 200 && res.data) {
198
     if (res.code === 200 && res.data) {
200
       securityTestRegionData.value = res.data || []
199
       securityTestRegionData.value = res.data || []
201
     }
200
     }
@@ -205,9 +204,9 @@ const invokerSecurityTestRegion = () => {
205
 
204
 
206
 
205
 
207
 const supervisionData = ref([])
206
 const supervisionData = ref([])
208
-const fetchSupervisionData = async () => {
207
+const fetchSupervisionData = async (params) => {
209
   try {
208
   try {
210
-    const res = await supervisionProblemPosition(props.queryParams)
209
+    const res = await supervisionProblemPosition(params)
211
     if (res.code === 200 && res.data) {
210
     if (res.code === 200 && res.data) {
212
       supervisionData.value = res.data.map(item => ({
211
       supervisionData.value = res.data.map(item => ({
213
         num: item.total,
212
         num: item.total,
@@ -219,10 +218,11 @@ const fetchSupervisionData = async () => {
219
   }
218
   }
220
 }
219
 }
221
 
220
 
221
+
222
 const interceptionData = ref([])
222
 const interceptionData = ref([])
223
-const fetchInterceptionData = async () => {
223
+const fetchInterceptionData = async (params) => {
224
   try {
224
   try {
225
-    const res = await realtimeInterceptionItem(props.queryParams)
225
+    const res = await realtimeInterceptionItem(params)
226
     if (res.code === 200 && res.data) {
226
     if (res.code === 200 && res.data) {
227
       interceptionData.value = res.data.map(item => ({
227
       interceptionData.value = res.data.map(item => ({
228
         num: item.total,
228
         num: item.total,
@@ -235,21 +235,29 @@ const fetchInterceptionData = async () => {
235
 }
235
 }
236
 
236
 
237
 const fetchData = () => {
237
 const fetchData = () => {
238
+  const params = {}
239
+  Object.keys(props.queryParams).forEach(key => {
240
+    const val = props.queryParams[key]
241
+    if (val !== null && val !== undefined && val !== '') {
242
+      params[key] = val
243
+    }
244
+  })
245
+ 
238
 
246
 
239
-  invokerCountLanePeakThroughput()
240
-  invokerCountSeizureInfoItem()
241
-  invokerCountSeizeSubjectCategoryQuantity()
242
-  invokerCountSeizureTotalQuantity()
243
-  invokerCountSeizureSingleQuantity()
244
-  invokerCountSeizeAreaQuantity()
245
-  invokerCountSeizureStatsItem()
246
-  invokerCountSeizureStatsType()
247
-  invokerCountSeizureStatsPost()
248
-  invokerSecurityTestItemClassification()
249
-  invokerSecurityTestPassingStatus()
250
-  invokerSecurityTestRegion()
251
-  fetchSupervisionData()
252
-  fetchInterceptionData()
247
+  invokerCountLanePeakThroughput(params)
248
+  invokerCountSeizureInfoItem(params)
249
+  invokerCountSeizeSubjectCategoryQuantity(params)
250
+  invokerCountSeizureTotalQuantity(params)
251
+  invokerCountSeizureSingleQuantity(params)
252
+  invokerCountSeizeAreaQuantity(params)
253
+  invokerCountSeizureStatsItem(params)
254
+  invokerCountSeizureStatsType(params)
255
+  invokerCountSeizureStatsPost(params)
256
+  invokerSecurityTestItemClassification(params)
257
+  invokerSecurityTestPassingStatus(params)
258
+  invokerSecurityTestRegion(params)
259
+  fetchSupervisionData(params)
260
+  fetchInterceptionData(params)
253
 }
261
 }
254
 watch(() => props.queryParams, () => {
262
 watch(() => props.queryParams, () => {
255
   fetchData()
263
   fetchData()

+ 20 - 3
src/views/portraitManagement/deptProfile/index.vue

@@ -11,12 +11,13 @@
11
 </template>
11
 </template>
12
 
12
 
13
 <script setup>
13
 <script setup>
14
-import { ref } from 'vue'
14
+import { ref, onMounted } from 'vue'
15
 import Page from '../components/page.vue'
15
 import Page from '../components/page.vue'
16
 import SearchBar from '../components/SearchBar.vue'
16
 import SearchBar from '../components/SearchBar.vue'
17
 import Profile from './component/profile.vue'
17
 import Profile from './component/profile.vue'
18
 import RunData from './component/runData.vue'
18
 import RunData from './component/runData.vue'
19
 import PentagonGroup from '../components/PentagonGroup.vue'
19
 import PentagonGroup from '../components/PentagonGroup.vue'
20
+import { countDeptTeamStats } from '@/api/portraitManagement/portraitManagement'
20
 import zongheIcon from '@/assets/icons/portrait/zonghe_icon.png'
21
 import zongheIcon from '@/assets/icons/portrait/zonghe_icon.png'
21
 import renyuanIcon from '@/assets/icons/portrait/renyuan_icon.png'
22
 import renyuanIcon from '@/assets/icons/portrait/renyuan_icon.png'
22
 import zu02Icon from '@/assets/icons/portrait/zu02_icon.png'
23
 import zu02Icon from '@/assets/icons/portrait/zu02_icon.png'
@@ -27,7 +28,11 @@ const activeTab = ref(0)
27
 const searchVisible = ref(false)
28
 const searchVisible = ref(false)
28
 const queryParams = ref({})
29
 const queryParams = ref({})
29
 
30
 
30
-const pentagonItems = ref([
31
+const teamStatsData = ref(null)
32
+const invokerCountDeptTeamStats = (params) => {
33
+  countDeptTeamStats(params).then(res => {
34
+    if (res.code === 200 && res.data) {
35
+      teamStatsData.value = [
31
   {
36
   {
32
     value: '88',
37
     value: '88',
33
     label: '综合得分',
38
     label: '综合得分',
@@ -154,10 +159,20 @@ const pentagonItems = ref([
154
     bgGradientStart: 'rgba(33,33,58,0.95)',
159
     bgGradientStart: 'rgba(33,33,58,0.95)',
155
     bgGradientEnd: 'rgba(15,70,250,0.2)'
160
     bgGradientEnd: 'rgba(15,70,250,0.2)'
156
   }
161
   }
162
+]
163
+    }
164
+  })
165
+}
166
+
167
+
168
+
169
+const pentagonItems = ref([
170
+  
157
 ])
171
 ])
158
 
172
 
159
 const handleSearch = (params) => {
173
 const handleSearch = (params) => {
160
   queryParams.value = params
174
   queryParams.value = params
175
+  invokerCountDeptTeamStats(params)
161
 }
176
 }
162
 
177
 
163
 const handleTabChange = (index) => {
178
 const handleTabChange = (index) => {
@@ -166,7 +181,9 @@ const handleTabChange = (index) => {
166
 
181
 
167
 const searchBar = ref(null)
182
 const searchBar = ref(null)
168
 onMounted(() => {
183
 onMounted(() => {
169
-  queryParams.value = Object.assign({ deptId: '' }, searchBar.value.getDefQuery())
184
+  const defParams = Object.assign({ deptId: '' }, searchBar.value.getDefQuery())
185
+  queryParams.value = defParams
186
+  invokerCountDeptTeamStats(defParams)
170
 })
187
 })
171
 
188
 
172
 </script>
189
 </script>

+ 47 - 42
src/views/portraitManagement/groupProfile/component/runData.vue

@@ -97,8 +97,8 @@ const props = defineProps({
97
 
97
 
98
 
98
 
99
 const channelCheckData = ref([])
99
 const channelCheckData = ref([])
100
-const invokerCountLanePeakThroughput = () => {
101
-  countLanePeakThroughput(props.queryParams).then(res => {
100
+const invokerCountLanePeakThroughput = (params) => {
101
+  countLanePeakThroughput(params).then(res => {
102
     if (res.code === 200 && res.data) {
102
     if (res.code === 200 && res.data) {
103
       channelCheckData.value = res.data || []
103
       channelCheckData.value = res.data || []
104
     }
104
     }
@@ -107,8 +107,8 @@ const invokerCountLanePeakThroughput = () => {
107
 }
107
 }
108
 
108
 
109
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
109
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
110
-const invokerCountSeizureInfoItem = () => {
111
-  countSeizureInfoItem(props.queryParams).then(res => {
110
+const invokerCountSeizureInfoItem = (params) => {
111
+  countSeizureInfoItem(params).then(res => {
112
     if (res.code === 200 && res.data) {
112
     if (res.code === 200 && res.data) {
113
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
113
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
114
     }
114
     }
@@ -116,8 +116,8 @@ const invokerCountSeizureInfoItem = () => {
116
 }
116
 }
117
 
117
 
118
 const countSeizeSubjectCategoryQuantityData = ref([])
118
 const countSeizeSubjectCategoryQuantityData = ref([])
119
-const invokerCountSeizeSubjectCategoryQuantity = () => {
120
-  countSeizeSubjectCategoryQuantity(props.queryParams).then(res => {
119
+const invokerCountSeizeSubjectCategoryQuantity = (params) => {
120
+  countSeizeSubjectCategoryQuantity(params).then(res => {
121
     if (res.code === 200 && res.data) {
121
     if (res.code === 200 && res.data) {
122
       countSeizeSubjectCategoryQuantityData.value = res.data || []
122
       countSeizeSubjectCategoryQuantityData.value = res.data || []
123
     }
123
     }
@@ -125,8 +125,8 @@ const invokerCountSeizeSubjectCategoryQuantity = () => {
125
 }
125
 }
126
 
126
 
127
 const countSeizureTotalQuantityData = ref([])
127
 const countSeizureTotalQuantityData = ref([])
128
-const invokerCountSeizureTotalQuantity = () => {
129
-  countSeizureTotalQuantity(props.queryParams).then(res => {
128
+const invokerCountSeizureTotalQuantity = (params) => {
129
+  countSeizureTotalQuantity(params).then(res => {
130
     if (res.code === 200 && res.data) {
130
     if (res.code === 200 && res.data) {
131
       countSeizureTotalQuantityData.value = res.data || []
131
       countSeizureTotalQuantityData.value = res.data || []
132
     }
132
     }
@@ -134,8 +134,8 @@ const invokerCountSeizureTotalQuantity = () => {
134
 }
134
 }
135
 
135
 
136
 const countSeizureSingleQuantityData = ref([])
136
 const countSeizureSingleQuantityData = ref([])
137
-const invokerCountSeizureSingleQuantity = () => {
138
-  countSeizureSingleQuantity(props.queryParams).then(res => {
137
+const invokerCountSeizureSingleQuantity = (params) => {
138
+  countSeizureSingleQuantity(params).then(res => {
139
     if (res.code === 200 && res.data) {
139
     if (res.code === 200 && res.data) {
140
       countSeizureSingleQuantityData.value = res.data || []
140
       countSeizureSingleQuantityData.value = res.data || []
141
     }
141
     }
@@ -143,8 +143,8 @@ const invokerCountSeizureSingleQuantity = () => {
143
 }
143
 }
144
 
144
 
145
 const countSeizeAreaQuantityData = ref([])
145
 const countSeizeAreaQuantityData = ref([])
146
-const invokerCountSeizeAreaQuantity = () => {
147
-  countSeizeAreaQuantity(props.queryParams).then(res => {
146
+const invokerCountSeizeAreaQuantity = (params) => {
147
+  countSeizeAreaQuantity(params).then(res => {
148
     if (res.code === 200 && res.data) {
148
     if (res.code === 200 && res.data) {
149
       countSeizeAreaQuantityData.value = res.data || []
149
       countSeizeAreaQuantityData.value = res.data || []
150
     }
150
     }
@@ -152,24 +152,24 @@ const invokerCountSeizeAreaQuantity = () => {
152
 }
152
 }
153
 
153
 
154
 const countSeizureStatsItemData = ref([])
154
 const countSeizureStatsItemData = ref([])
155
-const invokerCountSeizureStatsItem = () => {
156
-  countSeizureStatsItem(props.queryParams).then(res => {
155
+const invokerCountSeizureStatsItem = (params) => {
156
+  countSeizureStatsItem(params).then(res => {
157
     if (res.code === 200 && res.data) {
157
     if (res.code === 200 && res.data) {
158
       countSeizureStatsItemData.value = res.data || []
158
       countSeizureStatsItemData.value = res.data || []
159
     }
159
     }
160
   })
160
   })
161
 }
161
 }
162
 const countSeizureStatsTypeData = ref([])
162
 const countSeizureStatsTypeData = ref([])
163
-const invokerCountSeizureStatsType = () => {
164
-  countSeizureStatsType(props.queryParams).then(res => {
163
+const invokerCountSeizureStatsType = (params) => {
164
+  countSeizureStatsType(params).then(res => {
165
     if (res.code === 200 && res.data) {
165
     if (res.code === 200 && res.data) {
166
       countSeizureStatsTypeData.value = res.data || []
166
       countSeizureStatsTypeData.value = res.data || []
167
     }
167
     }
168
   })
168
   })
169
 }
169
 }
170
 const countSeizureStatsPostData = ref([])
170
 const countSeizureStatsPostData = ref([])
171
-const invokerCountSeizureStatsPost = () => {
172
-  countSeizureStatsPost(props.queryParams).then(res => {
171
+const invokerCountSeizureStatsPost = (params) => {
172
+  countSeizureStatsPost(params).then(res => {
173
     if (res.code === 200 && res.data) {
173
     if (res.code === 200 && res.data) {
174
       countSeizureStatsPostData.value = res.data || []
174
       countSeizureStatsPostData.value = res.data || []
175
     }
175
     }
@@ -177,8 +177,8 @@ const invokerCountSeizureStatsPost = () => {
177
 }
177
 }
178
 
178
 
179
 const securityTestItemClassificationData = ref([])
179
 const securityTestItemClassificationData = ref([])
180
-const invokerSecurityTestItemClassification = () => {
181
-  securityTestItemClassification(props.queryParams).then(res => {
180
+const invokerSecurityTestItemClassification = (params) => {
181
+  securityTestItemClassification(params).then(res => {
182
     if (res.code === 200 && res.data) {
182
     if (res.code === 200 && res.data) {
183
       securityTestItemClassificationData.value = res.data || []
183
       securityTestItemClassificationData.value = res.data || []
184
     }
184
     }
@@ -186,16 +186,16 @@ const invokerSecurityTestItemClassification = () => {
186
 }
186
 }
187
 
187
 
188
 const securityTestPassingStatusData = ref([])
188
 const securityTestPassingStatusData = ref([])
189
-const invokerSecurityTestPassingStatus = () => {
190
-  securityTestPassingStatus(props.queryParams).then(res => {
189
+const invokerSecurityTestPassingStatus = (params) => {
190
+  securityTestPassingStatus(params).then(res => {
191
     if (res.code === 200 && res.data) {
191
     if (res.code === 200 && res.data) {
192
       securityTestPassingStatusData.value = res.data || []
192
       securityTestPassingStatusData.value = res.data || []
193
     }
193
     }
194
   })
194
   })
195
 }
195
 }
196
 const securityTestRegionData = ref([])
196
 const securityTestRegionData = ref([])
197
-const invokerSecurityTestRegion = () => {
198
-  securityTestRegion(props.queryParams).then(res => {
197
+const invokerSecurityTestRegion = (params) => {
198
+  securityTestRegion(params).then(res => {
199
     if (res.code === 200 && res.data) {
199
     if (res.code === 200 && res.data) {
200
       securityTestRegionData.value = res.data || []
200
       securityTestRegionData.value = res.data || []
201
     }
201
     }
@@ -205,9 +205,9 @@ const invokerSecurityTestRegion = () => {
205
 
205
 
206
 
206
 
207
 const supervisionData = ref([])
207
 const supervisionData = ref([])
208
-const fetchSupervisionData = async () => {
208
+const fetchSupervisionData = async (params) => {
209
   try {
209
   try {
210
-    const res = await supervisionProblemPosition(props.queryParams)
210
+    const res = await supervisionProblemPosition(params)
211
     if (res.code === 200 && res.data) {
211
     if (res.code === 200 && res.data) {
212
       supervisionData.value = res.data.map(item => ({
212
       supervisionData.value = res.data.map(item => ({
213
         num: item.total,
213
         num: item.total,
@@ -219,10 +219,11 @@ const fetchSupervisionData = async () => {
219
   }
219
   }
220
 }
220
 }
221
 
221
 
222
+
222
 const interceptionData = ref([])
223
 const interceptionData = ref([])
223
-const fetchInterceptionData = async () => {
224
+const fetchInterceptionData = async (params) => {
224
   try {
225
   try {
225
-    const res = await realtimeInterceptionItem(props.queryParams)
226
+    const res = await realtimeInterceptionItem(params)
226
     if (res.code === 200 && res.data) {
227
     if (res.code === 200 && res.data) {
227
       interceptionData.value = res.data.map(item => ({
228
       interceptionData.value = res.data.map(item => ({
228
         num: item.total,
229
         num: item.total,
@@ -235,22 +236,26 @@ const fetchInterceptionData = async () => {
235
 }
236
 }
236
 
237
 
237
 const fetchData = () => {
238
 const fetchData = () => {
239
+  const params = { ...props.queryParams }
240
+  delete params.deptId
238
 
241
 
239
-  invokerCountLanePeakThroughput()
240
-  invokerCountSeizureInfoItem()
241
-  invokerCountSeizeSubjectCategoryQuantity()
242
-  invokerCountSeizureTotalQuantity()
243
-  invokerCountSeizureSingleQuantity()
244
-  invokerCountSeizeAreaQuantity()
245
-  invokerCountSeizureStatsItem()
246
-  invokerCountSeizureStatsType()
247
-  invokerCountSeizureStatsPost()
248
-  invokerSecurityTestItemClassification()
249
-  invokerSecurityTestPassingStatus()
250
-  invokerSecurityTestRegion()
251
-  fetchSupervisionData()
252
-  fetchInterceptionData()
242
+  invokerCountLanePeakThroughput(params)
243
+  invokerCountSeizureInfoItem(params)
244
+  invokerCountSeizeAreaQuantity(params)
245
+  invokerCountSeizeSubjectCategoryQuantity(params)
246
+  invokerCountSeizureTotalQuantity(params)
247
+  invokerCountSeizureSingleQuantity(params)
248
+  invokerCountSeizureAreaQuantity(params)
249
+  invokerCountSeizureStatsItem(params)
250
+  invokerCountSeizureStatsType(params)
251
+  invokerCountSeizureStatsPost(params)
252
+  invokerSecurityTestItemClassification(params)
253
+  invokerSecurityTestPassingStatus(params)
254
+  invokerSecurityTestRegion(params)
255
+  fetchSupervisionData(params)
256
+  fetchInterceptionData(params)
253
 }
257
 }
258
+
254
 watch(() => props.queryParams, () => {
259
 watch(() => props.queryParams, () => {
255
   fetchData()
260
   fetchData()
256
 }, { deep: true, immediate: true })
261
 }, { deep: true, immediate: true })

+ 10 - 22
src/views/portraitManagement/stationProfile/component/profile.vue

@@ -27,7 +27,7 @@ import { ref, watch } from 'vue'
27
 import ProfileMembers from '../../components/ProfileMembers.vue'
27
 import ProfileMembers from '../../components/ProfileMembers.vue'
28
 import ProfileBasicDistribution from '../../components/ProfileBasicDistribution.vue'
28
 import ProfileBasicDistribution from '../../components/ProfileBasicDistribution.vue'
29
 import ProfilePositionDistribution from '../../components/ProfilePositionDistribution.vue'
29
 import ProfilePositionDistribution from '../../components/ProfilePositionDistribution.vue'
30
-import { getDeptMembers, getDeptMemberDistribution, getDeptPositionDistribution } from '@/api/portraitManagement/portraitManagement'
30
+import { countStationTeamStats, getDeptMemberDistribution, getDeptPositionDistribution } from '@/api/portraitManagement/portraitManagement'
31
 
31
 
32
 
32
 
33
 
33
 
@@ -39,13 +39,13 @@ const props = defineProps({
39
 })
39
 })
40
 
40
 
41
 const teamColumns = [
41
 const teamColumns = [
42
-  { label: '部门', prop: 'dept' },
43
-  { label: '员工数量', prop: 'empCount' },
44
-  { label: '党员数量', prop: 'partyCount' },
42
+  { label: '部门', prop: 'deptName' },
43
+  { label: '员工数量', prop: 'employeeCount' },
44
+  { label: '党员数量', prop: 'partyMemberCount' },
45
   { label: '平均年龄', prop: 'avgAge' },
45
   { label: '平均年龄', prop: 'avgAge' },
46
   { label: '平均工龄', prop: 'avgWorkYears' },
46
   { label: '平均工龄', prop: 'avgWorkYears' },
47
-  { label: '职业资格等级证书数量', prop: 'certLevel' },
48
-  { label: '平均开机年龄', prop: 'avgUpgradeAge' },
47
+  { label: '职业资格等级证书数量', prop: 'qualificationLevel' },
48
+  { label: '平均开机年龄', prop: 'avgXrayOperatorYears' },
49
   { label: '综合得分', prop: 'totalScore' }
49
   { label: '综合得分', prop: 'totalScore' }
50
 ]
50
 ]
51
 
51
 
@@ -58,31 +58,19 @@ const nationData = ref([])
58
 const politicalData = ref([])
58
 const politicalData = ref([])
59
 
59
 
60
 const skillData = ref([
60
 const skillData = ref([
61
-  { name: '等级1', value: 3 },
62
-  { name: '等级2', value: 5 },
63
-  { name: '等级3', value: 7 },
64
-  { name: '等级4', value: 8 },
65
-  { name: '等级5', value: 4 }
61
+ 
66
 ])
62
 ])
67
 
63
 
68
 const operateData = ref([
64
 const operateData = ref([
69
-  { name: '0-3年', value: 4 },
70
-  { name: '4-7年', value: 2 },
71
-  { name: '8-11年', value: 3 },
72
-  { name: '12-15年', value: 5 },
73
-  { name: '15年以上', value: 8 }
65
+  
74
 ])
66
 ])
75
 
67
 
76
 const postData = ref([
68
 const postData = ref([
77
-  { name: '前传', value: 4 },
78
-  { name: '人身', value: 5 },
79
-  { name: '验证', value: 6 },
80
-  { name: '开包', value: 7 },
81
-  { name: '开机', value: 8 }
69
+  
82
 ])
70
 ])
83
 const fetchTeamData = async (params) => {
71
 const fetchTeamData = async (params) => {
84
   try {
72
   try {
85
-    const res = await getDeptMembers(params)
73
+    const res = await countStationTeamStats(params)
86
     if (res.code === 200 && res.data) {
74
     if (res.code === 200 && res.data) {
87
       teamData.value = res.data
75
       teamData.value = res.data
88
     }
76
     }

+ 106 - 129
src/views/portraitManagement/stationProfile/component/runData.vue

@@ -99,7 +99,7 @@ import {
99
   securityTestItemClassification,
99
   securityTestItemClassification,
100
   securityTestPassingStatus,
100
   securityTestPassingStatus,
101
   securityTestRegion,
101
   securityTestRegion,
102
-
102
+countStationHourlyThroughput
103
 } from '@/api/portraitManagement/portraitManagement'
103
 } from '@/api/portraitManagement/portraitManagement'
104
 
104
 
105
 const props = defineProps({
105
 const props = defineProps({
@@ -155,9 +155,19 @@ const seizedInfoData = [
155
 ]
155
 ]
156
 
156
 
157
 
157
 
158
+const channelCheckData = ref([])
159
+const invokerCountStationHourlyThroughput = (params) => {
160
+  countStationHourlyThroughput(params).then(res => {
161
+    if (res.code === 200 && res.data) {
162
+      channelCheckData.value = res.data || []
163
+      nextTick(() => initHourlyPassChart())
164
+    }
165
+  })
166
+}
167
+
158
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
168
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
159
-const invokerCountSeizureInfoItem = () => {
160
-  countSeizureInfoItem(props.queryParams).then(res => {
169
+const invokerCountSeizureInfoItem = (params) => {
170
+  countSeizureInfoItem(params).then(res => {
161
     if (res.code === 200 && res.data) {
171
     if (res.code === 200 && res.data) {
162
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
172
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
163
     }
173
     }
@@ -165,8 +175,8 @@ const invokerCountSeizureInfoItem = () => {
165
 }
175
 }
166
 
176
 
167
 const countSeizeSubjectCategoryQuantityData = ref([])
177
 const countSeizeSubjectCategoryQuantityData = ref([])
168
-const invokerCountSeizeSubjectCategoryQuantity = () => {
169
-  countSeizeSubjectCategoryQuantity(props.queryParams).then(res => {
178
+const invokerCountSeizeSubjectCategoryQuantity = (params) => {
179
+  countSeizeSubjectCategoryQuantity(params).then(res => {
170
     if (res.code === 200 && res.data) {
180
     if (res.code === 200 && res.data) {
171
       countSeizeSubjectCategoryQuantityData.value = res.data || []
181
       countSeizeSubjectCategoryQuantityData.value = res.data || []
172
     }
182
     }
@@ -174,8 +184,8 @@ const invokerCountSeizeSubjectCategoryQuantity = () => {
174
 }
184
 }
175
 
185
 
176
 const countSeizureTotalQuantityData = ref([])
186
 const countSeizureTotalQuantityData = ref([])
177
-const invokerCountSeizureTotalQuantity = () => {
178
-  countSeizureTotalQuantity(props.queryParams).then(res => {
187
+const invokerCountSeizureTotalQuantity = (params) => {
188
+  countSeizureTotalQuantity(params).then(res => {
179
     if (res.code === 200 && res.data) {
189
     if (res.code === 200 && res.data) {
180
       countSeizureTotalQuantityData.value = res.data || []
190
       countSeizureTotalQuantityData.value = res.data || []
181
     }
191
     }
@@ -183,8 +193,8 @@ const invokerCountSeizureTotalQuantity = () => {
183
 }
193
 }
184
 
194
 
185
 const countSeizureSingleQuantityData = ref([])
195
 const countSeizureSingleQuantityData = ref([])
186
-const invokerCountSeizureSingleQuantity = () => {
187
-  countSeizureSingleQuantity(props.queryParams).then(res => {
196
+const invokerCountSeizureSingleQuantity = (params) => {
197
+  countSeizureSingleQuantity(params).then(res => {
188
     if (res.code === 200 && res.data) {
198
     if (res.code === 200 && res.data) {
189
       countSeizureSingleQuantityData.value = res.data || []
199
       countSeizureSingleQuantityData.value = res.data || []
190
     }
200
     }
@@ -192,8 +202,8 @@ const invokerCountSeizureSingleQuantity = () => {
192
 }
202
 }
193
 
203
 
194
 const countSeizeAreaQuantityData = ref([])
204
 const countSeizeAreaQuantityData = ref([])
195
-const invokerCountSeizeAreaQuantity = () => {
196
-  countSeizeAreaQuantity(props.queryParams).then(res => {
205
+const invokerCountSeizeAreaQuantity = (params) => {
206
+  countSeizeAreaQuantity(params).then(res => {
197
     if (res.code === 200 && res.data) {
207
     if (res.code === 200 && res.data) {
198
       countSeizeAreaQuantityData.value = res.data || []
208
       countSeizeAreaQuantityData.value = res.data || []
199
     }
209
     }
@@ -201,24 +211,24 @@ const invokerCountSeizeAreaQuantity = () => {
201
 }
211
 }
202
 
212
 
203
 const countSeizureStatsItemData = ref([])
213
 const countSeizureStatsItemData = ref([])
204
-const invokerCountSeizureStatsItem = () => {
205
-  countSeizureStatsItem(props.queryParams).then(res => {
214
+const invokerCountSeizureStatsItem = (params) => {
215
+  countSeizureStatsItem(params).then(res => {
206
     if (res.code === 200 && res.data) {
216
     if (res.code === 200 && res.data) {
207
       countSeizureStatsItemData.value = res.data || []
217
       countSeizureStatsItemData.value = res.data || []
208
     }
218
     }
209
   })
219
   })
210
 }
220
 }
211
 const countSeizureStatsTypeData = ref([])
221
 const countSeizureStatsTypeData = ref([])
212
-const invokerCountSeizureStatsType = () => {
213
-  countSeizureStatsType(props.queryParams).then(res => {
222
+const invokerCountSeizureStatsType = (params) => {
223
+  countSeizureStatsType(params).then(res => {
214
     if (res.code === 200 && res.data) {
224
     if (res.code === 200 && res.data) {
215
       countSeizureStatsTypeData.value = res.data || []
225
       countSeizureStatsTypeData.value = res.data || []
216
     }
226
     }
217
   })
227
   })
218
 }
228
 }
219
 const countSeizureStatsPostData = ref([])
229
 const countSeizureStatsPostData = ref([])
220
-const invokerCountSeizureStatsPost = () => {
221
-  countSeizureStatsPost(props.queryParams).then(res => {
230
+const invokerCountSeizureStatsPost = (params) => {
231
+  countSeizureStatsPost(params).then(res => {
222
     if (res.code === 200 && res.data) {
232
     if (res.code === 200 && res.data) {
223
       countSeizureStatsPostData.value = res.data || []
233
       countSeizureStatsPostData.value = res.data || []
224
     }
234
     }
@@ -226,8 +236,8 @@ const invokerCountSeizureStatsPost = () => {
226
 }
236
 }
227
 
237
 
228
 const securityTestItemClassificationData = ref([])
238
 const securityTestItemClassificationData = ref([])
229
-const invokerSecurityTestItemClassification = () => {
230
-  securityTestItemClassification(props.queryParams).then(res => {
239
+const invokerSecurityTestItemClassification = (params) => {
240
+  securityTestItemClassification(params).then(res => {
231
     if (res.code === 200 && res.data) {
241
     if (res.code === 200 && res.data) {
232
       securityTestItemClassificationData.value = res.data || []
242
       securityTestItemClassificationData.value = res.data || []
233
     }
243
     }
@@ -235,16 +245,16 @@ const invokerSecurityTestItemClassification = () => {
235
 }
245
 }
236
 
246
 
237
 const securityTestPassingStatusData = ref([])
247
 const securityTestPassingStatusData = ref([])
238
-const invokerSecurityTestPassingStatus = () => {
239
-    securityTestPassingStatus(props.queryParams).then(res => {
248
+const invokerSecurityTestPassingStatus = (params) => {
249
+  securityTestPassingStatus(params).then(res => {
240
     if (res.code === 200 && res.data) {
250
     if (res.code === 200 && res.data) {
241
       securityTestPassingStatusData.value = res.data || []
251
       securityTestPassingStatusData.value = res.data || []
242
     }
252
     }
243
   })
253
   })
244
 }
254
 }
245
 const securityTestRegionData = ref([])
255
 const securityTestRegionData = ref([])
246
-const invokerSecurityTestRegion = () => {
247
-    securityTestRegion(props.queryParams).then(res => {
256
+const invokerSecurityTestRegion = (params) => {
257
+  securityTestRegion(params).then(res => {
248
     if (res.code === 200 && res.data) {
258
     if (res.code === 200 && res.data) {
249
       securityTestRegionData.value = res.data || []
259
       securityTestRegionData.value = res.data || []
250
     }
260
     }
@@ -254,70 +264,33 @@ const invokerSecurityTestRegion = () => {
254
 
264
 
255
 
265
 
256
 const fetchData = () => {
266
 const fetchData = () => {
257
-  invokerCountSeizureInfoItem()
258
-  invokerCountSeizeSubjectCategoryQuantity()
259
-  invokerCountSeizureTotalQuantity()
260
-  invokerCountSeizureSingleQuantity()
261
-  invokerCountSeizeAreaQuantity()
262
-  invokerCountSeizureStatsItem()
263
-  invokerCountSeizureStatsType()
264
-  invokerCountSeizureStatsPost()
265
-  invokerSecurityTestItemClassification()
266
-  invokerSecurityTestPassingStatus()
267
-  invokerSecurityTestRegion()
267
+  const params = {}
268
+  Object.keys(props.queryParams).forEach(key => {
269
+    const val = props.queryParams[key]
270
+    if (val !== null && val !== undefined && val !== '') {
271
+      params[key] = val
272
+    }
273
+  })
274
+
275
+  invokerCountStationHourlyThroughput(params)
276
+  invokerCountSeizureInfoItem(params)
277
+  invokerCountSeizeSubjectCategoryQuantity(params)
278
+  invokerCountSeizureTotalQuantity(params)
279
+  invokerCountSeizureSingleQuantity(params)
280
+  invokerCountSeizeAreaQuantity(params)
281
+  invokerCountSeizureStatsItem(params)
282
+  invokerCountSeizureStatsType(params)
283
+  invokerCountSeizureStatsPost(params)
284
+  invokerSecurityTestItemClassification(params)
285
+  invokerSecurityTestPassingStatus(params)
286
+  invokerSecurityTestRegion(params)
268
 }
287
 }
269
 
288
 
270
 watch(() => props.queryParams, () => {
289
 watch(() => props.queryParams, () => {
271
-
272
   fetchData()
290
   fetchData()
273
 }, { deep: true, immediate: true })
291
 }, { deep: true, immediate: true })
274
 
292
 
275
-const seizedNumAllData = [
276
-  { num: 150 }, { num: 160 }, { num: 145 }, { num: 180 }, { num: 170 },
277
-  { num: 190 }, { num: 155 }, { num: 140 }, { num: 165 }, { num: 185 },
278
-  { num: 175 }, { num: 200 }, { num: 180 }, { num: 195 }, { num: 170 },
279
-  { num: 160 }, { num: 185 }, { num: 175 }, { num: 190 }
280
-]
281
 
293
 
282
-const workAreaDistData = [
283
-  { num: 287, name: 'T3国内出发(4层)' },
284
-  { num: 250, name: 'T3(8层出发)' },
285
-  { num: 300, name: 'T3国际出发' },
286
-  { num: 290, name: 'T3国际转国内' },
287
-  { num: 240, name: '旅检A区' },
288
-  { num: 250, name: 'T3要客服务区东' },
289
-  { num: 260, name: 'T3要客服务区西' },
290
-  { num: 255, name: 'T1要客服务区东' },
291
-  { num: 245, name: 'T2要客服务区东' },
292
-  { num: 260, name: '旅检B区' },
293
-  { num: 280, name: '重检C区' }
294
-]
295
-
296
-const unsafeItemDistData = [
297
-  { num: 66, name: '打火机' },
298
-  { num: 174, name: '火柴' },
299
-  { num: 65, name: '其他' },
300
-  { num: 106, name: '危险物品' },
301
-  { num: 173, name: '危险品' },
302
-  { num: 48, name: '其他/危险品' }
303
-]
304
-
305
-const unsafeTypeDistData = [
306
-  { num: 6, name: '一般' },
307
-  { num: 6, name: '二级' },
308
-  { num: 174, name: '三级' },
309
-  { num: 48, name: '四级' },
310
-  { num: 454, name: '五级' }
311
-]
312
-
313
-const unsafePostDistData = [
314
-  { num: 100, name: '境外/非通道' },
315
-  { num: 213, name: '值机柜台' },
316
-  { num: 150, name: '验证/通道' },
317
-  { num: 300, name: '人身检查' },
318
-  { num: 187, name: 'X光/行李/开检' },
319
-  { num: 387, name: '开箱/货检' }
320
-]
321
 
294
 
322
 
295
 
323
 
296
 
@@ -331,11 +304,53 @@ let dailySeizedArea = null
331
 const initHourlyPassChart = () => {
304
 const initHourlyPassChart = () => {
332
   if (!hourlyPassChartRef.value) return
305
   if (!hourlyPassChartRef.value) return
333
   hourlyPassChart = echarts.init(hourlyPassChartRef.value)
306
   hourlyPassChart = echarts.init(hourlyPassChartRef.value)
334
-  const hours = Array.from({ length: 24 }, (_, i) => `${i.toString().padStart(2, '0')}:00`)
335
-  const data1 = [450, 420, 380, 390, 410, 430, 460, 480, 520, 560, 600, 620, 650, 680, 700, 680, 650, 620, 580, 540, 500, 480, 450, 420]
336
-  const data2 = [320, 310, 290, 300, 310, 330, 350, 370, 400, 430, 460, 480, 500, 520, 530, 510, 490, 470, 440, 410, 380, 360, 340, 320]
337
-  const data3 = [250, 240, 220, 230, 240, 260, 280, 300, 330, 360, 390, 410, 430, 450, 460, 440, 420, 400, 370, 340, 310, 290, 270, 250]
338
-  const lineData = [5.2, 4.8, 4.5, 4.7, 5.0, 5.3, 5.6, 5.8, 6.2, 6.5, 6.8, 7.0, 7.2, 7.5, 7.3, 7.1, 6.8, 6.5, 6.2, 5.8, 5.5, 5.2, 5.0, 4.8]
307
+
308
+  const rawData = channelCheckData.value
309
+  if (!rawData || rawData.length === 0) return
310
+
311
+  const hours = rawData.map(item => item.hour)
312
+
313
+  const areaNameMap = {}
314
+  rawData.forEach(item => {
315
+    item.areaList.forEach(area => {
316
+      if (!areaNameMap[area.areaName]) {
317
+        areaNameMap[area.areaName] = []
318
+      }
319
+      areaNameMap[area.areaName].push(area.areaFlow)
320
+    })
321
+  })
322
+
323
+  const legendList = Object.keys(areaNameMap)
324
+  const areaNames = legendList
325
+
326
+  const seriesBars = areaNames.map((areaName, idx) => {
327
+    const colors = [
328
+      ['#4da6ff', '#0f46fa'],
329
+      ['#7eff7e', '#2ecc71'],
330
+      ['#bd03fb', '#8a06e8'],
331
+      ['#ffa500', '#ff6600'],
332
+      ['#00bfff', '#0077be']
333
+    ]
334
+    const [c1, c2] = colors[idx % colors.length]
335
+    return {
336
+      name: areaName,
337
+      type: 'bar',
338
+      yAxisIndex: 0,
339
+      data: areaNameMap[areaName],
340
+      itemStyle: {
341
+        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
342
+          { offset: 0, color: c1 },
343
+          { offset: 1, color: c2 }
344
+        ])
345
+      },
346
+      barWidth: '20%'
347
+    }
348
+  })
349
+
350
+  const lineData = rawData.map(item => item.totalHourFlow)
351
+  const maxBar = Math.max(...Object.values(areaNameMap).flat())
352
+  const maxLine = Math.max(...lineData)
353
+  const maxVal = Math.max(maxBar, maxLine)
339
 
354
 
340
   const option = {
355
   const option = {
341
     tooltip: {
356
     tooltip: {
@@ -345,7 +360,7 @@ const initHourlyPassChart = () => {
345
       textStyle: { color: '#fff' }
360
       textStyle: { color: '#fff' }
346
     },
361
     },
347
     legend: {
362
     legend: {
348
-      data: ['T3国内出发(4层)', 'T3(8层出发)', 'T3国际出发', '人数均值'],
363
+      data: [...legendList, '人流总数'],
349
       textStyle: { color: '#a0c4ff' },
364
       textStyle: { color: '#a0c4ff' },
350
       top: 0
365
       top: 0
351
     },
366
     },
@@ -366,63 +381,25 @@ const initHourlyPassChart = () => {
366
         type: 'value',
381
         type: 'value',
367
         name: '人数',
382
         name: '人数',
368
         position: 'left',
383
         position: 'left',
369
-        max: 800,
384
+        max: Math.ceil(maxVal * 1.2),
370
         axisLabel: { color: '#a0c4ff' },
385
         axisLabel: { color: '#a0c4ff' },
371
         axisLine: { lineStyle: { color: 'rgba(15,70,250,0.3)' } },
386
         axisLine: { lineStyle: { color: 'rgba(15,70,250,0.3)' } },
372
         splitLine: { lineStyle: { color: 'rgba(15,70,250,0.2)' } }
387
         splitLine: { lineStyle: { color: 'rgba(15,70,250,0.2)' } }
373
       },
388
       },
374
       {
389
       {
375
         type: 'value',
390
         type: 'value',
376
-        name: '均值',
391
+        name: '人流总数',
377
         position: 'right',
392
         position: 'right',
378
-        max: 10,
393
+        max: Math.ceil(maxVal * 1.2),
379
         axisLabel: { color: '#a0c4ff' },
394
         axisLabel: { color: '#a0c4ff' },
380
         axisLine: { lineStyle: { color: 'rgba(15,70,250,0.3)' } },
395
         axisLine: { lineStyle: { color: 'rgba(15,70,250,0.3)' } },
381
         splitLine: { show: false }
396
         splitLine: { show: false }
382
       }
397
       }
383
     ],
398
     ],
384
     series: [
399
     series: [
400
+      ...seriesBars,
385
       {
401
       {
386
-        name: 'T3国内出发(4层)',
387
-        type: 'bar',
388
-        yAxisIndex: 0,
389
-        data: data1,
390
-        itemStyle: {
391
-          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
392
-            { offset: 0, color: '#4da6ff' },
393
-            { offset: 1, color: '#0f46fa' }
394
-          ])
395
-        },
396
-        barWidth: '20%'
397
-      },
398
-      {
399
-        name: 'T3(8层出发)',
400
-        type: 'bar',
401
-        yAxisIndex: 0,
402
-        data: data2,
403
-        itemStyle: {
404
-          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
405
-            { offset: 0, color: '#7eff7e' },
406
-            { offset: 1, color: '#2ecc71' }
407
-          ])
408
-        },
409
-        barWidth: '20%'
410
-      },
411
-      {
412
-        name: 'T3国际出发',
413
-        type: 'bar',
414
-        yAxisIndex: 0,
415
-        data: data3,
416
-        itemStyle: {
417
-          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
418
-            { offset: 0, color: '#bd03fb' },
419
-            { offset: 1, color: '#8a06e8' }
420
-          ])
421
-        },
422
-        barWidth: '20%'
423
-      },
424
-      {
425
-        name: '人数均值',
402
+        name: '人流总数',
426
         type: 'line',
403
         type: 'line',
427
         yAxisIndex: 1,
404
         yAxisIndex: 1,
428
         data: lineData,
405
         data: lineData,

+ 45 - 43
src/views/portraitManagement/teamProfile/component/runData.vue

@@ -98,18 +98,17 @@ const props = defineProps({
98
 
98
 
99
 
99
 
100
 const channelCheckData = ref([])
100
 const channelCheckData = ref([])
101
-const invokerCountLanePeakThroughput = () => {
102
-  countLanePeakThroughput(props.queryParams).then(res => {
101
+const invokerCountLanePeakThroughput = (params) => {
102
+  countLanePeakThroughput(params).then(res => {
103
     if (res.code === 200 && res.data) {
103
     if (res.code === 200 && res.data) {
104
       channelCheckData.value = res.data || []
104
       channelCheckData.value = res.data || []
105
     }
105
     }
106
-    
107
   })
106
   })
108
 }
107
 }
109
 
108
 
110
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
109
 const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
111
-const invokerCountSeizureInfoItem = () => {
112
-  countSeizureInfoItem(props.queryParams).then(res => {
110
+const invokerCountSeizureInfoItem = (params) => {
111
+  countSeizureInfoItem(params).then(res => {
113
     if (res.code === 200 && res.data) {
112
     if (res.code === 200 && res.data) {
114
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
113
       countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
115
     }
114
     }
@@ -117,8 +116,8 @@ const invokerCountSeizureInfoItem = () => {
117
 }
116
 }
118
 
117
 
119
 const countSeizeSubjectCategoryQuantityData = ref([])
118
 const countSeizeSubjectCategoryQuantityData = ref([])
120
-const invokerCountSeizeSubjectCategoryQuantity = () => {
121
-  countSeizeSubjectCategoryQuantity(props.queryParams).then(res => {
119
+const invokerCountSeizeSubjectCategoryQuantity = (params) => {
120
+  countSeizeSubjectCategoryQuantity(params).then(res => {
122
     if (res.code === 200 && res.data) {
121
     if (res.code === 200 && res.data) {
123
       countSeizeSubjectCategoryQuantityData.value = res.data || []
122
       countSeizeSubjectCategoryQuantityData.value = res.data || []
124
     }
123
     }
@@ -126,8 +125,8 @@ const invokerCountSeizeSubjectCategoryQuantity = () => {
126
 }
125
 }
127
 
126
 
128
 const countSeizureTotalQuantityData = ref([])
127
 const countSeizureTotalQuantityData = ref([])
129
-const invokerCountSeizureTotalQuantity = () => {
130
-  countSeizureTotalQuantity(props.queryParams).then(res => {
128
+const invokerCountSeizureTotalQuantity = (params) => {
129
+  countSeizureTotalQuantity(params).then(res => {
131
     if (res.code === 200 && res.data) {
130
     if (res.code === 200 && res.data) {
132
       countSeizureTotalQuantityData.value = res.data || []
131
       countSeizureTotalQuantityData.value = res.data || []
133
     }
132
     }
@@ -135,8 +134,8 @@ const invokerCountSeizureTotalQuantity = () => {
135
 }
134
 }
136
 
135
 
137
 const countSeizureSingleQuantityData = ref([])
136
 const countSeizureSingleQuantityData = ref([])
138
-const invokerCountSeizureSingleQuantity = () => {
139
-  countSeizureSingleQuantity(props.queryParams).then(res => {
137
+const invokerCountSeizureSingleQuantity = (params) => {
138
+  countSeizureSingleQuantity(params).then(res => {
140
     if (res.code === 200 && res.data) {
139
     if (res.code === 200 && res.data) {
141
       countSeizureSingleQuantityData.value = res.data || []
140
       countSeizureSingleQuantityData.value = res.data || []
142
     }
141
     }
@@ -144,8 +143,8 @@ const invokerCountSeizureSingleQuantity = () => {
144
 }
143
 }
145
 
144
 
146
 const countSeizeAreaQuantityData = ref([])
145
 const countSeizeAreaQuantityData = ref([])
147
-const invokerCountSeizeAreaQuantity = () => {
148
-  countSeizeAreaQuantity(props.queryParams).then(res => {
146
+const invokerCountSeizeAreaQuantity = (params) => {
147
+  countSeizeAreaQuantity(params).then(res => {
149
     if (res.code === 200 && res.data) {
148
     if (res.code === 200 && res.data) {
150
       countSeizeAreaQuantityData.value = res.data || []
149
       countSeizeAreaQuantityData.value = res.data || []
151
     }
150
     }
@@ -153,24 +152,24 @@ const invokerCountSeizeAreaQuantity = () => {
153
 }
152
 }
154
 
153
 
155
 const countSeizureStatsItemData = ref([])
154
 const countSeizureStatsItemData = ref([])
156
-const invokerCountSeizureStatsItem = () => {
157
-  countSeizureStatsItem(props.queryParams).then(res => {
155
+const invokerCountSeizureStatsItem = (params) => {
156
+  countSeizureStatsItem(params).then(res => {
158
     if (res.code === 200 && res.data) {
157
     if (res.code === 200 && res.data) {
159
       countSeizureStatsItemData.value = res.data || []
158
       countSeizureStatsItemData.value = res.data || []
160
     }
159
     }
161
   })
160
   })
162
 }
161
 }
163
 const countSeizureStatsTypeData = ref([])
162
 const countSeizureStatsTypeData = ref([])
164
-const invokerCountSeizureStatsType = () => {
165
-  countSeizureStatsType(props.queryParams).then(res => {
163
+const invokerCountSeizureStatsType = (params) => {
164
+  countSeizureStatsType(params).then(res => {
166
     if (res.code === 200 && res.data) {
165
     if (res.code === 200 && res.data) {
167
       countSeizureStatsTypeData.value = res.data || []
166
       countSeizureStatsTypeData.value = res.data || []
168
     }
167
     }
169
   })
168
   })
170
 }
169
 }
171
 const countSeizureStatsPostData = ref([])
170
 const countSeizureStatsPostData = ref([])
172
-const invokerCountSeizureStatsPost = () => {
173
-  countSeizureStatsPost(props.queryParams).then(res => {
171
+const invokerCountSeizureStatsPost = (params) => {
172
+  countSeizureStatsPost(params).then(res => {
174
     if (res.code === 200 && res.data) {
173
     if (res.code === 200 && res.data) {
175
       countSeizureStatsPostData.value = res.data || []
174
       countSeizureStatsPostData.value = res.data || []
176
     }
175
     }
@@ -178,8 +177,8 @@ const invokerCountSeizureStatsPost = () => {
178
 }
177
 }
179
 
178
 
180
 const securityTestItemClassificationData = ref([])
179
 const securityTestItemClassificationData = ref([])
181
-const invokerSecurityTestItemClassification = () => {
182
-  securityTestItemClassification(props.queryParams).then(res => {
180
+const invokerSecurityTestItemClassification = (params) => {
181
+  securityTestItemClassification(params).then(res => {
183
     if (res.code === 200 && res.data) {
182
     if (res.code === 200 && res.data) {
184
       securityTestItemClassificationData.value = res.data || []
183
       securityTestItemClassificationData.value = res.data || []
185
     }
184
     }
@@ -187,16 +186,16 @@ const invokerSecurityTestItemClassification = () => {
187
 }
186
 }
188
 
187
 
189
 const securityTestPassingStatusData = ref([])
188
 const securityTestPassingStatusData = ref([])
190
-const invokerSecurityTestPassingStatus = () => {
191
-  securityTestPassingStatus(props.queryParams).then(res => {
189
+const invokerSecurityTestPassingStatus = (params) => {
190
+  securityTestPassingStatus(params).then(res => {
192
     if (res.code === 200 && res.data) {
191
     if (res.code === 200 && res.data) {
193
       securityTestPassingStatusData.value = res.data || []
192
       securityTestPassingStatusData.value = res.data || []
194
     }
193
     }
195
   })
194
   })
196
 }
195
 }
197
 const securityTestRegionData = ref([])
196
 const securityTestRegionData = ref([])
198
-const invokerSecurityTestRegion = () => {
199
-  securityTestRegion(props.queryParams).then(res => {
197
+const invokerSecurityTestRegion = (params) => {
198
+  securityTestRegion(params).then(res => {
200
     if (res.code === 200 && res.data) {
199
     if (res.code === 200 && res.data) {
201
       securityTestRegionData.value = res.data || []
200
       securityTestRegionData.value = res.data || []
202
     }
201
     }
@@ -206,9 +205,9 @@ const invokerSecurityTestRegion = () => {
206
 
205
 
207
 
206
 
208
 const supervisionData = ref([])
207
 const supervisionData = ref([])
209
-const fetchSupervisionData = async () => {
208
+const fetchSupervisionData = async (params) => {
210
   try {
209
   try {
211
-    const res = await supervisionProblemPosition(props.queryParams)
210
+    const res = await supervisionProblemPosition(params)
212
     if (res.code === 200 && res.data) {
211
     if (res.code === 200 && res.data) {
213
       supervisionData.value = res.data.map(item => ({
212
       supervisionData.value = res.data.map(item => ({
214
         num: item.total,
213
         num: item.total,
@@ -221,9 +220,9 @@ const fetchSupervisionData = async () => {
221
 }
220
 }
222
 
221
 
223
 const interceptionData = ref([])
222
 const interceptionData = ref([])
224
-const fetchInterceptionData = async () => {
223
+const fetchInterceptionData = async (params) => {
225
   try {
224
   try {
226
-    const res = await realtimeInterceptionItem(props.queryParams)
225
+    const res = await realtimeInterceptionItem(params)
227
     if (res.code === 200 && res.data) {
226
     if (res.code === 200 && res.data) {
228
       interceptionData.value = res.data.map(item => ({
227
       interceptionData.value = res.data.map(item => ({
229
         num: item.total,
228
         num: item.total,
@@ -236,22 +235,25 @@ const fetchInterceptionData = async () => {
236
 }
235
 }
237
 
236
 
238
 const fetchData = () => {
237
 const fetchData = () => {
238
+  const params = { ...props.queryParams }
239
+  delete params.deptId
239
 
240
 
240
-  invokerCountLanePeakThroughput()
241
-  invokerCountSeizureInfoItem()
242
-  invokerCountSeizeSubjectCategoryQuantity()
243
-  invokerCountSeizureTotalQuantity()
244
-  invokerCountSeizureSingleQuantity()
245
-  invokerCountSeizeAreaQuantity()
246
-  invokerCountSeizureStatsItem()
247
-  invokerCountSeizureStatsType()
248
-  invokerCountSeizureStatsPost()
249
-  invokerSecurityTestItemClassification()
250
-  invokerSecurityTestPassingStatus()
251
-  invokerSecurityTestRegion()
252
-  fetchSupervisionData()
253
-  fetchInterceptionData()
241
+  invokerCountLanePeakThroughput(params)
242
+  invokerCountSeizureInfoItem(params)
243
+  invokerCountSeizeSubjectCategoryQuantity(params)
244
+  invokerCountSeizureTotalQuantity(params)
245
+  invokerCountSeizureSingleQuantity(params)
246
+  invokerCountSeizureAreaQuantity(params)
247
+  invokerCountSeizureStatsItem(params)
248
+  invokerCountSeizureStatsType(params)
249
+  invokerCountSeizureStatsPost(params)
250
+  invokerSecurityTestItemClassification(params)
251
+  invokerSecurityTestPassingStatus(params)
252
+  invokerSecurityTestRegion(params)
253
+  fetchSupervisionData(params)
254
+  fetchInterceptionData(params)
254
 }
255
 }
256
+
255
 watch(() => props.queryParams, () => {
257
 watch(() => props.queryParams, () => {
256
   fetchData()
258
   fetchData()
257
 }, { deep: true, immediate: true })
259
 }, { deep: true, immediate: true })