【修改】试卷任务共享,知识点全选,操作题试题考点的移动,考点设置的题干位置,监控管理更新时间,清除缓存去掉提示

This commit is contained in:
huababa1
2025-10-16 19:15:32 +08:00
parent 6d6fb0b04a
commit 450d458d08
46 changed files with 1064 additions and 163 deletions

View File

@@ -280,9 +280,19 @@
<!-- 表单弹窗添加/修改 -->
<FileForm ref="FileRef" @success="handleUploadSuccess" />
<el-dialog v-model="dialogFormVisibleWordInfo" title="考点设置" width="70%">
<Dialog v-model="dialogFormVisibleWordInfo" title="考点设置" width="70%">
<input type="file" id="docxFile" accept=".docx" />
<button @click="getDocxDataInfo">文件解析</button>
<!-- 新增题干展示区 -->
<div
style="border: 1px solid #ddd; padding: 10px; margin: 10px 0; border-radius: 6px; max-height: 100%; overflow: hidden;"
>
<h3 style="margin: 0 0 8px 0;">试题内容</h3>
<el-scrollbar height="200px">
<!-- 支持富文本渲染 -->
<div v-html="formData.content" style="white-space: pre-wrap;"></div>
</el-scrollbar>
</div>
<div style="height: 400px; overflow: hidden; display: flex; gap: 16px">
<div style="flex: 0.5; overflow: auto; border: 1px solid #eee; padding: 8px">
<h3>考点</h3>
@@ -305,13 +315,25 @@
</template>
</el-table-column>
<el-table-column label="操作" width="100px">
<el-table-column label="操作" width="140px">
<template #default="{ row }">
<span
<el-button
:icon="ArrowUp"
circle
size="small"
@click="moveUp(row)"
title="上移"
/>
<el-button
:icon="ArrowDown"
circle
size="small"
@click="moveDown(row)"
title="下移"
/>
<el-button
@click="removePoint(row)"
style="cursor: pointer; font-weight: bold; font-size: 18px"
title="点击删除"
></span
></el-button
>
</template>
</el-table-column>
@@ -321,7 +343,7 @@
<!-- <el-skeleton :rows="5" animated v-if="wordPointsList.length < 0 && isLoading" />
-->
</el-dialog>
</Dialog>
<el-dialog v-model="dialogFormVisibleWordInfos" :title="titles" width="300px">
<el-tree
style="max-width: 600px"
@@ -359,7 +381,7 @@ import { defaultProps, handleTree } from '@/utils/tree'
import { FormRules } from 'element-plus'
import { cloneDeep } from 'lodash-es'
import FileForm from './components/FileForm.vue'
import { ArrowUp, ArrowDown, Delete } from '@element-plus/icons-vue'
defineOptions({ name: 'WpsWordFrom' })
const wordPointsList = ref<Tree[]>([]) // 树形结构
const wordPointsInfoList = ref<Tree[]>([]) // 树形结构
@@ -435,6 +457,30 @@ interface WordPointsInfo {
method?: string;
}
let wordPointsInfosList: WordPointsInfo[] = []
// 上移
function moveUp(row) {
const index = list.value.findIndex(item => item === row);
if (index > 0) {
[list.value[index - 1], list.value[index]] = [list.value[index], list.value[index - 1]];
}
updateSort()
}
// 下移
function moveDown(row) {
const index = list.value.findIndex(item => item === row);
if (index !== -1 && index < list.value.length - 1) {
[list.value[index + 1], list.value[index]] = [list.value[index], list.value[index + 1]];
}
updateSort()
}
// 更新 sort 字段
const updateSort = () => {
list.value.forEach((item, index) => {
item.sort = index + 1
})
}
const removePoint = (row) => {
// list.value.splice(index, 1)
for (let i = 0; i < list.value.length; i++) {