优化
部署开发环境 / 编译发布 (push) Successful in 2m0s
Details
部署开发环境 / 编译发布 (push) Successful in 2m0s
Details
This commit is contained in:
parent
81a1ac5326
commit
3ee5ee3b6d
|
|
@ -9,11 +9,15 @@
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<div style="font-size: 20px; margin-bottom: 20px; font-weight: bold">
|
<div style="font-size: 20px; margin-bottom: 20px; font-weight: bold">
|
||||||
锁定模板后,仅可调整位置和大小,无法增删题目,请确认模板信息后操作:
|
锁定模板后,仅可调整位置和大小,无法增删题目,请确认模板信息后操作
|
||||||
|
<span style="color: red">(总分:{{ allScore }})</span> :
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 70vh; overflow-y: auto">
|
<div style="height: 70vh; overflow-y: auto">
|
||||||
<el-collapse v-model="activeNames">
|
<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.key !== 'otherPoint'">
|
||||||
<div v-if="item.data.length">
|
<div v-if="item.data.length">
|
||||||
<div v-for="row in item.data">
|
<div v-for="row in item.data">
|
||||||
|
|
@ -53,6 +57,7 @@ const activeNames = ref([
|
||||||
"otherPoint",
|
"otherPoint",
|
||||||
]);
|
]);
|
||||||
const list = ref<any>([]);
|
const list = ref<any>([]);
|
||||||
|
const allScore = ref<number>(0);
|
||||||
const getData = (data: any): void => {
|
const getData = (data: any): void => {
|
||||||
// 修改数据
|
// 修改数据
|
||||||
changeData(data);
|
changeData(data);
|
||||||
|
|
@ -73,6 +78,8 @@ const changeData = (data: any): void => {
|
||||||
const objectiveQuestionsPoint = [], //客观题
|
const objectiveQuestionsPoint = [], //客观题
|
||||||
subjectiveQuestionsPoint = [], //主观题
|
subjectiveQuestionsPoint = [], //主观题
|
||||||
otherPoint = []; //其他
|
otherPoint = []; //其他
|
||||||
|
let objectiveQuestionsPointScore = 0;
|
||||||
|
let subjectiveQuestionsPointScore = 0;
|
||||||
for (let index = 0; index < data.length; index++) {
|
for (let index = 0; index < data.length; index++) {
|
||||||
const item = data[index];
|
const item = data[index];
|
||||||
objectiveQuestionsPoint.push(...item.from.objectiveQuestionsPoint);
|
objectiveQuestionsPoint.push(...item.from.objectiveQuestionsPoint);
|
||||||
|
|
@ -82,14 +89,17 @@ const changeData = (data: any): void => {
|
||||||
let objectiveQuestionsPointNumber = 0;
|
let objectiveQuestionsPointNumber = 0;
|
||||||
objectiveQuestionsPoint.forEach((item: any) => {
|
objectiveQuestionsPoint.forEach((item: any) => {
|
||||||
objectiveQuestionsPointNumber += item.questionNumber;
|
objectiveQuestionsPointNumber += item.questionNumber;
|
||||||
|
objectiveQuestionsPointScore += item.score;
|
||||||
});
|
});
|
||||||
let subjectiveQuestionsPointNumber = 0;
|
let subjectiveQuestionsPointNumber = 0;
|
||||||
subjectiveQuestionsPoint.forEach((item: any) => {
|
subjectiveQuestionsPoint.forEach((item: any) => {
|
||||||
subjectiveQuestionsPointNumber += item.questionAfter - item.questionBefore + 1;
|
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[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[1].data = subjectiveQuestionsPoint;
|
||||||
params[2].title = `其他标记(缺考、屏蔽区、反面定位点)`;
|
params[2].title = `其他标记(缺考、屏蔽区、反面定位点)`;
|
||||||
params[2].data = otherPoint;
|
params[2].data = otherPoint;
|
||||||
|
|
|
||||||
|
|
@ -1647,7 +1647,7 @@ const showFabricData = (): void => {
|
||||||
hasControls: false,
|
hasControls: false,
|
||||||
subTargetCheck: true,
|
subTargetCheck: true,
|
||||||
borderColor: "transparent",
|
borderColor: "transparent",
|
||||||
selectionBackgroundColor: "rgba(255,0,0,0.5)",
|
selectionBackgroundColor: "rgba(255,0,0,0.1)",
|
||||||
fabricType: item.fabricType,
|
fabricType: item.fabricType,
|
||||||
left: item.left,
|
left: item.left,
|
||||||
top: item.top,
|
top: item.top,
|
||||||
|
|
@ -2997,6 +2997,7 @@ const lock = async (): Promise<void> => {
|
||||||
GetLock(router.currentRoute.value.query.mid as string).then((res: any) => {
|
GetLock(router.currentRoute.value.query.mid as string).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
ElMessage.success("锁定成功");
|
ElMessage.success("锁定成功");
|
||||||
|
isLockStatus.value = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue