shilipojs 2 éve
szülő
commit
9171c6b769

+ 122 - 105
src/api/webApi/webVideo.js

@@ -1,105 +1,122 @@
-import request from '@/utils/request'
-// 视频课程相关接口
-
-// 查询视频大类
-export function videoType() {
-  return request({
-    url: '/front/videoCourse/subjects',
-    method: 'get',
-  })
-}
-// 查询科目
-export function videoSubjects(query) {
-  return request({
-    url: '/front/videoCourse/courses',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询年级
-export function videoGrades(query) {
-  return request({
-    url: '/front/videoCourse/grades',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询版本
-export function videoVersions(query) {
-  return request({
-    url: '/front/videoCourse/versions',
-    method: 'get',
-    params: query
-  })
-}
-// 视频包列表 
-export function packList(query) {
-  return request({
-    url: '/front/videoCourse/pack/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 视频列表 
-export function videoList(query) {
-  return request({
-    url: '/front/videoCourse/video/list',
-    method: 'get',
-    params: query
-  })
-}
-// 章节树 
-export function getChapterTreeList(query) {
-  return request({
-    url: '/common/chapter/getChapterTreeList',
-    method: 'get',
-    params: query
-  })
-}
-
-// 视频详情 
-export function videoInfo(query) {
-  return request({
-    url: '/front/videoCourse/video/info/tree',
-    method: 'get',
-    params: query
-  })
-}
-
-// 视频点播
-export function getVideoPlayAuth(query) {
-  return request({
-    url: '/common/vod/getVideoPlayAuth',
-    method: 'get',
-    params: query
-  })
-}
-
-// /common/vod/getVideoPlayInfo
-export function getVideoPlayInfo(videoId) {
-  return request({
-    url: '/common/vod/getVideoPlayInfo',
-    method: 'get',
-    params: {
-      videoId
-    }
-  })
-}
-
-// /prod-api/front/videoCourse/saveWatchRecord
-export function saveWatchRecord(sectionId, duration, percent, aliType) {
-  if (aliType == 'undefined' || typeof aliType == 'undefined') aliType = '' // 容错处理
-	return request({
-		url: '/front/videoCourse/saveWatchRecord',
-		method: 'post',
-		params: {
-			sectionId,
-			duration: Math.floor(duration),
-			percent: percent.toFixed(3),
-      type: aliType
-		}
-	})
-}
+import request from '@/utils/request'
+// 视频课程相关接口
+
+// 查询视频大类
+export function videoType() {
+  return request({
+    url: '/front/videoCourse/subjects',
+    method: 'get',
+  })
+}
+// 查询科目
+export function videoSubjects(query) {
+  return request({
+    url: '/front/videoCourse/courses',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询年级
+export function videoGrades(query) {
+  return request({
+    url: '/front/videoCourse/grades',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询版本
+export function videoVersions(query) {
+  return request({
+    url: '/front/videoCourse/versions',
+    method: 'get',
+    params: query
+  })
+}
+// 视频包列表
+export function packList(query) {
+  return request({
+    url: '/front/videoCourse/pack/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 视频列表
+export function videoList(query) {
+  return request({
+    url: '/front/videoCourse/video/list',
+    method: 'get',
+    params: query
+  })
+}
+// 章节树
+export function getChapterTreeList(query) {
+  return request({
+    url: '/common/chapter/getChapterTreeList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 视频详情
+export function videoInfo(query) {
+  return request({
+    url: '/front/videoCourse/video/info/tree',
+    method: 'get',
+    params: query
+  })
+}
+
+// 视频点播
+export function getVideoPlayAuth(query) {
+  return request({
+    url: '/common/vod/getVideoPlayAuth',
+    method: 'get',
+    params: query
+  })
+}
+
+// /common/vod/getVideoPlayInfo
+export function getVideoPlayInfo(videoId) {
+  return request({
+    url: '/common/vod/getVideoPlayInfo',
+    method: 'get',
+    params: {
+      videoId
+    }
+  })
+}
+
+// /prod-api/front/videoCourse/saveWatchRecord
+export function saveWatchRecord(sectionId, duration, percent, aliType) {
+  if (aliType == 'undefined' || typeof aliType == 'undefined') aliType = '' // 容错处理
+	return request({
+		url: '/front/videoCourse/saveWatchRecord',
+		method: 'post',
+		params: {
+			sectionId,
+			duration: Math.floor(duration),
+			percent: percent.toFixed(3),
+      type: aliType
+		}
+	})
+}
+
+export function getAiAdStudyVideoList(params) {
+  return request({
+    url: 'front/videoCourse/getAiAdStudyVideoList',
+    method: 'get',
+    params
+  })
+}
+
+export function getAiAdStudyQuestionList(params) {
+  return request({
+    url: 'front/v2/questions/getAiAdStudyQuestionList',
+    method: 'get',
+    params
+  })
+}
+

+ 23 - 18
src/views/accurateTeaching/commonAi/microVideo/index.vue

@@ -10,7 +10,7 @@
         <mx-search-group justify="end" :span="6" v-model="sectionName" placeholder="请输入搜索内容" @search="getList">
         </mx-search-group>
       </div>
-      <el-card class="video_content" v-if="videoList.length">
+      <div class="video_content" v-if="videoList.length">
         <el-row :span="24">
           <el-col
             :span="6"
@@ -37,18 +37,14 @@
             </p>
           </el-col>
         </el-row>
-        <!-- 分页 -->
-        <div class="split_page">
-          <pagination
-            v-show="total > 0"
-            :total="total"
-            :page.sync="pageForm.pageNum"
-            :limit.sync="pageForm.pageSize"
-            :pageSizes="[16,32]"
-            @pagination="getVideoList"
-          />
-        </div>
-      </el-card>
+        <pagination
+          :total="total"
+          :page.sync="pageForm.pageNum"
+          :limit.sync="pageForm.pageSize"
+          :pageSizes="[16,32]"
+          @pagination="getList"
+        />
+      </div>
       <evaluation-empty v-else/>
     </el-card>
   </div>
@@ -56,7 +52,7 @@
 <script>
 import MxSearchGroup from '@/components/MxSearch/mx-search-group'
 import MxCondition from '@/components/MxCondition/mx-condition'
-import { videoList } from '@/api/webApi/webVideo'
+import { getAiAdStudyVideoList } from '@/api/webApi/webVideo'
 
 export default {
   components: { MxSearchGroup, MxCondition },
@@ -66,7 +62,7 @@ export default {
         pageNum: 1,
         pageSize: 16
       },
-      videoList:[],
+      videoList: [],
       sectionName: '',
       queryParams: {
         videoTypeFixed: 0,
@@ -91,7 +87,14 @@ export default {
 
     },
     getList() {
-
+      getAiAdStudyVideoList({
+        course: this.queryParams.videoCourseFixed,
+        sectionName: this.sectionName,
+        ...this.pageForm
+      }).then(res => {
+        this.videoList = res.rows
+        this.total = res.total
+      })
     },
     handleQuery() {
       this.getList()
@@ -118,11 +121,13 @@ export default {
 }
 
 .video_content .el-col {
-  margin-bottom: 42px;
+  margin-bottom: 20px;
 }
-.video_item{
+
+.video_item {
   padding-right: 22px;
 }
+
 .video_item > img {
   width: 100%;
 }

+ 146 - 5
src/views/accurateTeaching/commonAi/practise/index.vue

@@ -10,16 +10,62 @@
         <mx-search-group  justify="end" :span="6" v-model="sectionName" placeholder="请输入搜索内容" @search="getList">
         </mx-search-group>
       </div>
-      <div v-for="o in 4" :key="o" class="text item">
-        {{ '列表内容 ' + o }}
+      <div v-if="queList.length">
+        <div class="que_item" v-for="(item, index) in queList" :key="item.id">
+          <div class="que_content">
+            <div class="que-content-title">
+              <div class="index">{{ (pageForm.pageSize*(pageForm.pageNum-1)+index+1) }}.</div>
+              <div v-html="item.title"></div>
+            </div>
+            <div class="que-option">
+              <div v-if="item.optionA">
+                <span>A</span>
+                <span v-html="item.optionA"></span>
+              </div>
+              <div v-if="item.optionB">
+                <span>B</span>
+                <span v-html="item.optionB"></span>
+              </div>
+              <div v-if="item.optionC">
+                <span>C</span>
+                <span v-html="item.optionC"></span>
+              </div>
+              <div v-if="item.optionD">
+                <span>D</span>
+                <span v-html="item.optionD"></span>
+              </div>
+            </div>
+          </div>
+          <div class="que_footer">
+            <div class="spans">
+              <span class="id">ID: {{ item.id }}</span>
+              <span>题型: {{ item.qtpye }}</span>
+              <span>难度: 一般</span>
+            </div>
+            <div class="operation">
+              <div class="detail" @click="viewDetail(index)">
+                <img src="@/assets/images/icon_chakan.png" alt="" />
+                <span>查看详情>></span>
+              </div>
+            </div>
+          </div>
+          <div class="pd20" v-show="item.createTime" v-html="item.answer2"></div>
+        </div>
+        <pagination
+          :total="total"
+          :page.sync="pageForm.pageNum"
+          :limit.sync="pageForm.pageSize"
+          @pagination="getList"
+        />
       </div>
+      <evaluation-empty v-else/>
     </el-card>
   </div>
 </template>
 <script>
 import MxSearchGroup from '@/components/MxSearch/mx-search-group'
 import MxCondition from '@/components/MxCondition/mx-condition'
-import { videoList } from '@/api/webApi/webVideo'
+import { getAiAdStudyQuestionList } from '@/api/webApi/webVideo'
 
 export default {
   components: { MxSearchGroup, MxCondition },
@@ -27,8 +73,9 @@ export default {
     return {
       pageForm: {
         pageNum: 1,
-        pageSize: 16
+        pageSize: 10
       },
+      queList:[],
       sectionName: '',
       queryParams: {
         v2Subject:'',
@@ -39,9 +86,23 @@ export default {
   methods: {
     handleInvalidQuery() {
 
+    },
+    viewDetail(index) {
+      if (this.queList[index].createTime) {
+        this.queList[index].createTime = false;
+      } else {
+        this.queList[index].createTime = true;
+      }
     },
     getList() {
-
+      getAiAdStudyQuestionList({
+        subjectId:this.queryParams.v2Subject,
+        searchTerm:this.sectionName,
+        ...this.pageForm
+      }).then(res => {
+        this.total = res.total
+        this.queList = res.rows
+      })
     },
     handleQuery() {
       this.getList()
@@ -50,5 +111,85 @@ export default {
 }
 </script>
 <style scoped>
+.que_item {
+  border-radius: 1px;
+  border: 1px solid #dedede;
+  margin-bottom: 8px;
+}
+
+.que_content {
+  padding: 12px 24px 0 33px;
+  font-size: 14px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #4c4c4c;
+  line-height: 27px;
+  margin-bottom: 40px;
+}
+
+.que-content-title {
+  font-size: 14px;
+  display: flex;
+}
+
+
+.que-option {
+  line-height: 40px;
+}
+
+.que-option span {
+  margin-right: 5px;
+}
+
+.que_footer {
+  border-top: 1px solid #dedede;
+  padding-left: 33px;
+  overflow: hidden;
+  padding-bottom: 23px;
+  padding-top: 21px;
+}
+
+.que_footer .spans {
+  float: left;
+  font-size: 12px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #979797;
+  line-height: 20px;
+}
+
+.que_footer .spans > span {
+  margin-right: 20px;
+}
+
+.operation {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #47c6a2;
+  line-height: 20px;
+  float: right;
+}
+
+.operation > div {
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+
+.operation .detail span {
+  border-radius: 1px;
+  border-bottom: 1px solid #47c6a2;
+}
+
+.operation .detail {
+  margin-right: 32px;
+}
+
+.operation > div > img {
+  margin-right: 10px;
+}
 
 </style>

+ 1 - 4
src/views/questioncenter/generating.vue

@@ -161,7 +161,7 @@
                   </div>
                 </div>
               </div>
-              <div class="parse" v-show="item.createTime" v-html="item.answer2"></div>
+              <div class="pd20" v-show="item.createTime" v-html="item.answer2"></div>
             </div>
             <div v-if="queList.length == 0" class="empty-text">
               暂时没有内容
@@ -1229,9 +1229,6 @@ export default {
   line-height: 17px;
 }
 
-.parse {
-  padding: 20px;
-}
 
 ::-webkit-scrollbar {
   width: 4px;