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

页面修改

parent 37d79061
......@@ -166,3 +166,16 @@ export function savePaperFolderInfo(data) {
data
})
}
/**
* 智能组卷根据模板生成试卷
* @param {JSON参数} data
*/
export function savePaperTemplate(data) {
return request({
url: '/Exam/SetPaperTemplate',
method: 'post',
data
})
}
......@@ -8,14 +8,17 @@
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
}
.examTi_List{
border:1px solid #ddd;
margin-bottom:20px;
.examTi_List {
border: 1px solid #ddd;
margin-bottom: 20px;
}
.examCreat_Top i:hover {
color:red;
color: red;
cursor: pointer;
}
</style>
<template>
<div class="page-body">
......@@ -54,16 +57,19 @@
<q-radio v-model="item.ChooseType" :val="1" label="从题库选题" />
<template v-if="item.ChooseType==1">
<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>
</span>
<br />
<span>
<q-radio v-model="item.ChooseType" :val="2" label="从题库按照难易度选题" />
<template v-if="item.ChooseType==2">
<div style="margin:0 0 20px 40px;" v-for="(subItem,subIndex) in item.ChooseList" :key="subIndex">{{subItem.DifficultyTypeName}}
{{subItem.DifficultyTypeCount}} 道 抽
<el-input style="width:100px;" size="small" v-model="subItem.ChooseNum" maxlength="5"></el-input>&nbsp;&nbsp;
<div style="margin:0 0 20px 40px;" v-for="(subItem,subIndex) in item.ChooseList" :key="subIndex">
{{subItem.DifficultyTypeName}} (共
{{subItem.DifficultyTypeCount}} 道) 抽
<el-input style="width:100px;" size="small" v-model="subItem.ChooseNum" maxlength="5"></el-input>
&nbsp;&nbsp;
</div>
</template>
</span>
......@@ -73,9 +79,15 @@
<template v-if="BankList&&BankList.length>0">
<div class="row">
<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>
</template>
<br/>
<div class="row">
<q-btn color="accent" size="sm" @click="setPaperTemplate" class="q-mr-md" label="保存"  />
</div>
</template>
<template v-if="postMsg.GenerateType==2">
手动组卷
......@@ -96,6 +108,7 @@
} from '../../api/question/question'
import {
savePaperInfo,
savePaperTemplate
} from '../../api/teacher/index';
export default {
components: {
......@@ -123,6 +136,8 @@
TemplateNum: 0, //随机组卷数量
TemplateDifficultyType: 0, //难易程度
TemplateData: [],
TemplateBankIds:"",
IsSaveTemplate: false,
},
ShowBankName: "", //显示题库名称
BankList: [],
......@@ -155,6 +170,7 @@
}
}
},
//判断是否存在此题型
checkExists(QuestionTypeId) {
var isExists = false;
if (this.templateMsg && this.templateMsg.TemplateData && this.templateMsg.TemplateData.length > 0) {
......@@ -228,6 +244,7 @@
sBankName = sBankName.substr(1);
}
this.postMsg.QuestionBandIds = qBankIds;
this.templateMsg.TemplateBankIds=qBankIds;
this.ShowBankName = sBankName;
this.getQuestionCategoryList();
},
......@@ -236,6 +253,13 @@
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