Commit 01db8f6f authored by 黄奎's avatar 黄奎

页面修改

parent 37d79061
...@@ -165,4 +165,17 @@ export function savePaperFolderInfo(data) { ...@@ -165,4 +165,17 @@ export function savePaperFolderInfo(data) {
method: 'post', method: 'post',
data data
}) })
} }
\ No newline at end of file
/**
* 智能组卷根据模板生成试卷
* @param {JSON参数} data
*/
export function savePaperTemplate(data) {
return request({
url: '/Exam/SetPaperTemplate',
method: 'post',
data
})
}
...@@ -8,14 +8,17 @@ ...@@ -8,14 +8,17 @@
margin-bottom: 20px; margin-bottom: 20px;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
} }
.examTi_List{
border:1px solid #ddd; .examTi_List {
margin-bottom:20px; border: 1px solid #ddd;
margin-bottom: 20px;
} }
.examCreat_Top i:hover { .examCreat_Top i:hover {
color:red; color: red;
cursor: pointer; cursor: pointer;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -54,16 +57,19 @@ ...@@ -54,16 +57,19 @@
<q-radio v-model="item.ChooseType" :val="1" label="从题库选题" /> <q-radio v-model="item.ChooseType" :val="1" label="从题库选题" />
<template v-if="item.ChooseType==1"> <template v-if="item.ChooseType==1">
<span>{{item.QuestionTypeNum}} 道 抽 <span>{{item.QuestionTypeNum}} 道 抽
<el-input style="width:100px;" size="small" v-model="item.ChooseNum" maxlength="5"></el-input>&nbsp;&nbsp;</span> <el-input style="width:100px;" size="small" v-model="item.ChooseNum" maxlength="5"></el-input>
&nbsp;&nbsp;</span>
</template> </template>
</span> </span>
<br /> <br />
<span> <span>
<q-radio v-model="item.ChooseType" :val="2" label="从题库按照难易度选题" /> <q-radio v-model="item.ChooseType" :val="2" label="从题库按照难易度选题" />
<template v-if="item.ChooseType==2"> <template v-if="item.ChooseType==2">
<div style="margin:0 0 20px 40px;" v-for="(subItem,subIndex) in item.ChooseList" :key="subIndex">{{subItem.DifficultyTypeName}} <div style="margin:0 0 20px 40px;" v-for="(subItem,subIndex) in item.ChooseList" :key="subIndex">
{{subItem.DifficultyTypeCount}} 道 抽 {{subItem.DifficultyTypeName}} (共
<el-input style="width:100px;" size="small" v-model="subItem.ChooseNum" maxlength="5"></el-input>&nbsp;&nbsp; {{subItem.DifficultyTypeCount}} 道) 抽
<el-input style="width:100px;" size="small" v-model="subItem.ChooseNum" maxlength="5"></el-input>
&nbsp;&nbsp;
</div> </div>
</template> </template>
</span> </span>
...@@ -73,9 +79,15 @@ ...@@ -73,9 +79,15 @@
<template v-if="BankList&&BankList.length>0"> <template v-if="BankList&&BankList.length>0">
<div class="row"> <div class="row">
<q-select filled option-value="QuestionTypeId" option-label="QuestionTypeName" :options="BankList" emit-value <q-select filled option-value="QuestionTypeId" option-label="QuestionTypeName" :options="BankList" emit-value
map-options label="更多题型" class="col-6 q-pr-lg" use-input clearable v-model="MoreQuestionTypeId" @input="changeQuestion" /> map-options label="更多题型" class="col-6 q-pr-lg" use-input clearable v-model="MoreQuestionTypeId"
@input="changeQuestion" />
<q-checkbox v-model="templateMsg.IsSaveTemplate" label="同时保存为组卷模板" />
</div> </div>
</template> </template>
<br/>
<div class="row">
<q-btn color="accent" size="sm" @click="setPaperTemplate" class="q-mr-md" label="保存"  />
</div>
</template> </template>
<template v-if="postMsg.GenerateType==2"> <template v-if="postMsg.GenerateType==2">
手动组卷 手动组卷
...@@ -96,6 +108,7 @@ ...@@ -96,6 +108,7 @@
} from '../../api/question/question' } from '../../api/question/question'
import { import {
savePaperInfo, savePaperInfo,
savePaperTemplate
} from '../../api/teacher/index'; } from '../../api/teacher/index';
export default { export default {
components: { components: {
...@@ -123,6 +136,8 @@ ...@@ -123,6 +136,8 @@
TemplateNum: 0, //随机组卷数量 TemplateNum: 0, //随机组卷数量
TemplateDifficultyType: 0, //难易程度 TemplateDifficultyType: 0, //难易程度
TemplateData: [], TemplateData: [],
TemplateBankIds:"",
IsSaveTemplate: false,
}, },
ShowBankName: "", //显示题库名称 ShowBankName: "", //显示题库名称
BankList: [], BankList: [],
...@@ -155,6 +170,7 @@ ...@@ -155,6 +170,7 @@
} }
} }
}, },
//判断是否存在此题型
checkExists(QuestionTypeId) { checkExists(QuestionTypeId) {
var isExists = false; var isExists = false;
if (this.templateMsg && this.templateMsg.TemplateData && this.templateMsg.TemplateData.length > 0) { if (this.templateMsg && this.templateMsg.TemplateData && this.templateMsg.TemplateData.length > 0) {
...@@ -228,6 +244,7 @@ ...@@ -228,6 +244,7 @@
sBankName = sBankName.substr(1); sBankName = sBankName.substr(1);
} }
this.postMsg.QuestionBandIds = qBankIds; this.postMsg.QuestionBandIds = qBankIds;
this.templateMsg.TemplateBankIds=qBankIds;
this.ShowBankName = sBankName; this.ShowBankName = sBankName;
this.getQuestionCategoryList(); this.getQuestionCategoryList();
}, },
...@@ -236,6 +253,13 @@ ...@@ -236,6 +253,13 @@
savePaperInfo(this.postMsg).then(res => { savePaperInfo(this.postMsg).then(res => {
}); });
},
//根据模板生成试卷
setPaperTemplate() {
savePaperTemplate(this.templateMsg).then(res => {
console.log("res=>", res);
});
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment