Browse Source

题库提交

weiwenhai 6 years ago
parent
commit
2a19302090

+ 11 - 4
src/modules/questions/routes/routes.js

@@ -20,6 +20,7 @@ import EditOtherQuestion from "../views/EditOtherQuestion.vue";
 import InsertPaperTitle from "../views/InsertPaperTitle.vue";
 import EditPaper from "../views/EditPaper.vue";
 import PreviewPaper from "../views/PreviewPaper.vue";
+import SelectQuestion from "../views/SelectQuestion.vue";
 
 export default [
   {
@@ -67,10 +68,7 @@ export default [
         path: "gen_paper/:isClear", //卷库试卷列表
         component: GenPaper
       },
-      {
-        path: "edit_paper/:id/:parentView", //试卷编辑
-        component: EditPaper
-      },
+
       {
         path: "import_paper_info", //导入试卷页面
         component: ImportPaperInfo
@@ -128,5 +126,14 @@ export default [
         component: PreviewPaper
       }
     ]
+  },
+  {
+    path: "/edit_paper/:id/:parentView", //试卷编辑
+    component: EditPaper
+  },
+  {
+    path:
+      "/select_question/:id/:courseNo/:courseName/:paperDetailId/:parentView", //试卷选题
+    component: SelectQuestion
   }
 ];

+ 23 - 1
src/modules/questions/styles/Common.css

@@ -1,6 +1,6 @@
 /* 检索框的长度 */
 .search_width {
-  width: 195px;
+  width: 150px;
 }
 
 /* 查询按钮与检索框对齐 */
@@ -16,3 +16,25 @@
 .button_left {
   margin-left: 10px;
 }
+
+.paper_title {
+  background-color: bisque;
+  width: 400px;
+  border-top-right-radius: 15px;
+  border-bottom-right-radius: 15px;
+}
+
+.row_header_word {
+  font-size: 14px;
+  font-weight: bold;
+}
+
+.row_quesBody {
+  cursor: pointer;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.row_quesBody p {
+  font-size: 13px;
+}

+ 2 - 2
src/modules/questions/styles/EditPaper.css

@@ -125,8 +125,8 @@ textarea {
 }
 .paper-top-div {
   float: left;
-  margin-left: 20px;
-  padding-left: 10px;
+  margin-left: 5px;
+  padding-left: 5px;
 }
 .paper-top-title {
   font-size: 16px;

+ 7 - 9
src/modules/questions/views/BluePaperStructure.vue

@@ -69,7 +69,7 @@
         style="width: 100%;text-align:center;"
         @selection-change="selectionChange"
       >
-        <el-table-column type="selection"></el-table-column>
+        <el-table-column type="selection" width="35"></el-table-column>
         <el-table-column label="蓝图试卷结构名称">
           <template slot-scope="scope">
             <span>{{ scope.row.name }}</span>
@@ -80,27 +80,27 @@
             <span>{{ scope.row.courseName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="课程代码" width="150">
+        <el-table-column label="课程代码" width="90">
           <template slot-scope="scope">
             <span>{{ scope.row.courseNo }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="类型" width="100">
+        <el-table-column label="类型" width="80">
           <template slot-scope="scope">
             <span>{{ getType(scope.row.genPaperType) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="大题数" width="80">
+        <el-table-column label="大题数" width="65">
           <template slot-scope="scope">
             <span>{{ scope.row.detailCount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="难度" width="120">
+        <el-table-column label="难度" width="95">
           <template slot-scope="scope">
             <span>{{ getDifficulty(scope.row.difficulty) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="总分" width="80">
+        <el-table-column label="总分" width="55">
           <template slot-scope="scope">
             <span>{{ scope.row.totalScore }}</span>
           </template>
@@ -360,6 +360,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 3 - 5
src/modules/questions/views/CourseProperty.vue

@@ -73,7 +73,7 @@
         style="width:100%;"
         @selection-change="selectionChange"
       >
-        <el-table-column type="selection"></el-table-column>
+        <el-table-column type="selection" width="35"></el-table-column>
         <el-table-column label="课程名称">
           <template slot-scope="scope">
             <span>{{ scope.row.courseName }}</span>
@@ -89,7 +89,7 @@
             <span>{{ getEnable(scope.row.enable) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作">
+        <el-table-column label="操作" width="260">
           <template slot-scope="scope">
             <div class="operate_left">
               <el-button
@@ -512,6 +512,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 1 - 0
src/modules/questions/views/EditOtherQuestion.vue

@@ -507,3 +507,4 @@ export default {
   mounted() {}
 };
 </script>
+<style scoped src="../styles/Common.css"></style>

+ 22 - 19
src/modules/questions/views/EditPaper.vue

@@ -33,7 +33,7 @@
             保存
           </el-button>
           <el-button type="danger" @click="deletePaper(paper.id)" size="small">
-            删除
+            <i class="el-icon-delete"></i> 删除
           </el-button>
           <el-button
             type="info"
@@ -43,7 +43,6 @@
           >
             查重
           </el-button>
-          <el-button @click="back" size="small"> 退回 </el-button>
           <el-button
             v-show="parentView == 'import_paper'"
             type="warning"
@@ -52,6 +51,9 @@
           >
             上传音频文件
           </el-button>
+          <el-button @click="back" size="small" type="success"
+            ><i class="el-icon-caret-left"></i> 退回</el-button
+          >
         </div>
       </div>
     </div>
@@ -67,11 +69,7 @@
         <br />
       </div>
       <div class="text-left">
-        <el-table
-          :data="paper.paperDetails"
-          border
-          style="width: 100%;text-align:center;"
-        >
+        <el-table :data="paper.paperDetails" border style="width: 100%;">
           <el-table-column header-align="center" label="大题名称">
             <template slot-scope="scope">
               <span>{{ scope.row.name }}</span>
@@ -157,16 +155,16 @@
             >
             <el-button
               size="small"
-              icon="arrow-up"
+              icon="el-icon-arrow-up"
               @click.stop="hideContent(index)"
-              >1</el-button
-            >
+              v-show="showButtons[index].up"
+            ></el-button>
             <el-button
               size="small"
-              icon="arrow-down"
+              icon="el-icon-arrow-down"
               @click.stop="showContent(index)"
-              >2</el-button
-            >
+              v-show="!showButtons[index].up"
+            ></el-button>
           </span>
         </div>
         <!-- 循环小题 -->
@@ -758,17 +756,22 @@ export default {
       secondPropertyList: [], //二级属性集合
       secondPropertyId: "", //二级属性id
       examRemark: "",
-      showQuestions: []
+      showQuestions: [],
+      showButtons: []
     };
   },
   methods: {
     //隐藏大题下的所有小题
     hideContent(index) {
+      console.log("up");
       this.showQuestions[index].is_show = false;
+      this.showButtons[index].up = false;
     },
     //展开大题下所有小题
     showContent(index) {
+      console.log("down");
       this.showQuestions[index].is_show = true;
+      this.showButtons[index].up = true;
     },
     quesMouseOver(index) {
       document.getElementById(index).style.visibility = "visible";
@@ -838,6 +841,7 @@ export default {
         if (this.paper.paperDetails && this.paper.paperDetails.length > 0) {
           for (let paperDetil of this.paper.paperDetails) {
             this.showQuestions.push({ is_show: true });
+            this.showButtons.push({ up: true });
             paperDetil.pubCount = 0;
             paperDetil.noPubCount = 0;
             if (
@@ -1587,10 +1591,10 @@ export default {
       if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
         return this.singleRightAnswer;
       } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
-        var obj = Object.assign({}, this.multipleRightAnswer); //浅拷贝;
+        var obj = this.multipleRightAnswer;
         return obj.sort().toString();
       }
-      return null;
+      return this.quesModel.quesAnswer;
     }
   },
   watch: {},
@@ -1610,8 +1614,7 @@ export default {
   mounted() {}
 };
 </script>
-
-<style scoped>
+<style scoped src="../styles/EditPaper.css">
 .property_with {
   width: 100px;
 }
@@ -1619,4 +1622,4 @@ export default {
   z-index: 9999;
 }
 </style>
-<style scoped src="../styles/EditPaper.css"></style>
+<style scoped src="../styles/Common.css"></style>

+ 1 - 0
src/modules/questions/views/EditSelectQuestion.vue

@@ -628,3 +628,4 @@ export default {
   }
 };
 </script>
+<style scoped src="../styles/Common.css"></style>

+ 9 - 7
src/modules/questions/views/ExportStructure.vue

@@ -76,6 +76,7 @@
               <el-button size="small" type="primary" @click="search"
                 ><i class="el-icon-search"></i> 查询</el-button
               >
+              <el-button size="small" @click="resetForm">重 置</el-button>
               <el-button size="small" type="primary" @click="add"
                 ><i class="el-icon-plus"></i> 新增</el-button
               >
@@ -384,6 +385,13 @@ export default {
     };
   },
   methods: {
+    resetForm() {
+      this.formSearch = {
+        examType: "",
+        examId: "",
+        exportType: ""
+      };
+    },
     search() {
       this.tableData = [];
       this.loading = true;
@@ -481,10 +489,6 @@ export default {
           this.search();
         });
     },
-    //重置
-    resetForm() {
-      this.$refs.exportStructure.resetFields();
-    },
     //取消
     cancel() {
       this.isShow = false;
@@ -662,6 +666,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 3 - 12
src/modules/questions/views/ExtractPaperInfo.vue

@@ -102,7 +102,7 @@
                       type="primary"
                       v-if="extractConfig.examType != 'TRADITION'"
                       @click="addOnLinePaper(examPaper.groupCode)"
-                      >添加试卷
+                      ><i class="el-icon-plus"></i> 新增试卷
                     </el-button>
                   </el-col>
                   <el-col
@@ -299,7 +299,6 @@ export default {
       isInsert: false
     };
   },
-
   methods: {
     //根据考务查询考试集合
     getExams(query) {
@@ -844,12 +843,6 @@ export default {
 };
 </script>
 <style scoped>
-.paper_title {
-  background-color: bisque;
-  width: 400px;
-  border-top-right-radius: 15px;
-  border-bottom-right-radius: 15px;
-}
 .pull_right_ss {
   margin-left: 30px;
 }
@@ -872,11 +865,9 @@ export default {
 .margin-top-10 {
   margin-top: 10px;
 }
-.row_header_word {
-  font-size: 14px;
-  font-weight: bold;
-}
+
 .select_width_lg {
   width: 420px;
 }
 </style>
+<style scoped src="../styles/Common.css"></style>

+ 1 - 3
src/modules/questions/views/ExtractPaperRule.vue

@@ -642,6 +642,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 15 - 5
src/modules/questions/views/GenPaper.vue

@@ -64,6 +64,7 @@
               <el-button size="small" type="primary" @click="searchGenPaper"
                 ><i class="el-icon-search"></i> 查询</el-button
               >
+              <el-button size="small" @click="resetForm">重 置</el-button>
               <el-button size="small" type="primary" @click="genPaperDetail"
                 ><i class="el-icon-plus"></i> 组卷</el-button
               >
@@ -123,22 +124,22 @@
             <span>{{ scope.row.paperDetailCount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="录入员" width="100">
+        <el-table-column label="录入员" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.creator }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="创建时间" width="120">
+        <el-table-column label="创建时间" width="153">
           <template slot-scope="scope">
             <span>{{ scope.row.createTime }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="修改人" width="80">
+        <el-table-column label="修改人" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.lastModifyName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" width="178">
+        <el-table-column label="操作" width="180">
           <template slot-scope="scope">
             <div class="operate_left">
               <el-button
@@ -337,6 +338,14 @@ export default {
     };
   },
   methods: {
+    resetForm() {
+      this.formSearch = {
+        courseNo: "",
+        courseName: "",
+        level: "",
+        name: ""
+      };
+    },
     searchGenPaper() {
       this.loading = true;
       var url =
@@ -398,7 +407,7 @@ export default {
       );
       sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
       this.$router.push({
-        path: "/questions/edit_paper/" + row.id + "/gen_paper"
+        path: "/edit_paper/" + row.id + "/gen_paper"
       });
     },
     deleteGenPaper(row) {
@@ -708,3 +717,4 @@ export default {
   }
 };
 </script>
+<style scoped src="../styles/Common.css"></style>

+ 42 - 27
src/modules/questions/views/GenPaperDetail.vue

@@ -7,32 +7,46 @@
         label-position="right"
         label-width="100px"
       >
-        <el-form-item label="课程代码" class="form-item">
-          <el-input
-            :disabled="true"
-            placeholder="课程代码"
-            v-model="genPaper.courseNo"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="课程名称" class="form-item">
-          <el-input
-            :disabled="true"
-            placeholder="课程名称"
-            v-model="genPaper.courseName"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="试卷名称" class="form-item">
-          <el-input
-            placeholder="试卷名称"
-            v-model="genPaper.paperName"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="组卷套数" class="form-item">
-          <el-input
-            placeholder="组卷套数"
-            v-model="genPaper.genNumber"
-          ></el-input>
-        </el-form-item>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="课程代码" class="form-item">
+              <el-input
+                class="search_width"
+                :disabled="true"
+                placeholder="课程代码"
+                v-model="genPaper.courseNo"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="课程名称" class="form-item">
+              <el-input
+                class="search_width"
+                :disabled="true"
+                placeholder="课程名称"
+                v-model="genPaper.courseName"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="试卷名称" class="form-item">
+              <el-input
+                class="search_width"
+                placeholder="试卷名称"
+                v-model="genPaper.paperName"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="组卷套数" class="form-item">
+              <el-input
+                class="search_width"
+                placeholder="组卷套数"
+                v-model="genPaper.genNumber"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
     </div>
     <div class="tabs">
@@ -315,7 +329,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="小题数量" width="100">
+              <el-table-column label="小题数量" width="80">
                 <template slot-scope="scope">
                   <div>
                     <span>{{ scope.row.unitCount }}</span>
@@ -1152,3 +1166,4 @@ export default {
     margin-right: 10px;
 }
 </style>
+<style scoped src="../styles/Common.css"></style>

+ 8 - 10
src/modules/questions/views/ImportPaper.vue

@@ -65,11 +65,11 @@
                 ><i class="el-icon-search"></i> 查询</el-button
               >
               <el-button size="small" type="primary" @click="impPaper"
-                ><i class="el-icon-upload"></i> 导入试卷</el-button
+                ><i class="el-icon-upload"></i> 导入</el-button
               >
               <el-dropdown class="button_left">
                 <el-button type="primary" size="small">
-                  更多操作 <i class="el-icon-arrow-down el-icon--right"></i>
+                  更多 <i class="el-icon-arrow-down el-icon--right"></i>
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item>
@@ -142,22 +142,22 @@
             <span>{{ scope.row.paperDetailCount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="录入员" width="100">
+        <el-table-column label="录入员" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.creator }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="创建时间" width="120">
+        <el-table-column label="创建时间" width="153">
           <template slot-scope="scope">
             <span>{{ scope.row.createTime }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="修改人" width="80">
+        <el-table-column label="修改人" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.lastModifyName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" width="178">
+        <el-table-column label="操作" width="180">
           <template slot-scope="scope">
             <div class="operate_left">
               <el-button
@@ -378,7 +378,7 @@ export default {
       );
       sessionStorage.setItem("import_paper_currentPage", this.currentPage);
       this.$router.push({
-        path: "/questions/edit_paper/" + row.id + "/import_paper"
+        path: "/edit_paper/" + row.id + "/import_paper"
       });
     },
     deleteImportPaper(row) {
@@ -770,6 +770,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 110 - 131
src/modules/questions/views/ImportPaperInfo.vue

@@ -1,91 +1,70 @@
 <template>
-  <div>
-    <section class="content">
-      <div class="box box-info">
-        <!-- 头信息 -->
-        <div class="box-header with-border">
-          <h3 class="box-title">word文件上传</h3>
-        </div>
-        <!-- 正文信息 -->
-        <div
-          class="box-body"
-          v-loading.body="fileLoading"
-          element-loading-text="试题上传中,请稍后..."
-        >
-          <el-form
-            :inline="true"
-            :model="formSearch"
-            label-position="right"
-            label-width="100px"
-          >
-            <el-row>
-              <el-form-item
-                label="课程名称"
-                label-width="120px"
-                class="pull-left"
+  <section class="content">
+    <LinkTitlesCustom :currentPaths="['word文件上传']" />
+    <!-- 正文信息 -->
+    <div
+      class="box-body"
+      v-loading.body="fileLoading"
+      element-loading-text="试题上传中,请稍后..."
+    >
+      <el-form
+        :inline="true"
+        :model="formSearch"
+        label-position="right"
+        label-width="100px"
+      >
+        <el-row>
+          <el-form-item label="课程名称" label-width="120px" class="pull-left">
+            <el-select
+              v-model="formSearch.courseNo"
+              class="form_width"
+              filterable
+              :remote-method="getCourses"
+              remote
+              clearable
+              placeholder="请选择"
+              @change="searchCourseName"
+            >
+              <el-option
+                v-for="item in courseInfoSelect"
+                :label="item.courseInfo"
+                :value="item.courseNo"
+                :key="item.courseNo"
               >
-                <el-select
-                  v-model="formSearch.courseNo"
-                  class="form_width"
-                  filterable
-                  :remote-method="getCourses"
-                  remote
-                  clearable
-                  placeholder="请选择"
-                  @change="searchCourseName"
-                >
-                  <el-option
-                    v-for="item in courseInfoSelect"
-                    :label="item.courseInfo"
-                    :value="item.courseNo"
-                    :key="item.courseNo"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item class="pull-right">
-                <el-button type="primary" :plain="true" @click="back"
-                  >返回</el-button
-                >
-              </el-form-item>
-            </el-row>
-            <el-row>
-              <el-form-item
-                label="试卷名称"
-                label-width="120px"
-                class="pull-left"
-              >
-                <el-input
-                  placeholder="试卷名称"
-                  class="form_width"
-                  v-model="formSearch.name"
-                ></el-input>
-              </el-form-item>
-            </el-row>
-            <el-row>
-              <el-form-item
-                label="总分校验"
-                label-width="120px"
-                class="pull-left"
-              >
-                <el-radio v-model="scoreCheck" label="1">开启</el-radio>
-                <el-radio v-model="scoreCheck" label="0">关闭</el-radio>
-              </el-form-item>
-            </el-row>
-            <el-row v-if="scoreCheck == 1">
-              <el-form-item
-                label="试卷总分"
-                label-width="120px"
-                class="pull-left"
-              >
-                <el-input
-                  placeholder="试卷总分"
-                  class="form_width"
-                  v-model="formSearch.totalScore"
-                ></el-input>
-              </el-form-item>
-            </el-row>
-            <!--
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item class="pull-right">
+            <el-button type="success" @click="back"
+              ><i class="el-icon-caret-left"></i> 返回</el-button
+            >
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="试卷名称" label-width="120px" class="pull-left">
+            <el-input
+              placeholder="试卷名称"
+              class="form_width"
+              v-model="formSearch.name"
+            ></el-input>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="总分校验" label-width="120px" class="pull-left">
+            <el-radio v-model="scoreCheck" label="1">开启</el-radio>
+            <el-radio v-model="scoreCheck" label="0">关闭</el-radio>
+          </el-form-item>
+        </el-row>
+        <el-row v-if="scoreCheck == 1">
+          <el-form-item label="试卷总分" label-width="120px" class="pull-left">
+            <el-input
+              placeholder="试卷总分"
+              class="form_width"
+              v-model="formSearch.totalScore"
+            ></el-input>
+          </el-form-item>
+        </el-row>
+        <!--
               <el-row>
                   <el-form-item label="相同大题名称" label-width="120px" class="pull-left">
                       <el-radio  v-model="formSearch.sameName"  label="1">合并</el-radio>
@@ -93,56 +72,56 @@
                   </el-form-item>
               </el-row>
             -->
-            <el-row>
-              <el-form-item>
-                <el-upload
-                  class="form_left"
-                  ref="upload"
-                  accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
-                  :action="uploadAction"
-                  :headers="uploadHeaders"
-                  :data="uploadData"
-                  :before-upload="beforeUpload"
-                  :on-progress="uploadProgress"
-                  :on-success="uploadSuccess"
-                  :on-error="uploadError"
-                  :file-list="fileList"
-                  :auto-upload="false"
-                  :multiple="false"
-                >
-                  <el-button slot="trigger" type="primary">选择文件</el-button>
-                  <el-button
-                    style="margin-left:10px;"
-                    type="success"
-                    @click="submitUpload"
-                    >确认上传
-                  </el-button>
-                  <el-button
-                    style="margin-left: 10px;"
-                    type="danger"
-                    @click="removeFile"
-                    >清空文件
-                  </el-button>
-                  <div slot="tip" class="el-upload__tip">只能上传docx文件</div>
-                </el-upload>
-              </el-form-item>
-            </el-row>
-          </el-form>
-          <el-dialog title="错误提示" v-model="errDialog">
-            <span style="font-size: large">{{ errMessage }} !</span>
-            <span slot="footer" class="dialog-footer">
-              <el-button @click="errDialog = false">确定</el-button>
-            </span>
-          </el-dialog>
-        </div>
-      </div>
-    </section>
-  </div>
+        <el-row>
+          <el-form-item>
+            <el-upload
+              class="form_left"
+              ref="upload"
+              accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+              :action="uploadAction"
+              :headers="uploadHeaders"
+              :data="uploadData"
+              :before-upload="beforeUpload"
+              :on-progress="uploadProgress"
+              :on-success="uploadSuccess"
+              :on-error="uploadError"
+              :file-list="fileList"
+              :auto-upload="false"
+              :multiple="false"
+            >
+              <el-button slot="trigger" type="primary">选择文件</el-button>
+              <el-button
+                style="margin-left:10px;"
+                type="success"
+                @click="submitUpload"
+                >确认上传
+              </el-button>
+              <el-button
+                style="margin-left: 10px;"
+                type="danger"
+                @click="removeFile"
+                >清空文件
+              </el-button>
+              <div slot="tip" class="el-upload__tip">只能上传docx文件</div>
+            </el-upload>
+          </el-form-item>
+        </el-row>
+      </el-form>
+      <el-dialog title="错误提示" v-model="errDialog">
+        <span style="font-size: large">{{ errMessage }} !</span>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="errDialog = false">确定</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </section>
 </template>
 <script>
 import { CORE_API, QUESTION_API } from "@/constants/constants";
 import { mapState } from "vuex";
+import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 export default {
+  components: { LinkTitlesCustom },
   data() {
     return {
       scoreCheck: "0",

+ 8 - 21
src/modules/questions/views/InsertBluePaperStructure.vue

@@ -46,26 +46,14 @@
             </el-col>
             <el-col :span="6">
               <div class="search_down">
-                <el-button
-                  size="small"
-                  type="primary"
-                  @click="saveBlueStruct"
-                  icon="el-icon-circle-check"
+                <el-button size="small" type="primary" @click="saveBlueStruct"
                   >保 存</el-button
                 >
-                <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-plus"
-                  @click="insertDetail"
-                  >添加大题</el-button
+                <el-button size="small" type="primary" @click="insertDetail"
+                  ><i class="el-icon-plus"></i> 添加大题</el-button
                 >
-                <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-caret-left"
-                  @click="back"
-                  >返 回</el-button
+                <el-button size="small" type="success" @click="back"
+                  ><i class="el-icon-caret-left"></i> 返 回</el-button
                 >
               </div>
             </el-col>
@@ -196,9 +184,8 @@
                 <el-button
                   size="mini"
                   type="primary"
-                  icon="el-icon-plus"
                   @click="detailInfo(scope.row)"
-                  >大题详情</el-button
+                  ><i class="el-icon-plus"></i> 大题详情</el-button
                 >
                 <el-button
                   size="mini"
@@ -209,9 +196,8 @@
                 <el-button
                   size="mini"
                   type="danger"
-                  icon="el-icon-delete"
                   @click="deleteDetail(scope.row)"
-                  >删除</el-button
+                  ><i class="el-icon-delete"></i> 删除</el-button
                 >
               </div>
             </template>
@@ -642,3 +628,4 @@ export default {
   }
 };
 </script>
+<style scoped src="../styles/Common.css"></style>

+ 4 - 12
src/modules/questions/views/InsertBluePaperStructureInfo.vue

@@ -84,19 +84,11 @@
             </el-col>
             <el-col :span="6">
               <div class="search_down">
-                <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-circle-check"
-                  @click="saveForm"
+                <el-button size="small" type="primary" @click="saveForm"
                   >保 存</el-button
                 >
-                <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-caret-left"
-                  @click="back"
-                  >返 回</el-button
+                <el-button size="small" type="success" @click="back"
+                  ><i class="el-icon-caret-left"></i> 返 回</el-button
                 >
               </div>
             </el-col>
@@ -818,8 +810,8 @@ export default {
   }
 };
 </script>
+<style scoped src="../styles/Common.css"></style>
 <style scoped>
-@import "../styles/Common.css";
 .bg-purple-light {
   background: #e5e9d0;
 }

+ 6 - 16
src/modules/questions/views/InsertPaperStructure.vue

@@ -62,7 +62,6 @@
                 <el-button
                   size="small"
                   type="primary"
-                  icon="el-icon-circle-check"
                   :disabled="button_disabled"
                   @click="savePaperStruct()"
                   >保 存</el-button
@@ -70,17 +69,12 @@
                 <el-button
                   size="small"
                   type="primary"
-                  icon="el-icon-plus"
                   :disabled="button_disabled"
                   @click="insert()"
-                  >添加大题</el-button
+                  ><i class="el-icon-plus"></i> 新增大题</el-button
                 >
-                <el-button
-                  size="small"
-                  type="success"
-                  icon="el-icon-caret-left"
-                  @click="back"
-                  >返 回</el-button
+                <el-button size="small" type="success" @click="back"
+                  ><i class="el-icon-caret-left"></i> 返 回</el-button
                 >
               </div>
             </el-col>
@@ -165,9 +159,8 @@
                 <el-button
                   size="mini"
                   type="primary"
-                  icon="el-icon-plus"
                   @click="insertTopicStruct(scope.row)"
-                  >添加小题</el-button
+                  ><i class="el-icon-plus"></i> 添加小题</el-button
                 >
                 <el-button
                   size="mini"
@@ -178,9 +171,8 @@
                 <el-button
                   size="mini"
                   type="danger"
-                  icon="el-icon-delete"
                   @click="deletePaperDetail(scope.row.id)"
-                  >删除</el-button
+                  ><i class="el-icon-delete"></i> 删除</el-button
                 >
               </div>
             </template>
@@ -556,6 +548,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 10 - 16
src/modules/questions/views/InsertPaperStructureInfo.vue

@@ -83,15 +83,10 @@
               <el-button
                 size="small"
                 type="primary"
-                icon="el-icon-circle-check"
                 @click="submitForm('paperUnitForm')"
                 >保 存</el-button
               >
-              <el-button
-                size="small"
-                type="danger"
-                icon="el-icon-warning"
-                @click="resetForm('paperUnitForm')"
+              <el-button size="small" @click="resetForm('paperUnitForm')"
                 >重 置</el-button
               >
               <el-button
@@ -127,32 +122,32 @@
             <span>{{ scope.row.count }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="公开(简单)" width="90">
+        <el-table-column label="公开(简单)" width="88">
           <template slot-scope="scope">
             <span>{{ scope.row.publicSimple }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="公开(中等)" width="90">
+        <el-table-column label="公开(中等)" width="88">
           <template slot-scope="scope">
             <span>{{ scope.row.publicMedium }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="公开(困难)" width="90">
+        <el-table-column label="公开(困难)" width="88">
           <template slot-scope="scope">
             <span>{{ scope.row.publicDifficulty }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="非公开(简单)" width="105">
+        <el-table-column label="非公开(简单)" width="102">
           <template slot-scope="scope">
             <span>{{ scope.row.noPublicSimple }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="非公开(中等)" width="105">
+        <el-table-column label="非公开(中等)" width="102">
           <template slot-scope="scope">
             <span>{{ scope.row.noPublicMedium }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="非公开(困难)" width="105">
+        <el-table-column label="非公开(困难)" width="102">
           <template slot-scope="scope">
             <span>{{ scope.row.noPublicDifficulty }}</span>
           </template>
@@ -167,7 +162,7 @@
             <span>{{ scope.row.totalScore }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="来源大题" width="80">
+        <el-table-column label="来源大题" width="150">
           <template slot-scope="scope">
             <span>{{ getQuesNames(scope.row.quesNames) }}</span>
           </template>
@@ -184,9 +179,8 @@
               <el-button
                 size="mini"
                 type="danger"
-                icon="el-icon-delete"
                 @click="deleteUnit(scope.row.id)"
-                >删除</el-button
+                ><i class="el-icon-delete"></i> 删除</el-button
               >
             </div>
           </template>
@@ -1108,8 +1102,8 @@ export default {
   }
 };
 </script>
+<style scoped src="../styles/Common.css"></style>
 <style scoped>
-@import "../styles/Common.css";
 .el-row {
   margin-bottom: 20px;
 }

+ 122 - 127
src/modules/questions/views/InsertPaperTitle.vue

@@ -1,140 +1,134 @@
 <template>
-  <div>
-    <section class="content">
-      <div class="box box-info box_width_lg">
-        <!-- 头信息 -->
-        <div class="box-header with-border">
-          <h3 class="box-title">试题类型选择</h3>
-        </div>
-        <!-- 正文信息 -->
-        <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
-                  @change="searchGenPaper"
-                  style="width: 193px;"
-                  v-model="paperTitleForm.courseNo"
-                  filterable
-                  remote
-                  placeholder="请输入课程名称(代码)"
-                  :remote-method="queryCoursesByKeyword"
+  <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
+                @change="searchGenPaper"
+                style="width: 193px;"
+                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
-                  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
+                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>
-                <el-button type="info" @click="insertPaper">新增试卷</el-button>
-              </el-form-item>
-            </el-row>
-            <el-row v-if="paperDetailDisable">
-              <el-form-item label="试卷大题" class="pull-left">
-                <el-select
-                  v-model="paperTitleForm.paperDetailId"
-                  filterable
-                  placeholder="请选择"
+                </el-option>
+              </el-select>
+              <el-button type="info" @click="insertPaper">新增试卷</el-button>
+            </el-form-item>
+          </el-row>
+          <el-row v-if="paperDetailDisable">
+            <el-form-item label="试卷大题" class="pull-left">
+              <el-select
+                v-model="paperTitleForm.paperDetailId"
+                filterable
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="item in paperDetailInfoSelect"
+                  :label="item.name"
+                  :value="item.id"
+                  :key="item.id"
                 >
-                  <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
-                  v-model="paperTitleForm.value"
-                  filterable
-                  placeholder="请选择"
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-row>
+          <el-row>
+            <el-form-item label="题型" class="pull-left">
+              <el-select
+                v-model="paperTitleForm.value"
+                filterable
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="item in quesTypes"
+                  :label="item.label"
+                  :value="item.value"
+                  :key="item.id"
                 >
-                  <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-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="新增试卷" v-model="paperDialog" size="tiny">
+          <el-form
+            :inline="true"
+            :model="paperForm"
+            ref="paperForm"
+            :rules="rules"
+            label-position="right"
+            label-width="90px"
+          >
             <el-row>
-              <el-form-item label=" " class="pull-left">
-                <el-button
-                  type="primary"
-                  :disabled="nextDisabled"
-                  @click="submitForm"
-                  >下一步
-                </el-button>
+              <el-form-item label="试卷名称" label-width="120px" prop="name">
+                <el-input
+                  class="pull_length"
+                  v-model="paperForm.name"
+                  auto-complete="off"
+                  placeholder="请输入试卷名称"
+                ></el-input>
               </el-form-item>
             </el-row>
+            <el-row class="pull_center">
+              <el-button type="primary" @click="submitPaperForm('paperForm')"
+                >保 存</el-button
+              >
+              <el-button type="danger" @click="resetPaperForm('paperForm')"
+                >重 置</el-button
+              >
+            </el-row>
           </el-form>
-
-          <!-- 添加试卷弹出框 -->
-          <el-dialog title="新增试卷" v-model="paperDialog" size="tiny">
-            <el-form
-              :inline="true"
-              :model="paperForm"
-              ref="paperForm"
-              :rules="rules"
-              label-position="right"
-              label-width="90px"
-            >
-              <el-row>
-                <el-form-item label="试卷名称" label-width="120px" prop="name">
-                  <el-input
-                    class="pull_length"
-                    v-model="paperForm.name"
-                    auto-complete="off"
-                    placeholder="请输入试卷名称"
-                  ></el-input>
-                </el-form-item>
-              </el-row>
-              <el-row class="pull_center">
-                <el-button type="primary" @click="submitPaperForm('paperForm')"
-                  >保 存</el-button
-                >
-                <el-button type="danger" @click="resetPaperForm('paperForm')"
-                  >重 置</el-button
-                >
-              </el-row>
-            </el-form>
-          </el-dialog>
-        </div>
+        </el-dialog>
       </div>
-    </section>
-  </div>
+    </div>
+  </section>
 </template>
 <script>
 import { CORE_API, QUESTION_API } from "@/constants/constants";
@@ -372,6 +366,7 @@ export default {
   created() {}
 };
 </script>
+<style scoped src="../styles/Common.css"></style>
 <style scoped>
 .box_width_lg {
   width: 600px;

+ 16 - 10
src/modules/questions/views/PaperStructure.vue

@@ -37,7 +37,6 @@
                 filterable
                 :remote-method="getCourses"
                 remote
-                clearable
                 placeholder="请选择"
                 size="small"
               >
@@ -57,6 +56,7 @@
               <el-button size="small" type="primary" @click="searchPaperStructs"
                 ><i class="el-icon-search"></i> 查询</el-button
               >
+              <el-button size="small" @click="resetForm">重 置</el-button>
               <el-button size="small" type="primary" @click="addPaperStruct"
                 ><i class="el-icon-plus"></i> 新增</el-button
               >
@@ -81,7 +81,7 @@
         style="width: 100%;text-align:center;"
         @selection-change="selectionChange"
       >
-        <el-table-column type="selection"></el-table-column>
+        <el-table-column type="selection" width="35"></el-table-column>
         <el-table-column label="预设精确结构名称">
           <template slot-scope="scope">
             <span>{{ scope.row.name }}</span>
@@ -92,27 +92,27 @@
             <span>{{ scope.row.courseName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="课程代码" width="150">
+        <el-table-column label="课程代码" width="90">
           <template slot-scope="scope">
             <span>{{ scope.row.courseNo }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="类型" width="100">
+        <el-table-column label="类型" width="80">
           <template slot-scope="scope">
             <span>{{ getType(scope.row.courseNo) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="大题数" width="80">
+        <el-table-column label="大题数" width="65">
           <template slot-scope="scope">
             <span>{{ scope.row.detailCount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="小题数" width="80">
+        <el-table-column label="小题数" width="65">
           <template slot-scope="scope">
             <span>{{ scope.row.detailUnitCount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="总分" width="80">
+        <el-table-column label="总分" width="55">
           <template slot-scope="scope">
             <span>{{ scope.row.totalScore }}</span>
           </template>
@@ -178,6 +178,14 @@ export default {
     };
   },
   methods: {
+    //重置
+    resetForm() {
+      this.formSearch = {
+        name: "",
+        creator: "",
+        courseNo: "ALL"
+      };
+    },
     //查询
     searchPaperStructs() {
       this.loading = true;
@@ -362,6 +370,4 @@ export default {
   }
 };
 </script>
-<style scoped>
-@import "../styles/Common.css";
-</style>
+<style scoped src="../styles/Common.css"></style>

+ 46 - 25
src/modules/questions/views/PropertyInfo.vue

@@ -44,32 +44,53 @@
         <el-row :xs="7" :sm="7" :md="7" :lg="8">
           <div style="margin-left: 20px;">
             <el-form-item>
-              <el-button type="info" @click="insertParent">新增一级</el-button>
+              <el-button type="primary" @click="insertParent" size="small"
+                ><i class="el-icon-plus"></i> 新增一级</el-button
+              >
+
+              <el-button
+                type="primary"
+                size="small"
+                @click="insertSon"
+                :disabled="showSonButtton"
+                ><i class="el-icon-plus"></i> 新增二级</el-button
+              >
+              <el-button
+                type="primary"
+                size="small"
+                @click="updateProperty"
+                :disabled="showButton"
+                ><i class="el-icon-edit"></i>编辑</el-button
+              >
+              <el-button
+                type="danger"
+                size="small"
+                @click="deleteProperty"
+                :disabled="showButton"
+                ><i class="el-icon-delete"></i> 删除</el-button
+              >
+              <el-button
+                type="info"
+                @click="moveUp"
+                :disabled="showMoveButtton"
+                size="small"
+                ><i class="el-icon-arrow-up"></i> 上移</el-button
+              >
+              <el-button
+                type="info"
+                @click="moveDown"
+                :disabled="showMoveButtton"
+                size="small"
+                ><i class="el-icon-arrow-down"></i> 下移</el-button
+              >
+              <el-button
+                type="success"
+                icon="caret-left"
+                @click="back"
+                size="small"
+                ><i class="el-icon-caret-left"></i> 返 回</el-button
+              >
             </el-form-item>
-            <el-button type="info" @click="insertSon" :disabled="showSonButtton"
-              >新增二级</el-button
-            >
-            <el-button
-              type="warning"
-              @click="updateProperty"
-              :disabled="showButton"
-              >修改</el-button
-            >
-            <el-button
-              type="danger"
-              @click="deleteProperty"
-              :disabled="showButton"
-              >删除</el-button
-            >
-            <el-button type="info" @click="moveUp" :disabled="showMoveButtton"
-              >上移</el-button
-            >
-            <el-button type="info" @click="moveDown" :disabled="showMoveButtton"
-              >下移</el-button
-            >
-            <el-button type="primary" icon="caret-left" @click="back"
-              >返 回</el-button
-            >
           </div>
         </el-row>
       </el-form>

+ 12 - 18
src/modules/questions/views/Question.vue

@@ -642,15 +642,6 @@ export default {
             this.secondPropertyList = response.data;
           });
       }
-    },
-    answer() {
-      if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
-        return this.singleRightAnswer;
-      } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
-        return this.multipleRightAnswer.sort().toString();
-      } else {
-        return this.quesModel.quesAnswer;
-      }
     }
   },
   computed: {
@@ -663,6 +654,16 @@ export default {
       }
       return courseList;
     },
+    answer() {
+      if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
+        return this.singleRightAnswer;
+      } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
+        var obj = this.multipleRightAnswer;
+        return obj.sort().toString();
+      } else {
+        return this.quesModel.quesAnswer;
+      }
+    },
     updateFirst() {
       if (this.formSearch.coursePropertyName) {
         return false;
@@ -700,16 +701,9 @@ export default {
   }
 };
 </script>
-<style lang="css" scoped>
-.row_quesBody {
-  cursor: pointer;
-  white-space: nowrap;
-  overflow: hidden;
-}
-.row_quesBody p {
-  font-size: 13px;
-}
+<style scoped>
 .select_width {
   width: 150px;
 }
 </style>
+<style scoped src="../styles/Common.css"></style>

+ 433 - 0
src/modules/questions/views/SelectQuestion.vue

@@ -0,0 +1,433 @@
+<template>
+  <section class="content">
+    <LinkTitlesCustom :currentPaths="['添加试题']" />
+    <!-- 正文信息 -->
+    <div class="box-body">
+      <el-form
+        :inline="true"
+        :model="formSearch"
+        label-position="right"
+        label-width="90px"
+      >
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="课程">
+              <el-select
+                class="search_width"
+                :disabled="true"
+                v-model="course"
+                placeholder="请选择"
+                size="small"
+              >
+                <el-option
+                  v-for="item in courseList"
+                  :label="item.name"
+                  :value="item.value"
+                  :key="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="题型">
+              <el-select
+                class="search_width"
+                v-model="formSearch.questionType"
+                @change="searchQuestionPaper"
+                placeholder="请选择题型"
+                size="small"
+              >
+                <el-option
+                  v-for="item in questionTypes"
+                  :label="item.label"
+                  :value="item.value"
+                  :key="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="题干">
+              <el-input
+                class="search_width"
+                v-model="formSearch.quesBody"
+                placeholder="请输入题干"
+                @blur="searchQuestionPaper"
+                size="small"
+              >
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <div class="search_down">
+              <el-button
+                size="small"
+                type="primary"
+                icon="el-icon-circle-check"
+                @click="submitQues()"
+                >确定</el-button
+              >
+              <el-button
+                size="small"
+                type="success"
+                icon="el-icon-caret-left"
+                :plain="true"
+                @click="back()"
+                >返回</el-button
+              >
+            </div>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <!-- 页面列表 -->
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%;"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection" width="45"> </el-table-column>
+        <el-table-column label="课程">
+          <template slot-scope="scope">
+            <span v-if="scope.row.course != null">{{
+              scope.row.course.name
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="题型">
+          <template slot-scope="scope">
+            <span>{{ scope.row.questionType | questionType }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="题干">
+          <template slot-scope="scope">
+            <span class="small">
+              <a
+                href="javascript:;"
+                @click="prevViewQues(scope.row)"
+                v-html="scope.row.quesBody"
+              >
+              </a>
+            </span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!--分页栏-->
+      <div class="page pull-right">
+        <el-pagination
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-size="pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total"
+        >
+        </el-pagination>
+      </div>
+    </div>
+
+    <div class="text-left">
+      <el-dialog
+        @close="closeQuesDialog"
+        v-loading.body="dialogLoading"
+        title="试题预览"
+        :visible.sync="quesDialog"
+      >
+        <el-form :model="quesModel" label-position="right" label-width="80px">
+          <el-row :gutter="10">
+            <el-col :xs="10" :sm="10" :md="10" :lg="10">
+              <el-form-item label="题型">
+                <el-select
+                  :disabled="true"
+                  v-model="quesModel.questionType"
+                  placeholder="题型"
+                >
+                  <el-option
+                    v-for="item in questionTypes"
+                    :label="item.label"
+                    :value="item.value"
+                    :key="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="10">
+            <el-col :xs="30" :sm="30" :md="30" :lg="30">
+              <el-form-item label="题干">
+                <span v-html="quesModel.quesBody"></span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!--非套题-->
+          <div v-if="quesModel.questionType !== 'NESTED_ANSWER_QUESTION'">
+            <el-row
+              :gutter="10"
+              v-for="(quesOption, index) in quesModel.quesOptions"
+              :key="quesOption.number"
+            >
+              <el-col :xs="30" :sm="30" :md="30" :lg="30">
+                <el-form-item :label="index | optionOrderWordFilter">
+                  <span v-html="quesOption.optionBody"></span>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+          <!--套题-->
+          <div v-if="quesModel.questionType === 'NESTED_ANSWER_QUESTION'">
+            <el-row
+              :gutter="10"
+              v-for="(subQuestionModel, index) in quesModel.subQuestions"
+              :key="index"
+            >
+              <el-col :xs="30" :sm="30" :md="30" :lg="30">
+                <el-row>
+                  <el-form-item label="题目">
+                    <span v-html="subQuestionModel.quesBody"></span>
+                  </el-form-item>
+                </el-row>
+                <el-row
+                  :gutter="10"
+                  v-for="(subQuesOption, index) in subQuestionModel.quesOptions"
+                  :key="index"
+                >
+                  <el-col :xs="30" :sm="30" :md="30" :lg="30">
+                    <el-form-item :label="index | optionOrderWordFilter">
+                      <span v-html="subQuesOption.optionBody"></span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-form-item label="答案">
+                    <span v-html="subQuestionModel.quesAnswer"></span>
+                  </el-form-item>
+                </el-row>
+              </el-col>
+            </el-row>
+          </div>
+
+          <!--非套题答案-->
+          <div v-if="quesModel.questionType !== 'NESTED_ANSWER_QUESTION'">
+            <el-form-item label="答案">
+              <span v-html="answer"></span>
+            </el-form-item>
+          </div>
+        </el-form>
+      </el-dialog>
+    </div>
+  </section>
+</template>
+<script>
+import { QUESTION_API } from "@/constants/constants";
+import { QUESTION_TYPES } from "../constants/constants";
+import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
+export default {
+  components: { LinkTitlesCustom },
+  data() {
+    return {
+      formSearch: {
+        questionType: "",
+        quesBody: ""
+      },
+      course: "",
+      paperId: "",
+      paperDetailId: "",
+      parentView: "",
+      courseList: [],
+      tableData: [],
+      multipleSelection: [],
+      currentPage: 1,
+      pageSize: 10,
+      total: 10,
+      courseName: "",
+      quesModel: {},
+      questionTypes: QUESTION_TYPES,
+      quesDialog: false,
+      loading: false,
+      dialogLoading: false,
+      singleRightAnswer: "", //接收单选答案
+      multipleRightAnswer: [] //接收多选答案
+    };
+  },
+  methods: {
+    //查询列表
+    searchQuestionPaper() {
+      this.loading = true;
+      this.$http
+        .get(
+          QUESTION_API +
+            "/paper/listQuestion/" +
+            this.paperId +
+            "/" +
+            this.currentPage +
+            "/" +
+            this.pageSize +
+            "?quesType=" +
+            this.formSearch.questionType +
+            "&quesBody=" +
+            this.formSearch.quesBody
+        )
+        .then(response => {
+          this.tableData = response.data.content;
+          this.total = response.data.totalElements;
+          this.loading = false;
+        });
+    },
+    //分页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.searchQuestionPaper();
+    },
+    openQuesDialog() {
+      this.quesDialog = true;
+    },
+    closeQuesDialog() {
+      this.quesDialog = false;
+      this.quesModel = {};
+    },
+    //预览
+    prevViewQues(row) {
+      this.quesModel = row;
+      this.disposeSelectAnswer();
+      this.openQuesDialog();
+    },
+    //添加试题
+    submitQues() {
+      if (this.multipleSelection.length === 0) {
+        this.$notify({
+          type: "error",
+          message: "请选择要添加的试题"
+        });
+      } else {
+        this.$confirm("是否添加这些试题?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          console.log(this.multipleSelection[0]);
+          this.$http
+            .post(
+              QUESTION_API +
+                "/paper/selectQuestions/" +
+                this.paperId +
+                "/" +
+                this.paperDetailId,
+              this.multipleSelection
+            )
+            .then(() => {
+              this.$notify({
+                type: "success",
+                message: "添加成功!"
+              });
+              this.$router.push({
+                path: "/edit_paper/" + this.paperId + "/" + this.parentView
+              });
+            })
+            .catch(() => {
+              this.$notify({
+                type: "error",
+                message: "添加失败!"
+              });
+            });
+        });
+      }
+    },
+    //返回
+    back() {
+      this.$router.push({
+        path: "/edit_paper/" + this.paperId + "/" + this.parentView
+      });
+    },
+    //全选
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    /**
+     * 处理选择题答案显示
+     * 处理套题下选择题答案显示
+     */
+    disposeSelectAnswer() {
+      this.singleRightAnswer = "";
+      this.multipleRightAnswer = [];
+      //处理选择题答案显示
+      if (
+        this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" ||
+        this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION"
+      ) {
+        for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
+          var option_i = this.quesModel.quesOptions[i];
+          var orderNum_i = String.fromCharCode(65 + i);
+          if (
+            this.quesModel.questionType == "SINGLE_ANSWER_QUESTION" &&
+            option_i.isCorrect == 1
+          ) {
+            this.singleRightAnswer = orderNum_i;
+          }
+          if (
+            this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION" &&
+            option_i.isCorrect == 1
+          ) {
+            this.multipleRightAnswer.push(orderNum_i);
+          }
+        }
+      }
+      //处理套题下选择题答案显示
+      if (this.quesModel.questionType == "NESTED_ANSWER_QUESTION") {
+        var subQuestions = this.quesModel.subQuestions;
+        for (var k = 0; k < subQuestions.length; k++) {
+          var subQuestion = subQuestions[k];
+          if (subQuestion.questionType == "SINGLE_ANSWER_QUESTION") {
+            for (var j = 0; j < subQuestion.quesOptions.length; j++) {
+              var option_j = subQuestion.quesOptions[j];
+              var orderNum_j = String.fromCharCode(65 + j);
+              if (option_j.isCorrect == 1) {
+                subQuestion["quesAnswer"] = orderNum_j;
+              }
+            }
+          }
+          if (subQuestion.questionType == "MULTIPLE_ANSWER_QUESTION") {
+            var subQuestionMultipleRightAnswer = [];
+            for (var z = 0; z < subQuestion.quesOptions.length; z++) {
+              var option_k = subQuestion.quesOptions[z];
+              var orderNum_k = String.fromCharCode(65 + z);
+              if (option_k.isCorrect == 1) {
+                subQuestionMultipleRightAnswer.push(orderNum_k);
+              }
+            }
+            subQuestion[
+              "quesAnswer"
+            ] = subQuestionMultipleRightAnswer.sort().toString();
+          }
+        }
+      }
+    }
+  },
+  computed: {
+    answer: function() {
+      if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
+        return this.singleRightAnswer;
+      } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
+        var obj = Object.assign({}, this.multipleRightAnswer); //浅拷贝;
+        return obj.sort().toString();
+      } else {
+        return this.quesModel.quesAnswer;
+      }
+    }
+  },
+  //钩子函数
+  created() {
+    this.paperId = this.$route.params.id;
+    this.courseName = this.$route.params.courseName;
+    var courseNo = this.$route.params.courseNo;
+    this.paperDetailId = this.$route.params.paperDetailId;
+    this.parentView = this.$route.params.parentView;
+    this.courseList.push({ name: this.courseName, value: courseNo });
+    this.course = this.courseList[0].value;
+    this.searchQuestionPaper();
+  }
+};
+</script>
+<style></style>