Commit 13a27e70 authored by huangyy's avatar huangyy

一键重考

parent eb59f321
...@@ -173,3 +173,11 @@ method: 'post', ...@@ -173,3 +173,11 @@ method: 'post',
data: query||{} data: query||{}
}) })
} }
export function doOneClickRetake(data) {
return request({
url: 'aqgl/pxgl/pxsj/oneClickRetake',
method: 'post',
data
})
}
<template> <template>
<div class="min_full"> <div class="min_full">
<Dtl :app='this' v-if='showDialog&&DialogName=="zdst"' ></Dtl> <Dtl :app='this' v-if='showDialog&&DialogName=="zdst"' ></Dtl>
<Ckry :app='this' v-if='showDialog&&DialogName=="ckry"' ></Ckry> <Ckry :app='this' v-if='showDialog&&DialogName=="ckry"' ></Ckry>
<Retake :app='this' v-if='showDialog&&DialogName=="retake"' ></Retake>
<!-- 查询条件--> <!-- 查询条件-->
<div class="search" v-condition> <div class="search" v-condition>
...@@ -26,10 +27,11 @@ ...@@ -26,10 +27,11 @@
<ExcelButton :app='app'></ExcelButton> <ExcelButton :app='app'></ExcelButton>
<el-button @click="zdst" size='mini' 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="mnks" size='mini' type="primary">模拟考试</el-button> -->
<el-button @click="fbsj" size='mini' type="primary">发布试卷</el-button> <el-button @click="fbsj" size='mini' type="primary">发布试卷</el-button>
<!-- 额外按钮--> <!-- 额外按钮-->
<!-- 表头设置 --> <!-- 表头设置 -->
<el-button @click="ckzy" size='mini' type="primary">指定人员</el-button> <el-button @click="ckzy" size='mini' type="primary">指定人员</el-button>
<el-button @click="oneClickRetake" size='mini' type="primary">一键重考</el-button>
<!-- 权限--> <!-- 权限-->
</el-row> </el-row>
<!-- 表格--> <!-- 表格-->
...@@ -56,6 +58,7 @@ ...@@ -56,6 +58,7 @@
import Edit from './edit' import Edit from './edit'
import Dtl from './dtl' import Dtl from './dtl'
import Ckry from './ckry' import Ckry from './ckry'
import Retake from './retake'
import Selector from './selector' import Selector from './selector'
import { import {
tableMixin tableMixin
...@@ -72,7 +75,7 @@ ...@@ -72,7 +75,7 @@
return { return {
/*需要的额外参数 */ /*需要的额外参数 */
showDialog: false, showDialog: false,
DialogWidth:'85%', DialogWidth:'85%',
DialogName: '', DialogName: '',
type: '', type: '',
DialogTitle:'', DialogTitle:'',
...@@ -121,6 +124,16 @@ ...@@ -121,6 +124,16 @@
} }
}, },
methods: { methods: {
oneClickRetake() {
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle = '一键重考'
this.DialogWidth ='40%',
this.showDialog = true
this.DialogName = 'retake'
} else {
this.$warning('请选择一条信息!')
}
},
zdst(){ zdst(){
if (this.app.selectOne || this.app.clickOne) { if (this.app.selectOne || this.app.clickOne) {
if(this.singleItem.xtms=='F'){ if(this.singleItem.xtms=='F'){
...@@ -209,7 +222,7 @@ ...@@ -209,7 +222,7 @@
} }
}, },
components: { components: {
Edit,Dtl,Selector,Ckry Edit,Dtl,Selector,Ckry,Retake
} }
......
<template>
<DefaultDialog :app='app' >
<el-form slot="form" ref="form" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="开始时间" ref="kssj" prop="kssj">
<el-date-picker
style="width: 100%;"
v-model="form.kssj"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" ref="jssj" prop="jssj">
<el-date-picker
style="width: 100%;"
v-model="form.jssj"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import { doOneClickRetake } from '@/api/train/examination.js'
export default {
props: {
app: {
type: Object,
default: {}
}
},
data() {
return {
DialogWidth: '30%',
form: {
kssj: '',
jssj: ''
}
}
},
methods: {
save() {
if (!this.form.kssj || !this.form.jssj) {
this.$warning('请选择开始时间和结束时间')
return
}
const params = {
id: this.app.singleItem.id,
kssj: this.form.kssj,
jssj: this.form.jssj
}
doOneClickRetake(params).then(res => {
if (res.success) {
this.$success('重考设置成功')
this.app.showDialog = false
this.app.$refs['TablePager'].pageQuery()
}
})
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
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