fix:增加导入小组长成功提示,增加开课编辑考试时只允许编辑时间,删除可继续添加设置

This commit is contained in:
wyx
2023-03-30 15:12:00 +08:00
parent fc6f0b2272
commit 993e034f81
3 changed files with 59 additions and 16 deletions

View File

@@ -616,6 +616,10 @@ const changevalue = (e) => {
console.log("changevalue", e, newarr, formData.value.attach); console.log("changevalue", e, newarr, formData.value.attach);
} }
const logT = () => {
formData.value.examInfo = {};
};
defineExpose({ openDrawer }); defineExpose({ openDrawer });
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -19,20 +19,40 @@
</div> </div>
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;"> <div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
<div> <div>
<button <div v-if="info?.examinationName >= 0">
style="width: 100px; cursor: pointer;" <button
@click="changeOuter(1)" v-if="info?.examType == 1"
:class="formData.examType === 1 ? 'outer' : 'notOuter'" style="width: 100px; cursor: pointer;"
> @click="changeOuter(1)"
系统考试 :class="formData.examType === 1 ? 'outer' : 'notOuter'"
</button> >
<button 系统考试
style="width: 100px; cursor: pointer;" </button>
@click="changeOuter(2)" <button
:class="formData.examType === 2 ? 'outer' : 'notOuter'" v-else
> style="width: 100px; cursor: pointer;"
外部考试 @click="changeOuter(2)"
</button> :class="formData.examType === 2 ? 'outer' : 'notOuter'"
>
外部考试
</button>
</div>
<div v-else>
<button
style="width: 100px; cursor: pointer;"
@click="changeOuter(1)"
:class="formData.examType === 1 ? 'outer' : 'notOuter'"
>
系统考试
</button>
<button
style="width: 100px; cursor: pointer;"
@click="changeOuter(2)"
:class="formData.examType === 2 ? 'outer' : 'notOuter'"
>
外部考试
</button>
</div>
</div> </div>
</div> </div>
@@ -50,6 +70,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
:disabled="info?.examinationName >= 0?true:false"
v-model:value="formData.examinationName" v-model:value="formData.examinationName"
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入考试名称" placeholder="请输入考试名称"
@@ -70,7 +91,7 @@
</div> </div>
<s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName"> <s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
<div class="btnbox"> <div class="btnbox">
<button class="xkbtn" style="margin:0"> <button class="xkbtn" style="margin:0" :disabled="info?.examinationName >= 0?true:false">
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷 {{ formData.examinationPaperId ? "重选" : "选择" }}试卷
</button> </button>
</div> </div>
@@ -117,6 +138,7 @@
</div> </div>
<div class="select"> <div class="select">
<a-input-number <a-input-number
:disabled="info?.examinationName >= 0?true:false"
:min="0" :min="0"
:max="999999" :max="999999"
:precision="0" :precision="0"
@@ -138,6 +160,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
:disabled="info?.examinationName >= 0?true:false"
v-model:value="formData.passLine" v-model:value="formData.passLine"
type="number" type="number"
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
@@ -152,6 +175,7 @@
</div> </div>
<div class="textarea"> <div class="textarea">
<a-textarea <a-textarea
:disabled="info?.examinationName >= 0?true:false"
v-model:value="formData.examinationExplain" v-model:value="formData.examinationExplain"
placeholder="请输入考试说明" placeholder="请输入考试说明"
allow-clear allow-clear
@@ -170,6 +194,7 @@
<div class="timerbox"> <div class="timerbox">
<span>允许重复考试</span> <span>允许重复考试</span>
<a-input-number <a-input-number
:disabled="info?.examinationName >= 0?true:false"
:min="-1" :min="-1"
:max="999999" :max="999999"
:precision="0" :precision="0"
@@ -194,6 +219,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="info?.examinationName >= 0?true:false"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.showAnswers" v-model:value="formData.showAnswers"
> >
@@ -208,6 +234,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="info?.examinationName >= 0?true:false"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.showAnalysis" v-model:value="formData.showAnalysis"
> >
@@ -222,6 +249,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="info?.examinationName >= 0?true:false"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.scoringModel" v-model:value="formData.scoringModel"
> >
@@ -238,6 +266,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="info?.examinationName >= 0?true:false"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.questionArrangement" v-model:value="formData.questionArrangement"
> >
@@ -405,6 +434,7 @@ watch(() => formData.value.examType, () => {
}) })
watch([props, visible], () => { watch([props, visible], () => {
console.log(props.info)
resetFields(props.info) resetFields(props.info)
dateTime.value = [props.info?.examinationStartTime || '', props.info?.examinationEndTime || ''] dateTime.value = [props.info?.examinationStartTime || '', props.info?.examinationEndTime || '']
}) })

View File

@@ -815,6 +815,7 @@
</div> </div>
<ImpoterGroupLeader <ImpoterGroupLeader
title="导入小组长" title="导入小组长"
@change="handleChangeGroupLeader"
:data="{ targetId: projectId, type: 1 }" :data="{ targetId: projectId, type: 1 }"
:url="`/admin/studentGroup/importGroup`" :url="`/admin/studentGroup/importGroup`"
> >
@@ -4897,6 +4898,13 @@ export default {
function previewPic() { function previewPic() {
state.modal1Visible = true; state.modal1Visible = true;
} }
// 导入小组长成功回调
function handleChangeGroupLeader(e) {
if(e=="end"){
message.destroy();
message.success("导入小组长成功");
}
}
return { return {
...toRefs(state), ...toRefs(state),
...toRefs(levelList), ...toRefs(levelList),
@@ -5020,7 +5028,8 @@ export default {
jdSelectChange1, jdSelectChange1,
studytimeRank, studytimeRank,
xsSelectChange, xsSelectChange,
changePagination changePagination,
handleChangeGroupLeader
}; };
}, },
}; };