-- 考试bug

This commit is contained in:
yuping
2022-12-26 15:32:56 +08:00
parent 8a443de361
commit 4093514997
2 changed files with 224 additions and 205 deletions

View File

@@ -295,25 +295,25 @@
</div>
<!-- 加载动画 -->
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
<a-spin :spinning="addLoading" tip="" />
<a-spin :spinning="addLoading" tip=""/>
</div>
<!-- 选择考试抽屉 -->
<s-test v-model:STvisible="STvisible" @getSTData="getData" />
<s-test v-model:STvisible="STvisible" @getSTData="getData"/>
</div>
</a-drawer>
</template>
<script>
import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import {reactive, toRefs} from "vue";
import {message} from "ant-design-vue";
import {
createExamination,
queryExaminationDetailById,
updateExamination,
} from "@/api/indexExam";
import STest from "./SelectTest.vue";
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd";
import {ProjectEditTask, RouterEditTask} from "@/api/indexTask";
import {addTempTask} from "../../api/indexTaskadd";
import dayjs from "dayjs";
//import { toDate } from "@/api/method";
@@ -382,7 +382,18 @@ export default {
},
setup(props, ctx) {
const state = reactive({
test: {},
test: {
examinationName: '',
chooseTime: '',
examinationDuration: '',
passLine: '',
examinationExplain: null,
examinationLimit: null,
showAnswers: 1,
showAnalysis: 1,
scoringModel: 2,
questionArrangement: 4,
},
addLoading: false,
isOuter: 1, // 是否为外部考试
@@ -406,12 +417,19 @@ export default {
},
],
});
state.test.showAnswers = 1;
state.test.showAnalysis = 1;
state.test.scoringModel = 2;
state.test.questionArrangement = 4;
const clearAll = () => {
state.test = {};
state.test = {
examinationName: '',
chooseTime: '',
examinationDuration: '',
passLine: '',
examinationExplain: null,
examinationLimit: null,
showAnswers: 1,
showAnalysis: 1,
scoringModel: 2,
questionArrangement: 4,
};
};
const closeDrawer = () => {
@@ -440,7 +458,7 @@ export default {
// 该页面显示同时 edit为true 时,发送查询请求,
queryTest();
}
if(bool){
if (bool) {
state.test.showAnswers = 1;
state.test.showAnalysis = 1;
state.test.scoringModel = 2;
@@ -455,7 +473,7 @@ export default {
state.paperName = "";
};
const queryTest = () => {
queryExaminationDetailById({ examinationId: props.EditTestId })
queryExaminationDetailById({examinationId: props.EditTestId})
.then((res) => {
state.test = res.data.data;
state.test.showAnswers = Number(state.test.showAnswers);
@@ -522,11 +540,11 @@ export default {
//考试推送
state.test.targetId = 0;
state.test.type = 0;
if(props.isLevel == 1){
if (props.isLevel == 1) {
state.test.targetId = props.routerId;
state.test.type = 2;
}else if(props.isLevel == 2){
} else if (props.isLevel == 2) {
state.test.targetId = props.projectId;
state.test.type = 1;
@@ -655,7 +673,8 @@ export default {
const changeOuter = (value) => {
state.isOuter = value;
};
const chooseTest = () => {};
const chooseTest = () => {
};
const closeTag = (removedTag) => {
const tags = state.choosedTestList.filter(
(item) => item.key != removedTag

View File

@@ -316,7 +316,7 @@
</div>
<div class="item">
<div class="itcon">
<div class="img" @click="showDrawerAddTest">
<div class="img" @click="()=>showDrawerAddTest()">
<img src="../../assets/images/leveladd/kao.png" />
</div>
<div class="text">考试</div>