Commit eb880199 authored by 李苏's avatar 李苏 💬

考试

parent 82d4af61
......@@ -106,10 +106,28 @@ data: query||{}
})
}
export function doBegin(query) {
return request({
url: 'aqgl/pxgl/pxsj/doBegin',
method: 'post',
data: query||{}
})
}
/* 考试查询 */
export function queryKssj(query) {
return request({
url: 'aqgl/pxgl/pxsj/queryKssj',
method: 'post',
data: query||{}
})
}
/* 考试内容 */
export function queryKsnr(query) {
return request({
url: 'aqgl/pxgl/pxsj/queryKsnr',
method: 'post',
data: query||{}
})
}
......@@ -860,44 +860,57 @@ export const powerRoutes=[
name:'questionManage',
path:"questionManage"
},
// {
// component:'train/testPaper/index',
// hidden:false,
// meta:{
// "title": "考试试卷",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":'test',
// },
// name:'testPaper',
// path:"testPaper"
// },
// {
// component:'train/onlinExamination/index',
// hidden:false,
// meta:{
// "title": "在线考试管理",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":'test',
// },
// name:'onlinExamination',
// path:"onlinExamination"
// },
{
component:'train/testPaper/index',
component:'train/paperManagement/index',
hidden:false,
meta:{
"title": "考试试卷",
"title": "试卷管理",
"icon": "",
"noCache": false,
"link": null,
"mkid":'test',
"mkid":906001000,
},
name:'testPaper',
path:"testPaper"
name:'paperManagement',
path:"paperManagement"
},
{
component:'train/onlinExamination/index',
component:'train/ks/index',
hidden:false,
meta:{
"title": "在线考试管理",
"title": "考试管理",
"icon": "",
"noCache": false,
"link": null,
"mkid":'test',
},
name:'onlinExamination',
path:"onlinExamination"
},
{
component:'train/paperManagement/index',
hidden:false,
meta:{
"title": "试卷管理",
"icon": "",
"noCache": false,
"link": null,
"mkid":906001000,
},
name:'paperManagement',
path:"paperManagement"
name:'ks',
path:"ks"
},
/*,
......
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="考试主题" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="培训ID" ref="pxid" prop="pxid">
<el-input :readonly="readonly" v-model="form.pxid" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="题库ID" ref="xmid" prop="xmid">
<el-input :readonly="readonly" v-model="form.xmid" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="总分" ref="score" prop="score">
<el-input :readonly="readonly" v-model="form.score" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="单选题量" ref="scount" prop="scount">
<el-input :readonly="readonly" v-model="form.scount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单选题分值" ref="sscore" prop="sscore">
<el-input :readonly="readonly" v-model="form.sscore" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="多选题量" ref="mcount" prop="mcount">
<el-input :readonly="readonly" v-model="form.mcount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="多选题分值" ref="mscore" prop="mscore">
<el-input :readonly="readonly" v-model="form.mscore" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="判断题量" ref="jcount" prop="jcount">
<el-input :readonly="readonly" v-model="form.jcount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="判断题分值" ref="jscore" prop="jscore">
<el-input :readonly="readonly" v-model="form.jscore" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="填空题量" ref="fcount" prop="fcount">
<el-input :readonly="readonly" v-model="form.fcount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="填空题分值" ref="fscore" prop="fscore">
<el-input :readonly="readonly" v-model="form.fscore" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="考试时长" ref="kssc" prop="kssc">
<el-input :readonly="readonly" v-model="form.kssc" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="选题模式" ref="xtms" prop="xtms">
<el-input :readonly="readonly" v-model="form.xtms" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="系统版本" ref="sysversion" prop="sysversion">
<el-input :readonly="readonly" v-model="form.sysversion" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="开始时间" ref="kssj" prop="kssj">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.kssj" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结束时间" ref="jssj" prop="jssj">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.jssj" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: "aqgl.pxglPxsjEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
//ID
id:'',
//考试主题
name:'',
//培训ID
pxid:'',
//题库ID
xmid:'',
//总分
score:'',
//单选题量
scount:'',
//单选题分值
sscore:'',
//多选题量
mcount:'',
//多选题分值
mscore:'',
//判断题量
jcount:'',
//判断题分值
jscore:'',
//填空题量
fcount:'',
//填空题分值
fscore:'',
//考试时长
kssc:'',
//选题模式
xtms:'',
//备注
bz:'',
//维护人编码
whrid:'',
//维护人
whr:'',
//维护时间
whsj:new Date().getTime(),
//创建人编码
cjrid:'',
//创建人
cjr:'',
//创建时间
cjsj:new Date().getTime(),
//系统版本
sysversion:'',
//状态
zt:'',
//开始时间
kssj:new Date().getTime(),
//结束时间
jssj:new Date().getTime(),
},
/* form提交时的规则,具体规则参考官网*/
rules: {
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 查询条件-->
<!-- <div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="12" class="search-col">
<div class="search-item">
<span class="search-span">试卷状态:</span>
<RelSelect style="width: 100%;" src='aqgl/pxgl/pxsj/init/zt' filterable clearable :match="{value:'id',label:'name'}" v-model='queryParams.zt' ></RelSelect>
</div>
</el-col>
</el-row>
</div> -->
<div class="tablePagers">
<TablePager :delButton='false' @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<!-- 插槽 -->
<template slot="tabCustom">
<el-table-column style="border-right: 0px;" fixed="right" label="操作" header-align="center">
<template slot-scope="scope">
<el-button v-if="true" style="text-align: center;color: #1A94E6;width: 100%;"
@click.native.prevent="ksks(scope.row)" type="text" size="small">
<i class="el-icon-edit"></i>开始考试
</el-button>
<el-button v-if="false" style="text-align: center;color: #E6BD1A;width: 100%;"
@click.native.prevent="apiDel(scope.row)" type="text" size="small">
<i class="el-icon-warning-outline"></i>已过期
</el-button>
<el-button v-if="false" style="text-align: center;color: #11EE96;width: 100%;"
@click.native.prevent="apiDel(scope.row)" type="text" size="small">
<i class="el-icon-circle-check"></i>考试结束
</el-button>
</template>
</el-table-column>
</template>>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
queryKssj,
// doAdd,
// doUpdate,
// doDelete
} from '@/api/train/examination.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'aqgl.pxglPxsj',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '/aqgl/pxgl/pxsj/queryKssj',
/* 查询参数*/
queryParams: {
zt: 'F'
},
/* 表格标题对应参数*/
tableTitle: [
{label: "考试主题", prop: "name", fieldType: "ftString",width:300},
// {label: "培训ID", prop: "pxid", fieldType: "ftString",width:192},
// {label: "题库ID", prop: "xmid", fieldType: "ftString",width:192},
{label: "总分", prop: "score", fieldType: "float"},
{label: "单选题量", prop: "scount", fieldType: "int"},
{label: "单选题分值", prop: "sscore", fieldType: "float"},
{label: "多选题量", prop: "mcount", fieldType: "int"},
{label: "多选题分值", prop: "mscore", fieldType: "float"},
{label: "判断题量", prop: "jcount", fieldType: "int"},
{label: "判断题分值", prop: "jscore", fieldType: "float"},
{label: "填空题量", prop: "fcount", fieldType: "int"},
{label: "填空题分值", prop: "fscore", fieldType: "float"},
{label: "考试时长", prop: "kssc", fieldType: "float"},
// {label: "选题模式", prop: "xtms", fieldType: "ftString",width:60},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
{label: "创建人", prop: "cjr", fieldType: "ftString"},
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
{label: "状态", prop: "zt", fieldType: "ftString",width:60,transform:{
url:'/aqgl/pxgl/pxsj/init/zt',label:'name',value:'id'
}},
{label: "开始时间", prop: "kssj", fieldType: "ftDateTime"},
{label: "结束时间", prop: "jssj", fieldType: "ftDateTime"},
]
}
},
activated(){
this.$refs.TablePager.pageQuery()
},
deactivated(){
console.log('deactivated')
},
methods: {
/* 考试按钮*/
ksks(row){
this.$confirm('确定进行考试吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let id=row.id
this.$router.push({path: '/paper/'+id,query: { singleItem: row}})
})
},
/* 基础查询*/
query: queryKssj,
/* 基础增*/
// apiAdd: doAdd,
// /* 基础更新*/
// apiUpdate: doUpdate,
// /* 删除操作*/
// apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
......@@ -81,7 +81,7 @@
/* 表格标题对应参数*/
tableTitle: [
// {label: "试卷ID", prop: "mid", fieldType: "ftString",width:192},
{label: "序号", prop: "xh", fieldType: "int",width:60},
// {label: "序号", prop: "xh", fieldType: "int",width:60},
{label: "试题", prop: "cont", fieldType: "ftString",width:850},
{label: "类型", prop: "type", formatter:(a,b,c)=>{
let val=this.typeObj[c]
......
......@@ -44,7 +44,7 @@
@current-change="currentPageChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30]"
layout="total, sizes, prev, pager, next, jumper"
layout="total, sizes, prev, pager, next"
>
</el-pagination>
</el-row>
......
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules" style="padding-right: 50px;">
<el-row :gutter="40">
<el-col :span="24">
<el-form-item label="考试主题" ref="name" prop="name">
......@@ -23,44 +23,44 @@
</el-row>
<el-row :gutter="40">
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="单选题量" ref="scount" prop="scount">
<el-form-item :rules="[{ required: true,pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="单选题量" ref="scount" prop="scount">
<el-input type="number" :readonly="readonly" v-model="form.scount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="单选题分值" ref="sscore" prop="sscore">
<el-form-item :rules="[{ required: true,pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="单选题分值" ref="sscore" prop="sscore">
<el-input type="number" :readonly="readonly" v-model="form.sscore" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="多选题量" ref="mcount" prop="mcount">
<el-form-item :rules="[{ required: true,pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="多选题量" ref="mcount" prop="mcount">
<el-input type="number" :readonly="readonly" v-model="form.mcount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="多选题分值" ref="mscore" prop="mscore">
<el-form-item :rules="[{ required: true,pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="多选题分值" ref="mscore" prop="mscore">
<el-input type="number" :readonly="readonly" v-model="form.mscore" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="40">
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="判断题量" ref="jcount" prop="jcount">
<el-form-item :rules="[{ required: true,pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="判断题量" ref="jcount" prop="jcount">
<el-input type="number" :readonly="readonly" v-model="form.jcount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="判断题分值" ref="jscore" prop="jscore">
<el-form-item :rules="[{ required: true,pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="判断题分值" ref="jscore" prop="jscore">
<el-input type="number" :readonly="readonly" v-model="form.jscore" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="填空题量" ref="fcount" prop="fcount">
<el-form-item :rules="[{ required: true,pattern: /^[0-9]\d*$/,message: '请输入整数!'}]" label="填空题量" ref="fcount" prop="fcount">
<el-input type="number" :readonly="readonly" v-model="form.fcount" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="[{pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="填空题分值" ref="fscore" prop="fscore">
<el-form-item :rules="[{ required: true,pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="填空题分值" ref="fscore" prop="fscore">
<el-input type="number" :readonly="readonly" v-model="form.fscore" ></el-input>
</el-form-item>
</el-col>
......@@ -91,7 +91,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="40">
<!-- <el-row :gutter="40">
<el-col :span="12">
<el-form-item label="开始时间" ref="kssj" prop="kssj">
<el-date-picker value-format="timestamp" style="width: 100%;" :readonly="readonly" type="date"
......@@ -106,7 +106,7 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
</el-form>
</RelDialog>
</template>
......@@ -250,7 +250,7 @@
},
/* form提交时的规则,具体规则参考官网*/
rules: {
xtms:[
{
required: true,
......@@ -265,16 +265,16 @@
required: true,
trigger: 'blur'
}, ],
jssj: [{
required: true,
trigger: 'blur'
}, ],
kssc:[
{
required: true,
trigger: 'blur'
}
],
// jssj: [{
// required: true,
// trigger: 'blur'
// }, ],
// kssc:[
// {
// required: true,
// trigger: 'blur'
// }
// ],
}
}
},
......
......@@ -22,7 +22,9 @@
<EditButton ref="edit" :app='app'></EditButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<el-button @click="zdst" size='mini' style="margin-left: 0px;" type="primary">指定试题</el-button>
<el-button @click="zdst" size='mini' type="primary">指定试题</el-button>
<!-- <el-button @click="mnks" size='mini' type="primary">模拟考试</el-button> -->
<el-button @click="fbsj" size='mini' type="primary">发布试卷</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
......@@ -45,7 +47,8 @@
doQuery,
doAdd,
doUpdate,
doDelete
doDelete,
doBegin
} from '@/api/train/examination.js';
/* edit页面*/
import Edit from './edit'
......@@ -104,8 +107,8 @@
url:'/aqgl/pxgl/pxsj/init/zt',label:'name',value:'id'
}},
{label: "开始时间", prop: "kssj", fieldType: "ftDateTime"},
{label: "结束时间", prop: "jssj", fieldType: "ftDateTime"},
// {label: "开始时间", prop: "kssj", fieldType: "ftDateTime"},
// {label: "结束时间", prop: "jssj", fieldType: "ftDateTime"},
]
}
},
......@@ -115,13 +118,52 @@
if(this.singleItem.xtms=='F'){
this.DialogTitle=this.singleItem.name
this.showDialog=true
}else{
this.$warning('只能选择固定卷进行修改');
}
} else {
this.$warning('请选中一行操作');
}
},
fbsj(){
if (this.app.selectOne || this.app.clickOne) {
this.$confirm('确定发布该试卷吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
doBegin({id:this.singleItem.id}).then(res=>{
if(res.success){
this.$success('该试卷发布成功!')
this.$refs.TablePager.pageQuery()
}
})
// let id=this.singleItem.id
// this.$router.push({path: '/paper/'+id,query: { singleItem: this.singleItem}})
})
} else {
this.$warning('请选中一行操作');
}
},
mnks(){
if (this.app.selectOne || this.app.clickOne) {
this.$confirm('确定进行考试吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let id=this.singleItem.id
this.$router.push({path: '/paper/'+id,query: { singleItem: this.singleItem}})
})
} else {
this.$warning('请选中一行操作');
}
},
/* 基础查询*/
query: doQuery,
......
This diff is collapsed.
......@@ -30,8 +30,8 @@
</div>
<!-- 判断题 -->
<div v-if="type=='PDT'" class="options">
<div class="item" :key="index" v-for="(item,index) in options">
<el-radio :disabled='allItem.result' v-model="value" :label="index"> {{`${index}.${item}`}}</el-radio>
<div class="item" :key="index" v-for="(item,index) in pDoptions">
<el-radio :disabled='allItem.result' v-model="value" :label="index"> {{`${index}`}}</el-radio>
</div>
</div>
<!-- 答案显示-->
......@@ -122,6 +122,10 @@
},
data() {
return {
pDoptions:{
'正确':'Y',
'错误':'N'
},
value: '',
valueList: [],
}
......
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