liuzhuo 3 settimane fa
parent
commit
be8638feb2

BIN
public/images/sgbgtz.png Vedi File


BIN
public/images/sgjb.png Vedi File


BIN
public/images/sgjbtz.png Vedi File


+ 20
- 25
src/router/index.ts Vedi File

@@ -705,7 +705,12 @@ const router = createRouter({
705 705
 			component: () => import('@/view/dati/examCheck/fcbkdatistart.vue')
706 706
 		},
707 707
 
708
-
708
+		{
709
+			path: '/guest-register',
710
+			name: '游客模式(答题)',
711
+			component: () => import('@/view/login/Register.vue'),
712
+			meta: { guestMode: true }
713
+		}
709 714
 	]
710 715
 })
711 716
 function isInWeCom(): boolean {
@@ -714,17 +719,20 @@ function isInWeCom(): boolean {
714 719
 // 路由守卫
715 720
 router.beforeEach(async (to, from, next) => {
716 721
 
717
-	/*
718
-		const requiresWeCom = to.matched.some(record => record.meta.requiresWeCom);
719
-
720
-		if (requiresWeCom && typeof wx === 'undefined') {
721
-			console.warn('该页面需在企业微信内打开');
722
-			// 可以跳转提示页或者 Toast 提示
723
-			return next(false);
722
+	const token1 = localStorage.getItem('token');
723
+	const isWeCom = isInWeCom();
724
+	if (to.path === '/fcbkdatistart') {
725
+		// 如果不在企微中,且没有有效 token,且不是已经在游客页
726
+		if (!isWeCom && (!token1 || !isTokenValid(token1)) && from.path !== '/guest-register') {
727
+			console.log('【游客模式】非企微访问 fcbkdatistart,跳转游客注册');
728
+			// ✅ 关键修复:保留 to.query(即 examId 等参数)
729
+			return next({
730
+				path: '/guest-register',
731
+				query: to.query
732
+			});
724 733
 		}
725 734
 
726
-		wxReady((requestSignature().data))
727
-	*/
735
+	}
728 736
 	function isTokenValid(token : string) : boolean {
729 737
 		try {
730 738
 			// 检查 token 是否为合法 JWT 格式(3段)
@@ -787,21 +795,8 @@ router.beforeEach(async (to, from, next) => {
787 795
 		return null; // 或者抛出错误,根据你的业务需求
788 796
 	}
789 797
 	console.log(to);
790
-	if (to.path == '/Home1'||to.path=='/yinhuan/todo_detail/index'|| to.path == '/lz-rcd-detail'||to.path == '/emergencyResources'||to.path == '/cardManager/specialWork'||to.path == '/cardManager/equipment'||to.path == '/cardManager/engineer') {
791
-		console.log("++++++判断一下是不是企微或者掌上山钢扫码:"+isInWeCom());
792
-		/*const token = localStorage.getItem('token');
793
-		// 判断是否已经初始化过用户信息
794
-		const hasUserInfo = !!localStorage.getItem('userId');
795
-		if (hasUserInfo) {
796
-			// @ts-ignore
797
-			if (token && isTokenValid(token)) {
798
-				next();
799
-				return;
800
-			}
801
-		}*/
802
-
803
-		// const userId=ref('3E4C4009430211B28E367D90704E23CA')
804
-
798
+	if (to.path == '/Home1'||to.path=='/yinhuan/todo_detail/index'|| to.path == '/lz-rcd-detail'||to.path == '/emergencyResources'||to.path == '/cardManager/specialWork'
799
+		||to.path == '/cardManager/equipment'||to.path == '/cardManager/engineer') {
805 800
 		const userId=ref(import.meta.env.VITE_USER_ID)
806 801
 		console.log(userId.value);
807 802
 		console.log("当前环境:");

+ 3
- 4
src/view/Home1.vue Vedi File

@@ -466,12 +466,12 @@ const coincideNotList = ref([]);
466 466
 const queryMenuRecently = () => {
467 467
   const url = '/sgsafe/MenuRecentlyUsed/queryRecentlyUsed';
468 468
   const param = {
469
-    userCode: localStorage.getItem('userCode')
469
+    applicationId: 'c77da6a732d34400b24374e2cea811ee'
470 470
   };
471 471
   proxy.$axios.get(url, param).then(res => {
472 472
     functionList.value = res.data.data.map(item => ({
473 473
       title: item.menuName,
474
-      img: item.menuIcon,
474
+      img: 'images/' + item.menuIcon,
475 475
       jumpPath: item.jumpPath
476 476
     }));
477 477
 
@@ -488,12 +488,11 @@ const queryMenuRecently = () => {
488 488
       title: '查看更多',
489 489
       img: 'images/gd.png',
490 490
       jumpPath: '/home2',
491
-	  //jumpPath: '/homeRole'
491
+      //jumpPath: '/homeRole'
492 492
     })
493 493
   });
494 494
 
495 495
 };
496
-
497 496
 /**
498 497
  * 默认页面
499 498
  */

+ 106
- 282
src/view/Home2.vue Vedi File

@@ -11,6 +11,21 @@
11 11
         </van-grid-item>
12 12
       </van-grid>
13 13
     </div>
14
+
15
+    <div class="card">
16
+      <div class="title">通知公告</div>
17
+      <van-grid :border="false" :column-num="4">
18
+        <van-grid-item to="/annex">
19
+          <img src="../../public/images/zyqk.png" width="45rpx" />
20
+          <span class="vanicon_text">文件发布</span>
21
+        </van-grid-item>
22
+        <van-grid-item to="/notice" v-if="showCheckTakeN">
23
+          <img src="../../public/images/yj.png" width="45rpx" />
24
+          <span class="vanicon_text">通知公告</span>
25
+        </van-grid-item>
26
+      </van-grid>
27
+    </div>
28
+
14 29
     <div class="card">
15 30
       <div class="title">制度管理</div>
16 31
       <van-grid :border="false" :column-num="4">
@@ -28,247 +43,125 @@
28 43
         </van-grid-item>
29 44
       </van-grid>
30 45
     </div>
46
+
31 47
     <div class="card">
32
-      <div class="title">安全责任履职</div>
48
+      <div class="title">计划管理</div>
33 49
       <van-grid :border="false" :column-num="4">
34
-        <van-grid-item to="/lvzhi">
35
-          <img src="../../public/images/lz.png" width="45rpx" />
36
-          <span class="vanicon_text">履职记录</span>
37
-        </van-grid-item>
38
-        <van-grid-item to="/lvzhicx">
39
-          <img src="../../public/images/lzcx.png" width="45rpx" />
40
-          <span class="vanicon_text">履职查询</span>
50
+        <van-grid-item to="/keyMatters">
51
+          <img src="../../public/images/keyMatters.png" width="45rpx" />
52
+          <span class="vanicon_text">重点事项</span>
41 53
         </van-grid-item>
42
-        <van-grid-item v-if='false'>
43
-          <img src="../../public/images/zj.png" width="45rpx" @click="handleClick" />
44
-          <span class="vanicon_text">站内信推送</span>
54
+        <van-grid-item to="/planManagement">
55
+          <img src="../../public/images/planManagement.png" width="45rpx" />
56
+          <span class="vanicon_text">计划任务</span>
45 57
         </van-grid-item>
46 58
       </van-grid>
47 59
     </div>
60
+
48 61
     <div class="card">
49
-      <div class="title">风险分级管理</div>
62
+      <div class="title">考核评价</div>
50 63
       <van-grid :border="false" :column-num="4">
51
-        <van-grid-item to="/institution/riskList">
52
-          <img src="../../public/images/fx.png" width="45rpx" />
53
-          <span class="vanicon_text">风险分级管控记录</span>
64
+        <van-grid-item to="/performanceReview/units">
65
+          <img src="../../public/images/unitsPerformance.png" width="45rpx" />
66
+          <span class="vanicon_text">单位考核</span>
54 67
         </van-grid-item>
55 68
       </van-grid>
56 69
     </div>
70
+
57 71
     <div class="card">
58
-      <div class="title">隐患排查治理</div>
59
-      <van-grid :border="false" :column-num="4">
60
-        <van-grid-item to="/yinhuan/registration">
61
-          <img src="../../public/images/yhdj.png" width="45rpx" />
62
-          <span class="vanicon_text">隐患登记</span>
63
-        </van-grid-item>
64
-        <van-grid-item to="/yinhuan/todo">
65
-          <img src="../../public/images/yhdb.png" width="45rpx" />
66
-          <span class="vanicon_text">隐患待办</span>
67
-        </van-grid-item>
68
-        <van-grid-item to="/yinhuan/hdLedger">
69
-          <img src="../../public/images/yh.png" width="45rpx" />
70
-          <span class="vanicon_text">隐患台账</span>
71
-        </van-grid-item>
72
-        <van-grid-item to="/yinhuan/riskChecklist">
73
-          <img src="../../public/images/riskChecklist.png" width="45rpx" />
74
-          <span class="vanicon_text">隐患排查清单</span>
72
+      <div class="title">知识共享</div>
73
+      <van-grid :border="false" :column-num="4" v-if="showCheckTakeN">
74
+        <van-grid-item to="/knowledge/accident">
75
+          <img src="../../public/images/zd.png" width="45rpx" />
76
+          <span class="vanicon_text">事故案例</span>
75 77
         </van-grid-item>
76
-        <van-grid-item to="/yinhuan/riskChecklistRecords">
77
-          <img src="../../public/images/riskChecklistRecords.png" width="45rpx" />
78
-          <span class="vanicon_text">隐患排查记录</span>
78
+        <van-grid-item to="/knowledge/manager">
79
+          <img src="../../public/images/zd.png" width="45rpx" />
80
+          <span class="vanicon_text">管理案例</span>
79 81
         </van-grid-item>
80
-        <van-grid-item to="/yinhuan/hdRwardReporting">
81
-          <img src="../../public/images/yhdb.png" width="45rpx" />
82
-          <span class="vanicon_text">隐患有奖举报</span>
82
+        <van-grid-item to="/knowledge/Culture">
83
+          <img src="../../public/images/zd.png" width="45rpx" />
84
+          <span class="vanicon_text">安全环保文化</span>
83 85
         </van-grid-item>
84
-        <van-grid-item to="/yinhuan/hdLedgerJuBao">
85
-          <img src="../../public/images/yh.png" width="45rpx" />
86
-          <span class="vanicon_text">隐患有奖举报台账</span>
86
+        <van-grid-item to="/knowledge/project">
87
+          <img src="../../public/images/zd.png" width="45rpx" />
88
+          <span class="vanicon_text">项目案例库</span>
87 89
         </van-grid-item>
88 90
       </van-grid>
89 91
     </div>
92
+
90 93
     <div class="card">
91 94
       <div class="title">安全检查</div>
92 95
       <van-grid :border="false" :column-num="4">
93 96
         <van-grid-item to="/safeCheck/task">
94 97
           <img src="../../public/images/aq.png" width="45rpx" />
95
-          <span class="vanicon_text">安全检查任务</span>
96
-        </van-grid-item>
97
-      </van-grid>
98
-    </div>
99
-    <div class="card">
100
-      <div class="title">事故管理</div>
101
-      <van-grid :border="false" :column-num="4">
102
-        <van-grid-item to="/accidentManager/accidentBaoGaoLedger/index">
103
-          <img src="../../public/images/sgbgtz.png" width="45rpx" />
104
-          <span class="vanicon_text">事故报告台账</span>
105
-        </van-grid-item>
106
-        <van-grid-item to="/accidentManager/accidentJuBao/index">
107
-          <img src="../../public/images/sgjb.png" width="45rpx" />
108
-          <span class="vanicon_text">事故举报</span>
109
-        </van-grid-item>
110
-        <van-grid-item v-if="true" to="/accidentManager/accidentJuBaoLedger/index">
111
-          <img src="../../public/images/sgjbtz.png" width="45rpx" />
112
-          <span class="vanicon_text">事故举报台账</span>
113
-        </van-grid-item>
114
-      </van-grid>
115
-    </div>
116
-    <div class="card">
117
-      <div class="title">教育培训</div>
118
-      <van-grid :border="false" :column-num="4">
119
-        <van-grid-item to="/dailyproblem">
120
-          <img src="../../public/images/dt.png" width="45rpx" />
121
-          <span class="vanicon_text">每日答题</span>
122
-        </van-grid-item>
123
-        <van-grid-item to="/cardManager">
124
-          <img src="../../public/images/zj.png" width="45rpx" />
125
-          <span class="vanicon_text">证件管理</span>
126
-        </van-grid-item>
127
-        <van-grid-item to="/checkTake">
128
-          <img src="../../public/images/dt.png" width="45rpx" />
129
-          <span class="vanicon_text">逢查必考</span>
98
+          <span class="vanicon_text">检查任务</span>
130 99
         </van-grid-item>
131 100
         <van-grid-item to="/examtask" v-if="showCheckTake">
132 101
           <img src="../../public/images/zyqk.png" width="45rpx" />
133
-          <span class="vanicon_text">考试任务</span>
134
-        </van-grid-item>
135
-        <van-grid-item to="/class2" v-if="showCheckTake">
136
-          <img src="../../public/images/zyqk.png" width="45rpx" />
137
-          <span class="vanicon_text">学习课程管理</span>
138
-        </van-grid-item>
139
-
140
-
141
-        <van-grid-item to="/courseManagement" v-if="showCheckTake">
142
-          <img src="../../public/images/zyqk.png" width="45rpx" />
143
-          <span class="vanicon_text">课程管理</span>
102
+          <span class="vanicon_text">逢查必考</span>
144 103
         </van-grid-item>
145 104
       </van-grid>
146 105
     </div>
106
+
147 107
     <div class="card">
148
-      <div class="title">应急管理</div>
108
+      <div class="title">安全监督</div>
149 109
       <van-grid :border="false" :column-num="4">
150
-        <van-grid-item to="/institution/emergencyPlan">
151
-          <img src="../../public/images/yjya.png" width="45rpx" />
152
-          <span class="vanicon_text">应急预案</span>
153
-        </van-grid-item>
154
-        <van-grid-item to="/emergencyResources">
155
-          <img src="../../public/images/yj.png" width="45rpx" />
156
-          <span class="vanicon_text">应急物资</span>
157
-        </van-grid-item>
158
-        <van-grid-item to="/emergencyDrillPlan">
159
-          <img src="../../public/images/yjyl.png" width="45rpx" />
160
-          <span class="vanicon_text">应急演练</span>
161
-        </van-grid-item>
162
-        <van-grid-item to="/drillProcess">
163
-          <img src="../../public/images/drillProcess.png" width="45rpx" />
164
-          <span class="vanicon_text">掌上演练</span>
110
+        <van-grid-item to="/institution/riskList">
111
+          <img src="../../public/images/fx.png" width="45rpx" />
112
+          <span class="vanicon_text">风险分级管控记录</span>
165 113
         </van-grid-item>
166
-      </van-grid>
167
-    </div>
168
-    <div class="card">
169
-      <div class="title">项目管理</div>
170
-      <van-grid :border="false" :column-num="4">
171
-        <van-grid-item to="/projectManage/taiZhang">
172
-          <img src="../../public/images/xm.png" width="45rpx" />
173
-          <span class="vanicon_text">项目台账</span>
114
+        <van-grid-item to="/lvzhicx">
115
+          <img src="../../public/images/lzcx.png" width="45rpx" />
116
+          <span class="vanicon_text">履职查询</span>
174 117
         </van-grid-item>
175
-        <van-grid-item to="/projectManage/projectConstructionOperation">
176
-          <img src="../../public/images/xm.png" width="45rpx" />
177
-          <span class="vanicon_text">项目施工作业管理</span>
118
+        <van-grid-item to="/yinhuan/hdLedger">
119
+          <img src="../../public/images/yh.png" width="45rpx" />
120
+          <span class="vanicon_text">隐患台账</span>
178 121
         </van-grid-item>
179 122
         <van-grid-item to="/projectManage/projectWorkLedger">
180 123
           <img src="../../public/images/xm.png" width="45rpx" />
181 124
           <span class="vanicon_text">项目作业台账</span>
182 125
         </van-grid-item>
183
-        <van-grid-item to="/projectManage/todo">
184
-          <img src="../../public/images/yhdb.png" width="45rpx" />
185
-          <span class="vanicon_text">项目作业待办</span>
186
-        </van-grid-item>
187 126
       </van-grid>
188 127
     </div>
128
+
189 129
     <div class="card">
190
-      <div class="title">作业现场管控</div>
130
+      <div class="title">教育培训</div>
191 131
       <van-grid :border="false" :column-num="4">
192
-        <van-grid-item to="/safeClient">
193
-          <img src="../../public/images/zdgl.png" width="45rpx" />
194
-          <span class="vanicon_text">终端管理</span>
195
-        </van-grid-item>
196
-        <van-grid-item to="/jobCondition">
132
+        <van-grid-item to="/courseManagement" v-if="showCheckTake">
197 133
           <img src="../../public/images/zyqk.png" width="45rpx" />
198
-          <span class="vanicon_text">作业情况</span>
134
+          <span class="vanicon_text">课程管理</span>
199 135
         </van-grid-item>
200
-      </van-grid>
201
-    </div>
202
-    <div class="card">
203
-      <div class="title">事务汇报</div>
204
-      <van-grid :border="false" :column-num="4">
205
-        <van-grid-item to="/keyMatters">
206
-          <img src="../../public/images/keyMatters.png" width="45rpx" />
207
-          <span class="vanicon_text">重点事项</span>
136
+        <van-grid-item to="/class2" v-if="showCheckTake">
137
+          <img src="../../public/images/zyqk.png" width="45rpx" />
138
+          <span class="vanicon_text">在线学习考试</span>
208 139
         </van-grid-item>
209
-        <van-grid-item to="/planManagement">
210
-          <img src="../../public/images/planManagement.png" width="45rpx" />
211
-          <span class="vanicon_text">计划任务</span>
140
+        <van-grid-item to="/cardManager">
141
+          <img src="../../public/images/zj.png" width="45rpx" />
142
+          <span class="vanicon_text">证件管理</span>
212 143
         </van-grid-item>
213 144
       </van-grid>
214 145
     </div>
146
+
215 147
     <div class="card">
216
-      <div class="title">考核评价</div>
148
+      <div class="title">事故管理</div>
217 149
       <van-grid :border="false" :column-num="4">
218
-        <van-grid-item to="/performanceReview/units">
219
-          <img src="../../public/images/unitsPerformance.png" width="45rpx" />
220
-          <span class="vanicon_text">单位考核</span>
221
-        </van-grid-item>
222
-      </van-grid>
223
-    </div>
224
-    <div class="card">
225
-      <div class="title">考核管理</div>
226
-      <van-grid :border="false" :column-num="4" v-if="showCheckTakeN">
227
-        <van-grid-item to="/assRec">
228
-          <img src="../../public/images/zdgl.png" width="45rpx" />
229
-          <span class="vanicon_text">考核登记</span>
230
-        </van-grid-item>
231
-        <van-grid-item to="/assRecN" v-if="showCheckTakeN">
232
-          <img src="../../public/images/lzcx.png" width="45rpx" />
233
-          <span class="vanicon_text">考核记录</span>
150
+        <van-grid-item to="/accidentManager/accidentBaoGaoLedger/index">
151
+          <img src="../../public/images/sgbgtz.png" width="45rpx" />
152
+          <span class="vanicon_text">事故报告台账</span>
234 153
         </van-grid-item>
235
-      </van-grid>
236
-    </div>
237
-    <div class="card">
238
-      <div class="title">通知公告</div>
239
-      <van-grid :border="false" :column-num="4" v-if="showCheckTakeN">
240
-        <van-grid-item to="/annex">
241
-          <img src="../../public/images/zyqk.png" width="45rpx" />
242
-          <span class="vanicon_text">文件发布</span>
154
+        <van-grid-item to="/accidentManager/accidentJuBao/index">
155
+          <img src="../../public/images/sgjb.png" width="45rpx" />
156
+          <span class="vanicon_text">事故举报</span>
243 157
         </van-grid-item>
244
-        <van-grid-item to="/notice" v-if="showCheckTakeN">
245
-          <img src="../../public/images/yj.png" width="45rpx" />
246
-          <span class="vanicon_text">通知公告</span>
158
+        <van-grid-item v-if="true" to="/accidentManager/accidentJuBaoLedger/index">
159
+          <img src="../../public/images/sgjbtz.png" width="45rpx" />
160
+          <span class="vanicon_text">事故举报台账</span>
247 161
         </van-grid-item>
248 162
       </van-grid>
249 163
     </div>
250
-    <div class="card">
251
-      <div class="title">知识共享库</div>
252
-      <van-grid :border="false" :column-num="4" v-if="showCheckTakeN">
253
-        <van-grid-item to="/knowledge/accident">
254
-          <img src="../../public/images/zd.png" width="45rpx" />
255
-          <span class="vanicon_text">事故案例</span>
256
-        </van-grid-item>
257 164
 
258
-        <van-grid-item to="/knowledge/manager">
259
-          <img src="../../public/images/zd.png" width="45rpx" />
260
-          <span class="vanicon_text">管理案例</span>
261
-        </van-grid-item>
262
-        <van-grid-item to="/knowledge/Culture">
263
-          <img src="../../public/images/zd.png" width="45rpx" />
264
-          <span class="vanicon_text">安全环保文化</span>
265
-        </van-grid-item>
266
-        <van-grid-item to="/knowledge/project">
267
-          <img src="../../public/images/zd.png" width="45rpx" />
268
-          <span class="vanicon_text">项目案例</span>
269
-        </van-grid-item>
270
-      </van-grid>
271
-    </div>
272 165
     <div class="card">
273 166
       <div class="title">安环费用管理</div>
274 167
       <van-grid :border="false" :column-num="4" v-if="showCheckTakeN">
@@ -283,6 +176,19 @@
283 176
       </van-grid>
284 177
     </div>
285 178
 
179
+    <div class="card">
180
+      <div class="title">隐患有奖举报</div>
181
+      <van-grid :border="false" :column-num="4">
182
+        <van-grid-item to="/yinhuan/hdRwardReporting">
183
+          <img src="../../public/images/yhdb.png" width="45rpx" />
184
+          <span class="vanicon_text">隐患有奖举报</span>
185
+        </van-grid-item>
186
+        <van-grid-item to="/yinhuan/hdLedgerJuBao">
187
+          <img src="../../public/images/yh.png" width="45rpx" />
188
+          <span class="vanicon_text">隐患有奖举报台账</span>
189
+        </van-grid-item>
190
+      </van-grid>
191
+    </div>
286 192
   </div>
287 193
 
288 194
 </template>
@@ -311,15 +217,6 @@ if (userDesc == '贾俊臣' || userDesc == '张瑞楠' || userDesc == '刘焯')
311 217
   showCheckTakeN.value=true
312 218
 }
313 219
 
314
-/**
315
- * 修改最近使用的页面记录
316
- */
317
-const recentlyUsed = ref({
318
-  userCode: localStorage.getItem('userCode'),
319
-  menuIcon: '',
320
-  menuName: '',
321
-  jumpPath: ''
322
-});
323 220
 const userCode = localStorage.getItem('userCode');
324 221
 const handleClick = () => {
325 222
   console.log('111');
@@ -335,25 +232,24 @@ const handleClick = () => {
335 232
     }
336 233
   }, 500);
337 234
 };
338
-const getRecentlyUsed = () => {
339
-  const url = '/sgsafe/MenuRecentlyUsedMobile/updateMenuRecentlyUsedStatus';
235
+
236
+/**
237
+ * 修改最近使用的页面记录
238
+ */
239
+const getRecentlyUsed = (jumpPath) => {
240
+  const url = '/sgsafe/MenuRecentlyUsed/updateMenuRecentlyUsedStatus'
340 241
   const param = {
341
-    json: JSON.stringify(recentlyUsed.value)
342
-  };
343
-  proxy.$axios.post(url, param).then(res => {
242
+    jumpPath
243
+  }
244
+  proxy.$axios.post(url,param).then(res => {
344 245
     if (res.data.code !== 0) {
345
-      console.log('执行失败');
246
+      console.log('执行失败' + res.data.msg)
346 247
     }
347
-  });
348
-};
248
+  })
249
+}
349 250
 
350 251
 onBeforeRouteLeave((to, from) => {
351
-  recentlyUsed.value.jumpPath = to.path;
352
-  recentlyUsed.value.menuIcon = getPicPathByPath(to.path);
353
-  recentlyUsed.value.menuName = getNameByPath(to.path);
354
-  if (recentlyUsed.value.menuIcon) {
355
-    getRecentlyUsed();
356
-  }
252
+  getRecentlyUsed(to.path)
357 253
 });
358 254
 
359 255
 /**
@@ -364,12 +260,12 @@ const coincideNotList = ref([]);
364 260
 const queryMenuRecently = () => {
365 261
   const url = '/sgsafe/MenuRecentlyUsed/queryRecentlyUsed';
366 262
   const param = {
367
-    userCode: localStorage.getItem('userCode')
263
+    applicationId: 'c77da6a732d34400b24374e2cea811ee'
368 264
   };
369 265
   proxy.$axios.get(url, param).then(res => {
370 266
     functionList.value = res.data.data.map(item => ({
371 267
       title: item.menuName,
372
-      img: item.menuIcon,
268
+      img: 'images/' + item.menuIcon,
373 269
       jumpPath: item.jumpPath
374 270
     }));
375 271
 
@@ -404,78 +300,6 @@ const defaultPageList = ref([
404 300
   { title: '隐患待办', img: 'images/yhdb.png', jumpPath: '/yinhuan/todo' }
405 301
 ]);
406 302
 
407
-/**
408
- * 根据路由获取名称
409
- */
410
-const getNameByPath = (path) => {
411
-  const recentlyUsedMapping = {
412
-    '/institution/law': '法律法规',
413
-    '/institution/institutionRegime': '安全制度管理',
414
-    '/institution/institutionRule': '安全操作规程',
415
-    '/lvzhi': '履职记录',
416
-    '/lvzhicx': '履职查询',
417
-    '/institution/riskList': '风险分级管控记录',
418
-    '/yinhuan/registration': '隐患登记',
419
-    '/yinhuan/todo': '隐患待办',
420
-    '/yinhuan/hdLedger': '隐患台账',
421
-    '/safeCheck/task': '安全检查任务',
422
-    '/dailyproblem': '每日答题',
423
-    '/cardManager': '证件管理',
424
-    '/institution/emergencyPlan': '应急预案',
425
-    '/emergencyResources': '应急物资',
426
-    '/emergencyDrillPlan': '应急演练',
427
-    '/projectManage/taiZhang': '项目台账',
428
-    '/safeClient': '终端管理',
429
-    '/jobCondition': '作业情况',
430
-    '/yinhuan/riskChecklist': '隐患排查清单',
431
-    '/yinhuan/riskChecklistRecords': '隐患排查记录',
432
-    '/drillProcess': '掌上演练',
433
-    '/checkTake': '逢查必考',
434
-    '/projectManage/projectConstructionOperation': '项目施工作业管理',
435
-    '/projectManage/projectWorkLedger': '项目作业台账',
436
-    '/keyMatters': '重点事项',
437
-    '/planManagement': '计划任务',
438
-    '/performanceReview/units': '单位考核'
439
-
440
-  };
441
-  return recentlyUsedMapping[path];
442
-};
443
-
444
-/**
445
- * 根据路由获取图片路径
446
- */
447
-const getPicPathByPath = (path) => {
448
-  const recentlyUsedMapping = {
449
-    '/institution/law': 'images/fl.png',
450
-    '/institution/institutionRegime': 'images/aqzd.png',
451
-    '/institution/institutionRule': 'images/zd.png',
452
-    '/lvzhi': 'images/lz.png',
453
-    '/lvzhicx': 'images/lzcx.png',
454
-    '/institution/riskList': 'images/fx.png',
455
-    '/yinhuan/registration': 'images/yhdj.png',
456
-    '/yinhuan/todo': 'images/yhdb.png',
457
-    '/yinhuan/hdLedger': 'images/yh.png',
458
-    '/safeCheck/task': 'images/aq.png',
459
-    '/dailyproblem': 'images/dt.png',
460
-    '/cardManager': 'images/zj.png',
461
-    '/institution/emergencyPlan': 'images/yjya.png',
462
-    '/emergencyResources': 'images/yj.png',
463
-    '/emergencyDrillPlan': 'images/yjyl.png',
464
-    '/projectManage/taiZhang': 'images/xm.png',
465
-    '/safeClient': 'images/zdgl.png',
466
-    '/jobCondition': 'images/zyqk.png',
467
-    '/yinhuan/riskChecklist': 'images/riskChecklist.png',
468
-    '/yinhuan/riskChecklistRecords': 'images/riskChecklistRecords.png',
469
-    '/drillProcess': 'images/drillProcess.png',
470
-    '/checkTake': 'images/dt.png',
471
-    '/projectManage/projectConstructionOperation': 'images/xm.png',
472
-    '/projectManage/projectWorkLedger': 'images/xm.png',
473
-    '/keyMatters': 'images/keyMatters.png',
474
-    '/planManagement': 'images/planManagement.png',
475
-    '/performanceReview/units': 'images/unitsPerformance.png'
476
-  };
477
-  return recentlyUsedMapping[path];
478
-};
479 303
 
480 304
 /**
481 305
  * 测试消息

+ 2
- 4
src/view/dati/examCheck/addPeo.vue Vedi File

@@ -1,9 +1,7 @@
1 1
 <template>
2 2
   <div class="h5-container">
3
-    <van-nav-bar title="添加人员" @click-left="onClickLeft" @click-right="handleDepartmentLeaderName">
4
-      <template #right>
5
-        <van-icon name="add" size="25" color="#000" />
6
-      </template>
3
+    <van-nav-bar title="查看结果" @click-left="onClickLeft" @click-right="handleDepartmentLeaderName">
4
+
7 5
     </van-nav-bar>
8 6
 
9 7
     <!-- 项目列表 -->

+ 8
- 6
src/view/dati/examCheck/fcbkdatistart.vue Vedi File

@@ -227,6 +227,7 @@ const getExamContext = () => ({
227 227
   testType: route.query.testType || '',
228 228
   addId: route.query.addId || '',
229 229
   userDesc: userDesc,
230
+  userName:localStorage.getItem('userDesc')
230 231
 
231 232
 });
232 233
 
@@ -255,7 +256,7 @@ const handData = ref({});
255 256
 const saveChecUser = async () => {
256 257
   const examContext = getExamContext();
257 258
   console.log("接到的参数:",examContext);
258
-  var url = '/sgsafe/ExamHead/saveChecUser';
259
+  var url = '/sgsafe/ExamHead/showsaveChecUser';
259 260
   var param = {
260 261
     params: JSON.stringify(examContext)
261 262
   };
@@ -270,8 +271,9 @@ const saveChecUser = async () => {
270 271
 }
271 272
 //获取试卷
272 273
 const getForm = async () => {
274
+  console.log("后端返回的参数为:",handData.value);
273 275
   console.log("headId为",handData.value.id);
274
-  var url = '/sgsafe/ExamLine/query'
276
+  var url = '/sgsafe/ExamLine/showquery'
275 277
   const query1 = ref({
276 278
     headId:   handData.value.id
277 279
   })
@@ -361,7 +363,7 @@ const submitForm = async () => {
361 363
   try {
362 364
     let answers = getUserAnswers();
363 365
     //console.log('answers.value', answers)
364
-    var url = '/sgsafe/ExamLine/appSaveMyScore'
366
+    var url = '/sgsafe/ExamLine/showappSaveMyScore'
365 367
     var param = {
366 368
       json: JSON.stringify(
367 369
         answers
@@ -384,7 +386,7 @@ const submitForm = async () => {
384 386
     const day = String(today.getDate()).padStart(2, '0');
385 387
     const todayStr = `${year}-${month}-${day}`;// ✅ 来自 saveChecUser 返回
386 388
     //开始判卷
387
-    var url2 = '/sgsafe/Package/doProc'
389
+    var url2 = '/sgsafe/Package/showdoProc'
388 390
     var param2 = {
389 391
       procName: 'safeplat.sxsp_grade_exam_p',
390 392
       param: JSON.stringify([courseId])
@@ -403,7 +405,7 @@ const submitForm = async () => {
403 405
     overlayloading.value = false;
404 406
 
405 407
     //查询本日答题次数和分数
406
-    var url3 = '/sgsafe/DailyExam/appQueryMyScore'
408
+    var url3 = '/sgsafe/DailyExam/showappQueryMyScore'
407 409
     const query3 = ref({
408 410
       userId: userId,
409 411
       examDate: todayStr,
@@ -416,7 +418,7 @@ const submitForm = async () => {
416 418
     if (res3.data.code === 0) {
417 419
       console.log(res3.data)
418 420
       if (res3.data.data.dailyExamList.length==0){
419
-        var url4='/sgsafe/ExamHead/queryByheadId'
421
+        var url4='/sgsafe/ExamHead/showqueryByheadId'
420 422
         var param4 = {
421 423
           headId: courseId
422 424
         }

+ 20
- 3
src/view/dati/examCheck/index.vue Vedi File

@@ -40,7 +40,9 @@
40 40
 
41 41
             <template #right>
42 42
               <van-button  square class="delete-button" text="删除" @click="handleDelete(item)" />
43
-              <van-button  square class="submit-button" text="添加人员" @click="goaddPeo(item)" />
43
+              <van-button  square class="submit-button" text="查看结果" @click="goaddPeo1(item)" />
44
+              <van-button square class="submit-button" text="二维码_" @click="goaddPeo(item)" />
45
+
44 46
             </template>
45 47
           </van-swipe-cell>
46 48
         </div>
@@ -178,7 +180,14 @@ const goaddPeo = async (item) => {
178 180
     Toast('二维码生成失败,请重试');
179 181
   }
180 182
 };
181
-
183
+const goaddPeo1 = (item) => {
184
+  router.push({
185
+    path: '/addPeo',
186
+    query: {
187
+      data: JSON.stringify(item)
188
+    }
189
+  })
190
+}
182 191
 const edits = (row) => {
183 192
   kz.value = true;
184 193
   form.value = { ...row };
@@ -881,8 +890,16 @@ const closeSwipe = (idx) => {
881 890
   background-image: url('@/assets/img/sub.png');
882 891
   background-size: auto 100%;
883 892
   background-repeat: no-repeat;
884
-}
885 893
 
894
+}
895
+.edit-button {
896
+  height: 100%;
897
+  border: none;
898
+  color: #F9CC9D;
899
+  background-image: url('@/assets/img/edit.png');
900
+  background-size: auto 100%;
901
+  background-repeat: no-repeat;
902
+}
886 903
 .subsuccess {
887 904
   height: 100%;
888 905
   border: none;

+ 242
- 0
src/view/login/Register.vue Vedi File

@@ -0,0 +1,242 @@
1
+<template>
2
+  <div class="login-container">
3
+    <div class="login-content">
4
+      <div class="login-box">
5
+        <div class="login-header">
6
+          <img src="../../assets/logo.png" alt="logo" class="logo" />
7
+          <h2>请填写您的信息</h2>
8
+          <p class="subtitle">用于记录考试参与情况</p>
9
+        </div>
10
+
11
+        <van-form @submit="onSubmit" class="login-form">
12
+          <van-cell-group inset>
13
+            <van-field
14
+              v-model="formData.userCode"
15
+              name="userCode"
16
+              placeholder="请输入您的工号"
17
+              :rules="[{ required: true, message: '请输入工号' }]"
18
+            >
19
+              <template #left-icon>
20
+                <van-icon name="idcard-o" />
21
+              </template>
22
+            </van-field>
23
+            <van-field
24
+              v-model="formData.userName"
25
+              name="userName"
26
+              placeholder="请输入您的姓名"
27
+              :rules="[{ required: true, message: '请输入姓名' }]"
28
+            >
29
+              <template #left-icon>
30
+                <van-icon name="contact" />
31
+              </template>
32
+            </van-field>
33
+          </van-cell-group>
34
+          <div class="submit-btn">
35
+            <van-button
36
+              round
37
+              block
38
+              type="primary"
39
+              native-type="submit"
40
+              :loading="isLoading"
41
+            >
42
+              确认进入
43
+            </van-button>
44
+          </div>
45
+        </van-form>
46
+      </div>
47
+    </div>
48
+  </div>
49
+</template>
50
+
51
+<script setup lang="ts">
52
+import { ref } from 'vue'
53
+import { useRouter, useRoute } from 'vue-router'
54
+import { showToast } from 'vant'
55
+import axios from '@/axios'
56
+const router = useRouter()
57
+const route = useRoute()
58
+const isLoading = ref(false)
59
+
60
+const formData = ref({
61
+  userCode: '',
62
+  userName: ''
63
+})
64
+
65
+async function onSubmit() {
66
+  if (!formData.value.userCode.trim() || !formData.value.userName.trim()) {
67
+    showToast('请完整填写工号和姓名')
68
+    return
69
+  }
70
+
71
+  try {
72
+    isLoading.value = true
73
+   /* const userId=ref('C19810FBCBD111B2B2FA58EA818C71F9')
74
+
75
+    var url = 'framework/SysLogin/queryPublicKeyToken'
76
+    // var url = 'framework/SysLogin/queryPublicKey'
77
+    var param = {
78
+      param: userId.value
79
+    }
80
+    await axios.post(url, param).then(response => {
81
+
82
+      localStorage.setItem('publicKey', response.data.data.publicKey)
83
+      localStorage.setItem('userId', response.data.data.id)
84
+      localStorage.setItem('userCode', formData.value.userCode.trim())
85
+      localStorage.setItem('userName', response.data.data.userName)
86
+      localStorage.setItem('userDesc', formData.value.userName.trim())
87
+      localStorage.setItem('userType', response.data.data.userType)
88
+      localStorage.setItem('token', response.data.data.token)
89
+      localStorage.setItem('belongId', response.data.data.belongId)
90
+    })*/
91
+
92
+    localStorage.setItem('userDesc', formData.value.userName.trim())
93
+    localStorage.setItem('userCode', formData.value.userCode.trim())
94
+    showToast({
95
+      type: 'success',
96
+      message: '信息提交成功'
97
+    })
98
+
99
+    // 跳回原扫码页面(/fcbkdatistart),保留原始 query 参数
100
+    // 注意:route.query 中应包含 examId, testRole 等参数(如果从该页跳转而来)
101
+    // 如果不是从 fcbkdatistart 进来的,可默认跳首页或提示
102
+
103
+    const targetPath = '/fcbkdatistart'
104
+    const originalQuery = route.query // 如果是从 fcbkdatistart 跳过来的,query 会保留
105
+    console.log("携带参数:",originalQuery);
106
+
107
+    // 更健壮的方式:检查是否有必要参数,否则跳首页
108
+    if (originalQuery.examId) {
109
+
110
+      await router.replace({ path: targetPath, query: originalQuery })
111
+    } else {
112
+      await router.push('/Home1')
113
+    }
114
+  } catch (error) {
115
+    console.error('游客信息提交失败:', error)
116
+    showToast('提交失败,请重试')
117
+  } finally {
118
+    isLoading.value = false
119
+  }
120
+}
121
+</script>
122
+
123
+<style lang="scss" scoped>
124
+/* 样式保持不变,仅微调标题 */
125
+.login-container {
126
+  height: 100vh;
127
+  width: 100vw;
128
+  display: flex;
129
+  align-items: center;
130
+  justify-content: center;
131
+  background: linear-gradient(135deg, #1890ff 0%, #1d39c4 100%);
132
+  position: relative;
133
+  overflow: hidden;
134
+
135
+  &::before {
136
+    content: '';
137
+    position: absolute;
138
+    width: 200%;
139
+    height: 200%;
140
+    top: -50%;
141
+    left: -50%;
142
+    background: url('@/assets/login-bg.svg') repeat;
143
+    opacity: 0.1;
144
+    animation: move 10s linear infinite;
145
+  }
146
+}
147
+
148
+.login-content {
149
+  position: relative;
150
+  z-index: 1;
151
+  width: 100%;
152
+  padding: 20px;
153
+}
154
+
155
+.login-box {
156
+  width: 100%;
157
+  max-width: 400px;
158
+  margin: 0 auto;
159
+  padding: 30px 24px;
160
+  background: rgba(255, 255, 255, 0.9);
161
+  backdrop-filter: blur(10px);
162
+  border-radius: 16px;
163
+  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
164
+
165
+  .login-header {
166
+    text-align: center;
167
+    margin-bottom: 32px;
168
+
169
+    .logo {
170
+      width: 64px;
171
+      height: 64px;
172
+      margin-bottom: 16px;
173
+    }
174
+
175
+    h2 {
176
+      font-size: 24px;
177
+      color: #1a1a1a;
178
+      margin: 0 0 8px;
179
+      font-weight: 600;
180
+    }
181
+
182
+    .subtitle {
183
+      font-size: 14px;
184
+      color: #666;
185
+      margin: 0;
186
+    }
187
+  }
188
+
189
+  :deep(.van-cell-group) {
190
+    background: transparent;
191
+
192
+    .van-field {
193
+      background: rgba(255, 255, 255, 0.8);
194
+      border-radius: 8px;
195
+      margin-bottom: 16px;
196
+
197
+      &:last-child {
198
+        margin-bottom: 0;
199
+      }
200
+
201
+      .van-field__left-icon {
202
+        margin-right: 8px;
203
+        color: #666;
204
+      }
205
+    }
206
+  }
207
+
208
+  .submit-btn {
209
+    margin-top: 24px;
210
+
211
+    .van-button {
212
+      height: 44px;
213
+      font-size: 16px;
214
+      background: linear-gradient(135deg, #1890ff 0%, #1d39c4 100%);
215
+      border: none;
216
+
217
+      &--loading {
218
+        opacity: 0.8;
219
+      }
220
+    }
221
+  }
222
+}
223
+
224
+@keyframes move {
225
+  0% {
226
+    transform: translate(0, 0);
227
+  }
228
+  100% {
229
+    transform: translate(-50%, -50%);
230
+  }
231
+}
232
+
233
+@media screen and (max-width: 480px) {
234
+  .login-box {
235
+    padding: 24px 16px;
236
+
237
+    .login-header h2 {
238
+      font-size: 20px;
239
+    }
240
+  }
241
+}
242
+</style>

Loading…
Annulla
Salva