2 Commits 0092217100 ... 1719682e47

Autor SHA1 Mensagem Data
  闪电 1719682e47 Merge branch 'master' of http://39.164.159.226:3000/hnsh-smart-steward/smart-steward-admin 3 semanas atrás
  闪电 e6a41ba702 fix: 3 semanas atrás

+ 8 - 58
apps/web-ele/src/views/schedule/detail/components/comment.vue

@@ -14,6 +14,8 @@ import {
14 14
 // @ts-ignore
15 15
 import { addComment, querycomment } from '#/api/knowledge/comment';
16 16
 // @ts-ignore
17
+import AttachmentViewer from '#/components/AttachmentViewer.vue';
18
+// @ts-ignore
17 19
 import { getSingleImageUploadConfig } from '#/components/upload/config';
18 20
 
19 21
 // @ts-ignore
@@ -40,7 +42,6 @@ const commentImages = ref<any[]>([]);
40 42
 // 图片预览相关
41 43
 // const previewVisible = ref(false);
42 44
 // const previewImages = ref<string[]>([]);
43
-
44 45
 // 上传图片成功
45 46
 const handleUploadSuccess = (file: any) => {
46 47
   if (file.code === 200) {
@@ -95,60 +96,9 @@ const querycommentfn = async () => {
95 96
     commentsloading.value = false;
96 97
   }
97 98
 };
98
-// 添加记录
99
-// const addrecordfn = async () => {
100
-//   commentsloading.value = true;
101
-//   try {
102
-//     await addrecord({ contentId: classId });
103
-//   } catch (error) {
104
-//     console.log(error);
105
-//   } finally {
106
-//     commentsloading.value = false;
107
-//   }
108
-// };
109
-// const queryrecordfn = async () => {
110
-//   commentsloading.value = true;
111
-//   try {
112
-//     const res = await queryrecord({ contentId: classId, userId });
113
-//     viewRecords.value = res?.rows || [];
114
-//   } catch (error) {
115
-//     console.log(error);
116
-//   } finally {
117
-//     commentsloading.value = false;
118
-//   }
119
-// };
120
-
121
-// 关闭图片预览
122
-// const closePreview = () => {
123
-//   previewVisible.value = false;
124
-// };
125 99
 
126 100
 // 当前选中的tab
127 101
 const activeTab = ref('comment');
128
-// 评论模拟数据
129
-// const comments = ref([
130
-//   {
131
-//     name: '张三',
132
-//     content:
133
-//       '干的不错!12问题解决的很迅速干的不错问题解决的很迅速!干的不错,问题解决的很迅速!干的不错,问题解决的很迅速!',
134
-//     time: '一天前',
135
-//     child: [
136
-//       {
137
-//         name: '张三',
138
-//         content: '谢谢站长支持!',
139
-//       },
140
-//     ],
141
-//   },
142
-//   {
143
-//     name: '李四',
144
-//     content:
145
-//       '干的不错!12问题解决的很迅速干的不错问题解决的很迅速!干的不错,问题解决的很迅速!干的不错,问题解决的很迅速!',
146
-//     time: '三天前',
147
-//   },
148
-//   {
149
-//     name: '王五',
150
-//   },
151
-// ]);
152 102
 
153 103
 const replyOpen = ref({}) as any;
154 104
 const toggleReply = (index: any) => {
@@ -233,15 +183,12 @@ onMounted(() => {
233 183
               v-bind="getSingleImageUploadConfig()"
234 184
               :on-success="handleUploadSuccess"
235 185
             >
236
-              <img
186
+              <!-- <img
237 187
                 v-if="commentImages.length > 0"
238 188
                 :src="commentImages[0].url"
239 189
                 class="avatar"
240
-              />
241
-              <div
242
-                v-else
243
-                class="flex h-full w-full items-center justify-center"
244
-              >
190
+              /> -->
191
+              <div class="flex h-full w-full items-center justify-center">
245 192
                 <ElIcon class="el-upload__icon">
246 193
                   <Plus size="18" />
247 194
                 </ElIcon>
@@ -281,6 +228,9 @@ onMounted(() => {
281 228
                 item.username
282 229
               }}</span>
283 230
               <div>{{ item.content }}</div>
231
+              <div>
232
+                <AttachmentViewer :files="item.attachmentsUrl" />
233
+              </div>
284 234
               <div
285 235
                 style="
286 236
                   display: flex;

+ 18 - 0
apps/web-ele/src/views/schedule/detail/components/gun-check.vue

@@ -117,6 +117,24 @@ const tableColumns: any = [
117 117
     ],
118 118
   },
119 119
   {
120
+    field: 'sumErrorRate_t',
121
+    title: '合计检测升数',
122
+    width: 120,
123
+    children: [
124
+      {
125
+        field: 'sumErrorRate',
126
+        title: 'H=A+B',
127
+        width: 120,
128
+        formatter: ({ row }) => {
129
+          return (
130
+            Number(row.machineValueFirst) + Number(row.machineValueSecond) ||
131
+            '-'
132
+          );
133
+        },
134
+      },
135
+    ],
136
+  },
137
+  {
120 138
     field: 'remark',
121 139
     title: '备注',
122 140
     width: 150,

+ 1 - 1
apps/web-ele/src/views/schedule/detail/components/tank-water.vue

@@ -25,7 +25,7 @@ const tableColumns: any = [
25 25
   {
26 26
     field: 'oilProduct',
27 27
     title: '油品名称',
28
-    // minWidth: 120,
28
+    minWidth: 120,
29 29
   },
30 30
   {
31 31
     field: 'levelGauge',

+ 4 - 6
apps/web-ele/src/views/schedule/detail/index.vue

@@ -106,12 +106,6 @@ const taskId = ref(Number(route.params.id));
106 106
 const previewVisible = ref(false);
107 107
 const previewImages = ref<string[]>([]);
108 108
 
109
-// 预览图片
110
-const previewImage = (imageUrl: string) => {
111
-  previewImages.value = [imageUrl];
112
-  previewVisible.value = true;
113
-};
114
-
115 109
 // 关闭图片预览
116 110
 const closePreview = () => {
117 111
   previewVisible.value = false;
@@ -949,6 +943,8 @@ onMounted(async () => {
949 943
 .boxdev {
950 944
   display: flex;
951 945
   gap: 20px;
946
+  height: 100%;
947
+  overflow: hidden;
952 948
 }
953 949
 .boxdev :deep(.el-card) {
954 950
   border: none !important;
@@ -971,9 +967,11 @@ onMounted(async () => {
971 967
 .boxdev > div:nth-child(1) {
972 968
   flex: 1;
973 969
   min-width: 0;
970
+  overflow-y: auto;
974 971
 }
975 972
 .boxdev > div:nth-child(2) {
976 973
   width: 28%;
974
+  overflow-y: auto;
977 975
 }
978 976
 .task-detail-container {
979 977
   width: 100%;

+ 11 - 8
apps/web-ele/src/views/schedule/view/components/create/config-data.tsx

@@ -1,8 +1,10 @@
1 1
 import { h } from 'vue';
2 2
 
3 3
 import { useUserStore } from '@vben/stores';
4
+import { getPopupContainer } from '@vben/utils';
4 5
 
5 6
 import { queryExecutorList } from '#/api/schedule/index';
7
+import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
6 8
 import { getPostList } from '#/api/system/post/post';
7 9
 import { querybaseApilist } from '#/api/system/tasksettings/tasktemplate';
8 10
 import { getFileUploadConfig } from '#/components/upload/config';
@@ -87,15 +89,16 @@ export const drawerFormSchema: any = (type: any) => [
87 89
     },
88 90
   },
89 91
   {
90
-    component: 'Select',
92
+    component: 'ApiSelect',
91 93
     componentProps: {
92
-      placeholder: '请选择场站',
93
-      options: (userStore.userInfo?.stations || []).map((item: any) => {
94
-        return {
95
-          label: item.stationName,
96
-          value: item.id,
97
-        };
98
-      }),
94
+      getPopupContainer,
95
+      api: async () => {
96
+        const data = await selectAllSysStationAreaList();
97
+        return data;
98
+      },
99
+      multiple: true,
100
+      labelField: 'stationName',
101
+      valueField: 'id',
99 102
     },
100 103
 
101 104
     fieldName: 'stationId',

+ 7 - 3
apps/web-ele/src/views/schedule/view/components/day/index.vue

@@ -380,7 +380,9 @@ const getAuthStatus = (task: any) => {
380 380
             class="flex h-8 items-center justify-center rounded-t text-sm font-medium text-white"
381 381
             :style="{
382 382
               backgroundColor: task.completeTime
383
-                ? '#339169'
383
+                ? task.status === 0
384
+                  ? '#86909C'
385
+                  : '#339169'
384 386
                 : task?.remainingTime?.dayobj?.day !== ''
385 387
                   ? task?.remainingTime?.dayobj?.topbackcolor
386 388
                   : task?.remainingTime?.hours?.hour !== ''
@@ -392,7 +394,7 @@ const getAuthStatus = (task: any) => {
392 394
           >
393 395
             {{
394 396
               task.completeTime
395
-                ? `${task.completeTime}${task.sataus === 0 ? '取消' : '完成'}`
397
+                ? `${task.completeTime}${task.status === 0 ? '取消' : '完成'}`
396 398
                 : task?.remainingTime?.dayobj?.day !== ''
397 399
                   ? task?.remainingTime?.dayobj?.day
398 400
                   : task?.remainingTime?.hours?.hour !== ''
@@ -406,7 +408,9 @@ const getAuthStatus = (task: any) => {
406 408
             class="flex h-[64px] items-center justify-between rounded-b border border-t-0 border-gray-200 p-4"
407 409
             :style="{
408 410
               backgroundColor: task.completeTime
409
-                ? '#D6EFE6'
411
+                ? task.status === 0
412
+                  ? '#F1F1F1'
413
+                  : '#D6EFE6'
410 414
                 : task?.remainingTime?.dayobj?.day !== ''
411 415
                   ? task?.remainingTime?.dayobj?.mainbackcolor
412 416
                   : task?.remainingTime?.hours?.hour !== ''

+ 3 - 0
apps/web-ele/src/views/schedule/view/index.vue

@@ -645,6 +645,7 @@ const createWorkOrderDrawerEvent = () => {
645 645
             <ElButton
646 646
               type="primary"
647 647
               class="w-full"
648
+              v-access:code="'schedule:view:addstationtask'"
648 649
               @click="createTaskDrawerEvent"
649 650
             >
650 651
               <template #icon>
@@ -657,6 +658,7 @@ const createWorkOrderDrawerEvent = () => {
657 658
             <ElButton
658 659
               type="default"
659 660
               class="w-full"
661
+              v-access:code="'schedule:view:addvisittask'"
660 662
               @click="createVisitorTaskDrawerEvent"
661 663
             >
662 664
               <template #icon>
@@ -669,6 +671,7 @@ const createWorkOrderDrawerEvent = () => {
669 671
             <ElButton
670 672
               type="default"
671 673
               class="w-full"
674
+              v-access:code="'schedule:view:addworktask'"
672 675
               @click="createWorkOrderDrawerEvent"
673 676
             >
674 677
               <template #icon>

+ 15 - 15
apps/web-ele/src/views/system/infoEntry/districtInfo/districtInfo-data.tsx

@@ -26,11 +26,11 @@ export const tableColumns: VxeGridProps['columns'] = [
26 26
     title: '片区名称',
27 27
     minWidth: 150,
28 28
   },
29
-  {
30
-    field: 'address',
31
-    title: '详细地址',
32
-    minWidth: 200,
33
-  },
29
+  // {
30
+  //   field: 'address',
31
+  //   title: '详细地址',
32
+  //   minWidth: 200,
33
+  // },
34 34
   {
35 35
     field: 'manager',
36 36
     title: '片区经理',
@@ -80,16 +80,16 @@ export const drawerFormSchema: FormSchemaGetter = () => [
80 80
     },
81 81
     rules: 'required',
82 82
   },
83
-  {
84
-    component: 'Input',
85
-    fieldName: 'address',
86
-    label: '详细地址',
87
-    componentProps: {
88
-      placeholder: '请输入详细地址',
89
-      maxlength: 200,
90
-    },
91
-    rules: 'required',
92
-  },
83
+  // {
84
+  //   component: 'Input',
85
+  //   fieldName: 'address',
86
+  //   label: '详细地址',
87
+  //   componentProps: {
88
+  //     placeholder: '请输入详细地址',
89
+  //     maxlength: 200,
90
+  //   },
91
+  //   rules: 'required',
92
+  // },
93 93
   {
94 94
     component: 'RadioGroup',
95 95
     componentProps: {

+ 9 - 1
apps/web-ele/src/views/system/role/config-data.tsx

@@ -71,7 +71,9 @@ export const drawerSchema: FormSchemaGetter = () => [
71 71
     componentProps: {
72 72
       // getPopupContainer,
73 73
       api: async () => {
74
-        const { rows } = await getPostList();
74
+        const { rows } = await getPostList({
75
+          pageSize: 10_000,
76
+        });
75 77
         return rows;
76 78
       },
77 79
       multiple: true,
@@ -154,6 +156,12 @@ export const columns: VxeGridProps['columns'] = [
154 156
     minWidth: 130,
155 157
   },
156 158
   {
159
+    field: 'postIds',
160
+    title: '岗位',
161
+    slots: { default: 'postIds' },
162
+    minWidth: 130,
163
+  },
164
+  {
157 165
     field: 'roleKey',
158 166
     title: '权限字符',
159 167
     slots: { default: 'roleKey' },

+ 44 - 2
apps/web-ele/src/views/system/user/user-drawer.vue

@@ -17,6 +17,7 @@ import { getPopupContainer } from '@vben/utils';
17 17
 import { useVbenForm, z } from '#/adapter/form';
18 18
 // @ts-ignore
19 19
 import { deptTree } from '#/api/system/dept/dept';
20
+import { selectAllSysAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
20 21
 // @ts-ignore
21 22
 import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
22 23
 // @ts-ignore
@@ -28,6 +29,9 @@ import { addUser, getUserOne, updateUser } from '#/api/system/user/user';
28 29
 import { getDictOptions } from '#/utils/dict';
29 30
 
30 31
 const emit = defineEmits<{ reload: [] }>();
32
+
33
+const postOptions: any = ref([]);
34
+
31 35
 const isUpdate = ref<boolean>(false);
32 36
 // 侧拉内置容器 Form表单的配置项
33 37
 const [Form, FormApi] = useVbenForm({
@@ -173,7 +177,10 @@ const [Form, FormApi] = useVbenForm({
173 177
       componentProps: {
174 178
         getPopupContainer,
175 179
         api: async () => {
176
-          const { rows } = await getPostList();
180
+          const { rows } = await getPostList({
181
+            pageSize: 10_000,
182
+          });
183
+          postOptions.value = rows;
177 184
           return rows;
178 185
         },
179 186
         // multiple: true,
@@ -189,6 +196,7 @@ const [Form, FormApi] = useVbenForm({
189 196
         getPopupContainer,
190 197
         api: async () => {
191 198
           const data = await selectAllSysStationAreaList();
199
+
192 200
           return data;
193 201
         },
194 202
         multiple: true,
@@ -197,6 +205,40 @@ const [Form, FormApi] = useVbenForm({
197 205
       },
198 206
       fieldName: 'stationIds',
199 207
       label: '所属场站',
208
+      dependencies: {
209
+        show: (values: any) => {
210
+          const post = postOptions.value.find(
211
+            (item: any) => item.postId === values.postId,
212
+          );
213
+          return ['employee', 'management'].includes(post?.type || '');
214
+        },
215
+        triggerFields: ['postId'],
216
+      },
217
+    },
218
+    {
219
+      component: 'ApiSelect',
220
+      componentProps: {
221
+        getPopupContainer,
222
+        api: async () => {
223
+          const resp = await selectAllSysAreaList();
224
+          const data = resp || [];
225
+          return data;
226
+        },
227
+        // multiple: true,
228
+        labelField: 'areaName',
229
+        valueField: 'id',
230
+      },
231
+      fieldName: 'areaId',
232
+      label: '所属片区',
233
+      dependencies: {
234
+        show: (values: any) => {
235
+          const post = postOptions.value.find(
236
+            (item: any) => item.postId === values.postId,
237
+          );
238
+          return ['region'].includes(post?.type || '');
239
+        },
240
+        triggerFields: ['postId'],
241
+      },
200 242
     },
201 243
     // {
202 244
     //   component: 'ApiSelect',
@@ -270,7 +312,7 @@ const [Drawer, DrawerApi] = useVbenDrawer({
270 312
 
271 313
       await FormApi.setValues(result.data);
272 314
       console.log(result);
273
-      
315
+
274 316
       await FormApi.setFieldValue('postId', result.data.post?.postId);
275 317
       await FormApi.setFieldValue('roleIds', result.roleIds);
276 318
       await FormApi.setFieldValue('stationIds', result.Stations);

+ 40 - 40
vben-admin.code-workspace

@@ -2,151 +2,151 @@
2 2
   "folders": [
3 3
     {
4 4
       "name": "@vben/web-ele",
5
-      "path": "apps/web-ele",
5
+      "path": "apps/web-ele"
6 6
     },
7 7
     {
8 8
       "name": "@vben/commitlint-config",
9
-      "path": "internal/lint-configs/commitlint-config",
9
+      "path": "internal/lint-configs/commitlint-config"
10 10
     },
11 11
     {
12 12
       "name": "@vben/eslint-config",
13
-      "path": "internal/lint-configs/eslint-config",
13
+      "path": "internal/lint-configs/eslint-config"
14 14
     },
15 15
     {
16 16
       "name": "@vben/prettier-config",
17
-      "path": "internal/lint-configs/prettier-config",
17
+      "path": "internal/lint-configs/prettier-config"
18 18
     },
19 19
     {
20 20
       "name": "@vben/stylelint-config",
21
-      "path": "internal/lint-configs/stylelint-config",
21
+      "path": "internal/lint-configs/stylelint-config"
22 22
     },
23 23
     {
24 24
       "name": "@vben/node-utils",
25
-      "path": "internal/node-utils",
25
+      "path": "internal/node-utils"
26 26
     },
27 27
     {
28 28
       "name": "@vben/tailwind-config",
29
-      "path": "internal/tailwind-config",
29
+      "path": "internal/tailwind-config"
30 30
     },
31 31
     {
32 32
       "name": "@vben/tsconfig",
33
-      "path": "internal/tsconfig",
33
+      "path": "internal/tsconfig"
34 34
     },
35 35
     {
36 36
       "name": "@vben/vite-config",
37
-      "path": "internal/vite-config",
37
+      "path": "internal/vite-config"
38 38
     },
39 39
     {
40 40
       "name": "@vben-core/design",
41
-      "path": "packages/@core/base/design",
41
+      "path": "packages/@core/base/design"
42 42
     },
43 43
     {
44 44
       "name": "@vben-core/icons",
45
-      "path": "packages/@core/base/icons",
45
+      "path": "packages/@core/base/icons"
46 46
     },
47 47
     {
48 48
       "name": "@vben-core/shared",
49
-      "path": "packages/@core/base/shared",
49
+      "path": "packages/@core/base/shared"
50 50
     },
51 51
     {
52 52
       "name": "@vben-core/typings",
53
-      "path": "packages/@core/base/typings",
53
+      "path": "packages/@core/base/typings"
54 54
     },
55 55
     {
56 56
       "name": "@vben-core/composables",
57
-      "path": "packages/@core/composables",
57
+      "path": "packages/@core/composables"
58 58
     },
59 59
     {
60 60
       "name": "@vben-core/preferences",
61
-      "path": "packages/@core/preferences",
61
+      "path": "packages/@core/preferences"
62 62
     },
63 63
     {
64 64
       "name": "@vben-core/form-ui",
65
-      "path": "packages/@core/ui-kit/form-ui",
65
+      "path": "packages/@core/ui-kit/form-ui"
66 66
     },
67 67
     {
68 68
       "name": "@vben-core/layout-ui",
69
-      "path": "packages/@core/ui-kit/layout-ui",
69
+      "path": "packages/@core/ui-kit/layout-ui"
70 70
     },
71 71
     {
72 72
       "name": "@vben-core/menu-ui",
73
-      "path": "packages/@core/ui-kit/menu-ui",
73
+      "path": "packages/@core/ui-kit/menu-ui"
74 74
     },
75 75
     {
76 76
       "name": "@vben-core/popup-ui",
77
-      "path": "packages/@core/ui-kit/popup-ui",
77
+      "path": "packages/@core/ui-kit/popup-ui"
78 78
     },
79 79
     {
80 80
       "name": "@vben-core/shadcn-ui",
81
-      "path": "packages/@core/ui-kit/shadcn-ui",
81
+      "path": "packages/@core/ui-kit/shadcn-ui"
82 82
     },
83 83
     {
84 84
       "name": "@vben-core/tabs-ui",
85
-      "path": "packages/@core/ui-kit/tabs-ui",
85
+      "path": "packages/@core/ui-kit/tabs-ui"
86 86
     },
87 87
     {
88 88
       "name": "@vben/constants",
89
-      "path": "packages/constants",
89
+      "path": "packages/constants"
90 90
     },
91 91
     {
92 92
       "name": "@vben/access",
93
-      "path": "packages/effects/access",
93
+      "path": "packages/effects/access"
94 94
     },
95 95
     {
96 96
       "name": "@vben/common-ui",
97
-      "path": "packages/effects/common-ui",
97
+      "path": "packages/effects/common-ui"
98 98
     },
99 99
     {
100 100
       "name": "@vben/hooks",
101
-      "path": "packages/effects/hooks",
101
+      "path": "packages/effects/hooks"
102 102
     },
103 103
     {
104 104
       "name": "@vben/layouts",
105
-      "path": "packages/effects/layouts",
105
+      "path": "packages/effects/layouts"
106 106
     },
107 107
     {
108 108
       "name": "@vben/plugins",
109
-      "path": "packages/effects/plugins",
109
+      "path": "packages/effects/plugins"
110 110
     },
111 111
     {
112 112
       "name": "@vben/request",
113
-      "path": "packages/effects/request",
113
+      "path": "packages/effects/request"
114 114
     },
115 115
     {
116 116
       "name": "@vben/icons",
117
-      "path": "packages/icons",
117
+      "path": "packages/icons"
118 118
     },
119 119
     {
120 120
       "name": "@vben/locales",
121
-      "path": "packages/locales",
121
+      "path": "packages/locales"
122 122
     },
123 123
     {
124 124
       "name": "@vben/preferences",
125
-      "path": "packages/preferences",
125
+      "path": "packages/preferences"
126 126
     },
127 127
     {
128 128
       "name": "@vben/stores",
129
-      "path": "packages/stores",
129
+      "path": "packages/stores"
130 130
     },
131 131
     {
132 132
       "name": "@vben/styles",
133
-      "path": "packages/styles",
133
+      "path": "packages/styles"
134 134
     },
135 135
     {
136 136
       "name": "@vben/types",
137
-      "path": "packages/types",
137
+      "path": "packages/types"
138 138
     },
139 139
     {
140 140
       "name": "@vben/utils",
141
-      "path": "packages/utils",
141
+      "path": "packages/utils"
142 142
     },
143 143
     {
144 144
       "name": "@vben/turbo-run",
145
-      "path": "scripts/turbo-run",
145
+      "path": "scripts/turbo-run"
146 146
     },
147 147
     {
148 148
       "name": "@vben/vsh",
149
-      "path": "scripts/vsh",
150
-    },
151
-  ],
152
-}
149
+      "path": "scripts/vsh"
150
+    }
151
+  ]
152
+}