闪电 3 weeks ago
parent
commit
030fa3875f
20 changed files with 76 additions and 69 deletions
  1. 3 3
      apps/web-ele/src/views/Archive/HSSEManage/emergencyDrill/config-data.tsx
  2. 2 2
      apps/web-ele/src/views/Archive/figuresManage/addInventory/addInventory-data.tsx
  3. 3 3
      apps/web-ele/src/views/Archive/figuresManage/oilGunTement/oilGunTement-data.tsx
  4. 1 1
      apps/web-ele/src/views/Archive/figuresManage/waterTestRecord/waterTestRecord-data.tsx
  5. 3 3
      apps/web-ele/src/views/Archive/headquartersDistrict/districtMeeting/districtMeeting-data.tsx
  6. 3 3
      apps/web-ele/src/views/Archive/operationsManagement/businessPlan/tabsView/detailedRecord/config-data.tsx
  7. 1 1
      apps/web-ele/src/views/Archive/operationsManagement/competitiveSalesSurvey/config-data.tsx
  8. 3 3
      apps/web-ele/src/views/Archive/operationsManagement/gasStationRegularMeeting/config-data.tsx
  9. 3 3
      apps/web-ele/src/views/Archive/operationsManagement/licenseTaskManagement/config-data.tsx
  10. 3 3
      apps/web-ele/src/views/Archive/operationsManagement/managementPlan/config-data.tsx
  11. 3 3
      apps/web-ele/src/views/Archive/operationsManagement/operationsWeeklyReport/config-data.tsx
  12. 0 1
      apps/web-ele/src/views/Archive/operationsManagement/teamLog/config-data.tsx
  13. 3 3
      apps/web-ele/src/views/Archive/operationsManagement/turningRateSurvey/config-data.tsx
  14. 3 3
      apps/web-ele/src/views/Archive/personnelTraining/employeePerfor/employeePerfor-data.tsx
  15. 3 3
      apps/web-ele/src/views/Archive/personnelTraining/valuationRecord/valuationRecord-data.tsx
  16. 29 22
      apps/web-ele/src/views/Archive/utils/positionFilter.ts
  17. 3 3
      apps/web-ele/src/views/Archive/visitorFeedback/collectAttach/collectAttach-data.tsx
  18. 1 1
      apps/web-ele/src/views/Archive/visitorFeedback/photoTask/photoTask-data.tsx
  19. 1 1
      apps/web-ele/src/views/Archive/visitorFeedback/visitorCheckTask/visitorCheckTask-data.tsx
  20. 5 4
      apps/web-ele/src/views/schedule/detail/components/comment.vue

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

@@ -59,7 +59,7 @@ export const querySchema: FormSchemaGetter = () => [
59 59
     componentProps: {
60 60
       placeholder: '请选择完成状态',
61 61
       options: [
62
-        { label: '按时完成', value: 0 },
62
+        { label: '按时完成', value: 2 },
63 63
         { label: '逾期完成', value: 1 },
64 64
       ],
65 65
     },
@@ -199,8 +199,8 @@ export const columns: VxeGridProps['columns'] = [
199 199
     title: '任务状态',
200 200
     minWidth: 120,
201 201
     align: 'center',
202
-    formatter: (cellValue: number) => {
203
-      return cellValue === 0 ? '按时完成' : '逾期完成';
202
+    formatter: ({ row }) => {
203
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
204 204
     },
205 205
   },
206 206
   {

+ 2 - 2
apps/web-ele/src/views/Archive/figuresManage/addInventory/addInventory-data.tsx

@@ -67,7 +67,7 @@ export const tableColumns: VxeGridProps['columns'] = [
67 67
     align: 'center',
68 68
     formatter: (cellValue: any) => {
69 69
       // if (cellValue.status ===)
70
-      return cellValue === 0 ? '按时完成' : '逾期完成';
70
+      return cellValue === 2 ? '按时完成' : '逾期完成';
71 71
     },
72 72
   },
73 73
   {
@@ -107,7 +107,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
107 107
     component: 'Select',
108 108
     componentProps: {
109 109
       options: [
110
-        { label: '按时完成', value: 0 },
110
+        { label: '按时完成', value: 2 },
111 111
         { label: '逾期完成', value: 1 },
112 112
       ],
113 113
     },

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

@@ -66,8 +66,8 @@ export const tableColumns: VxeGridProps['columns'] = [
66 66
     title: '完成状态',
67 67
     minWidth: 120,
68 68
     align: 'center',
69
-    formatter: (cellValue: number) => {
70
-      return cellValue === 0 ? '按时完成' : '逾期完成';
69
+    formatter: ({ row }) => {
70
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
71 71
     },
72 72
   },
73 73
   {
@@ -131,7 +131,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
131 131
     componentProps: {
132 132
       placeholder: '请选择完成状态',
133 133
       options: [
134
-        { label: '按时完成', value: 0 },
134
+        { label: '按时完成', value: 2 },
135 135
         { label: '逾期完成', value: 1 },
136 136
       ],
137 137
     },

+ 1 - 1
apps/web-ele/src/views/Archive/figuresManage/waterTestRecord/waterTestRecord-data.tsx

@@ -110,7 +110,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
110 110
     component: 'Select',
111 111
     componentProps: {
112 112
       options: [
113
-        { label: '按时完成', value: 0 },
113
+        { label: '按时完成', value: 2 },
114 114
         { label: '逾期完成', value: 1 },
115 115
       ],
116 116
     },

+ 3 - 3
apps/web-ele/src/views/Archive/headquartersDistrict/districtMeeting/districtMeeting-data.tsx

@@ -56,7 +56,7 @@ export const querySchema: FormSchemaGetter = () => [
56 56
      component: 'Select',
57 57
      componentProps: {
58 58
        options: [
59
-         { label: '按时完成', value: 0 },
59
+         { label: '按时完成', value: 2 },
60 60
          { label: '逾期完成', value: 1 },
61 61
        ],
62 62
      },
@@ -175,8 +175,8 @@ export const columns: VxeGridProps['columns'] = [
175 175
     title: '完成状态',
176 176
     minWidth: 120,
177 177
     align: 'center',
178
-    formatter: (cellValue: number) => {
179
-      return cellValue === 0 ? '按时完成' : '逾期完成';
178
+    formatter: ({ row }) => {
179
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
180 180
     },
181 181
   },
182 182
   {

+ 3 - 3
apps/web-ele/src/views/Archive/operationsManagement/businessPlan/tabsView/detailedRecord/config-data.tsx

@@ -32,7 +32,7 @@ export const querySchema: FormSchemaGetter = () => [
32 32
     component: 'Select',
33 33
     componentProps: {
34 34
       options: [
35
-        { label: '按时完成', value: 0 },
35
+        { label: '按时完成', value: 2 },
36 36
         { label: '逾期完成', value: 1 },
37 37
       ],
38 38
     },
@@ -206,8 +206,8 @@ export const columns: VxeGridProps['columns'] = [
206 206
     field: 'completionStatus',
207 207
     minWidth: 120,
208 208
     align: 'center',
209
-    formatter: (cellValue: number) => {
210
-      return cellValue === 0 ? '按时完成' : '逾期完成';
209
+    formatter: ({ row }) => {
210
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
211 211
     },
212 212
   },
213 213
   {

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

@@ -53,7 +53,7 @@ export const querySchema: FormSchemaGetter = () => [
53 53
     component: 'Select',
54 54
     componentProps: {
55 55
       options: [
56
-        { label: '按时完成', value: 0 },
56
+        { label: '按时完成', value: 2 },
57 57
         { label: '逾期完成', value: 1 },
58 58
       ],
59 59
     },

+ 3 - 3
apps/web-ele/src/views/Archive/operationsManagement/gasStationRegularMeeting/config-data.tsx

@@ -58,7 +58,7 @@ export const querySchema: FormSchemaGetter = () => [
58 58
     component: 'Select',
59 59
     componentProps: {
60 60
       options: [
61
-        { label: '按时完成', value: 0 },
61
+        { label: '按时完成', value: 2 },
62 62
         { label: '逾期完成', value: 1 },
63 63
       ],
64 64
     },
@@ -185,8 +185,8 @@ export const columns: VxeGridProps['columns'] = [
185 185
     title: '完成状态',
186 186
     minWidth: 120,
187 187
     align: 'center',
188
-    formatter: (cellValue: number) => {
189
-      return cellValue === 0 ? '按时完成' : '逾期完成';
188
+    formatter: ({ row }) => {
189
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
190 190
     },
191 191
   },
192 192
   {

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

@@ -101,7 +101,7 @@ export const querySchema: FormSchemaGetter = () => [
101 101
     componentProps: {
102 102
       placeholder: '请选择完成状态',
103 103
       options: [
104
-        { label: '按时完成', value: 0 },
104
+        { label: '按时完成', value: 2 },
105 105
         { label: '逾期完成', value: 1 },
106 106
       ],
107 107
     },
@@ -185,8 +185,8 @@ export const columns: VxeGridProps['columns'] = [
185 185
     title: '完成状态',
186 186
     minWidth: 120,
187 187
     align: 'center',
188
-    formatter: (cellValue: number) => {
189
-      return cellValue === 0 ? '按时完成' : '逾期完成';
188
+    formatter: ({ row }) => {
189
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
190 190
     },
191 191
   },
192 192
   {

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

@@ -42,7 +42,7 @@ export const querySchema: FormSchemaGetter = () => [
42 42
     componentProps: {
43 43
       placeholder: '请选择完成状态',
44 44
       options: [
45
-        { label: '按时完成', value: 0 },
45
+        { label: '按时完成', value: 2 },
46 46
         { label: '逾期完成', value: 1 },
47 47
       ],
48 48
     },
@@ -178,8 +178,8 @@ export const columns: VxeGridProps['columns'] = [
178 178
     title: '完成状态',
179 179
     minWidth: 120,
180 180
     align: 'center',
181
-    formatter: (cellValue: number) => {
182
-      return cellValue === 0 ? '按时完成' : '逾期完成';
181
+    formatter: ({ row }) => {
182
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
183 183
     },
184 184
   },
185 185
   {

+ 3 - 3
apps/web-ele/src/views/Archive/operationsManagement/operationsWeeklyReport/config-data.tsx

@@ -32,7 +32,7 @@ export const querySchema: FormSchemaGetter = () => [
32 32
      component: 'Select',
33 33
      componentProps: {
34 34
        options: [
35
-         { label: '按时完成', value: 0 },
35
+         { label: '按时完成', value: 2 },
36 36
          { label: '逾期完成', value: 1 },
37 37
        ],
38 38
      },
@@ -151,8 +151,8 @@ export const columns: VxeGridProps['columns'] = [
151 151
     title: '完成状态',
152 152
     minWidth: 120,
153 153
     align: 'center',
154
-    formatter: (cellValue: number) => {
155
-      return cellValue === 0 ? '按时完成' : '逾期完成';
154
+    formatter: ({ row }) => {
155
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
156 156
     },
157 157
   },
158 158
   {

+ 0 - 1
apps/web-ele/src/views/Archive/operationsManagement/teamLog/config-data.tsx

@@ -179,7 +179,6 @@ export const columns: VxeGridProps['columns'] = [
179 179
     minWidth: 120,
180 180
     align: 'center',
181 181
     formatter: ({ row }) => {
182
-      // console.log(cellValue, cellValue);
183 182
       return row.completionStatus === 2 ? '按时完成' : '逾期完成';
184 183
     },
185 184
   },

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

@@ -49,7 +49,7 @@ export const querySchema: FormSchemaGetter = () => [
49 49
      component: 'Select',
50 50
      componentProps: {
51 51
        options: [
52
-         { label: '按时完成', value: 0 },
52
+         { label: '按时完成', value: 2 },
53 53
          { label: '逾期完成', value: 1 },
54 54
        ],
55 55
      },
@@ -169,8 +169,8 @@ export const columns: VxeGridProps['columns'] = [
169 169
     title: '完成状态',
170 170
     minWidth: 120,
171 171
     align: 'center',
172
-    formatter: (cellValue: number) => {
173
-      return cellValue === 0 ? '按时完成' : '逾期完成';
172
+    formatter: ({ row }) => {
173
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
174 174
     },
175 175
   },
176 176
   {

+ 3 - 3
apps/web-ele/src/views/Archive/personnelTraining/employeePerfor/employeePerfor-data.tsx

@@ -70,7 +70,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
70 70
     componentProps: {
71 71
       placeholder: '请选择完成状态',
72 72
       options: [
73
-        { label: '按时完成', value: 0 },
73
+        { label: '按时完成', value: 2 },
74 74
         { label: '逾期完成', value: 1 },
75 75
       ],
76 76
     },
@@ -226,8 +226,8 @@ export const tableColumns: VxeGridProps['columns'] = [
226 226
     title: '完成状态',
227 227
     minWidth: 120,
228 228
     align: 'center',
229
-    formatter: (cellValue: number) => {
230
-      return cellValue === 0 ? '按时完成' : '逾期完成';
229
+    formatter: ({ row }) => {
230
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
231 231
     },
232 232
   },
233 233
   {

+ 3 - 3
apps/web-ele/src/views/Archive/personnelTraining/valuationRecord/valuationRecord-data.tsx

@@ -83,8 +83,8 @@ export const tableColumns: VxeGridProps['columns'] = [
83 83
     field: 'completionStatus',
84 84
     minWidth: 120,
85 85
     align: 'center',
86
-    formatter: (cellValue: number) => {
87
-      return cellValue === 0 ? '按时完成' : '逾期完成';
86
+    formatter: ({ row }) => {
87
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
88 88
     },
89 89
   },
90 90
 ];
@@ -151,7 +151,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
151 151
     componentProps: {
152 152
       placeholder: '请选择完成状态',
153 153
       options: [
154
-        { label: '按时完成', value: 0 },
154
+        { label: '按时完成', value: 2 },
155 155
         { label: '逾期完成', value: 1 },
156 156
       ],
157 157
     },

+ 29 - 22
apps/web-ele/src/views/Archive/utils/positionFilter.ts

@@ -1,5 +1,6 @@
1 1
 import { useRoute } from 'vue-router';
2
-import { getPostList } from '@/api';
2
+
3
+import { getPostList } from '#/api/system/post/post';
3 4
 
4 5
 /**
5 6
  * 过滤岗位数据
@@ -8,51 +9,57 @@ import { getPostList } from '@/api';
8 9
  * @param allPositions 所有岗位数据
9 10
  * @returns 过滤后的岗位数据
10 11
  */
11
-export const filterPositions = (directoryType: string, type: string, allPositions: any[]) => {
12
+export const filterPositions = (
13
+  directoryType: string,
14
+  type: string,
15
+  allPositions: any[],
16
+) => {
12 17
   if (!Array.isArray(allPositions)) {
13 18
     return [];
14 19
   }
15 20
 
16 21
   // 规则1: directoryType 等于 operational, hsse_management, data_quality, financial 或 human_resources
17
-  if (['operational', 'hsse_management', 'data_quality', 'financial', 'human_resources'].includes(directoryType)) {
18
-    return allPositions.filter((item: any) => 
19
-      ['region', 'management', 'employee'].includes(item.type)
22
+  if (
23
+    [
24
+      'data_quality',
25
+      'financial',
26
+      'hsse_management',
27
+      'human_resources',
28
+      'operational',
29
+    ].includes(directoryType)
30
+  ) {
31
+    return allPositions.filter((item: any) =>
32
+      ['employee', 'management', 'region'].includes(item.type),
20 33
     );
21 34
   }
22 35
 
23 36
   // 规则2: directoryType 等于 visitor_feedback
24 37
   if (directoryType === 'visitor_feedback') {
25
-    return allPositions.filter((item: any) => 
26
-      ['region', 'headquarters'].includes(item.type)
38
+    return allPositions.filter((item: any) =>
39
+      ['headquarters', 'region'].includes(item.type),
27 40
     );
28 41
   }
29 42
 
30 43
   // 规则3: directoryType 等于 temporary_task, type 等于 station
31 44
   if (directoryType === 'temporary_task' && type === 'station') {
32
-    return allPositions.filter((item: any) => 
33
-      ['management', 'employee'].includes(item.type)
45
+    return allPositions.filter((item: any) =>
46
+      ['employee', 'management'].includes(item.type),
34 47
     );
35 48
   }
36 49
 
37 50
   // 规则4: directoryType 等于 temporary_task, type 等于 visitor
38 51
   if (directoryType === 'temporary_task' && type === 'visitor') {
39
-    return allPositions.filter((item: any) => 
40
-      item.type === 'headquarters'
41
-    );
52
+    return allPositions.filter((item: any) => item.type === 'headquarters');
42 53
   }
43 54
 
44 55
   // 规则5: directoryType 等于 headquarters_area, type 等于 check
45 56
   if (directoryType === 'headquarters_area' && type === 'check') {
46
-    return allPositions.filter((item: any) => 
47
-      item.type === 'headquarters'
48
-    );
57
+    return allPositions.filter((item: any) => item.type === 'headquarters');
49 58
   }
50 59
 
51 60
   // 规则6: directoryType 等于 headquarters_area, type 等于 attach
52 61
   if (directoryType === 'headquarters_area' && type === 'attach') {
53
-    return allPositions.filter((item: any) => 
54
-      item.type === 'headquarters'
55
-    );
62
+    return allPositions.filter((item: any) => item.type === 'headquarters');
56 63
   }
57 64
 
58 65
   // 默认返回所有岗位
@@ -66,13 +73,13 @@ export const filterPositions = (directoryType: string, type: string, allPosition
66 73
 export const getFilteredPositions = async () => {
67 74
   // 在运行时获取路由参数
68 75
   const route = useRoute();
69
-  const directoryType = route.query.directoryType as string || '';
70
-  const type = route.query.type as string || '';
71
-  
76
+  const directoryType = (route.query.directoryType as string) || '';
77
+  const type = (route.query.type as string) || '';
78
+
72 79
   const data = await getPostList();
73 80
   const allPositions = Array.isArray(data.rows) ? data.rows : [];
74 81
   const filteredPositions = filterPositions(directoryType, type, allPositions);
75
-  
82
+
76 83
   return filteredPositions.map((item: any) => ({
77 84
     label: item.postName || item.name,
78 85
     value: item.postId,

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

@@ -76,7 +76,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
76 76
     componentProps: {
77 77
       placeholder: '请选择完成状态',
78 78
       options: [
79
-        { label: '按时完成', value: 0 },
79
+        { label: '按时完成', value: 2 },
80 80
         { label: '逾期完成', value: 1 },
81 81
       ],
82 82
     },
@@ -218,8 +218,8 @@ export const tableColumns: VxeGridProps['columns'] = [
218 218
     title: '完成状态',
219 219
     minWidth: 120,
220 220
     align: 'center',
221
-    formatter: (cellValue: number) => {
222
-      return cellValue === 0 ? '按时完成' : '逾期完成';
221
+    formatter: ({ row }) => {
222
+      return row.completionStatus === 2 ? '按时完成' : '逾期完成';
223 223
     },
224 224
   },
225 225
   {

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

@@ -56,7 +56,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
56 56
     componentProps: {
57 57
       placeholder: '请选择完成状态',
58 58
       options: [
59
-        { label: '按时完成', value: 0 },
59
+        { label: '按时完成', value: 2 },
60 60
         { label: '逾期完成', value: 1 },
61 61
       ],
62 62
     },

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

@@ -59,7 +59,7 @@ export const queryFormSchema: FormSchemaGetter = () => [
59 59
     componentProps: {
60 60
       placeholder: '请选择完成状态',
61 61
       options: [
62
-        { label: '按时完成', value: 0 },
62
+        { label: '按时完成', value: 2 },
63 63
         { label: '逾期完成', value: 1 },
64 64
       ],
65 65
     },

+ 5 - 4
apps/web-ele/src/views/schedule/detail/components/comment.vue

@@ -59,10 +59,10 @@ const handleUploadSuccess = (file: any) => {
59 59
 
60 60
 // 提交评论
61 61
 const submitComment = async () => {
62
-  if (commentContent.value.trim() === '' || commentImages.value.length === 0) {
63
-    ElMessage.warning('请输入评论内容或上传图片');
64
-    return;
65
-  }
62
+  // if (commentContent.value.trim() === '' || commentImages.value.length === 0) {
63
+  //   ElMessage.warning('请输入评论内容或上传图片');
64
+  //   return;
65
+  // }
66 66
   try {
67 67
     await addComment({
68 68
       targetId: Number(props.taskId),
@@ -73,6 +73,7 @@ const submitComment = async () => {
73 73
     });
74 74
     commentContent.value = '';
75 75
     commentImages.value = [];
76
+    uploadRef.value.clearFiles();
76 77
     querycommentfn();
77 78
   } catch {
78 79
     ElMessage.error('评论提交失败');