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

构建试卷

parent 0546a628
......@@ -873,37 +873,36 @@ export const powerRoutes=[
name:'testPaper',
path:"testPaper"
},
/*,
{
commonComponent:'paperManagement',
component:() => import( "@/views/train/paperManagement/index"),
component:'train/onlinExamination/index',
hidden:false,
meta:{
"title": "试卷管理",
"title": "在线考试管理",
"icon": "",
"noCache": false,
"link": null,
"mkid":1010013009,
"mkid":'test',
},
name:'paperManagement',
path:"paperManagement"
name:'onlinExamination',
path:"onlinExamination"
},
{
commonComponent:'onlinExamination',
component:() => import( "@/views/train/onlinExamination/index"),
component:'train/paperManagement/index',
hidden:false,
meta:{
"title": "在线考试管理",
"title": "试卷管理",
"icon": "",
"noCache": false,
"link": null,
"mkid":1010013009,
"mkid":906001000,
},
name:'onlinExamination',
path:"onlinExamination"
name:'paperManagement',
path:"paperManagement"
},
/*,
{
commonComponent:'marking',
component:() => import( "@/views/train/marking/index"),
......@@ -936,6 +935,19 @@ export const powerRoutes=[
]
},
{
path:"/paper/:id",
component:'train/testPaper/index',
hidden:true,
meta:{
"title": "考试试卷",
"icon": "",
"noCache": false,
"link": null,
"mkid":'test',
},
name:'paper',
},
/* 查询统计 */
{
path: '/statistics',
......
......@@ -81,7 +81,7 @@
<el-button class="butRight" plain type="primary" size="mini" style="width: 120px;" >检查答题情况</el-button>
</el-col>
<el-col :span="12">
<el-button class="butRight" plain type="primary" size="mini" style="width: 120px;">交卷</el-button>
<el-button @click='test()' class="butRight" plain type="primary" size="mini" style="width: 120px;">交卷</el-button>
</el-col>
</el-row>
</div>
......@@ -136,7 +136,9 @@
}
},
methods: {
test(){
this.$router.push({path: '/paper/ID123467'})
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
......
<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="12">
<el-form-item label="计划年份" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划月份" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="培训项目" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训对象" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训人数" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训目标" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训方式" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训时间" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训课时" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="授课人" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训单位" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: 'roleManagementEdit',
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
systemType: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
roleid: '',
rolename: '',
bz: "",
},
/* form提交时的规则,具体规则参考官网*/
rules: {
roleid: [{
required: true,
trigger: 'blur'
}, ],
rolename: [{
required: true,
trigger: 'blur'
}, ]
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<Step :app='app' v-if="showDialog"></Step>
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">专业:</span>
<el-date-picker></el-date-picker>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">岗位:</span>
<el-input></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">类型:</span>
<el-input></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
<el-button size='mini' @click.native="test()" class="margin-right-10" type="primary">step</el-button>
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
/* edit页面*/
import Edit from './edit'
import Step from './step'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'appVersion',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
DialogTitle:'自动组卷',
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
/* 基础url*/
baseUrl: 'kzzx/role',
/* 查询参数*/
queryParams: {
ksrq: '',
jsrq: ''
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '可用',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '试卷名称',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '机型',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '专业',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '岗位',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '单选题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '多选题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '判断题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '填空题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '简答题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '论述题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '实操题',
...this.$common('ftDateTime')
}
]
}
},
methods: {
test(){
this.showDialog=true
},
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 基础查询*/
query: QueryKzzxRole,
/* 基础增*/
apiAdd: AddKzzxRole,
/* 基础更新*/
apiUpdate: UpdateKzzxRole,
/* 删除操作*/
apiDelete: DeleteKzzxRole,
/* 初始化赋值操作*/
init() {
},
/* 启用停用*/
setEnable(id) {
this.$confirm('是否启用/停用该角色, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
QtKzzxRole(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
}
},
components: {
Edit,
Step
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div class="min_full" slot='form' style="height: 80vh;border: 0px;">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='this'></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>
<el-input v-model="queryParams.info"></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ViewButton ref="view" :app='this'></ViewButton>
<AddButton ref="add" :app='this'></AddButton>
<CopyButton ref="copy" :app='this'></CopyButton>
<EditButton ref="edit" :app='this'></EditButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</DefaultDialog>
</template>
<script>
/* 引入需要的接口*/
import {
doDtlQuery,
doDtlAdd,
doDtlUpdate,
doDtlDelete
} from '@/api/train/examination.js';
/* edit页面*/
import Edit from './dtlEdit.vue'
import {
tableMixin_noapp
} from 'common'
export default {
props:['app'],
mixins: [tableMixin_noapp],
name: 'aqgl.pxglPxsjmx',
/* 初始额外赋值*/
async mounted() {
this.queryParams.mid=this.app.singleItem.id
this.queryParams.xmid=this.app.singleItem.xmid
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '/aqgl/pxgl/pxsjmx',
/* 查询参数*/
queryParams: {
info: ''
},
/* 表格标题对应参数*/
tableTitle: [
// {label: "试卷ID", prop: "mid", fieldType: "ftString",width:192},
{label: "试题", prop: "stid", fieldType: "ftString",width:192},
{label: "序号", prop: "xh", fieldType: "int"},
]
}
},
methods: {
/* 基础查询*/
query: doDtlQuery,
/* 基础增*/
apiAdd: doDtlAdd,
/* 基础更新*/
apiUpdate: doDtlUpdate,
/* 删除操作*/
apiDelete: doDtlDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
......@@ -17,11 +17,9 @@
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
......@@ -57,6 +55,7 @@
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
......@@ -64,13 +63,15 @@
/*需要的额外参数 */
showDialog: false,
DialogName: '',
DialogWidth:'80%',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '/aqgl/pxgl/pxsjmx',
/* 查询参数*/
queryParams: {
info: ''
info: '',
mid:''
},
/* 表格标题对应参数*/
tableTitle: [
......@@ -106,4 +107,3 @@
<style scoped>
</style>
<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="24">
<el-form-item label="类型" >
<RelSelect style="width: 100%;" src='aqgl/pxgl/pxsj/init/stlx' :match="{value:'id',label:'name'}" v-model='type_copy' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="试题" ref="stid" prop="stid">
<RelSelect linkage :linkParams="{type:type_copy}" style="width: 100%;" src='aqgl/pxgl/pxst/query' :match="{value:'id',label:'cont'}" v-model='form.stid' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="序号" ref="xh" prop="xh">
<el-input :readonly="readonly" v-model="form.xh" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
this.$nextTick(()=>{
this.form.mid=this.app.queryParams.mid
})
},
/* 组件名称*/
name: "aqgl.pxglPxsjmxEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
type_copy:'S',
xmid:'',
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
//ID
id:'',
//试卷ID
mid:'',
//试题ID
stid:'',
//序号
xh:'',
},
/* form提交时的规则,具体规则参考官网*/
rules: {
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
......@@ -2,107 +2,279 @@
<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-row :gutter="40">
<el-col :span="24">
<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="12">
<el-form-item label="计划年份" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<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="12">
<el-form-item label="计划月份" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item label="题库" ref="xmid" prop="xmid">
<RelSelect :readonly="readonly" filterable style="width: 100%;" clearable src='aqgl/pxgl/pxxm/query'
:match="{value:'id',label:'name'}" v-model='form.xmid'></RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="培训项目" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-row :gutter="40">
<el-col :span="12">
<el-form-item :rules="[{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-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-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-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-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-input type="number" :readonly="readonly" v-model="form.jscore" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训对象" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item :rules="[{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 label="培训人数" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item :rules="[{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>
</el-row>
<el-row :gutter="40">
<el-col :span="12">
<el-form-item label="培训目标" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item label="总分" ref="score" prop="score">
<el-input :readonly="true" v-model="form.score" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训方式" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item :rules="[{ required: true,pattern: /^[1-9]\d*$/,message: '请输入大于0的整数!'}]" label="时长(分钟)" ref="kssc" prop="kssc">
<el-input type="number" :readonly="readonly" v-model="form.kssc" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训时间" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item label="选题模式" ref="xtms" prop="xtms">
<!-- <el-input :readonly="readonly" v-model="form.xtms" ></el-input> -->
<RelSelect :readonly="readonly" filterable style="width: 100%;" clearable src='aqgl/pxgl/pxsj/init/xtms'
:match="{value:'id',label:'name'}" v-model='form.xtms'></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训课时" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="40">
<el-col :span="12">
<el-form-item label="授课人" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item label="开始时间" ref="kssj" prop="kssj">
<el-date-picker value-format="timestamp" style="width: 100%;" :readonly="readonly" type="date"
v-model="form.kssj" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训单位" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-form-item label="结束时间" ref="jssj" prop="jssj">
<el-date-picker value-format="timestamp" style="width: 100%;" :readonly="readonly" type="date"
v-model="form.jssj" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
computed:{
scount:function(){
if(this.form.scount){
return this.form.scount
}else{
return 0
}
},
sscore:function(){
if(this.form.sscore){
return this.form.sscore
}else{
return 0
}
},
mcount:function(){
if(this.form.mcount){
return this.form.mcount
}else{
return 0
}
},
mscore:function(){
if(this.form.mscore){
return this.form.mscore
}else{
return 0
}
},
jcount:function(){
if(this.form.jcount){
return this.form.jcount
}else{
return 0
}
},
jscore:function(){
if(this.form.jscore){
return this.form.jscore
}else{
return 0
}
},
fcount:function(){
if(this.form.fcount){
return this.form.fcount
}else{
return 0
}
},
fscore:function(){
if(this.form.fscore){
return this.form.fscore
}else{
return 0
}
}
},
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: 'roleManagementEdit',
name: "pxglPxsjEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
watch:{
'form':{
handler(val){
/* 总分*/
this.$nextTick(()=>{
this.form.score=this.scount*this.sscore+this.mcount*this.mscore+this.jcount*this.jscore+this.fcount*this.fscore
})
},
deep: true,
immediate: true
}
},
data() {
return {
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
roleid: '',
rolename: '',
bz: "",
//ID
id:'',
//考试主题
name:'',
//培训ID
pxid:'',
//题库ID
xmid:'',
//总分
score:'',
//单选题量
scount:'',
//单选题分值
sscore:'',
//多选题量
mcount:'',
//多选题分值
mscore:'',
//判断题量
jcount:'',
//判断题分值
jscore:'',
//填空题量
fcount:'',
//填空题分值
fscore:'',
//考试时长
kssc:'',
//选题模式
xtms:'',
//备注
bz:'',
//维护人编码
//系统版本
sysversion:'',
//状态
zt:'',
//开始时间
kssj:'',
//结束时间
jssj:'',
},
/* form提交时的规则,具体规则参考官网*/
rules: {
roleid: [{
xtms:[
{
required: true,
trigger: 'blur'
}
],
xmid: [{
required: true,
trigger: 'blur'
}, ],
rolename: [{
kssj: [{
required: true,
trigger: 'blur'
}, ]
}, ],
jssj: [{
required: true,
trigger: 'blur'
}, ],
kssc:[
{
required: true,
trigger: 'blur'
}
],
}
}
},
......
<template>
<div class="min_full">
<Step :app='app' v-if="showDialog"></Step>
<Dtl :app='this' v-if='showDialog' ></Dtl>
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="8" class="search-col">
<el-col :span="12" class="search-col">
<div class="search-item">
<span class="search-span">专业:</span>
<el-date-picker></el-date-picker>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">岗位:</span>
<el-input></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">类型:</span>
<el-input></el-input>
<span class="search-span">名称:</span>
<el-input v-model="queryParams.info"></el-input>
</div>
</el-col>
</el-row>
......@@ -32,52 +20,42 @@
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<el-button @click="zdst" size='mini' style="margin-left: 0px;" type="primary">指定试题</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<el-button size='mini' @click.native="test()" class="margin-right-10" type="primary">step</el-button>
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/train/examination.js';
/* edit页面*/
import Edit from './edit'
import Step from './step'
import Dtl from './dtl'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'appVersion',
name: 'pxglPxsj',
/* 初始额外赋值*/
async mounted() {
......@@ -85,131 +63,81 @@
},
data() {
return {
DialogTitle:'自动组卷',
/*需要的额外参数 */
showDialog: false,
DialogWidth:'80%',
DialogName: '',
type: '',
DialogTitle:'',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/pxgl/pxsj',
/* 查询参数*/
queryParams: {
ksrq: '',
jsrq: ''
info: ''
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '可用',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '试卷名称',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '机型',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '专业',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '岗位',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '单选题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '多选题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '判断题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '填空题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '简答题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '论述题',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '实操题',
...this.$common('ftDateTime')
}
{label: "考试主题", prop: "name", fieldType: "ftString",width:300},
{label: "培训ID", prop: "pxid", fieldType: "ftString",width:192},
{label: "题库", prop: "xmid", fieldType: "ftString",width:192,transform:{
url:'aqgl/pxgl/pxxm/query',label:'name',value:'id'
}},
{label: "总分", prop: "score", fieldType: "float",width:192},
{label: "单选题量", prop: "scount", fieldType: "int",width:192},
{label: "单选题分值", prop: "sscore", fieldType: "float",width:192},
{label: "多选题量", prop: "mcount", fieldType: "int",width:192},
{label: "多选题分值", prop: "mscore", fieldType: "float",width:192},
{label: "判断题量", prop: "jcount", fieldType: "int",width:192},
{label: "判断题分值", prop: "jscore", fieldType: "float",width:192},
{label: "填空题量", prop: "fcount", fieldType: "int",width:192},
{label: "填空题分值", prop: "fscore", fieldType: "float",width:192},
{label: "考试时长", prop: "kssc", fieldType: "float",width:192},
{label: "选题模式", prop: "xtms", fieldType: "ftString",width:160,transform:{
url:'/aqgl/pxgl/pxsj/init/xtms',label:'name',value:'id'
}},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString",width:192},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime",width:192},
{label: "创建人", prop: "cjr", fieldType: "ftString",width:192},
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
{label: "状态", prop: "zt", fieldType: "ftString",width:100,transform:{
url:'/aqgl/pxgl/pxsj/init/zt',label:'name',value:'id'
}},
{label: "开始时间", prop: "kssj", fieldType: "ftDateTime"},
{label: "结束时间", prop: "jssj", fieldType: "ftDateTime"},
]
}
},
methods: {
test(){
zdst(){
if (this.app.selectOne || this.app.clickOne) {
if(this.singleItem.xtms=='F'){
this.DialogTitle=this.singleItem.name
this.showDialog=true
},
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
}else{
this.$warning('只能选择固定卷进行修改');
}
} else {
this.$warning('请选中一行操作');
}
},
/* 基础查询*/
query: QueryKzzxRole,
query: doQuery,
/* 基础增*/
apiAdd: AddKzzxRole,
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: UpdateKzzxRole,
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: DeleteKzzxRole,
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
},
/* 启用停用*/
setEnable(id) {
this.$confirm('是否启用/停用该角色, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
QtKzzxRole(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
}
},
components: {
Edit,
Step
Edit,Dtl
}
......
<template>
<div class="testpaper">
<div ref="title" class="title">{{title}}
<!-- 批阅水印 -->
<div class="readover">
<div class="yyj">
已阅卷
</div>
<div class="df">
100分
</div>
</div>
<div ref="title" class="title">{{title+id}}
<span style="position: absolute;right: 36px;;font-size: 13px;font-weight: 300;">{{`剩余时间:${parseInt(remaining/(60*1000))}分钟${parseInt((remaining%(60*1000))/1000)}秒`}}</span>
</div>
<div class="info">
......@@ -18,7 +27,7 @@
</div>
</div>
<Subject :app='that' v-for='(item,index) in subjectList' :key="index" :index='index+1' :subject='item.subject' :score='item.score' :type='item.type' :options='item.options' ></Subject>
<div style="height: 50px;">
<div style="height: 200px;padding-top: 120px;">
<el-button @click="submit" size="mini" type="primary" style="float: right;width: 100px;">提交</el-button>
</div>
......@@ -37,6 +46,7 @@
import Subject from './subject'
export default{
created(){
this.id=this.$route.params.id
let type={
'S':'DXT',
'F':'TKT',
......@@ -87,6 +97,8 @@
},1000)
},
submit(){
/* 路由调回去*/
this.subjectList.forEach((item,index)=>{
if(item.value&&item.value.length>0){
......@@ -101,19 +113,8 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// this.$message({
// type: 'success',
// message: '试卷提交成功!'
// });
/* 计算*/
let sjdf=0
console.log(this.subjectList)
this.subjectList.forEach(item=>{
/* 单选题*/
sjdf++
})
this.$warning(`您获得了${sjdf}分!`)
this.$success('提交成功,您可以在考试记录中查看分数')
this.$router.replace({path:'/train/onlinExamination'})
}).catch(() => {
});
......@@ -121,10 +122,11 @@
},
data(){
return{
id:'',
startTime:new Date().getTime(),
endTime:new Date().getTime()+1000*120*60,
remaining:'',
title:'专八仪表考试测试1128(在线考试)',
title:'专八仪表考试测试ID:',
that:this,
subjectList:[]
}
......@@ -133,6 +135,34 @@
</script>
<style lang="scss">
.readover{
opacity: .5;
transform:rotate(30deg);
border: 3.2px solid;
color: chartreuse;
height: 170px;
width: 170px;
position: absolute;
right: 50px;
border-radius: 50%;
.yyj{
height: 85px;
font-weight: 800;
font-size: 26px;
line-height: 85px;
width: 100%;
text-align: center;
}
.df{
height: 85px;
font-weight: 800;
font-size: 20px;
// line-height: 85px;
width: 100%;
text-align: center;
}
}
$f:flex;
$mini:800px;
%normarflex{
......@@ -153,6 +183,7 @@
font-size:$fontsize
}
.testpaper{
padding-top: 30px;
.info{
@extend %normarflex;
@include normaltext(80px,center,700,13px);
......
......@@ -35,12 +35,17 @@
</div>
</div>
<!-- 答案显示-->
<!-- <br>
<span>结果:错误</span>
<div class="ans">
<br>
<span>本题答案是:A,B,C</span>
<span>结果:<span class="error">错误</span></span>
<br>
<span>答案解析:钝角</span> -->
<span>本题答案是:<span class="dajx" >A,B,C</span></span>
<br>
<span>您的答案是:<span class="dajx" >A</span></span>
<br>
<span>答案解析:<span class="dajx">对于线性表(734552564462010)进行散列存储时,若选用HK=K %9作为散列函数,则散列地址为1的元素有()个。</span></span>
</div>
</div>
</template>
......@@ -144,6 +149,21 @@
</script>
<style lang="scss" scope>
.ans{
color: #666;
font-size: 13px;
float: right;
width: 35%;
.error{
color: red;
}
.right{
color: #66FF00;
}
.dajx{
color: #000;
}
}
.el-radio__label {
font-size: 13px;
color: rgb(119, 119, 119);
......
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