4 Commits 9219cb82bc ... f4b85e27c6

Autor SHA1 Nachricht Datum
  huoyi f4b85e27c6 feature vor 2 Tagen
  huoyi 2767acc23c feat(organProfile): 新增机构画像页面及多样化统计图表展示 vor 2 Tagen
  huoyi 09c6d89b38 feature vor 5 Tagen
  huoyi 5b71aa092f fix清理缓存 vor 6 Tagen

+ 6 - 0
src/pages.json

@@ -130,6 +130,12 @@
130 130
       }
131 131
     },
132 132
     {
133
+      "path": "pages/organProfile/index",
134
+      "style": {
135
+        "navigationBarTitleText": "组织全景看板"
136
+      }
137
+    },
138
+    {
133 139
       "path": "pages/stationProfile/index",
134 140
       "style": {
135 141
         "navigationBarTitleText": "站画像"

+ 26 - 4
src/pages/employeeProfile/index.vue

@@ -33,11 +33,11 @@
33 33
             </view>
34 34
 
35 35
             <view class="search-selector">
36
-                <view class="search-select-trigger" :class="{ 'search-select-trigger-disabled': isSecurityCheck }"
37
-                    @click="!isSecurityCheck && (showEmployeePicker = true)">
36
+                <view class="search-select-trigger" :class="{ 'search-select-trigger-disabled': isSecurityCheck || routeUserId }"
37
+                    @click="!isSecurityCheck && !routeUserId && (showEmployeePicker = true)">
38 38
                     <u-icon name="list" color="#A78BFA" size="16"></u-icon>
39 39
                     <text class="search-name-text">{{ selectedEmployeeName || '请选择员工' }}</text>
40
-                    <u-icon v-if="!isSecurityCheck" name="arrow-down" color="#A78BFA" size="14"></u-icon>
40
+                    <u-icon v-if="!isSecurityCheck && !routeUserId" name="arrow-down" color="#A78BFA" size="14"></u-icon>
41 41
                 </view>
42 42
             </view>
43 43
 
@@ -379,6 +379,9 @@ export default {
379 379
             expandedDeptIds: [],
380 380
             isSecurityCheck: false,
381 381
             userInfo: null,
382
+            // 路由跳转参数
383
+            routeUserId: null,
384
+            routeUserName: '',
382 385
             // 雷达图tooltip相关
383 386
             activeDimName: null,
384 387
             radarTooltipPosition: { x: 0, y: 0 },
@@ -463,6 +466,13 @@ export default {
463 466
             return s.toFixed(2)
464 467
         }
465 468
     },
469
+    // uni-app 页面生命周期:接收路由参数
470
+    onLoad(options) {
471
+        if (options.userId) {
472
+            this.routeUserId = options.userId
473
+            this.routeUserName = decodeURIComponent(options.userName || '')
474
+        }
475
+    },
466 476
     mounted() {
467 477
         this.updateTime()
468 478
         this.timer = setInterval(() => {
@@ -470,7 +480,19 @@ export default {
470 480
         }, 1000)
471 481
         // 默认计算时间范围(近一年)
472 482
         this.onTimeTagClick(this.selectedTimeTag)
473
-        this.fetchEmployeeList()
483
+
484
+        if (this.routeUserId) {
485
+            // 来自组织架构跳转,直接加载指定人员
486
+            this.selectedEmployeeId = this.routeUserId
487
+            this.selectedEmployeeName = this.routeUserName
488
+            this.searchKeyword = this.routeUserName
489
+            this.employeeLoading = false
490
+            this.$nextTick(() => {
491
+                this.fetchEmployeePortrait()
492
+            })
493
+        } else {
494
+            this.fetchEmployeeList()
495
+        }
474 496
     },
475 497
     beforeDestroy() {
476 498
         if (this.timer) {

+ 53 - 1
src/pages/mine/setting/index.vue

@@ -31,6 +31,8 @@
31 31
 </template>
32 32
 
33 33
 <script>
34
+  import storage from '@/utils/storage'
35
+
34 36
   export default {
35 37
     data() {
36 38
       return {
@@ -45,7 +47,57 @@
45 47
         this.$modal.showToast('模块建设中~')
46 48
       },
47 49
       handleCleanTmp() {
48
-        this.$modal.showToast('模块建设中~')
50
+        this.$modal.confirm('确定要清理缓存吗?').then(() => {
51
+          // 1. 清除用户缓存数据(storage_data)
52
+          storage.clean()
53
+
54
+          // 2. 清除字典缓存
55
+          this.$store.dispatch('dict/cleanDict')
56
+
57
+          // 3. 清除eikon统计数据
58
+          this.$store.dispatch('eikonLevel/resetLevel')
59
+
60
+          // 4. 清除已保存的临时文件
61
+          uni.getSavedFileList({
62
+            success: (res) => {
63
+              if (res.fileList && res.fileList.length > 0) {
64
+                res.fileList.forEach(file => {
65
+                  uni.removeSavedFile({ filePath: file.filePath })
66
+                })
67
+              }
68
+            }
69
+          })
70
+
71
+          // 5. 清除所有本地存储(包括 token),确保旧样式缓存失效
72
+          uni.clearStorageSync()
73
+
74
+          // 6. 根据平台清除资源缓存
75
+          const platform = uni.getSystemInfoSync().uniPlatform
76
+          if (platform === 'app') {
77
+            // App 端:清除 Webview 缓存
78
+            plus.cache.clear(() => {
79
+              console.log('App webview cache cleared')
80
+            })
81
+          } else {
82
+            // H5 端:清除浏览器 Cache API(service worker 缓存的 CSS/JS)
83
+            if (window.caches) {
84
+              caches.keys().then(names => {
85
+                names.forEach(name => caches.delete(name))
86
+              })
87
+            }
88
+          }
89
+
90
+          this.$modal.msgSuccess('缓存清理完成,即将重启')
91
+
92
+          // 7. 重启/刷新,强制加载最新资源
93
+          setTimeout(() => {
94
+            if (platform === 'app') {
95
+              plus.runtime.restart()
96
+            } else {
97
+              window.location.reload()
98
+            }
99
+          }, 1500)
100
+        })
49 101
       },
50 102
       handleLogout() {
51 103
         this.$modal.confirm('确定注销并退出系统吗?').then(() => {

+ 690 - 0
src/pages/organProfile/index.vue

@@ -0,0 +1,690 @@
1
+<template>
2
+    <view class="organ-profile-page">
3
+        <scroll-view scroll-y class="page-scroll">
4
+            <!-- ====== 顶部统计卡片 ====== -->
5
+            <view class="metric-row">
6
+                <view class="metric-card" v-for="(m, i) in metricCards" :key="i" :style="{ background: m.bg }">
7
+                    <text class="metric-title">{{ m.title }}</text>
8
+                    <text class="metric-value" :style="{ color: m.color }">{{ m.value }}</text>
9
+                    <view class="metric-change-row" v-if="!m.side">
10
+                        <view class="metric-change-info">
11
+                            <text class="metric-change-label">环比</text>
12
+                            <text class="metric-change" :class="'change-' + m.changeType" :style="{ color: m.changeColor }">
13
+                                {{ m.change }}
14
+                            </text>
15
+                        </view>
16
+                        <div class="metric-chart" :ref="el => m._sparkRef = el"></div>
17
+                    </view>
18
+                </view>
19
+            </view>
20
+
21
+            <!-- ====== 监察问题统计 ====== -->
22
+            <view class="chart-card">
23
+                <view class="chart-title">监察问题统计</view>
24
+                <view class="chart-box"><div ref="chartSuperviseTrend" class="chart-inner"></div></view>
25
+            </view>
26
+
27
+            <!-- ====== 问题类型分布 ====== -->
28
+            <view class="chart-card">
29
+                <view class="chart-title">问题类型分布</view>
30
+                <view class="chart-box"><div ref="chartIssueType" class="chart-inner"></div></view>
31
+            </view>
32
+
33
+            <!-- ====== 班组问题统计(监察) ====== -->
34
+            <view class="chart-card">
35
+                <view class="chart-title">班组问题统计(监察)</view>
36
+                <view class="chart-box"><div ref="chartTeamSupervise" class="chart-inner"></div></view>
37
+            </view>
38
+
39
+            <!-- ====== 区域问题占比(监察) ====== -->
40
+            <view class="chart-card">
41
+                <view class="chart-title">区域问题占比(监察)</view>
42
+                <view class="chart-box"><div ref="chartRegionPie" class="chart-inner chart-pie"></div></view>
43
+            </view>
44
+
45
+            <!-- ====== 班组问题统计(实时) ====== -->
46
+            <view class="chart-card">
47
+                <view class="chart-title">班组问题统计(实时)</view>
48
+                <view class="chart-box"><div ref="chartTeamQuality" class="chart-inner"></div></view>
49
+            </view>
50
+
51
+            <!-- ====== 实时质控拦截情况 ====== -->
52
+            <view class="chart-card">
53
+                <view class="chart-title">实时质控拦截情况</view>
54
+                <view class="chart-box"><div ref="chartIntercept" class="chart-inner"></div></view>
55
+            </view>
56
+
57
+            <!-- ====== 实时质控开机年龄分布 ====== -->
58
+            <view class="chart-card">
59
+                <view class="chart-title">实时质控开机年龄分布</view>
60
+                <view class="chart-box"><div ref="chartAgeDist" class="chart-inner"></div></view>
61
+            </view>
62
+
63
+            <!-- ====== 实时质控围栏难易度 ====== -->
64
+            <view class="chart-card">
65
+                <view class="chart-title">实时质控围栏难易度</view>
66
+                <view class="chart-box"><div ref="chartFence" class="chart-inner"></div></view>
67
+            </view>
68
+
69
+            <!-- ====== 实时质控开机年限分布 ====== -->
70
+            <view class="chart-card">
71
+                <view class="chart-title">实时质控开机年限分布</view>
72
+                <view class="chart-box"><div ref="chartYearLimit" class="chart-inner"></div></view>
73
+            </view>
74
+
75
+            <!-- ====== 实时拦截物品汇总 ====== -->
76
+            <view class="chart-card">
77
+                <view class="chart-title">实时拦截物品汇总</view>
78
+                <view class="chart-box"><div ref="chartItems" class="chart-inner"></div></view>
79
+            </view>
80
+
81
+            <!-- ====== 服务巡查 ====== -->
82
+            <view class="chart-card">
83
+                <view class="chart-title">服务巡查</view>
84
+                <view class="chart-box"><div ref="chartServiceInspect" class="chart-inner"></div></view>
85
+            </view>
86
+
87
+            <!-- ====== 服务巡查趋势 ====== -->
88
+            <view class="chart-card">
89
+                <view class="chart-title">服务巡查</view>
90
+                <view class="chart-box"><div ref="chartServiceLine" class="chart-inner"></div></view>
91
+            </view>
92
+
93
+            <!-- ====== 投诉涉及班组情况 ====== -->
94
+            <view class="chart-card">
95
+                <view class="chart-title">投诉涉及班组情况</view>
96
+                <view class="chart-box"><div ref="chartComplaint" class="chart-inner"></div></view>
97
+            </view>
98
+
99
+            <!-- ====== 不安全事件发生对比 ====== -->
100
+            <view class="chart-card">
101
+                <view class="chart-title">不安全事件发生对比</view>
102
+                <view class="chart-box"><div ref="chartUnsafe" class="chart-inner"></div></view>
103
+            </view>
104
+
105
+            <!-- ====== 亚健康人数占比 ====== -->
106
+            <view class="chart-card">
107
+                <view class="chart-title">亚健康人数占比</view>
108
+                <view class="chart-box"><div ref="chartSubHealthPie" class="chart-inner chart-pie"></div></view>
109
+            </view>
110
+
111
+            <!-- ====== 各班组健康与亚健康比例 ====== -->
112
+            <view class="chart-card">
113
+                <view class="chart-title">各班组健康与亚健康比例</view>
114
+                <view class="chart-box"><div ref="chartHealthStack" class="chart-inner"></div></view>
115
+            </view>
116
+
117
+            <!-- ====== 旅检三部人员年龄分布表 ====== -->
118
+            <view class="chart-card">
119
+                <view class="chart-title">旅检三部人员年龄分布表</view>
120
+                <view class="chart-box"><div ref="chartCheckinAge" class="chart-inner"></div></view>
121
+            </view>
122
+
123
+            <!-- ====== 监察问题(总)排行 ====== -->
124
+            <view class="chart-card">
125
+                <view class="chart-title">监察问题(总)</view>
126
+                <view class="rank-section">
127
+                    <view class="rank-avatars">
128
+                        <view class="rank-avatar-item" v-for="(item, idx) in superVisionTop3" :key="idx">
129
+                            <view class="rank-avatar-wrapper" :class="'rank-pos-' + (idx + 1)">
130
+                                <view class="rank-avatar-circle" :style="{ background: item.color }">
131
+                                    <text>{{ item.name.slice(-2) }}</text>
132
+                                </view>
133
+                                <text class="rank-badge">{{ idx + 1 }}</text>
134
+                            </view>
135
+                            <text class="rank-name">{{ item.name }}</text>
136
+                            <text class="rank-num">{{ item.num }}</text>
137
+                        </view>
138
+                    </view>
139
+                    <view class="rank-table">
140
+                        <view class="rank-tr rank-th">
141
+                            <text>排名</text><text>姓名</text><text>问题数</text>
142
+                        </view>
143
+                        <view class="rank-tr" v-for="(item, idx) in superVisionList" :key="idx">
144
+                            <text>{{ idx + 1 }}</text><text>{{ item.name }}</text><text>{{ item.num }}</text>
145
+                        </view>
146
+                    </view>
147
+                </view>
148
+            </view>
149
+
150
+            <!-- ====== 实时漏洞检情况(总)排行 ====== -->
151
+            <view class="chart-card">
152
+                <view class="chart-title">实时漏洞检情况(总)</view>
153
+                <view class="rank-section">
154
+                    <view class="rank-avatars">
155
+                        <view class="rank-avatar-item" v-for="(item, idx) in vulnTop3" :key="idx">
156
+                            <view class="rank-avatar-wrapper" :class="'rank-pos-' + (idx + 1)">
157
+                                <view class="rank-avatar-circle" :style="{ background: item.color }">
158
+                                    <text>{{ item.name.slice(-2) }}</text>
159
+                                </view>
160
+                                <text class="rank-badge">{{ idx + 1 }}</text>
161
+                            </view>
162
+                            <text class="rank-name">{{ item.name }}</text>
163
+                            <text class="rank-num">{{ item.num }}</text>
164
+                        </view>
165
+                    </view>
166
+                    <view class="rank-table">
167
+                        <view class="rank-tr rank-th">
168
+                            <text>排名</text><text>姓名</text><text>问题数</text>
169
+                        </view>
170
+                        <view class="rank-tr" v-for="(item, idx) in vulnList" :key="idx">
171
+                            <text>{{ idx + 1 }}</text><text>{{ item.name }}</text><text>{{ item.num }}</text>
172
+                        </view>
173
+                    </view>
174
+                </view>
175
+            </view>
176
+
177
+            <!-- ====== 航站楼加分排行 ====== -->
178
+            <view class="chart-card">
179
+                <view class="chart-title">航站楼加分</view>
180
+                <view class="rank-section">
181
+                    <view class="rank-avatars">
182
+                        <view class="rank-avatar-item" v-for="(item, idx) in bonusTop3" :key="idx">
183
+                            <view class="rank-avatar-wrapper" :class="'rank-pos-' + (idx + 1)">
184
+                                <view class="rank-avatar-circle" :style="{ background: item.color }">
185
+                                    <text>{{ item.name.slice(-2) }}</text>
186
+                                </view>
187
+                                <text class="rank-badge">{{ idx + 1 }}</text>
188
+                            </view>
189
+                            <text class="rank-name">{{ item.name }}</text>
190
+                            <text class="rank-num">{{ item.num }}</text>
191
+                        </view>
192
+                    </view>
193
+                    <view class="rank-table">
194
+                        <view class="rank-tr rank-th">
195
+                            <text>排名</text><text>姓名</text><text>加分</text>
196
+                        </view>
197
+                        <view class="rank-tr" v-for="(item, idx) in bonusList" :key="idx">
198
+                            <text>{{ idx + 1 }}</text><text>{{ item.name }}</text><text>{{ item.num }}</text>
199
+                        </view>
200
+                    </view>
201
+                </view>
202
+            </view>
203
+
204
+            <!-- ====== 查获数量排行 ====== -->
205
+            <view class="chart-card">
206
+                <view class="chart-title">查获数量</view>
207
+                <view class="rank-section">
208
+                    <view class="rank-avatars">
209
+                        <view class="rank-avatar-item" v-for="(item, idx) in seizeTop3" :key="idx">
210
+                            <view class="rank-avatar-wrapper" :class="'rank-pos-' + (idx + 1)">
211
+                                <view class="rank-avatar-circle" :style="{ background: item.color }">
212
+                                    <text>{{ item.name.slice(-2) }}</text>
213
+                                </view>
214
+                                <text class="rank-badge">{{ idx + 1 }}</text>
215
+                            </view>
216
+                            <text class="rank-name">{{ item.name }}</text>
217
+                            <text class="rank-num">{{ item.num }}</text>
218
+                        </view>
219
+                    </view>
220
+                    <view class="rank-table">
221
+                        <view class="rank-tr rank-th">
222
+                            <text>排名</text><text>姓名</text><text>查获数</text>
223
+                        </view>
224
+                        <view class="rank-tr" v-for="(item, idx) in seizeList" :key="idx">
225
+                            <text>{{ idx + 1 }}</text><text>{{ item.name }}</text><text>{{ item.num }}</text>
226
+                        </view>
227
+                    </view>
228
+                </view>
229
+            </view>
230
+        </scroll-view>
231
+    </view>
232
+</template>
233
+<script>
234
+import * as echarts from 'echarts'
235
+export default {
236
+    name: 'OrganProfile',
237
+    data() {
238
+        return {
239
+            metricCards: [
240
+                { title: '监察问题数(本月)', value: '11', change: '57.69%', changeType: 'down', changeColor: '#ef4444', color: '#f59e0b', bg: '#dbeafe', sparkColor: '#3b82f6', _sparkRef: null },
241
+                { title: '实时质控数(本月)', value: '21', change: '56.25%', changeType: 'down', changeColor: '#ef4444', color: '#22c55e', bg: '#dcfce7', sparkColor: '#22c55e', _sparkRef: null },
242
+                { title: '服务巡查(本月)', value: '4', change: '0%', changeType: 'flat', changeColor: '#6b7280', color: '#3b82f6', bg: '#dbeafe', sparkColor: '#3b82f6', _sparkRef: null },
243
+                { title: '投诉情况(本月)', value: '1', change: '88.89%', changeType: 'down', changeColor: '#ef4444', color: '#ef4444', bg: '#fce4ec', sparkColor: '#ef4444', _sparkRef: null },
244
+                { title: '不安全事件发生次数(今年)', value: '3', change: '57.14%', changeType: 'down', changeColor: '#ef4444', color: '#ffffff', bg: '#6b7280', sparkColor: '#9ca3af', _sparkRef: null },
245
+                { title: '锐甲安语—自愿报告系统', value: '3', color: '#fff', bg: 'linear-gradient(135deg, #f59e0b, #d97706)', side: true },
246
+                { title: '部门亚健康人员', value: '147', color: '#fff', bg: 'linear-gradient(135deg, #fbbf24, #f59e0b)', side: true }
247
+            ],
248
+            superVisionTop3: [
249
+                { name: '徐皓迪', num: 7, color: '#3b82f6' },
250
+                { name: '张悦', num: 7, color: '#22c55e' },
251
+                { name: '匡林', num: 5, color: '#f59e0b' }
252
+            ],
253
+            superVisionList: [
254
+                { name: '周雨浓', num: 4 }, { name: '蒲越', num: 5 }, { name: '傅建', num: 6 },
255
+                { name: '李明', num: 4 }, { name: '王芳', num: 3 }, { name: '赵强', num: 4 },
256
+                { name: '刘洋', num: 3 }, { name: '陈静', num: 5 }, { name: '杨磊', num: 4 }, { name: '吴倩', num: 3 }
257
+            ],
258
+            vulnTop3: [
259
+                { name: '安俊', num: 11, color: '#ec4899' },
260
+                { name: '黄鑫', num: 11, color: '#a78bfa' },
261
+                { name: '廖艺森', num: 9, color: '#f97316' }
262
+            ],
263
+            vulnList: [
264
+                { name: '李敏', num: 4 }, { name: '林', num: 8 }, { name: '宇', num: 8 },
265
+                { name: '张华', num: 6 }, { name: '王丽', num: 5 }, { name: '赵明', num: 7 },
266
+                { name: '陈红', num: 4 }, { name: '刘伟', num: 6 }, { name: '杨婷', num: 5 }, { name: '吴刚', num: 4 }
267
+            ],
268
+            bonusTop3: [
269
+                { name: '文渊', num: 24.5, color: '#3b82f6' },
270
+                { name: '杨晨汐', num: 34.5, color: '#22c55e' },
271
+                { name: '何欧怡', num: 16, color: '#f59e0b' }
272
+            ],
273
+            bonusList: [
274
+                { name: '杨林', num: 4 }, { name: '马灿', num: 5 }, { name: '蒋灿', num: 6 },
275
+                { name: '谢涛', num: 3.5 }, { name: '韩雪', num: 4.5 }, { name: '唐亮', num: 5.5 },
276
+                { name: '曹琳', num: 3 }, { name: '邓超', num: 4 }, { name: '彭波', num: 6.5 }, { name: '冯娟', num: 3.5 }
277
+            ],
278
+            seizeTop3: [
279
+                { name: '苗苗', num: 113, color: '#ec4899' },
280
+                { name: '黄真', num: 90, color: '#a78bfa' },
281
+                { name: '王磊', num: 78, color: '#f97316' }
282
+            ],
283
+            seizeList: [
284
+                { name: '李兆厚', num: 4 }, { name: '黄元宏', num: 5 }, { name: '何跃智', num: 6 },
285
+                { name: '周文', num: 7 }, { name: '吴斌', num: 5 }, { name: '郑丽', num: 8 },
286
+                { name: '孙强', num: 4 }, { name: '朱敏', num: 6 }, { name: '沈涛', num: 5 }, { name: '贺军', num: 7 }
287
+            ],
288
+            chartInstances: {}
289
+        }
290
+    },
291
+    mounted() {
292
+        this.$nextTick(() => {
293
+            this.initSparkLines()
294
+            this.initSuperviseTrend()
295
+            this.initIssueType()
296
+            this.initTeamSupervise()
297
+            this.initRegionPie()
298
+            this.initTeamQuality()
299
+            this.initIntercept()
300
+            this.initAgeDist()
301
+            this.initFence()
302
+            this.initYearLimit()
303
+            this.initItems()
304
+            this.initServiceInspect()
305
+            this.initServiceLine()
306
+            this.initComplaint()
307
+            this.initUnsafe()
308
+            this.initSubHealthPie()
309
+            this.initHealthStack()
310
+            this.initCheckinAge()
311
+        })
312
+    },
313
+    beforeDestroy() {
314
+        Object.values(this.chartInstances).forEach(i => { if (i) i.dispose() })
315
+    },
316
+    methods: {
317
+        _init(refName, option) {
318
+            const dom = this.$refs[refName]
319
+            if (!dom) return
320
+            const inst = echarts.init(dom)
321
+            inst.setOption(option)
322
+            this.chartInstances[refName] = inst
323
+        },
324
+        initSparkLines() {
325
+            this.metricCards.forEach(m => {
326
+                if (m._sparkRef) {
327
+                    const chart = echarts.init(m._sparkRef)
328
+                    chart.setOption({
329
+                        grid: { top: 0, bottom: 0, left: 0, right: 0 },
330
+                        xAxis: { show: false, type: 'category', data: ['','','','','','','','','',''] },
331
+                        yAxis: { show: false },
332
+                        series: [{ type: 'line', data: [3,5,2,8,4,7,3,6,4,5], smooth: true,
333
+                            lineStyle: { color: m.sparkColor, width: 2 },
334
+                            areaStyle: { color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
335
+                                colorStops: [{ offset: 0, color: m.sparkColor + '33' }, { offset: 1, color: m.sparkColor + '00' }] } },
336
+                            symbol: 'none' }]
337
+                    })
338
+                    this.chartInstances['spark_' + m.title] = chart
339
+                }
340
+            })
341
+        },
342
+        initSuperviseTrend() {
343
+            this._init('chartSuperviseTrend', {
344
+                tooltip: { trigger: 'axis' },
345
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
346
+                xAxis: { type: 'category', data: ['03:00','05:00','07:00','09:00','11:00','13:00','15:00','17:00','19:00','20:00'],
347
+                    axisLabel: { rotate: 45, fontSize: 9, interval: 0 } },
348
+                yAxis: { type: 'value' },
349
+                series: [{ type: 'line', data: [3,17,11,12,9,14,15,10,7,4],
350
+                    smooth: true, lineStyle: { color: '#3b82f6', width: 2 }, itemStyle: { color: '#3b82f6' },
351
+                    areaStyle: { color: 'rgba(59,130,246,0.15)' } }]
352
+            })
353
+        },
354
+        initIssueType() {
355
+            this._init('chartIssueType', {
356
+                tooltip: { trigger: 'axis' },
357
+                grid: { left: '3%', right: '8%', bottom: '10%', top: '8%', containLabel: true },
358
+                xAxis: { type: 'value' },
359
+                yAxis: { type: 'category', data: ['设备设施流程类', '岗位规范类', '岗位操作类'] },
360
+                series: [{ type: 'bar', data: [
361
+                    { value: 2, itemStyle: { color: '#3b82f6' } },
362
+                    { value: 75, itemStyle: { color: '#3b82f6' } },
363
+                    { value: 101, itemStyle: { color: '#3b82f6' } }
364
+                ], barWidth: '40%', label: { show: true, position: 'right', fontSize: 10 } }]
365
+            })
366
+        },
367
+        initTeamSupervise() {
368
+            this._init('chartTeamSupervise', {
369
+                tooltip: { trigger: 'axis' },
370
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
371
+                xAxis: { type: 'category', data: ['安平班组','安行班组','木兰班组','芮茜班组','拓新班组','屹动班组'],
372
+                    axisLabel: { rotate: 30, fontSize: 9 } },
373
+                yAxis: { type: 'value' },
374
+                series: [{ type: 'bar', data: [34,21,2,41,39,34],
375
+                    barWidth: '35%', itemStyle: { color: '#3b82f6' },
376
+                    label: { show: true, position: 'top', fontSize: 9 } }]
377
+            })
378
+        },
379
+        initRegionPie() {
380
+            this._init('chartRegionPie', {
381
+                tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' },
382
+                legend: { bottom: 0, left: 'center', textStyle: { fontSize: 9 } },
383
+                series: [{
384
+                    type: 'pie', radius: ['30%', '55%'], center: ['50%', '40%'],
385
+                    label: { fontSize: 9, formatter: '{b}\n{c} ({d}%)' },
386
+                    data: [
387
+                        { value: 128, name: 'T3国内出发', itemStyle: { color: '#a78bfa' } },
388
+                        { value: 39, name: 'T3国际国内', itemStyle: { color: '#22c55e' } },
389
+                        { value: 5, name: 'T3中心实时指控', itemStyle: { color: '#f59e0b' } }
390
+                    ]
391
+                }]
392
+            })
393
+        },
394
+        initTeamQuality() {
395
+            this._init('chartTeamQuality', {
396
+                tooltip: { trigger: 'axis' },
397
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
398
+                xAxis: { type: 'category', data: ['安平班组','安行班组','木兰班组','芮茜班组','拓新班组','屹动班组'],
399
+                    axisLabel: { rotate: 30, fontSize: 9 } },
400
+                yAxis: { type: 'value' },
401
+                series: [{ type: 'bar', data: [60,44,21,65,56,75],
402
+                    barWidth: '35%', itemStyle: { color: '#3b82f6' },
403
+                    label: { show: true, position: 'top', fontSize: 9 } }]
404
+            })
405
+        },
406
+        initIntercept() {
407
+            this._init('chartIntercept', {
408
+                tooltip: { trigger: 'axis' },
409
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
410
+                xAxis: { type: 'category', data: ['04:00','06:00','08:00','10:00','12:00','14:00','16:00','18:00','20:00','22:00'],
411
+                    axisLabel: { rotate: 45, fontSize: 9, interval: 1 } },
412
+                yAxis: { type: 'value' },
413
+                series: [{ type: 'line', data: [8,28,31,21,26,21,11,4,1,2],
414
+                    smooth: true, lineStyle: { color: '#3b82f6', width: 2 }, itemStyle: { color: '#3b82f6' },
415
+                    areaStyle: { color: 'rgba(59,130,246,0.15)' } }]
416
+            })
417
+        },
418
+        initAgeDist() {
419
+            this._init('chartAgeDist', {
420
+                tooltip: { trigger: 'axis' },
421
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
422
+                xAxis: { type: 'category',
423
+                    data: Array.from({ length: 42 }, (_, i) => String(i + 1)),
424
+                    axisLabel: { fontSize: 8, interval: 4 } },
425
+                yAxis: { type: 'value' },
426
+                series: [{ type: 'bar',
427
+                    data: Array.from({ length: 42 }, () => Math.floor(Math.random() * 40 + 10)),
428
+                    barWidth: '60%', itemStyle: { color: '#3b82f6' } }]
429
+            })
430
+        },
431
+        initFence() {
432
+            this._init('chartFence', {
433
+                tooltip: { trigger: 'axis' },
434
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
435
+                xAxis: { type: 'category', data: ['0','1','2','3','4','5'], axisLabel: { fontSize: 10 } },
436
+                yAxis: { type: 'value' },
437
+                series: [{ type: 'bar', data: [2,145,70,92,16,1],
438
+                    barWidth: '35%', itemStyle: { color: '#3b82f6', borderRadius: [5, 5, 0, 0] },
439
+                    label: { show: true, position: 'top', fontSize: 9 } }]
440
+            })
441
+        },
442
+        initYearLimit() {
443
+            this._init('chartYearLimit', {
444
+                tooltip: { trigger: 'axis' },
445
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
446
+                xAxis: { type: 'category',
447
+                    data: Array.from({ length: 14 }, (_, i) => String(i + 1)),
448
+                    axisLabel: { fontSize: 9 } },
449
+                yAxis: { type: 'value' },
450
+                series: [{ type: 'bar', data: [5,32,65,11,14,11,9,16,27,45,31,23,27,8],
451
+                    barWidth: '40%', itemStyle: { color: '#3b82f6', borderRadius: [3, 3, 0, 0] },
452
+                    label: { show: true, position: 'top', fontSize: 8 } }]
453
+            })
454
+        },
455
+        initItems() {
456
+            this._init('chartItems', {
457
+                tooltip: { trigger: 'axis' },
458
+                grid: { left: '3%', right: '4%', bottom: '12%', top: '8%', containLabel: true },
459
+                xAxis: { type: 'category', data: ['打火机','香烟','刀具','充电宝','液体','剪刀','钥匙扣','其他'],
460
+                    axisLabel: { rotate: 30, fontSize: 9 } },
461
+                yAxis: { type: 'value' },
462
+                series: [{ type: 'bar', data: [136,98,45,67,23,34,12,56],
463
+                    barWidth: '40%', itemStyle: { color: '#3b82f6', borderRadius: [5, 5, 0, 0] },
464
+                    label: { show: true, position: 'top', fontSize: 8 } }]
465
+            })
466
+        },
467
+        initServiceInspect() {
468
+            this._init('chartServiceInspect', {
469
+                tooltip: { trigger: 'axis' },
470
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
471
+                xAxis: { type: 'category', data: ['安平班组','安行班组','木兰班组','芮茜班组','拓新班组','屹动班组'],
472
+                    axisLabel: { rotate: 30, fontSize: 9 } },
473
+                yAxis: { type: 'value' },
474
+                series: [{ type: 'bar', data: [3,16,7,15,14,11],
475
+                    barWidth: '35%', itemStyle: { color: '#3b82f6', borderRadius: [5, 5, 0, 0] },
476
+                    label: { show: true, position: 'top', fontSize: 9 } }]
477
+            })
478
+        },
479
+        initServiceLine() {
480
+            this._init('chartServiceLine', {
481
+                tooltip: { trigger: 'axis' },
482
+                legend: { data: ['计数'], textStyle: { fontSize: 10 }, top: 0 },
483
+                grid: { left: '3%', right: '4%', bottom: '12%', top: '12%', containLabel: true },
484
+                xAxis: { type: 'category',
485
+                    data: ['05:00','06:00','07:00','08:00','09:00','10:00','11:00','12:00','13:00','14:00','15:00','16:00','17:00','18:00','19:00','20:00','21:00','空值'],
486
+                    axisLabel: { rotate: 45, fontSize: 8 } },
487
+                yAxis: { type: 'value', min: 0, max: 7 },
488
+                series: [{ name: '计数', type: 'line', data: [2,5,5,5,3,4,3,2,6,5,5,3,7,3,2,3,3,1],
489
+                    lineStyle: { color: '#3b82f6', width: 2 }, itemStyle: { color: '#3b82f6' },
490
+                    symbol: 'circle', symbolSize: 6,
491
+                    label: { show: true, position: 'top', fontSize: 9 } }]
492
+            })
493
+        },
494
+        initComplaint() {
495
+            this._init('chartComplaint', {
496
+                tooltip: { trigger: 'axis' },
497
+                grid: { left: '3%', right: '8%', bottom: '8%', top: '5%', containLabel: true },
498
+                xAxis: { type: 'value' },
499
+                yAxis: { type: 'category',
500
+                    data: ['屹动班组','新训队','拓新班组','芮茜班组','木兰班组','空乘','安行班组','安平班组'],
501
+                    axisLabel: { fontSize: 9 } },
502
+                series: [{ type: 'bar', data: [50,1,30,45,19,19,22,37],
503
+                    barWidth: '50%', itemStyle: { color: '#ef4444', borderRadius: [0, 5, 5, 0] },
504
+                    label: { show: true, position: 'right', fontSize: 9 } }]
505
+            })
506
+        },
507
+        initUnsafe() {
508
+            this._init('chartUnsafe', {
509
+                tooltip: { trigger: 'axis' },
510
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
511
+                xAxis: { type: 'category', data: ['安平班组','安行班组','木兰班组','芮茜班组','拓新班组','屹动班组'],
512
+                    axisLabel: { rotate: 30, fontSize: 9 } },
513
+                yAxis: { type: 'value' },
514
+                series: [{ type: 'bar', data: [3,4,4,8,3,2],
515
+                    barWidth: '35%', itemStyle: { color: '#3b82f6', borderRadius: [5, 5, 0, 0] },
516
+                    label: { show: true, position: 'top', fontSize: 9 } }]
517
+            })
518
+        },
519
+        initSubHealthPie() {
520
+            this._init('chartSubHealthPie', {
521
+                tooltip: { trigger: 'item', formatter: '{b}: {c}人 ({d}%)' },
522
+                legend: { bottom: 0, left: 'center', textStyle: { fontSize: 9 } },
523
+                series: [{
524
+                    type: 'pie', radius: ['30%', '55%'], center: ['50%', '40%'],
525
+                    label: { fontSize: 9, formatter: '{b}: {c} ({d}%)' },
526
+                    data: [
527
+                        { value: 25, name: '屹动班组', itemStyle: { color: '#06b6d4' } },
528
+                        { value: 23, name: '安平班组', itemStyle: { color: '#22c55e' } },
529
+                        { value: 28, name: '拓新班组', itemStyle: { color: '#f59e0b' } },
530
+                        { value: 27, name: '芮茜班组', itemStyle: { color: '#ec4899' } },
531
+                        { value: 13, name: '木兰班组', itemStyle: { color: '#a78bfa' } },
532
+                        { value: 31, name: '其他', itemStyle: { color: '#f97316' } }
533
+                    ]
534
+                }]
535
+            })
536
+        },
537
+        initHealthStack() {
538
+            this._init('chartHealthStack', {
539
+                tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
540
+                legend: { bottom: 0, left: 'center', textStyle: { fontSize: 9 } },
541
+                grid: { left: '3%', right: '4%', bottom: '18%', top: '5%', containLabel: true },
542
+                xAxis: { type: 'category', data: ['安平班组','安行班组','木兰班组','芮茜班组','拓新班组','屹动班组'],
543
+                    axisLabel: { rotate: 30, fontSize: 8 } },
544
+                yAxis: { type: 'value' },
545
+                series: [
546
+                    { name: '健康人员', type: 'bar', stack: 'total', barWidth: '35%',
547
+                        itemStyle: { color: '#3b82f6' }, data: [35,20,29,26,22,27] },
548
+                    { name: '亚健康人员', type: 'bar', stack: 'total', barWidth: '35%',
549
+                        itemStyle: { color: '#ef4444' }, data: [23,29,13,27,28,25] }
550
+                ]
551
+            })
552
+        },
553
+        initCheckinAge() {
554
+            this._init('chartCheckinAge', {
555
+                tooltip: { trigger: 'axis' },
556
+                grid: { left: '3%', right: '4%', bottom: '10%', top: '8%', containLabel: true },
557
+                xAxis: { type: 'category',
558
+                    data: Array.from({ length: 23 }, (_, i) => String(i + 23)),
559
+                    axisLabel: { fontSize: 8, interval: 2 } },
560
+                yAxis: { type: 'value' },
561
+                series: [{ type: 'bar',
562
+                    data: [8,12,18,24,30,36,41,36,33,28,22,18,14,10,8,6,4,3,2,2,1,1,1],
563
+                    barWidth: '40%', itemStyle: { color: '#3b82f6', borderRadius: [3, 3, 0, 0] },
564
+                    label: { show: true, position: 'top', fontSize: 8 } }]
565
+            })
566
+        }
567
+    }
568
+}
569
+</script>
570
+<style lang="scss" scoped>
571
+.organ-profile-page { min-height: 100vh; background: #f5f7fa; }
572
+.page-scroll { height: 100vh; padding: 16rpx 20rpx 40rpx; }
573
+// ─ 顶部指标卡片 ─
574
+.metric-row {
575
+    display: grid;
576
+    grid-template-columns: 1fr 1fr;
577
+    gap: 12rpx;
578
+    margin-bottom: 20rpx;
579
+}
580
+.metric-card {
581
+    display: flex;
582
+    flex-direction: column;
583
+    justify-content: space-between;
584
+    border-radius: 20rpx;
585
+    padding: 20rpx 24rpx;
586
+    min-height: 180rpx;
587
+}
588
+.metric-title {
589
+    font-size: 24rpx;
590
+    color: #475569;
591
+    font-weight: 500;
592
+    margin-bottom: 8rpx;
593
+}
594
+.metric-value {
595
+    font-size: 60rpx;
596
+    font-weight: bold;
597
+    line-height: 1.2;
598
+}
599
+.side-value {
600
+    font-size: 44rpx;
601
+    color: #fff !important;
602
+}
603
+.metric-change-row {
604
+    display: flex;
605
+    align-items: flex-end;
606
+    justify-content: space-between;
607
+    margin-top: auto;
608
+}
609
+.metric-change-info {
610
+    display: flex;
611
+    flex-direction: column;
612
+    gap: 4rpx;
613
+}
614
+.metric-change-label {
615
+    font-size: 22rpx;
616
+    color: #64748b;
617
+}
618
+.metric-change {
619
+    font-size: 24rpx;
620
+    display: inline-flex;
621
+    align-items: center;
622
+    gap: 6rpx;
623
+    font-weight: 500;
624
+}
625
+.metric-change::before {
626
+    content: '';
627
+    display: inline-block;
628
+    width: 0;
629
+    height: 0;
630
+    vertical-align: middle;
631
+}
632
+.metric-change.change-down::before {
633
+    border-left: 8rpx solid transparent;
634
+    border-right: 8rpx solid transparent;
635
+    border-top: 12rpx solid currentColor;
636
+}
637
+.metric-change.change-up::before {
638
+    border-left: 8rpx solid transparent;
639
+    border-right: 8rpx solid transparent;
640
+    border-bottom: 12rpx solid currentColor;
641
+}
642
+.metric-change.change-flat::before {
643
+    width: 16rpx;
644
+    height: 0;
645
+    border-top: 4rpx solid currentColor;
646
+    border-radius: 2rpx;
647
+}
648
+.metric-chart {
649
+    height: 50rpx;
650
+    width: 130rpx;
651
+}
652
+.chart-card {
653
+    background: #fff; border-radius: 16rpx; padding: 24rpx 20rpx;
654
+    margin-bottom: 16rpx; box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
655
+}
656
+.chart-title { font-size: 28rpx; font-weight: 600; color: #333; margin-bottom: 16rpx; }
657
+.chart-box { width: 100%; }
658
+.chart-inner { width: 100%; height: 380rpx; }
659
+.chart-pie { height: 420rpx; }
660
+.rank-section { padding: 0 8rpx; }
661
+.rank-avatars { display: flex; justify-content: center; gap: 40rpx; margin-bottom: 24rpx; }
662
+.rank-avatar-item { display: flex; flex-direction: column; align-items: center; gap: 8rpx; }
663
+.rank-avatar-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
664
+.rank-avatar-wrapper.rank-pos-1 { border: 4rpx solid #94a3b8; }
665
+.rank-avatar-wrapper.rank-pos-2 { border: 4rpx solid #fbbf24; }
666
+.rank-avatar-wrapper.rank-pos-3 { border: 4rpx solid #fb923c; }
667
+.rank-avatar-circle {
668
+    width: 80rpx; height: 80rpx; border-radius: 50%;
669
+    display: flex; align-items: center; justify-content: center;
670
+}
671
+.rank-avatar-circle text { color: #fff; font-size: 26rpx; font-weight: bold; }
672
+.rank-badge {
673
+    position: absolute; bottom: -12rpx; left: 50%; transform: translateX(-50%);
674
+    width: 28rpx; height: 28rpx; border-radius: 50%;
675
+    display: flex; align-items: center; justify-content: center;
676
+    font-size: 20rpx; font-weight: bold; color: #fff;
677
+}
678
+.rank-pos-1 .rank-badge { background: #94a3b8; }
679
+.rank-pos-2 .rank-badge { background: #fbbf24; }
680
+.rank-pos-3 .rank-badge { background: #fb923c; }
681
+.rank-name { font-size: 24rpx; color: #475569; }
682
+.rank-num { font-size: 32rpx; color: #1e293b; font-weight: bold; }
683
+.rank-table { display: flex; flex-direction: column; }
684
+.rank-tr {
685
+    display: flex; padding: 12rpx 0; font-size: 24rpx; color: #64748b;
686
+    border-bottom: 1rpx solid #e2e8f0;
687
+}
688
+.rank-tr text { flex: 1; text-align: center; }
689
+.rank-th { color: #1e293b; font-weight: bold; border-bottom: 2rpx solid #cbd5e1; }
690
+</style>

+ 9 - 0
src/pages/organizationStruct/index.vue

@@ -82,6 +82,7 @@
82 82
                     v-for="item in displayUsers" 
83 83
                     :key="item.userId"
84 84
                     class="user-item"
85
+                    @click="navigateToEmployee(item)"
85 86
                 >
86 87
                     <view class="user-avatar">
87 88
                         <image v-if="item.avatar" :src="item.avatar" mode="aspectFill" class="avatar-img" />
@@ -247,6 +248,9 @@ export default {
247 248
                 if (targetNode) {
248 249
                     this.navigateToNodeFromRoot(targetNode)
249 250
                 }
251
+            } else {
252
+                // 搜索结果是人员,跳转到员工画像
253
+                this.navigateToEmployee(item)
250 254
             }
251 255
         },
252 256
         navigateToNodeFromRoot(targetNode) {
@@ -277,6 +281,11 @@ export default {
277 281
         clearSearch() {
278 282
             this.searchKeyword = ''
279 283
             this.searchResults = []
284
+        },
285
+        navigateToEmployee(item) {
286
+            const userId = item.userId
287
+            const userName = encodeURIComponent(item.label || item.nickName || item.userName || '')
288
+            this.$tab.navigateTo(`/pages/employeeProfile/index?userId=${userId}&userName=${userName}`)
280 289
         }
281 290
     }
282 291
 }

+ 1 - 1
src/pages/work/index.vue

@@ -41,7 +41,7 @@
41 41
 import HomeContainer from "@/components/HomeContainer.vue";
42 42
 import { checkRolePermission } from "@/utils/common.js";
43 43
 import { getUserProfile, getAppListByRoleId,getAppList } from "@/api/system/user";
44
-const profileAppNames = ['画像', '部门画像', '班组画像', '小组画像', '员工画像']
44
+const profileAppNames = ['综合信息画像', '部门画像', '班组画像', '小组画像', '员工画像']
45 45
 export default {
46 46
   components: { HomeContainer },
47 47
   data() {