|
@@ -1,20 +1,14 @@
|
|
<template>
|
|
<template>
|
|
<el-dialog
|
|
<el-dialog
|
|
ref="dialog"
|
|
ref="dialog"
|
|
|
|
+ custom-class="page-dialog"
|
|
title="编辑绑卷"
|
|
title="编辑绑卷"
|
|
width="800px"
|
|
width="800px"
|
|
:visible.sync="visible"
|
|
:visible.sync="visible"
|
|
@close="closeDialog"
|
|
@close="closeDialog"
|
|
>
|
|
>
|
|
- <el-form
|
|
|
|
- :model="form"
|
|
|
|
- ref="form"
|
|
|
|
- :rules="rules"
|
|
|
|
- label-position="right"
|
|
|
|
- label-width="120px"
|
|
|
|
- inline
|
|
|
|
- >
|
|
|
|
- <el-row>
|
|
|
|
|
|
+ <el-form :model="form" ref="form" :rules="rules" inline>
|
|
|
|
+ <div class="part-box part-box-form">
|
|
<el-form-item label="批次名称">
|
|
<el-form-item label="批次名称">
|
|
<ExamSelect v-model="course.examId" disabled />
|
|
<ExamSelect v-model="course.examId" disabled />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -25,74 +19,78 @@
|
|
disabled
|
|
disabled
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-table :data="papers" stripe style="width: 100%;">
|
|
|
|
- <el-table-column width="42" />
|
|
|
|
- <el-table-column width="100" label="ID">
|
|
|
|
- <span slot-scope="scope">{{ scope.row.id }}</span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="试卷名称">
|
|
|
|
- <span slot-scope="scope">{{ scope.row.name }}</span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column width="100" label="分值">
|
|
|
|
- <span slot-scope="scope">{{ scope.row.totalScore }}</span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column width="170" label="抽卷几率">
|
|
|
|
- <span slot-scope="scope">
|
|
|
|
- <el-input-number
|
|
|
|
- v-model.trim="scope.row.weight"
|
|
|
|
- :min="0"
|
|
|
|
- :step="1"
|
|
|
|
- step-strictly
|
|
|
|
- :max="100"
|
|
|
|
- style="width: 50px;"
|
|
|
|
- :controls="false"
|
|
|
|
- >
|
|
|
|
- </el-input-number>
|
|
|
|
- %
|
|
|
|
- </span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column width="170" label="音频播放次数">
|
|
|
|
- <span slot-scope="scope">
|
|
|
|
- <el-input-number
|
|
|
|
- :min="1"
|
|
|
|
- :max="1000"
|
|
|
|
- v-model.trim="scope.row.audioPlayCount"
|
|
|
|
- ></el-input-number>
|
|
|
|
- </span>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-form-item label="客观题小题乱序" prop="objectiveShuffle">
|
|
|
|
- <el-radio-group
|
|
|
|
- class="pull_right_sm"
|
|
|
|
- v-model="refreshCourse.objectiveShuffle"
|
|
|
|
- >
|
|
|
|
- <el-radio :label="1">启用</el-radio>
|
|
|
|
- <el-radio :label="0">禁用</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="toAddPaper">新增绑卷</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-row>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <el-table :data="papers" stripe style="width: 100%;">
|
|
|
|
+ <el-table-column label="试卷名称">
|
|
|
|
+ <span slot-scope="scope">{{ scope.row.name }}</span>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column width="100" label="分值">
|
|
|
|
+ <span slot-scope="scope">{{ scope.row.totalScore }}</span>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column width="170" label="抽卷几率">
|
|
|
|
+ <span slot-scope="scope">
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-model.trim="scope.row.weight"
|
|
|
|
+ :min="0"
|
|
|
|
+ :step="1"
|
|
|
|
+ step-strictly
|
|
|
|
+ :max="100"
|
|
|
|
+ style="width: 50px;"
|
|
|
|
+ :controls="false"
|
|
|
|
+ >
|
|
|
|
+ </el-input-number>
|
|
|
|
+ %
|
|
|
|
+ </span>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column width="170" label="音频播放次数">
|
|
|
|
+ <span slot-scope="scope">
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-model.trim="scope.row.audioPlayCount"
|
|
|
|
+ :min="1"
|
|
|
|
+ :max="1000"
|
|
|
|
+ :step="1"
|
|
|
|
+ step-strictly
|
|
|
|
+ ></el-input-number>
|
|
|
|
+ </span>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="100">
|
|
|
|
+ <div slot-scope="scope">
|
|
|
|
+ <el-button size="mini" type="danger" plain @click="toDelete(scope)">
|
|
|
|
+ 编辑
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
<el-row>
|
|
<el-row>
|
|
- <el-form-item label="客观题选项乱序" prop="optionShuffle">
|
|
|
|
- <el-radio-group
|
|
|
|
- class="pull_right_sm"
|
|
|
|
- v-model="refreshCourse.optionShuffle"
|
|
|
|
- >
|
|
|
|
- <el-radio :label="1">启用</el-radio>
|
|
|
|
- <el-radio :label="0">禁用</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row class="d-flex justify-content-center">
|
|
|
|
- <el-button type="primary" @click="submitForm" :loading="loading">
|
|
|
|
- 保 存
|
|
|
|
- </el-button>
|
|
|
|
- <el-button @click="closeDialog">取 消</el-button>
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="客观题小题乱序" prop="objectiveShuffle">
|
|
|
|
+ <el-radio-group v-model="refreshCourse.objectiveShuffle">
|
|
|
|
+ <el-radio :label="1">启用</el-radio>
|
|
|
|
+ <el-radio :label="0">禁用</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="客观题选项乱序" prop="optionShuffle">
|
|
|
|
+ <el-radio-group v-model="refreshCourse.optionShuffle">
|
|
|
|
+ <el-radio :label="1">启用</el-radio>
|
|
|
|
+ <el-radio :label="0">禁用</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="d-flex justify-content-center">
|
|
|
|
+ <el-button type="primary" @click="submitForm" :loading="loading">
|
|
|
|
+ 保 存
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button @click="closeDialog">取 消</el-button>
|
|
|
|
+ </div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -154,6 +152,18 @@ export default {
|
|
closeDialog() {
|
|
closeDialog() {
|
|
this.visible = false;
|
|
this.visible = false;
|
|
},
|
|
},
|
|
|
|
+ toAddPaper() {
|
|
|
|
+ this.papers.push({
|
|
|
|
+ id: null,
|
|
|
|
+ name: "",
|
|
|
|
+ totalScore: null,
|
|
|
|
+ weight: 100,
|
|
|
|
+ audioPlayCount: 2,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ toDelete({ $index }) {
|
|
|
|
+ this.papers.splice($index, 1);
|
|
|
|
+ },
|
|
async submitForm() {
|
|
async submitForm() {
|
|
try {
|
|
try {
|
|
const totalWieght = this.papers
|
|
const totalWieght = this.papers
|