优化
部署开发环境 / 编译发布 (push) Successful in 2m0s Details

This commit is contained in:
yj 2024-06-14 15:48:02 +08:00
parent 81a1ac5326
commit 3ee5ee3b6d
2 changed files with 16 additions and 5 deletions

View File

@ -9,11 +9,15 @@
>
<div>
<div style="font-size: 20px; margin-bottom: 20px; font-weight: bold">
锁定模板后仅可调整位置和大小无法增删题目请确认模板信息后操作
锁定模板后仅可调整位置和大小无法增删题目请确认模板信息后操作
<span style="color: red">(总分:{{ allScore }})</span>
</div>
<div style="height: 70vh; overflow-y: auto">
<el-collapse v-model="activeNames">
<el-collapse-item :title="item.title" :name="item.key" v-for="item in list">
<el-collapse-item :name="item.key" v-for="item in list">
<template #title>
<span v-html="item.title" style="font-size: 16px"></span>
</template>
<div v-if="item.key !== 'otherPoint'">
<div v-if="item.data.length">
<div v-for="row in item.data">
@ -53,6 +57,7 @@ const activeNames = ref([
"otherPoint",
]);
const list = ref<any>([]);
const allScore = ref<number>(0);
const getData = (data: any): void => {
//
changeData(data);
@ -73,6 +78,8 @@ const changeData = (data: any): void => {
const objectiveQuestionsPoint = [], //
subjectiveQuestionsPoint = [], //
otherPoint = []; //
let objectiveQuestionsPointScore = 0;
let subjectiveQuestionsPointScore = 0;
for (let index = 0; index < data.length; index++) {
const item = data[index];
objectiveQuestionsPoint.push(...item.from.objectiveQuestionsPoint);
@ -82,14 +89,17 @@ const changeData = (data: any): void => {
let objectiveQuestionsPointNumber = 0;
objectiveQuestionsPoint.forEach((item: any) => {
objectiveQuestionsPointNumber += item.questionNumber;
objectiveQuestionsPointScore += item.score;
});
let subjectiveQuestionsPointNumber = 0;
subjectiveQuestionsPoint.forEach((item: any) => {
subjectiveQuestionsPointNumber += item.questionAfter - item.questionBefore + 1;
subjectiveQuestionsPointScore += item.score;
});
params[0].title = `客观题:${objectiveQuestionsPointNumber}`;
allScore.value = objectiveQuestionsPointScore + subjectiveQuestionsPointScore;
params[0].title = `客观题:共${objectiveQuestionsPointNumber}题 <span style="color: red;font-weight:bold;">总分:${objectiveQuestionsPointScore}分</span>`;
params[0].data = objectiveQuestionsPoint;
params[1].title = `主观题:${subjectiveQuestionsPointNumber}`;
params[1].title = `主观题:${subjectiveQuestionsPointNumber} <span style="color: red;font-weight:bold;">总分:${subjectiveQuestionsPointScore}分</span>`;
params[1].data = subjectiveQuestionsPoint;
params[2].title = `其他标记(缺考、屏蔽区、反面定位点)`;
params[2].data = otherPoint;

View File

@ -1647,7 +1647,7 @@ const showFabricData = (): void => {
hasControls: false,
subTargetCheck: true,
borderColor: "transparent",
selectionBackgroundColor: "rgba(255,0,0,0.5)",
selectionBackgroundColor: "rgba(255,0,0,0.1)",
fabricType: item.fabricType,
left: item.left,
top: item.top,
@ -2997,6 +2997,7 @@ const lock = async (): Promise<void> => {
GetLock(router.currentRoute.value.query.mid as string).then((res: any) => {
if (res.code === 200) {
ElMessage.success("锁定成功");
isLockStatus.value = true;
}
});
};