闪电 3 gün önce
ebeveyn
işleme
3c51cd04f0

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

@@ -247,7 +247,6 @@ async function loadAllUsers() {
247 247
     const res: any = await getList(params);
248 248
     allUserList.value = res || [];
249 249
     console.log('加载用户列表成功:', res);
250
-    
251 250
   } catch (error_) {
252 251
     error.value = '加载用户列表失败';
253 252
     console.error('加载用户列表失败:', error_);
@@ -497,7 +496,7 @@ function handleStationChange() {
497 496
         selectedItems.value.push({
498 497
           id: stationId,
499 498
           key: `${stationId}-station`,
500
-          name: station.stationName,
499
+          name: station.areaName,
501 500
           type: 'station',
502 501
         });
503 502
       }
@@ -731,7 +730,7 @@ defineExpose({
731 730
               :label="station.id"
732 731
               class="checkbox-item"
733 732
             >
734
-              {{ station.stationName }}
733
+              {{ station.areaName }}
735 734
             </ElCheckbox>
736 735
           </ElCheckboxGroup>
737 736
         </div>

+ 2 - 2
apps/web-ele/src/components/tinymce/src/tinymce.ts

@@ -8,10 +8,10 @@
8 8
 //   'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap emoticons accordion';
9 9
 
10 10
 export const plugins =
11
-  'preview importcss searchreplace autolink autosave save directionality visualblocks visualchars fullscreen image link charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap emoticons accordion';
11
+  'preview importcss searchreplace autolink autosave save directionality visualblocks visualchars fullscreen image link table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap emoticons accordion';
12 12
 
13 13
 // export const toolbar =
14 14
 //   'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl';
15 15
 
16 16
 export const toolbar =
17
-  'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | fullscreen preview';
17
+  'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | fullscreen preview';

+ 11 - 8
apps/web-ele/src/views/knowledge/detail/index.vue

@@ -36,6 +36,7 @@ import {
36 36
   ElUpload,
37 37
 } from 'element-plus';
38 38
 
39
+import { queryKnowledgeCategoryDetail } from '#/api/knowledge/category';
39 40
 import { addComment, querycomment } from '#/api/knowledge/comment';
40 41
 import {
41 42
   addKnowledgeContent,
@@ -44,7 +45,6 @@ import {
44 45
   getKnowledgeContentDetail,
45 46
   queryKnowledgeContentlist,
46 47
 } from '#/api/knowledge/content';
47
-import { queryKnowledgeCategoryDetail } from '#/api/knowledge/category';
48 48
 import {
49 49
   addrecord,
50 50
   queryPublishRecordlist,
@@ -616,7 +616,11 @@ const nonImageList = computed(() => {
616 616
                     fontSize: '30px',
617 617
                   }"
618 618
                 ></span>
619
-                <img v-else :src="KnowledgeDetails?.iconUrl?.[0] || ''" alt="" />
619
+                <img
620
+                  v-else
621
+                  :src="KnowledgeDetails?.iconUrl?.[0] || ''"
622
+                  alt=""
623
+                />
620 624
               </div>
621 625
               <div class="knowledge-title">{{ KnowledgeDetails?.name }}</div>
622 626
             </div>
@@ -636,7 +640,6 @@ const nonImageList = computed(() => {
636 640
                 :data="chapterData"
637 641
                 node-key="id"
638 642
                 :props="{ label: 'title', children: 'children' }"
639
-                default-expand-all
640 643
                 :expand-on-click-node="false"
641 644
                 :current-node-key="chapterData[0]?.id"
642 645
                 highlight-current
@@ -802,9 +805,9 @@ const nonImageList = computed(() => {
802 805
                   1 明确指出问题;<br />
803 806
                   2 分点详细简述;<br />
804 807
                   3 最好配图;<br />
805
-                  4 提出可行性建议;</template
806
-                >
807
-                <el-icon><Warning /></el-icon>
808
+                  4 提出可行性建议;
809
+                </template>
810
+                <ElIcon><Warning /></ElIcon>
808 811
               </el-tooltip>
809 812
             </div>
810 813
 
@@ -1206,7 +1209,7 @@ const nonImageList = computed(() => {
1206 1209
 /* 左侧边栏 */
1207 1210
 .left-sidebar {
1208 1211
   position: relative;
1209
-  width: 250px;
1212
+  width: 300px;
1210 1213
   overflow: hidden;
1211 1214
   background-color: #fff;
1212 1215
   border-radius: 8px;
@@ -1354,7 +1357,7 @@ const nonImageList = computed(() => {
1354 1357
 
1355 1358
 .chapter-label {
1356 1359
   display: inline-block;
1357
-  max-width: 80px;
1360
+  // max-width: 80px;
1358 1361
   overflow: hidden;
1359 1362
   text-overflow: ellipsis;
1360 1363
   white-space: nowrap;

+ 16 - 29
apps/web-ele/src/views/knowledge/edit/index.vue

@@ -1,30 +1,16 @@
1 1
 <script lang="ts" setup>
2
-import { ref, onMounted } from 'vue';
2
+import { onMounted, ref } from 'vue';
3 3
 import { useRoute } from 'vue-router';
4
+
4 5
 import { Page } from '@vben/common-ui';
6
+
7
+import { DArrowLeft, Expand, HomeFilled, Plus } from '@element-plus/icons-vue';
8
+import { ElButton, ElIcon, ElInput, ElTree, ElUpload } from 'element-plus';
9
+
5 10
 import {
6
-  HomeFilled,
7
-  Plus,
8
-  Edit,
9
-  Delete,
10
-  DArrowLeft,
11
-  Expand,
12
-  Notification,
13
-} from '@element-plus/icons-vue';
14
-import {
15
-  ElButton,
16
-  ElIcon,
17
-  ElTree,
18
-  ElMessage,
19
-  ElInput,
20
-  ElUpload,
21
-} from 'element-plus';
22
-import {
23
-  queryKnowledgeContentlist,
24
-  addKnowledgeContent,
25 11
   editKnowledgeContent,
26
-  deleteKnowledgeContent,
27 12
   getKnowledgeContentDetail,
13
+  queryKnowledgeContentlist,
28 14
 } from '#/api/knowledge/content';
29 15
 import TinymceEditor from '#/components/tinymce/src/editor.vue';
30 16
 import { getFileUploadConfig } from '#/components/upload/config';
@@ -89,8 +75,8 @@ const saveDraft = () => {
89 75
 
90 76
 // 发布
91 77
 const publish = () => {
92
-  console.log('发布的附件',attachments.value[selectedChapter.value.id]);
93
-  
78
+  console.log('发布的附件', attachments.value[selectedChapter.value.id]);
79
+
94 80
   centerloading.value = true;
95 81
   editKnowledgeContent({
96 82
     categoryId: selectedChapter.value?.categoryId,
@@ -174,7 +160,7 @@ const handleChapterClick = async (node: any) => {
174 160
                 },
175 161
               },
176 162
               status: 'success',
177
-              uid: index + Math.random().toString(36).substring(2),
163
+              uid: index + Math.random().toString(36).slice(2),
178 164
               raw: item,
179 165
             };
180 166
           });
@@ -250,7 +236,7 @@ const handleHomeClick = () => {
250 236
               <div class="knowledge-icon">
251 237
                 <ElIcon class="icon-large"><HomeFilled /></ElIcon>
252 238
               </div>
253
-              <div class="knowledge-title">知识库示例</div>
239
+              <!-- <div class="knowledge-title">知识库示例</div> -->
254 240
             </div>
255 241
 
256 242
             <!-- 主页按钮 -->
@@ -322,8 +308,9 @@ const handleHomeClick = () => {
322 308
             :size="20"
323 309
             class="collapse-control-btn"
324 310
             @click="isCollapse = false"
325
-            ><Expand
326
-          /></ElIcon>
311
+          >
312
+            <Expand />
313
+          </ElIcon>
327 314
           <!-- 内容表单 -->
328 315
           <div class="content-form">
329 316
             <!-- 第一行:标题 -->
@@ -451,7 +438,7 @@ const handleHomeClick = () => {
451 438
 /* 左侧边栏 */
452 439
 .left-sidebar {
453 440
   position: relative;
454
-  width: 250px;
441
+  width: 300px;
455 442
   overflow: hidden;
456 443
   background-color: #fff;
457 444
   border-radius: 8px;
@@ -578,7 +565,7 @@ const handleHomeClick = () => {
578 565
 }
579 566
 .chapter-label {
580 567
   display: inline-block;
581
-  max-width: 80px;
568
+  // max-width: 80px;
582 569
   overflow: hidden;
583 570
   text-overflow: ellipsis;
584 571
   white-space: nowrap;

+ 33 - 15
apps/web-ele/src/views/schedule/allot/index.vue

@@ -1,15 +1,23 @@
1 1
 <script setup lang="ts">
2
-import { Page } from '@vben/common-ui';
3
-import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
4
-import { onMounted, ref, watch } from 'vue';
5
-import { generateColumns, querySchema } from './config-data';
6
-import { queryGasStationList } from '#/api/schedule/index';
7
-//@ts-ignore
2
+// @ts-ignore
8 3
 import type { VbenFormProps } from '@vben/common-ui';
4
+
5
+import type { VxeGridProps } from '#/adapter/vxe-table';
6
+
7
+import { onMounted } from 'vue';
8
+
9
+import { Page } from '@vben/common-ui';
10
+
11
+import dayjs from 'dayjs';
12
+
13
+import { useVbenVxeGrid } from '#/adapter/vxe-table';
9 14
 import {
10 15
   queryrallotApilist,
11 16
   saveeditApilist,
12 17
 } from '#/api/schedule/allot/index';
18
+
19
+import { generateColumns, querySchema } from './config-data';
20
+
13 21
 const formOptions: VbenFormProps = {
14 22
   commonConfig: {
15 23
     labelWidth: 80,
@@ -116,7 +124,7 @@ if (BasicTableApi) {
116 124
   // 自定义重置逻辑:重置表单后把月份设为当前月份(避免清空日期选择器),然后触发查询
117 125
   BasicTableApi.setState((prev) => ({
118 126
     formOptions: {
119
-      ...(prev.formOptions || {}),
127
+      ...prev.formOptions,
120 128
       handleReset: async () => {
121 129
         try {
122 130
           // 先执行默认的重置行为
@@ -128,7 +136,7 @@ if (BasicTableApi) {
128 136
             // 触发 reload,触发时会走我们包装后的 reload,从而更新列
129 137
             await BasicTableApi.reload(vals);
130 138
           }
131
-        } catch (err) {
139
+        } catch {
132 140
           // 忽略错误,防止阻塞 UI
133 141
           // console.error(err);
134 142
         }
@@ -169,6 +177,14 @@ const handleSave = async (row: any) => {
169 177
   row.isEditing = false;
170 178
 };
171 179
 
180
+const disabledStatus = (day: string) => {
181
+  day = day.replace('day', '');
182
+  const inputDate = new Date(
183
+    `${currentMonth}-${Number(day) > 9 ? day : `0${day}`}`,
184
+  );
185
+  return inputDate < new Date(dayjs().format('YYYY-MM-DD'));
186
+};
187
+
172 188
 // 在页面加载时设置默认月份
173 189
 onMounted(() => {
174 190
   // 添加安全检查,确保BasicTableApi.formApi可用
@@ -210,21 +226,23 @@ onMounted(() => {
210 226
           type="primary"
211 227
           plain
212 228
           @click="() => (row.isEditing = true)"
213
-          >编辑</el-button
214 229
         >
230
+          编辑
231
+        </el-button>
215 232
         <template v-else>
216
-          <el-button size="small" type="primary" @click="handleSave(row)"
217
-            >保存</el-button
218
-          >
219
-          <el-button size="small" plain @click="() => (row.isEditing = false)"
220
-            >取消</el-button
221
-          >
233
+          <el-button size="small" type="primary" @click="handleSave(row)">
234
+            保存
235
+          </el-button>
236
+          <el-button size="small" plain @click="() => (row.isEditing = false)">
237
+            取消
238
+          </el-button>
222 239
         </template>
223 240
       </template>
224 241
       <template #Select="{ row, column }">
225 242
         <el-select
226 243
           v-model="row[column.field]"
227 244
           v-if="row.isEditing"
245
+          :disabled="disabledStatus(column.field)"
228 246
           placeholder="请选择"
229 247
         >
230 248
           <el-option

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

@@ -3,8 +3,10 @@ import { h } from 'vue';
3 3
 // import { useUserStore } from '@vben/stores';
4 4
 import { getPopupContainer } from '@vben/utils';
5 5
 
6
-import { queryExecutorList,queryStationListByExecutor } from '#/api/schedule/index';
7
-import { selectAllSysStation } from '#/api/system/infoEntry/stationInfo/stationInfo';
6
+import {
7
+  queryExecutorList,
8
+  queryStationListByExecutor,
9
+} from '#/api/schedule/index';
8 10
 import { getPostList } from '#/api/system/post/post';
9 11
 import { querybaseApilist } from '#/api/system/tasksettings/tasktemplate';
10 12
 import { getFileUploadConfig } from '#/components/upload/config';
@@ -44,7 +46,7 @@ const getUserListfn = async () => {
44 46
   console.log('获取执行人列表', res);
45 47
 
46 48
   getUserListOptions = res.map((item: any, index: number) => ({
47
-    label: `${item.userName}-${item.postName}${item.stationName ? `-` + item.stationName : ''}`,
49
+    label: `${item.userName}-${item.postName}${item.stationName ? `-${item.stationName}` : ''}`,
48 50
     value: index.toString(),
49 51
     data: item,
50 52
   }));
@@ -107,7 +109,11 @@ export const drawerFormSchema: any = (type: any) => [
107 109
     },
108 110
     componentProps: (data: any, formApi: any) => {
109 111
       const executePosition = data.executePosition;
110
-      const options = executePosition ? getUserListOptions.filter((item:any) => item.data.postId === executePosition): [];
112
+      const options = executePosition
113
+        ? getUserListOptions.filter(
114
+            (item: any) => item.data.postId === executePosition,
115
+          )
116
+        : [];
111 117
       return {
112 118
         placeholder: '请选择执行人',
113 119
         clearable: true,
@@ -145,7 +151,7 @@ export const drawerFormSchema: any = (type: any) => [
145 151
             return [];
146 152
           }
147 153
           const data = await queryStationListByExecutor({
148
-             userIds: userIds.join(','),
154
+            userIds: userIds.join(','),
149 155
           });
150 156
           return data;
151 157
         },
@@ -232,7 +238,9 @@ export const drawerFormSchema: any = (type: any) => [
232 238
         valueField: 'id',
233 239
         onChange: (value: any) => {
234 240
           if (value) {
235
-            const selectedTemplate = templateList.find((item: any) => item.id === value);
241
+            const selectedTemplate = templateList.find(
242
+              (item: any) => item.id === value,
243
+            );
236 244
             if (selectedTemplate) {
237 245
               formApi.setFieldValue('taskName', selectedTemplate.taskName);
238 246
             }
@@ -347,7 +355,7 @@ export const drawerFormSchema: any = (type: any) => [
347 355
     component: 'ApiSelect',
348 356
     fieldName: 'ccReceiversName',
349 357
     label: '抄送人',
350
-    rules: 'required',
358
+    // rules: 'required',
351 359
     componentProps: (data: any, formApi: any) => {
352 360
       return {
353 361
         placeholder: '请选择抄送人',

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

@@ -127,19 +127,19 @@ const todaylist = computed(() => {
127 127
               mainbackcolor: '',
128 128
             },
129 129
           };
130
-          if (item.status === 0) {
130
+          if (item.status === 0 || item.status === -1) {
131 131
             remainingTime.dayobj.day += `还剩${days}天截止`;
132 132
             remainingTime.dayobj.topbackcolor = '#86909C';
133 133
             remainingTime.dayobj.mainbackcolor = '#F1F1F1';
134 134
           } else if (days > 0) {
135 135
             remainingTime.dayobj.day += `还剩${days}天截止`;
136
-            if (days >= 30) {
137
-              remainingTime.dayobj.topbackcolor = '#86909C';
138
-              remainingTime.dayobj.mainbackcolor = '#F1F1F1';
139
-            } else {
140
-              remainingTime.dayobj.topbackcolor = '#215ACD';
141
-              remainingTime.dayobj.mainbackcolor = '#E4EDFF';
142
-            }
136
+            // if (days >= 30) {
137
+            //   remainingTime.dayobj.topbackcolor = '#86909C';
138
+            //   remainingTime.dayobj.mainbackcolor = '#F1F1F1';
139
+            // } else {
140
+            remainingTime.dayobj.topbackcolor = '#215ACD';
141
+            remainingTime.dayobj.mainbackcolor = '#E4EDFF';
142
+            // }
143 143
           } else if (hours > 0) {
144 144
             remainingTime.hours.hour += `还剩${hours}小时截止`;
145 145
             remainingTime.hours.topbackcolor = '#FF9428';

+ 8 - 3
apps/web-ele/src/views/system/role/index.vue

@@ -161,7 +161,12 @@ const [VbenPermDrawer, permDrawerApi] = useVbenDrawer({
161 161
 });
162 162
 // 数据权限配置侧拉
163 163
 function openDataScopeDrawer(role: Role) {
164
-  permDrawerApi.setData(role).open();
164
+  permDrawerApi
165
+    .setData({
166
+      ...role,
167
+      isUpdate: true,
168
+    })
169
+    .open();
165 170
 }
166 171
 const router = useRouter();
167 172
 function jumpRoute(role: Role) {
@@ -249,9 +254,9 @@ const { hasAccessByCodes } = useAccess();
249 254
             </ElButton>
250 255
             <template #dropdown>
251 256
               <ElDropdownMenu>
252
-                <ElDropdownItem @click="openDataScopeDrawer(row)">
257
+                <!-- <ElDropdownItem @click="openDataScopeDrawer(row)">
253 258
                   数据权限
254
-                </ElDropdownItem>
259
+                </ElDropdownItem> -->
255 260
                 <ElDropdownItem @click="jumpRoute(row)">
256 261
                   分配用户
257 262
                 </ElDropdownItem>

+ 27 - 23
apps/web-ele/src/views/system/role/perm-drawer.vue

@@ -1,8 +1,10 @@
1 1
 <script lang="ts" setup>
2 2
 import type { DeptResp, DeptTree, Role } from '#/api/system/role/model';
3 3
 
4
+// @ts-ignore
4 5
 import { defineEmits, ref } from 'vue';
5 6
 
7
+// @ts-ignore
6 8
 import { useVbenDrawer, useVbenForm } from '@vben/common-ui';
7 9
 
8 10
 import { ElTree } from 'element-plus';
@@ -46,35 +48,37 @@ const [Drawer, drawerApi] = useVbenDrawer({
46 48
         // 设置属性节点选中回显
47 49
         treeRef.value!.setCheckedKeys(deptRef.value.checkedKeys, false);
48 50
       }
49
-      const { valid } = await formApi.validate();
50
-      if (!valid) {
51
-        return;
52
-      }
53
-      const data = await formApi.getValues<Role>();
54
-      // 是否是否关联
55
-      data.deptCheckStrictly = roleRef.value.deptCheckStrictly;
56
-      if (data.dataScope === '2') {
57
-        // 获取全选节点
58
-        const checkedKeys = treeRef.value!.getCheckedKeys(false);
59
-        // 获取半选节点
60
-        const halfCheckKeys = treeRef.value!.getHalfCheckedKeys();
61
-        // 组装
62
-        checkedKeys.unshift(...halfCheckKeys);
63
-        data.deptIds = checkedKeys;
64
-      } else {
65
-        data.deptIds = [];
66
-      }
67
-      // 调用数据权限更新接口
68
-      await updateRolePerms(data);
69
-      // 发射刷新列表
70
-      emit('reload');
71
-      drawerApi.close();
72 51
     } catch (error) {
73 52
       console.error(error);
74 53
     } finally {
75 54
       drawerApi.drawerLoading(false);
76 55
     }
77 56
   },
57
+  async onConfirm() {
58
+    const { valid } = await formApi.validate();
59
+    if (!valid) {
60
+      return;
61
+    }
62
+    const data = await formApi.getValues<Role>();
63
+    // 是否是否关联
64
+    data.deptCheckStrictly = roleRef.value.deptCheckStrictly;
65
+    if (data.dataScope === '2') {
66
+      // 获取全选节点
67
+      const checkedKeys = treeRef.value!.getCheckedKeys(false);
68
+      // 获取半选节点
69
+      const halfCheckKeys = treeRef.value!.getHalfCheckedKeys();
70
+      // 组装
71
+      checkedKeys.unshift(...halfCheckKeys);
72
+      data.deptIds = checkedKeys;
73
+    } else {
74
+      data.deptIds = [];
75
+    }
76
+    // 调用数据权限更新接口
77
+    await updateRolePerms(data);
78
+    // 发射刷新列表
79
+    emit('reload');
80
+    drawerApi.close();
81
+  },
78 82
 });
79 83
 // 展开/收起
80 84
 const treeRef = ref<InstanceType<typeof ElTree>>();

+ 91 - 81
apps/web-ele/src/views/system/taskDesign/taskTemplate/taskTemplate-data.tsx

@@ -1,10 +1,8 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3
-import { ElButton } from 'element-plus';
4
-import { getPopupContainer } from '@vben/utils';
3
+
5 4
 // @ts-ignore
6
-import { useVbenModal } from '@vben/common-ui';
7
-import { ElMessage } from 'element-plus';
5
+import { ElButton, ElMessage } from 'element-plus';
8 6
 
9 7
 // import type { SelectProps } from '#/adapter/form';
10 8
 import { getPostList } from '#/api/system/post/post';
@@ -199,7 +197,9 @@ export const queryFormSchema: FormSchemaGetter = () => [
199 197
       return {
200 198
         allowClear: true,
201 199
         placeholder: '请选择表单类型',
202
-        options: getFormTypeOptions()?.filter((item: any) => item?.value !== 'form'),
200
+        options: getFormTypeOptions()?.filter(
201
+          (item: any) => item?.value !== 'form',
202
+        ),
203 203
         clearable: true,
204 204
       };
205 205
     },
@@ -452,7 +452,9 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
452 452
     componentProps: (data: any) => {
453 453
       return {
454 454
         placeholder: '请选择表单类型',
455
-        options: getFormTypeOptions().filter((item: any) => item.value !== 'form'),
455
+        options: getFormTypeOptions().filter(
456
+          (item: any) => item.value !== 'form',
457
+        ),
456 458
         clearable: true,
457 459
         disabled: data.isUpdate,
458 460
       };
@@ -606,17 +608,17 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
606 608
         clearable: true,
607 609
         onChange: (value: any) => {
608 610
           // 重置时间相关字段
609
-          if (value !== 'yearly') {
610
-            formApi.setFieldValue('startTimeDay', '1');
611
-            formApi.setFieldValue('startTimeHour', '0');
612
-            formApi.setFieldValue('endTimeDay', '1');
613
-            formApi.setFieldValue('endTimeHour', '23');
614
-          } else {
615
-            formApi.setFieldValue('startTimeMonth', '1');
616
-            formApi.setFieldValue('startTimeYearDay', '1');
617
-            formApi.setFieldValue('endTimeMonth', '1');
618
-            formApi.setFieldValue('endTimeYearDay', '1');
619
-          }
611
+          // if (value === 'yearly') {
612
+          //   formApi.setFieldValue('startTimeMonth', '1');
613
+          //   formApi.setFieldValue('startTimeYearDay', '1');
614
+          //   formApi.setFieldValue('endTimeMonth', '1');
615
+          //   formApi.setFieldValue('endTimeYearDay', '1');
616
+          // } else {
617
+          formApi.setFieldValue('startTimeDay', '1');
618
+          formApi.setFieldValue('startTimeHour', '0');
619
+          formApi.setFieldValue('endTimeDay', '1');
620
+          formApi.setFieldValue('endTimeHour', '23');
621
+          // }
620 622
           // 重置其他字段
621 623
           formApi.setFieldValue('planTime', 1);
622 624
           formApi.setFieldValue('invalidDays', 0);
@@ -659,7 +661,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
659 661
       show: (values: any) => values.taskFrequency !== 'yearly',
660 662
       componentProps(values: any, formApi: any) {
661 663
         let options = [];
662
-        let defaultValue = '1';
664
+        const defaultValue = '1';
663 665
 
664 666
         if (values.taskFrequency === 'daily') {
665 667
           options = [
@@ -762,60 +764,68 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
762 764
           Array.isArray(values.isCycleEnd) &&
763 765
           values.isCycleEnd[0] === true),
764 766
       componentProps(values: any) {
765
-        const startDay = parseInt(values.startTimeDay) || 1;
767
+        const startDay = Number.parseInt(values.startTimeDay) || 1;
766 768
 
767
-        if (values.taskFrequency === 'daily') {
768
-          return {
769
-            options: [
770
-              { label: '1', value: '1' },
771
-              { label: '2', value: '2' },
772
-            ],
773
-            defaultValue: '1',
774
-          };
775
-        } else if (values.taskFrequency === 'weekly') {
776
-          return {
777
-            options: Array.from({ length: 7 - startDay + 1 }, (_, i) => ({
778
-              label: (startDay + i).toString(),
779
-              value: startDay + i,
780
-            })),
781
-            defaultValue: startDay.toString(),
782
-          };
783
-        } else if (values.taskFrequency === 'monthly') {
784
-          const count = 30 - startDay + 1;
785
-          return {
786
-            options: Array.from({ length: count }, (_, i) => ({
787
-              label: (startDay + i).toString(),
788
-              value: startDay + i,
789
-            })),
790
-            defaultValue: startDay.toString(),
791
-          };
792
-        } else if (values.taskFrequency === 'every_two_months') {
793
-          const count = 60 - startDay + 1;
794
-          return {
795
-            options: Array.from({ length: count }, (_, i) => ({
796
-              label: (startDay + i).toString(),
797
-              value: startDay + i,
798
-            })),
799
-            defaultValue: startDay.toString(),
800
-          };
801
-        } else if (values.taskFrequency === 'every_three_months') {
802
-          const count = 90 - startDay + 1;
803
-          return {
804
-            options: Array.from({ length: count }, (_, i) => ({
805
-              label: (startDay + i).toString(),
806
-              value: startDay + i,
807
-            })),
808
-            defaultValue: startDay.toString(),
809
-          };
810
-        } else if (values.taskFrequency === 'every_six_months') {
811
-          const count = 180 - startDay + 1;
812
-          return {
813
-            options: Array.from({ length: count }, (_, i) => ({
814
-              label: (startDay + i).toString(),
815
-              value: startDay + i,
816
-            })),
817
-            defaultValue: startDay.toString(),
818
-          };
769
+        switch (values.taskFrequency) {
770
+          case 'daily': {
771
+            return {
772
+              options: [
773
+                { label: '1', value: '1' },
774
+                { label: '2', value: '2' },
775
+              ],
776
+              defaultValue: '1',
777
+            };
778
+          }
779
+          case 'every_six_months': {
780
+            const count = 180 - startDay + 1;
781
+            return {
782
+              options: Array.from({ length: count }, (_, i) => ({
783
+                label: (startDay + i).toString(),
784
+                value: startDay + i,
785
+              })),
786
+              defaultValue: startDay.toString(),
787
+            };
788
+          }
789
+          case 'every_three_months': {
790
+            const count = 90 - startDay + 1;
791
+            return {
792
+              options: Array.from({ length: count }, (_, i) => ({
793
+                label: (startDay + i).toString(),
794
+                value: startDay + i,
795
+              })),
796
+              defaultValue: startDay.toString(),
797
+            };
798
+          }
799
+          case 'every_two_months': {
800
+            const count = 60 - startDay + 1;
801
+            return {
802
+              options: Array.from({ length: count }, (_, i) => ({
803
+                label: (startDay + i).toString(),
804
+                value: startDay + i,
805
+              })),
806
+              defaultValue: startDay.toString(),
807
+            };
808
+          }
809
+          case 'monthly': {
810
+            const count = 30 - startDay + 1;
811
+            return {
812
+              options: Array.from({ length: count }, (_, i) => ({
813
+                label: (startDay + i).toString(),
814
+                value: startDay + i,
815
+              })),
816
+              defaultValue: startDay.toString(),
817
+            };
818
+          }
819
+          case 'weekly': {
820
+            return {
821
+              options: Array.from({ length: 7 - startDay + 1 }, (_, i) => ({
822
+                label: (startDay + i).toString(),
823
+                value: startDay + i,
824
+              })),
825
+              defaultValue: startDay.toString(),
826
+            };
827
+          }
828
+          // No default
819 829
         }
820 830
         return {
821 831
           defaultValue: '1',
@@ -939,8 +949,8 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
939 949
           Array.isArray(values.isCycleEnd) &&
940 950
           values.isCycleEnd[0] === true),
941 951
       componentProps(values: any) {
942
-        const startMonth = parseInt(values.startTimeMonth) || 1;
943
-        const startDay = parseInt(values.startTimeYearDay) || 1;
952
+        const startMonth = Number.parseInt(values.startTimeMonth) || 1;
953
+        const startDay = Number.parseInt(values.startTimeYearDay) || 1;
944 954
 
945 955
         return {
946 956
           options: Array.from({ length: 12 - startMonth + 1 }, (_, i) => ({
@@ -982,8 +992,8 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
982 992
           Array.isArray(values.isCycleEnd) &&
983 993
           values.isCycleEnd[0] === true),
984 994
       componentProps(values: any) {
985
-        const startDay = parseInt(values.startTimeYearDay) || 1;
986
-        const month = parseInt(values.endTimeMonth) || 1;
995
+        const startDay = Number.parseInt(values.startTimeYearDay) || 1;
996
+        const month = Number.parseInt(values.endTimeMonth) || 1;
987 997
 
988 998
         // 计算每个月的天数
989 999
         let daysInMonth = 31;
@@ -1020,7 +1030,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1020 1030
     },
1021 1031
     // rules: 'required',
1022 1032
   },
1023
-  //是否周期末0否1是
1033
+  // 是否周期末0否1是
1024 1034
   {
1025 1035
     component: 'CheckboxGroup',
1026 1036
     fieldName: 'isCycleEnd',
@@ -1054,8 +1064,8 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1054 1064
       disabled: (values: any) =>
1055 1065
         values.taskFrequency === 'daily' || values.taskFrequency === 'yearly',
1056 1066
       componentProps(values: any) {
1057
-        let min = parseInt(values.startTimeDay) || 1;
1058
-        let max = parseInt(values.endTimeDay) || 365;
1067
+        const min = Number.parseInt(values.startTimeDay) || 1;
1068
+        const max = Number.parseInt(values.endTimeDay) || 365;
1059 1069
 
1060 1070
         return {
1061 1071
           min,
@@ -1171,8 +1181,8 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1171 1181
     slot: 'description',
1172 1182
     formItemClass: 'col-span-2 items-baseline',
1173 1183
   },
1174
-  //知识库
1175
-    {
1184
+  // 知识库
1185
+  {
1176 1186
     component: 'Input',
1177 1187
     dependencies: {
1178 1188
       show: () => false,
@@ -1181,7 +1191,7 @@ export const drawerFormSchema: FormSchemaGetter = (props?: any) => [
1181 1191
     fieldName: 'knowledge',
1182 1192
     formItemClass: 'col-span-2 items-baseline',
1183 1193
   },
1184
-  //知识库类别
1194
+  // 知识库类别
1185 1195
   {
1186 1196
     component: 'Input',
1187 1197
     dependencies: {