Compare commits
6 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
6958d82eba | |
|
|
f861057216 | |
|
|
3ee5ee3b6d | |
|
|
81a1ac5326 | |
|
|
6e34ed2e21 | |
|
|
a2d0e8dd91 |
|
|
@ -1,7 +1,7 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
usercenter-web:
|
||||
maketemplate:
|
||||
image: ${REGISTRY:-harbor.w.23544.com:8843}/marking/maketemplate.web:${TAG:-latest}
|
||||
hostname: marking
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -2910,7 +2910,7 @@ const changeData = (): any => {
|
|||
...row.customFrom,
|
||||
width: row.width,
|
||||
height: row.height - 36.16,
|
||||
top: row.top + 17,
|
||||
top: row.top + 19,
|
||||
left: row.left,
|
||||
};
|
||||
});
|
||||
|
|
@ -2919,7 +2919,7 @@ const changeData = (): any => {
|
|||
...row.customFrom,
|
||||
width: row.width,
|
||||
height: row.height - 36.16,
|
||||
top: row.top + 17,
|
||||
top: row.top + 19,
|
||||
left: row.left,
|
||||
};
|
||||
});
|
||||
|
|
@ -2928,7 +2928,7 @@ const changeData = (): any => {
|
|||
...row.customFrom,
|
||||
width: row.width,
|
||||
height: row.height - 36.16,
|
||||
top: row.top + 17,
|
||||
top: row.top + 19,
|
||||
left: row.left,
|
||||
};
|
||||
});
|
||||
|
|
@ -2937,7 +2937,7 @@ const changeData = (): any => {
|
|||
...row.customFrom,
|
||||
width: row.width,
|
||||
height: row.height - 36.16 / 2,
|
||||
top: row.top + 17,
|
||||
top: row.top + 19,
|
||||
left: row.left,
|
||||
};
|
||||
});
|
||||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ const request = (config: any) => {
|
|||
if (method === 'get' || method === 'GET') {
|
||||
config.params = config.data
|
||||
}
|
||||
if (config.url.includes('/draw')) {
|
||||
config.baseURL = import.meta.env.VITE_BASE_URL_DRAW_API
|
||||
} else {
|
||||
config.baseURL = import.meta.env.VITE_BASE_URL_API
|
||||
}
|
||||
return req.request<any>(config)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,14 +27,7 @@ export default defineConfig(({ mode }) => {
|
|||
port: 8080,
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: env.VITE_BASE_URL_API,
|
||||
changeOrigin: true
|
||||
},
|
||||
"/draw": {
|
||||
target: env.VITE_BASE_URL_DRAW_API,
|
||||
changeOrigin: true
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue