From df984dc3a676eca343700b6750ec44dec0e45564 Mon Sep 17 00:00:00 2001 From: "YOHO\\20373" <2037305722@qq.com> Date: Wed, 21 May 2025 19:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/paper/question/BrowerForm.vue | 4 ++- src/views/paper/question/FileForm.vue | 5 ++- src/views/paper/question/MysqlForm.vue | 32 ++++++++++++++++--- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- src/views/task/exam/components/task-add.vue | 4 +-- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- .../steps/step2/components/step-edit.vue | 4 +-- .../steps/step2/components/step-look.vue | 4 +-- 18 files changed, 65 insertions(+), 36 deletions(-) diff --git a/src/views/paper/question/BrowerForm.vue b/src/views/paper/question/BrowerForm.vue index 3f7404b..12e2486 100644 --- a/src/views/paper/question/BrowerForm.vue +++ b/src/views/paper/question/BrowerForm.vue @@ -276,7 +276,9 @@ const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ - content: '', + content: `--------------------------------------------------------------------- + 请在打开的窗口中,进行下列操作,完成所有操作后,请关闭窗口。 +---------------------------------------------------------------------`, specialtyName: '', courseName: '', quBankName: '', diff --git a/src/views/paper/question/FileForm.vue b/src/views/paper/question/FileForm.vue index 3f7404b..b505bba 100644 --- a/src/views/paper/question/FileForm.vue +++ b/src/views/paper/question/FileForm.vue @@ -446,7 +446,10 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - content: '', + content: `--------------------------------------------------------------------- + 请在打开的窗口中,进行下列操作,完成所有操作后,请关闭窗口。 +---------------------------------------------------------------------`, + specialtyName: '', courseName: '', quBankName: '', diff --git a/src/views/paper/question/MysqlForm.vue b/src/views/paper/question/MysqlForm.vue index fd3004a..8a24978 100644 --- a/src/views/paper/question/MysqlForm.vue +++ b/src/views/paper/question/MysqlForm.vue @@ -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=[] + }