dedsudiyu 3 days ago
parent
commit
852569e388
17 changed files with 2008 additions and 779 deletions
  1. 120 0
      src/api/safetyEducationExaminationNew/index.js
  2. 1 1
      src/views/safetyEducationExaminationNew/components/examRecords.vue
  3. 1 1
      src/views/safetyEducationExaminationNew/components/historyOfIncorrectQuestions.vue
  4. 799 262
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/addPage.vue
  5. 102 55
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/index.vue
  6. 48 35
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectCertificate.vue
  7. 38 34
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectCourse.vue
  8. 94 50
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectScope.vue
  9. 50 36
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectTestPaper.vue
  10. 86 44
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectUser.vue
  11. 151 77
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/studentsTakingMakeUpExams.vue
  12. 183 0
      src/views/safetyEducationExaminationNew/examManagement/examinationResult/academicPerformance.vue
  13. 104 63
      src/views/safetyEducationExaminationNew/examManagement/examinationResult/index.vue
  14. 118 70
      src/views/safetyEducationExaminationNew/examManagement/examinationResult/viewGrades.vue
  15. 89 38
      src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/addPage.vue
  16. 18 9
      src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/index.vue
  17. 6 4
      src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/addPage.vue

+ 120 - 0
src/api/safetyEducationExaminationNew/index.js

@@ -345,5 +345,125 @@ export function examElQuestionBankKnowledgePointCount(query) {
     params: query
   })
 }
+//考试安排详情
+export function examElExamDetail(query) {
+  return request({
+    url: '/exam/elExam/detail',
+    method: 'get',
+    params: query
+  })
+}
+//考试安排列表
+export function examElExamPage(data) {
+  return request({
+    url: '/exam/elExam/page',
+    method: 'post',
+    data: data
+  })
+}
+//考试安排新增
+export function examElExamAdd(data) {
+  return request({
+    url: '/exam/elExam/add',
+    method: 'post',
+    data: data
+  })
+}
+//考试安排编辑
+export function examElExamEdit(data) {
+  return request({
+    url: '/exam/elExam/edit',
+    method: 'post',
+    data: data
+  })
+}
+//考试安排复制
+export function examElExamCopy(data) {
+  return request({
+    url: '/exam/elExam/copy',
+    method: 'post',
+    data: data
+  })
+}
+//考试安排删除
+export function examElExamDel(data) {
+  return request({
+    url: '/exam/elExam/del',
+    method: 'post',
+    data: data
+  })
+}
+//考试安排创建补考
+export function examElExamMakeupAdd(data) {
+  return request({
+    url: '/exam/elExam/makeup-add',
+    method: 'post',
+    data: data
+  })
+}
+//分级下拉列表
+export function laboratoryLevelConfigGetLevelTitleList(data) {
+  return request({
+    url: '/laboratory/levelConfig/getLevelTitleList',
+    method: 'post',
+    data: data
+  })
+}
+//考试安排查询补考候选人
+export function examElExamMakeupCandidates(data) {
+  return request({
+    url: '/exam/elExam/makeup-candidates',
+    method: 'post',
+    data: data
+  })
+}
+//考试结果列表
+export function examElExamResultPage(data) {
+  return request({
+    url: '/exam/elExamResult/page',
+    method: 'post',
+    data: data
+  })
+}
+//考试成绩明细列表
+export function examElExamResultScorePage(data) {
+  return request({
+    url: '/exam/elExamResult/score-page',
+    method: 'post',
+    data: data
+  })
+}
+//用户类别下拉列表
+export function systemUserGetCategories(data) {
+  return request({
+    url: '/system/user/getCategories',
+    method: 'post',
+    data: data
+  })
+}
+//学年下拉列表
+export function systemUserGetAcademicYear(data) {
+  return request({
+    url: '/system/user/getAcademicYear',
+    method: 'post',
+    data: data
+  })
+}
+//查询指定用户列表
+export function systemUserGetUserDataByParam(data) {
+  return request({
+    url: '/system/user/getUserDataByParam',
+    method: 'post',
+    data: data
+  })
+}
+//查询指定范围列表
+export function systemUserGetRuleDataByParam(data) {
+  return request({
+    url: '/system/user/getRuleDataByParam',
+    method: 'post',
+    data: data
+  })
+}
 
 

+ 1 - 1
src/views/safetyEducationExaminationNew/components/examRecords.vue

@@ -84,7 +84,7 @@
       :visible.sync="drawer"
       direction="rtl"
     >
-      <examDetails></examDetails>
+      <examDetails v-if="drawer"></examDetails>
     </el-drawer>
   </div>
 </template>

+ 1 - 1
src/views/safetyEducationExaminationNew/components/historyOfIncorrectQuestions.vue

@@ -96,7 +96,7 @@
       ref="drawer"
       :visible.sync="drawer"
       direction="rtl">
-      <answerKey></answerKey>
+      <answerKey v-if="drawer"></answerKey>
     </el-drawer>
   </div>
 </template>

File diff suppressed because it is too large
+ 799 - 262
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/addPage.vue


+ 102 - 55
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/index.vue

@@ -5,14 +5,14 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData1">
-            <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 120px">
+          <el-form-item label="" prop="shareStatus">
+            <el-select v-model="queryParams.shareStatus" placeholder="是否共享" style="width: 120px">
               <el-option label="共享" value="1"/>
               <el-option label="不共享" value="2"/>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="专业类别" style="width: 140px">
+          <el-form-item label="" prop="disciplineTypeId">
+            <el-select v-model="queryParams.disciplineTypeId" placeholder="专业类别" style="width: 140px">
               <el-option
                 v-for="dict in optionListA"
                 :key="dict.id"
@@ -21,8 +21,8 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
-            <el-select v-model="queryParams.queryParamsData3" placeholder="考试类别" style="width: 140px">
+          <el-form-item label="" prop="examTypeId">
+            <el-select v-model="queryParams.examTypeId" placeholder="考试类别" style="width: 140px">
               <el-option
                 v-for="dict in optionListB"
                 :key="dict.id"
@@ -31,32 +31,41 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4" placeholder="学院单位" style="width: 160px">
-              <el-option
-                v-for="dict in optionListC"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              />
-            </el-select>
+          <el-form-item label="" prop="deptId">
+            <el-cascader
+              style="width: 180px"
+              v-model="queryParams.deptId"
+              :options="optionListC"
+              :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+              :show-all-levels="false"
+              filterable
+              placeholder="学院单位"
+            ></el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData5">
-            <el-select v-model="queryParams.queryParamsData5" placeholder="状态" style="width: 120px">
-              <el-option label="进行中" value="1"/>
-              <el-option label="已结束" value="2"/>
+          <el-form-item label="" prop="status">
+            <el-select v-model="queryParams.status" placeholder="状态" style="width: 120px">
+              <el-option label="停用" value="0"/>
+              <el-option label="未开始" value="1"/>
+              <el-option label="进行中" value="2"/>
+              <el-option label="已结束" value="3"/>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData6">
-            <el-select v-model="queryParams.queryParamsData6" placeholder="是否补考" style="width: 140px">
+          <el-form-item label="" prop="makeup">
+            <el-select v-model="queryParams.makeup" placeholder="是否补考" style="width: 140px">
+              <el-option label="正常考试" value="0"/>
               <el-option label="补考" value="1"/>
-              <el-option label="不补考" value="2"/>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData7">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData7"
+              v-model="queryParams.searchValue"
               placeholder="考试名称"
               style="width: 140px"
             />
@@ -84,23 +93,41 @@
       </div>
       <div class="page-content-box">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="考试名称" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="考试类型" prop="content" width="140" show-overflow-tooltip/>
-          <el-table-column label="专业类别" prop="content" width="140" show-overflow-tooltip/>
-          <el-table-column label="是否共享" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="考试时间" prop="createTime" width="200" show-overflow-tooltip>
+          <el-table-column label="考试名称" prop="examName"  show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span style="color:#0183fa;cursor: pointer;" @click="tableButton(7,scope.row)">{{scope.row.examName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="考试类型" prop="examTypeName" width="140" show-overflow-tooltip/>
+          <el-table-column label="专业类别" prop="disciplineTypeName" width="140" show-overflow-tooltip/>
+          <el-table-column label="是否共享" prop="shareStatus" width="120" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)" v-if="scope.row.shareStatus==1">共享</span>
+              <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)" v-if="scope.row.shareStatus==0">不共享</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="考试时间" prop="createTime" width="300" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{parseTime(scope.row.startTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(scope.row.endTime,"{y}-{m}-{d} {h}:{i}")}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="可考次数" prop="attemptLimit" width="100" show-overflow-tooltip/>
+          <el-table-column label="考试范围" prop="scopeType" width="140" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.scopeType==1?'全校':(scope.row.scopeType==2?'规则范围':(scope.row.scopeType==3?'指定考生':''))}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" prop="status" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}")}}至{{parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}")}}</span>
+              <span>{{scope.row.status==0?'停用':(scope.row.status==1?'未开始':(scope.row.status==2?'进行中':(scope.row.status==3?'已结束':'')))}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="可考次数" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="考试范围" prop="content" width="140" show-overflow-tooltip/>
-          <el-table-column label="状态" prop="content" width="200" show-overflow-tooltip/>
           <el-table-column label="操作" width="220" show-overflow-tooltip>
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                   v-if="scope.row.showMakeup"
                    @click="tableButton(2,scope.row)"
                 >补考</p>
                 <p class="table-button-p"
@@ -136,7 +163,10 @@
   //import { getInfo } from "@/api/basicsModules/index";
   import addPage from "./addPage.vue";
   import studentsTakingMakeUpExams from "./studentsTakingMakeUpExams.vue";
-  import { examElDisciplineTypeList,examElExamTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    examElExamPage,examElExamCopy,examElExamDel,
+    examElDisciplineTypeList,examElExamTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'index',
     components: {
@@ -158,13 +188,13 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1 :null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :null,
-          queryParamsData7:"",
+          shareStatus :null,
+          disciplineTypeId :null,
+          examTypeId :null,
+          deptId :null,
+          status :null,
+          makeup :null,
+          searchValue:"",
         },
         //时间数据
         dateRange:[],
@@ -180,7 +210,7 @@
 
     },
     mounted () {
-      //this.getList();
+      this.getList();
       this.examElDisciplineTypeList();
       this.examElExamTypeList();
       this.systemDeptCurrentDept();
@@ -197,13 +227,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1 :null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :null,
-          queryParamsData7:"",
+          shareStatus :null,
+          disciplineTypeId :null,
+          examTypeId :null,
+          deptId :null,
+          status :null,
+          makeup :null,
+          searchValue:"",
         });
         this.getList();
       },
@@ -218,7 +248,7 @@
           obj.startTime = "";
           obj.endTime = "";
         }
-        getListFunction(obj).then(response => {
+        examElExamPage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -234,8 +264,7 @@
         }else if(type == 2){
           //补考
           this.$set(this,'pageType',3);
-          let obj = JSON.parse(JSON.stringify(row))
-          this.$set(this,'propsData',obj);
+          this.$set(this,'propsData',{id:row.id});
         }else if(type == 3){
           //编辑
           this.$set(this,'pageType',2);
@@ -243,7 +272,17 @@
           this.$set(this,'propsData',obj);
         }else if(type == 4){
           //复制
-
+          this.$confirm('是否确认复制?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            examElExamCopy({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
         }else if(type == 5){
           //删除
           this.$confirm('是否确认删除?', "警告", {
@@ -252,7 +291,7 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            deleteFunction({id:row.id}).then(response => {
+            examElExamDel({id:row.id}).then(response => {
               self.msgSuccess(response.message)
               self.getList();
             });
@@ -261,6 +300,12 @@
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
+        }else if(type == 7){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
         }
       },
       //查询全部专业类别
@@ -278,7 +323,9 @@
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionListC',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListC',list);
         });
       },
     },

+ 48 - 35
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectCertificate.vue

@@ -4,14 +4,14 @@
     <div class="page-form-title-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="" prop="queryParamsData1">
-          <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 120px">
+        <el-form-item label="" prop="shareStatus">
+          <el-select v-model="queryParams.shareStatus" placeholder="是否共享" style="width: 120px">
             <el-option label="共享" value="1"/>
-            <el-option label="不共享" value="2"/>
+            <el-option label="不共享" value="0"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData2">
-          <el-select v-model="queryParams.queryParamsData2" placeholder="考试类型" style="width: 140px">
+        <el-form-item label="" prop="examTypeId">
+          <el-select v-model="queryParams.examTypeId" placeholder="考试类型" style="width: 140px">
             <el-option
               v-for="dict in optionListA"
               :key="dict.id"
@@ -20,20 +20,27 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData3">
-          <el-select v-model="queryParams.queryParamsData3" placeholder="颁发单位" style="width: 120px">
-            <el-option
-              v-for="dict in optionListB"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            />
-          </el-select>
+        <el-form-item label="" prop="deptId">
+          <el-cascader
+            style="width: 180px"
+            v-model="queryParams.deptId"
+            :options="optionListB"
+            :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="颁发单位"
+          ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData4">
+        <el-form-item label="" prop="searchValue">
           <el-input
             maxLength="30"
-            v-model="queryParams.queryParamsData4"
+            v-model="queryParams.searchValue"
             placeholder="搜索名称"
             style="width: 140px"
           />
@@ -44,16 +51,16 @@
     </div>
     <div class="page-content-box">
       <el-table class="table-box" v-loading="loading" border :data="dataList">
-        <el-table-column label="证书模板名称" prop="name"  show-overflow-tooltip/>
-        <el-table-column label="适用考试类型" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="是否共享" prop="content" width="200" show-overflow-tooltip>
+        <el-table-column label="证书模板名称" prop="templateName"  show-overflow-tooltip/>
+        <el-table-column label="适用考试类型" prop="examTypeName" width="200" show-overflow-tooltip/>
+        <el-table-column label="是否共享" prop="shareStatus" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)">共享</span>
-            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)">不共享</span>
+            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)" v-if="scope.row.shareStatus === 1">共享</span>
+            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)" v-if="scope.row.shareStatus === 0">不共享</span>
           </template>
         </el-table-column>
-        <el-table-column label="颁发单位" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="更新人" prop="content" width="200" show-overflow-tooltip/>
+        <el-table-column label="颁发单位" prop="deptName" width="200" show-overflow-tooltip/>
+        <el-table-column label="更新人" prop="updateName" width="200" show-overflow-tooltip/>
         <el-table-column label="操作" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
             <div class="table-button-box">
@@ -78,7 +85,7 @@
 </template>
 
 <script>
-  import { examElExamTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  import { examElCertificateTemplatePage,examElExamTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'addPage',
     props: {
@@ -95,10 +102,10 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :'',
+          shareStatus:null,
+          examTypeId :null,
+          deptId :null,
+          searchValue :'',
         },
         //列表数据
         dataList:[{}],
@@ -110,13 +117,17 @@
 
     },
     mounted() {
+      this.getList();
       this.examElExamTypeList();
       this.systemDeptCurrentDept();
     },
     methods: {
       // 提交按钮
       checkButton(row) {
-        this.$parent.$parent.drawerOffButton()
+        this.$parent.$parent.drawerOffButton({
+          id:row.id,
+          name:row.templateName,
+        })
       },
       //查询按钮
       handleQuery(){
@@ -128,10 +139,10 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :'',
+          shareStatus:null,
+          examTypeId :null,
+          deptId :null,
+          searchValue :'',
         });
         this.getList();
       },
@@ -139,7 +150,7 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        examElCertificateTemplatePage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -154,7 +165,9 @@
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionListB',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListB',list);
         });
       },
     }

+ 38 - 34
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectCourse.vue

@@ -4,16 +4,16 @@
     <div class="page-form-title-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="" prop="queryParamsData1">
-          <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 120px">
+        <el-form-item label="" prop="shareStatus">
+          <el-select v-model="queryParams.shareStatus" placeholder="是否共享" style="width: 120px">
             <el-option label="共享" value="1"/>
-            <el-option label="不共享" value="2"/>
+            <el-option label="不共享" value="0"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData2">
+        <el-form-item label="" prop="knowledgePointIds">
           <el-cascader
             style="width: 180px"
-            v-model="queryParams.queryParamsData2"
+            v-model="queryParams.knowledgePointIds"
             :options="optionListC"
             :props="{
                 emitPath:false,
@@ -27,8 +27,8 @@
             placeholder="知识点"
           ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData3">
-          <el-select v-model="queryParams.queryParamsData3" placeholder="专业类别" style="width: 140px">
+        <el-form-item label="" prop="disciplineId">
+          <el-select v-model="queryParams.disciplineId" placeholder="专业类别" style="width: 140px">
             <el-option
               v-for="dict in optionListD"
               :key="dict.id"
@@ -37,7 +37,7 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData4">
+        <el-form-item label="" prop="deptId">
           <el-cascader
             style="width: 180px"
             v-model="queryParams.deptId"
@@ -54,10 +54,10 @@
             placeholder="来源"
           ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData5">
+        <el-form-item label="" prop="searchValue">
           <el-input
             maxLength="30"
-            v-model="queryParams.queryParamsData5"
+            v-model="queryParams.searchValue"
             placeholder="搜索名称"
             style="width: 140px"
           />
@@ -68,19 +68,19 @@
     </div>
     <div class="page-content-box">
       <el-table class="table-box" v-loading="loading" border :data="dataList">
-        <el-table-column label="课程名称" prop="name"  show-overflow-tooltip/>
-        <el-table-column label="知识点" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="专业类别" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="来源" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="是否共享" prop="content" width="200" show-overflow-tooltip>
+        <el-table-column label="课程名称" prop="courseName"  show-overflow-tooltip/>
+        <el-table-column label="知识点" prop="knowledgePointNames" width="200" show-overflow-tooltip/>
+        <el-table-column label="专业类别" prop="disciplineTypeName" width="200" show-overflow-tooltip/>
+        <el-table-column label="来源" prop="deptName" width="200" show-overflow-tooltip/>
+        <el-table-column label="是否共享" prop="shareStatus" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)">共享</span>
-            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)">不共享</span>
+            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)" v-if="scope.row.shareStatus==1">共享</span>
+            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)" v-if="scope.row.shareStatus==0">不共享</span>
           </template>
         </el-table-column>
-        <el-table-column label="课件总数" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="总时长" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="可得学时" prop="content" width="200" show-overflow-tooltip/>
+        <el-table-column label="课件总数" prop="coursewareTotalCount" width="200" show-overflow-tooltip/>
+        <el-table-column label="总时长" prop="totalLearningDuration" width="200" show-overflow-tooltip/>
+        <el-table-column label="可得学时" prop="totalCreditHours" width="200" show-overflow-tooltip/>
         <el-table-column label="操作" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
             <div class="table-button-box">
@@ -105,7 +105,7 @@
 </template>
 
 <script>
-  import { examElDisciplineTypeList,examElKnowledgePointTreeList,systemDeptCurrentDept } from "@/api/safetyEducationExaminationNew/index";
+  import { examElCoursePage,examElDisciplineTypeList,examElKnowledgePointTreeList,systemDeptCurrentDept } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'addPage',
     props: {
@@ -123,14 +123,14 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :'',
+          shareStatus:null,
+          knowledgePointIds :null,
+          disciplineId :null,
+          deptId :null,
+          searchValue :'',
         },
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
       }
@@ -139,6 +139,7 @@
 
     },
     mounted() {
+      this.getList();
       this.examElKnowledgePointTreeList();
       this.examElDisciplineTypeList();
       this.systemDeptCurrentDept();
@@ -146,7 +147,10 @@
     methods: {
       // 提交按钮
       checkButton(row) {
-        this.$parent.$parent.drawerOffButton()
+        this.$parent.$parent.drawerOffButton({
+          id:row.id,
+          name:row.courseName,
+        })
       },
       //查询按钮
       handleQuery(){
@@ -158,11 +162,11 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :'',
+          shareStatus:null,
+          knowledgePointIds :null,
+          disciplineId :null,
+          deptId :null,
+          searchValue :'',
         });
         this.getList();
       },
@@ -170,7 +174,7 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        examElCoursePage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);

+ 94 - 50
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectScope.vue

@@ -4,28 +4,37 @@
     <div class="page-form-title-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="" prop="queryParamsData1">
-          <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 120px">
+        <el-form-item label="" prop="gradeNumbers">
+          <el-select v-model="queryParams.gradeNumbers" collapse-tags multiple placeholder="学年" style="width: 220px">
             <el-option
-              v-for="dict in optionListA"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
+              v-for="dict in optionListD"
+              :key="dict.gradeNumber"
+              :label="dict.gradeNumber"
+              :value="dict.gradeNumber"
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData2">
-          <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 140px">
-            <el-option
-              v-for="dict in optionListB"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            />
-          </el-select>
+        <el-form-item label="" prop="deptIds">
+          <el-cascader
+            style="width: 220px"
+            collapse-tags
+            v-model="queryParams.deptIds"
+            :options="optionListB"
+            :props="{
+                    multiple:true,
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="学院单位"
+          ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData3">
-          <el-select v-model="queryParams.queryParamsData3" multiple placeholder="用户类别" style="width: 120px">
+        <el-form-item label="" prop="userTypeIds">
+          <el-select v-model="queryParams.userTypeIds" collapse-tags multiple placeholder="用户类别" style="width: 220px">
             <el-option
               v-for="dict in optionListC"
               :key="dict.value"
@@ -34,18 +43,8 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData4">
-          <el-select v-model="queryParams.queryParamsData4" multiple placeholder="学年" style="width: 140px">
-            <el-option
-              v-for="dict in optionListD"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="" prop="queryParamsData5">
-          <el-select v-model="queryParams.queryParamsData5" placeholder="专业" style="width: 140px">
+        <el-form-item label="" prop="majorId">
+          <el-select v-model="queryParams.majorId" collapse-tags multiple placeholder="专业" style="width: 220px">
             <el-option
               v-for="dict in optionListE"
               :key="dict.id"
@@ -66,10 +65,26 @@
       <el-table class="table-box" v-loading="loading" border :data="dataList"
                 ref="multipleTable" :row-key="getRowKey" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
-        <el-table-column label="学院单位" prop="name"  show-overflow-tooltip/>
-        <el-table-column label="角色" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="专业" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="学年" prop="content" width="200" show-overflow-tooltip/>
+        <el-table-column label="学院单位" prop="deptName"  show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.deptName?scope.row.deptName:'-'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="角色" prop="userTypeName" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.userTypeName?scope.row.userTypeName:'-'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="专业" prop="majorName" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.majorName?scope.row.majorName:'-'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="学年" prop="gradeNumber" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.gradeNumber?scope.row.gradeNumber:'-'}}
+          </template>
+        </el-table-column>
       </el-table>
       <pagination :page-sizes="[20, 30, 40, 50]"
                   v-show="total>0"
@@ -83,7 +98,10 @@
 </template>
 
 <script>
-  import { examElDisciplineTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    systemUserGetCategories,systemUserGetAcademicYear,
+    systemUserGetRuleDataByParam,examElDisciplineTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'addPage',
     props: {
@@ -94,7 +112,6 @@
         //页面遮罩
         loading:false,
         //下拉列表数据
-        optionListA:[],
         optionListB:[],
         optionListC:[],
         optionListD:[],
@@ -103,14 +120,13 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
+          gradeNumbers:[],
+          deptIds :[],
+          userTypeIds :[],
+          majorId :[],
         },
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
         //存储所有被勾选的数据
@@ -121,17 +137,33 @@
 
     },
     mounted() {
+      this.getList();
+      this.systemUserGetAcademicYear();
+      this.systemUserGetCategories();
       this.examElDisciplineTypeList();
       this.systemDeptCurrentDept();
     },
     methods: {
       // 提交按钮
       checkButton() {
+        let self = this;
         if(!this.multipleSelection[0]){
           this.msgError('请勾选范围')
           return
         }
-        this.$parent.$parent.drawerOffButton()
+        let list = [];
+        for(let i=0;i<self.multipleSelection.length;i++){
+          list.push({
+            deptId:self.multipleSelection[i].deptId,
+            deptName:self.multipleSelection[i].deptName,
+            disciplineId:self.multipleSelection[i].majorId,
+            disciplineName:self.multipleSelection[i].majorName,
+            roleId:self.multipleSelection[i].userTypeId,
+            roleName:self.multipleSelection[i].userTypeName,
+            academicYear:self.multipleSelection[i].gradeNumber,
+          })
+        }
+        this.$parent.$parent.drawerOffButton(JSON.parse(JSON.stringify(list)))
       },
       //查询按钮
       handleQuery(){
@@ -143,11 +175,10 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
+          gradeNumbers:[],
+          deptIds :[],
+          userTypeIds :[],
+          majorId :[],
         });
         this.getList();
       },
@@ -155,12 +186,24 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        systemUserGetRuleDataByParam(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
         });
       },
+      //学年下拉列表
+      systemUserGetAcademicYear(){
+        systemUserGetAcademicYear({}).then(response => {
+          this.$set(this,'optionListD',response.data);
+        });
+      },
+      //用户类别下拉列表
+      systemUserGetCategories(){
+        systemUserGetCategories({}).then(response => {
+          this.$set(this,'optionListC',response.data);
+        });
+      },
       //查询全部专业类别
       examElDisciplineTypeList(){
         examElDisciplineTypeList({}).then(response => {
@@ -170,7 +213,9 @@
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionListB',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListB',list);
         });
       },
       getRowKey(row) {
@@ -178,7 +223,6 @@
       },
       handleSelectionChange(val) {
         this.multipleSelection = val;
-        console.log('当前所有选中的数据:', this.multipleSelection);
       },
     }
   }

+ 50 - 36
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectTestPaper.vue

@@ -4,16 +4,16 @@
     <div class="page-form-title-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="" prop="queryParamsData1">
+        <el-form-item label="" prop="shareStatus">
           <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 120px">
             <el-option label="共享" value="1"/>
-            <el-option label="不共享" value="2"/>
+            <el-option label="不共享" value="0"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData2">
+        <el-form-item label="" prop="knowledgePointId">
           <el-cascader
             style="width: 180px"
-            v-model="queryParams.queryParamsData2"
+            v-model="queryParams.knowledgePointId"
             :options="optionListC"
             :props="{
                 emitPath:false,
@@ -27,8 +27,8 @@
             placeholder="知识点"
           ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData3">
-          <el-select v-model="queryParams.queryParamsData3" placeholder="专业类别" style="width: 140px">
+        <el-form-item label="" prop="disciplineTypeId">
+          <el-select v-model="queryParams.disciplineTypeId" placeholder="专业类别" style="width: 140px">
             <el-option
               v-for="dict in optionListD"
               :key="dict.id"
@@ -37,7 +37,7 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData4">
+        <el-form-item label="" prop="deptId">
           <el-cascader
             style="width: 180px"
             v-model="queryParams.deptId"
@@ -54,16 +54,16 @@
             placeholder="来源"
           ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData5">
-          <el-select v-model="queryParams.queryParamsData5" placeholder="组卷方式" style="width: 140px">
+        <el-form-item label="" prop="assemblyMode">
+          <el-select v-model="queryParams.assemblyMode" placeholder="组卷方式" style="width: 140px">
             <el-option label="固定组卷" value="1"/>
             <el-option label="随机组卷" value="2"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData6">
+        <el-form-item label="" prop="searchValue">
           <el-input
             maxLength="30"
-            v-model="queryParams.queryParamsData6"
+            v-model="queryParams.searchValue"
             placeholder="搜索名称"
             style="width: 140px"
           />
@@ -74,17 +74,21 @@
     </div>
     <div class="page-content-box">
       <el-table class="table-box" v-loading="loading" border :data="dataList">
-        <el-table-column label="试卷名称" prop="name"  show-overflow-tooltip/>
-        <el-table-column label="组卷方式" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="知识点" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="专业类别" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="是否共享" prop="content" width="200" show-overflow-tooltip>
+        <el-table-column label="试卷名称" prop="paperName"  show-overflow-tooltip/>
+        <el-table-column label="组卷方式" prop="assemblyMode" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)">共享</span>
-            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)">不共享</span>
+            <span>{{scope.row.assemblyMode==1?'固定组卷':'随机组卷'}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="来源" prop="content" width="200" show-overflow-tooltip/>
+        <el-table-column label="知识点" prop="knowledgePointNames" width="200" show-overflow-tooltip/>
+        <el-table-column label="专业类别" prop="disciplineTypeName" width="200" show-overflow-tooltip/>
+        <el-table-column label="是否共享" prop="shareStatus" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)" v-if="scope.row.shareStatus==1">共享</span>
+            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)" v-if="scope.row.shareStatus==0">不共享</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="来源" prop="deptName" width="200" show-overflow-tooltip/>
         <el-table-column label="操作" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
             <div class="table-button-box">
@@ -109,11 +113,14 @@
 </template>
 
 <script>
-  import { examElDisciplineTypeList,examElKnowledgePointTreeList,systemDeptCurrentDept } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    examElPaperPage,examElDisciplineTypeList,
+    examElKnowledgePointTreeList,systemDeptCurrentDept
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'addPage',
     props: {
-      propsData: {}
+      selectTestPaperPropsData: {}
     },
     data() {
       return {
@@ -127,15 +134,15 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :'',
+          searchValue:'',
+          shareStatus :null,
+          deptId :null,
+          knowledgePointId :null,
+          assemblyMode :null,
+          disciplineTypeId :null,
         },
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
       }
@@ -144,6 +151,7 @@
 
     },
     mounted() {
+      this.getList();
       this.examElKnowledgePointTreeList();
       this.examElDisciplineTypeList();
       this.systemDeptCurrentDept();
@@ -151,7 +159,13 @@
     methods: {
       // 提交按钮
       checkButton(row) {
-        this.$parent.$parent.drawerOffButton()
+        this.$parent.$parent.drawerOffButton({
+          id:row.id,
+          name:row.paperName,
+          totalScore:row.totalScore,
+          passScore:row.passScore,
+          questionCount:row.questionCount,
+        })
       },
       //查询按钮
       handleQuery(){
@@ -163,12 +177,12 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :'',
+          searchValue:'',
+          shareStatus :null,
+          deptId :null,
+          knowledgePointId :null,
+          assemblyMode :null,
+          disciplineTypeId :null,
         });
         this.getList();
       },
@@ -176,7 +190,7 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        examElPaperPage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);

+ 86 - 44
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectUser.vue

@@ -4,28 +4,37 @@
     <div class="page-form-title-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="" prop="queryParamsData1">
-          <el-select v-model="queryParams.queryParamsData1" multiple placeholder="学年" style="width: 120px">
+        <el-form-item label="" prop="gradeNumbers">
+          <el-select v-model="queryParams.gradeNumbers" collapse-tags multiple placeholder="学年" style="width: 220px">
             <el-option
-              v-for="dict in optionListA"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
+              v-for="dict in optionListD"
+              :key="dict.gradeNumber"
+              :label="dict.gradeNumber"
+              :value="dict.gradeNumber"
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData2">
-          <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 140px">
-            <el-option
-              v-for="dict in optionListB"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            />
-          </el-select>
+        <el-form-item label="" prop="deptIds">
+          <el-cascader
+            collapse-tags
+            style="width: 220px"
+            v-model="queryParams.deptIds"
+            :options="optionListB"
+            :props="{
+                    multiple:true,
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="学院单位"
+          ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData3">
-          <el-select v-model="queryParams.queryParamsData3" multiple placeholder="用户类别" style="width: 120px">
+        <el-form-item label="" prop="userTypeIds">
+          <el-select v-model="queryParams.userTypeIds" collapse-tags multiple placeholder="用户类别" style="width: 220px">
             <el-option
               v-for="dict in optionListC"
               :key="dict.value"
@@ -34,8 +43,8 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData5">
-          <el-select v-model="queryParams.queryParamsData5" placeholder="专业" style="width: 140px">
+        <el-form-item label="" prop="majorId">
+          <el-select v-model="queryParams.majorId" collapse-tags multiple placeholder="专业" style="width: 220px">
             <el-option
               v-for="dict in optionListE"
               :key="dict.id"
@@ -44,12 +53,12 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData6">
+        <el-form-item label="" prop="searchValue">
           <el-input
             maxLength="30"
-            v-model="queryParams.queryParamsData6"
+            v-model="queryParams.searchValue"
             placeholder="姓名/学工号"
-            style="width: 140px"
+            style="width: 220px"
           />
         </el-form-item>
         <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
@@ -64,11 +73,12 @@
       <el-table class="table-box" v-loading="loading" border :data="dataList"
                 ref="multipleTable" :row-key="getRowKey" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
-        <el-table-column label="姓名" prop="name"  show-overflow-tooltip/>
-        <el-table-column label="学工号" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="专业" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="学年" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="学院单位" prop="content" width="200" show-overflow-tooltip/>
+        <el-table-column label="姓名" prop="userName"  show-overflow-tooltip/>
+        <el-table-column label="学工号" prop="account" show-overflow-tooltip/>
+        <el-table-column label="用户类别" prop="userTypeName" show-overflow-tooltip/>
+        <el-table-column label="专业" prop="majorName" show-overflow-tooltip/>
+        <el-table-column label="学年" prop="gradeNumber" show-overflow-tooltip/>
+        <el-table-column label="学院单位" prop="deptName" show-overflow-tooltip/>
       </el-table>
       <pagination :page-sizes="[20, 30, 40, 50]"
                   v-show="total>0"
@@ -82,7 +92,10 @@
 </template>
 
 <script>
-  import { examElDisciplineTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    systemUserGetCategories,systemUserGetAcademicYear,
+    systemUserGetUserDataByParam,examElDisciplineTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'addPage',
     props: {
@@ -102,15 +115,14 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :'',
+          gradeNumbers:[],
+          deptIds :[],
+          userTypeIds :[],
+          majorId :[],
+          searchValue :'',
         },
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
         //存储所有被勾选的数据
@@ -121,17 +133,34 @@
 
     },
     mounted() {
+      this.getList();
+      this.systemUserGetAcademicYear();
+      this.systemUserGetCategories();
       this.examElDisciplineTypeList();
       this.systemDeptCurrentDept();
     },
     methods: {
       // 提交按钮
       checkButton() {
+        let self = this;
         if(!this.multipleSelection[0]){
           this.msgError('请勾选用户')
           return
         }
-        this.$parent.$parent.drawerOffButton()
+        let list = [];
+        for(let i=0;i<self.multipleSelection.length;i++){
+          list.push({
+            userId:self.multipleSelection[i].userId,
+            userName:self.multipleSelection[i].userName,
+            deptId:self.multipleSelection[i].deptId,
+            deptName:self.multipleSelection[i].deptName,
+            account:self.multipleSelection[i].account,
+            disciplineId:self.multipleSelection[i].majorId,
+            disciplineName:self.multipleSelection[i].majorName,
+            academicYear:self.multipleSelection[i].gradeNumber,
+          })
+        }
+        this.$parent.$parent.drawerOffButton(JSON.parse(JSON.stringify(list)))
       },
       //查询按钮
       handleQuery(){
@@ -143,11 +172,11 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
+          gradeNumbers:[],
+          deptIds :[],
+          userTypeIds :[],
+          majorId :[],
+          searchValue :'',
         });
         this.getList();
       },
@@ -155,12 +184,24 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        systemUserGetUserDataByParam(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
         });
       },
+      //学年下拉列表
+      systemUserGetAcademicYear(){
+        systemUserGetAcademicYear({}).then(response => {
+          this.$set(this,'optionListD',response.data);
+        });
+      },
+      //用户类别下拉列表
+      systemUserGetCategories(){
+        systemUserGetCategories({}).then(response => {
+          this.$set(this,'optionListC',response.data);
+        });
+      },
       //查询全部专业类别
       examElDisciplineTypeList(){
         examElDisciplineTypeList({}).then(response => {
@@ -170,7 +211,9 @@
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionListB',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListB',list);
         });
       },
       getRowKey(row) {
@@ -178,7 +221,6 @@
       },
       handleSelectionChange(val) {
         this.multipleSelection = val;
-        console.log('当前所有选中的数据:', this.multipleSelection);
       },
     }
   }

+ 151 - 77
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/studentsTakingMakeUpExams.vue

@@ -10,46 +10,46 @@
       <div class="max-add-form-box">
         <el-form class="add-form-box" :model="newData" ref="form" label-width="140px" :rules="rules">
           <div class="form-flex-box">
-            <el-form-item label="复用原试卷" prop="data1">
+            <el-form-item label="复用原试卷" prop="reuseOriginalPaper">
               <el-switch
-                :active-value="true"
-                :inactive-value="false"
-                v-model="newData.data1"
+                :active-value="1"
+                :inactive-value="0"
+                v-model="newData.reuseOriginalPaper"
                 active-color="#0183FB"
                 inactive-color="#AAAAAA"
               >
               </el-switch>
             </el-form-item>
-            <p class="checkButton-p" v-if="!newData.data1" style="margin-left:20px;" @click="openPaperDrawer">选择试卷</p>
-            <div class="selected-tag" v-if="newData.paperName && !newData.data1">
+            <p class="checkButton-p" v-if="newData.reuseOriginalPaper == 0" style="margin-left:20px;" @click="openPaperDrawer">选择试卷</p>
+            <div class="selected-tag" v-if="newData.paperName && newData.reuseOriginalPaper == 0">
               <span>{{ newData.paperName }}</span>
               <i class="el-icon-close" @click="newData.paperId = null; newData.paperName = ''"></i>
             </div>
           </div>
           <div class="form-flex-box">
-            <el-form-item label="补考时间" prop="dateRange">
+            <el-form-item label="补考时间" prop="examTimeRange">
               <el-date-picker
-                :clearable="false"
-                v-model="newData.dateRange"
-                size="small"
-                style="width: 220px"
-                value-format="yyyy-MM-dd"
-                type="daterange"
-                range-separator="-"
+                popper-class="examinationArrange-addPage-date-picker"
+                v-model="newData.examTimeRange"
+                type="datetimerange"
+                range-separator="至"
+                format="yyyy-MM-dd HH:mm"
+                value-format="yyyy-MM-dd HH:mm"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
-              ></el-date-picker>
+                :picker-options="pickerOptions"
+              />
             </el-form-item>
           </div>
           <div class="form-flex-box">
-            <el-form-item label="可补考次数" prop="data2">
+            <el-form-item label="可补考次数" prop="attemptLimit">
               <el-input-number
                 class="form-input-number"
                 style="width:200px"
                 :min="1"
                 :max="9999"
                 :step="1" :precision="0" step-strictly
-                v-model="newData.data2"
+                v-model="newData.attemptLimit"
               >
               </el-input-number>
             </el-form-item>
@@ -58,30 +58,36 @@
       </div>
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
-                 :inline="true" style="width:100%;"
-        >
-          <el-form-item label="" prop="queryParamsData1">
-            <el-select v-model="queryParams.queryParamsData1" placeholder="学院单位" style="width: 140px">
-              <el-option
-                v-for="dict in optionListA"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" multiple placeholder="学年" style="width: 140px">
+                 :inline="true" style="width:100%;">
+          <el-form-item label="" prop="academicYear">
+            <el-select v-model="queryParams.academicYear" placeholder="学年" style="width: 140px">
               <el-option
                 v-for="dict in optionListB"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                :key="dict.gradeNumber"
+                :label="dict.gradeNumber"
+                :value="dict.gradeNumber"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
-            <el-select v-model="queryParams.queryParamsData3" placeholder="专业" style="width: 140px">
+          <el-form-item label="" prop="deptId">
+            <el-cascader
+              style="width: 180px"
+              v-model="queryParams.deptId"
+              :options="optionListA"
+              :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+              :show-all-levels="false"
+              filterable
+              placeholder="学院单位"
+            ></el-cascader>
+          </el-form-item>
+          <el-form-item label="" prop="disciplineId">
+            <el-select v-model="queryParams.disciplineId" placeholder="专业" style="width: 140px">
               <el-option
                 v-for="dict in optionListC"
                 :key="dict.id"
@@ -90,10 +96,10 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
+          <el-form-item label="" prop="account">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData4"
+              v-model="queryParams.account"
               placeholder="姓名/学工号"
               style="width: 140px"
             />
@@ -107,19 +113,24 @@
       </div>
       <div class="page-content-box">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="姓名" prop="name" show-overflow-tooltip/>
-          <el-table-column label="学工号" prop="content" width="140" show-overflow-tooltip/>
-          <el-table-column label="专业" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="学年" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="学院单位" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="交卷时间" prop="content" width="140" show-overflow-tooltip>
+          <el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="学工号" prop="account" width="140" show-overflow-tooltip/>
+          <el-table-column label="专业" prop="disciplineName" width="120" show-overflow-tooltip/>
+          <el-table-column label="学年" prop="academicYear" width="100" show-overflow-tooltip/>
+          <el-table-column label="学院单位" prop="deptName" width="200" show-overflow-tooltip/>
+          <el-table-column label="交卷时间" prop="submitTime" width="140" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.submitTime,'{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="用时" prop="durationText" width="100" show-overflow-tooltip/>
+          <el-table-column label="成绩" prop="score" width="100" show-overflow-tooltip/>
+          <el-table-column label="结果" prop="passStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,'{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+              <span v-if="scope.row.resultStatus == 4" class="colorA">缺勤</span>
+              <span v-if="scope.row.resultStatus == 3" class="colorB">未通过</span>
             </template>
           </el-table-column>
-          <el-table-column label="用时" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="成绩" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="结果" prop="content" width="100" show-overflow-tooltip/>
           <el-table-column label="操作" width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <div class="table-button-box">
@@ -151,8 +162,8 @@
       direction="rtl"
     >
       <!--选择试卷/选择试题-->
-      <selectTestPaper v-if="drawerType === 1"></selectTestPaper>
-      <examDetails v-if="drawerType === 2"></examDetails>
+      <selectTestPaper v-if="drawerType === 1&&drawer"></selectTestPaper>
+      <examDetails v-if="drawerType === 2&&drawer"></examDetails>
     </el-drawer>
   </div>
 </template>
@@ -161,7 +172,11 @@
   import exportComponent from '@/components/exportComponent/exportComponent.vue'
   import examDetails from '@/views/safetyEducationExaminationNew/components/examDetails.vue'
   import selectTestPaper from './selectTestPaper.vue'
-  import { examElDisciplineTypeList, systemDeptCurrentDept } from '@/api/safetyEducationExaminationNew/index'
+  import {
+    systemUserGetAcademicYear,
+    examElExamMakeupAdd,examElExamMakeupCandidates,
+    examElDisciplineTypeList, systemDeptCurrentDept
+  } from '@/api/safetyEducationExaminationNew/index'
 
   export default {
     name: 'addPage',
@@ -175,44 +190,51 @@
     },
     data() {
       return {
+        //日期选择范围限制
+        pickerOptions: {
+          disabledDate(time) {
+            return time.getTime() < Date.now() - 8.64e7;
+          }
+        },
         //页面遮罩
         loading: false,
         newData: {
-          data1: true,
-          data2: 1,
-          paperName: '试卷名称',
-          paperId: '2',
-          dateRange: [],
+          parentExamId:null,
+          reuseOriginalPaper: 1,
+          attemptLimit: 1,
+          paperId: null,
+          paperName: '',
+          examTimeRange: [],
         },
         rules:{
-          data1: [
+          reuseOriginalPaper: [
             { required: true, message: "是否复用原试卷", trigger: "blur" },
             { required: true, message: "是否复用原试卷", validator: this.spaceJudgment, trigger: "blur" }
           ],
-          data2: [
+          attemptLimit: [
             { required: true, message: "请选择可补考次数", trigger: "blur" },
             { required: true, message: "请选择可补考次数", validator: this.spaceJudgment, trigger: "blur" }
           ],
-          dateRange: [
+          examTimeRange: [
             { required: true, message: "请选择补考时间", trigger: "blur" },
             { required: true, message: "请选择补考时间", validator: this.spaceJudgment, trigger: "blur" }
           ],
         },
         //下拉列表数据
         optionListA: [],
-        optionListB: [],
+        optionListB: [{}],
         optionListC: [],
         //查询条件
         queryParams: {
           page: 1,
           pageSize: 20,
-          queryParamsData1: null,
-          queryParamsData2: null,
-          queryParamsData3: null,
-          queryParamsData4: ''
+          deptId: null,
+          academicYear: null,
+          disciplineId: null,
+          account: ''
         },
         //列表数据
-        dataList: [{}],
+        dataList: [],
         //数据数量
         total: 0,
         exportConfig: {
@@ -233,16 +255,18 @@
 
     },
     mounted() {
+      this.$set(this.newData,'parentExamId',this.propsData.id);
+      this.getList()
       this.examElDisciplineTypeList()
       this.systemDeptCurrentDept()
+      this.systemUserGetAcademicYear()
     },
     methods: {
       //弹窗返回
       drawerReturnButton(){
-        this.$refs.drawer.closeDrawer();
-      },
-      //弹窗确定
-      drawerConfirmButton(){
+        //选择试卷
+        this.$set(this.newData, 'paperId', data.id)
+        this.$set(this.newData, 'paperName', data.name)
         this.$refs.drawer.closeDrawer();
       },
       openPaperDrawer() {
@@ -257,7 +281,33 @@
       },
       // 提交按钮
       submitButton() {
-
+        let  self = this;
+        this.$refs.form.validate((valid, fields) => {
+          if (valid) {
+            this.$confirm('是否确认保存?', "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(function() {
+            }).then(() => {
+              self.examElExamMakeupAdd();
+            }).catch(() => {});
+          }
+        })
+      },
+      examElExamMakeupAdd(){
+        let obj = {
+          parentExamId:this.newData.parentExamId,
+          reuseOriginalPaper:this.newData.reuseOriginalPaper,
+          paperId:this.newData.reuseOriginalPaper?this.newData.paperId:'',
+          attemptLimit:this.newData.attemptLimit,
+          startTime:this.newData.examTimeRange[0].replace(" ", "T"),
+          endTime:this.newData.examTimeRange[1].replace(" ", "T"),
+        }
+        examElExamMakeupAdd(obj).then(response => {
+          this.msgSuccess(response.message)
+          this.$parent.tableButton(6)
+        })
       },
       lockExam(){
         this.$set(this, 'drawerTitle', '试卷详情')
@@ -274,10 +324,10 @@
         this.$set(this, 'queryParams', {
           page: 1,
           pageSize: 20,
-          queryParamsData1: null,
-          queryParamsData2: null,
-          queryParamsData3: null,
-          queryParamsData4: ''
+          deptId: null,
+          academicYear: null,
+          disciplineId: null,
+          account: ''
         })
         this.getList()
       },
@@ -285,7 +335,8 @@
       getList() {
         this.$set(this, 'loading', true)
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        obj.examId = this.newData.parentExamId
+        examElExamMakeupCandidates(obj).then(response => {
           this.$set(this, 'loading', false)
           this.$set(this, 'dataList', response.data.records)
           this.$set(this, 'total', response.data.total)
@@ -297,10 +348,18 @@
           this.$set(this, 'optionListC', response.data)
         })
       },
+      //学年下拉列表
+      systemUserGetAcademicYear(){
+        systemUserGetAcademicYear({}).then(response => {
+          this.$set(this,'optionListB',response.data);
+        });
+      },
       //学院列表
       systemDeptCurrentDept() {
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this, 'optionListA', response.data)
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this, 'optionListA', list)
         })
       }
     }
@@ -313,7 +372,12 @@
     display: flex;
     flex-direction: column;
     overflow: hidden;
-
+    .colorA{
+      color:#F6A53C;
+    }
+    .colorB{
+      color:#EF98A2;
+    }
     .content-box {
       flex: 1;
       display: flex;
@@ -371,3 +435,13 @@
     }
   }
 </style>
+<style lang="scss">
+  .examinationArrange-addPage-date-picker {
+    .el-input--small {
+      width: 144px !important;
+    }
+    .el-time-panel__content::after, .el-time-panel__content::before{
+      top:45%!important;
+    }
+  }
+</style>

+ 183 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationResult/academicPerformance.vue

@@ -0,0 +1,183 @@
+<!-- 学习情况 -->
+<template>
+  <div class="page-container academicPerformance-addPage">
+    <div class="page-form-title-box">
+      <el-form :model="queryParams" class="form-box" ref="queryForm"
+               :inline="true" style="width:100%;">
+        <el-form-item label="" prop="passStatus">
+          <el-select v-model="queryParams.passStatus" placeholder="是否完成" style="width: 120px">
+            <el-option label="已完成" value="1"/>
+            <el-option label="未完成" value="0"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="deptId">
+          <el-cascader
+            style="width: 180px"
+            v-model="queryParams.deptId"
+            :options="optionListA"
+            :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="学院单位"
+          ></el-cascader>
+        </el-form-item>
+        <el-form-item label="" prop="searchValue">
+          <el-input
+            maxLength="30"
+            v-model="queryParams.searchValue"
+            placeholder="姓名/学工号"
+            style="width: 140px"
+          />
+        </el-form-item>
+        <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+        <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+        <p class="page-add-common-style-button" style="float: right;" @click="exportButton()">导出</p>
+      </el-form>
+    </div>
+    <div class="page-content-box">
+      <el-table class="table-box" v-loading="loading" border :data="dataList">
+        <el-table-column label="姓名" prop="userName"  show-overflow-tooltip/>
+        <el-table-column label="学工号" prop="account" width="140" show-overflow-tooltip/>
+        <el-table-column label="学院单位" prop="deptName" width="240" show-overflow-tooltip/>
+        <el-table-column label="完成时间" prop="submitTime" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.submitTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="学时" prop="durationText" width="200" show-overflow-tooltip/>
+        <el-table-column label="积分" prop="score" width="200" show-overflow-tooltip/>
+        <el-table-column label="是否完成" prop="resultStatus" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span v-if="scope.row.resultStatus == 0">已完成</span>
+            <span v-if="scope.row.resultStatus == 1">未完成</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  v-show="total>0"
+                  :total="total"
+                  :page.sync="queryParams.page"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    systemUserGetCategories,systemUserGetAcademicYear,
+    examElExamResultScorePage,examElDisciplineTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
+  export default {
+    name: 'addPage',
+    props: {
+      drawerPropsData: {}
+    },
+    data() {
+      return {
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionListA:[],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          deptId:null,
+          academicYear :null,
+          disciplineId :null,
+          userType :null,
+          passStatus :null,
+          searchValue :'',
+        },
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.getList();
+      this.systemDeptCurrentDept();
+    },
+    methods: {
+      //导出
+      exportButton(){
+        let self = this;
+        self.$confirm(`确认导出数据?`, "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(async () => {
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          if(this.dateRange[0]){
+            obj.startTime = this.dateRange[0]+'T00:00:00'
+            obj.endTime = this.dateRange[1]+'T23:59:59'
+          }else{
+            obj.startTime = "";
+            obj.endTime = "";
+          }
+          self.download('/exam/elExamResult/score-export/', {...obj}, '学习情况-'+this.drawerPropsData.examName+'.xlsx')
+        }).catch(() => {})
+      },
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          deptId:null,
+          academicYear :null,
+          disciplineId :null,
+          userType :null,
+          passStatus :null,
+          searchValue :'',
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        console.log('drawerPropsData',this.drawerPropsData)
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        obj.examId = this.drawerPropsData.examId
+        examElExamResultScorePage(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //学院列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListA',list);
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .academicPerformance-addPage {
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+  }
+</style>

+ 104 - 63
src/views/safetyEducationExaminationNew/examManagement/examinationResult/index.vue

@@ -5,28 +5,35 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData1">
-            <el-select v-model="queryParams.queryParamsData1" multiple placeholder="学年" style="width: 140px">
+          <el-form-item label="" prop="academicYear">
+            <el-select v-model="queryParams.academicYear" placeholder="学年" style="width: 140px">
               <el-option
                 v-for="dict in optionListA"
-                :key="dict.id"
-                :label="dict.disciplineName"
-                :value="dict.id"
+                :key="dict.gradeNumber"
+                :label="dict.gradeNumber"
+                :value="dict.gradeNumber"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 140px">
-              <el-option
-                v-for="dict in optionListB"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              />
-            </el-select>
+          <el-form-item label="" prop="deptId">
+            <el-cascader
+              style="width: 180px"
+              v-model="queryParams.deptId"
+              :options="optionListB"
+              :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+              :show-all-levels="false"
+              filterable
+              placeholder="学院单位"
+            ></el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
-            <el-select v-model="queryParams.queryParamsData3" placeholder="考试类型" style="width: 160px">
+          <el-form-item label="" prop="examTypeId">
+            <el-select v-model="queryParams.examTypeId" placeholder="考试类型" style="width: 160px">
               <el-option
                 v-for="dict in optionListC"
                 :key="dict.id"
@@ -35,16 +42,16 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4" placeholder="是否补考" style="width: 140px">
+          <el-form-item label="" prop="makeup">
+            <el-select v-model="queryParams.makeup" placeholder="是否补考" style="width: 140px">
               <el-option label="补考" value="1"/>
-              <el-option label="不补考" value="2"/>
+              <el-option label="不补考" value="0"/>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData5">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData5"
+              v-model="queryParams.searchValue"
               placeholder="考试名称"
               style="width: 200px"
             />
@@ -64,24 +71,22 @@
           </el-form-item>
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <el-form-item style="float: right;">
-            <export-component :exportConfig="exportConfig"></export-component>
-          </el-form-item>
+          <p class="page-add-common-style-button" style="float: right;" @click="exportButton()">导出</p>
         </el-form>
       </div>
       <div class="page-content-box">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="考试名称" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="考试类型" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="考试时间" prop="createTime" width="200" show-overflow-tooltip>
+          <el-table-column label="考试名称" prop="examName"  show-overflow-tooltip/>
+          <el-table-column label="考试类型" prop="examTypeName" width="200" show-overflow-tooltip/>
+          <el-table-column label="考试时间" prop="startTime" width="290" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}至{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.startTime,"{y}-{m}-{d} {h}:{i}") }} 至 {{ parseTime(scope.row.endTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="参加人数" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="合格人数" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="缺考人数" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="补考人数" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="参加人数" prop="participantCount" width="140" show-overflow-tooltip/>
+          <el-table-column label="合格人数" prop="passedCount" width="140" show-overflow-tooltip/>
+          <el-table-column label="缺考人数" prop="absentCount" width="140" show-overflow-tooltip/>
+          <el-table-column label="补考人数" prop="makeupCount" width="140" show-overflow-tooltip/>
           <el-table-column label="操作" width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <div class="table-button-box">
@@ -108,13 +113,14 @@
     </div>
     <el-drawer
       size="100%"
-      custom-class="examinationArrange-addPage-drawer"
+      custom-class="examinationResult-index-drawer"
       :append-to-body="true"
       :title="drawerTitle"
       ref="drawer"
       :visible.sync="drawer"
       direction="rtl">
-      <viewGrades v-if="drawerType==1"></viewGrades>
+      <viewGrades v-if="drawerType==1&&drawer" :drawerPropsData="drawerPropsData"></viewGrades>
+      <academicPerformance v-if="drawerType==2&&drawer" :drawerPropsData="drawerPropsData"></academicPerformance>
     </el-drawer>
   </div>
 </template>
@@ -123,13 +129,16 @@
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   import viewGrades from "./viewGrades.vue";
-  import { examElExamTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
-  import exportComponent from "@/components/exportComponent/exportComponent.vue";
+  import academicPerformance from "./academicPerformance.vue";
+  import {
+    systemUserGetAcademicYear,
+    examElExamResultPage,examElExamTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'index',
     components: {
-      exportComponent,
       viewGrades,
+      academicPerformance,
     },
     data () {
       return {
@@ -146,44 +155,56 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :'',
+          academicYear:null,
+          deptId :null,
+          examTypeId :null,
+          makeup :null,
+          searchValue :'',
         },
         //时间数据
         dateRange:[],
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
         //组件传参
         propsData:{},
-        //导出配置
-        exportConfig:{
-          api:'system/user/student/export',              //导出接口地址
-          ids:'',                                        //勾选导出,勾选的IDS
-          fileName:'导出文件名',                         //导出文件的命名
-          customKey:null,                                //自定义参数KEY(非必填)
-          customValue:null,                               //自定义参数VALUE(非必填)
-          screenData:{}                                  //导出筛选数据(非必要-如有该参数组件会显示导出筛选数据按钮)
-        },
         //弹窗相关
         drawerTitle: '',
         drawerType: '',
-        drawer: false
+        drawer: false,
+        drawerPropsData:{},
       }
     },
     created () {
 
     },
     mounted () {
-      //this.getList();
+      this.getList();
       this.examElExamTypeList();
       this.systemDeptCurrentDept();
+      this.systemUserGetAcademicYear();
     },
     methods: {
+      //导出
+      exportButton(){
+        let self = this;
+        self.$confirm(`确认导出数据?`, "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(async () => {
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          if(this.dateRange[0]){
+            obj.startTime = this.dateRange[0]+'T00:00:00'
+            obj.endTime = this.dateRange[1]+'T23:59:59'
+          }else{
+            obj.startTime = "";
+            obj.endTime = "";
+          }
+          self.download('/exam/elExamResult/export', {...obj}, '考试结果.xlsx')
+        }).catch(() => {})
+      },
       //弹窗返回
       drawerReturnButton(){
         this.$refs.drawer.closeDrawer();
@@ -203,11 +224,11 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :'',
+          academicYear:null,
+          deptId :null,
+          examTypeId :null,
+          makeup :null,
+          searchValue :'',
         });
         this.getList();
       },
@@ -222,7 +243,7 @@
           obj.startTime = "";
           obj.endTime = "";
         }
-        getListFunction(obj).then(response => {
+        examElExamResultPage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -233,16 +254,24 @@
         let self = this;
         if(type == 1){
           // TODO: 查看成绩
-          this.$set(this, 'drawerTitle', '查看成绩')
+          this.$set(this, 'drawerTitle', '查看成绩-'+row.examName)
           this.$set(this, 'drawerType', 1)
           this.$set(this, 'drawer', true)
+          this.$set(this, 'drawerPropsData', row)
         }else if(type == 2){
           // TODO: 学习情况
-          this.$set(this, 'drawerTitle', '学习情况')
+          this.$set(this, 'drawerTitle', '学习情况-'+row.examName)
           this.$set(this, 'drawerType', 2)
           this.$set(this, 'drawer', true)
+          this.$set(this, 'drawerPropsData', row)
         }
       },
+      //学年下拉列表
+      systemUserGetAcademicYear(){
+        systemUserGetAcademicYear({}).then(response => {
+          this.$set(this,'optionListA',response.data);
+        });
+      },
       //查询全部考试类型
       examElExamTypeList(){
         examElExamTypeList({}).then(response => {
@@ -252,7 +281,9 @@
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionListB',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListB',list);
         });
       },
     },
@@ -265,3 +296,13 @@
     }
   }
 </style>
+<style lang="scss">
+  .examinationResult-index-drawer{
+    .el-drawer__body{
+      padding:0;
+    }
+    .el-drawer__header{
+      margin:0;
+    }
+  }
+</style>

+ 118 - 70
src/views/safetyEducationExaminationNew/examManagement/examinationResult/viewGrades.vue

@@ -4,28 +4,35 @@
     <div class="page-form-title-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="" prop="queryParamsData1">
-          <el-select v-model="queryParams.queryParamsData1" placeholder="学院单位" style="width: 140px">
-            <el-option
-              v-for="dict in optionListA"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            />
-          </el-select>
+        <el-form-item label="" prop="deptId">
+          <el-cascader
+            style="width: 180px"
+            v-model="queryParams.deptId"
+            :options="optionListA"
+            :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="学院单位"
+          ></el-cascader>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData2">
-          <el-select v-model="queryParams.queryParamsData2" multiple placeholder="年级" style="width: 120px">
+        <el-form-item label="" prop="academicYear">
+          <el-select v-model="queryParams.academicYear" placeholder="年级" style="width: 120px">
             <el-option
               v-for="dict in optionListB"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
+              :key="dict.gradeNumber"
+              :label="dict.gradeNumber"
+              :value="dict.gradeNumber"
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData3">
-          <el-select v-model="queryParams.queryParamsData3" placeholder="专业" style="width: 140px">
+        <el-form-item label="" prop="disciplineId">
+          <el-select v-model="queryParams.disciplineId" placeholder="专业" style="width: 140px">
             <el-option
               v-for="dict in optionListC"
               :key="dict.id"
@@ -34,8 +41,8 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData4">
-          <el-select v-model="queryParams.queryParamsData4" multiple placeholder="用户类别" style="width: 120px">
+        <el-form-item label="" prop="userType">
+          <el-select v-model="queryParams.userType" placeholder="用户类别" style="width: 120px">
             <el-option
               v-for="dict in optionListD"
               :key="dict.value"
@@ -44,42 +51,48 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData5">
-          <el-select v-model="queryParams.queryParamsData5" multiple placeholder="是否通过" style="width: 120px">
+        <el-form-item label="" prop="passStatus">
+          <el-select v-model="queryParams.passStatus" placeholder="是否通过" style="width: 120px">
             <el-option label="通过" value="1"/>
-            <el-option label="不通过" value="2"/>
+            <el-option label="不通过" value="0"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="queryParamsData6">
+        <el-form-item label="" prop="searchValue">
           <el-input
             maxLength="30"
-            v-model="queryParams.queryParamsData6"
-            placeholder="考试名称"
+            v-model="queryParams.searchValue"
+            placeholder="姓名/学工号"
             style="width: 140px"
           />
         </el-form-item>
         <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
         <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-        <el-form-item style="float: right;">
-          <export-component :exportConfig="exportConfig"></export-component>
-        </el-form-item>
+        <p class="page-add-common-style-button" style="float: right;" @click="exportButton()">导出</p>
       </el-form>
     </div>
     <div class="page-content-box">
       <el-table class="table-box" v-loading="loading" border :data="dataList">
-        <el-table-column label="姓名" prop="name"  show-overflow-tooltip/>
-        <el-table-column label="学工号" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="专业" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="学年" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="学院单位" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="交卷时间" prop="createTime" width="200" show-overflow-tooltip>
+        <el-table-column label="姓名" prop="userName"  show-overflow-tooltip/>
+        <el-table-column label="学工号" prop="account" width="140" show-overflow-tooltip/>
+        <el-table-column label="专业" prop="disciplineName" width="200" show-overflow-tooltip/>
+        <el-table-column label="学年" prop="academicYear" width="140" show-overflow-tooltip/>
+        <el-table-column label="学院单位" prop="deptName" width="240" show-overflow-tooltip/>
+        <el-table-column label="交卷时间" prop="submitTime" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.submitTime,"{y}-{m}-{d} {h}:{i}") }}至{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="用时" prop="durationText" width="140" show-overflow-tooltip/>
+        <el-table-column label="成绩" prop="score" width="140" show-overflow-tooltip/>
+        <el-table-column label="结果" prop="resultStatus" width="140" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}至{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+            <span v-if="scope.row.resultStatus == 0">未开始</span>
+            <span v-if="scope.row.resultStatus == 1">考试中</span>
+            <span class="colorA" v-if="scope.row.resultStatus == 2">通过</span>
+            <span class="colorB" v-if="scope.row.resultStatus == 3">未通过</span>
+            <span class="colorC" v-if="scope.row.resultStatus == 4">缺考</span>
           </template>
         </el-table-column>
-        <el-table-column label="用时" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="成绩" prop="content" width="200" show-overflow-tooltip/>
-        <el-table-column label="结果" prop="content" width="200" show-overflow-tooltip/>
         <el-table-column label="操作" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
             <div class="table-button-box">
@@ -109,23 +122,24 @@
       :visible.sync="drawer"
       direction="rtl"
     >
-      <examDetails></examDetails>
+      <examDetails v-if="drawer"></examDetails>
     </el-drawer>
   </div>
 </template>
 
 <script>
-  import { examElDisciplineTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    systemUserGetCategories,systemUserGetAcademicYear,
+    examElExamResultScorePage,examElDisciplineTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
   import examDetails from '@/views/safetyEducationExaminationNew/components/examDetails.vue'
-  import exportComponent from "@/components/exportComponent/exportComponent.vue";
   export default {
     name: 'addPage',
     components: {
-      exportComponent,
       examDetails
     },
     props: {
-      propsData: {}
+      drawerPropsData: {}
     },
     data() {
       return {
@@ -141,26 +155,17 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :'',
+          deptId:null,
+          academicYear :null,
+          disciplineId :null,
+          userType :null,
+          passStatus :null,
+          searchValue :'',
         },
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
-        //导出配置
-        exportConfig:{
-          api:'system/user/student/export',              //导出接口地址
-          ids:'',                                        //勾选导出,勾选的IDS
-          fileName:'导出文件名',                         //导出文件的命名
-          customKey:null,                                //自定义参数KEY(非必填)
-          customValue:null,                               //自定义参数VALUE(非必填)
-          screenData:{}                                  //导出筛选数据(非必要-如有该参数组件会显示导出筛选数据按钮)
-        },
         //弹窗相关
         drawerTitle: '',
         drawerType: '',
@@ -171,19 +176,37 @@
 
     },
     mounted() {
+      this.getList();
       this.examElDisciplineTypeList();
       this.systemDeptCurrentDept();
+      this.systemUserGetCategories();
+      this.systemUserGetAcademicYear();
     },
     methods: {
+      //导出
+      exportButton(){
+        let self = this;
+        self.$confirm(`确认导出数据?`, "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(async () => {
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          if(this.dateRange[0]){
+            obj.startTime = this.dateRange[0]+'T00:00:00'
+            obj.endTime = this.dateRange[1]+'T23:59:59'
+          }else{
+            obj.startTime = "";
+            obj.endTime = "";
+          }
+          self.download('/exam/elExamResult/score-export', {...obj}, '查看成绩-'+this.drawerPropsData.examName+'.xlsx')
+        }).catch(() => {})
+      },
       lockExam(){
         this.$set(this, 'drawerTitle', '试卷详情')
         this.$set(this, 'drawerType', 2)
         this.$set(this, 'drawer', true)
       },
-      // 提交按钮
-      checkButton() {
-        this.$parent.$parent.drawerOffButton()
-      },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
@@ -194,20 +217,22 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
-          queryParamsData6 :'',
+          deptId:null,
+          academicYear :null,
+          disciplineId :null,
+          userType :null,
+          passStatus :null,
+          searchValue :'',
         });
         this.getList();
       },
       //获取数据列表
       getList(){
+        console.log('drawerPropsData',this.drawerPropsData)
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        obj.examId = this.drawerPropsData.examId
+        examElExamResultScorePage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -222,7 +247,21 @@
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionListA',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListA',list);
+        });
+      },
+      //学年下拉列表
+      systemUserGetAcademicYear(){
+        systemUserGetAcademicYear({}).then(response => {
+          this.$set(this,'optionListB',response.data);
+        });
+      },
+      //用户类别下拉列表
+      systemUserGetCategories(){
+        systemUserGetCategories({}).then(response => {
+          this.$set(this,'optionListD',response.data);
         });
       },
     }
@@ -235,5 +274,14 @@
     display: flex;
     flex-direction: column;
     overflow: hidden;
+    .colorA{
+      color:#41C599;
+    }
+    .colorB{
+      color:#EF98A2;
+    }
+    .colorC{
+      color:#F6A53C;
+    }
   }
 </style>

+ 89 - 38
src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/addPage.vue

@@ -4,8 +4,8 @@
     <div class="page-container-top-max-big-box">
       <p class="top-1-p">{{newData.id?'编辑试卷':'新建试卷'}}</p>
       <p class="top-2-p" @click="backPage()">返回</p>
-      <p class="top-3-p" v-if="newData.id" @click="resetButton()">重置</p>
-      <p class="top-4-p" @click="submitButton()">保存</p>
+      <p class="top-3-p" v-if="newData.id&&!showType" @click="resetButton()">重置</p>
+      <p class="top-4-p" @click="submitButton()" v-if="!showType">保存</p>
     </div>
     <div class="content-box scrollbar-box">
       <el-form class="add-form-box" :model="newData" ref="form" label-width="100px" :rules="rules">
@@ -13,13 +13,14 @@
         <div class="section-box">
           <!-- 试卷名称 -->
           <el-form-item label="试卷名称" prop="paperName" class="full-width-item">
-            <el-input v-model="newData.paperName" maxLength="30" placeholder="请输入名称"/>
+            <el-input v-model="newData.paperName" maxLength="30" placeholder="请输入名称" :disabled="showType"/>
           </el-form-item>
           <!-- 总分数 / 及格分数 / 答题时间 -->
           <div class="flex-row-box">
             <el-form-item label="总分数" prop="totalScore">
               <div class="input-unit-box">
                 <el-input-number
+                  :disabled="showType"
                   class="form-input-number"
                   style="width:160px"
                   :min="0"
@@ -35,6 +36,7 @@
             <el-form-item label="及格分数" prop="passScore">
               <div class="input-unit-box">
                 <el-input-number
+                  :disabled="showType"
                   class="form-input-number"
                   style="width:160px"
                   :min="0"
@@ -47,27 +49,28 @@
                 <span class="unit-text">分</span>
               </div>
             </el-form-item>
-            <el-form-item label="答题时间" prop="answerDuration">
-              <div class="input-unit-box">
-                <el-input-number
-                  class="form-input-number"
-                  style="width:160px"
-                  :min="0"
-                  :max="9999"
-                  :step="1" :precision="0" step-strictly
-                  v-model="newData.answerDuration"
-                  :controls="false"
-                >
-                </el-input-number>
-                <span class="unit-text">分钟</span>
-              </div>
-            </el-form-item>
+            <!--<el-form-item label="答题时间" prop="answerDuration">-->
+              <!--<div class="input-unit-box">-->
+                <!--<el-input-number-->
+                  <!--:disabled="showType"-->
+                  <!--class="form-input-number"-->
+                  <!--style="width:160px"-->
+                  <!--:min="0"-->
+                  <!--:max="9999"-->
+                  <!--:step="1" :precision="0" step-strictly-->
+                  <!--v-model="newData.answerDuration"-->
+                  <!--:controls="false"-->
+                <!--&gt;-->
+                <!--</el-input-number>-->
+                <!--<span class="unit-text">分钟</span>-->
+              <!--</div>-->
+            <!--</el-form-item>-->
           </div>
 
           <!-- 专业类别 / 是否共享 -->
           <div class="flex-row-box">
             <el-form-item label="专业类别" prop="disciplineTypeId">
-              <el-select v-model="newData.disciplineTypeId" placeholder="专业类别" style="width:200px;">
+              <el-select :disabled="showType" v-model="newData.disciplineTypeId" placeholder="专业类别" style="width:200px;">
                 <el-option
                   v-for="item in optionListA"
                   :key="item.id"
@@ -78,6 +81,7 @@
             </el-form-item>
             <el-form-item label="是否共享" prop="shareStatus">
               <el-switch
+                :disabled="showType"
                 v-model="newData.shareStatus"
                 :active-value="1"
                 :inactive-value="0"
@@ -96,7 +100,7 @@
         <div class="section-box">
           <!-- 组卷方式 -->
           <el-form-item label="组卷方式" prop="assemblyMode">
-            <el-radio-group v-model="newData.assemblyMode">
+            <el-radio-group v-model="newData.assemblyMode" :disabled="showType">
               <el-radio :label="1">固定组卷</el-radio>
               <el-radio :label="2">随机组卷</el-radio>
             </el-radio-group>
@@ -117,6 +121,7 @@
             <!-- 已选知识点标签 -->
             <div class="knowledge-tag-box">
               <el-cascader
+                :disabled="showType"
                 ref="knowledgeCascader"
                 v-model="newData.knowledgePointId"
                 :options="optionListKnowledge"
@@ -165,6 +170,7 @@
                   <span class="col-score">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         v-if="newData.assemblyMode==1"
                         @change="calculationMaxData()"
                         class="form-input-number"
@@ -178,9 +184,9 @@
                     </span>
                   </span>
                   <span class="col-fixed">
-                    <span class="item-num-span" v-if="newData.assemblyMode==1">{{item.questionIds.length}}</span>
-                    <span class="el-icon-circle-plus" v-if="newData.assemblyMode==1" @click="addFixed(index)"></span>
-                    <span class="el-icon-rank"></span>
+                    <span class="item-num-span" v-if="newData.assemblyMode==1&&!showType">{{item.questionIds.length}}</span>
+                    <span class="el-icon-circle-plus" v-if="newData.assemblyMode==1&&!showType" @click="addFixed(index)"></span>
+                    <span class="el-icon-rank" v-if="!showType"></span>
                   </span>
                 </div>
                 <div  v-if="newData.assemblyMode==2 && item.rollerType" class="table-min-row">
@@ -191,6 +197,7 @@
                   <span class="col-score">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         class="form-input-number"
                         @change="calculationMaxData()"
                         style="width:160px"
@@ -205,6 +212,7 @@
                   <span class="col-fixed">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         class="form-input-number"
                         @change="calculationMaxData()"
                         style="width:80px"
@@ -226,6 +234,7 @@
                   <span class="col-score">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         class="form-input-number"
                         @change="calculationMaxData()"
                         style="width:160px"
@@ -240,6 +249,7 @@
                   <span class="col-fixed">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         class="form-input-number"
                         @change="calculationMaxData()"
                         style="width:80px"
@@ -261,6 +271,7 @@
                   <span class="col-score">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         class="form-input-number"
                         @change="calculationMaxData()"
                         style="width:160px"
@@ -275,6 +286,7 @@
                   <span class="col-fixed">
                     <span class="number-stepper">
                       <el-input-number
+                        :disabled="showType"
                         class="form-input-number"
                         @change="calculationMaxData()"
                         style="width:80px"
@@ -357,7 +369,7 @@
           paperName: '',
           totalScore: 0,
           passScore: 0,
-          answerDuration: 0,
+          // answerDuration: 0,
           disciplineTypeId: null,
           shareStatus: true,
           assemblyMode: 1,
@@ -375,10 +387,10 @@
             { required: true, message: '请输入及格分数', trigger: 'blur' },
             { validator: validateData1, trigger: 'blur' }
           ],
-          answerDuration: [
-            { required: true, message: '请输入答题时间', trigger: 'blur' },
-            { validator: validateData2, trigger: 'blur' }
-          ],
+          // answerDuration: [
+          //   { required: true, message: '请输入答题时间', trigger: 'blur' },
+          //   { validator: validateData2, trigger: 'blur' }
+          // ],
           assemblyMode: [
             { required: true, message: '请选择组卷方式', trigger: 'change' }
           ],
@@ -397,7 +409,9 @@
           type: null, // 'big' 或 'small'
           bigIndex: null,
           smallIndex: null
-        }
+        },
+        //预览状态
+        showType:false,
       }
     },
     computed: {
@@ -406,6 +420,22 @@
         return Number(this.newData.totalScore || 0) - this.totalScore
       }
     },
+    watch: {
+      'newData.knowledgePointId': {
+        handler(newVal, oldVal) {
+          // 假设最多只能选 2 个
+          if (newVal && newVal.length > 10) {
+            this.msgError('最多选择10个知识点')
+            this.$nextTick(() => {
+              // 将值回退到上一次的状态
+              this.newData.knowledgePointId = oldVal;
+            });
+          }
+        },
+        deep: true, // 关键:必须开启深度监听
+        immediate: false // 初始化时不触发,防止默认值超限误报
+      }
+    },
     mounted() {
       this.initialize()
       this.examElKnowledgePointTreeList()
@@ -425,13 +455,16 @@
       initialize() {
         let self = this;
         if (this.propsData.id) {
+          if(this.propsData.showType){
+            this.$set(this,'showType',true);
+          }
           examElPaperDetail({id:this.propsData.id}).then(response => {
             let obj = {
               id:this.propsData.id,
               paperName:response.data.paperName,
               totalScore:response.data.totalScore,
               passScore:response.data.passScore,
-              answerDuration:response.data.answerDuration,
+              // answerDuration:response.data.answerDuration,
               disciplineTypeId:response.data.disciplineTypeId,
               shareStatus:response.data.shareStatus,
               assemblyMode:response.data.assemblyMode,
@@ -512,7 +545,7 @@
         this.$parent.tableButton(6)
       },
       resetButton() {
-        this.$set(this, 'drawer', true)
+        this.initialize();
       },
       submitButton() {
         let self = this;
@@ -540,7 +573,7 @@
           paperName:this.newData.paperName,
           totalScore:this.newData.totalScore,
           passScore:this.newData.passScore,
-          answerDuration:this.newData.answerDuration,
+          // answerDuration:this.newData.answerDuration,
           disciplineTypeId:this.newData.disciplineTypeId,
           shareStatus:this.newData.shareStatus,
           assemblyMode:this.newData.assemblyMode,
@@ -560,18 +593,18 @@
               rules:[
                 {
                   questionType:1,
-                  questionCount:self.fixedKnowledgePointConfigs[i].scoreA,
-                  questionScore:self.fixedKnowledgePointConfigs[i].checkNumA,
+                  questionCount:self.fixedKnowledgePointConfigs[i].checkNumA,
+                  questionScore:self.fixedKnowledgePointConfigs[i].scoreA,
                 },
                 {
                   questionType:2,
-                  questionCount:self.fixedKnowledgePointConfigs[i].scoreB,
-                  questionScore:self.fixedKnowledgePointConfigs[i].checkNumB,
+                  questionCount:self.fixedKnowledgePointConfigs[i].checkNumB,
+                  questionScore:self.fixedKnowledgePointConfigs[i].scoreB,
                 },
                 {
                   questionType:3,
-                  questionCount:self.fixedKnowledgePointConfigs[i].scoreC,
-                  questionScore:self.fixedKnowledgePointConfigs[i].checkNumC,
+                  questionCount:self.fixedKnowledgePointConfigs[i].checkNumC,
+                  questionScore:self.fixedKnowledgePointConfigs[i].scoreC,
                 },
               ],
             })
@@ -619,6 +652,9 @@
                 name = node[i].label
               }
             }
+            if(this.fixedKnowledgePointConfigs[9]){
+              return
+            }
             this.examElQuestionBankKnowledgePointCount(name,id);
           }
         })
@@ -658,17 +694,26 @@
       },
       // ========== 大项拖拽逻辑 ==========
       onBigDragStart(e, index) {
+        if(this.showType){
+          return
+        }
         this.dragInfo = { type: 'big', bigIndex: index, smallIndex: null }
         // 给拖拽中的元素加个样式
         e.target.classList.add('dragging')
       },
       onBigDragOver(e, index) {
+        if(this.showType){
+          return
+        }
         // 只有当拖拽的是大项时才允许放置
         if (this.dragInfo.type === 'big') {
           e.currentTarget.classList.add('drag-over')
         }
       },
       onBigDrop(e, targetIndex) {
+        if(this.showType){
+          return
+        }
         if (this.dragInfo.type !== 'big') return
         const sourceIndex = this.dragInfo.bigIndex
         if (sourceIndex === targetIndex) return
@@ -679,12 +724,18 @@
       },
       // 拖拽结束,清理样式
       onDragEnd(e) {
+        if(this.showType){
+          return
+        }
         e.target.classList.remove('dragging')
         document.querySelectorAll('.drag-over').forEach(el => el.classList.remove('drag-over'))
         this.dragInfo = { type: null, bigIndex: null, smallIndex: null }
       },
       // 辅助方法:获取当前鼠标悬停的大项索引
       getCurrentBigIndex(e) {
+        if(this.showType){
+          return
+        }
         const minBox = e.currentTarget.closest('.for-max-box')
         return Array.from(this.$el.querySelectorAll('.for-max-box')).indexOf(minBox)
       },

+ 18 - 9
src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/index.vue

@@ -22,14 +22,21 @@
             </el-select>
           </el-form-item>
           <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="颁发单位" style="width: 200px">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              />
-            </el-select>
+            <el-cascader
+              style="width: 180px"
+              v-model="queryParams.deptId"
+              :options="optionList"
+              :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+              :show-all-levels="false"
+              filterable
+              placeholder="颁发单位"
+            ></el-cascader>
           </el-form-item>
           <el-form-item label="" prop="searchValue">
             <el-input
@@ -180,7 +187,9 @@
       //证书模板列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
-          this.$set(this,'optionList',response.data);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionList',list);
         });
       },
       //操作按钮

+ 6 - 4
src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/addPage.vue

@@ -4,8 +4,8 @@
     <div class="page-container-top-max-big-box">
       <p class="top-1-p">{{newData.id?'编辑试题':'添加试题'}}</p>
       <p class="top-2-p" @click="backPage()">返回</p>
-      <p class="top-3-p" v-if="newData.id" @click="resetButton()">重置</p>
-      <p class="top-4-p" @click="submitButton()">保存</p>
+      <p class="top-3-p" v-if="newData.id&&!showType" @click="resetButton()">重置</p>
+      <p class="top-4-p" v-if="!showType" @click="submitButton()">保存</p>
     </div>
     <div class="content-box scrollbar-box">
       <el-form class="add-form-box" :model="newData" ref="form" label-width="100px" :rules="rules">
@@ -198,6 +198,8 @@
             { required: true, message: "请选择难度", validator: this.spaceJudgment, trigger: "blur" }
           ],
         },
+        //详情查看
+        showType:false,
       }
     },
     watch: {
@@ -205,7 +207,7 @@
         handler(newVal, oldVal) {
           // 假设最多只能选 2 个
           if (newVal && newVal.length > 10) {
-            this.$message.error('最多只能选择 10 个知识点');
+            this.msgError('最多选择10个知识点')
             this.$nextTick(() => {
               // 将值回退到上一次的状态
               this.newData.knowledgePointIds = oldVal;
@@ -213,7 +215,7 @@
           }
         },
         deep: true, // 关键:必须开启深度监听
-        immediate: false // 初始化时不触发,防止默认值超限误报
+        immediate: false, // 初始化时不触发,防止默认值超限误报
       }
     },
     created() {