Ver código fonte

年度考核

SanHQin 3 meses atrás
pai
commit
7234e7f315

+ 29 - 2
src/components/pages/test/check/index.vue

@@ -2,8 +2,8 @@
   <div class="pb_content" style="background: #f0f2f5" v-loading="loading">
     <div class="pb_content_body" style="position: relative; margin: 0">
       <div class="right">
-        <div class="courseTop">
-          <div class="stepsNav">
+        <div class="courseTop" >
+          <div class="stepsNav" v-if="!examineId">
             <el-breadcrumb separator-class="el-icon-arrow-right">
               <el-breadcrumb-item
               v-if="!back"
@@ -1379,8 +1379,10 @@
                   <el-button
                     @click="getTest(scope.row)"
                     type="primary"
+                    v-if="(examineData && examineData.type == 1) || !examineData"
                     size="small"
                     >查看</el-button
+
                   >
                   <!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
 									<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
@@ -1388,6 +1390,7 @@
                     @click="deleteTest(scope.row.id)"
                     type="primary"
                     size="small"
+                     v-if="(examineData && examineData.type == 1) || !examineData"
                     >删除</el-button
                   >
                 </template>
@@ -1904,6 +1907,8 @@ export default {
       peopleId: this.$route.query.peopleId,
       back:this.$route.query.back,
       screenWidth: window.innerWidth,
+      examineId: this.$route.query.examineId,
+      tType: this.$route.query.tType,
       isDesktop: false,
       aiChatV: false,
       title: "",
@@ -1959,6 +1964,7 @@ export default {
       // fileLoadNum: [],
       // infoprogress: [],
       teaType: [],
+      examineData:null,
     };
   },
   watch: {},
@@ -3852,6 +3858,23 @@ ${JSON.stringify(item.array)}
             this.$message.error("生成词云图失败")
           })
 		},
+    getExamineData(){
+      let params = {
+        uid: this.peopleId,
+        type:this.tType,
+        tid:this.examineId,
+      }
+
+      this.ajax.get(this.$store.state.api +"getTestExamineByUserId2",params).then(res=>{
+        // this.examineData = res.data[0][0];
+        if(res.data[0].length>0){
+          this.examineData = res.data[0][0];
+        }
+      }).catch(e=>{
+        console.log(e);
+        this.examineData = null;
+      })
+    },
   },
 
   beforeDestroy() {
@@ -3869,6 +3892,10 @@ ${JSON.stringify(item.array)}
       } else {
         this.getData();
       }
+
+      if(this.examineId){
+        this.getExamineData();
+      }
       // this.getClass2()
       this.changeHeight();
     });

+ 1 - 1
src/components/pages/testPerson/examine/index.vue

@@ -541,7 +541,7 @@ export default {
     // 查看数据来源
     lookPrize(val) {
       // return;
-      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}`;
+      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}&tType=${this.pType}&examineId=${this.testExamineBaseList[0].id}`;
       // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
       this.diaIframe = true;
     },