【修改】隐藏字段
This commit is contained in:
@@ -276,7 +276,9 @@ const dialogTitle = ref('') // 弹窗的标题
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
content: '',
|
content: `---------------------------------------------------------------------
|
||||||
|
请在打开的窗口中,进行下列操作,完成所有操作后,请关闭窗口。
|
||||||
|
---------------------------------------------------------------------`,
|
||||||
specialtyName: '',
|
specialtyName: '',
|
||||||
courseName: '',
|
courseName: '',
|
||||||
quBankName: '',
|
quBankName: '',
|
||||||
|
@@ -446,7 +446,10 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
content: '',
|
content: `---------------------------------------------------------------------
|
||||||
|
请在打开的窗口中,进行下列操作,完成所有操作后,请关闭窗口。
|
||||||
|
---------------------------------------------------------------------`,
|
||||||
|
|
||||||
specialtyName: '',
|
specialtyName: '',
|
||||||
courseName: '',
|
courseName: '',
|
||||||
quBankName: '',
|
quBankName: '',
|
||||||
|
@@ -317,8 +317,7 @@ const open = async (queryParams: any ,type: string, id?: number) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
|
||||||
|
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
if (id) {
|
if (id) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
@@ -331,6 +330,7 @@ const open = async (queryParams: any ,type: string, id?: number) => {
|
|||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
resetForm()
|
||||||
formData.value.specialtyName = queryParams.specialtyName
|
formData.value.specialtyName = queryParams.specialtyName
|
||||||
formData.value.courseName = queryParams.courseName
|
formData.value.courseName = queryParams.courseName
|
||||||
formData.value.subjectName = queryParams.subjectName
|
formData.value.subjectName = queryParams.subjectName
|
||||||
@@ -339,6 +339,7 @@ const open = async (queryParams: any ,type: string, id?: number) => {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
// 转换函数:将大写字母 A-Z 映射为 0-25
|
// 转换函数:将大写字母 A-Z 映射为 0-25
|
||||||
@@ -382,10 +383,18 @@ const submitForm = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
content: '',
|
content: `---------------------------------------------------------------------------
|
||||||
|
注意事项:
|
||||||
|
请利用图形化管理界面或者MySQL命令行工具,在指定的试题数据库中进行答题。
|
||||||
|
MySQL连接地址为localhost
|
||||||
|
MySQL登录用户名为root
|
||||||
|
MySQL端口号为6033或3306
|
||||||
|
MySQL密码为空
|
||||||
|
---------------------------------------------------------------------------`,
|
||||||
specialtyName: '',
|
specialtyName: '',
|
||||||
courseName: '',
|
courseName: '',
|
||||||
quBankName: '',
|
quBankName: '',
|
||||||
@@ -399,8 +408,23 @@ const resetForm = () => {
|
|||||||
status: '',
|
status: '',
|
||||||
resourceValue: ''
|
resourceValue: ''
|
||||||
}
|
}
|
||||||
|
documentList .value =([
|
||||||
|
{
|
||||||
|
quId: '',
|
||||||
|
url: '',
|
||||||
|
fileType: '1',
|
||||||
|
fileName: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
quId: '',
|
||||||
|
url: '',
|
||||||
|
fileType: '2',
|
||||||
|
fileName: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
])
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
documentList.value=[]
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
|
@@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
<!--
|
||||||
<div style="margin-bottom: 16px">
|
<div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
@@ -199,7 +199,7 @@ const fetchSpecialtyOptions = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 弹窗打开事件 */
|
/** 弹窗打开事件 */
|
||||||
const handleOpen = () => {
|
const open = () => {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignFields(props.data);
|
assignFields(props.data);
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
@@ -233,5 +233,5 @@ const fetchSpecialtyOptions = async () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchSpecialtyOptions();
|
fetchSpecialtyOptions();
|
||||||
});
|
});
|
||||||
defineExpose({ handleOpen })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
<!-- 分组展示题目 -->
|
<!-- 分组展示题目 -->
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
<!-- 分组展示题目 -->
|
<!-- 分组展示题目 -->
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'修改试卷'" width="460" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>{{ paperId }}
|
<strong>试卷ID:</strong>{{ paperId }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<div style="max-height: 400px; overflow-y: auto;">
|
<div style="max-height: 400px; overflow-y: auto;">
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
<Dialog v-model="visible" :title="'查看试卷'" width="860" @open="handleOpen" center>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 16px">
|
<!-- <div style="margin-bottom: 16px">
|
||||||
<strong>试卷ID:</strong>
|
<strong>试卷ID:</strong>
|
||||||
{{ paperId ? paperId : '未提供试卷ID' }}
|
{{ paperId ? paperId : '未提供试卷ID' }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
|
Reference in New Issue
Block a user