Explorar o código

fix(公告管理): 修复平台选项值错误并优化表单重置逻辑

修正平台选项中错误的考试值为系统值
调整表单重置逻辑,移除冗余的resetFields调用
tanshanming hai 6 meses
pai
achega
0add66e89b
Modificáronse 1 ficheiros con 4 adicións e 5 borrados
  1. 4 5
      src/views/notice/index.vue

+ 4 - 5
src/views/notice/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="notice-management">
 		<!-- 搜索和操作区域 -->
-		<div class="search-section mb-4">
+		<div class="mb-4 search-section">
 			<a-row :gutter="16" type="flex" justify="start">
 				<a-col>
 					<a-input
@@ -84,7 +84,7 @@
 				<a-form-item label="平台" name="platform">
 					<a-radio-group v-model:value="formData.platform">
 						<a-radio :value="1">课程</a-radio>
-						<a-radio :value="2">考试</a-radio>
+						<a-radio :value="3">系统</a-radio>
 					</a-radio-group>
 				</a-form-item>
 
@@ -157,7 +157,7 @@
 	const formData = reactive({
 		noticeId: null,
 		title: '',
-		platform: 1,
+		platform: 3,
 		content: ''
 	})
 
@@ -251,8 +251,8 @@
 	const handleAdd = () => {
 		modalTitle.value = '新增公告'
 		isEdit.value = false
-		resetForm()
 		modalVisible.value = true
+		resetForm()
 	}
 
 	// 编辑
@@ -357,7 +357,6 @@
 		formData.title = ''
 		formData.platform = 1
 		formData.content = ''
-		formRef.value?.resetFields()
 	}
 
 	// 初始化