Merge branch 'master' of https://e.coding.net/g-iswv8783/education/pengchen-ui-exam-vue3
This commit is contained in:
@@ -407,7 +407,7 @@ const formData = ref({
|
||||
// 定义 pptxPoints 类型
|
||||
interface PptxPoints {
|
||||
firstName: string;
|
||||
index: string;
|
||||
slideIndex: string;
|
||||
function: string;
|
||||
examName: string;
|
||||
examCode: string;
|
||||
@@ -458,7 +458,7 @@ const handleCheckChange = (data: any, _checked: boolean, _indeterminate: boolean
|
||||
console.log(data)
|
||||
const pptxPoints: PptxPoints = {
|
||||
firstName: '',
|
||||
index: '',
|
||||
slideIndex: '',
|
||||
function: '',
|
||||
examName: '',
|
||||
examCode: '',
|
||||
@@ -466,7 +466,7 @@ const handleCheckChange = (data: any, _checked: boolean, _indeterminate: boolean
|
||||
}
|
||||
if (data.functions != null && data.functions != '') {
|
||||
pptxPoints.firstName = chineseName.value
|
||||
pptxPoints.index = textIndex.value
|
||||
pptxPoints.slideIndex = textIndex.value
|
||||
pptxPoints.function = data.functions
|
||||
pptxPoints.examName = data.chineseName
|
||||
pptxPoints.examCode = '111'
|
||||
|
@@ -515,9 +515,9 @@ const submitWordPoints = async () => {
|
||||
wordPointsInfosList = []
|
||||
console.log(res)
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].scoreRate='1'
|
||||
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
|
||||
|
@@ -308,7 +308,7 @@
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
@click="removePoint(row.index)"
|
||||
@click="removePoint(row)"
|
||||
style="cursor: pointer; font-weight: bold; font-size: 18px"
|
||||
title="点击删除"
|
||||
>—</span
|
||||
@@ -337,11 +337,28 @@
|
||||
<div v-if="isCellType" style="margin-bottom: 12px">
|
||||
<!-- 上方输入框和添加按钮 -->
|
||||
<div style="display: flex; gap: 8px; margin-bottom: 8px">
|
||||
<!-- 单个输入框(默认) -->
|
||||
<el-input
|
||||
v-if="selectedType !== 'range'"
|
||||
v-model="cellInputValue"
|
||||
:placeholder="getPlaceholder(selectedType)"
|
||||
style="flex: 1"
|
||||
/>
|
||||
|
||||
<!-- 两个输入框,用冒号拼接 -->
|
||||
<template v-else>
|
||||
<el-input
|
||||
v-model="rangeStart"
|
||||
placeholder="开始单元格"
|
||||
style="flex: 1"
|
||||
/>
|
||||
<span>:</span>
|
||||
<el-input
|
||||
v-model="rangeEnd"
|
||||
placeholder="结束单元格"
|
||||
style="flex: 1"
|
||||
/>
|
||||
</template>
|
||||
<el-button type="primary" @click="addCellValue">确定</el-button>
|
||||
</div>
|
||||
|
||||
@@ -390,23 +407,25 @@ const isCellType = ref(false) // 是否单元格
|
||||
const cellInputValue = ref('') // 上方输入框值
|
||||
const cellValues = ref<{ value: string }[]>([]) // 存储所有添加的数据
|
||||
const selectedRows = ref<{ value: string }[]>([]) // 多选的行
|
||||
|
||||
const rangeStart = ref(""); // range 开始
|
||||
const rangeEnd = ref(""); // range 结束
|
||||
|
||||
// 添加到列表(带重复判断)
|
||||
const addCellValue = () => {
|
||||
const value = cellInputValue.value.trim()
|
||||
if (!value) return
|
||||
|
||||
// 判断是否重复
|
||||
const exists = cellValues.value.some(item => item.value === value)
|
||||
if (exists) {
|
||||
ElMessage.warning('请勿重复添加')
|
||||
return
|
||||
if (selectedType.value === "range") {
|
||||
if (!rangeStart.value || !rangeEnd.value) return;
|
||||
cellValues.value.push({
|
||||
value: rangeStart.value + ":" + rangeEnd.value
|
||||
});
|
||||
rangeStart.value = "";
|
||||
rangeEnd.value = "";
|
||||
} else {
|
||||
if (!cellInputValue.value) return;
|
||||
cellValues.value.push({ value: cellInputValue.value });
|
||||
cellInputValue.value = "";
|
||||
}
|
||||
};
|
||||
|
||||
cellValues.value.push({ value })
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 表格多选事件
|
||||
@@ -615,9 +634,9 @@ const submitXlsxPoints = async () => {
|
||||
xlsxPointsInfosList = []
|
||||
console.log(res)
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].scoreRate='1'
|
||||
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
|
||||
|
Reference in New Issue
Block a user