heyang hai 1 ano
pai
achega
3a47fb8425

+ 11 - 10
src/api/safetyEducationExam/index.js

@@ -315,9 +315,9 @@ export function paperDetail(data) {
 }
 
 //获取问题
-export function myPaperDetail(data) {
+export function examElPractisePaperDetail(data) {
   return request({
-    url: '/exam/el_practise/paperDetail',
+    url: '/exam/elPractise/paperDetail',
     method: 'post',
     data: data
   })
@@ -517,11 +517,11 @@ export function examExamEdit(data) {
 }
 
 // 查询试卷管理列表
-export function listPaper(query) {
+export function listPaper(data) {
   return request({
     url: '/exam/paper/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: data
   })
 }
 
@@ -654,8 +654,8 @@ export function getExamPaper(id) {
     method: 'get',
   })
 }
-//开始学习
-export function queryMyCert(data) {
+//个人证书
+export function examExamQueryMyCert(data) {
   return request({
     url: '/exam/exam/queryMyCert',
     method: 'post',
@@ -664,10 +664,11 @@ export function queryMyCert(data) {
 }
 
 //点击开始练习
-export function el_practiseStart(ids) {
+export function examElPractiseStart(data) {
   return request({
-    url: '/exam/el_practise/start/'+ids,
-    method: 'get',
+    url: '/exam/elPractise/start',
+    method: 'post',
+    data:data
   })
 }
 // 查询模拟练习类型

+ 12 - 2
src/views/safetyEducationExam/safeLearning/el_course/edit.vue

@@ -45,7 +45,7 @@
           </el-checkbox-group>
         </el-form-item>
         <el-form-item label="适用学院" prop="deptId">
-          <el-select v-model="infoForm.deptId" placeholder="请选择适用学院" style="width:400px;">
+          <el-select v-model="infoForm.deptId" placeholder="请选择适用学院" @change="deptFun" style="width:400px;">
             <el-option
               v-for="item in deptOptions"
               :key="item.deptId"
@@ -661,7 +661,7 @@ import {getDeptDropList, getDeptNoAuthList} from "@/api/commonality/permission";
       },
       /** 查询资源分类树 */
       getResourceTreeData(){
-        examElCategoryTreeList({},2).then( response => {
+        examElCategoryTreeList({},1).then( response => {
           //this.classTree = JSON.parse(JSON.stringify(response.data));
           let list = [];
           let obj = {
@@ -676,6 +676,14 @@ import {getDeptDropList, getDeptNoAuthList} from "@/api/commonality/permission";
           this.treeData =  list;
         });
       },
+      //使用学院
+      deptFun(){
+        for(let i=0; i<this.deptOptions.length;i++){
+          if(this.infoForm.deptId==this.deptOptions[i].deptId){
+            this.infoForm.deptNames=this.deptOptions[i].deptName
+          }
+        }
+      },
       //分类树点击事件
       editCheck(event) {
         this.$refs.ditTree.setCheckedKeys([event.id]);
@@ -764,6 +772,7 @@ import {getDeptDropList, getDeptNoAuthList} from "@/api/commonality/permission";
                 // img:this.infoForm.certUrl,
                 // description:escape(this.infoForm.content),
                 deptIds:this.infoForm.deptId,
+                deptNames:this.infoForm.deptNames,
               };
               let scopeText =  this.infoForm.checkList+'';
               obj.scopeType = scopeText;
@@ -784,6 +793,7 @@ import {getDeptDropList, getDeptNoAuthList} from "@/api/commonality/permission";
                 // img:this.infoForm.certUrl,
                 // description:escape(this.infoForm.content),
                 deptIds:this.infoForm.deptId,
+                deptNames:this.infoForm.deptNames,
               };
               let scopeText =  this.infoForm.checkList+'';
               obj.scopeType = scopeText;

+ 1 - 1
src/views/safetyEducationExam/safeLearning/el_course/index.vue

@@ -49,7 +49,7 @@
                              style="padding:0;height:23px;width:320px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align: left;">{{scope.row.title}}</el-button>
                 </template>
               </el-table-column>
-              <el-table-column label="适用学院" align="left" prop="title"  :show-overflow-tooltip="true" width="140"/>
+              <el-table-column label="适用学院" align="left" prop="deptNames"  :show-overflow-tooltip="true" width="140"/>
               <el-table-column label="适用类型" align="left" prop="scopeType" :show-overflow-tooltip="true" width="140">
                 <template slot-scope="scope">
                   <span v-for="(bigItem,bigIndex) in scope.row.scopeType" :key="bigIndex">

+ 2 - 2
src/views/safetyEducationExam/securityExam/exam/examInfo.vue

@@ -31,7 +31,7 @@
       </el-form-item>
     </el-form>
     <el-table :data="examList" border class="table-box" @selection-change="handleSelectionChange">
-      <el-table-column label="姓名" align="left" prop="nickName" />
+      <el-table-column label="姓名" align="left" prop="joinUserName" />
       <el-table-column label="最高分" align="left" prop="maxScore" />
       <el-table-column label="通过状态" align="left" prop="passed" >
         <template slot-scope="scope">
@@ -151,7 +151,7 @@
     getInfoList() {
       this.loading = true;
       listPaper(this.infoParams).then(response => {
-        this.infoData = response.rows;
+        this.infoData = response.data.records;
         this.loading = false;
       });
     },

+ 5 - 5
src/views/safetyEducationExam/securityExam/myCertificate/index.vue

@@ -15,7 +15,7 @@
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
         </el-form-item>
       </el-form>
-      <el-table v-loading="loading" border :data="recordList">
+      <el-table v-loading="loading" border class="table-box" :data="recordList">
         <el-table-column label="证书名称" align="left" prop="certTitle" />
         <el-table-column label="获得日期" align="left" prop="createTime" />
         <el-table-column label="截止日期" align="left" prop="expirationTime" />
@@ -51,7 +51,7 @@
 </template>
 
 <script>
-  import { queryMyCert } from "@/api/safetyEducationExam/index";
+  import { examExamQueryMyCert } from "@/api/safetyEducationExam/index";
   export default {
     name: "index",
     data() {
@@ -88,9 +88,9 @@
       /** 查询数据 */
       getList() {
         this.loading = true;
-        queryMyCert(this.queryParams).then( response => {
-          this.recordList =  response.rows;
-          this.total =  response.total;
+        examExamQueryMyCert(this.queryParams).then( response => {
+          this.recordList =  response.data.records;
+          this.total =  response.data.total;
           this.loading = false;
         });
       },

+ 3 - 3
src/views/safetyEducationExam/securityExam/myExercise/index.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script>
-  import { examElClassifyQueryOption,el_practiseStart } from "@/api/safetyEducationExam/index";
+  import { examElClassifyQueryOption,examElPractiseStart } from "@/api/safetyEducationExam/index";
   import playExercise from "./playExercise.vue";
 
   export default {
@@ -60,7 +60,7 @@
         for(let i=0;i<self.clickCheckList.length;i++){
           text = text + self.clickCheckList[i] + ',';
         }
-        el_practiseStart(text).then( res => {
+        examElPractiseStart({classifyIds:text}).then( res => {
           this.transferData = res.data;
           this.pageType = 2;
         });
@@ -68,7 +68,7 @@
       //获取选项列表
       getQueryOption(){
         examElClassifyQueryOption({}).then( res => {
-          this.checkList =  res.data;
+          this.checkList =  res.data.records;
         });
       },
     }

+ 2 - 2
src/views/safetyEducationExam/securityExam/myExercise/playExercise.vue

@@ -105,7 +105,7 @@
 </template>
 
 <script>
-  import { myPaperDetail,myFillAnswer,myHandPaper } from "@/api/safetyEducationExam/index";
+  import { examElPractisePaperDetail,myFillAnswer,myHandPaper } from "@/api/safetyEducationExam/index";
   export default {
     props:{
       transferData:{},
@@ -235,7 +235,7 @@
           practiseId:this.examData.id,
           quId:this.calculateId(),
         };
-        myPaperDetail(obj).then(response => {
+        examElPractisePaperDetail(obj).then(response => {
           this.questionData = response.data;
           console.log("response.data",response.data)
           if(this.questionType == 1||this.questionType == 3){

+ 0 - 1
src/views/safetyEducationExam/securityExam/myResultInquiry/index.vue

@@ -7,7 +7,6 @@
       </div>
       <el-table v-loading="loading" border class="table-box" :data="myListExam">
         <el-table-column label="考试名称" align="left" prop="title" />
-        <!--<el-table-column label="适用范围" align="left" prop="scopeType" />-->
         <el-table-column label="题目类型" align="left" prop="classifyNames" />
         <el-table-column label="考试时间" align="left" prop="createTime" />
         <el-table-column label="考试得分" align="left" prop="userScore" />