hare8999@163.com %!s(int64=2) %!d(string=hai) anos
pai
achega
4b0004ecc8

+ 36 - 16
src/api/webApi/ai.js

@@ -1,19 +1,39 @@
-import request from '@/utils/request'
-
-// /prod-api/front/ai/getAiVideos // AI匹配视频
-export function getAiVideos(params) {
-	return request({
-		url: '/front/ai/getAiVideos',
-		method: 'get',
-		params: params
-	})
+import request from '@/utils/request'
+
+// /prod-api/front/ai/getAiVideos // AI匹配视频
+export function getAiVideos(params) {
+  return request({
+    url: '/front/ai/getAiVideos',
+    method: 'get',
+    params: params
+  })
 }
 }
 
 
 // /front/ai/getApiPaperStatus  // AI匹配试题探测,该继续OR重新来?
 // /front/ai/getApiPaperStatus  // AI匹配试题探测,该继续OR重新来?
-export function getApiPaperStatus(params) {
-	return request({
-		url: '/front/ai/getApiPaperStatus',
-		method: 'get',
-		params: params
-	})
-}
+export function getApiPaperStatus(params) {
+  return request({
+    url: '/front/ai/getApiPaperStatus',
+    method: 'get',
+    params: params
+  })
+}
+
+// /prod-api/front/ai/getAiPapers
+// 10 AI考卷列表 knowledges*requires
+export function getAiPapers(params) {
+  return request({
+    url: '/front/ai/getAiPapers',
+    method: 'get',
+    params: params
+  })
+}
+
+// /prod-api/front/ai/getAiPaper
+// 01 AI考卷详解 paperId*requires
+export function getAiPaper(params) {
+  return request({
+    url: '/front/ai/getAiPaper',
+    method: 'get',
+    params: params
+  })
+}

+ 14 - 10
src/components/EvaluationTitle/index.vue

@@ -2,7 +2,7 @@
   <el-card :class="{ 'box-card': cardStyle, 'evaluation-margin': withMarginBottom }">
   <el-card :class="{ 'box-card': cardStyle, 'evaluation-margin': withMarginBottom }">
     <el-row :gutter="24">
     <el-row :gutter="24">
       <el-col :span="navBackButton ? 22 - slotSpan : 24 - slotSpan">
       <el-col :span="navBackButton ? 22 - slotSpan : 24 - slotSpan">
-        <div class="evaluation-title-row">
+        <div class="evaluation-title-row" :style="{'whiteSpace':fullTitle?'normal': 'nowrap'}">
           {{ title }}
           {{ title }}
           <span class="evaulation-title-subItem">{{ subTitle }}</span>
           <span class="evaulation-title-subItem">{{ subTitle }}</span>
         </div>
         </div>
@@ -21,34 +21,38 @@ export default {
   props: {
   props: {
     title: {
     title: {
       type: String,
       type: String,
-      default: "",
+      default: ''
     },
     },
     subTitle: {
     subTitle: {
       type: String,
       type: String,
-      default: "",
+      default: ''
     },
     },
     navBackButton: {
     navBackButton: {
       type: Boolean,
       type: Boolean,
-      default: false,
+      default: false
     },
     },
     slotSpan: {
     slotSpan: {
       type: Number,
       type: Number,
-      default: 0,
+      default: 0
     },
     },
     cardStyle: {
     cardStyle: {
       type: Boolean,
       type: Boolean,
-      default: true,
+      default: true
     },
     },
     withMarginBottom: {
     withMarginBottom: {
       type: Boolean,
       type: Boolean,
-      default: true,
+      default: true
     },
     },
     navAction: {
     navAction: {
       type: Function,
       type: Function,
-      default: null,
+      default: null
     },
     },
-  },
-};
+    fullTitle: {
+      type: Boolean,
+      default: false
+    }
+  }
+}
 </script>
 </script>
 <style scoped>
 <style scoped>
 .evaluation-margin {
 .evaluation-margin {

+ 13 - 8
src/components/MxPaper/mx-paper-mixin.js

@@ -1,11 +1,11 @@
 import {
 import {
-  openExamineePaper,
-  loadExamineePaper,
-  commitExamineeQuestion,
   commitExamineePaper,
   commitExamineePaper,
+  commitExamineeQuestion,
+  loadExamineePaper,
+  openExamineePaper,
   scoreExamineeQuestion,
   scoreExamineeQuestion,
-  teacherScoreExamineeQuestions,
-  scoreFinish
+  scoreFinish,
+  teacherScoreExamineeQuestions
 } from '@/api/webApi/studentEvaluating.js'
 } from '@/api/webApi/studentEvaluating.js'
 import config from '@/common/mx-config.js'
 import config from '@/common/mx-config.js'
 import consts from '@/common/mx-const'
 import consts from '@/common/mx-const'
@@ -112,6 +112,12 @@ export default {
     },
     },
     hasNext() {
     hasNext() {
       return this.currentTab < this.paper.questions?.length - 1
       return this.currentTab < this.paper.questions?.length - 1
+    },
+    queryApi() {
+      return this.isFrontTeacher ? loadExamineePaper : openExamineePaper
+    },
+    scoreApi() {
+      return this.isFrontTeacher ? teacherScoreExamineeQuestions : scoreExamineeQuestion
     }
     }
   },
   },
   methods: {
   methods: {
@@ -131,8 +137,7 @@ export default {
       }
       }
 
 
       // query
       // query
-      let queryApi = openExamineePaper
-      if (this.isFrontTeacher) queryApi = loadExamineePaper
+      let queryApi = this.queryApi
       this.options.loading = true
       this.options.loading = true
       queryApi(extData).then(res => {
       queryApi(extData).then(res => {
         this.options.currentTab = 0 // reset position
         this.options.currentTab = 0 // reset position
@@ -172,7 +177,7 @@ export default {
     autoScoreObjectives(scoredQuestions) {
     autoScoreObjectives(scoredQuestions) {
       if (!scoredQuestions?.length) return
       if (!scoredQuestions?.length) return
       // 静默提交
       // 静默提交
-      const func = this.isFrontTeacher ? teacherScoreExamineeQuestions : scoreExamineeQuestion
+      const func = this.scoreApi
       func({
       func({
         examineeId: this.examineeId,
         examineeId: this.examineeId,
         examineeType: this.examineeType,
         examineeType: this.examineeType,

+ 8 - 0
src/router/index.js

@@ -273,6 +273,14 @@ export const constantRoutes = [{
           title: 'ai匹配试题'
           title: 'ai匹配试题'
         }
         }
       },
       },
+      {
+        path: 'mistakes/aiPaperHistory',
+        component: (resolve) => require(['@/views/idc/mistakes/aiPaperHistory'], resolve),
+        name: 'mistakesAIPaper',
+        meta: {
+          title: 'ai匹配试题历史'
+        }
+      },
       {
       {
         path: 'mistakes/aiHistory',
         path: 'mistakes/aiHistory',
         component: (resolve) => require(['@/views/idc/mistakes/aiHistory'], resolve),
         component: (resolve) => require(['@/views/idc/mistakes/aiHistory'], resolve),

+ 63 - 2
src/views/idc/mistakes/aiHistory.vue

@@ -1,14 +1,75 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <dynamic-table></dynamic-table>
+    <evaluation-title :title="prevData.knowledges" nav-back-button full-title></evaluation-title>
+    <dynamic-table :rows="rows" :columns="columns" fit>
+      <template #view="{row}">
+        <el-button type="text" icon="el-icon-view" @click="handlePaperClick(row)">查看</el-button>
+      </template>
+    </dynamic-table>
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+                :page-size="20" @pagination="getList"/>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import DynamicTable from '@/components/dynamic-table/index'
 import DynamicTable from '@/components/dynamic-table/index'
+import { getAiPapers } from '@/api/webApi/ai'
+import TransferMixin from '@/components/mx-transfer-mixin'
+
 export default {
 export default {
+  mixins: [TransferMixin],
   name: 'aiHistory',
   name: 'aiHistory',
-  components: { DynamicTable }
+  components: { DynamicTable },
+  data() {
+    return {
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20
+      },
+      total: 0,
+      rows: []
+    }
+  },
+  computed: {
+    columns() {
+      return [{
+        prop: 'paperId',
+        label: 'ID',
+        width: '80px'
+      }, {
+        prop: 'name',
+        label: '名称',
+        showOverflowTooltip: true
+      }, {
+        prop: 'createdTime',
+        label: '时间',
+        width: '150px'
+      }, {
+        prop: 'action',
+        label: '操作',
+        slotBody: 'view',
+        width: '120px'
+      }]
+    }
+  },
+  mounted() {
+    this.getList()
+  }
+  ,
+  methods: {
+    getList() {
+      getAiPapers({
+        ...this.prevData,
+        ...this.queryParams
+      }).then(res => {
+        this.total = res['total']
+        this.rows = res['rows']
+      })
+    },
+    handlePaperClick({ paperId }) {
+      this.transferTo('/idc/mistakes/aiPaperHistory', { paperId })
+    }
+  }
 }
 }
 </script>
 </script>
 
 

+ 31 - 0
src/views/idc/mistakes/aiPaperHistory.vue

@@ -0,0 +1,31 @@
+<template>
+  <div>
+    <evaluation-title title="查看匹配历史" nav-back-button></evaluation-title>
+    <mx-paper :options="options" class="pl20 pr20 pt20 pb40"></mx-paper>
+  </div>
+</template>
+
+<script>
+import MxPaper from '@/components/MxPaper/mx-paper'
+import transferMixin from '@/components/mx-transfer-mixin'
+import paperMixin from '@/components/MxPaper/mx-paper-mixin'
+import { getAiPaper } from '@/api/webApi/ai'
+
+export default {
+  mixins: [transferMixin, paperMixin],
+  components: { MxPaper },
+  mounted() {
+    this.loadPaper(this.prevData)
+  },
+  computed: {
+    queryApi() {
+      return getAiPaper
+    }
+  },
+  methods: {}
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/views/idc/mistakes/index.vue

@@ -167,7 +167,7 @@ export default {
       })
       })
     },
     },
     handleAIQuestionHistory(row) {
     handleAIQuestionHistory(row) {
-      this.transferTo('/idc/mistakes/aiHistory')
+      this.transferTo('/idc/mistakes/aiHistory', { knowledges: row.knowledgeName })
     },
     },
     goQuestionPage(force, row) {
     goQuestionPage(force, row) {
       const nextData = {
       const nextData = {