【修改】 邮箱出题页面,删除文件上传模块
This commit is contained in:
@@ -205,13 +205,12 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane name="annex">
|
||||
<!-- <el-tab-pane name="annex">
|
||||
<template #label>
|
||||
<div class="custom-tabs-label">
|
||||
<p>试题附件</p>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 提示 -->
|
||||
<el-alert type="warning" show-icon :closable="false">
|
||||
<template #default>
|
||||
<span>提示:文件名称可默认不设置</span>
|
||||
@@ -273,7 +272,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
@@ -285,8 +284,6 @@
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<FileForm ref="FileRef" @success="handleUploadSuccess" />
|
||||
<el-dialog
|
||||
v-model="dialogFormVisibleWordInfo"
|
||||
title="邮件设置"
|
||||
@@ -391,26 +388,6 @@ function fileTypeFormatter(row, column, cellValue) {
|
||||
if (cellValue === '2') return '结果文件'
|
||||
return '未知类型'
|
||||
}
|
||||
const documentList = ref([
|
||||
{
|
||||
quId: '',
|
||||
url: '',
|
||||
fileType: '0',
|
||||
fileName: ''
|
||||
},
|
||||
{
|
||||
quId: '',
|
||||
url: '',
|
||||
fileType: '1',
|
||||
fileName: ''
|
||||
},
|
||||
{
|
||||
quId: '',
|
||||
url: '',
|
||||
fileType: '2',
|
||||
fileName: ''
|
||||
}
|
||||
])
|
||||
const dialogFormVisibleWordInfo = ref(false)
|
||||
|
||||
const addEmailInfo = async () => {
|
||||
@@ -492,24 +469,6 @@ const deleteUrl = (index: number) => {
|
||||
formData.value.fileUploads[index].url = ''
|
||||
formData.value.fileUploads[index].fileName = ''
|
||||
}
|
||||
// 媒体文件
|
||||
const mediumList = ref([] as any)
|
||||
const multipleMediumSelection = ref([] as any)
|
||||
const handleMediumSelectionChange = (val: any) => {
|
||||
multipleMediumSelection.value = val
|
||||
}
|
||||
const fileList = []
|
||||
|
||||
const multipleDocumentSelection = ref([] as any)
|
||||
const handleDocumentSelectionChange = (val: any) => {
|
||||
multipleDocumentSelection.value = val
|
||||
}
|
||||
const handleUploadSuccess = ({ url, fileType }) => {
|
||||
const index = documentList.value.findIndex((item) => item.fileType === fileType)
|
||||
if (index !== -1) {
|
||||
documentList.value[index].url = url
|
||||
}
|
||||
}
|
||||
/** 打开弹窗 */
|
||||
const open = async (queryParams: any, type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
@@ -524,7 +483,6 @@ const open = async (queryParams: any, type: string, id?: number) => {
|
||||
formData.value = res
|
||||
console.log(formData.value)
|
||||
list.value = formData.value.answerList
|
||||
documentList.value = res.fileUploads
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@@ -560,7 +518,6 @@ const submitForm = async () => {
|
||||
item.scoreRate = '1' // 设置默认权值为1
|
||||
}
|
||||
})
|
||||
formData.value.fileUploads = documentList.value
|
||||
const values = Object.values(formData)
|
||||
console.log(values)
|
||||
// 校验表单
|
||||
@@ -630,26 +587,6 @@ const resetForm = () => {
|
||||
}
|
||||
]
|
||||
}
|
||||
documentList.value = [
|
||||
{
|
||||
quId: '',
|
||||
url: '',
|
||||
fileType: '0',
|
||||
fileName: ''
|
||||
},
|
||||
{
|
||||
quId: '',
|
||||
url: '',
|
||||
fileType: '1',
|
||||
fileName: ''
|
||||
},
|
||||
{
|
||||
quId: '',
|
||||
url: '',
|
||||
fileType: '2',
|
||||
fileName: ''
|
||||
}
|
||||
]
|
||||
list.value = []
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
Reference in New Issue
Block a user