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

View File

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