【修改】wps出题页面bug

This commit is contained in:
huababa1
2025-08-14 16:45:54 +08:00
parent e35f54abe4
commit 59612d28c8
3 changed files with 24 additions and 7 deletions

View File

@@ -415,7 +415,12 @@ interface PptxPoints {
}
let pptxPointsInfosList: PptxPoints[] = []
const removePoint = (index: number) => {
list.value.splice(index, 1)
// list.value.splice(index, 1)
for (let i = 0; i < list.value.length; i++) {
if (row.content == list.value[i].content) {
list.value.splice(i, 1)
}
}
}
function fileTypeFormatter(_row: any, _column: any, cellValue: any) {
if (cellValue === '0') return '素材文件(上传ZIP)'
@@ -525,6 +530,7 @@ const submitPptxPoints = async () => {
for (let i = 0; i < res.data.length; i++) {
var indexFlag = false
for (let x = 0; x < list.value.length; x++) {
list.value[x].scoreRate='1'
if (res.data[i].content == list.value[x].content) {
// 如果存在相同的数据话 不进入
indexFlag = true

View File

@@ -405,8 +405,13 @@ const formData = ref({
})
let wordPointsInfosList: (typeof wordPoints)[] = []
const removePoint = (index: number) => {
list.value.splice(index, 1)
const removePoint = (row) => {
// list.value.splice(index, 1)
for (let i = 0; i < list.value.length; i++) {
if (row.content == list.value[i].content) {
list.value.splice(i, 1)
}
}
}
function fileTypeFormatter(row, column, cellValue) {
if (cellValue === '0') return '素材文件(上传ZIP)'
@@ -512,6 +517,7 @@ const submitWordPoints = async () => {
for (let i = 0; i < res.data.length; i++) {
var indexFlag = false
for (let x = 0; x < list.value.length; x++) {
list.value[x].scoreRate='1'
if (res.data[i].content == list.value[x].content) {
// 如果存在相同的数据话 不进入
indexFlag = true

View File

@@ -308,7 +308,7 @@
<el-table-column label="操作" width="100">
<template #default="{ row }">
<span
@click="removePoint(row)"
@click="removePoint(row.index)"
style="cursor: pointer; font-weight: bold; font-size: 18px"
title="点击删除"
></span
@@ -478,8 +478,12 @@ const formData = ref({
})
let xlsxPointsInfosList: (typeof xlsxPoints)[] = []
const removePoint = (index: number) => {
list.value.splice(index, 1)
const removePoint = (row) => {
for (let i = 0; i < list.value.length; i++) {
if (row.content == list.value[i].content) {
list.value.splice(i, 1)
}
}
}
function fileTypeFormatter(cellValue) {
if (cellValue === '0') return '素材文件(上传ZIP)'
@@ -565,7 +569,7 @@ const handleNodelClick = async (row: any) => {
console.log(row.index+"row.indexrow.index")
textIndex.value = row.index
const res = await XlsxApi.getSlideByNameList(row.type)
const res = await XlsxApi.getXlsxByNameList(row.type)
xlsxPointsInfoList.value = []
xlsxPointsInfoList.value.push(...handleTree(res))
dialogFormVisibleXlsxInfos.value = true
@@ -613,6 +617,7 @@ const submitXlsxPoints = async () => {
for (let i = 0; i < res.data.length; i++) {
var indexFlag = false
for (let x = 0; x < list.value.length; x++) {
list.value[x].scoreRate='1'
if (res.data[i].content == list.value[x].content) {
// 如果存在相同的数据话 不进入
indexFlag = true