考试 字段校验,没传考试id

This commit is contained in:
zhangyc
2022-12-03 19:40:34 +08:00
parent 67982d3720
commit 988683b1d5
4 changed files with 35 additions and 35 deletions

View File

@@ -30,8 +30,12 @@
</div>
<div class="btnbox">
<button class="xkbtn" @click="showDrawerSelFacet">
<!--
{{ chooseCourse == null ? "选择" : chooseCourseName }}面授课
</button>
</button> -->
{{ chooseCourse == null ? "选择" : "重选" }}面授课
</button>
<div v-if="chooseCourse">
<a-tag closable color="processing" @close="logC">
<span style="font-size:14px;line-height: 33px;">删除课程</span>

View File

@@ -114,26 +114,20 @@
</a-menu>
</template>
</a-dropdown> -->
<span style="margin-left: 10px">
<a-tag
class="tag-style"
v-if="paperName != ''"
:closable="true"
@close="delTag"
>{{ paperName }}</a-tag
>
<!-- <a-tag
class="tag-style"
v-for="item in choosedTestList"
:closable="true"
@close="closeTag(item.key)"
:key="item.key"
>{{ item.value }}</a-tag
> -->
</span>
<a-tag v-if="paperName != ''" closable color="processing" @close="delTag">
<span style="font-size:14px;line-height: 33px;">删除考试</span>
</a-tag>
</a-form-item>
</div>
</div>
<div class="main_item">
<div class="btnbox">
<a-form-item has-feedback label="考试时间" name="choosedTime">
@@ -721,9 +715,13 @@ export default {
scoringModel: formState.scoringModel,
showAnalysis: formState.showAnalysis,
showAnswers: formState.showAnswers,
examinationTestId: state.id,
examinationTestName: state.testName,
examinationTestId: state.paperId,
examinationTestName: state.paperName,
};
if(!(state.paperId >0)){
message.destroy();
return message.error("请选择考试");
}
if (props.edit) {
// 编辑任务
updateExamination(obj)
@@ -732,6 +730,7 @@ export default {
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`编辑失败`);
});
} else {
@@ -742,6 +741,7 @@ export default {
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`创建失败`);
});
}
@@ -852,6 +852,7 @@ export default {
state.id = value.id;
state.testName = value.testName;
};
return {
formState,
afterVisibleChange,
@@ -876,6 +877,7 @@ export default {
chooseTest,
closeTag,
getData,
...toRefs(state),
};
},

View File

@@ -29,6 +29,7 @@
/>
</div>
</div>
<!--
<div class="mii_ipt">
<div class="ipt_name">课程状态</div>
<div class="select fitems">
@@ -44,6 +45,7 @@
</a-select>
</div>
</div>
-->
</div>
<div class="mi_btns">
<div class="btn btn1" @click="search">
@@ -134,7 +136,7 @@
</template>
<script>
//import { ApiFilled } from "@ant-design/icons-vue";
import {reactive, toRefs, ref, computed} from "vue";
import {reactive, toRefs, computed} from "vue";
// import { planList } from "../../api/indexTaskadd";
// import {detail} from "../../api/indexCourse";
import {list} from "../../api/indexTaskadd";
@@ -279,7 +281,7 @@ export default {
//获取面授课列表
const getClassList = (obj) => {
let objn = obj || {
auditStatus: state.auditStatus,
auditStatus:2,
name: state.name,
pageNo: state.currentPage,
pageSize: state.pageSize
@@ -314,7 +316,7 @@ export default {
});
state.classTableData = array;
};
/**
const options1 = ref([
{
value: 0,
@@ -328,11 +330,8 @@ export default {
value: 2,
label: "已审核",
},
{
value: -1,
label: "审核未通过",
},
]);
]);*/
const handleChange = (value, option) => {
console.log("改变了", value, option);
console.log(state.valueContent);
@@ -359,7 +358,7 @@ export default {
// showDrawerSelFacet,
afterVisibleChange,
closeDrawer,
options1,
columns1,
getClassData,
handleChange,

View File

@@ -15,12 +15,7 @@ module.exports = defineConfig({
proxy: {
"/manageApi": {
target:"http://111.231.196.214:30001/",
<<<<<<< HEAD
//target: "http://localhost:30001/", //这里后台的地址模拟的;应该填写你们真实的后台接口
=======
// target: "http://localhost:30001/", //这里后台的地址模拟的;应该填写你们真实的后台接口
>>>>>>> 44e0ecf40abb960193bb4add3c7c2da6f54dd899
changeOrigin: true, //表示是否改变原域名
changeOrigin: true, //表示是否改变原域名
// secure: false,
// ws: false, //表示WebSocket协议
pathRewrite: {