50 lines
1.3 KiB
Vue
50 lines
1.3 KiB
Vue
<template>
|
|
<el-dialog
|
|
title="选择考试类型"
|
|
:visible.sync="dialogVisible"
|
|
:close-on-click-modal="false"
|
|
width="350px"
|
|
:before-do-close="close"
|
|
>
|
|
<div>
|
|
<el-form ref="ruleForm" :model="form" label-width="30px">
|
|
<el-form-item label="" prop="role">
|
|
<el-select v-model="form.type" style="width:260px">
|
|
<el-option label="练习模式" value="practice" />
|
|
<el-option label="测验模式" value="test" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="close">{{ $t('global.cancel') }}</el-button>
|
|
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name:'TheoryExamSelect',
|
|
data() {
|
|
return {
|
|
dialogVisible:false,
|
|
form:{
|
|
type:'practice'
|
|
}
|
|
};
|
|
},
|
|
methods:{
|
|
doShow() {
|
|
this.dialogVisible = true;
|
|
},
|
|
close() {
|
|
this.dialogVisible = false;
|
|
},
|
|
confirm() {
|
|
this.dialogVisible = false;
|
|
this.$emit('startTheoryExam', this.form);
|
|
}
|
|
}
|
|
};
|
|
</script>
|