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