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

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

@@ -152,11 +152,26 @@
<el-input v-model="scope.row.scoreRate" placeholder="请输入权值" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="handleDelete(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
<el-table-column label="操作" align="center" width="140px">
<template #default="{ row }">
<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="handleDelete(row)"
></el-button
>
</template>
</el-table-column>
</el-table>
@@ -287,11 +302,52 @@
<el-dialog
v-model="dialogFormVisibleWordInfo"
title="邮件设置"
width="1500px"
width="80%"
style="overflow: scroll"
@close="handleEmailForm"
>
<!-- 外层容器 -->
<div
style="
display: flex;
height: 75vh; /* 占用弹窗可视区域 */
gap: 16px;
box-sizing: border-box;
"
>
<!-- 右边试题内容 -->
<div
style="
flex: 2;
border: 1px solid #ddd;
border-radius: 6px;
padding: 10px;
overflow: auto; /* ✅ 同样可以滚动 */
"
>
<h3 style="margin-bottom: 10px;">试题内容</h3>
<div
v-html="formData.content"
style="
white-space: pre-wrap;
line-height: 1.6;
"
></div>
</div>
<!-- 左边WindowsSystemSetting -->
<div
style="
flex: 4;
border: 1px solid #ddd;
border-radius: 6px;
padding: 10px;
overflow: auto; /* ✅ 关键点 */
"
>
<Email />
</div>
</div>
</el-dialog>
</template>
<script lang="ts" setup>
@@ -305,7 +361,7 @@ import * as SpecialtyApi from '@/api/points'
import { defaultProps, handleTree } from '@/utils/tree'
import { cloneDeep } from 'lodash-es'
import { useEmailStore } from '@/store/modules/email'
import { ArrowUp, ArrowDown, Delete } from '@element-plus/icons-vue'
const emailStore = useEmailStore()
defineOptions({ name: 'WpsWordFrom' })
@@ -397,6 +453,30 @@ const addEmailInfo = async () => {
const handleEmailForm = () => {
list.value = [...emailStore.emailFormList]
// emailStore.clearEmailData() // 如果需要清空数据,可以取消注释
}
// 上移
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 handleDelete = (row) => {
console.log(row)