From f17bdf638a105cf2fac84b0eabba5fd9f4dab79e Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 17 五月 2024 17:30:16 +0800
Subject: [PATCH] Merge branch 'dev-zhang'

---
 src/views/exam/paper/edit.vue |  496 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 258 insertions(+), 238 deletions(-)

diff --git a/src/views/exam/paper/edit.vue b/src/views/exam/paper/edit.vue
index 65d47b1..2fa591e 100644
--- a/src/views/exam/paper/edit.vue
+++ b/src/views/exam/paper/edit.vue
@@ -2,13 +2,14 @@
   <div class="app-container">
     <el-form :model="form" ref="form" label-width="200px" v-loading="formLoading" :rules="rules">
       <el-form-item label="鑰冪敓锛�" prop="menuIds" required>
-        <el-select v-model="form.menuIds" :collapse-tags="true" multiple placeholder="璇烽�夋嫨" @focus="selectStudent"></el-select>
+        <el-select v-model="form.menuIds" :collapse-tags="true" multiple placeholder="璇烽�夋嫨" @focus="selectStudent"
+          popper-class="examinee-popper"
+          >
+        </el-select>
       </el-form-item>
       <el-form-item label="璇剧洰锛�" prop="subjectId" required>
-        <el-select ref="subjectIdRef" v-model="form.subjectId" placeholder="璇剧洰" multiple
-                   collapse-tags   >
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id"
-                     :label="item.name+' '"></el-option>
+        <el-select ref="subjectIdRef" v-model="form.subjectId" placeholder="璇剧洰" multiple collapse-tags>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name + ' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="閮ㄩ棬锛�" prop="deptId" required>
@@ -17,69 +18,72 @@
         </el-select>
       </el-form-item>
       <el-form-item label="璇曞嵎绫诲瀷锛�" prop="paperType" required>
-        <el-select v-model="form.paperType" placeholder="璇曞嵎绫诲瀷"  @visible-change="subjectIdEvent">
-          <el-option v-for="item in paperTypeEnum" :key="item.key" :value="item.key" :label="item.value" ></el-option>
+        <el-select v-model="form.paperType" placeholder="璇曞嵎绫诲瀷" @visible-change="subjectIdEvent">
+          <el-option v-for="item in paperTypeEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="鏃堕棿闄愬埗锛�" required v-show="form.paperType===4">
+      <el-form-item label="鏃堕棿闄愬埗锛�" required v-show="form.paperType === 4">
         <el-date-picker v-model="form.limitDateTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
-                        range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡">
+          range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡">
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="璇曞嵎鍚嶇О锛�"  prop="name" required >
+      <el-form-item label="璇曞嵎鍚嶇О锛�" prop="name" required>
         <el-row :gutter="20">
           <el-col :span="9">
-            <el-input v-model="form.name"/>
+            <el-input v-model="form.name" />
           </el-col>
-          <el-col :span="2" v-if="form.paperType==7">
+          <el-col :span="2" v-if="form.paperType == 7">
             <span>鎬绘暟鍒嗭細</span>
           </el-col>
-          <el-col :span="9" v-if="form.paperType==7">
-            <el-input disabled v-model="form.aggregateSource"/>
+          <el-col :span="9" v-if="form.paperType == 7">
+            <el-input disabled v-model="form.aggregateSource" />
           </el-col>
         </el-row>
       </el-form-item>
-      <el-form-item :key="item.subjectId" :label="item.label"   required  v-for="(item,key,index) in form.questionTypeVMS"  v-if="form.paperType ==7">
-        <el-row >
-          <el-col :span="3" >
+      <el-form-item :key="item.subjectId" :label="item.label" required
+        v-for="(item, key, index) in form.questionTypeVMS" v-if="form.paperType == 7">
+        <el-row>
+          <el-col :span="3">
             <span>澶氶�夐锛�</span>
 
           </el-col>
           <el-col :span="3">
-            <el-input v-model="form.questionTypeVMS[key].multipleChoice" style="width: 80%"/>
+            <el-input v-model="form.questionTypeVMS[key].multipleChoice" style="width: 80%" />
           </el-col>
-          <el-col :span="3" >
+          <el-col :span="3">
             <span>鍗曢�夐锛�</span>
           </el-col>
           <el-col :span="3">
-            <el-input v-model="form.questionTypeVMS[key].singleChoice" style="width: 80%"/>
+            <el-input v-model="form.questionTypeVMS[key].singleChoice" style="width: 80%" />
           </el-col>
-          <el-col :span="3" >
+          <el-col :span="3">
             <span>鍒ゆ柇棰橈細</span>
           </el-col>
           <el-col :span="3">
-            <el-input v-model="form.questionTypeVMS[key].trueFalse" style="width: 80%"/>
+            <el-input v-model="form.questionTypeVMS[key].trueFalse" style="width: 80%" />
           </el-col>
         </el-row>
       </el-form-item>
-<!--      <el-form-item label="鎬绘暟鍒嗭細" v-if="form.paperType==7"  prop="name" required>-->
-<!--        <el-input v-model="form.name"/>-->
-<!--      </el-form-item>-->
-      <el-form-item :key="index" :label="'鏍囬'+(index+1)+'锛�'" required v-for="(titleItem,index) in form.titleItems">
-        <el-input v-model="titleItem.name" style="width: 80%"/>
-        <el-button  v-if="form.paperType!=7" type="text" class="link-left" style="margin-left: 20px" size="mini" @click="addQuestion(titleItem)">
+      <!--      <el-form-item label="鎬绘暟鍒嗭細" v-if="form.paperType==7"  prop="name" required>-->
+      <!--        <el-input v-model="form.name"/>-->
+      <!--      </el-form-item>-->
+      <el-form-item :key="index" :label="'鏍囬' + (index + 1) + '锛�'" required
+        v-for="(titleItem, index) in form.titleItems">
+        <el-input v-model="titleItem.name" style="width: 80%" />
+        <el-button v-if="form.paperType != 7" type="text" class="link-left" style="margin-left: 20px" size="mini"
+          @click="addQuestion(titleItem)">
           娣诲姞棰樼洰
         </el-button>
-        <el-button type="text" class="link-left" size="mini" @click="form.titleItems.splice(index,1)">鍒犻櫎</el-button>
-        <el-card class="exampaper-item-box" v-if="titleItem.questionItems.length!==0&&subjectIdList.length<2">
-          <el-form-item :key="questionIndex" :label="'棰樼洰'+(questionIndex+1)+'锛�'"
-                        v-for="(questionItem,questionIndex) in titleItem.questionItems" style="margin-bottom: 15px">
+        <el-button type="text" class="link-left" size="mini" @click="form.titleItems.splice(index, 1)">鍒犻櫎</el-button>
+        <el-card class="exampaper-item-box" v-if="titleItem.questionItems.length !== 0 && subjectIdList.length < 2">
+          <el-form-item :key="questionIndex" :label="'棰樼洰' + (questionIndex + 1) + '锛�'"
+            v-for="(questionItem, questionIndex) in titleItem.questionItems" style="margin-bottom: 15px">
             <el-row>
               <el-col :span="23">
-                <QuestionShow :qType="questionItem.questionType" :question="questionItem"/>
+                <QuestionShow :qType="questionItem.questionType" :question="questionItem" />
               </el-col>
               <el-col :span="1">
-                <el-button type="text" size="mini" @click="titleItem.questionItems.splice(questionIndex,1)">鍒犻櫎
+                <el-button type="text" size="mini" @click="titleItem.questionItems.splice(questionIndex, 1)">鍒犻櫎
                 </el-button>
               </el-col>
             </el-row>
@@ -87,7 +91,7 @@
         </el-card>
       </el-form-item>
       <el-form-item label="寤鸿鏃堕暱锛�" prop="suggestTime" required>
-        <el-input v-model="form.suggestTime" placeholder="鍒嗛挓"/>
+        <el-input v-model="form.suggestTime" placeholder="鍒嗛挓" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="submitForm">鎻愪氦</el-button>
@@ -95,14 +99,15 @@
         <el-button type="success" @click="addTitle">娣诲姞鏍囬</el-button>
       </el-form-item>
     </el-form>
-    <el-dialog :visible.sync="questionPage.showDialog"  width="70%">
+    <el-dialog :visible.sync="questionPage.showDialog" width="70%">
       <el-form :model="questionPage.queryParam" ref="queryForm" :inline="true">
         <el-form-item label="ID锛�">
-          <el-input v-model="questionPage.queryParam.id"  clearable></el-input>
+          <el-input v-model="questionPage.queryParam.id" clearable></el-input>
         </el-form-item>
         <el-form-item label="棰樺瀷锛�">
           <el-select v-model="questionPage.queryParam.questionType" clearable>
-            <el-option v-for="item in questionTypeEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
+            <el-option v-for="item in questionTypeEnum" :key="item.key" :value="item.key"
+              :label="item.value"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -110,21 +115,21 @@
         </el-form-item>
       </el-form>
       <el-table v-loading="questionPage.listLoading" :data="questionPage.tableData"
-                @selection-change="handleSelectionChange" border fit highlight-current-row style="width: 100%">
+        @selection-change="handleSelectionChange" border fit highlight-current-row style="width: 100%">
         <el-table-column type="selection" width="35"></el-table-column>
-        <el-table-column prop="questionType" label="棰樺瀷" :formatter="questionTypeFormatter" width="70px"/>
-        <el-table-column prop="shortTitle" label="棰樺共" show-overflow-tooltip/>
+        <el-table-column prop="questionType" label="棰樺瀷" :formatter="questionTypeFormatter" width="70px" />
+        <el-table-column prop="shortTitle" label="棰樺共" show-overflow-tooltip />
       </el-table>
-      <pagination v-show="questionPage.total>0" :total="questionPage.total"
-                  :page.sync="questionPage.queryParam.pageIndex" :limit.sync="questionPage.queryParam.pageSize"
-                  @pagination="search"/>
+      <pagination v-show="questionPage.total > 0" :total="questionPage.total"
+        :page.sync="questionPage.queryParam.pageIndex" :limit.sync="questionPage.queryParam.pageSize"
+        @pagination="search" />
       <span slot="footer" class="dialog-footer">
-          <el-button @click="questionPage.showDialog = false">鍙� 娑�</el-button>
-          <el-button type="primary" @click="confirmQuestionSelect">纭畾</el-button>
-     </span>
+        <el-button @click="questionPage.showDialog = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="confirmQuestionSelect">纭畾</el-button>
+      </span>
     </el-dialog>
 
-    <el-dialog :visible.sync="studentDialog"  width="70%">
+    <el-dialog :visible.sync="studentDialog" width="70%">
       <el-form :model="student" ref="queryForm" :inline="true">
         <el-form-item label="鏍囩锛�">
           <el-select v-model="student.tagId" clearable>
@@ -140,34 +145,34 @@
           <el-button type="primary" @click="selectStudent">鏌ヨ</el-button>
         </el-form-item>
       </el-form>
-      <el-table v-loading="student.listLoading" :data="tableData" border fit highlight-current-row style="width: 100%" @selection-change="handleSelection">
-        <el-table-column type="selection"></el-table-column>
-        <el-table-column prop="realName" label="鐢ㄦ埛"/>
+      <el-table ref="multipleTable" v-loading="student.listLoading" :data="tableData" border fit highlight-current-row style="width: 100%"
+        @selection-change="handleSelection" row-key="id">
+        <el-table-column type="selection" :reserve-selection="true"></el-table-column>
+        <el-table-column prop="realName" label="鐢ㄦ埛" />
       </el-table>
-      <pagination v-show="total > 0" :total="total"
-                  :page.sync="student.pageIndex" :limit.sync="student.pageSize"
-                  @pagination="selectStudent"/>
+      <pagination v-show="total > 0" :total="total" :page.sync="student.pageIndex" :limit.sync="student.pageSize"
+        @pagination="selectStudent" />
       <span slot="footer" class="dialog-footer">
-          <el-button @click="studentDialog = false">鍙� 娑�</el-button>
-          <el-button type="primary" @click="confirmStudentSelect">纭畾</el-button>
-     </span>
+        <el-button @click="studentDialog = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="confirmStudentSelect">纭畾</el-button>
+      </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
 
-import { mapGetters, mapState, mapActions } from 'vuex'
-import Pagination from '@/components/Pagination'
-import QuestionShow from '../question/components/Show'
-import examPaperApi from '@/api/examPaper'
-import questionApi from '@/api/question'
-import departmentApi from '@/api/department'
-import userApi from '@/api/user'
+import { mapGetters, mapState, mapActions } from 'vuex';
+import Pagination from '@/components/Pagination';
+import QuestionShow from '../question/components/Show';
+import examPaperApi from '@/api/examPaper';
+import questionApi from '@/api/question';
+import departmentApi from '@/api/department';
+import userApi from '@/api/user';
 
 export default {
   components: { Pagination, QuestionShow },
-  data () {
+  data() {
     return {
       tags: [],
       depts: [],
@@ -185,13 +190,13 @@
         multiple: true
       },
       options: [],
-      departCascaderProps:{
-       multiple: true
+      departCascaderProps: {
+        multiple: true
       },
-      subjectIdList:[],
+      subjectIdList: [],
       form: {
         menuIds: [],
-        aggregateSource:100,
+        aggregateSource: 100,
         id: null,
         departmentIds: [],
         userIds: [],
@@ -201,8 +206,8 @@
         name: '',
         suggestTime: null,
         titleItems: [],
-        subjectSource:{},
-        questionTypeVMS:[]
+        subjectSource: {},
+        questionTypeVMS: []
       },
       subjectFilter: null,
       formLoading: false,
@@ -212,7 +217,7 @@
         ],
         subjectId: [
           { required: true, message: '璇烽�夋嫨璇剧洰', trigger: 'change' }
-          ],
+        ],
         deptId: [
           { required: true, message: '璇烽�夋嫨閮ㄩ棬', trigger: 'change' }
         ],
@@ -240,93 +245,108 @@
         tableData: [],
         total: 0
       },
-      currentTitleItem: null
-    }
+      currentTitleItem: null,
+
+
+      examineeList: [],
+
+    };
   },
-  created () {
-    let id = this.$route.query.id
-    let _this = this
+  created() {
+    let id = this.$route.query.id;
+    let _this = this;
     this.initSubject(function () {
-      _this.subjectFilter = _this.subjects
-    })
+      _this.subjectFilter = _this.subjects;
+    });
     if (id && parseInt(id) !== 0) {
-      _this.formLoading = true
+      _this.formLoading = true;
       examPaperApi.select(id).then(re => {
-        _this.form = re.response
-        _this.form.menuIds = JSON.parse(re.response.menuIds)
-        console.log(_this.form)
-        _this.formLoading = false
-      })
+        _this.form = re.response;
+        _this.form.menuIds = JSON.parse(re.response.menuIds);
+        console.log(_this.form);
+        _this.formLoading = false;
+      });
     }
     departmentApi.selectDepartmentUser().then(res => {
-      console.log("res",res);
+      console.log("res", res);
 
-      _this.options = res.response.map(x=>{return{value:x.department.id,label:x.department.name,children:x.userList.map(xx=>{return{value: xx.id,label: xx.realName}})}})
-    })
+      _this.options = res.response.map(x => { return { value: x.department.id, label: x.department.name, children: x.userList.map(xx => { return { value: xx.id, label: xx.realName }; }) }; });
+    });
     departmentApi.getDeptAdmins().then(res => {
-      this.depts = res.response
-    })
+      this.depts = res.response;
+    });
   },
   methods: {
-    getTags () {
+    getTags() {
       userApi.tagList(null).then(data => {
-        this.tags = data.response
-      })
+        this.tags = data.response;
+      });
     },
     selectStudent() {
-     this.getTags();
+      this.getTags();
       this.studentDialog = true;
+      this.student.listLoading = true;
       examPaperApi.selectStudent(this.student).then(res => {
-        this.tableData = res.response.list
-        this.total = res.response.total
-        this.student.listLoading = false
-      })
-    },
-    handleChange(val){
-      console.log(val)
-    },
-    titlejs(val){
-      console.log(val)
-      let str = ''
-        this.subjectFilter.forEach(item=>{
-          if (item.id == val){
-            str = item.name
-          }
-        })
-      return str
-    },
-    subjectIdEvent(e){
-      console.log(e,this.$refs.subjectIdRef.selected)
-      let arr=[]
-      if (e){
+        this.tableData = res.response.list;
+        this.total = res.response.total;
+        this.student.listLoading = false;
 
-      }else {
-        this.$refs.subjectIdRef.selected.forEach(item=>{
+        this.$nextTick(() => {
+          this.tableData.map(data => {
+            if (this.form.menuIds.find(item => item === data.id)) {
+              this.$refs.multipleTable.toggleRowSelection(data, true);
+            } else {
+              this.$refs.multipleTable.toggleRowSelection(data, false);
+            }
+          });
+        });
+      });
+    },
+    handleChange(val) {
+      console.log(val);
+    },
+    titlejs(val) {
+      console.log(val);
+      let str = '';
+      this.subjectFilter.forEach(item => {
+        if (item.id == val) {
+          str = item.name;
+        }
+      });
+      return str;
+    },
+    subjectIdEvent(e) {
+      console.log(e, this.$refs.subjectIdRef.selected);
+      let arr = [];
+      if (e) {
+
+      } else {
+        this.$refs.subjectIdRef.selected.forEach(item => {
           arr.push({
-            label:item.label,
-            subjectId:item.value,
-            singleChoice:'',
-            multipleChoice:'',
-            trueFalse:''
-          })
-        })
-        console.log(arr)
-        this.form.questionTypeVMS = arr
+            label: item.label,
+            subjectId: item.value,
+            singleChoice: '',
+            multipleChoice: '',
+            trueFalse: ''
+          });
+        });
+        console.log(arr);
+        this.form.questionTypeVMS = arr;
       }
 
-      if (this.form.paperType ==7){
+      if (this.form.paperType == 7) {
         //瑾槑鏄毃姗�
-        this.subjectIdList = arr
-        let obj1={}
-        let arr1 = []
-        arr.forEach((item,index)=>{
+        this.subjectIdList = arr;
+        let obj1 = {};
+        let arr1 = [];
+        arr.forEach((item, index) => {
           // obj1[item.id]=''
           arr1.push({
-            subjectId:item.id,
-            singleChoice:'',
-            multipleChoice:'',
-            trueFalse:''
-          })
+            subjectId: item.id,
+            singleChoice: '',
+            multipleChoice: '',
+            trueFalse: ''
+          });
           // let obj={
           //   item
           // }
@@ -338,96 +358,92 @@
           //   console.log('閿悕锛�', i);
           //   console.log('閿�硷細', obj[i]);
           // }
-        })
-        this.form.subjectSource = obj1
+        });
+        this.form.subjectSource = obj1;
 
-        console.log(this.form.subjectSource)
-        console.log(this.form.questionTypeVMS)
+        console.log(this.form.subjectSource);
+        console.log(this.form.questionTypeVMS);
         // this.form.paperType = 7
-        this.form.titleItems = []
-      }else {
-        this.form.subjectSource={}
-        this.subjectIdList = []
-        this.form.questionTypeVMS=[]
+        this.form.titleItems = [];
+      } else {
+        this.form.subjectSource = {};
+        this.subjectIdList = [];
+        this.form.questionTypeVMS = [];
         // this.form.paperType = 1
       }
     },
-    submitForm () {
-      let _this = this
+    submitForm() {
+      let _this = this;
       this.$refs.form.validate((valid) => {
         if (valid) {
+          const tempForm = JSON.parse(JSON.stringify(this.form));
           this.formLoading = true;
-          if (this.subjectIdList.length == 1){
-            this.form.subjectId= this.form.subjectId
+          if (this.subjectIdList.length == 1) {
+            tempForm.subjectId = tempForm.subjectId;
           };
-          // let op = [];
-          // for(var ele of this.form.menuIds){
-          //   op.push(ele[1])
-          // };
-          this.form.userIds = this.form.menuIds;
-          this.form.menuIds = JSON.stringify(this.form.menuIds);
-          console.log("laks",this.form)
-          if(this.form.questionTypeVMS == null){
-            this.form.questionTypeVMS = [];
+          tempForm.userIds = tempForm.menuIds;
+          tempForm.menuIds = JSON.stringify(tempForm.menuIds);
+
+          if (tempForm.questionTypeVMS == null) {
+            tempForm.questionTypeVMS = [];
           }
-          examPaperApi.edit(this.form).then(re => {
+          examPaperApi.edit(tempForm).then(re => {
             if (re.code === 1) {
-              _this.$message.success(re.message)
+              _this.$message.success(re.message);
               _this.delCurrentView(_this).then(() => {
-                _this.$router.push('/exam/paper/list')
-              })
+                _this.$router.push('/exam/paper/list');
+              });
             } else {
-              _this.$message.error(re.message)
-              this.formLoading = false
+              _this.$message.error(re.message);
+              this.formLoading = false;
             }
           }).catch(e => {
-            this.formLoading = false
-          })
+            this.formLoading = false;
+          });
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
-    addTitle () {
+    addTitle() {
       this.form.titleItems.push({
         name: '',
         questionItems: []
-      })
+      });
     },
-    addQuestion (titleItem) {
-      console.log('titleItem', titleItem)
-      this.currentTitleItem = titleItem
-      this.questionPage.showDialog = true
-      this.search()
+    addQuestion(titleItem) {
+      console.log('titleItem', titleItem);
+      this.currentTitleItem = titleItem;
+      this.questionPage.showDialog = true;
+      this.search();
     },
-    removeTitleItem (titleItem) {
-      this.form.titleItems.remove(titleItem)
+    removeTitleItem(titleItem) {
+      this.form.titleItems.remove(titleItem);
     },
-    removeQuestion (titleItem, questionItem) {
-      titleItem.questionItems.remove(questionItem)
+    removeQuestion(titleItem, questionItem) {
+      titleItem.questionItems.remove(questionItem);
     },
-    queryForm () {
-      this.questionPage.queryParam.pageIndex = 1
-      this.search()
+    queryForm() {
+      this.questionPage.queryParam.pageIndex = 1;
+      this.search();
     },
-    confirmQuestionSelect () {
-      let _this = this
+    confirmQuestionSelect() {
+      let _this = this;
       this.questionPage.multipleSelection.forEach(q => {
         questionApi.select(q.id).then(re => {
           if (!_this.currentTitleItem.questionItems.some(obj => obj.id === re.response.id)) {
-            _this.currentTitleItem.questionItems.push(re.response)
+            _this.currentTitleItem.questionItems.push(re.response);
           }
-        })
-      })
-      this.questionPage.showDialog = false
+        });
+      });
+      this.questionPage.showDialog = false;
     },
-    confirmStudentSelect () {
-      this.student.multipleSelection.forEach(q => {
-          this.form.menuIds.push(q.id)
-      })
-      this.studentDialog = false
+    confirmStudentSelect() {
+      this.form.menuIds = this.student.multipleSelection.map((item) => item.id);
+      this.studentDialog = false;
     },
-    levelChange () {
+
+    levelChange() {
       // this.form.subjectId = null
       // this.subjectFilter = this.subjects.filter(data =>{
       //   return this.form.departmentIds.forEach(item=>{data.level == item})
@@ -441,52 +457,52 @@
       //     }
       //   })
       // })
-      console.log(this.subjects,this.form.departmentIds)
+      console.log(this.subjects, this.form.departmentIds);
       // this.subjectFilter = this.subjects
     },
-    search () {
-      if (this.subjectIdList.length=1){
-        this.questionPage.queryParam.subjectId = this.form.subjectId
+    search() {
+      if (this.subjectIdList.length = 1) {
+        this.questionPage.queryParam.subjectId = this.form.subjectId;
       }
 
-      this.questionPage.listLoading = true
+      this.questionPage.listLoading = true;
       questionApi.pageList(this.questionPage.queryParam).then(data => {
-        const re = data.response
-        this.questionPage.tableData = re.list
-        this.questionPage.total = re.total
-        this.questionPage.queryParam.pageIndex = re.pageNum
-        this.questionPage.listLoading = false
-      })
+        const re = data.response;
+        this.questionPage.tableData = re.list;
+        this.questionPage.total = re.total;
+        this.questionPage.queryParam.pageIndex = re.pageNum;
+        this.questionPage.listLoading = false;
+      });
     },
-    handleSelectionChange (val) {
-      this.questionPage.multipleSelection = val
+    handleSelectionChange(val) {
+      this.questionPage.multipleSelection = val;
     },
-    handleSelection (val) {
-      this.student.multipleSelection = val
+    handleSelection(val) {
+      this.student.multipleSelection = val;
     },
-    questionTypeFormatter (row, column, cellValue, index) {
-      return this.enumFormat(this.questionTypeEnum, cellValue)
+    questionTypeFormatter(row, column, cellValue, index) {
+      return this.enumFormat(this.questionTypeEnum, cellValue);
     },
-    subjectFormatter (row, column, cellValue, index) {
-      return this.subjectEnumFormat(cellValue)
+    subjectFormatter(row, column, cellValue, index) {
+      return this.subjectEnumFormat(cellValue);
     },
-    resetForm () {
-      let lastId = this.form.id
-      this.$refs['form'].resetFields()
-      this.form= {
-        aggregateSource:100,
-          id: null,
-          departmentIds: [],
-          subjectId: [],
-          paperType: 1,
-          limitDateTime: [],
-          name: '',
-          suggestTime: null,
-          titleItems: [],
-          subjectSource:null,
-          questionTypeVMS:[]
-      }
-      this.form.id = lastId
+    resetForm() {
+      let lastId = this.form.id;
+      this.$refs['form'].resetFields();
+      this.form = {
+        aggregateSource: 100,
+        id: null,
+        departmentIds: [],
+        subjectId: [],
+        paperType: 1,
+        limitDateTime: [],
+        name: '',
+        suggestTime: null,
+        titleItems: [],
+        subjectSource: null,
+        questionTypeVMS: []
+      };
+      this.form.id = lastId;
     },
     ...mapActions('exam', { initSubject: 'initSubject' }),
     ...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
@@ -500,15 +516,19 @@
     }),
     ...mapState('exam', { subjects: state => state.subjects })
   }
-}
+};
 </script>
 
 <style lang="scss">
-  .exampaper-item-box {
-    .q-title {
-      margin: 0px 5px 0px 5px;
-    }
-    .q-item-content {
-    }
+.exampaper-item-box {
+  .q-title {
+    margin: 0px 5px 0px 5px;
   }
+
+  .q-item-content {}
+}
+
+.examinee-popper {
+  display: none !important;
+}
 </style>

--
Gitblit v1.8.0