|
@@ -1,138 +1,131 @@
|
|
<template>
|
|
<template>
|
|
<section class="content">
|
|
<section class="content">
|
|
- <div class="box box-info box_width_lg">
|
|
|
|
- <!-- 正文信息 -->
|
|
|
|
- <div class="box-body">
|
|
|
|
- <el-form
|
|
|
|
- :inline="true"
|
|
|
|
- :model="paperTitleForm"
|
|
|
|
- label-width="150px"
|
|
|
|
- class="demo-ruleForm"
|
|
|
|
- >
|
|
|
|
- <el-row>
|
|
|
|
- <el-form-item label="课程名称(代码)" class="pull-left">
|
|
|
|
- <el-select
|
|
|
|
- class="dialog_input_width"
|
|
|
|
- @change="searchGenPaper"
|
|
|
|
- v-model="paperTitleForm.courseNo"
|
|
|
|
- filterable
|
|
|
|
- remote
|
|
|
|
- placeholder="请输入课程名称(代码)"
|
|
|
|
- :remote-method="queryCoursesByKeyword"
|
|
|
|
|
|
+ <!-- 正文信息 -->
|
|
|
|
+ <div class="box-body">
|
|
|
|
+ <el-form :inline="true" :model="paperTitleForm" label-width="150px">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label="课程名称(代码)" class="pull-left">
|
|
|
|
+ <el-select
|
|
|
|
+ class="dialog_input_width"
|
|
|
|
+ @change="searchGenPaper"
|
|
|
|
+ v-model="paperTitleForm.courseNo"
|
|
|
|
+ filterable
|
|
|
|
+ remote
|
|
|
|
+ placeholder="请输入课程名称(代码)"
|
|
|
|
+ :remote-method="queryCoursesByKeyword"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in courseInfoSelect"
|
|
|
|
+ :key="item.courseNo"
|
|
|
|
+ :label="item.courseInfo"
|
|
|
|
+ :value="item.courseNo"
|
|
>
|
|
>
|
|
- <el-option
|
|
|
|
- v-for="item in courseInfoSelect"
|
|
|
|
- :key="item.courseNo"
|
|
|
|
- :label="item.courseInfo"
|
|
|
|
- :value="item.courseNo"
|
|
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row v-if="paperTitelDisable">
|
|
|
|
- <el-form-item label="试卷名称" class="pull-left">
|
|
|
|
- <el-select
|
|
|
|
- class="dialog_input_width"
|
|
|
|
- v-model="paperTitleForm.paperId"
|
|
|
|
- filterable
|
|
|
|
- placeholder="请选择"
|
|
|
|
- @change="searchPaperDetail"
|
|
|
|
- sytle="width:220px;"
|
|
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row v-if="paperTitelDisable">
|
|
|
|
+ <el-form-item label="试卷名称" class="pull-left">
|
|
|
|
+ <el-select
|
|
|
|
+ class="dialog_input_width"
|
|
|
|
+ v-model="paperTitleForm.paperId"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="searchPaperDetail"
|
|
|
|
+ sytle="width:220px;"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in paperInfoSelect"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :key="item.id"
|
|
>
|
|
>
|
|
- <el-option
|
|
|
|
- v-for="item in paperInfoSelect"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id"
|
|
|
|
- :key="item.id"
|
|
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- <span style="padding-left:5px;">
|
|
|
|
- <el-button type="primary" @click="insertPaper"
|
|
|
|
- ><i class="el-icon-plus"></i> 新增试卷</el-button
|
|
|
|
- >
|
|
|
|
- </span>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row v-if="paperDetailDisable">
|
|
|
|
- <el-form-item label="试卷大题" class="pull-left">
|
|
|
|
- <el-select
|
|
|
|
- class="dialog_input_width"
|
|
|
|
- v-model="paperTitleForm.paperDetailId"
|
|
|
|
- filterable
|
|
|
|
- placeholder="请选择"
|
|
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <span style="padding-left:5px;">
|
|
|
|
+ <el-button type="primary" @click="insertPaper"
|
|
|
|
+ ><i class="el-icon-plus"></i> 新增试卷</el-button
|
|
>
|
|
>
|
|
- <el-option
|
|
|
|
- v-for="item in paperDetailInfoSelect"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id"
|
|
|
|
- :key="item.id"
|
|
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ </span>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row v-if="paperDetailDisable">
|
|
|
|
+ <el-form-item label="试卷大题" class="pull-left">
|
|
|
|
+ <el-select
|
|
|
|
+ class="dialog_input_width"
|
|
|
|
+ v-model="paperTitleForm.paperDetailId"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in paperDetailInfoSelect"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label="题型" class="pull-left">
|
|
|
|
+ <el-select
|
|
|
|
+ class="dialog_input_width"
|
|
|
|
+ v-model="paperTitleForm.value"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in quesTypes"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label=" " class="pull-left">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="nextDisabled"
|
|
|
|
+ @click="submitForm"
|
|
|
|
+ >下一步
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ <!-- 添加试卷弹出框 -->
|
|
|
|
+ <el-dialog title="新增试卷" :visible.sync="paperDialog" width="500px">
|
|
|
|
+ <el-form
|
|
|
|
+ :model="paperForm"
|
|
|
|
+ ref="paperForm"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ label-position="right"
|
|
|
|
+ label-width="120px"
|
|
|
|
+ inline-message
|
|
|
|
+ >
|
|
<el-row>
|
|
<el-row>
|
|
- <el-form-item label="题型" class="pull-left">
|
|
|
|
- <el-select
|
|
|
|
|
|
+ <el-form-item label="试卷名称" label-width="120px" prop="name">
|
|
|
|
+ <el-input
|
|
class="dialog_input_width"
|
|
class="dialog_input_width"
|
|
- v-model="paperTitleForm.value"
|
|
|
|
- filterable
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in quesTypes"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- :key="item.id"
|
|
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ v-model="paperForm.name"
|
|
|
|
+ placeholder="请输入试卷名称"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row>
|
|
|
|
- <el-form-item label=" " class="pull-left">
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="nextDisabled"
|
|
|
|
- @click="submitForm"
|
|
|
|
- >下一步
|
|
|
|
- </el-button>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-row class="margin_top_10 margin_left_120">
|
|
|
|
+ <el-button type="primary" @click="submitPaperForm('paperForm')"
|
|
|
|
+ >保 存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button @click="resetPaperForm('paperForm')"
|
|
|
|
+ ><i class="el-icon-refresh"></i> 重 置</el-button
|
|
|
|
+ >
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
-
|
|
|
|
- <!-- 添加试卷弹出框 -->
|
|
|
|
- <el-dialog title="新增试卷" :visible.sync="paperDialog" width="500px">
|
|
|
|
- <el-form
|
|
|
|
- :model="paperForm"
|
|
|
|
- ref="paperForm"
|
|
|
|
- :rules="rules"
|
|
|
|
- label-position="right"
|
|
|
|
- label-width="120px"
|
|
|
|
- inline-message
|
|
|
|
- >
|
|
|
|
- <el-row>
|
|
|
|
- <el-form-item label="试卷名称" label-width="120px" prop="name">
|
|
|
|
- <el-input
|
|
|
|
- class="dialog_input_width"
|
|
|
|
- v-model="paperForm.name"
|
|
|
|
- placeholder="请输入试卷名称"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row class="margin_top_10 margin_left_120">
|
|
|
|
- <el-button type="primary" @click="submitPaperForm('paperForm')"
|
|
|
|
- >保 存</el-button
|
|
|
|
- >
|
|
|
|
- <el-button @click="resetPaperForm('paperForm')"
|
|
|
|
- ><i class="el-icon-refresh"></i> 重 置</el-button
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
- </el-form>
|
|
|
|
- </el-dialog>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
@@ -257,7 +250,7 @@ export default {
|
|
this.paperDialog = false;
|
|
this.paperDialog = false;
|
|
})
|
|
})
|
|
.catch(error => {
|
|
.catch(error => {
|
|
- this.$notify({ type: "error", message: error.body.msg });
|
|
|
|
|
|
+ this.$notify({ type: "error", message: error.response.data.msg });
|
|
this.paperDialog = false;
|
|
this.paperDialog = false;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|