chenxiaochao %!s(int64=2) %!d(string=před) týdny
rodič
revize
236a7ca312

+ 2 - 2
apps/web-ele/src/components/knowledgemain/index.vue

@@ -27,7 +27,7 @@ const KnowledgeDetails = ref({}) as any;
27 27
 const chapterDatafn = async () => {
28 28
   chapterDataloading.value = true;
29 29
   try {
30
-    const res = await queryKnowledgeContentlist(props.classId);
30
+    const res = await queryKnowledgeContentlist(props.classId||{});
31 31
     if (res.code === 200) {
32 32
       console.log('章节数据', res.data);
33 33
       chapterData.value = res.data || [];
@@ -44,7 +44,7 @@ const chapterDatafn = async () => {
44 44
 // 查询知识分类详情
45 45
 const queryKnowledgeCategoryDetailfn = async () => {
46 46
   try {
47
-    const res = await queryKnowledgeCategoryDetail(props.classId);
47
+    const res = await queryKnowledgeCategoryDetail(props.classId||{});
48 48
     KnowledgeDetails.value = res;
49 49
   } catch (error) {
50 50
     console.log(error);

+ 9 - 2
apps/web-ele/src/views/system/taskDesign/taskTemplate/index.vue

@@ -113,6 +113,7 @@ async function handleView(row: any) {
113 113
         isTiming: String(res.isTiming),
114 114
         level: String(res.level),
115 115
         repel: Number(res.repel),
116
+        isCycleEnd: res?.isCycleEnd === 1 ? [true] : [],
116 117
       })
117 118
       .open();
118 119
   } catch (error) {
@@ -125,6 +126,7 @@ async function handleView(row: any) {
125 126
 async function handleEdit(row: any) {
126 127
   try {
127 128
     const res = await xiangqigApi(row.id);
129
+    console.log('编辑数据', res);
128 130
     drawerApi
129 131
       .setData({
130 132
         ...res,
@@ -139,6 +141,7 @@ async function handleEdit(row: any) {
139 141
         isTiming: String(res.isTiming),
140 142
         level: String(res.level),
141 143
         repel: Number(res.repel),
144
+        isCycleEnd: res?.isCycleEnd === 1 ? [true] : [],
142 145
       })
143 146
       .open();
144 147
   } catch (error) {
@@ -180,14 +183,18 @@ function handleExport() {
180 183
 
181 184
 const handleConfirm = async (data: any) => {
182 185
   console.log('提交数据', data);
183
-
184 186
   drawerApi.drawerLoading(true);
185 187
   try {
186 188
     data.standardGuideline = '14,17';
187 189
     data.files = data?.attachment
188 190
       ?.map((item: any) => item.response.data.fileName)
189 191
       .join(',');
190
-
192
+    if (Array.isArray(data.executePosition) && data.executePosition.length) {
193
+      data.executePosition = data?.executePosition?.join(',');
194
+    }
195
+    if (Array.isArray(data.isCycleEnd)) {
196
+      data.isCycleEnd = data.isCycleEnd[0] === true ? 1 : 0;
197
+    }
191 198
     // 根据是否包含 id 来决定调用新增接口还是编辑接口
192 199
     if (data.id) {
193 200
       // 编辑操作

+ 75 - 241
apps/web-ele/src/views/system/taskDesign/taskTemplate/taskTemplate-data.tsx

@@ -1,8 +1,9 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-
3
+import { ElButton } from 'element-plus';
4 4
 import { getPopupContainer } from '@vben/utils';
5
-
5
+// @ts-ignore
6
+import {useVbenModal } from '@vben/common-ui';
6 7
 import { ElMessage } from 'element-plus';
7 8
 
8 9
 // import type { SelectProps } from '#/adapter/form';
@@ -715,7 +716,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
715 716
     defaultValue: '00',
716 717
     componentProps: {
717 718
       clearable: true,
718
-      placeholder: '请输入结束时间(小时)',
719
+      placeholder: '请输入开始时间(小时)',
719 720
       options: Array.from({ length: 24 }, (_, i) => ({
720 721
         label: i.toString().padStart(2, '0'),
721 722
         value: i,
@@ -749,8 +750,12 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
749 750
     dependencies: {
750 751
       show: (values: any) => values.taskFrequency !== 'yearly',
751 752
       disabled: (values: any) =>
752
-        Array.isArray(values.endoftheperiod) &&
753
-        values.endoftheperiod.length > 0,
753
+        (Array.isArray(values.endoftheperiod) &&
754
+          values.endoftheperiod.length > 0) ||
755
+        (values.taskFrequency !== 'daily' &&
756
+          values.taskFrequency !== 'yearly' &&
757
+          Array.isArray(values.isCycleEnd) &&
758
+          values.isCycleEnd[0] === true),
754 759
       componentProps(values: any) {
755 760
         const startDay = parseInt(values.startTimeDay) || 1;
756 761
 
@@ -811,7 +816,12 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
811 816
           defaultValue: '1',
812 817
         };
813 818
       },
814
-      triggerFields: ['endoftheperiod', 'taskFrequency', 'startTimeDay'],
819
+      triggerFields: [
820
+        'endoftheperiod',
821
+        'isCycleEnd',
822
+        'taskFrequency',
823
+        'startTimeDay',
824
+      ],
815 825
     },
816 826
     componentProps: {
817 827
       clearable: true,
@@ -832,14 +842,18 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
832 842
     dependencies: {
833 843
       show: (values: any) => values.taskFrequency !== 'yearly',
834 844
       disabled: (values: any) =>
835
-        Array.isArray(values.endoftheperiod) &&
836
-        values.endoftheperiod.length > 0,
845
+        (Array.isArray(values.endoftheperiod) &&
846
+          values.endoftheperiod.length > 0) ||
847
+        (values.taskFrequency !== 'daily' &&
848
+          values.taskFrequency !== 'yearly' &&
849
+          Array.isArray(values.isCycleEnd) &&
850
+          values.isCycleEnd[0] === true),
837 851
       componentProps(values: any) {
838 852
         return {
839 853
           defaultValue: '23',
840 854
         };
841 855
       },
842
-      triggerFields: ['endoftheperiod', 'taskFrequency'],
856
+      triggerFields: ['endoftheperiod', 'isCycleEnd', 'taskFrequency'],
843 857
     },
844 858
     componentProps: {
845 859
       clearable: true,
@@ -913,8 +927,12 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
913 927
     dependencies: {
914 928
       show: (values: any) => values.taskFrequency === 'yearly',
915 929
       disabled: (values: any) =>
916
-        Array.isArray(values.endoftheperiod) &&
917
-        values.endoftheperiod.length > 0,
930
+        (Array.isArray(values.endoftheperiod) &&
931
+          values.endoftheperiod.length > 0) ||
932
+        (values.taskFrequency !== 'daily' &&
933
+          values.taskFrequency !== 'yearly' &&
934
+          Array.isArray(values.isCycleEnd) &&
935
+          values.isCycleEnd[0] === true),
918 936
       componentProps(values: any) {
919 937
         const startMonth = parseInt(values.startTimeMonth) || 1;
920 938
         const startDay = parseInt(values.startTimeYearDay) || 1;
@@ -927,7 +945,12 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
927 945
           defaultValue: startMonth.toString(),
928 946
         };
929 947
       },
930
-      triggerFields: ['endoftheperiod', 'taskFrequency', 'startTimeMonth'],
948
+      triggerFields: [
949
+        'endoftheperiod',
950
+        'isCycleEnd',
951
+        'taskFrequency',
952
+        'startTimeMonth',
953
+      ],
931 954
     },
932 955
     componentProps: {
933 956
       clearable: true,
@@ -947,8 +970,12 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
947 970
     dependencies: {
948 971
       show: (values: any) => values.taskFrequency === 'yearly',
949 972
       disabled: (values: any) =>
950
-        Array.isArray(values.endoftheperiod) &&
951
-        values.endoftheperiod.length > 0,
973
+        (Array.isArray(values.endoftheperiod) &&
974
+          values.endoftheperiod.length > 0) ||
975
+        (values.taskFrequency !== 'daily' &&
976
+          values.taskFrequency !== 'yearly' &&
977
+          Array.isArray(values.isCycleEnd) &&
978
+          values.isCycleEnd[0] === true),
952 979
       componentProps(values: any) {
953 980
         const startDay = parseInt(values.startTimeYearDay) || 1;
954 981
         const month = parseInt(values.endTimeMonth) || 1;
@@ -972,6 +999,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
972 999
       },
973 1000
       triggerFields: [
974 1001
         'endoftheperiod',
1002
+        'isCycleEnd',
975 1003
         'taskFrequency',
976 1004
         'startTimeYearDay',
977 1005
         'endTimeMonth',
@@ -987,12 +1015,23 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
987 1015
     },
988 1016
     // rules: 'required',
989 1017
   },
1018
+  //是否周期末0否1是
990 1019
   {
991 1020
     component: 'CheckboxGroup',
992
-    fieldName: 'endoftheperiod',
1021
+    fieldName: 'isCycleEnd',
993 1022
     label: '周期末',
994 1023
     componentProps: {
995
-      options: [{ label: '', value: '1' }],
1024
+      options: [
1025
+        {
1026
+          label: '',
1027
+          value: true,
1028
+        },
1029
+      ],
1030
+    },
1031
+    dependencies: {
1032
+      show: (values: any) =>
1033
+        values.taskFrequency !== 'daily' && values.taskFrequency !== 'yearly',
1034
+      triggerFields: ['taskFrequency'],
996 1035
     },
997 1036
     formItemClass: 'col-span-2 items-baseline',
998 1037
   },
@@ -1027,6 +1066,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1027 1066
     component: 'InputNumber',
1028 1067
     fieldName: 'invalidDays',
1029 1068
     label: '失效天数',
1069
+    defaultValue: 0,
1030 1070
     componentProps: {
1031 1071
       placeholder: '请输入失效天数',
1032 1072
       min: 0,
@@ -1052,6 +1092,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1052 1092
     component: 'InputNumber',
1053 1093
     fieldName: 'daysInterval',
1054 1094
     label: '间隔天数',
1095
+    defaultValue: 0,
1055 1096
     componentProps: {
1056 1097
       placeholder: '请输入间隔天数',
1057 1098
       min: 0,
@@ -1067,6 +1108,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1067 1108
     component: 'InputNumber',
1068 1109
     fieldName: 'warningTime',
1069 1110
     label: '预警时间',
1111
+    defaultValue: 0,
1070 1112
     componentProps: {
1071 1113
       placeholder: '请输入预警时间',
1072 1114
       min: 0,
@@ -1125,75 +1167,29 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1125 1167
     formItemClass: 'col-span-2 items-baseline',
1126 1168
   },
1127 1169
   {
1128
-    component: 'ApiTreeSelect',
1170
+    component: 'InputTag',
1129 1171
     fieldName: 'standardGuideline',
1130 1172
     label: '标准指引',
1131 1173
     componentProps: {
1132 1174
       placeholder: '请选择标准指引',
1133
-      // api: async () => {
1134
-      //   try {
1135
-      //     const res = await queryKnowledgeCategory({});
1136
-      //     if (res?.rows && res.rows.length > 0) {
1137
-      //       // 使用Promise.all等待所有异步操作完成
1138
-      //       const treeData = await Promise.all(
1139
-      //         res.rows.map(async (item:any) => {
1140
-      //           let children = [];
1141
-      //           try {
1142
-      //             // 获取子项数据
1143
-      //             const childrenRes = await queryKnowledgeContentlist(item.id);
1144
-      //             // 由于isTransformResponse为false,childrenRes直接是数据数组
1145
-      //             const actualData = Array.isArray(childrenRes)
1146
-      //               ? childrenRes
1147
-      //               : childrenRes?.data || [];
1148
-      //             // 递归处理嵌套的children数组
1149
-      //             const processChildItem = (item: any) => {
1150
-      //               const processedItem = {
1151
-      //                 ...item,
1152
-      //                 label: item.title || item.id,
1153
-      //                 value: item.id,
1154
-      //               };
1155
-      //               // 如果item有children数组,递归处理
1156
-      //               if (
1157
-      //                 item.children &&
1158
-      //                 Array.isArray(item.children) &&
1159
-      //                 item.children.length > 0
1160
-      //               ) {
1161
-      //                 processedItem.children =
1162
-      //                   item.children.map(processChildItem);
1163
-      //               }
1164
-      //               return processedItem;
1165
-      //             };
1166
-
1167
-      //             if (actualData.length > 0) {
1168
-      //               children = actualData.map(processChildItem);
1169
-      //             }
1170
-      //           } catch (error) {
1171
-      //             console.error('获取子项数据失败:', error);
1172
-      //           }
1173
-      //           return {
1174
-      //             ...item,
1175
-      //             label: item.name,
1176
-      //             value: item.id,
1177
-      //             children: children,
1178
-      //           };
1179
-      //         }),
1180
-      //       );
1181
-
1182
-      //       console.log('最终树形数据:', treeData);
1183
-      //       return treeData;
1184
-      //     }
1185
-      //   } catch (error) {
1186
-      //     console.error('获取分类数据失败:', error);
1187
-      //   }
1188
-      //   return [];
1189
-      // },
1190
-      getPopupContainer,
1191
-      labelField: 'label',
1192
-      valueField: 'id',
1193
-      childrenField: 'children',
1194
-      checkStrictly: true,
1195 1175
       clearable: true,
1196 1176
     },
1177
+    renderComponentContent: (row: any, formApi: any) => {
1178
+      return {
1179
+        suffix: () => {
1180
+          return (
1181
+              <ElButton
1182
+                onClick={() => {
1183
+                  props?.quoteModalApi?.open();
1184
+                }}
1185
+                type="primary"
1186
+              >
1187
+                选择
1188
+              </ElButton>
1189
+          );
1190
+        },
1191
+      };
1192
+    },
1197 1193
     formItemClass: 'col-span-2 items-baseline',
1198 1194
   },
1199 1195
   {
@@ -1237,26 +1233,6 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1237 1233
     rules: 'required',
1238 1234
     formItemClass: 'col-span-2 items-baseline',
1239 1235
   },
1240
-  // {
1241
-  //   component: 'Select',
1242
-  //   fieldName: 'archiveList',
1243
-  //   label: '归档列表',
1244
-  //   componentProps: {
1245
-  //     placeholder: '请选择归档列表',
1246
-  //     showSearch: true,
1247
-  //     filterOption: (input, option) =>
1248
-  //       (option?.label || '').toLowerCase().includes(input.toLowerCase()),
1249
-  //     // 模拟归档列表数据
1250
-  //     options: [
1251
-  //       { label: '日常巡检归档', value: '日常巡检归档' },
1252
-  //       { label: '安全检查归档', value: '安全检查归档' },
1253
-  //       { label: '财务报表归档', value: '财务报表归档' },
1254
-  //       { label: '市场调研归档', value: '市场调研归档' },
1255
-  //       { label: '人事档案归档', value: '人事档案归档' },
1256
-  //     ],
1257
-  //   },
1258
-  //   rules: 'required',
1259
-  // },
1260 1236
 ];
1261 1237
 
1262 1238
 export const formActions = [
@@ -1273,145 +1249,3 @@ export const formActions = [
1273 1249
     buttonProps: { type: 'primary', ghost: true },
1274 1250
   },
1275 1251
 ];
1276
-
1277
-// export const mockData = [
1278
-//   {
1279
-//     id: '1',
1280
-//     taskName: '日常巡检任务',
1281
-//     taskType: '运营',
1282
-//     formType: '检查任务',
1283
-//     taskResponsible: '张三',
1284
-//     executivePost: '巡检员',
1285
-//     taskFrequency: '每天一次',
1286
-//     status: '启用',
1287
-//     timedDistribution: '是',
1288
-//     taskSource: '新增',
1289
-//     operator: '系统管理员',
1290
-//     operationTime: '2023-10-01 10:00:00',
1291
-//     // 示例附件数据
1292
-//     attachment: [
1293
-//       {
1294
-//         name: '设备巡检记录表.xlsx',
1295
-//         url: '#',
1296
-//         size: 204800,
1297
-//         type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
1298
-//         uid: '1622547135000_1',
1299
-//         status: 'success',
1300
-//       },
1301
-//       {
1302
-//         name: '巡检操作规范.pdf',
1303
-//         url: '#',
1304
-//         size: 153600,
1305
-//         type: 'application/pdf',
1306
-//         uid: '1622547135000_2',
1307
-//         status: 'success',
1308
-//       },
1309
-//     ],
1310
-//     taskDescription: '这是一个日常巡检任务,需要检查设备运行状态和环境安全。',
1311
-//     archiveList: '日常巡检归档',
1312
-//   },
1313
-//   {
1314
-//     id: '2',
1315
-//     taskName: '安全培训任务',
1316
-//     taskType: '安全',
1317
-//     formType: '表单任务',
1318
-//     taskResponsible: '李四',
1319
-//     executivePost: '安全员',
1320
-//     taskFrequency: '每月一次',
1321
-//     status: '启用',
1322
-//     timedDistribution: '是',
1323
-//     taskSource: '新增',
1324
-//     operator: '系统管理员',
1325
-//     operationTime: '2023-10-02 14:30:00',
1326
-//     // 示例附件数据
1327
-//     attachment: [
1328
-//       {
1329
-//         name: '安全培训教材.pdf',
1330
-//         url: '#',
1331
-//         size: 307200,
1332
-//         type: 'application/pdf',
1333
-//         uid: '1622547135000_3',
1334
-//         status: 'success',
1335
-//       },
1336
-//       {
1337
-//         name: '培训签到表.xlsx',
1338
-//         url: '#',
1339
-//         size: 51200,
1340
-//         type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
1341
-//         uid: '1622547135000_4',
1342
-//         status: 'success',
1343
-//       },
1344
-//     ],
1345
-//     taskDescription: '这是一个安全培训任务,需要组织员工进行安全知识学习。',
1346
-//     archiveList: '安全检查归档',
1347
-//   },
1348
-//   {
1349
-//     id: '3',
1350
-//     taskName: '财务报表提交',
1351
-//     taskType: '财务',
1352
-//     formType: '上传附件任务',
1353
-//     taskResponsible: '王五',
1354
-//     executivePost: '财务人员',
1355
-//     taskFrequency: '每月一次',
1356
-//     status: '启用',
1357
-//     timedDistribution: '否',
1358
-//     taskSource: '默认',
1359
-//     operator: '系统管理员',
1360
-//     operationTime: '2023-10-03 09:15:00',
1361
-//     // 示例附件数据
1362
-//     attachment: [
1363
-//       {
1364
-//         name: '财务报表模板.xlsx',
1365
-//         url: '#',
1366
-//         size: 102400,
1367
-//         type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
1368
-//         uid: '1622547135000_5',
1369
-//         status: 'success',
1370
-//       },
1371
-//     ],
1372
-//     taskDescription: '这是一个财务报表提交任务,需要按时提交月度财务报表。',
1373
-//     archiveList: '财务报表归档',
1374
-//   },
1375
-//   {
1376
-//     id: '4',
1377
-//     taskName: '市场调研任务',
1378
-//     taskType: '市场',
1379
-//     formType: '表单任务',
1380
-//     taskResponsible: '赵六',
1381
-//     executivePost: '市场专员',
1382
-//     taskFrequency: '每周一次',
1383
-//     status: '启用',
1384
-//     timedDistribution: '是',
1385
-//     taskSource: '新增',
1386
-//     operator: '系统管理员',
1387
-//     operationTime: '2023-10-04 16:45:00',
1388
-//   },
1389
-//   {
1390
-//     id: '5',
1391
-//     taskName: '人事档案更新',
1392
-//     taskType: '人事',
1393
-//     formType: '确认任务',
1394
-//     taskResponsible: '孙七',
1395
-//     executivePost: '人事专员',
1396
-//     taskFrequency: '每三月一次',
1397
-//     status: '关闭',
1398
-//     timedDistribution: '是',
1399
-//     taskSource: '默认',
1400
-//     operator: '系统管理员',
1401
-//     operationTime: '2023-10-05 11:20:00',
1402
-//   },
1403
-//   {
1404
-//     id: '6',
1405
-//     taskName: '合规检查任务',
1406
-//     taskType: '合规',
1407
-//     formType: '检查任务',
1408
-//     taskResponsible: '周八',
1409
-//     executivePost: '合规专员',
1410
-//     taskFrequency: '每六月一次',
1411
-//     status: '启用',
1412
-//     timedDistribution: '否',
1413
-//     taskSource: '新增',
1414
-//     operator: '系统管理员',
1415
-//     operationTime: '2023-10-06 15:10:00',
1416
-//   },
1417
-// ];

+ 57 - 12
apps/web-ele/src/views/system/taskDesign/taskTemplate/taskTemplate-drawer.vue

@@ -1,22 +1,18 @@
1 1
 <script setup lang="ts">
2 2
 import { computed, onMounted, ref } from 'vue';
3
-
4 3
 // @ts-ignore
5
-import { useVbenDrawer, useVbenForm } from '@vben/common-ui';
4
+import { useVbenDrawer, useVbenForm, useVbenModal } from '@vben/common-ui';
6 5
 import { useAccessStore } from '@vben/stores';
7
-
8 6
 import { Plus } from '@element-plus/icons-vue';
9 7
 import { ElIcon, ElUpload } from 'element-plus';
10
-
11 8
 import { selectAllSysStation } from '#/api/system/infoEntry/stationInfo/stationInfo';
12 9
 import { stationoperatorapi } from '#/api/system/tasksettings/tasktemplate';
13 10
 // import '#/assets/iconfonts/font/iconfont.css';
14 11
 import iconfont from '#/assets/iconfonts/font/iconfont.json';
15 12
 import TinymceEditor from '#/components/tinymce/src/editor.vue';
16 13
 import { getUploadAction } from '#/components/upload/config';
17
-
18
-import { drawerFormSchema } from './taskTemplate-data';
19
-
14
+import { drawerFormSchema, positionsOptions } from './taskTemplate-data';
15
+import knowledgemain from '#/components/knowledgemain/index.vue';
20 16
 const emit = defineEmits(['Confirm']);
21 17
 const iconlist = ref(iconfont?.glyphs || []);
22 18
 const accessStore = useAccessStore();
@@ -47,6 +43,13 @@ interface DrawerData {
47 43
   attachment?: any[];
48 44
   [key: string]: any;
49 45
 }
46
+const [QuoteModal, quoteModalApi] = useVbenModal({
47
+  title: '引用试题',
48
+  showCancelBtn: false,
49
+  class: 'quote-modal',
50
+  // onConfirm:()=>{
51
+  // }
52
+});
50 53
 const radio1 = ref('0');
51 54
 const dialogVisible = ref(false);
52 55
 const selectedIcon = ref('');
@@ -61,13 +64,30 @@ const formOptions = computed(() => {
61 64
     // @ts-ignore
62 65
     schema: drawerFormSchema({
63 66
       handleTaskFrequencyChange,
67
+      quoteModalApi,
64 68
     }),
65 69
     isDisabled: isViewRef.value,
66 70
     wrapperClass: 'grid-cols-2',
67 71
     handleValuesChange: (values: any) => {
68
-      if (values.executePosition === 3) {
69
-        radio1.value = '0';
70
-        isWebmaster.value = true;
72
+      if (values.executePositions) {
73
+        const posts = values.executePositions;
74
+        let isManagement = false;
75
+        for (const item of posts) {
76
+          const info = positionsOptions.find((i: any) => i.value === item);
77
+          if (
78
+            (info && info.type === 'management') ||
79
+            info.type === 'employee'
80
+          ) {
81
+            isManagement = true;
82
+            break;
83
+          }
84
+        }
85
+        if (isManagement) {
86
+          radio1.value = '0';
87
+          isWebmaster.value = true;
88
+        } else {
89
+          isWebmaster.value = false;
90
+        }
71 91
       }
72 92
     },
73 93
   };
@@ -218,6 +238,17 @@ const [Drawer, drawerApi] = useVbenDrawer({
218 238
         return;
219 239
       }
220 240
       const formData = await formApi.getValues();
241
+      if (formData.taskFrequency !== 'yearly') {
242
+        delete formData.startTimeMonth;
243
+        delete formData.startTimeYearDay;
244
+        delete formData.endTimeMonth;
245
+        delete formData.endTimeYearDay;
246
+      } else {
247
+        delete formData.startTimeDay;
248
+        delete formData.startTimeHour;
249
+        delete formData.endTimeDay;
250
+        delete formData.endTimeHour;
251
+      }
221 252
 
222 253
       // 添加附件数据
223 254
       if (attachments.value.length > 0) {
@@ -255,7 +286,17 @@ const [Drawer, drawerApi] = useVbenDrawer({
255 286
     isViewRef.value = false;
256 287
     isCopyRef.value = false;
257 288
     attachments.value = [];
258
-    radio1.value = '';
289
+    radio1.value = '0';
290
+    if (selectAllSysStationList.value.length > 0) {
291
+      selectAllSysStationList.value.forEach((item: any) => {
292
+        item.isExecutable = true; // 是否执行
293
+        item.isLicensable = false; // 是否授权
294
+        item.taskTemplateUsers = []; // 清空任务模板用户
295
+        item.taskTemplateUsersoption = undefined; // 清空用户选项
296
+        item.value1 = []; // 清空选中的用户值
297
+      });
298
+    }
299
+    selectedIcon.value = '';
259 300
   },
260 301
 });
261 302
 
@@ -332,7 +373,7 @@ const selectIcon = (val: any, item: any) => {
332 373
       </template>
333 374
       <!-- v-if="formApi.getValues().then(res)=>res.executePosition==='0'" -->
334 375
       <template #distributionMethod="scope">
335
-        <div style="display: flex; gap: 16px;align-items: center;">
376
+        <div style="display: flex; gap: 16px; align-items: center">
336 377
           <div>
337 378
             <el-radio-group v-model="radio1">
338 379
               <el-radio value="0" size="large">场站</el-radio>
@@ -524,9 +565,13 @@ const selectIcon = (val: any, item: any) => {
524 565
       </template>
525 566
     </Form>
526 567
   </Drawer>
568
+  <QuoteModal><knowledgemain /></QuoteModal>
527 569
 </template>
528 570
 
529 571
 <style scoped>
572
+:global(.quote-modal) {
573
+  min-width: 70% !important;
574
+}
530 575
 .icon-box {
531 576
   width: 100%;
532 577
   box-sizing: border-box;