Преглед на файлове

rename jump Force-Adjust

hare8999@163.com преди 2 години
родител
ревизия
2752d5155a

+ 5 - 0
src/common/mx-extension.js

@@ -67,6 +67,11 @@ export default {
     String.prototype.tailingFix = function(fix) {
       return this.endsWith(fix) ? this : this + fix
     }
+    String.prototype.trimFix = function(fix) {
+      if (!fix) return this.trim()
+      return this.replace(new RegExp('^' + fix), '')
+        .replace(new RegExp(fix + '$'), '')
+    }
 
     // Global func.
     Vue.prototype.deepClone = function(obj) {

+ 8 - 0
src/router/index.js

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

+ 1 - 1
src/views/elective/generation/components/elective-generation-commands.vue

@@ -8,7 +8,7 @@
     <div>
       <el-button v-if="showFastPush" type="primary" @click="flushIntoDM">提前进入{{ nextStepName }}</el-button>
       <el-button v-if="showForceAdjustSend" type="primary" @click="jumpForceAdjust">
-        进入{{ generation.options.forceAdjust.title }}
+        进入{{ generation.options.forceAdjust.title.trimFix('结果') }}
       </el-button>
       <el-button v-else-if="showSend" type="primary" @click="pushGeneration">开启{{ nextStepName }}</el-button>
       <el-button v-if="showRankBalance" type="primary" @click="jumpRankBalance">排名均衡</el-button>

+ 17 - 0
src/views/idc/mistakes/aiHistory.vue

@@ -0,0 +1,17 @@
+<template>
+  <div class="app-container">
+    <dynamic-table></dynamic-table>
+  </div>
+</template>
+
+<script>
+import DynamicTable from '@/components/dynamic-table/index'
+export default {
+  name: 'aiHistory',
+  components: { DynamicTable }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 4
src/views/idc/mistakes/index.vue

@@ -12,6 +12,7 @@
           <template v-if="isFrontStudent">
             <el-button type="text" icon="el-icon-video-play" @click="handleAIVideo(scope.row)">AI匹配视频</el-button>
             <el-button type="text" icon="el-icon-edit" @click="handleAIQuestion(scope.row)">AI匹配试题</el-button>
+            <el-button type="text" icon="el-icon-timer" @click="handleAIQuestionHistory(scope.row)">AI匹配历史</el-button>
           </template>
         </template>
       </el-table-column>
@@ -25,10 +26,7 @@
 </template>
 
 <script>
-import {
-  getClassKnownledgeStats,
-  getStudentKnownledgeStats
-} from '@/api/webApi/front'
+import { getClassKnownledgeStats, getStudentKnownledgeStats } from '@/api/webApi/front'
 import { getApiPaperStatus } from '@/api/webApi/ai'
 import { mapGetters } from 'vuex'
 import { getDefaultDateRange } from '@/utils/index'
@@ -168,6 +166,9 @@ export default {
         }
       })
     },
+    handleAIQuestionHistory(row) {
+      this.transferTo('/idc/mistakes/aiHistory')
+    },
     goQuestionPage(force, row) {
       const nextData = {
         knowledge: row.knowledgeName,