mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 20:36:45 +08:00
考试 字段校验,没传考试id
This commit is contained in:
@@ -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),
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user