Browse Source

日常开发

林旭祥 8 months ago
parent
commit
c0799be449

+ 1 - 1
src/api/module/common.ts

@@ -67,7 +67,7 @@ export default {
     });
   },
 
-  //获取测试数据明细
+  //获取测试数据明细2
   reportDetails: (data: any) => {
     return req({
       url: '/exam/search',

+ 10 - 5
src/components/ReportWindow/index.vue

@@ -95,11 +95,11 @@
           <div class="right-bottom">
             <div class="column">
               <div class="title">点评</div>
-              <div class="note">{{ reportDetails._comments?.toString() }}</div>
+              <div class="note">{{ reportDetails._comments?.toString() || reportDetails.comments }}</div>
             </div>
             <div class="column">
               <div class="title">建议</div>
-              <div class="note">{{ reportDetails._recommends?.toString() }}</div>
+              <div class="note">{{ reportDetails._recommends?.toString() || reportDetails.recommends }}</div>
             </div>
             <div class="column column2">
               <div class="title2">数据查看</div>
@@ -144,10 +144,10 @@ const getReportDetails = async () => {
   reportDetails.value = {};
   let params: any = {
     exam_name: type.value,
-    result_id_info: faceCheckStu.value.result_id_info,
-    student_ids: faceCheckStu.value.student_id
+    student_ids: faceCheckStu.value.student_id,
+    result_id_info: faceCheckStu.value.result_id_info
   };
-  await proxy?.$http.common.reportDetails(params).then((res: any) => {
+  await proxy?.$http.common.reportDetailsOld(params).then((res: any) => {
     if (res.data.length > 0) {
       reportDetails.value = res.data[0];
     }
@@ -161,6 +161,11 @@ const getChoose = (data: any) => {
 
 //打开
 const open = async (typeData: any, data: any) => {
+  console.log("data", data)
+  if (faceCheckStu.value.result_id_info == undefined) {
+    proxy?.$modal.msgWarning("查询参数错误");
+    return false;
+  }
   type.value = typeData;
   faceCheckStu.value = data;
   await getReportDetails();

+ 2 - 2
src/views/ranking/index.vue

@@ -6,7 +6,7 @@
         <div class="top-left">
           <div class="title1">{{ pageType == 1 ? "运动风云榜" : pageType == 2 ? currentClass.name : "" }} · {{
             projectObj.title
-          }}</div>
+            }}</div>
           <div class="title2" @click="choiceClassWindow = true">{{ pageType == 1 ? "切换到班级榜" : pageType == 2 ? "切换到班级" :
             "" }}</div>
         </div>
@@ -165,8 +165,8 @@
           </div>
         </div>
       </div>
-      <ReportWindow ref="reportWindowRef" @returnData="returnData" />
     </div>
+    <ReportWindow ref="reportWindowRef" @returnData="returnData" />
   </div>
 </template>
 

+ 10 - 1
src/views/train/test.vue

@@ -107,7 +107,7 @@
       <div class="main-right">
         <div class="title">测试记录</div>
         <ul>
-          <li v-for="(item, index) in reportList " :key="index">
+          <li v-for="(item, index) in reportList " :key="index" @click="openReport(item)">
             <div class="left">
               <div class="pic"><img :src="item.face_pic || item.logo_url" /></div>
               <div class="txt">
@@ -135,6 +135,7 @@
     </div>
     <FaceWindow ref="faceWindowRef" :faceCheckStu="faceCheckStu" />
     <ChooseStudent ref="chooseStudentRef" @returnData="returnStudent" />
+    <ReportWindow ref="reportWindowRef" />
   </div>
 </template>
 
@@ -148,6 +149,7 @@ const router = useRouter();
 const route = useRoute();
 const faceWindowRef = ref();
 const chooseStudentRef = ref();
+const reportWindowRef = ref();
 const myInfo: any = localStorage.getItem("userInfo");
 const dic: any = dataDictionary;
 const data = reactive<any>({
@@ -685,6 +687,13 @@ const getReady = () => {
   }, 1000);
 };
 
+/**
+ * 查看详情
+*/
+const openReport = (data: any) => {
+  reportWindowRef.value.open(parameter.value.project, data);
+};
+
 /**
  * 输出犯规
 */