【修改】隐藏字段

This commit is contained in:
YOHO\20373
2025-05-21 19:12:02 +08:00
parent 9ee266817a
commit c478114722
18 changed files with 65 additions and 36 deletions

View File

@@ -317,8 +317,7 @@ const open = async (queryParams: any ,type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
if (id) {
formLoading.value = true
@@ -331,6 +330,7 @@ const open = async (queryParams: any ,type: string, id?: number) => {
formLoading.value = false
}
} else {
resetForm()
formData.value.specialtyName = queryParams.specialtyName
formData.value.courseName = queryParams.courseName
formData.value.subjectName = queryParams.subjectName
@@ -339,6 +339,7 @@ const open = async (queryParams: any ,type: string, id?: number) => {
}
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
// 转换函数:将大写字母 A-Z 映射为 0-25
@@ -382,10 +383,18 @@ const submitForm = async () => {
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
content: '',
content: `---------------------------------------------------------------------------
注意事项:
请利用图形化管理界面或者MySQL命令行工具在指定的试题数据库中进行答题。
MySQL连接地址为localhost
MySQL登录用户名为root
MySQL端口号为6033或3306
MySQL密码为空
---------------------------------------------------------------------------`,
specialtyName: '',
courseName: '',
quBankName: '',
@@ -399,8 +408,23 @@ const resetForm = () => {
status: '',
resourceValue: ''
}
documentList .value =([
{
quId: '',
url: '',
fileType: '1',
fileName: ''
},
{
quId: '',
url: '',
fileType: '2',
fileName: ''
}
])
formRef.value?.resetFields()
documentList.value=[]
}
</script>
<style lang="scss" scoped>