Quellcode durchsuchen

Merge branch 'master' of http://39.164.159.226:3000/hnsh-smart-steward/smart-steward-admin

闪电 vor 3 Wochen
Ursprung
Commit
62532a5174

+ 4 - 4
apps/web-ele/src/api/knowledge/category.ts

@@ -11,7 +11,7 @@ export function addKnowledgeCategory(data: any) {
11 11
 }
12 12
 //查询知识库分类列表
13 13
 export function queryKnowledgeCategory(params: any) {
14
-  return requestClient.get(Api.queryknowledgeCategory, {params});
14
+  return requestClient.get(Api.queryknowledgeCategory, { params });
15 15
 }
16 16
 //修改知识库分类
17 17
 export function editKnowledgeCategory(data: any) {
@@ -20,8 +20,8 @@ export function editKnowledgeCategory(data: any) {
20 20
   });
21 21
 }
22 22
 //删除知识库分类
23
-export function deleteKnowledgeCategory(roleId: any) {
24
-  return requestClient.delete(`${Api.baseknowledgeCategory}/${roleId}`, {
23
+export function deleteKnowledgeCategory(ids: any) {
24
+  return requestClient.delete(`${Api.baseknowledgeCategory}/${ids}`, {
25 25
     successMessageMode: 'message',
26 26
   });
27
-}
27
+}

+ 32 - 1
apps/web-ele/src/views/knowledge/type/create.vue

@@ -11,7 +11,7 @@ import {
11 11
   ElButton,
12 12
   ElIcon,
13 13
 } from 'element-plus';
14
-import { Upload, Plus } from '@element-plus/icons-vue';
14
+import { Upload, Plus, Delete } from '@element-plus/icons-vue';
15 15
 import '#/assets/iconfonts/font/iconfont.css';
16 16
 import { useAccessStore } from '@vben/stores';
17 17
 import { getUploadAction } from '#/components/upload/config';
@@ -188,6 +188,13 @@ const selectDefaultIcon = (icon: any) => {
188 188
   form.value.icon = `${icon.icon},${icon.color},${icon.iconValue}`;
189 189
 };
190 190
 
191
+// 删除上传的图标
192
+const handleDeleteIcon = () => {
193
+  form.value.icon = '';
194
+  form.value.upiconname = '';
195
+  ElMessage.success('图标已删除');
196
+};
197
+
191 198
 // 表单提交
192 199
 const submitForm = () => {
193 200
   // 这里可以添加表单提交逻辑
@@ -265,6 +272,9 @@ const closeForm = () => {
265 272
         class="icon-preview"
266 273
       >
267 274
         <img :src="form.icon" alt="预览" />
275
+        <div class="icon-delete" @click="handleDeleteIcon">
276
+          <ElIcon><Delete /></ElIcon>
277
+        </div>
268 278
       </div>
269 279
       <div class="icon-default">
270 280
         <div class="section-title">预览可选图标</div>
@@ -389,6 +399,7 @@ const closeForm = () => {
389 399
 
390 400
 .icon-preview {
391 401
   margin: 16px 0;
402
+  position: relative;
392 403
 
393 404
   img {
394 405
     width: 120px;
@@ -396,6 +407,26 @@ const closeForm = () => {
396 407
     object-fit: cover;
397 408
     border-radius: 6px;
398 409
   }
410
+
411
+  .icon-delete {
412
+    position: absolute;
413
+    top: -10px;
414
+    right: -10px;
415
+    width: 24px;
416
+    height: 24px;
417
+    border-radius: 50%;
418
+    background-color: rgba(0, 0, 0, 0.6);
419
+    color: white;
420
+    display: flex;
421
+    align-items: center;
422
+    justify-content: center;
423
+    cursor: pointer;
424
+    transition: all 0.3s;
425
+
426
+    &:hover {
427
+      background-color: rgba(0, 0, 0, 0.8);
428
+    }
429
+  }
399 430
 }
400 431
 
401 432
 .icon-default {

+ 6 - 1
apps/web-ele/src/views/schedule/allot/config-data.tsx

@@ -27,7 +27,12 @@ export const querySchema: FormSchemaGetter = () => [
27 27
       valueField: 'postId',
28 28
       placeholder: '请选择岗位名称',
29 29
       resultField: 'rows',
30
-      clearable: true, // 添加一键清除功能
30
+      clearable: true,
31
+      afterFetch: (data: any) => {
32
+        return data.rows.filter(
33
+          (item: any) => item.postId === 4 || item.postId === 5,
34
+        );
35
+      },
31 36
     },
32 37
     fieldName: 'executePosition',
33 38
     label: '岗位名称',

+ 1 - 0
apps/web-ele/src/views/schedule/unfinished/index.vue

@@ -58,6 +58,7 @@ const gridOptions: VxeGridProps = {
58 58
           ...formValues,
59 59
           pageNum: page.currentPage,
60 60
           pageSize: page.pageSize,
61
+          status: '1',
61 62
         });
62 63
         return { items: resp.rows, total: resp.total };
63 64
       },

+ 43 - 41
apps/web-ele/src/views/schedule/work/class/config-data.tsx

@@ -1,51 +1,53 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-
4
-// import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
5
-import { queryGasStationList } from '#/api/schedule/index';
3
+import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
4
+// import { queryGasStationList } from '#/api/schedule/index';
6 5
 import { queryrclassesApilist } from '#/api/schedule/work/classes';
7
-import { useAuthStore } from '#/store/auth';
6
+import { useUserStore } from '@vben/stores';
7
+const userStore = useUserStore();
8
+const getstationId = userStore.userInfo?.stations?.[0]?.id;
8 9
 
9
-const getstationId = useAuthStore().userStore?.userInfo?.stations[0]?.id;
10
-export const querySchema: FormSchemaGetter = () => [
11
-  {
12
-    component: 'ApiSelect',
13
-    componentProps: {
14
-      api: queryGasStationList,
15
-      labelField: 'stationName',
16
-      valueField: 'stationId',
17
-      placeholder: '请选择油站',
18
-      clearable: true,
10
+export const querySchema: FormSchemaGetter = () => {
11
+  return [
12
+    {
13
+      component: 'ApiSelect',
14
+      componentProps: {
15
+        api: selectAllSysStationAreaList,
16
+        labelField: 'stationName',
17
+        valueField: 'id',
18
+        placeholder: '请选择油站',
19
+        clearable: true,
20
+      },
21
+      fieldName: 'stationName',
22
+      defaultValue: getstationId,
23
+      label: '油站',
19 24
     },
20
-    fieldName: 'stationId',
21
-    defaultValue: getstationId,
22
-    label: '油站',
23
-  },
24
-  {
25
-    component: 'ApiSelect',
26
-    componentProps: {
27
-      api: queryrclassesApilist,
28
-      labelField: 'shiftName',
29
-      valueField: 'shiftName',
30
-      placeholder: '请选择班次名称',
31
-      clearable: true,
32
-      resultField: 'rows',
25
+    {
26
+      component: 'ApiSelect',
27
+      componentProps: {
28
+        api: queryrclassesApilist,
29
+        labelField: 'shiftName',
30
+        valueField: 'shiftName',
31
+        placeholder: '请选择班次名称',
32
+        clearable: true,
33
+        resultField: 'rows',
34
+      },
35
+      fieldName: 'shiftName',
36
+      label: '班次名称',
33 37
     },
34
-    fieldName: 'shiftName',
35
-    label: '班次名称',
36
-  },
37
-  {
38
-    component: 'DatePicker',
39
-    componentProps: {
40
-      type: 'datetime',
41
-      format: 'YYYY-MM-DD',
42
-      valueFormat: 'YYYY-MM-DD HH:mm:ss',
43
-      placeholder: '选择时间',
38
+    {
39
+      component: 'DatePicker',
40
+      componentProps: {
41
+        type: 'datetime',
42
+        format: 'YYYY-MM-DD',
43
+        valueFormat: 'YYYY-MM-DD HH:mm:ss',
44
+        placeholder: '选择时间',
45
+      },
46
+      fieldName: 'startTime',
47
+      label: '上班时间',
44 48
     },
45
-    fieldName: 'startTime',
46
-    label: '上班时间',
47
-  },
48
-];
49
+  ];
50
+};
49 51
 
50 52
 export const columns: VxeGridProps['columns'] = [
51 53
   {

+ 1 - 0
apps/web-ele/src/views/system/taskDesign/taskTemplate/taskTemplate-data.tsx

@@ -392,6 +392,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
392 392
     label: '任务负责人',
393 393
     componentProps: {
394 394
       placeholder: '请选择任务来源',
395
+      clearable: true,
395 396
       api: async () => {
396 397
         const resp: any = await getUserList({
397 398
           pageNum: 1,