Quellcode durchsuchen

归档相关内容

miaofuhao vor 1 Monat
Ursprung
Commit
d29fa0342c
33 geänderte Dateien mit 2844 neuen und 1663 gelöschten Zeilen
  1. 3 1
      apps/web-ele/.env.development
  2. 22 0
      apps/web-ele/src/api/archive/HSSE/HSSE.ts
  3. 76 0
      apps/web-ele/src/api/archive/HSSE/model.ts
  4. 22 0
      apps/web-ele/src/api/archive/figuresManage/figuresManage.ts
  5. 45 0
      apps/web-ele/src/api/archive/figuresManage/model.ts
  6. 466 1
      apps/web-ele/src/api/archive/operationsManagement/model.ts
  7. 118 1
      apps/web-ele/src/api/archive/operationsManagement/operationsManagement.ts
  8. 1 1
      apps/web-ele/src/api/system/infoEntry/certificateSetting/certificateSetting.ts
  9. 1 1
      apps/web-ele/src/router/routes/local.ts
  10. 163 101
      apps/web-ele/src/views/Archive/HSSEManage/emergencyDrill/config-data.tsx
  11. 45 30
      apps/web-ele/src/views/Archive/HSSEManage/emergencyDrill/index.vue
  12. 38 23
      apps/web-ele/src/views/Archive/figuresManage/oilGunTement/index.vue
  13. 162 140
      apps/web-ele/src/views/Archive/figuresManage/oilGunTement/oilGunTement-data.tsx
  14. 134 149
      apps/web-ele/src/views/Archive/operationsManagement/competitivePricingSurvey/config-data.tsx
  15. 212 0
      apps/web-ele/src/views/Archive/operationsManagement/competitivePricingSurvey/config-data2.tsx
  16. 17 19
      apps/web-ele/src/views/Archive/operationsManagement/competitivePricingSurvey/index.vue
  17. 194 122
      apps/web-ele/src/views/Archive/operationsManagement/competitiveSalesSurvey/config-data.tsx
  18. 24 22
      apps/web-ele/src/views/Archive/operationsManagement/competitiveSalesSurvey/index.vue
  19. 142 101
      apps/web-ele/src/views/Archive/operationsManagement/licenseTaskManagement/config-data.tsx
  20. 60 30
      apps/web-ele/src/views/Archive/operationsManagement/licenseTaskManagement/index.vue
  21. 131 100
      apps/web-ele/src/views/Archive/operationsManagement/managementPlan/config-data.tsx
  22. 60 29
      apps/web-ele/src/views/Archive/operationsManagement/managementPlan/index.vue
  23. 3 2
      apps/web-ele/src/views/Archive/operationsManagement/operationsInspection/index.vue
  24. 141 100
      apps/web-ele/src/views/Archive/operationsManagement/teamLog/config-data.tsx
  25. 60 30
      apps/web-ele/src/views/Archive/operationsManagement/teamLog/index.vue
  26. 197 172
      apps/web-ele/src/views/Archive/operationsManagement/turningRateSurvey/config-data.tsx
  27. 60 31
      apps/web-ele/src/views/Archive/operationsManagement/turningRateSurvey/index.vue
  28. 100 62
      apps/web-ele/src/views/Archive/visitorFeedback/collectAttach/collectAttach-data.tsx
  29. 26 166
      apps/web-ele/src/views/Archive/visitorFeedback/collectAttach/index.vue
  30. 21 158
      apps/web-ele/src/views/Archive/visitorFeedback/photoTask/index.vue
  31. 94 67
      apps/web-ele/src/views/Archive/visitorFeedback/photoTask/photoTask-data.tsx
  32. 4 2
      apps/web-ele/src/views/Archive/visitorFeedback/visitorCheckTask/index.vue
  33. 2 2
      apps/web-ele/src/views/Archive/visitorFeedback/visitorCheckTask/visitorCheckTask-data.tsx

+ 3 - 1
apps/web-ele/.env.development

@@ -5,10 +5,12 @@ VITE_BASE=/
5 5
 
6 6
 # 接口地址
7 7
 
8
-VITE_GLOB_API_URL=http://localhost:8080
8
+VITE_GLOB_API_URL=http://39.164.159.226:8088
9
+# VITE_GLOB_API_URL=http://localhost:8080
9 10
 # VITE_GLOB_API_URL=http://192.168.1.7:8080
10 11
 # VITE_GLOB_API_URL=http://192.168.1.170:8080
11 12
 # VITE_GLOB_FLOW_URL=http://192.168.31.160:8082
13
+
12 14
 VITE_GLOB_FLOW_URL=http://192.168.1.21:8082
13 15
 
14 16
 # 是否开启 Nitro Mock服务,true 为开启,false 为关

+ 22 - 0
apps/web-ele/src/api/archive/HSSE/HSSE.ts

@@ -0,0 +1,22 @@
1
+import type { EmergencyDrillModel } from './model';
2
+
3
+import type { BaseResult } from '#/api/base-result';
4
+
5
+import { requestClient } from '#/api/request';
6
+
7
+// API路径常量枚举
8
+enum Api {
9
+  // 应急演练列表
10
+  emergencyDrillList = '/formEmergencyDrill/drill/list',
11
+}
12
+
13
+/**
14
+ * 查询应急演练列表
15
+ * @param params 查询参数
16
+ * @returns 应急演练列表
17
+ */
18
+export function getEmergencyDrillList(params: any) {
19
+  return requestClient.get<BaseResult<EmergencyDrillModel[]>>(Api.emergencyDrillList, {
20
+    params,
21
+  });
22
+}

+ 76 - 0
apps/web-ele/src/api/archive/HSSE/model.ts

@@ -0,0 +1,76 @@
1
+export interface EmergencyDrillModel {
2
+  // 主键id
3
+  id?: number;
4
+  // 任务类型
5
+  type?: string;
6
+  // 片区id
7
+  areaId?: number;
8
+  // 油站ID
9
+  stationId?: number;
10
+  // 任务id
11
+  taskId?: number;
12
+  // 任务名称
13
+  taskName?: string;
14
+  // 执行人ID
15
+  executorId?: number;
16
+  // 执行人姓名
17
+  executorName?: string;
18
+  // 岗位
19
+  position?: number;
20
+  // 是否评论0否1是
21
+  isComment?: number;
22
+  // 创建类型0系统1新增
23
+  createType?: number;
24
+  // 评论id
25
+  commentId?: number;
26
+  // 截止时间
27
+  deadline?: string;
28
+  // 处理时间
29
+  processTime?: string;
30
+  // 完成状态: 0-按时完成, 1-逾期完成
31
+  completionStatus?: number;
32
+  // 逻辑删除标识
33
+  delFlag?: number;
34
+  // 应急演练名称
35
+  drillName?: string;
36
+  // 演练时间
37
+  drillTime?: string;
38
+  // 演练地点/装置
39
+  drillLocation?: string;
40
+  // 参加人数
41
+  participantsCount?: number;
42
+  // 总人数
43
+  totalCount?: number;
44
+  // 组织部门
45
+  organizationDepartment?: string;
46
+  // 物资准备
47
+  materialPreparation?: string;
48
+  // 演练目的
49
+  drillPurpose?: string;
50
+  // 事件/事故现场假定
51
+  accidentAssumption?: string;
52
+  // 演练方案简述
53
+  drillPlanSummary?: string;
54
+  // 演练注意事项及要求
55
+  precautions?: string;
56
+  // 演练方案提交时间
57
+  planSubmitTime?: string;
58
+  // 演练方案是否提交
59
+  isSubmitPlan?: number;
60
+  // 演练评估
61
+  drillEvaluation?: string;
62
+  // 简述演练的主要内容
63
+  mainContent?: string;
64
+  // 演练过程存在的问题
65
+  existingProblems?: string;
66
+  // 针对问题的改进措施
67
+  improvementMeasures?: string;
68
+  // 经理点评
69
+  managerComment?: string;
70
+  // 图片URL数组
71
+  images?: string;
72
+  // 评估提交时间
73
+  evaluationSubmitTime?: string;
74
+  // 评估是否提交
75
+  isSubmitEvaluation?: number;
76
+}

+ 22 - 0
apps/web-ele/src/api/archive/figuresManage/figuresManage.ts

@@ -0,0 +1,22 @@
1
+import type { GunSelfCheckModel } from './model';
2
+
3
+import type { BaseResult } from '#/api/base-result';
4
+
5
+import { requestClient } from '#/api/request';
6
+
7
+// API路径常量枚举
8
+enum Api {
9
+  // 油枪自检列表
10
+  gunSelfCheckList = '/formGunSelfCheck/check/list',
11
+}
12
+
13
+/**
14
+ * 查询油枪自检列表
15
+ * @param params 查询参数
16
+ * @returns 油枪自检列表
17
+ */
18
+export function getGunSelfCheckList(params: any) {
19
+  return requestClient.get<BaseResult<GunSelfCheckModel[]>>(Api.gunSelfCheckList, {
20
+    params,
21
+  });
22
+}

+ 45 - 0
apps/web-ele/src/api/archive/figuresManage/model.ts

@@ -0,0 +1,45 @@
1
+export interface FormGunSelfCheckRecord {
2
+  id?: number;
3
+  gunId?: number;
4
+  gunNumber?: string;
5
+  checkResult?: number;
6
+  problemDescription?: string;
7
+  repairStatus?: number;
8
+}
9
+
10
+export interface GunSelfCheckModel {
11
+  // 主键id
12
+  id?: number;
13
+  // 任务类型
14
+  type?: string;
15
+  // 片区id
16
+  areaId?: number;
17
+  // 油站ID
18
+  stationId?: number;
19
+  // 任务id
20
+  taskId?: number;
21
+  // 任务名称
22
+  taskName?: string;
23
+  // 执行人ID
24
+  executorId?: number;
25
+  // 执行人姓名
26
+  executorName?: string;
27
+  // 岗位
28
+  position?: number;
29
+  // 是否评论0否1是
30
+  isComment?: number;
31
+  // 创建类型0系统1新增
32
+  createType?: number;
33
+  // 评论id
34
+  commentId?: number;
35
+  // 截止时间
36
+  deadline?: string;
37
+  // 处理时间
38
+  processTime?: string;
39
+  // 完成状态: 0-按时完成, 1-逾期完成
40
+  completionStatus?: number;
41
+  // 逻辑删除标识
42
+  delFlag?: number;
43
+  // 油枪自检记录
44
+  records?: FormGunSelfCheckRecord[];
45
+}

+ 466 - 1
apps/web-ele/src/api/archive/operationsManagement/model.ts

@@ -47,4 +47,469 @@ export interface TaskCheckModel {
47 47
   updateBy?: string;
48 48
   // 更新时间
49 49
   updateTime?: string;
50
-}
50
+}
51
+
52
+export interface TaskPhotoModel {
53
+  // 主键id
54
+  id?: number;
55
+  // 任务类型
56
+  type?: string;
57
+  // 片区id
58
+  areaId?: number;
59
+  // 油站ID
60
+  stationId?: number;
61
+  // 任务id
62
+  taskId?: number;
63
+  // 任务名称
64
+  taskName?: string;
65
+  // 执行人ID
66
+  executorId?: number;
67
+  // 执行人姓名
68
+  executorName?: string;
69
+  // 岗位
70
+  position?: number;
71
+  // 是否评论0否1是
72
+  isComment?: number;
73
+  // 创建类型0系统1新增
74
+  createType?: number;
75
+  // 描述
76
+  description?: string;
77
+  // 评论id
78
+  commentId?: string;
79
+  // 截止时间
80
+  deadline?: string;
81
+  // 处理时间
82
+  processTime?: string;
83
+  // 完成状态: 0-按时完成, 1-逾期完成
84
+  completionStatus?: number;
85
+  // 附件多个附件中间用逗号隔开
86
+  attachment?: string;
87
+  // 逻辑删除标识
88
+  delFlag?: number;
89
+}
90
+
91
+export interface FormOilPriceRecord {
92
+  // 油价记录相关字段
93
+  id?: number;
94
+  oilType?: string;
95
+  price?: number;
96
+  competitorId?: number;
97
+}
98
+
99
+export interface CompetitorMarketingSurveyModel {
100
+  // 主键id
101
+  id?: number;
102
+  // 竞争油站id
103
+  competitorId?: number;
104
+  // 竞争油站名称
105
+  competitorName?: string;
106
+  // 是否是竞争油站0否1是
107
+  isCompetitor?: number;
108
+  // 调查日期
109
+  surveyDate?: string;
110
+  // 优惠活动描述
111
+  promotionActivities?: string;
112
+  // 增值服务
113
+  valueAddedServices?: string;
114
+  // 油站设备配置变化
115
+  equipmentConfigChanges?: string;
116
+  // 场站性质编码
117
+  stationNatureCode?: string;
118
+  // 竞争关系编码
119
+  competitiveRelationCode?: string;
120
+  // 与我方场站距离(KM)
121
+  distanceKm?: number;
122
+  // 油站油价记录
123
+  formOilPriceRecords?: FormOilPriceRecord[];
124
+}
125
+
126
+export interface CompetitorSalesSurveyModel {
127
+  // 主键id
128
+  id?: number;
129
+  // 调查开始时间
130
+  surveyStartTime?: string;
131
+  // 调查结束时间
132
+  surveyEndTime?: string;
133
+  // 竞争油站id
134
+  competitorId?: number;
135
+  // 竞争油站名称
136
+  competitorName?: string;
137
+  // 汽油车进站车次
138
+  gasolineVehicleCount?: number;
139
+  // 汽油车加油升数差(升)
140
+  gasolineVolumeDiff?: number;
141
+  // 柴油车进站车次
142
+  dieselVehicleCount?: number;
143
+  // 柴油车加油升数差(升)
144
+  dieselVolumeDiff?: number;
145
+  // 摩托车进站车次
146
+  motorcycleCount?: number;
147
+  // 摩托车加油升数差(升)
148
+  motorcycleVolumeDiff?: number;
149
+  // 气车进站车次
150
+  gasVehicleCount?: number;
151
+  // 气车加油升数差(升)
152
+  gasVolumeDiff?: number;
153
+  // 时段预测销量差(升)
154
+  periodForecastDiff?: number;
155
+  // 全天预测销量差(升)
156
+  dailyForecastDiff?: number;
157
+  // 汽油调查销量(升)
158
+  gasolineSurveyVolume?: number;
159
+  // 柴油调查销量(升)
160
+  dieselSurveyVolume?: number;
161
+  // 是否是竞争油站0否1是
162
+  isCompetitor?: number;
163
+}
164
+
165
+export interface TurnInRateSurveyModel {
166
+  // 主键id
167
+  id?: number;
168
+  // 任务类型
169
+  type?: string;
170
+  // 片区id
171
+  areaId?: number;
172
+  // 油站ID
173
+  stationId?: number;
174
+  // 任务id
175
+  taskId?: number;
176
+  // 任务名称
177
+  taskName?: string;
178
+  // 执行人ID
179
+  executorId?: number;
180
+  // 执行人姓名
181
+  executorName?: string;
182
+  // 岗位
183
+  position?: number;
184
+  // 是否评论0否1是
185
+  isComment?: number;
186
+  // 创建类型0系统1新增
187
+  createType?: number;
188
+  // 评论id
189
+  commentId?: number;
190
+  // 截止时间
191
+  deadline?: string;
192
+  // 处理时间
193
+  processTime?: string;
194
+  // 完成状态: 0-按时完成, 1-逾期完成
195
+  completionStatus?: number;
196
+  // 逻辑删除标识
197
+  delFlag?: number;
198
+  // 调查开始时间
199
+  surveyStartTime?: string;
200
+  // 竞争油站id
201
+  competitorId?: number;
202
+  // 竞争油站名称
203
+  competitorName?: string;
204
+  // 调查结束时间
205
+  surveyEndTime?: string;
206
+  // 汽油车路面车流(辆)
207
+  gasRoadFlow?: number;
208
+  // 汽油车进站车流(辆)
209
+  gasInFlow?: number;
210
+  // 柴油车路面车流(辆)
211
+  dieselRoadFlow?: number;
212
+  // 柴油车进站车流(辆)
213
+  dieselInFlow?: number;
214
+  // 摩托车路面车流(辆)
215
+  motorcycleRoadFlow?: number;
216
+  // 摩托车进站车流(辆)
217
+  motorcycleInFlow?: number;
218
+  // 是否是竞争油站0否1是
219
+  isCompetitor?: number;
220
+}
221
+
222
+export interface LicenseTaskModel {
223
+  // 主键id
224
+  id?: number;
225
+  // 任务类型
226
+  type?: string;
227
+  // 片区id
228
+  areaId?: number;
229
+  // 油站ID
230
+  stationId?: number;
231
+  // 任务id
232
+  taskId?: number;
233
+  // 任务名称
234
+  taskName?: string;
235
+  // 执行人ID
236
+  executorId?: number;
237
+  // 执行人姓名
238
+  executorName?: string;
239
+  // 岗位
240
+  position?: number;
241
+  // 是否评论0否1是
242
+  isComment?: number;
243
+  // 创建类型0系统1新增
244
+  createType?: number;
245
+  // 评论id
246
+  commentId?: number;
247
+  // 截止时间
248
+  deadline?: string;
249
+  // 处理时间
250
+  processTime?: string;
251
+  // 完成状态: 0-按时完成, 1-逾期完成
252
+  completionStatus?: number;
253
+  // 逻辑删除标识
254
+  delFlag?: number;
255
+  // 证照规则id
256
+  licenseRuleId?: number;
257
+  // 证照名称
258
+  licenseName?: string;
259
+  // 任务类型年审任务或换证任务
260
+  taskType?: string;
261
+}
262
+
263
+export interface SysEvaluation {
264
+  id?: number;
265
+  name?: string;
266
+  score?: number;
267
+}
268
+
269
+export interface SysEvaluationRecord {
270
+  id?: number;
271
+  evaluationId?: number;
272
+  score?: number;
273
+  comment?: string;
274
+}
275
+
276
+export interface TeamShiftLogModel {
277
+  // 主键id
278
+  id?: number;
279
+  // 任务类型
280
+  type?: string;
281
+  // 片区id
282
+  areaId?: number;
283
+  // 油站ID
284
+  stationId?: number;
285
+  // 任务id
286
+  taskId?: number;
287
+  // 任务名称
288
+  taskName?: string;
289
+  // 执行人ID
290
+  executorId?: number;
291
+  // 执行人姓名
292
+  executorName?: string;
293
+  // 岗位
294
+  position?: number;
295
+  // 是否评论0否1是
296
+  isComment?: number;
297
+  // 创建类型0系统1新增
298
+  createType?: number;
299
+  // 评论id
300
+  commentId?: number;
301
+  // 截止时间
302
+  deadline?: string;
303
+  // 处理时间
304
+  processTime?: string;
305
+  // 完成状态: 0-按时完成, 1-逾期完成
306
+  completionStatus?: number;
307
+  // 逻辑删除标识
308
+  delFlag?: number;
309
+  // 上班日期
310
+  shiftDate?: string;
311
+  // 上班班次
312
+  shiftId?: string;
313
+  // 天气
314
+  weather?: string;
315
+  // 促品完成率(%)
316
+  promotionCompletionRate?: number;
317
+  // 其它信息
318
+  otherInfo?: string;
319
+  // 当班负责人ID
320
+  shiftLeaderId?: number;
321
+  // 当班负责人姓名
322
+  shiftLeaderName?: string;
323
+  // 班员姓名(JSON数组格式)
324
+  shiftMembers?: string;
325
+  // 列队检查(仪容仪表、精神面貌)
326
+  lineupCheck?: string;
327
+  // 前期工作回顾
328
+  previousWorkReview?: string;
329
+  // 贵重物品盘点
330
+  valuableInventory?: string;
331
+  // 设备物料盘点
332
+  equipmentInventory?: string;
333
+  // 赠品盘点
334
+  giftInventory?: string;
335
+  // 车辆指引
336
+  vehicleGuidance?: string;
337
+  // 油机清洁
338
+  fuelMachineCleaning?: string;
339
+  // 前庭清洁
340
+  forecourtCleaning?: string;
341
+  // 卫生间清洁
342
+  toiletCleaning?: string;
343
+  // 便利店清洁
344
+  storeCleaning?: string;
345
+  // 垃圾处理
346
+  garbageDisposal?: string;
347
+  // 其它分工
348
+  otherDivision?: string;
349
+  // 重点强化(重点工作指引,服务手势操及全员演练)
350
+  keyEnhancement?: string;
351
+  // 营造氛围(齐喊口号,鼓舞斗志)
352
+  atmosphereBuilding?: string;
353
+  // 班组总结
354
+  teamSummary?: string;
355
+  // 班前会拍照现场
356
+  meetingPhotos?: string;
357
+  // 班后待跟进事项
358
+  followUpItems?: string;
359
+  // 评语
360
+  evaluationComments?: string;
361
+  // 评价项
362
+  evaluations?: SysEvaluation[];
363
+  // 评价记录
364
+  evaluationRecords?: SysEvaluationRecord[];
365
+}
366
+
367
+export interface TaskAttachmentModel {
368
+  // 主键id
369
+  id?: number;
370
+  // 任务类型
371
+  type?: string;
372
+  // 片区id
373
+  areaId?: number;
374
+  // 油站ID
375
+  stationId?: number;
376
+  // 任务id
377
+  taskId?: number;
378
+  // 任务名称
379
+  taskName?: string;
380
+  // 执行人ID
381
+  executorId?: number;
382
+  // 执行人姓名
383
+  executorName?: string;
384
+  // 岗位
385
+  position?: number;
386
+  // 是否评论0否1是
387
+  isComment?: number;
388
+  // 创建类型0系统1新增
389
+  createType?: number;
390
+  // 评论id
391
+  commentId?: number;
392
+  // 截止时间
393
+  deadline?: string;
394
+  // 处理时间
395
+  processTime?: string;
396
+  // 完成状态: 0-按时完成, 1-逾期完成
397
+  completionStatus?: number;
398
+  // 附件名称
399
+  attachmentName?: string;
400
+  // 附件路径
401
+  attachment?: string;
402
+  // 逻辑删除标识
403
+  delFlag?: number;
404
+  // 设备物料盘点
405
+  equipmentInventory?: string;
406
+  // 赠品盘点
407
+  giftInventory?: string;
408
+  // 车辆指引
409
+  vehicleGuidance?: string;
410
+  // 油机清洁
411
+  fuelMachineCleaning?: string;
412
+  // 前庭清洁
413
+  forecourtCleaning?: string;
414
+  // 卫生间清洁
415
+  toiletCleaning?: string;
416
+  // 便利店清洁
417
+  storeCleaning?: string;
418
+  // 垃圾处理
419
+  garbageDisposal?: string;
420
+  // 其它分工
421
+  otherDivision?: string;
422
+  // 重点强化(重点工作指引,服务手势操及全员演练)
423
+  keyEnhancement?: string;
424
+  // 营造氛围(齐喊口号,鼓舞斗志)
425
+  atmosphereBuilding?: string;
426
+  // 班组总结
427
+  teamSummary?: string;
428
+  // 班前会拍照现场
429
+  meetingPhotos?: string;
430
+  // 班后待跟进事项
431
+  followUpItems?: string;
432
+  // 评语
433
+  evaluationComments?: string;
434
+  // 评价项
435
+  evaluations?: SysEvaluation[];
436
+  // 评价记录
437
+  evaluationRecords?: SysEvaluationRecord[];
438
+}
439
+
440
+export interface FormCleaningPlan {
441
+  id?: number;
442
+  planId?: number;
443
+  cleaningItem?: string;
444
+  frequency?: string;
445
+  responsiblePerson?: string;
446
+  completionStatus?: number;
447
+}
448
+
449
+export interface FormOtherPlanAction {
450
+  id?: number;
451
+  planId?: number;
452
+  actionItem?: string;
453
+  target?: string;
454
+  deadline?: string;
455
+  responsiblePerson?: string;
456
+  completionStatus?: number;
457
+}
458
+
459
+export interface FormOtherPlanContingency {
460
+  id?: number;
461
+  planId?: number;
462
+  contingencyItem?: string;
463
+  responseStrategy?: string;
464
+  responsiblePerson?: string;
465
+  completionStatus?: number;
466
+}
467
+
468
+export interface FormManagementPlan {
469
+  // 主键id
470
+  id?: number;
471
+  // 任务类型
472
+  type?: string;
473
+  // 片区id
474
+  areaId?: number;
475
+  // 油站ID
476
+  stationId?: number;
477
+  // 任务id
478
+  taskId?: number;
479
+  // 任务名称
480
+  taskName?: string;
481
+  // 执行人ID
482
+  executorId?: number;
483
+  // 执行人姓名
484
+  executorName?: string;
485
+  // 岗位
486
+  position?: number;
487
+  // 是否评论0否1是
488
+  isComment?: number;
489
+  // 创建类型0系统1新增
490
+  createType?: number;
491
+  // 评论id
492
+  commentId?: number;
493
+  // 截止时间
494
+  deadline?: string;
495
+  // 处理时间
496
+  processTime?: string;
497
+  // 完成状态: 0-按时完成, 1-逾期完成
498
+  completionStatus?: number;
499
+  // 逻辑删除标识
500
+  delFlag?: number;
501
+  // 月份,格式:YYYY-MM
502
+  month?: string;
503
+  // 清洁计划回顾
504
+  cleaningPlanReview?: string;
505
+  // 其他计划回顾
506
+  otherPlanReview?: string;
507
+  // 清洁计划
508
+  cleaningPlanList?: FormCleaningPlan[];
509
+  // 其他计划
510
+  otherPlanActionList?: FormOtherPlanAction[];
511
+  // 其他应急计划
512
+  otherPlanContingencyList?: FormOtherPlanContingency[];
513
+  // 上次管理计划
514
+  lastManagementPlan?: FormManagementPlan;
515
+}

+ 118 - 1
apps/web-ele/src/api/archive/operationsManagement/operationsManagement.ts

@@ -1,4 +1,4 @@
1
-import type { TaskCheckModel } from './model';
1
+import type { TaskCheckModel, TaskPhotoModel, CompetitorMarketingSurveyModel, CompetitorSalesSurveyModel, TurnInRateSurveyModel, LicenseTaskModel, TeamShiftLogModel, TaskAttachmentModel, FormManagementPlan } from './model';
2 2
 
3 3
 import type { BaseResult } from '#/api/base-result';
4 4
 
@@ -8,6 +8,24 @@ import { requestClient } from '#/api/request';
8 8
 enum Api {
9 9
   // 任务检查记录列表
10 10
   taskCheckList = '/taskCheck/check/list',
11
+  // 拍照任务列表
12
+  taskPhotoList = '/taskPhoto/photo/list',
13
+  // 竞争对手营销调查列表
14
+  competitorMarketingSurveyList = '/formCompetitorMarketingSurvey/survey/list',
15
+  // 竟对油站列表
16
+  competitiveStationList = '/gasCompetitiveStation/station/list',
17
+  // 竞争对手销量调查列表
18
+  competitorSalesSurveyList = '/formCompetitorSalesSurvey/survey/list',
19
+  // 拐入率调查列表
20
+  turnInRateSurveyList = '/formTurnInRateSurvey/survey/list',
21
+  // 证照任务管理列表
22
+  licenseTaskList = '/formLicense/license/list',
23
+  // 班组日志列表
24
+  teamShiftLogList = '/formTeamShiftLog/log/list',
25
+  // 收集附件列表
26
+  taskAttachmentList = '/taskAttachment/attachment/list',
27
+  // 管理计划列表
28
+  managementPlanList = '/formManagementPlan/plan/list',
11 29
 }
12 30
 
13 31
 /**
@@ -20,3 +38,102 @@ export function getTaskCheckList(params: any) {
20 38
     params,
21 39
   });
22 40
 }
41
+
42
+/**
43
+ * 查询拍照任务列表
44
+ * @param params 查询参数
45
+ * @returns 拍照任务列表
46
+ */
47
+export function getTaskPhotoList(params: any) {
48
+  return requestClient.get<BaseResult<TaskPhotoModel[]>>(Api.taskPhotoList, {
49
+    params,
50
+  });
51
+}
52
+
53
+/**
54
+ * 查询竞争对手营销调查列表
55
+ * @param params 查询参数
56
+ * @returns 竞争对手营销调查列表
57
+ */
58
+export function getCompetitorMarketingSurveyList(params: any) {
59
+  return requestClient.get<BaseResult<CompetitorMarketingSurveyModel[]>>(Api.competitorMarketingSurveyList, {
60
+    params,
61
+  });
62
+}
63
+
64
+/**
65
+ * 查询竟对油站列表
66
+ * @param params 查询参数
67
+ * @returns 竟对油站列表
68
+ */
69
+export function getCompetitiveStationList(params: any) {
70
+  return requestClient.get<BaseResult<any[]>>(Api.competitiveStationList, {
71
+    params,
72
+  });
73
+}
74
+
75
+/**
76
+ * 查询竞争对手销量调查列表
77
+ * @param params 查询参数
78
+ * @returns 竞争对手销量调查列表
79
+ */
80
+export function getCompetitorSalesSurveyList(params: any) {
81
+  return requestClient.get<BaseResult<CompetitorSalesSurveyModel[]>>(Api.competitorSalesSurveyList, {
82
+    params,
83
+  });
84
+}
85
+
86
+/**
87
+ * 查询拐入率调查列表
88
+ * @param params 查询参数
89
+ * @returns 拐入率调查列表
90
+ */
91
+export function getTurnInRateSurveyList(params: any) {
92
+  return requestClient.get<BaseResult<TurnInRateSurveyModel[]>>(Api.turnInRateSurveyList, {
93
+    params,
94
+  });
95
+}
96
+
97
+/**
98
+ * 查询证照任务管理列表
99
+ * @param params 查询参数
100
+ * @returns 证照任务管理列表
101
+ */
102
+export function getLicenseTaskList(params: any) {
103
+  return requestClient.get<BaseResult<LicenseTaskModel[]>>(Api.licenseTaskList, {
104
+    params,
105
+  });
106
+}
107
+
108
+/**
109
+ * 查询班组日志列表
110
+ * @param params 查询参数
111
+ * @returns 班组日志列表
112
+ */
113
+export function getTeamShiftLogList(params: any) {
114
+  return requestClient.get<BaseResult<TeamShiftLogModel[]>>(Api.teamShiftLogList, {
115
+    params,
116
+  });
117
+}
118
+
119
+/**
120
+ * 查询收集附件列表
121
+ * @param params 查询参数
122
+ * @returns 收集附件列表
123
+ */
124
+export function getTaskAttachmentList(params: any) {
125
+  return requestClient.get<BaseResult<TaskAttachmentModel[]>>(Api.taskAttachmentList, {
126
+    params,
127
+  });
128
+}
129
+
130
+/**
131
+ * 查询管理计划列表
132
+ * @param params 查询参数
133
+ * @returns 管理计划列表
134
+ */
135
+export function getManagementPlanList(params: any) {
136
+  return requestClient.get<BaseResult<FormManagementPlan[]>>(Api.managementPlanList, {
137
+    params,
138
+  });
139
+}

+ 1 - 1
apps/web-ele/src/api/system/infoEntry/certificateSetting/certificateSetting.ts

@@ -75,4 +75,4 @@ export function deleteCertificateSetting(ids: number[]) {
75 75
  */
76 76
 export function exportCertificateSetting(data: Partial<CertificateSettingModel>) {
77 77
   return commonExport(Api.export, data);
78
-}
78
+}

+ 1 - 1
apps/web-ele/src/router/routes/local.ts

@@ -142,7 +142,7 @@ const localRoutes: RouteRecordStringComponent[] = [
142 142
       hideInMenu: true,
143 143
     },
144 144
     name: 'ScheduleDetail',
145
-    path: '/schedule/detail/:taskId',
145
+    path: '/schedule/detail',
146 146
   },
147 147
   {
148 148
     component: 'workflow/processDefinition/design',

+ 163 - 101
apps/web-ele/src/views/Archive/HSSEManage/emergencyDrill/config-data.tsx

@@ -1,177 +1,239 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
14
+
5 15
 export const querySchema: FormSchemaGetter = () => [
6 16
   {
7
-    component: 'Select',
17
+    component: 'ApiSelect',
18
+    fieldName: 'areaId',
19
+    label: '片区',
8 20
     componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
21
+      placeholder: '请选择片区',
22
+      clearable: true,
23
+      api: async () => {
24
+        const resp = await selectAllSysAreaList();
25
+        const data = resp || [];
26
+        return Array.isArray(data)
27
+          ? data.map((item: any) => ({
28
+              label: item.areaName,
29
+              value: item.id,
30
+            }))
31
+          : [];
32
+      },
33
+      labelField: 'label',
34
+      valueField: 'value',
10 35
     },
11
-    fieldName: 'Areastatus',
12
-    label: '片区',
13 36
   },
14 37
   {
15
-    component: 'Select',
38
+    component: 'ApiSelect',
39
+    fieldName: 'stationId',
40
+    label: '油站',
16 41
     componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
42
+      placeholder: '请选择油站',
43
+      clearable: true,
44
+      api: async () => {
45
+        const resp = await selectAllSysStationAreaList();
46
+        const data = resp || [];
47
+        return Array.isArray(data)
48
+          ? data.map((item: any) => ({
49
+              label: item.stationName,
50
+              value: item.id.toString(),
51
+            }))
52
+          : [];
53
+      },
54
+      labelField: 'label',
55
+      valueField: 'value',
18 56
     },
19
-    fieldName: 'Gasstationstatus',
20
-    label: '油站',
21 57
   },
22 58
   {
23 59
     component: 'Select',
60
+    fieldName: 'completionStatus',
61
+    label: '状态',
24 62
     componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
63
+      placeholder: '请选择完成状态',
64
+      options: [
65
+        { label: '按时完成', value: 0 },
66
+        { label: '逾期完成', value: 1 },
67
+      ],
26 68
     },
27
-    fieldName: 'Status',
28
-    label: '状态',
29 69
   },
30 70
   {
31 71
     component: 'DatePicker',
72
+    fieldName: 'processStartTime',
73
+    label: '提交时间',
32 74
     componentProps: {
33
-      type: 'daterange',
75
+      placeholder: '请选择处理开始日期',
76
+      type: 'date',
34 77
       format: 'YYYY-MM-DD',
35 78
       valueFormat: 'YYYY-MM-DD',
36
-      startPlaceholder: '开始日期',
37
-      endPlaceholder: '结束日期',
79
+      style: {
80
+        width: '100%',
81
+      },
38 82
     },
39
-    fieldName: 'SubmitTime',
40
-    label: '提交时间',
41 83
   },
42 84
   {
43
-    component: 'Select',
85
+    component: 'DatePicker',
86
+    fieldName: 'processEndTime',
87
+    label: '提交时间',
44 88
     componentProps: {
45
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
89
+      placeholder: '请选择处理结束日期',
90
+      type: 'date',
91
+      format: 'YYYY-MM-DD',
92
+      valueFormat: 'YYYY-MM-DD',
93
+      style: {
94
+        width: '100%',
95
+      },
46 96
     },
47
-    fieldName: 'Commentstatus',
48
-    label: '评论',
49 97
   },
50 98
   {
51 99
     component: 'Select',
100
+    fieldName: 'isComment',
101
+    label: '评论',
52 102
     componentProps: {
53
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
103
+      placeholder: '请选择评论状态',
104
+      options: [
105
+        { label: '未评', value: 0 },
106
+        { label: '已评', value: 1 },
107
+      ],
54 108
     },
55
-    fieldName: 'PositionStatus',
56
-    label: '岗位',
57 109
   },
58 110
   {
59
-    component: 'Select',
111
+    component: 'ApiSelect',
112
+    fieldName: 'position',
113
+    label: '岗位',
60 114
     componentProps: {
61
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
115
+      placeholder: '请选择岗位',
116
+      clearable: true,
117
+      api: async () => {
118
+        const data = await getPostList();
119
+        return Array.isArray(data.rows)
120
+          ? data.rows.map((item: any) => ({
121
+              label: item.postName || item.name,
122
+              value: item.postId,
123
+            }))
124
+          : [];
125
+      },
126
+      labelField: 'label',
127
+      valueField: 'value',
62 128
     },
63
-    fieldName: 'CreateStatus',
64
-    label: '创建',
65 129
   },
66 130
   {
67 131
     component: 'Select',
132
+    fieldName: 'createType',
133
+    label: '创建',
68 134
     componentProps: {
69
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
135
+      placeholder: '请选择创建方式',
136
+      options: [
137
+        { label: '系统', value: 0 },
138
+        { label: '新增', value: 1 },
139
+      ],
70 140
     },
71
-    fieldName: 'executorStatus',
141
+  },
142
+  {
143
+    component: 'Input',
144
+    fieldName: 'executorName',
72 145
     label: '执行人',
146
+    componentProps: {
147
+      placeholder: '请输入执行人',
148
+    },
73 149
   },
74 150
 ];
75 151
 
152
+
76 153
 export const columns: VxeGridProps['columns'] = [
77 154
   {
155
+    type: 'checkbox',
156
+    width: 80,
157
+  },
158
+  {
78 159
     field: 'action',
79
-    fixed: 'left',
160
+    fixed: 'right',
80 161
     slots: { default: 'action' },
81
-    resizable: false,
82 162
     title: '操作',
83
-    width: 180,
163
+    width: 150,
164
+  },
165
+  {
166
+    field: 'taskName',
167
+    title: '任务名称',
168
+    minWidth: 150,
84 169
   },
85 170
   {
171
+    field: 'drillName',
172
+    title: '演练名称',
173
+    minWidth: 150,
174
+  },
175
+  {
176
+    field: 'stationId',
86 177
     title: '油站',
87
-    field: 'Gasstation',
88
-    minWidth: 130,
178
+    minWidth: 120,
89 179
   },
90 180
   {
181
+    field: 'executorName',
91 182
     title: '执行人',
92
-    field: 'Executor',
93
-    minWidth: 130,
183
+    minWidth: 120,
94 184
   },
95 185
   {
186
+    field: 'position',
96 187
     title: '岗位',
97
-    field: 'Position',
98
-    minWidth: 130,
188
+    minWidth: 120,
99 189
   },
100 190
   {
191
+    field: 'isComment',
101 192
     title: '评论',
102
-    field: 'Comment',
103
-    minWidth: 130,
193
+    minWidth: 100,
194
+    align: 'center',
195
+    formatter: (cellValue: number) => {
196
+      return cellValue === 1 ? '已评' : '未评';
197
+    },
104 198
   },
105 199
   {
200
+    field: 'deadline',
106 201
     title: '截止时间',
107
-    field: 'Deadline',
108
-    minWidth: 130,
202
+    minWidth: 180,
109 203
   },
110 204
   {
205
+    field: 'processTime',
111 206
     title: '提交时间',
112
-    field: 'SubmitTime',
113
-    minWidth: 130,
207
+    minWidth: 180,
114 208
   },
115 209
   {
210
+    field: 'completionStatus',
116 211
     title: '任务状态',
117
-    field: 'TaskStatus',
118
-    minWidth: 130,
212
+    minWidth: 120,
213
+    align: 'center',
214
+    formatter: (cellValue: number) => {
215
+      return cellValue === 0 ? '按时完成' : '逾期完成';
216
+    },
119 217
   },
120 218
   {
219
+    field: 'createType',
121 220
     title: '创建',
122
-    field: 'create',
123
-    minWidth: 130,
221
+    minWidth: 100,
222
+    align: 'center',
223
+    formatter: (cellValue: number) => {
224
+      return cellValue === 0 ? '系统' : '新增';
225
+    },
124 226
   },
125
-];
126
-export const mockData = [
127
-  {
128
-    Gasstation: '中山路加油站',
129
-    Executor: '王保瑞',
130
-    Position: '当班经理',
131
-    Comment: '高峰期车流大,需增派人手',
132
-    Deadline: '2024-06-10 18:00',
133
-    SubmitTime: '2024-06-01 08:15',
134
-    TaskStatus: '待处理',
135
-    create: '系统',
136
-  },
137
-  {
138
-    Gasstation: '北环大道油站',
139
-    Executor: '王凯',
140
-    Position: '安全员',
141
-    Comment: '油罐液位异常,需立即检查',
142
-    Deadline: '2024-06-05 12:00',
143
-    SubmitTime: '2024-06-01 09:30',
144
-    TaskStatus: '处理中',
145
-    create: '系统',
146
-  },
147
-  {
148
-    Gasstation: '城南综合能源站',
149
-    Executor: '李威',
150
-    Position: '设备管理员',
151
-    Comment: '加油机滤芯更换完成,请复核',
152
-    Deadline: '2024-06-08 17:00',
153
-    SubmitTime: '2024-06-01 10:45',
154
-    TaskStatus: '已完成',
155
-    create: '系统',
156
-  },
157
-  {
158
-    Gasstation: '高速服务区东站',
159
-    Executor: '张敏',
160
-    Position: '收银员',
161
-    Comment: 'POS 系统版本升级,测试支付流程',
162
-    Deadline: '2024-06-07 20:00',
163
-    SubmitTime: '2024-06-01 14:20',
164
-    TaskStatus: '待处理',
165
-    create: '系统',
166
-  },
167
-  {
168
-    Gasstation: '城西快充站',
169
-    Executor: '刘洋',
170
-    Position: '电工',
171
-    Comment: '充电桩接地电阻复检',
172
-    Deadline: '2024-06-06 16:00',
173
-    SubmitTime: '2024-06-01 15:10',
174
-    TaskStatus: '处理中',
175
-    create: '系统',
227
+  {
228
+    field: 'drillTime',
229
+    title: '演练时间',
230
+    minWidth: 180,
231
+  },
232
+  {
233
+    field: 'drillLocation',
234
+    title: '演练地点',
235
+    minWidth: 150,
176 236
   },
177 237
 ];
238
+
239
+

+ 45 - 30
apps/web-ele/src/views/Archive/HSSEManage/emergencyDrill/index.vue

@@ -1,11 +1,27 @@
1 1
 <script setup lang="ts">
2
-import { useRouter } from 'vue-router';
2
+import { ref } from 'vue';
3
+import { useRouter, useRoute } from 'vue-router';
3 4
 import { Page } from '@vben/common-ui';
4 5
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
5 6
 import { columns, querySchema } from './config-data';
6 7
 import type { VbenFormProps } from '@vben/common-ui';
7
-import { mockData } from './config-data';
8
+import { getEmergencyDrillList } from '#/api/archive/HSSE/HSSE';
9
+
10
+const showSearchForm = ref(true) as any;
8 11
 const router = useRouter();
12
+const route = useRoute();
13
+
14
+// 表单字段到 API 字段的映射
15
+function mapFormToApi(formValues: any, page: any) {
16
+  const apiParams = {
17
+    pageNum: page.currentPage,
18
+    pageSize: page.pageSize,
19
+    type: route.query.type || '',
20
+    directoryType: route.query.directoryType || '',
21
+    ...formValues,
22
+  };
23
+  return apiParams;
24
+}
9 25
 
10 26
 const formOptions: VbenFormProps = {
11 27
   commonConfig: {
@@ -16,14 +32,6 @@ const formOptions: VbenFormProps = {
16 32
   },
17 33
   schema: querySchema(),
18 34
   wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
19
-  // 日期选择格式化
20
-  // fieldMappingTime: [
21
-  //   [
22
-  //     'createTime',
23
-  //     ['params[beginTime]', 'params[endTime]'],
24
-  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
25
-  //   ],
26
-  // ],
27 35
 };
28 36
 
29 37
 // 列表中显示配置
@@ -35,51 +43,58 @@ const gridOptions: VxeGridProps = {
35 43
     reserve: true,
36 44
     // 点击行选中
37 45
     trigger: 'default',
38
-    checkMethod: ({ row }) => row?.roleId !== 1,
39 46
   },
40 47
   columns,
41 48
   size: 'medium',
42 49
   height: 'auto',
43
-  data: mockData,
44
-  // proxyConfig: {
45
-  //   ajax: {
46
-  //     query: async ({ page }, formValues = {}) => {
47
-  //       const resp = await getRoleList({
48
-  //         ...formValues,
49
-  //         pageNum: page.currentPage,
50
-  //         pageSize: page.pageSize,
51
-  //       });
52
-  //       return { items: resp.rows, total: resp.total };
53
-  //     },
54
-  //   },
55
-  // },
50
+  proxyConfig: {
51
+    ajax: {
52
+      query: async ({ page }, formValues = {}) => {
53
+        // 映射表单字段到 API 字段
54
+        const apiParams = mapFormToApi(formValues, page);
55
+        
56
+        // 调用API
57
+        const response = await getEmergencyDrillList(apiParams);
58
+        
59
+        // 映射 API 响应数据到页面显示字段
60
+        const items = response.rows;
61
+        
62
+        return {
63
+          items,
64
+          total: response.total,
65
+        };
66
+      },
67
+    },
68
+  },
56 69
   rowConfig: {
57
-    keyField: 'roleId',
70
+    keyField: 'id',
58 71
   },
59 72
   toolbarConfig: {
60 73
     custom: true,
61 74
     refresh: true,
62 75
     zoom: true,
63 76
   },
64
-  id: 'system-role-index',
77
+  id: 'emergency-drill-index',
65 78
 };
66
-const [BasicTable, BasicTableApi] = useVbenVxeGrid({
79
+const [BasicTable] = useVbenVxeGrid({
80
+  showSearchForm,
67 81
   formOptions,
68 82
   gridOptions,
69 83
 });
70 84
 const handleTaskClick = (taskId: number) => {
71
-  router.push(`/schedule/detail/${taskId}`);
85
+  router.push(`/schedule/detail/${taskId}?type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);  
72 86
 };
73 87
 </script>
88
+
74 89
 <template>
75 90
   <Page :auto-content-height="true">
76
-    <BasicTable>
91
+    <BasicTable table-title="应急演练列表">
77 92
       <template #action="{ row }">
78 93
         <el-button
79 94
           size="small"
80 95
           type="primary"
81 96
           plain
82
-          @click="() => handleTaskClick(row.taskId)"
97
+          @click="() => handleTaskClick(row.id)"
83 98
           >查看</el-button
84 99
         >
85 100
       </template>

+ 38 - 23
apps/web-ele/src/views/Archive/figuresManage/oilGunTement/index.vue

@@ -1,17 +1,31 @@
1 1
 <script lang="ts" setup>
2 2
 // 导入部分
3
+import { ref } from 'vue';
3 4
 import type { VbenFormProps } from '@vben/common-ui';
4 5
 import type { VxeGridProps } from '#/adapter/vxe-table';
5 6
 import { Page } from '@vben/common-ui';
6 7
 import { useVbenVxeGrid } from '#/adapter/vxe-table';
7 8
 import { ElButton, ElSpace } from 'element-plus';
8
-import { tableColumns, OIL_GUN_TEMENT_MOCK_DATA, queryFormSchema } from './oilGunTement-data';
9
-import { useRouter } from 'vue-router';
9
+import { tableColumns, queryFormSchema } from './oilGunTement-data';
10
+import { useRouter, useRoute } from 'vue-router';
11
+import { getGunSelfCheckList } from '#/api/archive/figuresManage/figuresManage';
10 12
 // 路由实例
11 13
 const router = useRouter();
14
+const route = useRoute();
12 15
 
16
+const showSearchForm = ref(true) as any;
13 17
 
14
-
18
+// 表单字段到 API 字段的映射
19
+function mapFormToApi(formValues: any, page: any) {
20
+  const apiParams = {
21
+    pageNum: page.currentPage,
22
+    pageSize: page.pageSize,
23
+    type: route.query.type || '',
24
+    directoryType: route.query.directoryType || '',
25
+    ...formValues,
26
+  };
27
+  return apiParams;
28
+}
15 29
 
16 30
 // 表单配置
17 31
 const formOptions: VbenFormProps = {
@@ -30,7 +44,21 @@ const oilGunTementGridOptions: VxeGridProps = {
30 44
   proxyConfig: {
31 45
     autoLoad: true,
32 46
     ajax: {
33
-      query: async () => ({ items: OIL_GUN_TEMENT_MOCK_DATA, total: OIL_GUN_TEMENT_MOCK_DATA.length }),
47
+      query: async ({ page }, formValues = {}) => {
48
+        // 映射表单字段到 API 字段
49
+        const apiParams = mapFormToApi(formValues, page);
50
+        
51
+        // 调用API
52
+        const response = await getGunSelfCheckList(apiParams);
53
+        
54
+        // 映射 API 响应数据到页面显示字段
55
+        const items = response.rows;
56
+        
57
+        return {
58
+          items,
59
+          total: response.total,
60
+        };
61
+      },
34 62
     },
35 63
   },
36 64
   rowConfig: { keyField: 'id' },
@@ -38,25 +66,12 @@ const oilGunTementGridOptions: VxeGridProps = {
38 66
 };
39 67
 
40 68
 // 创建表格实例
41
-const [OilGunTementTable] = useVbenVxeGrid({ formOptions, gridOptions: oilGunTementGridOptions });
42
-
43
-// 查询按钮点击事件
44
-const handleQuery = () => {
45
-  console.log('查询数据');
46
-  // TODO: 添加查询逻辑
47
-};
48
-
49
-// 重置按钮点击事件
50
-const handleReset = () => {
51
-  console.log('重置表单');
52
-  // TODO: 添加重置逻辑
53
-};
69
+const [OilGunTementTable] = useVbenVxeGrid({ formOptions, gridOptions: oilGunTementGridOptions, showSearchForm });
54 70
 
55 71
 // 查看按钮点击事件
56 72
 const handleView = (row: any) => {
57 73
   console.log('查看数据:', row);
58
-  router.push(`/schedule/detail/${row.id}`);
59
-  // TODO: 添加查看逻辑
74
+  router.push(`/schedule/detail/${row.id}?type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
60 75
 };
61 76
 
62 77
 // 导出按钮点击事件
@@ -79,19 +94,19 @@ const handleProfitLossReport = (row: any) => {
79 94
       <OilGunTementTable table-title="油枪自检损益表列表">
80 95
         <template #toolbar-tools>
81 96
           <ElSpace>
82
-            <ElButton 
97
+            <!-- <ElButton 
83 98
               @click="handleExport"
84 99
               v-access:code="['system:oilGunTement:export']"
85 100
             >
86 101
               导出
87
-            </ElButton>
102
+            </ElButton> -->
88 103
           </ElSpace>
89 104
         </template>
90 105
         <template #action="{ row }">
91 106
           <ElSpace>
92 107
             <ElButton size="small" @click="handleView(row)">查看</ElButton>
93
-            <ElButton size="small" @click="handleExport(row)">导出</ElButton>
94
-            <ElButton size="small" type="primary" @click="handleProfitLossReport(row)">损益报表</ElButton>
108
+            <!-- <ElButton size="small" @click="handleExport(row)">导出</ElButton> -->
109
+            <!-- <ElButton size="small" type="primary" @click="handleProfitLossReport(row)">损益报表</ElButton> -->
95 110
           </ElSpace>
96 111
         </template>
97 112
       </OilGunTementTable>

+ 162 - 140
apps/web-ele/src/views/Archive/figuresManage/oilGunTement/oilGunTement-data.tsx

@@ -1,201 +1,223 @@
1 1
 import type { VxeGridProps } from '#/adapter/vxe-table';
2 2
 import type { FormSchemaGetter } from '#/adapter/form';
3 3
 
4
-// 油枪自检损益表数据类型定义
5
-export interface OilGunTementData {
6
-  id: number;
7
-  taskName: string; // 任务名称
8
-  station: string; // 油站
9
-  executor: string; // 执行人
10
-  position: string; // 岗位
11
-  comment: string; // 评论
12
-  deadline: string; // 截止时间
13
-  processTime: string; // 处理时间
14
-  status: string; // 完成状态
15
-  creator: string; // 创建人
16
-  area: string; // 片区
17
-}
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
18 14
 
19 15
 // 油枪自检损益表表格配置
20 16
 export const tableColumns: VxeGridProps['columns'] = [
21
-  { title: '任务名称', field: 'taskName', minWidth: 180, align: 'center' },
22
-  { title: '油站', field: 'station', minWidth: 150, align: 'center' },
23
-  { title: '执行人', field: 'executor', minWidth: 120, align: 'center' },
24
-  { title: '岗位', field: 'position', minWidth: 120, align: 'center' },
25
-  { title: '评论', field: 'comment', minWidth: 150, align: 'center' },
26
-  { title: '截止时间', field: 'deadline', minWidth: 160, align: 'center' },
27
-  { title: '处理时间', field: 'processTime', minWidth: 160, align: 'center' },
28
-  { title: '完成状态', field: 'status', minWidth: 120, align: 'center' },
29
-  { title: '创建人', field: 'creator', minWidth: 120, align: 'center' },
30
-  { 
31
-    title: '操作', 
32
-    minWidth: 200, 
33
-    align: 'center', 
17
+  {
18
+    type: 'checkbox',
19
+    width: 80,
20
+  },
21
+  {
22
+    field: 'action',
23
+    fixed: 'right',
34 24
     slots: { default: 'action' },
35
-    fixed: 'right'
25
+    title: '操作',
26
+    width: 150,
27
+  },
28
+  {
29
+    field: 'taskName',
30
+    title: '任务名称',
31
+    minWidth: 150,
32
+  },
33
+  {
34
+    field: 'stationId',
35
+    title: '油站',
36
+    minWidth: 120,
37
+  },
38
+  {
39
+    field: 'executorName',
40
+    title: '执行人',
41
+    minWidth: 120,
42
+  },
43
+  {
44
+    field: 'position',
45
+    title: '岗位',
46
+    minWidth: 120,
47
+  },
48
+  {
49
+    field: 'isComment',
50
+    title: '评论',
51
+    minWidth: 100,
52
+    align: 'center',
53
+    formatter: (cellValue: number) => {
54
+      return cellValue === 1 ? '已评' : '未评';
55
+    },
56
+  },
57
+  {
58
+    field: 'deadline',
59
+    title: '截止时间',
60
+    minWidth: 180,
61
+  },
62
+  {
63
+    field: 'processTime',
64
+    title: '处理时间',
65
+    minWidth: 180,
66
+  },
67
+  {
68
+    field: 'completionStatus',
69
+    title: '完成状态',
70
+    minWidth: 120,
71
+    align: 'center',
72
+    formatter: (cellValue: number) => {
73
+      return cellValue === 0 ? '按时完成' : '逾期完成';
74
+    },
75
+  },
76
+  {
77
+    field: 'createType',
78
+    title: '创建',
79
+    minWidth: 100,
80
+    align: 'center',
81
+    formatter: (cellValue: number) => {
82
+      return cellValue === 0 ? '系统' : '新增';
83
+    },
36 84
   },
37 85
 ];
38 86
 
39
-// 搜索表单选项配置
40
-const areaOptions = [
41
-  { label: '默认片区', value: '默认片区' },
42
-  { label: '片区1', value: '片区1' },
43
-  { label: '片区2', value: '片区2' },
44
-  { label: '片区3', value: '片区3' },
45
-];
46
-
47
-const stationOptions = [
48
-  { label: '机场油站', value: '机场油站' },
49
-  { label: '北京东加油站', value: '北京东加油站' },
50
-  { label: '北京西加油站', value: '北京西加油站' },
51
-  { label: '北京南加油站', value: '北京南加油站' },
52
-  { label: '北京北加油站', value: '北京北加油站' },
53
-  { label: '河北油站', value: '河北油站' },
54
-  { label: '龙飞虎加油站', value: '龙飞虎加油站' },
55
-  { label: '法站加油站', value: '法站加油站' },
56
-];
57
-
58
-const statusOptions = [
59
-  { label: '已完成', value: '已完成' },
60
-  { label: '未完成', value: '未完成' },
61
-  { label: '进行中', value: '进行中' },
62
-];
63
-
64
-const positionOptions = [
65
-  { label: '管理员', value: '管理员' },
66
-  { label: '操作员', value: '操作员' },
67
-  { label: '负责人', value: '负责人' },
68
-  { label: '技术员', value: '技术员' },
69
-];
70
-
71
-const commentOptions = [
72
-  { label: '正常', value: '正常' },
73
-  { label: '异常', value: '异常' },
74
-  { label: '需关注', value: '需关注' },
75
-];
76
-
77
-const creatorOptions = [
78
-  { label: '张三', value: '张三' },
79
-  { label: '李四', value: '李四' },
80
-  { label: '王五', value: '王五' },
81
-  { label: '赵六', value: '赵六' },
82
-];
83
-
84
-// 生成随机日期
85
-const generateRandomDate = (startDate: Date, endDate: Date): string => {
86
-  const randomTime = startDate.getTime() + Math.random() * (endDate.getTime() - startDate.getTime());
87
-  const date = new Date(randomTime);
88
-  return date.toISOString().slice(0, 19).replace('T', ' ');
89
-};
90
-
91
-// 油枪自检损益表模拟数据
92
-export const OIL_GUN_TEMENT_MOCK_DATA: OilGunTementData[] = Array.from({ length: 20 }, (_, index) => {
93
-  const id = index + 1;
94
-  const randomArea = areaOptions[Math.floor(Math.random() * areaOptions.length)].value;
95
-  const randomStation = stationOptions[Math.floor(Math.random() * stationOptions.length)].value;
96
-  const randomStatus = statusOptions[Math.floor(Math.random() * statusOptions.length)].value;
97
-  const randomPosition = positionOptions[Math.floor(Math.random() * positionOptions.length)].value;
98
-  const randomComment = commentOptions[Math.floor(Math.random() * commentOptions.length)].value;
99
-  const randomCreator = creatorOptions[Math.floor(Math.random() * creatorOptions.length)].value;
100
-  
101
-  // 模拟执行人(使用创建人选项的随机值)
102
-  const randomExecutor = creatorOptions[Math.floor(Math.random() * creatorOptions.length)].value;
103
-  
104
-  // 生成随机日期:截止时间在处理时间之前
105
-  const processDate = new Date();
106
-  processDate.setDate(processDate.getDate() - Math.floor(Math.random() * 30));
107
-  const deadlineDate = new Date(processDate);
108
-  deadlineDate.setDate(deadlineDate.getDate() - Math.floor(Math.random() * 7));
109
-  
110
-  return {
111
-    id,
112
-    taskName: `油枪自检任务${id}`,
113
-    station: randomStation,
114
-    executor: randomExecutor,
115
-    position: randomPosition,
116
-    comment: randomComment,
117
-    deadline: generateRandomDate(deadlineDate, processDate),
118
-    processTime: generateRandomDate(processDate, new Date()),
119
-    status: randomStatus,
120
-    creator: randomCreator,
121
-    area: randomArea
122
-  };
123
-});
124
-
125 87
 export const queryFormSchema: FormSchemaGetter = () => [
126 88
   {
127
-    component: 'Select',
128
-    fieldName: 'area',
89
+    component: 'ApiSelect',
90
+    fieldName: 'areaId',
129 91
     label: '片区',
130 92
     componentProps: {
131 93
       placeholder: '请选择片区',
132
-      options: areaOptions,
94
+      clearable: true,
95
+      api: async () => {
96
+        const resp = await selectAllSysAreaList();
97
+        const data = resp || [];
98
+        return Array.isArray(data)
99
+          ? data.map((item: any) => ({
100
+              label: item.areaName,
101
+              value: item.id,
102
+            }))
103
+          : [];
104
+      },
105
+      labelField: 'label',
106
+      valueField: 'value',
133 107
     },
134 108
   },
135 109
   {
136
-    component: 'Select',
137
-    fieldName: 'station',
110
+    component: 'ApiSelect',
111
+    fieldName: 'stationId',
138 112
     label: '油站',
139 113
     componentProps: {
140 114
       placeholder: '请选择油站',
141
-      options: stationOptions,
115
+      clearable: true,
116
+      api: async () => {
117
+        const resp = await selectAllSysStationAreaList();
118
+        const data = resp || [];
119
+        return Array.isArray(data)
120
+          ? data.map((item: any) => ({
121
+              label: item.stationName,
122
+              value: item.id.toString(),
123
+            }))
124
+          : [];
125
+      },
126
+      labelField: 'label',
127
+      valueField: 'value',
142 128
     },
143 129
   },
144 130
   {
145 131
     component: 'Select',
146
-    fieldName: 'status',
147
-    label: '完成状态',
132
+    fieldName: 'completionStatus',
133
+    label: '状态',
148 134
     componentProps: {
149 135
       placeholder: '请选择完成状态',
150
-      options: statusOptions,
136
+      options: [
137
+        { label: '按时完成', value: 0 },
138
+        { label: '逾期完成', value: 1 },
139
+      ],
151 140
     },
152 141
   },
153 142
   {
154 143
     component: 'DatePicker',
155
-    fieldName: 'processTimeRange',
144
+    fieldName: 'processStartTime',
156 145
     label: '处理时间',
157 146
     componentProps: {
158
-      placeholder: '请选择处理时间范围',
159
-      type: 'daterange',
160
-      rangeSeparator: '至',
161
-      startPlaceholder: '开始时间',
162
-      endPlaceholder: '结束时间',
163
-      valueFormat: 'YYYY-MM-DD HH:mm:ss',
147
+      placeholder: '请选择处理开始日期',
148
+      type: 'date',
149
+      format: 'YYYY-MM-DD',
150
+      valueFormat: 'YYYY-MM-DD',
151
+      style: {
152
+        width: '100%',
153
+      },
164 154
     },
165 155
   },
166 156
   {
167
-    component: 'Select',
157
+    component: 'DatePicker',
158
+    fieldName: 'processEndTime',
159
+    label: '处理时间',
160
+    componentProps: {
161
+      placeholder: '请选择处理结束日期',
162
+      type: 'date',
163
+      format: 'YYYY-MM-DD',
164
+      valueFormat: 'YYYY-MM-DD',
165
+      style: {
166
+        width: '100%',
167
+      },
168
+    },
169
+  },
170
+  {
171
+    component: 'ApiSelect',
168 172
     fieldName: 'position',
169 173
     label: '岗位',
170 174
     componentProps: {
171 175
       placeholder: '请选择岗位',
172
-      options: positionOptions,
176
+      clearable: true,
177
+      api: async () => {
178
+        const data = await getPostList();
179
+        return Array.isArray(data.rows)
180
+          ? data.rows.map((item: any) => ({
181
+              label: item.postName || item.name,
182
+              value: item.postId,
183
+            }))
184
+          : [];
185
+      },
186
+      labelField: 'label',
187
+      valueField: 'value',
173 188
     },
174 189
   },
175 190
   {
176 191
     component: 'Select',
177
-    fieldName: 'comment',
192
+    fieldName: 'isComment',
178 193
     label: '评论',
179 194
     componentProps: {
180
-      placeholder: '请选择评论',
181
-      options: commentOptions,
195
+      placeholder: '请选择评论状态',
196
+      options: [
197
+        { label: '未评', value: 0 },
198
+        { label: '已评', value: 1 },
199
+      ],
182 200
     },
183 201
   },
184 202
   {
185 203
     component: 'Select',
186
-    fieldName: 'creator',
187
-    label: '创建',
204
+    fieldName: 'createType',
205
+    label: '创建',
188 206
     componentProps: {
189
-      placeholder: '请选择创建人',
190
-      options: creatorOptions,
207
+      placeholder: '请选择创建方式',
208
+      options: [
209
+        { label: '系统', value: 0 },
210
+        { label: '新增', value: 1 },
211
+      ],
191 212
     },
192 213
   },
193 214
   {
194 215
     component: 'Input',
195
-    fieldName: 'executor',
216
+    fieldName: 'executorName',
196 217
     label: '执行人',
197 218
     componentProps: {
198 219
       placeholder: '请输入执行人',
199 220
     },
200 221
   },
201 222
 ];
223
+

+ 134 - 149
apps/web-ele/src/views/Archive/operationsManagement/competitivePricingSurvey/config-data.tsx

@@ -1,78 +1,116 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+
4
+import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+import { getCompetitiveStationList } from '#/api/archive/operationsManagement/operationsManagement';
5 7
 export const querySchema: FormSchemaGetter = () => [
6 8
   {
7
-    component: 'Select',
8
-    componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
9
+      component: 'ApiSelect',
10
+      fieldName: 'stationId',
11
+      label: '油站',
12
+      componentProps: {
13
+        placeholder: '请选择油站',
14
+        clearable: true,
15
+        api: async () => {
16
+          const resp = await selectAllSysStationAreaList();
17
+          const data = resp || [];
18
+          return Array.isArray(data)
19
+            ? data.map((item: any) => ({
20
+                label: item.stationName,
21
+                value: item.id.toString(),
22
+              }))
23
+            : [];
24
+        },
25
+        labelField: 'label',
26
+        valueField: 'value',
27
+      },
10 28
     },
11
-    fieldName: 'IGasstationstatus',
12
-    label: '我方油站',
13
-  },
14 29
   {
15
-    component: 'Select',
30
+    component: 'ApiSelect',
16 31
     componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
32
+      api: async () => {
33
+        const resp = await getCompetitiveStationList({});
34
+        const data = resp?.rows || [];
35
+        return Array.isArray(data)
36
+          ? data.map((item: any) => ({ label: item.competitorName, value: item.id }))
37
+          : [];
38
+      },
39
+      labelField: 'label',
40
+      valueField: 'value',
41
+      placeholder: '请选择竟对油站',
18 42
     },
19
-    fieldName: 'youGasstationstatus',
43
+    fieldName: 'competitorId',
20 44
     label: '竟对油站',
21 45
   },
22 46
   {
23 47
     component: 'Select',
24 48
     componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
49
+      options: [
50
+        { label: '否', value: 0 },
51
+        { label: '是', value: 1 },
52
+      ],
26 53
     },
27
-    fieldName: 'Status',
28
-    label: '状态',
54
+    fieldName: 'isCompetitor',
55
+    label: '是否是竞争油站',
29 56
   },
30 57
   {
31 58
     component: 'DatePicker',
32 59
     componentProps: {
33 60
       type: 'daterange',
34
-      format: 'YYYY-MM-DD',
35
-      valueFormat: 'YYYY-MM-DD',
61
+      format: 'YYYY-MM-DD HH:mm:ss',
62
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
36 63
       startPlaceholder: '开始日期',
37 64
       endPlaceholder: '结束日期',
38 65
     },
39
-    fieldName: 'Time',
40
-    label: '时间',
41
-  },
42
-  {
43
-    component: 'Select',
44
-    componentProps: {
45
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
-    },
47
-    fieldName: 'Commentstatus',
48
-    label: '评论',
49
-  },
50
-  {
51
-    component: 'Select',
52
-    componentProps: {
53
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
-    },
55
-    fieldName: 'PositionStatus',
56
-    label: '岗位',
57
-  },
58
-  {
59
-    component: 'Select',
60
-    componentProps: {
61
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
-    },
63
-    fieldName: 'CreateStatus',
64
-    label: '创建',
65
-  },
66
-  {
67
-    component: 'Select',
68
-    componentProps: {
69
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
-    },
71
-    fieldName: 'executorStatus',
72
-    label: '执行人',
66
+    fieldName: 'surveyDate',
67
+    label: '调查日期',
73 68
   },
74 69
 ];
75 70
 
71
+/**
72
+ * 映射表单字段到API字段
73
+ */
74
+export function mapFormToApi(formValues: any, page: any) {
75
+  const apiParams = {
76
+    pageNum: page.currentPage,
77
+    pageSize: page.pageSize,
78
+  };
79
+  
80
+  // 我方油站
81
+  if (formValues.stationId) {
82
+    apiParams.stationId = formValues.stationId;
83
+  }
84
+  
85
+  // 竟对油站
86
+  if (formValues.competitorId) {
87
+    apiParams.competitorId = formValues.competitorId;
88
+  }
89
+  
90
+  // 是否是竞争油站
91
+  if (formValues.isCompetitor !== undefined) {
92
+    apiParams.isCompetitor = formValues.isCompetitor;
93
+  }
94
+  
95
+  // 调查日期
96
+  if (formValues.surveyDate) {
97
+    apiParams.surveyDateStart = formValues.surveyDate[0];
98
+    apiParams.surveyDateEnd = formValues.surveyDate[1];
99
+  }
100
+  
101
+  return apiParams;
102
+}
103
+
104
+/**
105
+ * 映射API响应数据到页面显示字段
106
+ */
107
+export function mapApiToView(data: any[]) {
108
+  return data.map(item => ({
109
+    ...item,
110
+    // 处理需要转换的字段
111
+  }));
112
+}
113
+
76 114
 export const columns: VxeGridProps['columns'] = [
77 115
   {
78 116
     field: 'action',
@@ -83,130 +121,77 @@ export const columns: VxeGridProps['columns'] = [
83 121
     width: 180,
84 122
   },
85 123
   {
86
-    title: '处理时间',
124
+    title: '调查日期',
87 125
     fixed: 'left',
88
-    field: 'ProcessingTime',
89
-    minWidth: 130,
126
+    field: 'surveyDate',
127
+    minWidth: 180,
90 128
   },
91 129
   {
92 130
     title: '我方油站',
93 131
     fixed: 'left',
94
-    field: 'IGasstationstatus',
132
+    field: 'stationId',
95 133
     minWidth: 130,
96 134
   },
97 135
   {
98 136
     title: '竟对油站',
99 137
     fixed: 'left',
100
-    field: 'youGasstationstatus',
138
+    field: 'competitorName',
101 139
     minWidth: 130,
102 140
   },
103 141
   {
104
-    title: '油站性质',
105
-    field: 'GasstationNature',
142
+    title: '是否是竞争油站',
143
+    field: 'isCompetitor',
144
+    minWidth: 130,
145
+    formatter: (cellValue: number) => {
146
+      return cellValue === 1 ? '是' : '否';
147
+    },
148
+  },
149
+  {
150
+    title: '场站性质',
151
+    field: 'stationNatureCode',
106 152
     minWidth: 130,
107 153
   },
108 154
   {
109 155
     title: '竞争关系',
110
-    field: 'Competitiverelationship',
156
+    field: 'competitiveRelationCode',
111 157
     minWidth: 130,
112 158
   },
113 159
   {
114 160
     title: '距离(KM)',
115
-    field: 'Deadline',
161
+    field: 'distanceKm',
116 162
     minWidth: 130,
117 163
   },
118 164
   {
119
-    title: '挂牌价',
120
-    field: 'Deadline',
121
-    // minWidth: 130,
122
-    children: [
123
-      {
124
-        title: '95#',
125
-        field: '95#',
126
-        minWidth: 130,
127
-      },
128
-      {
129
-        title: '92#',
130
-        field: '92#',
131
-        minWidth: 130,
132
-      },
133
-      {
134
-        title: '92#专车',
135
-        field: 'Privatecar92#',
136
-        minWidth: 130,
137
-      },
138
-      {
139
-        title: '92#的士',
140
-        field: 'taxi92#',
141
-        minWidth: 130,
142
-      },
143
-      {
144
-        title: '92#油卡',
145
-        field: 'taxi92#',
146
-        minWidth: 130,
147
-      },
148
-    ],
165
+    title: '优惠活动描述',
166
+    field: 'promotionActivities',
167
+    minWidth: 200,
168
+  },
169
+  {
170
+    title: '增值服务',
171
+    field: 'valueAddedServices',
172
+    minWidth: 150,
173
+  },
174
+  {
175
+    title: '油站设备配置变化',
176
+    field: 'equipmentConfigChanges',
177
+    minWidth: 200,
149 178
   },
150 179
 ];
151
-export const mockData = [
152
-  {
153
-    ProcessingTime: '2024-06-01 08:00:00',
154
-    IGasstationstatus: '正常营业',
155
-    youGasstationstatus: '促销中',
156
-    GasstationNature: '民营',
157
-    Competitiverelationship: '直接竞争',
158
-    Deadline: 1.2,
159
-    '95#': 7.85,
160
-    '92#': 7.45,
161
-    'Privatecar92#': 7.35,
162
-    'taxi92#': 7.25,
163
-  },
164
-  {
165
-    ProcessingTime: '2024-06-01 09:15:00',
166
-    IGasstationstatus: '库存预警',
167
-    youGasstationstatus: '正常营业',
168
-    GasstationNature: '国企',
169
-    Competitiverelationship: '间接竞争',
170
-    Deadline: 2.1,
171
-    '95#': 7.90,
172
-    '92#': 7.50,
173
-    'Privatecar92#': 7.40,
174
-    'taxi92#': 7.30,
175
-  },
176
-  {
177
-    ProcessingTime: '2024-06-01 10:30:00',
178
-    IGasstationstatus: '正常营业',
179
-    youGasstationstatus: '降价促销',
180
-    GasstationNature: '合资',
181
-    Competitiverelationship: '直接竞争',
182
-    Deadline: 0.8,
183
-    '95#': 7.80,
184
-    '92#': 7.40,
185
-    'Privatecar92#': 7.30,
186
-    'taxi92#': 7.20,
187
-  },
188
-  {
189
-    ProcessingTime: '2024-06-01 11:45:00',
190
-    IGasstationstatus: '设备维护',
191
-    youGasstationstatus: '正常营业',
192
-    GasstationNature: '民营',
193
-    Competitiverelationship: '间接竞争',
194
-    Deadline: 1.5,
195
-    '95#': 7.95,
196
-    '92#': 7.55,
197
-    'Privatecar92#': 7.45,
198
-    'taxi92#': 7.35,
199
-  },
200
-  {
201
-    ProcessingTime: '2024-06-01 13:00:00',
202
-    IGasstationstatus: '正常营业',
203
-    youGasstationstatus: '会员日',
204
-    GasstationNature: '国企',
205
-    Competitiverelationship: '直接竞争',
206
-    Deadline: 1.0,
207
-    '95#': 7.88,
208
-    '92#': 7.48,
209
-    'Privatecar92#': 7.38,
210
-    'taxi92#': 7.28,
180
+
181
+/**
182
+ * 油站油价记录表头配置
183
+ */
184
+export const oilPriceColumns: VxeGridProps['columns'] = [
185
+  {
186
+    title: '油品类型',
187
+    field: 'oilType',
188
+    minWidth: 100,
189
+  },
190
+  {
191
+    title: '价格',
192
+    field: 'price',
193
+    minWidth: 100,
211 194
   },
212 195
 ];
196
+
197
+

+ 212 - 0
apps/web-ele/src/views/Archive/operationsManagement/competitivePricingSurvey/config-data2.tsx

@@ -0,0 +1,212 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'IGasstationstatus',
12
+    label: '我方油站',
13
+  },
14
+  {
15
+    component: 'Select',
16
+    componentProps: {
17
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
+    },
19
+    fieldName: 'youGasstationstatus',
20
+    label: '竟对油站',
21
+  },
22
+  {
23
+    component: 'Select',
24
+    componentProps: {
25
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
+    },
27
+    fieldName: 'Status',
28
+    label: '状态',
29
+  },
30
+  {
31
+    component: 'DatePicker',
32
+    componentProps: {
33
+      type: 'daterange',
34
+      format: 'YYYY-MM-DD',
35
+      valueFormat: 'YYYY-MM-DD',
36
+      startPlaceholder: '开始日期',
37
+      endPlaceholder: '结束日期',
38
+    },
39
+    fieldName: 'Time',
40
+    label: '时间',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'Commentstatus',
48
+    label: '评论',
49
+  },
50
+  {
51
+    component: 'Select',
52
+    componentProps: {
53
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
+    },
55
+    fieldName: 'PositionStatus',
56
+    label: '岗位',
57
+  },
58
+  {
59
+    component: 'Select',
60
+    componentProps: {
61
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
+    },
63
+    fieldName: 'CreateStatus',
64
+    label: '创建',
65
+  },
66
+  {
67
+    component: 'Select',
68
+    componentProps: {
69
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
+    },
71
+    fieldName: 'executorStatus',
72
+    label: '执行人',
73
+  },
74
+];
75
+
76
+export const columns: VxeGridProps['columns'] = [
77
+  {
78
+    field: 'action',
79
+    fixed: 'left',
80
+    slots: { default: 'action' },
81
+    resizable: false,
82
+    title: '操作',
83
+    width: 180,
84
+  },
85
+  {
86
+    title: '处理时间',
87
+    fixed: 'left',
88
+    field: 'ProcessingTime',
89
+    minWidth: 130,
90
+  },
91
+  {
92
+    title: '我方油站',
93
+    fixed: 'left',
94
+    field: 'IGasstationstatus',
95
+    minWidth: 130,
96
+  },
97
+  {
98
+    title: '竟对油站',
99
+    fixed: 'left',
100
+    field: 'youGasstationstatus',
101
+    minWidth: 130,
102
+  },
103
+  {
104
+    title: '油站性质',
105
+    field: 'GasstationNature',
106
+    minWidth: 130,
107
+  },
108
+  {
109
+    title: '竞争关系',
110
+    field: 'Competitiverelationship',
111
+    minWidth: 130,
112
+  },
113
+  {
114
+    title: '距离(KM)',
115
+    field: 'Deadline',
116
+    minWidth: 130,
117
+  },
118
+  {
119
+    title: '挂牌价',
120
+    field: 'Deadline',
121
+    // minWidth: 130,
122
+    children: [
123
+      {
124
+        title: '95#',
125
+        field: '95#',
126
+        minWidth: 130,
127
+      },
128
+      {
129
+        title: '92#',
130
+        field: '92#',
131
+        minWidth: 130,
132
+      },
133
+      {
134
+        title: '92#专车',
135
+        field: 'Privatecar92#',
136
+        minWidth: 130,
137
+      },
138
+      {
139
+        title: '92#的士',
140
+        field: 'taxi92#',
141
+        minWidth: 130,
142
+      },
143
+      {
144
+        title: '92#油卡',
145
+        field: 'taxi92#',
146
+        minWidth: 130,
147
+      },
148
+    ],
149
+  },
150
+];
151
+export const mockData = [
152
+  {
153
+    ProcessingTime: '2024-06-01 08:00:00',
154
+    IGasstationstatus: '正常营业',
155
+    youGasstationstatus: '促销中',
156
+    GasstationNature: '民营',
157
+    Competitiverelationship: '直接竞争',
158
+    Deadline: 1.2,
159
+    '95#': 7.85,
160
+    '92#': 7.45,
161
+    'Privatecar92#': 7.35,
162
+    'taxi92#': 7.25,
163
+  },
164
+  {
165
+    ProcessingTime: '2024-06-01 09:15:00',
166
+    IGasstationstatus: '库存预警',
167
+    youGasstationstatus: '正常营业',
168
+    GasstationNature: '国企',
169
+    Competitiverelationship: '间接竞争',
170
+    Deadline: 2.1,
171
+    '95#': 7.90,
172
+    '92#': 7.50,
173
+    'Privatecar92#': 7.40,
174
+    'taxi92#': 7.30,
175
+  },
176
+  {
177
+    ProcessingTime: '2024-06-01 10:30:00',
178
+    IGasstationstatus: '正常营业',
179
+    youGasstationstatus: '降价促销',
180
+    GasstationNature: '合资',
181
+    Competitiverelationship: '直接竞争',
182
+    Deadline: 0.8,
183
+    '95#': 7.80,
184
+    '92#': 7.40,
185
+    'Privatecar92#': 7.30,
186
+    'taxi92#': 7.20,
187
+  },
188
+  {
189
+    ProcessingTime: '2024-06-01 11:45:00',
190
+    IGasstationstatus: '设备维护',
191
+    youGasstationstatus: '正常营业',
192
+    GasstationNature: '民营',
193
+    Competitiverelationship: '间接竞争',
194
+    Deadline: 1.5,
195
+    '95#': 7.95,
196
+    '92#': 7.55,
197
+    'Privatecar92#': 7.45,
198
+    'taxi92#': 7.35,
199
+  },
200
+  {
201
+    ProcessingTime: '2024-06-01 13:00:00',
202
+    IGasstationstatus: '正常营业',
203
+    youGasstationstatus: '会员日',
204
+    GasstationNature: '国企',
205
+    Competitiverelationship: '直接竞争',
206
+    Deadline: 1.0,
207
+    '95#': 7.88,
208
+    '92#': 7.48,
209
+    'Privatecar92#': 7.38,
210
+    'taxi92#': 7.28,
211
+  },
212
+];

+ 17 - 19
apps/web-ele/src/views/Archive/operationsManagement/competitivePricingSurvey/index.vue

@@ -2,7 +2,6 @@
2 2
   <Page :auto-content-height="true">
3 3
     <BasicTable>
4 4
       <template #toolbar-tools>
5
-        <el-button type="primary" plain>导出</el-button>
6 5
         <el-button @click="() => (showSearchForm = !showSearchForm)">
7 6
           展开/折叠
8 7
         </el-button>
@@ -24,9 +23,9 @@ import { ref } from 'vue';
24 23
 import { useRouter } from 'vue-router';
25 24
 import { Page } from '@vben/common-ui';
26 25
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
27
-import { columns, querySchema } from './config-data';
26
+import { columns, querySchema, mapFormToApi, mapApiToView } from './config-data';
28 27
 import type { VbenFormProps } from '@vben/common-ui';
29
-import { mockData } from './config-data';
28
+import { getCompetitorMarketingSurveyList } from '#/api/archive/operationsManagement/operationsManagement';
30 29
 const showSearchForm = ref(true) as any;
31 30
 const router = useRouter();
32 31
 const formOptions: VbenFormProps = {
@@ -57,33 +56,32 @@ const gridOptions: VxeGridProps = {
57 56
     reserve: true,
58 57
     // 点击行选中
59 58
     trigger: 'default',
60
-    checkMethod: ({ row }) => row?.roleId !== 1,
61 59
   },
62 60
   columns,
63 61
   size: 'medium',
64 62
   height: 'auto',
65
-  data: mockData,
66
-  // proxyConfig: {
67
-  //   ajax: {
68
-  //     query: async ({ page }, formValues = {}) => {
69
-  //       const resp = await getRoleList({
70
-  //         ...formValues,
71
-  //         pageNum: page.currentPage,
72
-  //         pageSize: page.pageSize,
73
-  //       });
74
-  //       return { items: resp.rows, total: resp.total };
75
-  //     },
76
-  //   },
77
-  // },
63
+  proxyConfig: {
64
+    ajax: {
65
+      query: async ({ page }, formValues = {}) => {
66
+        const apiParams = mapFormToApi(formValues, page);
67
+        const response = await getCompetitorMarketingSurveyList(apiParams);
68
+        const items = mapApiToView(response?.rows || []);
69
+        return {
70
+          items,
71
+          total: response?.total || 0,
72
+        };
73
+      },
74
+    },
75
+  },
78 76
   rowConfig: {
79
-    keyField: 'roleId',
77
+    keyField: 'id',
80 78
   },
81 79
   toolbarConfig: {
82 80
     custom: true,
83 81
     refresh: true,
84 82
     zoom: true,
85 83
   },
86
-  id: 'system-role-index',
84
+  id: 'competitive-pricing-survey-index',
87 85
 };
88 86
 const [BasicTable, BasicTableApi] = useVbenVxeGrid({
89 87
   showSearchForm,

+ 194 - 122
apps/web-ele/src/views/Archive/operationsManagement/competitiveSalesSurvey/config-data.tsx

@@ -1,78 +1,192 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
4
+import { getCompetitiveStationList } from '#/api/archive/operationsManagement/operationsManagement';
5
+// 岗位列表接口
6
+import { requestClient } from '#/api/request';
7
+
8
+// 获取岗位列表
9
+const getPostList = async () => {
10
+  const resp = await requestClient.get('/system/post/list');
11
+  return resp || [];
12
+};
5 13
 export const querySchema: FormSchemaGetter = () => [
6 14
   {
7
-    component: 'Select',
8
-    componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
-    },
11
-    fieldName: 'IGasstationstatus',
12
-    label: '我方油站',
13
-  },
15
+        component: 'ApiSelect',
16
+        fieldName: 'stationId',
17
+        label: '油站',
18
+        componentProps: {
19
+          placeholder: '请选择油站',
20
+          clearable: true,
21
+          api: async () => {
22
+            const resp = await selectAllSysStationAreaList();
23
+            const data = resp || [];
24
+            return Array.isArray(data)
25
+              ? data.map((item: any) => ({
26
+                  label: item.stationName,
27
+                  value: item.id.toString(),
28
+                }))
29
+              : [];
30
+          },
31
+          labelField: 'label',
32
+          valueField: 'value',
33
+        },
34
+      },
14 35
   {
15
-    component: 'Select',
36
+    component: 'ApiSelect',
16 37
     componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
38
+      api: async () => {
39
+        const resp = await getCompetitiveStationList({});
40
+        const data = resp?.rows || [];
41
+        return Array.isArray(data)
42
+          ? data.map((item: any) => ({ label: item.competitorName, value: item.id }))
43
+          : [];
44
+      },
45
+      labelField: 'label',
46
+      valueField: 'value',
47
+      placeholder: '请选择竟对油站',
18 48
     },
19
-    fieldName: 'youGasstationstatus',
49
+    fieldName: 'competitorId',
20 50
     label: '竟对油站',
21 51
   },
22 52
   {
23 53
     component: 'Select',
24 54
     componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
55
+      options: [
56
+        { label: '按时完成', value: 0 },
57
+        { label: '逾期完成', value: 1 },
58
+      ],
26 59
     },
27
-    fieldName: 'Status',
60
+    fieldName: 'completionStatus',
28 61
     label: '状态',
29 62
   },
30 63
   {
31 64
     component: 'DatePicker',
32 65
     componentProps: {
33 66
       type: 'daterange',
34
-      format: 'YYYY-MM-DD',
35
-      valueFormat: 'YYYY-MM-DD',
67
+      format: 'YYYY-MM-DD HH:mm:ss',
68
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
36 69
       startPlaceholder: '开始日期',
37 70
       endPlaceholder: '结束日期',
38 71
     },
39
-    fieldName: 'Time',
40
-    label: '时间',
72
+    fieldName: 'surveyStartTime',
73
+    label: '处理时间',
41 74
   },
42 75
   {
43 76
     component: 'Select',
44 77
     componentProps: {
45
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
78
+      options: [
79
+        { label: '否', value: 0 },
80
+        { label: '是', value: 1 },
81
+      ],
46 82
     },
47
-    fieldName: 'Commentstatus',
83
+    fieldName: 'isComment',
48 84
     label: '评论',
49 85
   },
50 86
   {
51
-    component: 'Select',
87
+    component: 'ApiSelect',
88
+    fieldName: 'position',
89
+    label: '岗位',
52 90
     componentProps: {
53
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
91
+      placeholder: '请选择岗位',
92
+      clearable: true,
93
+      api: async () => {
94
+        const data = await getPostList();
95
+        return Array.isArray(data.rows)
96
+          ? data.rows.map((item: any) => ({
97
+              label: item.postName || item.name,
98
+              value: item.postId,
99
+            }))
100
+          : [];
101
+      },
102
+      labelField: 'label',
103
+      valueField: 'value',
54 104
     },
55
-    fieldName: 'PositionStatus',
56
-    label: '岗位',
57 105
   },
58 106
   {
59 107
     component: 'Select',
60 108
     componentProps: {
61
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
109
+      options: [
110
+        { label: '系统', value: 0 },
111
+        { label: '新增', value: 1 },
112
+      ],
62 113
     },
63
-    fieldName: 'CreateStatus',
114
+    fieldName: 'createType',
64 115
     label: '创建',
65 116
   },
66 117
   {
67
-    component: 'Select',
118
+    component: 'Input',
68 119
     componentProps: {
69
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
120
+      placeholder: '请输入执行人',
70 121
     },
71
-    fieldName: 'executorStatus',
122
+    fieldName: 'executorName',
72 123
     label: '执行人',
73 124
   },
74 125
 ];
75 126
 
127
+/**
128
+ * 映射表单字段到API字段
129
+ */
130
+export function mapFormToApi(formValues: any, page: any) {
131
+  const apiParams = {
132
+    pageNum: page.currentPage,
133
+    pageSize: page.pageSize,
134
+  };
135
+  
136
+  // 我方油站
137
+  if (formValues.stationId) {
138
+    apiParams.stationId = formValues.stationId;
139
+  }
140
+  
141
+  // 竟对油站
142
+  if (formValues.competitorId) {
143
+    apiParams.competitorId = formValues.competitorId;
144
+  }
145
+  
146
+  // 完成状态
147
+  if (formValues.completionStatus !== undefined) {
148
+    apiParams.completionStatus = formValues.completionStatus;
149
+  }
150
+  
151
+  // 调查开始时间
152
+  if (formValues.surveyStartTime) {
153
+    apiParams.processStartTime = formValues.surveyStartTime[0];
154
+    apiParams.processEndTime = formValues.surveyStartTime[1];
155
+  }
156
+  
157
+  // 评论状态
158
+  if (formValues.isComment !== undefined) {
159
+    apiParams.isComment = formValues.isComment;
160
+  }
161
+  
162
+  // 岗位
163
+  if (formValues.position) {
164
+    apiParams.position = formValues.position;
165
+  }
166
+  
167
+  // 创建方式
168
+  if (formValues.createType !== undefined) {
169
+    apiParams.createType = formValues.createType;
170
+  }
171
+  
172
+  // 执行人
173
+  if (formValues.executorName) {
174
+    apiParams.executorName = formValues.executorName;
175
+  }
176
+  
177
+  return apiParams;
178
+}
179
+
180
+/**
181
+ * 映射API响应数据到页面显示字段
182
+ */
183
+export function mapApiToView(data: any[]) {
184
+  return data.map(item => ({
185
+    ...item,
186
+    // 处理需要转换的字段
187
+  }));
188
+}
189
+
76 190
 export const columns: VxeGridProps['columns'] = [
77 191
   {
78 192
     field: 'action',
@@ -85,165 +199,123 @@ export const columns: VxeGridProps['columns'] = [
85 199
   {
86 200
     title: '处理时间',
87 201
     fixed: 'left',
88
-    field: 'ProcessingTime',
89
-    minWidth: 130,
202
+    field: 'processTime',
203
+    minWidth: 180,
90 204
   },
91 205
   {
92 206
     title: '我方油站',
93 207
     fixed: 'left',
94
-    field: 'IGasstationstatus',
208
+    field: 'stationName',
95 209
     minWidth: 130,
96 210
   },
97 211
   {
98 212
     title: '竟对油站',
99 213
     fixed: 'left',
100
-    field: 'youGasstationstatus',
214
+    field: 'competitorName',
101 215
     minWidth: 130,
102 216
   },
103
-
217
+  {
218
+    title: '调查开始时间',
219
+    field: 'surveyStartTime',
220
+    minWidth: 180,
221
+  },
222
+  {
223
+    title: '调查结束时间',
224
+    field: 'surveyEndTime',
225
+    minWidth: 180,
226
+  },
104 227
   {
105 228
     title: '汽油车',
106
-    field: 'Gasolinecar',
107
-    // minWidth: 130,
229
+    field: 'gasoline',
108 230
     children: [
109 231
       {
110 232
         title: '进站车次',
111
-        field: 'GasArrivingTrains',
233
+        field: 'gasolineVehicleCount',
112 234
         minWidth: 130,
113 235
       },
114 236
       {
115 237
         title: '加油升数差',
116
-        field: 'GasOilNumber',
238
+        field: 'gasolineVolumeDiff',
117 239
         minWidth: 130,
118 240
       },
119 241
     ],
120 242
   },
121 243
   {
122 244
     title: '柴油车',
123
-    field: 'dieselcar',
124
-    // minWidth: 130,
245
+    field: 'diesel',
125 246
     children: [
126 247
       {
127 248
         title: '进站车次',
128
-        field: 'dieArrivingTrains',
249
+        field: 'dieselVehicleCount',
129 250
         minWidth: 130,
130 251
       },
131 252
       {
132 253
         title: '加油升数差',
133
-        field: 'dieOilNumber',
254
+        field: 'dieselVolumeDiff',
134 255
         minWidth: 130,
135 256
       },
136 257
     ],
137 258
   },
138 259
   {
139 260
     title: '摩托车',
140
-    field: 'Motorcycle',
141
-    // minWidth: 130,
261
+    field: 'motorcycle',
142 262
     children: [
143 263
       {
144 264
         title: '进站车次',
145
-        field: 'MotoArrivingTrains',
265
+        field: 'motorcycleCount',
146 266
         minWidth: 130,
147 267
       },
148 268
       {
149 269
         title: '加油升数差',
150
-        field: 'MotoOilNumber',
270
+        field: 'motorcycleVolumeDiff',
151 271
         minWidth: 130,
152 272
       },
153 273
     ],
154 274
   },
155 275
   {
156 276
     title: '气车',
157
-    field: 'pneumaticcar',
158
-    // minWidth: 130,
277
+    field: 'gas',
159 278
     children: [
160 279
       {
161 280
         title: '进站车次',
162
-        field: 'pneuArrivingTrains',
281
+        field: 'gasVehicleCount',
163 282
         minWidth: 130,
164 283
       },
165 284
       {
166 285
         title: '加油升数差',
167
-        field: 'pneuOilNumber',
286
+        field: 'gasVolumeDiff',
168 287
         minWidth: 130,
169 288
       },
170 289
     ],
171 290
   },
172 291
   {
173 292
     title: '时段预测销量差(升)',
174
-    field: 'TimePredictionSales',
293
+    field: 'periodForecastDiff',
175 294
     minWidth: 170,
176 295
   },
177
-];
178
-export const mockData = [
179
-  {
180
-    ProcessingTime: '2024-06-01 08:00:00',
181
-    IGasstationstatus: '正常营业',
182
-    youGasstationstatus: '促销中',
183
-    GasArrivingTrains: 320,
184
-    GasOilNumber: -120,
185
-    dieArrivingTrains: 180,
186
-    dieOilNumber: -80,
187
-    MotoArrivingTrains: 90,
188
-    MotoOilNumber: -35,
189
-    pneuArrivingTrains: 50,
190
-    pneuOilNumber: -20,
191
-    TimePredictionSales: -355,
192
-  },
193
-  {
194
-    ProcessingTime: '2024-06-01 09:15:00',
195
-    IGasstationstatus: '库存预警',
196
-    youGasstationstatus: '正常营业',
197
-    GasArrivingTrains: 380,
198
-    GasOilNumber: -150,
199
-    dieArrivingTrains: 210,
200
-    dieOilNumber: -95,
201
-    MotoArrivingTrains: 105,
202
-    MotoOilNumber: -42,
203
-    pneuArrivingTrains: 60,
204
-    pneuOilNumber: -25,
205
-    TimePredictionSales: -312,
206
-  },
207
-  {
208
-    ProcessingTime: '2024-06-01 10:30:00',
209
-    IGasstationstatus: '正常营业',
210
-    youGasstationstatus: '降价促销',
211
-    GasArrivingTrains: 310,
212
-    GasOilNumber: -135,
213
-    dieArrivingTrains: 170,
214
-    dieOilNumber: -78,
215
-    MotoArrivingTrains: 98,
216
-    MotoOilNumber: -40,
217
-    pneuArrivingTrains: 55,
218
-    pneuOilNumber: -22,
219
-    TimePredictionSales: -275,
220
-  },
221
-  {
222
-    ProcessingTime: '2024-06-01 11:45:00',
223
-    IGasstationstatus: '设备维护',
224
-    youGasstationstatus: '正常营业',
225
-    GasArrivingTrains: 340,
226
-    GasOilNumber: -160,
227
-    dieArrivingTrains: 200,
228
-    dieOilNumber: -88,
229
-    MotoArrivingTrains: 110,
230
-    MotoOilNumber: -45,
231
-    pneuArrivingTrains: 65,
232
-    pneuOilNumber: -28,
233
-    TimePredictionSales: -321,
234
-  },
235
-  {
236
-    ProcessingTime: '2024-06-01 13:00:00',
237
-    IGasstationstatus: '正常营业',
238
-    youGasstationstatus: '会员日',
239
-    GasArrivingTrains: 410,
240
-    GasOilNumber: -185,
241
-    dieArrivingTrains: 225,
242
-    dieOilNumber: -105,
243
-    MotoArrivingTrains: 120,
244
-    MotoOilNumber: -52,
245
-    pneuArrivingTrains: 70,
246
-    pneuOilNumber: -30,
247
-    TimePredictionSales: -372,
296
+  {
297
+    title: '全天预测销量差(升)',
298
+    field: 'dailyForecastDiff',
299
+    minWidth: 170,
300
+  },
301
+  {
302
+    title: '汽油调查销量(升)',
303
+    field: 'gasolineSurveyVolume',
304
+    minWidth: 170,
305
+  },
306
+  {
307
+    title: '柴油调查销量(升)',
308
+    field: 'dieselSurveyVolume',
309
+    minWidth: 170,
310
+  },
311
+  {
312
+    title: '是否是竞争油站',
313
+    field: 'isCompetitor',
314
+    minWidth: 130,
315
+    formatter: (cellValue: number) => {
316
+      return cellValue === 1 ? '是' : '否';
317
+    },
248 318
   },
249 319
 ];
320
+
321
+

+ 24 - 22
apps/web-ele/src/views/Archive/operationsManagement/competitiveSalesSurvey/index.vue

@@ -2,7 +2,6 @@
2 2
   <Page :auto-content-height="true">
3 3
     <BasicTable>
4 4
       <template #toolbar-tools>
5
-        <el-button type="primary" plain>导出</el-button>
6 5
         <el-button @click="() => (showSearchForm = !showSearchForm)">
7 6
           展开/折叠
8 7
         </el-button>
@@ -21,14 +20,15 @@
21 20
 </template>
22 21
 <script setup lang="ts">
23 22
 import { ref } from 'vue';
24
-import { useRouter } from 'vue-router';
23
+import { useRouter, useRoute } from 'vue-router';
25 24
 import { Page } from '@vben/common-ui';
26 25
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
27
-import { columns, querySchema } from './config-data';
26
+import { columns, querySchema, mapFormToApi, mapApiToView } from './config-data';
28 27
 import type { VbenFormProps } from '@vben/common-ui';
29
-import { mockData } from './config-data';
28
+import { getCompetitorSalesSurveyList } from '#/api/archive/operationsManagement/operationsManagement';
30 29
 const showSearchForm = ref(true) as any;
31 30
 const router = useRouter();
31
+const route = useRoute();
32 32
 const formOptions: VbenFormProps = {
33 33
   commonConfig: {
34 34
     labelWidth: 80,
@@ -57,41 +57,43 @@ const gridOptions: VxeGridProps = {
57 57
     reserve: true,
58 58
     // 点击行选中
59 59
     trigger: 'default',
60
-    checkMethod: ({ row }) => row?.roleId !== 1,
61 60
   },
62 61
   columns,
63 62
   size: 'medium',
64 63
   height: 'auto',
65
-  data: mockData,
66
-  // proxyConfig: {
67
-  //   ajax: {
68
-  //     query: async ({ page }, formValues = {}) => {
69
-  //       const resp = await getRoleList({
70
-  //         ...formValues,
71
-  //         pageNum: page.currentPage,
72
-  //         pageSize: page.pageSize,
73
-  //       });
74
-  //       return { items: resp.rows, total: resp.total };
75
-  //     },
76
-  //   },
77
-  // },
64
+  proxyConfig: {
65
+    ajax: {
66
+      query: async ({ page }, formValues = {}) => {
67
+        const apiParams = mapFormToApi(formValues, page);
68
+        apiParams.type = route.query.type || '';
69
+        apiParams.directoryType = route.query.directoryType || '';
70
+        console.log(apiParams);
71
+        const response = await getCompetitorSalesSurveyList(apiParams);
72
+        const items = mapApiToView(response?.rows || []);
73
+        return {
74
+          items,
75
+          total: response?.total || 0,
76
+        };
77
+      },
78
+    },
79
+  },
78 80
   rowConfig: {
79
-    keyField: 'roleId',
81
+    keyField: 'id',
80 82
   },
81 83
   toolbarConfig: {
82 84
     custom: true,
83 85
     refresh: true,
84 86
     zoom: true,
85 87
   },
86
-  id: 'system-role-index',
88
+  id: 'competitive-sales-survey-index',
87 89
 };
88
-const [BasicTable, BasicTableApi] = useVbenVxeGrid({
90
+const [BasicTable] = useVbenVxeGrid({
89 91
   showSearchForm,
90 92
   formOptions,
91 93
   gridOptions,
92 94
 });
93 95
 const handleTaskClick = (taskId: number) => {
94
-  router.push(`/schedule/detail/${taskId}`);
96
+  router.push(`/schedule/detail?id=${taskId}&type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
95 97
 };
96 98
 </script>
97 99
 <style scoped lang="scss">

+ 142 - 101
apps/web-ele/src/views/Archive/operationsManagement/licenseTaskManagement/config-data.tsx

@@ -1,162 +1,203 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
14
+
15
+// 获取证件名称列表
16
+const getLicenseNameList = async () => {
17
+  const resp = await requestClient.get('/sysLicenseRule/rule/list');
18
+  return resp || [];
19
+};
20
+
5 21
 export const querySchema: FormSchemaGetter = () => [
6 22
   {
7
-    component: 'Select',
23
+    component: 'ApiSelect',
24
+    fieldName: 'areaId',
25
+    label: '片区',
8 26
     componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
27
+      placeholder: '请选择片区',
28
+      clearable: true,
29
+      api: async () => {
30
+        const resp = await selectAllSysAreaList();
31
+        const data = resp || [];
32
+        return Array.isArray(data)
33
+          ? data.map((item: any) => ({
34
+              label: item.areaName,
35
+              value: item.id,
36
+            }))
37
+          : [];
38
+      },
39
+      labelField: 'label',
40
+      valueField: 'value',
10 41
     },
11
-    fieldName: 'areaStatus',
12
-    label: '片区',
13 42
   },
14 43
   {
15
-    component: 'Select',
44
+    component: 'ApiSelect',
45
+    fieldName: 'stationId',
46
+    label: '油站',
16 47
     componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
48
+      placeholder: '请选择油站',
49
+      clearable: true,
50
+      api: async () => {
51
+        const resp = await selectAllSysStationAreaList();
52
+        const data = resp || [];
53
+        return Array.isArray(data)
54
+          ? data.map((item: any) => ({
55
+              label: item.stationName,
56
+              value: item.id.toString(),
57
+            }))
58
+          : [];
59
+      },
60
+      labelField: 'label',
61
+      valueField: 'value',
18 62
     },
19
-    fieldName: 'gasstationStatus',
20
-    label: '油站',
21 63
   },
22 64
   {
23
-    component: 'Select',
65
+    component: 'ApiSelect',
66
+    fieldName: 'licenseRuleId',
67
+    label: '证件名称',
24 68
     componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
69
+      placeholder: '请选择证件名称',
70
+      clearable: true,
71
+      api: async () => {
72
+        const resp = await getLicenseNameList();
73
+        const data = resp?.rows || [];
74
+        return Array.isArray(data)
75
+          ? data.map((item: any) => ({
76
+              label: item.licenseName,
77
+              value: item.id,
78
+            }))
79
+          : [];
80
+      },
81
+      labelField: 'label',
82
+      valueField: 'value',
26 83
     },
27
-    fieldName: 'documentNameSelect',
28
-    label: '证件名称',
29 84
   },
30 85
   {
31 86
     component: 'DatePicker',
32 87
     componentProps: {
33 88
       type: 'daterange',
34
-      format: 'YYYY-MM-DD',
35
-      valueFormat: 'YYYY-MM-DD',
89
+      format: 'YYYY-MM-DD HH:mm:ss',
90
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
36 91
       startPlaceholder: '开始日期',
37 92
       endPlaceholder: '结束日期',
38 93
     },
39
-    labelClass: 'text-xs',
40
-    fieldName: 'taskStartedTime',
41
-    label: '任务开始时间',
94
+    fieldName: 'surveyStartTime',
95
+    label: '处理时间',
42 96
   },
43 97
   {
44 98
     component: 'Select',
99
+    fieldName: 'completionStatus',
100
+    label: '状态',
45 101
     componentProps: {
46
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
102
+      placeholder: '请选择完成状态',
103
+      options: [
104
+        { label: '按时完成', value: 0 },
105
+        { label: '逾期完成', value: 1 },
106
+      ],
47 107
     },
48
-    fieldName: 'taskStatus',
49
-    label: '任务状态',
50 108
   },
109
+
51 110
   {
52
-    component: 'Select',
111
+    component: 'Input',
112
+    fieldName: 'executorName',
113
+    label: '执行人',
53 114
     componentProps: {
54
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
115
+      placeholder: '请输入执行人',
55 116
     },
56
-    fieldName: 'executorStatus',
57
-    label: '执行人',
58 117
   },
118
+
59 119
 ];
60 120
 
121
+
61 122
 export const columns: VxeGridProps['columns'] = [
62 123
   {
124
+    type: 'checkbox',
125
+    width: 80,
126
+  },
127
+  {
63 128
     field: 'action',
64
-    fixed: 'left',
129
+    fixed: 'right',
65 130
     slots: { default: 'action' },
66
-    resizable: false,
67 131
     title: '操作',
68
-    width: 180,
132
+    width: 150,
133
+  },
134
+  {
135
+    field: 'taskName',
136
+    title: '任务名称',
137
+    minWidth: 150,
69 138
   },
70 139
   {
140
+    field: 'stationId',
71 141
     title: '油站',
72
-    field: 'gasstation',
73
-    minWidth: 130,
142
+    minWidth: 120,
74 143
   },
75 144
   {
145
+    field: 'licenseName',
76 146
     title: '证件名称',
77
-    field: 'documentName',
78
-    minWidth: 130,
147
+    minWidth: 120,
79 148
   },
80 149
   {
81
-    title: '任务类型',
82 150
     field: 'taskType',
83
-    minWidth: 130,
151
+    title: '任务类型',
152
+    minWidth: 120,
84 153
   },
85 154
   {
86
-    title: '任务开始时间',
87
-    field: 'taskStartedTime',
88
-    minWidth: 130,
155
+    field: 'executorName',
156
+    title: '执行人',
157
+    minWidth: 120,
89 158
   },
90 159
   {
91
-    title: '任务结束时间',
92
-    field: 'taskCompletedTime',
93
-    minWidth: 130,
160
+    field: 'position',
161
+    title: '岗位',
162
+    minWidth: 120,
94 163
   },
95 164
   {
96
-    title: '执行人',
97
-    field: 'executor',
98
-    minWidth: 130,
165
+    field: 'isComment',
166
+    title: '评论',
167
+    minWidth: 100,
168
+    align: 'center',
169
+    formatter: (cellValue: number) => {
170
+      return cellValue === 1 ? '已评' : '未评';
171
+    },
99 172
   },
100 173
   {
101
-    title: '任务状态',
102
-    field: 'taskStatus',
103
-    minWidth: 130,
174
+    field: 'deadline',
175
+    title: '截止时间',
176
+    minWidth: 180,
104 177
   },
105 178
   {
106
-    title: '操作人',
107
-    field: 'Operator',
108
-    minWidth: 130,
179
+    field: 'processTime',
180
+    title: '处理时间',
181
+    minWidth: 180,
109 182
   },
110
-];
111
-export const mockData = [
112
-  {
113
-    gasstation: '中山路加油站',
114
-    documentName: '营业执照年检',
115
-    taskType: '年度例行',
116
-    taskStartedTime: '2024-06-01 08:00',
117
-    taskCompletedTime: '2024-06-01 12:00',
118
-    executor: '王保瑞',
119
-    taskStatus: '已完成',
120
-    Operator: '李晴',
121
-  },
122
-  {
123
-    gasstation: '北环大道油站',
124
-    documentName: '消防器材检验',
125
-    taskType: '安全巡检',
126
-    taskStartedTime: '2024-06-01 09:15',
127
-    taskCompletedTime: '2024-06-01 11:30',
128
-    executor: '王凯',
129
-    taskStatus: '已完成',
130
-    Operator: '张敏',
131
-  },
132
-  {
133
-    gasstation: '城南综合能源站',
134
-    documentName: '油罐清洗记录',
135
-    taskType: '设备维护',
136
-    taskStartedTime: '2024-06-01 10:30',
137
-    taskCompletedTime: '',
138
-    executor: '李威',
139
-    taskStatus: '处理中',
140
-    Operator: '刘洋',
141
-  },
142
-  {
143
-    gasstation: '高速服务区东站',
144
-    documentName: '加油机校验报告',
145
-    taskType: '计量检定',
146
-    taskStartedTime: '2024-06-01 11:45',
147
-    taskCompletedTime: '2024-06-01 14:20',
148
-    executor: '张敏',
149
-    taskStatus: '已完成',
150
-    Operator: '王保瑞',
151
-  },
152
-  {
153
-    gasstation: '城西快充站',
154
-    documentName: '充电桩接地检测',
155
-    taskType: '安全检定',
156
-    taskStartedTime: '2024-06-01 13:00',
157
-    taskCompletedTime: '',
158
-    executor: '刘洋',
159
-    taskStatus: '处理中',
160
-    Operator: '李晴',
183
+  {
184
+    field: 'completionStatus',
185
+    title: '完成状态',
186
+    minWidth: 120,
187
+    align: 'center',
188
+    formatter: (cellValue: number) => {
189
+      return cellValue === 0 ? '按时完成' : '逾期完成';
190
+    },
191
+  },
192
+  {
193
+    field: 'createType',
194
+    title: '创建',
195
+    minWidth: 100,
196
+    align: 'center',
197
+    formatter: (cellValue: number) => {
198
+      return cellValue === 0 ? '系统' : '新增';
199
+    },
161 200
   },
162 201
 ];
202
+
203
+

+ 60 - 30
apps/web-ele/src/views/Archive/operationsManagement/licenseTaskManagement/index.vue

@@ -1,12 +1,12 @@
1 1
 <template>
2 2
   <Page :auto-content-height="true">
3
-    <BasicTable>
3
+    <BasicTable table-title="证照任务管理列表">
4 4
       <template #action="{ row }">
5 5
         <el-button
6 6
           size="small"
7 7
           type="primary"
8 8
           plain
9
-          @click="() => handleTaskClick(row.taskId)"
9
+          @click="() => handleTaskClick(row.id)"
10 10
           >查看</el-button
11 11
         >
12 12
       </template>
@@ -14,13 +14,43 @@
14 14
   </Page>
15 15
 </template>
16 16
 <script setup lang="ts">
17
-import { useRouter } from 'vue-router';
17
+import { ref } from 'vue';
18
+import { useRouter, useRoute } from 'vue-router';
18 19
 import { Page } from '@vben/common-ui';
19 20
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
20 21
 import { columns, querySchema } from './config-data';
21 22
 import type { VbenFormProps } from '@vben/common-ui';
22
-import { mockData } from './config-data';
23
+import { getLicenseTaskList } from '#/api/archive/operationsManagement/operationsManagement';
24
+
25
+const showSearchForm = ref(true) as any;
23 26
 const router = useRouter();
27
+const route = useRoute();
28
+
29
+// 表单字段到 API 字段的映射
30
+function mapFormToApi(formValues: any, page: any) {
31
+  const apiParams = {
32
+    pageNum: page.currentPage,
33
+    pageSize: page.pageSize,
34
+    type: route.query.type || '',
35
+    directoryType: route.query.directoryType || '',
36
+  };
37
+  
38
+  // 处理调查开始时间
39
+  if (formValues.surveyStartTime) {
40
+    apiParams.processStartTime = formValues.surveyStartTime[0];
41
+    apiParams.processEndTime = formValues.surveyStartTime[1];
42
+  }
43
+  
44
+  // 其他字段
45
+  Object.keys(formValues).forEach(key => {
46
+    if (key !== 'surveyStartTime') {
47
+      apiParams[key] = formValues[key];
48
+    }
49
+  });
50
+  
51
+  return apiParams;
52
+}
53
+
24 54
 const formOptions: VbenFormProps = {
25 55
   commonConfig: {
26 56
     labelWidth: 80,
@@ -30,14 +60,6 @@ const formOptions: VbenFormProps = {
30 60
   },
31 61
   schema: querySchema(),
32 62
   wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
33
-  // 日期选择格式化
34
-  // fieldMappingTime: [
35
-  //   [
36
-  //     'createTime',
37
-  //     ['params[beginTime]', 'params[endTime]'],
38
-  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
39
-  //   ],
40
-  // ],
41 63
 };
42 64
 
43 65
 // 列表中显示配置
@@ -49,42 +71,50 @@ const gridOptions: VxeGridProps = {
49 71
     reserve: true,
50 72
     // 点击行选中
51 73
     trigger: 'default',
52
-    checkMethod: ({ row }) => row?.roleId !== 1,
53 74
   },
54 75
   columns,
55 76
   size: 'medium',
56 77
   height: 'auto',
57
-  data: mockData,
58
-  // proxyConfig: {
59
-  //   ajax: {
60
-  //     query: async ({ page }, formValues = {}) => {
61
-  //       const resp = await getRoleList({
62
-  //         ...formValues,
63
-  //         pageNum: page.currentPage,
64
-  //         pageSize: page.pageSize,
65
-  //       });
66
-  //       return { items: resp.rows, total: resp.total };
67
-  //     },
68
-  //   },
69
-  // },
78
+  proxyConfig: {
79
+    ajax: {
80
+      query: async ({ page }, formValues = {}) => {
81
+        // 映射表单字段到 API 字段
82
+        const apiParams = mapFormToApi(formValues, page);
83
+        
84
+        // 调用API
85
+        const response = await getLicenseTaskList(apiParams);
86
+        
87
+        // 映射 API 响应数据到页面显示字段
88
+        const items = response.rows;
89
+        
90
+        return {
91
+          items,
92
+          total: response.total,
93
+        };
94
+      },
95
+    },
96
+  },
70 97
   rowConfig: {
71
-    keyField: 'roleId',
98
+    keyField: 'id',
72 99
   },
73 100
   toolbarConfig: {
74 101
     custom: true,
75 102
     refresh: true,
76 103
     zoom: true,
77 104
   },
78
-  id: 'system-role-index',
105
+  id: 'license-task-management-index',
79 106
 };
80
-const [BasicTable, BasicTableApi] = useVbenVxeGrid({
107
+const [BasicTable] = useVbenVxeGrid({
108
+  showSearchForm,
81 109
   formOptions,
82 110
   gridOptions,
83 111
 });
84 112
 const handleTaskClick = (taskId: number) => {
85
-  router.push(`/schedule/detail/${taskId}`);
113
+  // 跳转到任务详情页面
114
+  router.push(`/schedule/detail/${taskId}?type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
86 115
 };
87 116
 </script>
117
+
88 118
 <style scoped lang="scss">
89 119
 :deep(.el-tooltip__trigger:focus) {
90 120
   outline: none;

+ 131 - 100
apps/web-ele/src/views/Archive/operationsManagement/managementPlan/config-data.tsx

@@ -1,170 +1,201 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
14
+
15
+
5 16
 export const querySchema: FormSchemaGetter = () => [
6 17
   {
7
-    component: 'Select',
8
-    componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
-    },
11
-    fieldName: 'areaStatus',
12
-    label: '片区',
13
-  },
14
-  {
15
-    component: 'Select',
18
+    component: 'ApiSelect',
19
+    fieldName: 'stationId',
20
+    label: '油站',
16 21
     componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
22
+      placeholder: '请选择油站',
23
+      clearable: true,
24
+      api: async () => {
25
+        const resp = await selectAllSysStationAreaList();
26
+        const data = resp || [];
27
+        return Array.isArray(data)
28
+          ? data.map((item: any) => ({
29
+              label: item.stationName,
30
+              value: item.id.toString(),
31
+            }))
32
+          : [];
33
+      },
34
+      labelField: 'label',
35
+      valueField: 'value',
18 36
     },
19
-    fieldName: 'gasStationStatus',
20
-    label: '油站',
21 37
   },
22 38
   {
23 39
     component: 'Select',
40
+    fieldName: 'completionStatus',
41
+    label: '完成状态',
24 42
     componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
43
+      placeholder: '请选择完成状态',
44
+      options: [
45
+        { label: '按时完成', value: 0 },
46
+        { label: '逾期完成', value: 1 },
47
+      ],
26 48
     },
27
-    fieldName: 'status',
28
-    label: '状态',
29 49
   },
30 50
   {
31 51
     component: 'DatePicker',
32 52
     componentProps: {
33 53
       type: 'daterange',
34
-      format: 'YYYY-MM-DD',
35
-      valueFormat: 'YYYY-MM-DD',
54
+      format: 'YYYY-MM-DD HH:mm:ss',
55
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
36 56
       startPlaceholder: '开始日期',
37 57
       endPlaceholder: '结束日期',
38 58
     },
39
-    fieldName: 'handleTime',
59
+    fieldName: 'surveyStartTime',
40 60
     label: '处理时间',
41 61
   },
42 62
   {
43 63
     component: 'Select',
64
+    fieldName: 'isComment',
65
+    label: '评论',
44 66
     componentProps: {
45
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
67
+      placeholder: '请选择评论状态',
68
+      options: [
69
+        { label: '未评', value: 0 },
70
+        { label: '已评', value: 1 },
71
+      ],
46 72
     },
47
-    fieldName: 'commentStatus',
48
-    label: '评论',
49 73
   },
50 74
   {
51
-    component: 'Select',
75
+    component: 'ApiSelect',
76
+    fieldName: 'position',
77
+    label: '岗位',
52 78
     componentProps: {
53
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
79
+      placeholder: '请选择岗位',
80
+      clearable: true,
81
+      api: async () => {
82
+        const data = await getPostList();
83
+        return Array.isArray(data.rows)
84
+          ? data.rows.map((item: any) => ({
85
+              label: item.postName || item.name,
86
+              value: item.postId,
87
+            }))
88
+          : [];
89
+      },
90
+      labelField: 'label',
91
+      valueField: 'value',
54 92
     },
55
-    fieldName: 'positionStatus',
56
-    label: '岗位',
57 93
   },
58 94
   {
59 95
     component: 'Select',
96
+    fieldName: 'createType',
97
+    label: '创建',
60 98
     componentProps: {
61
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
99
+      placeholder: '请选择创建方式',
100
+      options: [
101
+        { label: '系统', value: 0 },
102
+        { label: '新增', value: 1 },
103
+      ],
62 104
     },
63
-    fieldName: 'createStatus',
64
-    label: '创建',
65 105
   },
66 106
   {
67
-    component: 'Select',
107
+    component: 'Input',
108
+    fieldName: 'executorName',
109
+    label: '执行人',
68 110
     componentProps: {
69
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
111
+      placeholder: '请输入执行人',
112
+    },
113
+  },
114
+  {
115
+    component: 'Input',
116
+    fieldName: 'taskName',
117
+    label: '任务名称',
118
+    componentProps: {
119
+      placeholder: '请输入任务名称',
70 120
     },
71
-    fieldName: 'executorStatus',
72
-    label: '执行人',
73 121
   },
74 122
 ];
75 123
 
124
+
76 125
 export const columns: VxeGridProps['columns'] = [
77 126
   {
127
+    type: 'checkbox',
128
+    width: 80,
129
+  },
130
+  {
78 131
     field: 'action',
79
-    fixed: 'left',
132
+    fixed: 'right',
80 133
     slots: { default: 'action' },
81
-    resizable: false,
82 134
     title: '操作',
83
-    width: 180,
135
+    width: 220,
84 136
   },
85 137
   {
138
+    field: 'taskName',
139
+    title: '任务名称',
140
+    minWidth: 150,
141
+  },
142
+  {
143
+    field: 'stationName',
86 144
     title: '油站',
87
-    field: 'gasStation',
88
-    minWidth: 130,
145
+    minWidth: 120,
89 146
   },
90 147
   {
148
+    field: 'executorName',
91 149
     title: '执行人',
92
-    field: 'executor',
93
-    minWidth: 130,
150
+    minWidth: 120,
94 151
   },
95 152
   {
96
-    title: '岗位',
97 153
     field: 'position',
98
-    minWidth: 130,
154
+    title: '岗位',
155
+    minWidth: 120,
99 156
   },
100 157
   {
158
+    field: 'isComment',
101 159
     title: '评论',
102
-    field: 'comment',
103
-    minWidth: 130,
160
+    minWidth: 100,
161
+    align: 'center',
162
+    formatter: (cellValue: number) => {
163
+      return cellValue === 1 ? '已评' : '未评';
164
+    },
104 165
   },
105 166
   {
106
-    title: '截止时间',
107 167
     field: 'deadline',
108
-    minWidth: 130,
168
+    title: '截止时间',
169
+    minWidth: 180,
109 170
   },
110 171
   {
172
+    field: 'processTime',
111 173
     title: '处理时间',
112
-    fixed: 'left',
113
-    field: 'processingTime',
114
-    minWidth: 130,
174
+    minWidth: 180,
115 175
   },
116
-
117 176
   {
118
-    title: '完成状态',
119
-    fixed: 'left',
120 177
     field: 'completionStatus',
121
-    minWidth: 130,
178
+    title: '完成状态',
179
+    minWidth: 120,
180
+    align: 'center',
181
+    formatter: (cellValue: number) => {
182
+      return cellValue === 0 ? '按时完成' : '逾期完成';
183
+    },
122 184
   },
123
-];
124
-export const mockData = [
125
-  {
126
-    gasStation: '中山路加油站',
127
-    executor: '王保瑞',
128
-    position: '当班经理',
129
-    comment: '高峰期车流大,需增派人手',
130
-    deadline: '2024-06-10 18:00',
131
-    processingTime: '2024-06-01 08:00',
132
-    completionStatus: '处理中',
133
-  },
134
-  {
135
-    gasStation: '北环大道油站',
136
-    executor: '王凯',
137
-    position: '安全员',
138
-    comment: '液位传感器读数漂移',
139
-    deadline: '2024-06-05 12:00',
140
-    processingTime: '2024-06-01 09:15',
141
-    completionStatus: '已完成',
142
-  },
143
-  {
144
-    gasStation: '城南综合能源站',
145
-    executor: '李威',
146
-    position: '设备管理员',
147
-    comment: '滤芯堵塞超标,需更换',
148
-    deadline: '2024-06-08 17:00',
149
-    processingTime: '2024-06-01 10:30',
150
-    completionStatus: '已完成',
151
-  },
152
-  {
153
-    gasStation: '高速服务区东站',
154
-    executor: '张敏',
155
-    position: '收银员',
156
-    comment: '小票打印机卡纸',
157
-    deadline: '2024-06-07 20:00',
158
-    processingTime: '2024-06-01 11:45',
159
-    completionStatus: '处理中',
160
-  },
161
-  {
162
-    gasStation: '城西快充站',
163
-    executor: '刘洋',
164
-    position: '电工',
165
-    comment: '接地电阻偏高,需复检',
166
-    deadline: '2024-06-06 16:00',
167
-    processingTime: '2024-06-01 13:00',
168
-    completionStatus: '待处理',
185
+  {
186
+    field: 'createType',
187
+    title: '创建',
188
+    minWidth: 100,
189
+    align: 'center',
190
+    formatter: (cellValue: number) => {
191
+      return cellValue === 0 ? '系统' : '新增';
192
+    },
193
+  },
194
+  {
195
+    field: 'month',
196
+    title: '月份',
197
+    minWidth: 120,
169 198
   },
170 199
 ];
200
+
201
+

+ 60 - 29
apps/web-ele/src/views/Archive/operationsManagement/managementPlan/index.vue

@@ -1,11 +1,41 @@
1 1
 <script setup lang="ts">
2
-import { useRouter } from 'vue-router';
2
+import { ref } from 'vue';
3
+import { useRouter, useRoute } from 'vue-router';
3 4
 import { Page } from '@vben/common-ui';
4 5
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
5 6
 import { columns, querySchema } from './config-data';
6 7
 import type { VbenFormProps } from '@vben/common-ui';
7
-import { mockData } from './config-data';
8
+import { getManagementPlanList } from '#/api/archive/operationsManagement/operationsManagement';
9
+
10
+const showSearchForm = ref(true) as any;
8 11
 const router = useRouter();
12
+const route = useRoute();
13
+
14
+// 表单字段到 API 字段的映射
15
+function mapFormToApi(formValues: any, page: any) {
16
+  const apiParams = {
17
+    pageNum: page.currentPage,
18
+    pageSize: page.pageSize,
19
+    type: route.query.type || '',
20
+    directoryType: route.query.directoryType || '',
21
+  };
22
+  
23
+  // 处理调查开始时间
24
+  if (formValues.surveyStartTime) {
25
+    apiParams.processStartTime = formValues.surveyStartTime[0];
26
+    apiParams.processEndTime = formValues.surveyStartTime[1];
27
+  }
28
+  
29
+  // 其他字段
30
+  Object.keys(formValues).forEach(key => {
31
+    if (key !== 'surveyStartTime') {
32
+      apiParams[key] = formValues[key];
33
+    }
34
+  });
35
+  
36
+  return apiParams;
37
+}
38
+
9 39
 const formOptions: VbenFormProps = {
10 40
   commonConfig: {
11 41
     labelWidth: 80,
@@ -15,14 +45,6 @@ const formOptions: VbenFormProps = {
15 45
   },
16 46
   schema: querySchema(),
17 47
   wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
18
-  // 日期选择格式化
19
-  // fieldMappingTime: [
20
-  //   [
21
-  //     'createTime',
22
-  //     ['params[beginTime]', 'params[endTime]'],
23
-  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
24
-  //   ],
25
-  // ],
26 48
 };
27 49
 
28 50
 // 列表中显示配置
@@ -34,51 +56,59 @@ const gridOptions: VxeGridProps = {
34 56
     reserve: true,
35 57
     // 点击行选中
36 58
     trigger: 'default',
37
-    checkMethod: ({ row }) => row?.roleId !== 1,
38 59
   },
39 60
   columns,
40 61
   size: 'medium',
41 62
   height: 'auto',
42
-  data: mockData,
43
-  // proxyConfig: {
44
-  //   ajax: {
45
-  //     query: async ({ page }, formValues = {}) => {
46
-  //       const resp = await getRoleList({
47
-  //         ...formValues,
48
-  //         pageNum: page.currentPage,
49
-  //         pageSize: page.pageSize,
50
-  //       });
51
-  //       return { items: resp.rows, total: resp.total };
52
-  //     },
53
-  //   },
54
-  // },
63
+  proxyConfig: {
64
+    ajax: {
65
+      query: async ({ page }, formValues = {}) => {
66
+        // 映射表单字段到 API 字段
67
+        const apiParams = mapFormToApi(formValues, page);
68
+        
69
+        // 调用API
70
+        const response = await getManagementPlanList(apiParams);
71
+        
72
+        // 映射 API 响应数据到页面显示字段
73
+        const items = response.rows;
74
+        
75
+        return {
76
+          items,
77
+          total: response.total,
78
+        };
79
+      },
80
+    },
81
+  },
55 82
   rowConfig: {
56
-    keyField: 'roleId',
83
+    keyField: 'id',
57 84
   },
58 85
   toolbarConfig: {
59 86
     custom: true,
60 87
     refresh: true,
61 88
     zoom: true,
62 89
   },
63
-  id: 'system-role-index',
90
+  id: 'management-plan-index',
64 91
 };
65 92
 const [BasicTable, BasicTableApi] = useVbenVxeGrid({
93
+  showSearchForm,
66 94
   formOptions,
67 95
   gridOptions,
68 96
 });
69 97
 const handleTaskClick = (taskId: number) => {
70
-  router.push(`/schedule/detail/${taskId}`);
98
+  // 跳转到任务详情页面
99
+  router.push(`/schedule/detail/${taskId}?type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`); 
71 100
 };
72 101
 </script>
102
+
73 103
 <template>
74 104
   <Page :auto-content-height="true">
75
-    <BasicTable>
105
+    <BasicTable table-title="管理计划列表">
76 106
       <template #action="{ row }">
77 107
         <el-button
78 108
           size="small"
79 109
           type="primary"
80 110
           plain
81
-          @click="() => handleTaskClick(row.taskId)"
111
+          @click="() => handleTaskClick(row.id)"
82 112
           >查看</el-button
83 113
         >
84 114
         <el-button size="small" type="primary" plain>打印清洁计划</el-button>
@@ -86,6 +116,7 @@ const handleTaskClick = (taskId: number) => {
86 116
     </BasicTable>
87 117
   </Page>
88 118
 </template>
119
+
89 120
 <style scoped lang="scss">
90 121
 :deep(.el-tooltip__trigger:focus) {
91 122
   outline: none;

+ 3 - 2
apps/web-ele/src/views/Archive/operationsManagement/operationsInspection/index.vue

@@ -15,13 +15,14 @@
15 15
   </Page>
16 16
 </template>
17 17
 <script setup lang="ts">
18
-import { useRouter } from 'vue-router';
18
+import { useRouter,operational } from 'vue-router';
19 19
 import { Page } from '@vben/common-ui';
20 20
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
21 21
 import { columns, querySchema } from './config-data';
22 22
 import type { VbenFormProps } from '@vben/common-ui';
23 23
 import { mockData } from './config-data';
24 24
 const router = useRouter();
25
+const route = useRoute();
25 26
 const formOptions: VbenFormProps = {
26 27
   commonConfig: {
27 28
     labelWidth: 80,
@@ -84,7 +85,7 @@ const gridOptions: VxeGridProps = {
84 85
   },
85 86
   id: 'system-role-index',
86 87
 };
87
-const [BasicTable, BasicTableApi] = useVbenVxeGrid({
88
+const [BasicTable] = useVbenVxeGrid({
88 89
   formOptions,
89 90
   gridOptions,
90 91
 });

+ 141 - 100
apps/web-ele/src/views/Archive/operationsManagement/teamLog/config-data.tsx

@@ -1,177 +1,218 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
14
+
5 15
 export const querySchema: FormSchemaGetter = () => [
6 16
   {
7
-    component: 'Select',
17
+    component: 'ApiSelect',
18
+    fieldName: 'areaId',
19
+    label: '片区',
8 20
     componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
21
+      placeholder: '请选择片区',
22
+      clearable: true,
23
+      api: async () => {
24
+        const resp = await selectAllSysAreaList();
25
+        const data = resp || [];
26
+        return Array.isArray(data)
27
+          ? data.map((item: any) => ({
28
+              label: item.areaName,
29
+              value: item.id,
30
+            }))
31
+          : [];
32
+      },
33
+      labelField: 'label',
34
+      valueField: 'value',
10 35
     },
11
-    fieldName: 'Areastatus',
12
-    label: '片区',
13 36
   },
14 37
   {
15
-    component: 'Select',
38
+    component: 'ApiSelect',
39
+    fieldName: 'stationId',
40
+    label: '油站',
16 41
     componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
42
+      placeholder: '请选择油站',
43
+      clearable: true,
44
+      api: async () => {
45
+        const resp = await selectAllSysStationAreaList();
46
+        const data = resp || [];
47
+        return Array.isArray(data)
48
+          ? data.map((item: any) => ({
49
+              label: item.stationName,
50
+              value: item.id.toString(),
51
+            }))
52
+          : [];
53
+      },
54
+      labelField: 'label',
55
+      valueField: 'value',
18 56
     },
19
-    fieldName: 'Gasstationstatus',
20
-    label: '油站',
21 57
   },
22 58
   {
23 59
     component: 'Select',
60
+    fieldName: 'completionStatus',
61
+    label: '状态',
24 62
     componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
63
+      placeholder: '请选择完成状态',
64
+      options: [
65
+        { label: '按时完成', value: 0 },
66
+        { label: '逾期完成', value: 1 },
67
+      ],
26 68
     },
27
-    fieldName: 'Status',
28
-    label: '状态',
29 69
   },
30 70
   {
31 71
     component: 'DatePicker',
32 72
     componentProps: {
33 73
       type: 'daterange',
34
-      format: 'YYYY-MM-DD',
35
-      valueFormat: 'YYYY-MM-DD',
74
+      format: 'YYYY-MM-DD HH:mm:ss',
75
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
36 76
       startPlaceholder: '开始日期',
37 77
       endPlaceholder: '结束日期',
38 78
     },
39
-    fieldName: 'SubmitTime',
79
+    fieldName: 'surveyStartTime',
40 80
     label: '提交时间',
41 81
   },
42 82
   {
43 83
     component: 'Select',
84
+    fieldName: 'isComment',
85
+    label: '评论',
44 86
     componentProps: {
45
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
87
+      placeholder: '请选择评论状态',
88
+      options: [
89
+        { label: '未评', value: 0 },
90
+        { label: '已评', value: 1 },
91
+      ],
46 92
     },
47
-    fieldName: 'Commentstatus',
48
-    label: '评论',
49 93
   },
50 94
   {
51
-    component: 'Select',
95
+    component: 'ApiSelect',
96
+    fieldName: 'position',
97
+    label: '岗位',
52 98
     componentProps: {
53
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
99
+      placeholder: '请选择岗位',
100
+      clearable: true,
101
+      api: async () => {
102
+        const data = await getPostList();
103
+        return Array.isArray(data.rows)
104
+          ? data.rows.map((item: any) => ({
105
+              label: item.postName || item.name,
106
+              value: item.postId,
107
+            }))
108
+          : [];
109
+      },
110
+      labelField: 'label',
111
+      valueField: 'value',
54 112
     },
55
-    fieldName: 'PositionStatus',
56
-    label: '岗位',
57 113
   },
58 114
   {
59 115
     component: 'Select',
116
+    fieldName: 'createType',
117
+    label: '创建',
60 118
     componentProps: {
61
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
119
+      placeholder: '请选择创建方式',
120
+      options: [
121
+        { label: '系统', value: 0 },
122
+        { label: '新增', value: 1 },
123
+      ],
62 124
     },
63
-    fieldName: 'CreateStatus',
64
-    label: '创建',
65 125
   },
66 126
   {
67
-    component: 'Select',
127
+    component: 'Input',
128
+    fieldName: 'executorName',
129
+    label: '执行人',
68 130
     componentProps: {
69
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
131
+      placeholder: '请输入执行人',
70 132
     },
71
-    fieldName: 'executorStatus',
72
-    label: '执行人',
73 133
   },
74 134
 ];
75 135
 
136
+
76 137
 export const columns: VxeGridProps['columns'] = [
77 138
   {
139
+    type: 'checkbox',
140
+    width: 80,
141
+  },
142
+  {
78 143
     field: 'action',
79
-    fixed: 'left',
144
+    fixed: 'right',
80 145
     slots: { default: 'action' },
81
-    resizable: false,
82 146
     title: '操作',
83
-    width: 180,
147
+    width: 150,
148
+  },
149
+  {
150
+    field: 'taskName',
151
+    title: '任务名称',
152
+    minWidth: 150,
84 153
   },
85 154
   {
155
+    field: 'stationName',
86 156
     title: '油站',
87
-    field: 'Gasstation',
88
-    minWidth: 130,
157
+    minWidth: 120,
89 158
   },
90 159
   {
160
+    field: 'executorName',
91 161
     title: '执行人',
92
-    field: 'Executor',
93
-    minWidth: 130,
162
+    minWidth: 120,
94 163
   },
95 164
   {
165
+    field: 'position',
96 166
     title: '岗位',
97
-    field: 'Position',
98
-    minWidth: 130,
167
+    minWidth: 120,
99 168
   },
100 169
   {
170
+    field: 'isComment',
101 171
     title: '评论',
102
-    field: 'Comment',
103
-    minWidth: 130,
172
+    minWidth: 100,
173
+    align: 'center',
174
+    formatter: (cellValue: number) => {
175
+      return cellValue === 1 ? '已评' : '未评';
176
+    },
104 177
   },
105 178
   {
179
+    field: 'deadline',
106 180
     title: '截止时间',
107
-    field: 'Deadline',
108
-    minWidth: 130,
181
+    minWidth: 180,
109 182
   },
110 183
   {
184
+    field: 'processTime',
111 185
     title: '提交时间',
112
-    field: 'SubmitTime',
113
-    minWidth: 130,
186
+    minWidth: 180,
114 187
   },
115 188
   {
189
+    field: 'completionStatus',
116 190
     title: '任务状态',
117
-    field: 'TaskStatus',
118
-    minWidth: 130,
191
+    minWidth: 120,
192
+    align: 'center',
193
+    formatter: (cellValue: number) => {
194
+      return cellValue === 0 ? '按时完成' : '逾期完成';
195
+    },
119 196
   },
120 197
   {
198
+    field: 'createType',
121 199
     title: '创建',
122
-    field: 'create',
123
-    minWidth: 130,
200
+    minWidth: 100,
201
+    align: 'center',
202
+    formatter: (cellValue: number) => {
203
+      return cellValue === 0 ? '系统' : '新增';
204
+    },
124 205
   },
125
-];
126
-export const mockData = [
127
-  {
128
-    Gasstation: '中山路加油站',
129
-    Executor: '王保瑞',
130
-    Position: '当班经理',
131
-    Comment: '高峰期车流大,需增派人手',
132
-    Deadline: '2024-06-10 18:00',
133
-    SubmitTime: '2024-06-01 08:15',
134
-    TaskStatus: '待处理',
135
-    create: '系统',
136
-  },
137
-  {
138
-    Gasstation: '北环大道油站',
139
-    Executor: '王凯',
140
-    Position: '安全员',
141
-    Comment: '油罐液位异常,需立即检查',
142
-    Deadline: '2024-06-05 12:00',
143
-    SubmitTime: '2024-06-01 09:30',
144
-    TaskStatus: '处理中',
145
-    create: '系统',
146
-  },
147
-  {
148
-    Gasstation: '城南综合能源站',
149
-    Executor: '李威',
150
-    Position: '设备管理员',
151
-    Comment: '加油机滤芯更换完成,请复核',
152
-    Deadline: '2024-06-08 17:00',
153
-    SubmitTime: '2024-06-01 10:45',
154
-    TaskStatus: '已完成',
155
-    create: '系统',
156
-  },
157
-  {
158
-    Gasstation: '高速服务区东站',
159
-    Executor: '张敏',
160
-    Position: '收银员',
161
-    Comment: 'POS 系统版本升级,测试支付流程',
162
-    Deadline: '2024-06-07 20:00',
163
-    SubmitTime: '2024-06-01 14:20',
164
-    TaskStatus: '待处理',
165
-    create: '系统',
166
-  },
167
-  {
168
-    Gasstation: '城西快充站',
169
-    Executor: '刘洋',
170
-    Position: '电工',
171
-    Comment: '充电桩接地电阻复检',
172
-    Deadline: '2024-06-06 16:00',
173
-    SubmitTime: '2024-06-01 15:10',
174
-    TaskStatus: '处理中',
175
-    create: '系统',
206
+  {
207
+    field: 'shiftDate',
208
+    title: '上班日期',
209
+    minWidth: 180,
210
+  },
211
+  {
212
+    field: 'shiftId',
213
+    title: '上班班次',
214
+    minWidth: 120,
176 215
   },
177 216
 ];
217
+
218
+

+ 60 - 30
apps/web-ele/src/views/Archive/operationsManagement/teamLog/index.vue

@@ -1,12 +1,12 @@
1 1
 <template>
2 2
   <Page :auto-content-height="true">
3
-    <BasicTable>
3
+    <BasicTable table-title="团队日志列表">
4 4
       <template #action="{ row }">
5 5
         <el-button
6 6
           size="small"
7 7
           type="primary"
8 8
           plain
9
-          @click="() => handleTaskClick(row.taskId)"
9
+          @click="() => handleTaskClick(row.id)"
10 10
           >查看</el-button
11 11
         >
12 12
         <el-button size="small" type="primary" plain>打印</el-button>
@@ -14,14 +14,45 @@
14 14
     </BasicTable>
15 15
   </Page>
16 16
 </template>
17
+
17 18
 <script setup lang="ts">
18
-import { useRouter } from 'vue-router';
19
+import { ref } from 'vue';
20
+import { useRouter, useRoute } from 'vue-router';
19 21
 import { Page } from '@vben/common-ui';
20 22
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
21 23
 import { columns, querySchema } from './config-data';
22 24
 import type { VbenFormProps } from '@vben/common-ui';
23
-import { mockData } from './config-data';
25
+import { getTeamShiftLogList } from '#/api/archive/operationsManagement/operationsManagement';
26
+
27
+const showSearchForm = ref(true) as any;
24 28
 const router = useRouter();
29
+const route = useRoute();
30
+
31
+// 表单字段到 API 字段的映射
32
+function mapFormToApi(formValues: any, page: any) {
33
+  const apiParams = {
34
+    pageNum: page.currentPage,
35
+    pageSize: page.pageSize,
36
+    type: route.query.type || '',
37
+    directoryType: route.query.directoryType || '',
38
+  };
39
+  
40
+  // 处理调查开始时间
41
+  if (formValues.surveyStartTime) {
42
+    apiParams.processStartTime = formValues.surveyStartTime[0];
43
+    apiParams.processEndTime = formValues.surveyStartTime[1];
44
+  }
45
+  
46
+  // 其他字段
47
+  Object.keys(formValues).forEach(key => {
48
+    if (key !== 'surveyStartTime') {
49
+      apiParams[key] = formValues[key];
50
+    }
51
+  });
52
+  
53
+  return apiParams;
54
+}
55
+
25 56
 
26 57
 const formOptions: VbenFormProps = {
27 58
   commonConfig: {
@@ -32,14 +63,6 @@ const formOptions: VbenFormProps = {
32 63
   },
33 64
   schema: querySchema(),
34 65
   wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
35
-  // 日期选择格式化
36
-  // fieldMappingTime: [
37
-  //   [
38
-  //     'createTime',
39
-  //     ['params[beginTime]', 'params[endTime]'],
40
-  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
41
-  //   ],
42
-  // ],
43 66
 };
44 67
 
45 68
 // 列表中显示配置
@@ -51,40 +74,47 @@ const gridOptions: VxeGridProps = {
51 74
     reserve: true,
52 75
     // 点击行选中
53 76
     trigger: 'default',
54
-    checkMethod: ({ row }) => row?.roleId !== 1,
55 77
   },
56 78
   columns,
57 79
   size: 'medium',
58 80
   height: 'auto',
59
-  data: mockData,
60
-  // proxyConfig: {
61
-  //   ajax: {
62
-  //     query: async ({ page }, formValues = {}) => {
63
-  //       const resp = await getRoleList({
64
-  //         ...formValues,
65
-  //         pageNum: page.currentPage,
66
-  //         pageSize: page.pageSize,
67
-  //       });
68
-  //       return { items: resp.rows, total: resp.total };
69
-  //     },
70
-  //   },
71
-  // },
81
+  proxyConfig: {
82
+    ajax: {
83
+      query: async ({ page }, formValues = {}) => {
84
+        // 映射表单字段到 API 字段
85
+        const apiParams = mapFormToApi(formValues, page);
86
+        
87
+        // 调用API
88
+        const response = await getTeamShiftLogList(apiParams);
89
+        
90
+        // 映射 API 响应数据到页面显示字段
91
+        const items = response.rows;
92
+        
93
+        return {
94
+          items,
95
+          total: response.total,
96
+        };
97
+      },
98
+    },
99
+  },
72 100
   rowConfig: {
73
-    keyField: 'roleId',
101
+    keyField: 'id',
74 102
   },
75 103
   toolbarConfig: {
76 104
     custom: true,
77 105
     refresh: true,
78 106
     zoom: true,
79 107
   },
80
-  id: 'system-role-index',
108
+  id: 'team-log-index',
81 109
 };
82
-const [BasicTable, BasicTableApi] = useVbenVxeGrid({
110
+const [BasicTable] = useVbenVxeGrid({
111
+  showSearchForm,
83 112
   formOptions,
84 113
   gridOptions,
85 114
 });
86 115
 const handleTaskClick = (taskId: number) => {
87
-  router.push(`/schedule/detail/${taskId}`);
116
+  // 跳转到任务详情页面
117
+  router.push(`/schedule/detail/${taskId}?type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
88 118
 };
89 119
 </script>
90 120
 <style scoped lang="scss">

+ 197 - 172
apps/web-ele/src/views/Archive/operationsManagement/turningRateSurvey/config-data.tsx

@@ -1,242 +1,267 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { DictEnum } from '@vben/constants';
4
-import { getDictOptions } from '#/utils/dict';
3
+
4
+import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+import { getCompetitiveStationList } from '#/api/archive/operationsManagement/operationsManagement';
6
+
7
+// 岗位列表接口
8
+import { requestClient } from '#/api/request';
9
+
10
+// 获取岗位列表
11
+const getPostList = async () => {
12
+  const resp = await requestClient.get('/system/post/list');
13
+  return resp || [];
14
+};
5 15
 export const querySchema: FormSchemaGetter = () => [
6 16
   {
7
-    component: 'Select',
8
-    componentProps: {
9
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
17
+      component: 'ApiSelect',
18
+      fieldName: 'stationId',
19
+      label: '油站',
20
+      componentProps: {
21
+        placeholder: '请选择油站',
22
+        clearable: true,
23
+        api: async () => {
24
+          const resp = await selectAllSysStationAreaList();
25
+          const data = resp || [];
26
+          return Array.isArray(data)
27
+            ? data.map((item: any) => ({
28
+                label: item.stationName,
29
+                value: item.id.toString(),
30
+              }))
31
+            : [];
32
+        },
33
+        labelField: 'label',
34
+        valueField: 'value',
35
+      },
10 36
     },
11
-    fieldName: 'IGasstationstatus',
12
-    label: '我方油站',
37
+   {
38
+     component: 'ApiSelect',
39
+     componentProps: {
40
+       api: async () => {
41
+         const resp = await getCompetitiveStationList({});
42
+         const data = resp?.rows || [];
43
+         return Array.isArray(data)
44
+           ? data.map((item: any) => ({ label: item.competitorName, value: item.id }))
45
+           : [];
46
+       },
47
+       labelField: 'label',
48
+       valueField: 'value',
49
+       placeholder: '请选择竟对油站',
50
+     },
51
+     fieldName: 'competitorId',
52
+     label: '竟对油站',
53
+   },
54
+   {
55
+     component: 'Select',
56
+     componentProps: {
57
+       options: [
58
+         { label: '按时完成', value: 0 },
59
+         { label: '逾期完成', value: 1 },
60
+       ],
61
+     },
62
+     fieldName: 'completionStatus',
63
+     label: '状态',
64
+   },
65
+   {
66
+     component: 'DatePicker',
67
+     componentProps: {
68
+       type: 'daterange',
69
+       format: 'YYYY-MM-DD HH:mm:ss',
70
+       valueFormat: 'YYYY-MM-DD HH:mm:ss',
71
+       startPlaceholder: '开始日期',
72
+       endPlaceholder: '结束日期',
73
+     },
74
+     fieldName: 'surveyStartTime',
75
+     label: '处理时间',
76
+   },
77
+   {
78
+     component: 'Select',
79
+     componentProps: {
80
+       options: [
81
+         { label: '否', value: 0 },
82
+         { label: '是', value: 1 },
83
+       ],
84
+     },
85
+     fieldName: 'isComment',
86
+     label: '评论',
87
+   },
88
+   {
89
+     component: 'ApiSelect',
90
+     fieldName: 'position',
91
+     label: '岗位',
92
+     componentProps: {
93
+       placeholder: '请选择岗位',
94
+       clearable: true,
95
+       api: async () => {
96
+         const data = await getPostList();
97
+         return Array.isArray(data.rows)
98
+           ? data.rows.map((item: any) => ({
99
+               label: item.postName || item.name,
100
+               value: item.postId,
101
+             }))
102
+           : [];
103
+       },
104
+       labelField: 'label',
105
+       valueField: 'value',
106
+     },
107
+   },
108
+   {
109
+     component: 'Select',
110
+     componentProps: {
111
+       options: [
112
+         { label: '系统', value: 0 },
113
+         { label: '新增', value: 1 },
114
+       ],
115
+     },
116
+     fieldName: 'createType',
117
+     label: '创建',
118
+   },
119
+   {
120
+     component: 'Input',
121
+     componentProps: {
122
+       placeholder: '请输入执行人',
123
+     },
124
+     fieldName: 'executorName',
125
+     label: '执行人',
126
+   },
127
+];
128
+
129
+
130
+export const columns: VxeGridProps['columns'] = [
131
+  {
132
+    type: 'checkbox',
133
+    width: 80,
13 134
   },
14 135
   {
15
-    component: 'Select',
16
-    componentProps: {
17
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
-    },
19
-    fieldName: 'youGasstationstatus',
20
-    label: '竟对油站',
136
+    field: 'action',
137
+    fixed: 'right',
138
+    slots: { default: 'action' },
139
+    title: '操作',
140
+    width: 150,
21 141
   },
22 142
   {
23
-    component: 'Select',
24
-    componentProps: {
25
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
-    },
27
-    fieldName: 'Status',
28
-    label: '状态',
143
+    field: 'taskName',
144
+    title: '任务名称',
145
+    minWidth: 150,
29 146
   },
30 147
   {
31
-    component: 'DatePicker',
32
-    componentProps: {
33
-      type: 'daterange',
34
-      format: 'YYYY-MM-DD',
35
-      valueFormat: 'YYYY-MM-DD',
36
-      startPlaceholder: '开始日期',
37
-      endPlaceholder: '结束日期',
38
-    },
39
-    fieldName: 'Time',
40
-    label: '时间',
148
+    field: 'stationId',
149
+    title: '油站',
150
+    minWidth: 120,
41 151
   },
42 152
   {
43
-    component: 'Select',
44
-    componentProps: {
45
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
-    },
47
-    fieldName: 'Commentstatus',
48
-    label: '评论',
153
+    field: 'executorName',
154
+    title: '执行人',
155
+    minWidth: 120,
49 156
   },
50 157
   {
51
-    component: 'Select',
52
-    componentProps: {
53
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
-    },
55
-    fieldName: 'PositionStatus',
56
-    label: '职位',
158
+    field: 'position',
159
+    title: '岗位',
160
+    minWidth: 120,
57 161
   },
58 162
   {
59
-    component: 'Select',
60
-    componentProps: {
61
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
163
+    field: 'isComment',
164
+    title: '评论',
165
+    minWidth: 100,
166
+    align: 'center',
167
+    formatter: (cellValue: number) => {
168
+      return cellValue === 1 ? '已评' : '未评';
62 169
     },
63
-    fieldName: 'CreateStatus',
64
-    label: '创建',
65 170
   },
66 171
   {
67
-    component: 'Select',
68
-    componentProps: {
69
-      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
172
+    field: 'deadline',
173
+    title: '截止时间',
174
+    minWidth: 180,
175
+  },
176
+  {
177
+    field: 'processTime',
178
+    title: '处理时间',
179
+    minWidth: 180,
180
+  },
181
+  {
182
+    field: 'completionStatus',
183
+    title: '完成状态',
184
+    minWidth: 120,
185
+    align: 'center',
186
+    formatter: (cellValue: number) => {
187
+      return cellValue === 0 ? '按时完成' : '逾期完成';
70 188
     },
71
-    fieldName: 'executorStatus',
72
-    label: '执行人',
73 189
   },
74
-];
75
-
76
-export const columns: VxeGridProps['columns'] = [
77 190
   {
78
-    field: 'action',
79
-    fixed: 'left',
80
-    slots: { default: 'action' },
81
-    resizable: false,
82
-    title: '操作',
83
-    width: 180,
191
+    field: 'createType',
192
+    title: '创建',
193
+    minWidth: 100,
194
+    align: 'center',
195
+    formatter: (cellValue: number) => {
196
+      return cellValue === 0 ? '系统' : '新增';
197
+    },
84 198
   },
85 199
   {
86
-    title: '处理时间',
87
-    fixed: 'left',
88
-    field: 'ProcessingTime',
89
-    minWidth: 130,
200
+    field: 'surveyStartTime',
201
+    title: '调查开始时间',
202
+    minWidth: 180,
90 203
   },
91 204
   {
92
-    title: '我方油站',
93
-    fixed: 'left',
94
-    field: 'IGasstationstatus',
95
-    minWidth: 130,
205
+    field: 'surveyEndTime',
206
+    title: '调查结束时间',
207
+    minWidth: 180,
96 208
   },
97 209
   {
98
-    title: '竟对油站',
99
-    fixed: 'left',
100
-    field: 'youGasstationstatus',
101
-    minWidth: 130,
210
+    field: 'competitorName',
211
+    title: '竞争油站名称',
212
+    minWidth: 150,
102 213
   },
103
-
104 214
   {
105 215
     title: '汽油车',
106
-    field: 'Gasolinecar',
107
-    // minWidth: 130,
108 216
     children: [
109 217
       {
110 218
         title: '路面车流',
111
-        field: 'GasRoadtraffic',
219
+        field: 'gasRoadFlow',
112 220
         minWidth: 130,
221
+        align: 'center',
113 222
       },
114 223
       {
115 224
         title: '进站车流',
116
-        field: 'GasIncomingtraffic',
117
-        minWidth: 130,
118
-      },
119
-      {
120
-        title: '拐入率',
121
-        field: 'GasTurninrate',
225
+        field: 'gasInFlow',
122 226
         minWidth: 130,
227
+        align: 'center',
123 228
       },
124 229
     ],
125 230
   },
126 231
   {
127 232
     title: '柴油车',
128
-    field: 'dieselcar',
129
-    // minWidth: 130,
130 233
     children: [
131 234
       {
132 235
         title: '路面车流',
133
-        field: 'DieselRoadtraffic',
236
+        field: 'dieselRoadFlow',
134 237
         minWidth: 130,
238
+        align: 'center',
135 239
       },
136 240
       {
137 241
         title: '进站车流',
138
-        field: 'DieselIncomingtraffic',
139
-        minWidth: 130,
140
-      },
141
-      {
142
-        title: '拐入率',
143
-        field: 'DieselTurninrate',
242
+        field: 'dieselInFlow',
144 243
         minWidth: 130,
244
+        align: 'center',
145 245
       },
146 246
     ],
147 247
   },
148 248
   {
149 249
     title: '摩托车',
150
-    field: 'Motorcycle',
151
-    // minWidth: 130,
152 250
     children: [
153 251
       {
154 252
         title: '路面车流',
155
-        field: 'MotoRoadtraffic',
253
+        field: 'motorcycleRoadFlow',
156 254
         minWidth: 130,
255
+        align: 'center',
157 256
       },
158 257
       {
159 258
         title: '进站车流',
160
-        field: 'MotoIncomingtraffic',
161
-        minWidth: 130,
162
-      },
163
-      {
164
-        title: '拐入率',
165
-        field: 'MotoTurninrate',
259
+        field: 'motorcycleInFlow',
166 260
         minWidth: 130,
261
+        align: 'center',
167 262
       },
168 263
     ],
169 264
   },
170 265
 ];
171
-export const mockData = [
172
-  {
173
-    ProcessingTime: '2024-06-01 08:00:00',
174
-    IGasstationstatus: '正常营业',
175
-    youGasstationstatus: '促销中',
176
-    GasRoadtraffic: 1200,
177
-    GasIncomingtraffic: 320,
178
-    GasTurninrate: '26.7%',
179
-    DieselRoadtraffic: 800,
180
-    DieselIncomingtraffic: 180,
181
-    DieselTurninrate: '22.5%',
182
-    MotoRoadtraffic: 450,
183
-    MotoIncomingtraffic: 90,
184
-    MotoTurninrate: '20.0%',
185
-  },
186
-  {
187
-    ProcessingTime: '2024-06-01 09:15:00',
188
-    IGasstationstatus: '库存预警',
189
-    youGasstationstatus: '正常营业',
190
-    GasRoadtraffic: 1350,
191
-    GasIncomingtraffic: 380,
192
-    GasTurninrate: '28.1%',
193
-    DieselRoadtraffic: 920,
194
-    DieselIncomingtraffic: 210,
195
-    DieselTurninrate: '22.8%',
196
-    MotoRoadtraffic: 510,
197
-    MotoIncomingtraffic: 105,
198
-    MotoTurninrate: '20.6%',
199
-  },
200
-  {
201
-    ProcessingTime: '2024-06-01 10:30:00',
202
-    IGasstationstatus: '正常营业',
203
-    youGasstationstatus: '降价促销',
204
-    GasRoadtraffic: 1100,
205
-    GasIncomingtraffic: 310,
206
-    GasTurninrate: '28.2%',
207
-    DieselRoadtraffic: 750,
208
-    DieselIncomingtraffic: 170,
209
-    DieselTurninrate: '22.7%',
210
-    MotoRoadtraffic: 480,
211
-    MotoIncomingtraffic: 98,
212
-    MotoTurninrate: '20.4%',
213
-  },
214
-  {
215
-    ProcessingTime: '2024-06-01 11:45:00',
216
-    IGasstationstatus: '设备维护',
217
-    youGasstationstatus: '正常营业',
218
-    GasRoadtraffic: 1250,
219
-    GasIncomingtraffic: 340,
220
-    GasTurninrate: '27.2%',
221
-    DieselRoadtraffic: 880,
222
-    DieselIncomingtraffic: 200,
223
-    DieselTurninrate: '22.7%',
224
-    MotoRoadtraffic: 520,
225
-    MotoIncomingtraffic: 110,
226
-    MotoTurninrate: '21.2%',
227
-  },
228
-  {
229
-    ProcessingTime: '2024-06-01 13:00:00',
230
-    IGasstationstatus: '正常营业',
231
-    youGasstationstatus: '会员日',
232
-    GasRoadtraffic: 1400,
233
-    GasIncomingtraffic: 410,
234
-    GasTurninrate: '29.3%',
235
-    DieselRoadtraffic: 950,
236
-    DieselIncomingtraffic: 225,
237
-    DieselTurninrate: '23.7%',
238
-    MotoRoadtraffic: 560,
239
-    MotoIncomingtraffic: 120,
240
-    MotoTurninrate: '21.4%',
241
-  },
242
-];
266
+
267
+

+ 60 - 31
apps/web-ele/src/views/Archive/operationsManagement/turningRateSurvey/index.vue

@@ -1,28 +1,58 @@
1 1
 <template>
2 2
   <Page :auto-content-height="true">
3
-    <BasicTable>
3
+    <BasicTable table-title="拐入率调查列表">
4 4
       <template #action="{ row }">
5 5
         <el-button
6 6
           size="small"
7 7
           type="primary"
8 8
           plain
9
-          @click="() => handleTaskClick(row.taskId)"
9
+          @click="() => handleTaskClick(row.id)"
10 10
           >查看</el-button
11 11
         >
12 12
       </template>
13 13
     </BasicTable>
14 14
   </Page>
15 15
 </template>
16
+
16 17
 <script setup lang="ts">
17 18
 import { ref } from 'vue';
18
-import { useRouter } from 'vue-router';
19
+import { useRouter, useRoute } from 'vue-router';
19 20
 import { Page } from '@vben/common-ui';
20 21
 import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
21 22
 import { columns, querySchema } from './config-data';
22 23
 import type { VbenFormProps } from '@vben/common-ui';
23
-import { mockData } from './config-data';
24
+import { getTurnInRateSurveyList } from '#/api/archive/operationsManagement/operationsManagement';
25
+
24 26
 const showSearchForm = ref(true) as any;
25 27
 const router = useRouter();
28
+const route = useRoute();
29
+
30
+// 表单字段到 API 字段的映射
31
+function mapFormToApi(formValues: any, page: any) {
32
+  const apiParams = {
33
+    pageNum: page.currentPage,
34
+    pageSize: page.pageSize,
35
+    type: route.query.type || '',
36
+    directoryType: route.query.directoryType || '',
37
+  };
38
+  
39
+  // 处理调查开始时间
40
+  if (formValues.surveyStartTime) {
41
+    apiParams.processStartTime = formValues.surveyStartTime[0];
42
+    apiParams.processEndTime = formValues.surveyStartTime[1];
43
+  }
44
+  
45
+  // 其他字段
46
+  Object.keys(formValues).forEach(key => {
47
+    if (key !== 'surveyStartTime') {
48
+      apiParams[key] = formValues[key];
49
+    }
50
+  });
51
+  
52
+  return apiParams;
53
+}
54
+
55
+
26 56
 const formOptions: VbenFormProps = {
27 57
   commonConfig: {
28 58
     labelWidth: 80,
@@ -32,14 +62,6 @@ const formOptions: VbenFormProps = {
32 62
   },
33 63
   schema: querySchema(),
34 64
   wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
35
-  // 日期选择格式化
36
-  // fieldMappingTime: [
37
-  //   [
38
-  //     'createTime',
39
-  //     ['params[beginTime]', 'params[endTime]'],
40
-  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
41
-  //   ],
42
-  // ],
43 65
 };
44 66
 
45 67
 // 列表中显示配置
@@ -47,47 +69,54 @@ const gridOptions: VxeGridProps = {
47 69
   checkboxConfig: {
48 70
     // 高亮
49 71
     highlight: true,
50
-    // 翻页时保留选中状态s
72
+    // 翻页时保留选中状态
51 73
     reserve: true,
52 74
     // 点击行选中
53 75
     trigger: 'default',
54
-    checkMethod: ({ row }) => row?.roleId !== 1,
55 76
   },
56 77
   columns,
57 78
   size: 'medium',
58 79
   height: 'auto',
59
-  data: mockData,
60
-  // proxyConfig: {
61
-  //   ajax: {
62
-  //     query: async ({ page }, formValues = {}) => {
63
-  //       const resp = await getRoleList({
64
-  //         ...formValues,
65
-  //         pageNum: page.currentPage,
66
-  //         pageSize: page.pageSize,
67
-  //       });
68
-  //       return { items: resp.rows, total: resp.total };
69
-  //     },
70
-  //   },
71
-  // },
80
+  proxyConfig: {
81
+    ajax: {
82
+      query: async ({ page }, formValues = {}) => {
83
+        // 映射表单字段到 API 字段
84
+        const apiParams = mapFormToApi(formValues, page);
85
+        
86
+        // 调用API
87
+        const response = await getTurnInRateSurveyList(apiParams);
88
+        
89
+        // 映射 API 响应数据到页面显示字段
90
+        const items = response.rows;
91
+        
92
+        return {
93
+          items,
94
+          total: response.total,
95
+        };
96
+      },
97
+    },
98
+  },
72 99
   rowConfig: {
73
-    keyField: 'roleId',
100
+    keyField: 'id',
74 101
   },
75 102
   toolbarConfig: {
76 103
     custom: true,
77 104
     refresh: true,
78 105
     zoom: true,
79 106
   },
80
-  id: 'system-role-index',
107
+  id: 'turning-rate-survey-index',
81 108
 };
82
-const [BasicTable, BasicTableApi] = useVbenVxeGrid({
109
+const [BasicTable] = useVbenVxeGrid({
83 110
   showSearchForm,
84 111
   formOptions,
85 112
   gridOptions,
86 113
 });
87 114
 const handleTaskClick = (taskId: number) => {
88
-  router.push(`/schedule/detail/${taskId}`);
115
+  // 跳转到任务详情页面
116
+  router.push(`/schedule/detail?id=${taskId}&type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
89 117
 };
90 118
 </script>
119
+
91 120
 <style scoped lang="scss">
92 121
 :deep(.el-tooltip__trigger:focus) {
93 122
   outline: none;

+ 100 - 62
apps/web-ele/src/views/Archive/visitorFeedback/collectAttach/collectAttach-data.tsx

@@ -1,6 +1,18 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3 3
 
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
14
+
15
+
4 16
 export const drawerFormSchema: FormSchemaGetter = () => [
5 17
   {
6 18
     component: 'Input',
@@ -22,74 +34,116 @@ export const drawerFormSchema: FormSchemaGetter = () => [
22 34
 
23 35
 export const queryFormSchema: FormSchemaGetter = () => [
24 36
   {
25
-    component: 'Select',
26
-    fieldName: 'area',
37
+    component: 'ApiSelect',
38
+    fieldName: 'areaId',
27 39
     label: '片区',
28 40
     componentProps: {
29 41
       placeholder: '请选择片区',
30
-      options: [
31
-        { label: '片区1', value: 'area1' },
32
-        { label: '片区2', value: 'area2' },
33
-        { label: '片区3', value: 'area3' },
34
-      ],
42
+      clearable: true,
43
+      api: async () => {
44
+        const resp = await selectAllSysAreaList();
45
+        const data = resp || [];
46
+        return Array.isArray(data)
47
+          ? data.map((item: any) => ({
48
+              label: item.areaName,
49
+              value: item.id,
50
+            }))
51
+          : [];
52
+      },
53
+      labelField: 'label',
54
+      valueField: 'value',
35 55
     },
36 56
   },
37 57
   {
38
-    component: 'Select',
39
-    fieldName: 'station',
58
+    component: 'ApiSelect',
59
+    fieldName: 'stationId',
40 60
     label: '油站',
41 61
     componentProps: {
42 62
       placeholder: '请选择油站',
43
-      options: [
44
-        { label: '油站1', value: 'station1' },
45
-        { label: '油站2', value: 'station2' },
46
-        { label: '油站3', value: 'station3' },
47
-      ],
63
+      clearable: true,
64
+      api: async () => {
65
+        const resp = await selectAllSysStationAreaList();
66
+        const data = resp || [];
67
+        return Array.isArray(data)
68
+          ? data.map((item: any) => ({
69
+              label: item.stationName,
70
+              value: item.id.toString(),
71
+            }))
72
+          : [];
73
+      },
74
+      labelField: 'label',
75
+      valueField: 'value',
48 76
     },
49 77
   },
50 78
   {
51 79
     component: 'Select',
52
-    fieldName: 'status',
80
+    fieldName: 'completionStatus',
53 81
     label: '完成状态',
54 82
     componentProps: {
55 83
       placeholder: '请选择完成状态',
56 84
       options: [
57
-        { label: '按时完成', value: 'onTime' },
58
-        { label: '逾期完成', value: 'overdue' },
85
+        { label: '按时完成', value: 0 },
86
+        { label: '逾期完成', value: 1 },
59 87
       ],
60 88
     },
61 89
   },
62 90
   {
63 91
     component: 'DatePicker',
64
-    fieldName: 'handleTime',
92
+    fieldName: 'processStartTime',
65 93
     label: '处理时间',
66 94
     componentProps: {
67
-      placeholder: '请选择处理时间',
95
+      placeholder: '请选择处理开始日期',
68 96
       type: 'date',
97
+      format: 'YYYY-MM-DD',
98
+      valueFormat: 'YYYY-MM-DD',
99
+      style: {
100
+        width: '100%',
101
+      },
69 102
     },
70 103
   },
71 104
   {
72
-    component: 'Select',
105
+    component: 'DatePicker',
106
+    fieldName: 'processEndTime',
107
+    label: '处理时间',
108
+    componentProps: {
109
+      placeholder: '请选择处理结束日期',
110
+      type: 'date',
111
+      format: 'YYYY-MM-DD',
112
+      valueFormat: 'YYYY-MM-DD',
113
+      style: {
114
+        width: '100%',
115
+      },
116
+    },
117
+  },
118
+  {
119
+    component: 'ApiSelect',
73 120
     fieldName: 'position',
74 121
     label: '岗位',
75 122
     componentProps: {
76 123
       placeholder: '请选择岗位',
77
-      options: [
78
-        { label: '站长', value: 'manager' },
79
-        { label: '营业员', value: 'clerk' },
80
-        { label: '安全员', value: 'safety' },
81
-      ],
124
+      clearable: true,
125
+      api: async () => {
126
+        const data = await getPostList();
127
+        return Array.isArray(data.rows)
128
+          ? data.rows.map((item: any) => ({
129
+              label: item.postName || item.name,
130
+              value: item.postId,
131
+            }))
132
+          : [];
133
+      },
134
+      labelField: 'label',
135
+      valueField: 'value',
82 136
     },
83 137
   },
84 138
   {
85 139
     component: 'Select',
86
-    fieldName: 'comment',
140
+    fieldName: 'isComment',
87 141
     label: '评论',
88 142
     componentProps: {
89 143
       placeholder: '请选择评论状态',
90 144
       options: [
91
-        { label: '未评', value: 'uncommented' },
92
-        { label: '已评', value: 'commented' },
145
+        { label: '未评', value: 0 },
146
+        { label: '已评', value: 1 },
93 147
       ],
94 148
     },
95 149
   },
@@ -100,14 +154,14 @@ export const queryFormSchema: FormSchemaGetter = () => [
100 154
     componentProps: {
101 155
       placeholder: '请选择创建方式',
102 156
       options: [
103
-        { label: '系统', value: 'system' },
104
-        { label: '新增', value: 'manual' },
157
+        { label: '系统', value: 0 },
158
+        { label: '新增', value: 1 },
105 159
       ],
106 160
     },
107 161
   },
108 162
   {
109 163
     component: 'Input',
110
-    fieldName: 'executor',
164
+    fieldName: 'executorName',
111 165
     label: '执行人',
112 166
     componentProps: {
113 167
       placeholder: '请输入执行人',
@@ -123,6 +177,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
123 177
   },
124 178
 ];
125 179
 
180
+
126 181
 export const tableColumns: VxeGridProps['columns'] = [
127 182
   {
128 183
     type: 'checkbox',
@@ -134,28 +189,17 @@ export const tableColumns: VxeGridProps['columns'] = [
134 189
     minWidth: 150,
135 190
   },
136 191
   {
137
-    field: 'station',
192
+    field: 'stationName',
138 193
     title: '油站',
139 194
     minWidth: 120,
140 195
   },
141 196
   {
142
-    field: 'attachments',
143
-    title: '附件',
197
+    field: 'attachmentName',
198
+    title: '附件名称',
144 199
     minWidth: 150,
145
-    formatter: (cellValue: string[]) => {
146
-      if (!cellValue || cellValue.length === 0) {
147
-        return '无附件';
148
-      }
149
-      return `共 ${cellValue.length} 个附件`;
150
-    },
151
-  },
152
-  {
153
-    field: 'remark',
154
-    title: '备注',
155
-    minWidth: 180,
156 200
   },
157 201
   {
158
-    field: 'executor',
202
+    field: 'executorName',
159 203
     title: '执行人',
160 204
     minWidth: 120,
161 205
   },
@@ -163,21 +207,14 @@ export const tableColumns: VxeGridProps['columns'] = [
163 207
     field: 'position',
164 208
     title: '岗位',
165 209
     minWidth: 120,
166
-    formatter: (cellValue: string) => {
167
-      return cellValue === 'manager'
168
-        ? '站长'
169
-        : (cellValue === 'clerk'
170
-          ? '营业员'
171
-          : '安全员');
172
-    },
173 210
   },
174 211
   {
175
-    field: 'comment',
212
+    field: 'isComment',
176 213
     title: '评论',
177 214
     minWidth: 100,
178 215
     align: 'center',
179
-    formatter: (cellValue: string) => {
180
-      return cellValue === 'commented' ? '已评' : '未评';
216
+    formatter: (cellValue: number) => {
217
+      return cellValue === 1 ? '已评' : '未评';
181 218
     },
182 219
   },
183 220
   {
@@ -186,17 +223,17 @@ export const tableColumns: VxeGridProps['columns'] = [
186 223
     minWidth: 180,
187 224
   },
188 225
   {
189
-    field: 'handleTime',
226
+    field: 'processTime',
190 227
     title: '处理时间',
191 228
     minWidth: 180,
192 229
   },
193 230
   {
194
-    field: 'status',
231
+    field: 'completionStatus',
195 232
     title: '完成状态',
196 233
     minWidth: 120,
197 234
     align: 'center',
198
-    formatter: (cellValue: string) => {
199
-      return cellValue === 'onTime' ? '按时完成' : '逾期完成';
235
+    formatter: (cellValue: number) => {
236
+      return cellValue === 0 ? '按时完成' : '逾期完成';
200 237
     },
201 238
   },
202 239
   {
@@ -204,8 +241,8 @@ export const tableColumns: VxeGridProps['columns'] = [
204 241
     title: '创建',
205 242
     minWidth: 100,
206 243
     align: 'center',
207
-    formatter: (cellValue: string) => {
208
-      return cellValue === 'system' ? '系统' : '新增';
244
+    formatter: (cellValue: number) => {
245
+      return cellValue === 0 ? '系统' : '新增';
209 246
     },
210 247
   },
211 248
   {
@@ -216,3 +253,4 @@ export const tableColumns: VxeGridProps['columns'] = [
216 253
     width: 150,
217 254
   },
218 255
 ];
256
+

+ 26 - 166
apps/web-ele/src/views/Archive/visitorFeedback/collectAttach/index.vue

@@ -12,6 +12,7 @@ import { ElMessage } from 'element-plus';
12 12
 import { useVbenVxeGrid } from '#/adapter/vxe-table';
13 13
 
14 14
 import { queryFormSchema, tableColumns } from './collectAttach-data';
15
+import { getTaskAttachmentList } from '#/api/archive/operationsManagement/operationsManagement';
15 16
 
16 17
 const router = useRouter();
17 18
 const route = useRoute();
@@ -19,6 +20,17 @@ const route = useRoute();
19 20
 // 打印当前路由和路由参数
20 21
 console.log('当前路由路径,参数:', route.path, route.query);
21 22
 
23
+// 表单字段到 API 字段的映射
24
+function mapFormToApi(formValues: any, page: any) {
25
+  const apiParams = {
26
+    pageNum: page.currentPage,
27
+    pageSize: page.pageSize,
28
+    type: route.query.type || '',
29
+    directoryType: route.query.directoryType || '',
30
+    ...formValues,
31
+  };
32
+  return apiParams;
33
+}
22 34
 
23 35
 const formOptions: VbenFormProps = {
24 36
   commonConfig: {
@@ -31,83 +43,6 @@ const formOptions: VbenFormProps = {
31 43
   wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
32 44
 };
33 45
 
34
-// 模拟访客检查任务数据
35
-const mockData = {
36
-  rows: [
37
-    {
38
-      id: '1',
39
-      taskName: '访客检查任务1',
40
-      station: '油站1',
41
-      attachments: ['附件1.pdf', '附件2.docx'],
42
-      remark: '这是一个重要的访客检查任务',
43
-      executor: '张三',
44
-      position: 'manager',
45
-      comment: 'commented',
46
-      deadline: '2024-05-01',
47
-      handleTime: '2024-04-30',
48
-      status: 'onTime',
49
-      createType: 'system',
50
-    },
51
-    {
52
-      id: '2',
53
-      taskName: '访客检查任务2',
54
-      station: '油站2',
55
-      attachments: ['附件3.jpg'],
56
-      remark: '需要重点检查安全措施',
57
-      executor: '李四',
58
-      position: 'clerk',
59
-      comment: 'uncommented',
60
-      deadline: '2024-05-02',
61
-      handleTime: '2024-05-03',
62
-      status: 'overdue',
63
-      createType: 'manual',
64
-    },
65
-    {
66
-      id: '3',
67
-      taskName: '访客检查任务3',
68
-      station: '油站3',
69
-      attachments: [],
70
-      remark: '常规访客检查',
71
-      executor: '王五',
72
-      position: 'safety',
73
-      comment: 'commented',
74
-      deadline: '2024-05-03',
75
-      handleTime: '2024-05-03',
76
-      status: 'onTime',
77
-      createType: 'system',
78
-    },
79
-    {
80
-      id: '4',
81
-      taskName: '访客检查任务4',
82
-      station: '油站1',
83
-      attachments: ['附件4.pdf', '附件5.pdf', '附件6.pdf'],
84
-      remark: '需要拍照记录',
85
-      executor: '赵六',
86
-      position: 'manager',
87
-      comment: 'uncommented',
88
-      deadline: '2024-05-04',
89
-      handleTime: '2024-05-05',
90
-      status: 'overdue',
91
-      createType: 'manual',
92
-    },
93
-    {
94
-      id: '5',
95
-      taskName: '访客检查任务5',
96
-      station: '油站2',
97
-      attachments: ['附件7.docx'],
98
-      remark: '检查访客登记情况',
99
-      executor: '孙七',
100
-      position: 'clerk',
101
-      comment: 'commented',
102
-      deadline: '2024-05-05',
103
-      handleTime: '2024-05-05',
104
-      status: 'onTime',
105
-      createType: 'system',
106
-    },
107
-  ],
108
-  total: 5,
109
-};
110
-
111 46
 const gridOptions: VxeGridProps = {
112 47
   checkboxConfig: {
113 48
     highlight: true,
@@ -120,81 +55,18 @@ const gridOptions: VxeGridProps = {
120 55
   proxyConfig: {
121 56
     ajax: {
122 57
       query: async ({ page }, formValues = {}) => {
123
-        // 模拟API请求 - collectAttach 页面应调用 /api/visitorFeedback/collectAttach/list 接口
124
-        console.log('查询参数:', formValues, page);
125
-        // 模拟过滤
126
-        let filteredRows = [...mockData.rows];
127
-
128
-        // 片区过滤
129
-        if (formValues.area) {
130
-          filteredRows = filteredRows.filter(
131
-            (row) => row.area === formValues.area,
132
-          );
133
-        }
134
-
135
-        // 油站过滤
136
-        if (formValues.station) {
137
-          filteredRows = filteredRows.filter(
138
-            (row) => row.station === formValues.station,
139
-          );
140
-        }
141
-
142
-        // 完成状态过滤
143
-        if (formValues.status) {
144
-          filteredRows = filteredRows.filter(
145
-            (row) => row.status === formValues.status,
146
-          );
147
-        }
148
-
149
-        // 处理时间过滤
150
-        if (formValues.handleTime) {
151
-          filteredRows = filteredRows.filter((row) =>
152
-            row.handleTime.includes(formValues.handleTime),
153
-          );
154
-        }
155
-
156
-        // 岗位过滤
157
-        if (formValues.position) {
158
-          filteredRows = filteredRows.filter(
159
-            (row) => row.position === formValues.position,
160
-          );
161
-        }
162
-
163
-        // 评论过滤
164
-        if (formValues.comment) {
165
-          filteredRows = filteredRows.filter(
166
-            (row) => row.comment === formValues.comment,
167
-          );
168
-        }
169
-
170
-        // 创建方式过滤
171
-        if (formValues.createType) {
172
-          filteredRows = filteredRows.filter(
173
-            (row) => row.createType === formValues.createType,
174
-          );
175
-        }
176
-
177
-        // 执行人过滤
178
-        if (formValues.executor) {
179
-          filteredRows = filteredRows.filter((row) =>
180
-            row.executor.includes(formValues.executor),
181
-          );
182
-        }
183
-
184
-        // 任务名称过滤
185
-        if (formValues.taskName) {
186
-          filteredRows = filteredRows.filter((row) =>
187
-            row.taskName.includes(formValues.taskName),
188
-          );
189
-        }
190
-
191
-        // 模拟分页
192
-        const start = (page.currentPage - 1) * page.pageSize;
193
-        const end = start + page.pageSize;
194
-        const paginatedRows = filteredRows.slice(start, end);
58
+        // 映射表单字段到 API 字段
59
+        const apiParams = mapFormToApi(formValues, page);
60
+        
61
+        // 调用API
62
+        const response = await getTaskAttachmentList(apiParams);
63
+        
64
+        // 映射 API 响应数据到页面显示字段
65
+        const items = response.rows;
66
+        
195 67
         return {
196
-          items: paginatedRows,
197
-          total: filteredRows.length,
68
+          items,
69
+          total: response.total,
198 70
         };
199 71
       },
200 72
     },
@@ -231,15 +103,9 @@ function batchDownloadAttachments() {
231 103
 // 查看任务详情
232 104
 function viewDetail(row: any) {
233 105
   // 跳转到任务详情页面
234
-  router.push(`/schedule/detail/${row.id}`);
106
+  router.push(`/schedule/detail/${row.id}?type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
235 107
 }
236 108
 
237
-// 打印任务
238
-function printTask(row: any) {
239
-  // 打印功能暂未实现
240
-  console.log('打印任务:', row.id);
241
-  ElMessage.info('打印功能开发中');
242
-}
243 109
 </script>
244 110
 
245 111
 <template>
@@ -249,11 +115,8 @@ function printTask(row: any) {
249 115
         <ElSpace>
250 116
           <ElButton
251 117
             type="primary"
252
-            :disabled="
253
-              !(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)
254
-            "
255
-            @click="batchDownloadAttachments"
256
-          >
118
+            :disabled="!(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)"
119
+            @click="batchDownloadAttachments">
257 120
             批量下载附件
258 121
           </ElButton>
259 122
         </ElSpace>
@@ -263,9 +126,6 @@ function printTask(row: any) {
263 126
           <ElButton size="small" type="primary" plain @click="viewDetail(row)">
264 127
             查看
265 128
           </ElButton>
266
-          <ElButton size="small" type="primary" plain @click="printTask(row)">
267
-            打印
268
-          </ElButton>
269 129
         </ElSpace>
270 130
       </template>
271 131
     </BasicTable>

+ 21 - 158
apps/web-ele/src/views/Archive/visitorFeedback/photoTask/index.vue

@@ -7,12 +7,12 @@ import { useRouter ,useRoute} from 'vue-router';
7 7
 
8 8
 import { Page } from '@vben/common-ui';
9 9
 
10
-import { ElMessage } from 'element-plus';
11
-
12 10
 import { useVbenVxeGrid } from '#/adapter/vxe-table';
13 11
 
14 12
 import { queryFormSchema, tableColumns } from './photoTask-data';
15 13
 
14
+import { getTaskPhotoList } from '#/api/archive/operationsManagement/operationsManagement';
15
+
16 16
 const formOptions: VbenFormProps = {
17 17
   commonConfig: {
18 18
     labelWidth: 80,
@@ -27,77 +27,6 @@ const formOptions: VbenFormProps = {
27 27
 const router = useRouter();
28 28
 const route = useRoute();
29 29
 
30
-// 打印当前路由和路由参数
31
-console.log('当前路由路径,参数:', route.path, route.query);
32
-
33
-
34
-// 模拟访客检查任务数据
35
-const mockData = {
36
-  rows: [
37
-    {
38
-      id: '1',
39
-      taskName: '访客检查任务1',
40
-      station: '油站1',
41
-      executor: '张三',
42
-      position: 'manager',
43
-      comment: 'commented',
44
-      deadline: '2024-01-15 18:00:00',
45
-      handleTime: '2024-01-15 17:30:00',
46
-      status: 'onTime',
47
-      createType: 'system',
48
-    },
49
-    {
50
-      id: '2',
51
-      taskName: '访客检查任务2',
52
-      station: '油站2',
53
-      executor: '李四',
54
-      position: 'clerk',
55
-      comment: 'uncommented',
56
-      deadline: '2024-01-16 18:00:00',
57
-      handleTime: '2024-01-17 09:00:00',
58
-      status: 'overdue',
59
-      createType: 'manual',
60
-    },
61
-    {
62
-      id: '3',
63
-      taskName: '访客检查任务3',
64
-      station: '油站3',
65
-      executor: '王五',
66
-      position: 'safety',
67
-      comment: 'commented',
68
-      deadline: '2024-01-17 18:00:00',
69
-      handleTime: '2024-01-17 16:45:00',
70
-      status: 'onTime',
71
-      createType: 'system',
72
-    },
73
-    {
74
-      id: '4',
75
-      taskName: '访客检查任务4',
76
-      station: '油站1',
77
-      executor: '赵六',
78
-      position: 'manager',
79
-      comment: 'uncommented',
80
-      deadline: '2024-01-18 18:00:00',
81
-      handleTime: '2024-01-18 15:30:00',
82
-      status: 'onTime',
83
-      createType: 'manual',
84
-    },
85
-    {
86
-      id: '5',
87
-      taskName: '访客检查任务5',
88
-      station: '油站2',
89
-      executor: '孙七',
90
-      position: 'clerk',
91
-      comment: 'commented',
92
-      deadline: '2024-01-19 18:00:00',
93
-      handleTime: '2024-01-20 10:20:00',
94
-      status: 'overdue',
95
-      createType: 'system',
96
-    },
97
-  ],
98
-  total: 5,
99
-};
100
-
101 30
 const gridOptions: VxeGridProps = {
102 31
   checkboxConfig: {
103 32
     highlight: true,
@@ -110,81 +39,23 @@ const gridOptions: VxeGridProps = {
110 39
   proxyConfig: {
111 40
     ajax: {
112 41
       query: async ({ page }, formValues = {}) => {
113
-        // 模拟API请求
114
-        console.log('查询参数:', formValues, page);
115
-        // 模拟过滤
116
-        let filteredRows = [...mockData.rows];
117
-
118
-        // 片区过滤
119
-        if (formValues.area) {
120
-          filteredRows = filteredRows.filter(
121
-            (item) => item.area === formValues.area,
122
-          );
123
-        }
124
-
125
-        // 油站过滤
126
-        if (formValues.station) {
127
-          filteredRows = filteredRows.filter(
128
-            (item) => item.station === formValues.station,
129
-          );
130
-        }
131
-
132
-        // 完成状态过滤
133
-        if (formValues.status) {
134
-          filteredRows = filteredRows.filter(
135
-            (item) => item.status === formValues.status,
136
-          );
137
-        }
138
-
139
-        // 处理时间过滤
140
-        if (formValues.handleTime) {
141
-          filteredRows = filteredRows.filter((item) =>
142
-            item.handleTime.includes(formValues.handleTime),
143
-          );
144
-        }
145
-
146
-        // 岗位过滤
147
-        if (formValues.position) {
148
-          filteredRows = filteredRows.filter(
149
-            (item) => item.position === formValues.position,
150
-          );
151
-        }
152
-
153
-        // 评论过滤
154
-        if (formValues.comment) {
155
-          filteredRows = filteredRows.filter(
156
-            (item) => item.comment === formValues.comment,
157
-          );
158
-        }
159
-
160
-        // 创建方式过滤
161
-        if (formValues.createType) {
162
-          filteredRows = filteredRows.filter(
163
-            (item) => item.createType === formValues.createType,
164
-          );
165
-        }
166
-
167
-        // 执行人过滤
168
-        if (formValues.executor) {
169
-          filteredRows = filteredRows.filter((item) =>
170
-            item.executor.includes(formValues.executor),
171
-          );
172
-        }
173
-
174
-        // 任务名称过滤
175
-        if (formValues.taskName) {
176
-          filteredRows = filteredRows.filter((item) =>
177
-            item.taskName.includes(formValues.taskName),
178
-          );
179
-        }
180
-
181
-        // 模拟分页
182
-        const start = (page.currentPage - 1) * page.pageSize;
183
-        const end = start + page.pageSize;
184
-        const paginatedRows = filteredRows.slice(start, end);
42
+        // 字段映射:页面表单字段 -> API字段
43
+        const apiParams = {
44
+          pageNum: page.currentPage,
45
+          pageSize: page.pageSize,
46
+          directoryType: route.query.directoryType || '',
47
+          type: route.query.type || '',
48
+          ...formValues,
49
+        };      
50
+        // 调用API
51
+        const response = await getTaskPhotoList(apiParams);
52
+        
53
+        // 映射 API 响应数据到页面显示字段
54
+        const items = response.rows || [];
55
+        
185 56
         return {
186
-          items: paginatedRows,
187
-          total: filteredRows.length,
57
+          items,
58
+          total: response.total,
188 59
         };
189 60
       },
190 61
     },
@@ -208,14 +79,10 @@ const [BasicTable, basicTableApi] = useVbenVxeGrid({
208 79
 // 查看任务详情
209 80
 function viewDetail(row: any) {
210 81
   // 跳转到任务详情页面
211
-  router.push(`/schedule/detail/${row.id}`);
82
+  router.push(`/schedule/detail?id=${row.id}&type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}`);
212 83
 }
213 84
 
214
-// 打印任务
215
-function printTask(row: any) {
216
-  // 打印功能(暂未实现)
217
-  ElMessage.info('打印功能开发中');
218
-}
85
+
219 86
 </script>
220 87
 
221 88
 <template>
@@ -232,8 +99,4 @@ function printTask(row: any) {
232 99
   </Page>
233 100
 </template>
234 101
 
235
-<style scoped lang="scss">
236
-:deep(.el-tooltip__trigger:focus) {
237
-  outline: none;
238
-}
239
-</style>
102
+

+ 94 - 67
apps/web-ele/src/views/Archive/visitorFeedback/photoTask/photoTask-data.tsx

@@ -1,95 +1,129 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3 3
 
4
-export const drawerFormSchema: FormSchemaGetter = () => [
5
-  {
6
-    component: 'Input',
7
-    fieldName: 'title',
8
-    label: '标题',
9
-    componentProps: {
10
-      placeholder: '请输入标题',
11
-    },
12
-  },
13
-  {
14
-    component: 'Input',
15
-    fieldName: 'content',
16
-    label: '内容',
17
-    componentProps: {
18
-      placeholder: '请输入内容',
19
-    },
20
-  },
21
-];
4
+import { selectAllSysAreaList, selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
+
6
+// 假设岗位列表接口
7
+import { requestClient } from '#/api/request';
8
+
9
+// 获取岗位列表
10
+const getPostList = async () => {
11
+  const resp = await requestClient.get('/system/post/list');
12
+  return resp || [];
13
+};
22 14
 
23 15
 export const queryFormSchema: FormSchemaGetter = () => [
24 16
   {
25
-    component: 'Select',
26
-    fieldName: 'area',
17
+    component: 'ApiSelect',
18
+    fieldName: 'areaId',
27 19
     label: '片区',
28 20
     componentProps: {
29 21
       placeholder: '请选择片区',
30
-      options: [
31
-        { label: '片区1', value: 'area1' },
32
-        { label: '片区2', value: 'area2' },
33
-        { label: '片区3', value: 'area3' },
34
-      ],
22
+      clearable: true,
23
+      api: async () => {
24
+        const resp = await selectAllSysAreaList();
25
+        const data = resp || [];
26
+        return Array.isArray(data)
27
+          ? data.map((item: any) => ({
28
+              label: item.areaName,
29
+              value: item.id,
30
+            }))
31
+          : [];
32
+      },
33
+      labelField: 'label',
34
+      valueField: 'value',
35 35
     },
36 36
   },
37 37
   {
38
-    component: 'Select',
39
-    fieldName: 'station',
38
+    component: 'ApiSelect',
39
+    fieldName: 'stationId',
40 40
     label: '油站',
41 41
     componentProps: {
42 42
       placeholder: '请选择油站',
43
-      options: [
44
-        { label: '油站1', value: 'station1' },
45
-        { label: '油站2', value: 'station2' },
46
-        { label: '油站3', value: 'station3' },
47
-      ],
43
+      clearable: true,
44
+      api: async () => {
45
+        const resp = await selectAllSysStationAreaList();
46
+        const data = resp || [];
47
+        return Array.isArray(data)
48
+          ? data.map((item: any) => ({
49
+              label: item.stationName,
50
+              value: item.id.toString(),
51
+            }))
52
+          : [];
53
+      },
54
+      labelField: 'label',
55
+      valueField: 'value',
48 56
     },
49 57
   },
50 58
   {
51 59
     component: 'Select',
52
-    fieldName: 'status',
60
+    fieldName: 'completionStatus',
53 61
     label: '完成状态',
54 62
     componentProps: {
55 63
       placeholder: '请选择完成状态',
56 64
       options: [
57
-        { label: '按时完成', value: 'onTime' },
58
-        { label: '逾期完成', value: 'overdue' },
65
+        { label: '按时完成', value: 0 },
66
+        { label: '逾期完成', value: 1 },
59 67
       ],
60 68
     },
61 69
   },
62 70
   {
63 71
     component: 'DatePicker',
64
-    fieldName: 'handleTime',
72
+    fieldName: 'processStartTime',
65 73
     label: '处理时间',
66 74
     componentProps: {
67
-      placeholder: '请选择处理时间',
75
+      placeholder: '请选择处理开始日期',
68 76
       type: 'date',
77
+      format: 'YYYY-MM-DD',
78
+      valueFormat: 'YYYY-MM-DD',
79
+      style: {
80
+        width: '100%'
81
+      }
69 82
     },
70 83
   },
71 84
   {
72
-    component: 'Select',
85
+    component: 'DatePicker',
86
+    fieldName: 'processEndTime',
87
+    label: '处理时间',
88
+    componentProps: {
89
+      placeholder: '请选择处理结束日期',
90
+      type: 'date',
91
+      format: 'YYYY-MM-DD',
92
+      valueFormat: 'YYYY-MM-DD',
93
+      style: {
94
+        width: '100%'
95
+      }
96
+    },
97
+  },
98
+  {
99
+    component: 'ApiSelect',
73 100
     fieldName: 'position',
74 101
     label: '岗位',
75 102
     componentProps: {
76 103
       placeholder: '请选择岗位',
77
-      options: [
78
-        { label: '站长', value: 'manager' },
79
-        { label: '营业员', value: 'clerk' },
80
-        { label: '安全员', value: 'safety' },
81
-      ],
104
+      clearable: true,
105
+      api: async () => {
106
+        const data = await getPostList();
107
+        return Array.isArray(data.rows)
108
+          ? data.rows.map((item: any) => ({
109
+              label: item.postName || item.name,
110
+              value: item.postId,
111
+            }))
112
+          : [];
113
+      },
114
+      labelField: 'label',
115
+      valueField: 'value',
82 116
     },
83 117
   },
84 118
   {
85 119
     component: 'Select',
86
-    fieldName: 'comment',
120
+    fieldName: 'isComment',
87 121
     label: '评论',
88 122
     componentProps: {
89 123
       placeholder: '请选择评论状态',
90 124
       options: [
91
-        { label: '未评', value: 'uncommented' },
92
-        { label: '已评', value: 'commented' },
125
+        { label: '未评', value: 0 },
126
+        { label: '已评', value: 1 },
93 127
       ],
94 128
     },
95 129
   },
@@ -100,14 +134,14 @@ export const queryFormSchema: FormSchemaGetter = () => [
100 134
     componentProps: {
101 135
       placeholder: '请选择创建方式',
102 136
       options: [
103
-        { label: '系统', value: 'system' },
104
-        { label: '新增', value: 'manual' },
137
+        { label: '系统', value: 0 },
138
+        { label: '新增', value: 1 },
105 139
       ],
106 140
     },
107 141
   },
108 142
   {
109 143
     component: 'Input',
110
-    fieldName: 'executor',
144
+    fieldName: 'executorName',
111 145
     label: '执行人',
112 146
     componentProps: {
113 147
       placeholder: '请输入执行人',
@@ -134,12 +168,12 @@ export const tableColumns: VxeGridProps['columns'] = [
134 168
     minWidth: 150,
135 169
   },
136 170
   {
137
-    field: 'station',
171
+    field: 'stationName',
138 172
     title: '油站',
139 173
     minWidth: 120,
140 174
   },
141 175
   {
142
-    field: 'executor',
176
+    field: 'executorName',
143 177
     title: '执行人',
144 178
     minWidth: 120,
145 179
   },
@@ -147,21 +181,14 @@ export const tableColumns: VxeGridProps['columns'] = [
147 181
     field: 'position',
148 182
     title: '岗位',
149 183
     minWidth: 120,
150
-    formatter: (cellValue: string) => {
151
-      return cellValue === 'manager'
152
-        ? '站长'
153
-        : (cellValue === 'clerk'
154
-          ? '营业员'
155
-          : '安全员');
156
-    },
157 184
   },
158 185
   {
159
-    field: 'comment',
186
+    field: 'isComment',
160 187
     title: '评论',
161 188
     minWidth: 100,
162 189
     align: 'center',
163
-    formatter: (cellValue: string) => {
164
-      return cellValue === 'commented' ? '已评' : '未评';
190
+    formatter: (cellValue: number) => {
191
+      return cellValue === 1 ? '已评' : '未评';
165 192
     },
166 193
   },
167 194
   {
@@ -170,17 +197,17 @@ export const tableColumns: VxeGridProps['columns'] = [
170 197
     minWidth: 180,
171 198
   },
172 199
   {
173
-    field: 'handleTime',
200
+    field: 'processTime',
174 201
     title: '处理时间',
175 202
     minWidth: 180,
176 203
   },
177 204
   {
178
-    field: 'status',
205
+    field: 'completionStatus',
179 206
     title: '完成状态',
180 207
     minWidth: 120,
181 208
     align: 'center',
182
-    formatter: (cellValue: string) => {
183
-      return cellValue === 'onTime' ? '按时完成' : '逾期完成';
209
+    formatter: (cellValue: number) => {
210
+      return cellValue === 0 ? '逾期完成' : '按时完成';
184 211
     },
185 212
   },
186 213
   {
@@ -188,8 +215,8 @@ export const tableColumns: VxeGridProps['columns'] = [
188 215
     title: '创建',
189 216
     minWidth: 100,
190 217
     align: 'center',
191
-    formatter: (cellValue: string) => {
192
-      return cellValue === 'system' ? '系统' : '新增';
218
+    formatter: (cellValue: number) => {
219
+      return cellValue === 0 ? '系统' : '新增';
193 220
     },
194 221
   },
195 222
   {

+ 4 - 2
apps/web-ele/src/views/Archive/visitorFeedback/visitorCheckTask/index.vue

@@ -22,6 +22,8 @@ function mapFormToApi(formValues: any, page: any) {
22 22
     pageNum: page.currentPage,
23 23
     pageSize: page.pageSize,
24 24
     type: route.query.type || '',
25
+    directoryType: route.query.directoryType || '',
26
+    isAbnormal: route.query.isAbnormal || '',
25 27
     ...formValues,
26 28
   };
27 29
   return apiParams;
@@ -83,8 +85,8 @@ const [BasicTable] = useVbenVxeGrid({
83 85
 });
84 86
 
85 87
 // 查看任务详情
86
-function handleView(row: any) {
87
-  router.push(`/schedule/detail/${row.id}`);
88
+function handleView(row: any) {  
89
+  router.push(`/schedule/detail?id=${row.id}&type=${route.query.type || ''}&directoryType=${route.query.directoryType || ''}&isAbnormal=${route.query.isAbnormal || ''}`);
88 90
 }
89 91
 </script>
90 92
 

+ 2 - 2
apps/web-ele/src/views/Archive/visitorFeedback/visitorCheckTask/visitorCheckTask-data.tsx

@@ -4,7 +4,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
4 4
 import { selectAllSysAreaList,selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5 5
 
6 6
 
7
-// 假设岗位列表接口
7
+// 岗位列表接口
8 8
 import { requestClient } from '#/api/request';
9 9
 
10 10
 // 获取岗位列表
@@ -221,7 +221,7 @@ export const tableColumns: VxeGridProps['columns'] = [
221 221
     minWidth: 120,
222 222
     align: 'center',
223 223
     formatter: (cellValue: number) => {
224
-      return cellValue === 0 ? '按时完成' : '逾期完成';
224
+      return cellValue === 0 ? '逾期完成' : '按时完成';
225 225
     },
226 226
   },
227 227
   {