|
@@ -204,7 +204,9 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="原图遮盖" label-width="140px">
|
|
<el-form-item label="原图遮盖" label-width="140px">
|
|
- <el-button type="primary" link>设置</el-button>
|
|
|
|
|
|
+ <el-button type="primary" link @click="onSetMarkingArea"
|
|
|
|
+ >设置</el-button
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-space>
|
|
</el-space>
|
|
<br />
|
|
<br />
|
|
@@ -321,6 +323,14 @@
|
|
:advanced-config="advancedConfig"
|
|
:advanced-config="advancedConfig"
|
|
@confirm="handleAdvancedConfirm"
|
|
@confirm="handleAdvancedConfirm"
|
|
/>
|
|
/>
|
|
|
|
+
|
|
|
|
+ <!-- 添加遮盖区域弹窗 -->
|
|
|
|
+ <SelectImgArea
|
|
|
|
+ ref="imgAreaRef"
|
|
|
|
+ v-model="selectedAreas"
|
|
|
|
+ :img-list="imgList"
|
|
|
|
+ @change="onImgAreaChange"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -333,7 +343,9 @@
|
|
import type { ExamUpdateParam, ExamAdvancedConfig } from '@/api/types/exam';
|
|
import type { ExamUpdateParam, ExamAdvancedConfig } from '@/api/types/exam';
|
|
import useLoading from '@/hooks/loading';
|
|
import useLoading from '@/hooks/loading';
|
|
import { MARKING_MODE, EXAM_TYPE } from '@/constants/enumerate';
|
|
import { MARKING_MODE, EXAM_TYPE } from '@/constants/enumerate';
|
|
|
|
+ import { CoverArea } from '@/api/types/common';
|
|
|
|
|
|
|
|
+ import SelectImgArea from '@/components/select-img-area/index.vue';
|
|
import ExamAdvancedDialog from './ExamAdvancedDialog.vue';
|
|
import ExamAdvancedDialog from './ExamAdvancedDialog.vue';
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
@@ -351,40 +363,43 @@
|
|
const advancedDialogRef = ref();
|
|
const advancedDialogRef = ref();
|
|
|
|
|
|
// 表单数据
|
|
// 表单数据
|
|
- const initialFormState: Partial<ExamUpdateParam> = {
|
|
|
|
- name: '',
|
|
|
|
- type: 'SCAN',
|
|
|
|
- scanImageType: 1,
|
|
|
|
- examDate: '',
|
|
|
|
- markingStartDate: '',
|
|
|
|
- markingEndDate: '',
|
|
|
|
- status: '',
|
|
|
|
- markingMode: 'TRACK',
|
|
|
|
- forceMark: false,
|
|
|
|
- forbidViewStudentInfo: false,
|
|
|
|
- forbidLeaderScoreQuery: false,
|
|
|
|
- preventSameAccountRecheck: false,
|
|
|
|
- forceScrollToBottom: false,
|
|
|
|
- requireFullProgressForRecheck: false,
|
|
|
|
- showObjectiveScore: false,
|
|
|
|
- showOriginalScoreAfterReturn: false,
|
|
|
|
- recheckCount: undefined,
|
|
|
|
- passingScore: 60,
|
|
|
|
- excellentScore: 90,
|
|
|
|
- showOriginalPaper: false,
|
|
|
|
- autoPositionAfterSubmit: false,
|
|
|
|
- autoAlignAnswerSheet: false,
|
|
|
|
- description: '',
|
|
|
|
- // 高级配置默认值
|
|
|
|
- minMarkingDuration: undefined,
|
|
|
|
- singlePaperRecheckCount: undefined,
|
|
|
|
- scoringLimitType: null,
|
|
|
|
- scoringLimitCount: undefined,
|
|
|
|
- enableBarcodeAIDetection: false,
|
|
|
|
- enableAnswerSheetAIDetection: false,
|
|
|
|
|
|
+ const getInitialFormState = () => {
|
|
|
|
+ const initialFormState: Partial<ExamUpdateParam> = {
|
|
|
|
+ name: '',
|
|
|
|
+ type: 'SCAN',
|
|
|
|
+ examDate: '',
|
|
|
|
+ markingStartDate: '',
|
|
|
|
+ markingEndDate: '',
|
|
|
|
+ status: '',
|
|
|
|
+ markingMode: 'TRACK',
|
|
|
|
+ forceMark: false,
|
|
|
|
+ forbidViewStudentInfo: false,
|
|
|
|
+ forbidLeaderScoreQuery: false,
|
|
|
|
+ preventSameAccountRecheck: false,
|
|
|
|
+ forceScrollToBottom: false,
|
|
|
|
+ requireFullProgressForRecheck: false,
|
|
|
|
+ showObjectiveScore: false,
|
|
|
|
+ showOriginalScoreAfterReturn: false,
|
|
|
|
+ recheckCount: undefined,
|
|
|
|
+ passingScore: 60,
|
|
|
|
+ excellentScore: 90,
|
|
|
|
+ showOriginalPaper: false,
|
|
|
|
+ sheetConfig: [],
|
|
|
|
+ autoPositionAfterSubmit: false,
|
|
|
|
+ autoAlignAnswerSheet: false,
|
|
|
|
+ description: '',
|
|
|
|
+ // 高级配置默认值
|
|
|
|
+ minMarkingDuration: undefined,
|
|
|
|
+ singlePaperRecheckCount: undefined,
|
|
|
|
+ scoringLimitType: null,
|
|
|
|
+ scoringLimitCount: undefined,
|
|
|
|
+ enableBarcodeAIDetection: false,
|
|
|
|
+ enableAnswerSheetAIDetection: false,
|
|
|
|
+ };
|
|
|
|
+ return initialFormState;
|
|
};
|
|
};
|
|
|
|
|
|
- const formModel = reactive({ ...initialFormState });
|
|
|
|
|
|
+ const formModel = reactive(getInitialFormState());
|
|
|
|
|
|
// 高级配置数据
|
|
// 高级配置数据
|
|
const advancedConfig = computed<ExamAdvancedConfig>(() => ({
|
|
const advancedConfig = computed<ExamAdvancedConfig>(() => ({
|
|
@@ -430,6 +445,19 @@
|
|
Object.assign(formModel, config);
|
|
Object.assign(formModel, config);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 原图遮盖
|
|
|
|
+ const imgAreaRef = ref();
|
|
|
|
+ const selectedAreas = ref<CoverArea[]>([]);
|
|
|
|
+ // TODO:获取imgList
|
|
|
|
+ const imgList = ref([]);
|
|
|
|
+ function onSetMarkingArea() {
|
|
|
|
+ selectedAreas.value = formModel.sheetConfig || [];
|
|
|
|
+ imgAreaRef.value.open();
|
|
|
|
+ }
|
|
|
|
+ function onImgAreaChange(areas: CoverArea[]) {
|
|
|
|
+ formModel.sheetConfig = areas;
|
|
|
|
+ }
|
|
|
|
+
|
|
// 保存
|
|
// 保存
|
|
async function handleSave() {
|
|
async function handleSave() {
|
|
const valid = await formRef.value?.validate().catch(() => false);
|
|
const valid = await formRef.value?.validate().catch(() => false);
|