浏览代码

视频课程查询修复

shilipojs 2 年之前
父节点
当前提交
e08ca76bab

+ 8 - 1
src/components/MxCondition/condition-object/condition-video-grade.js

@@ -13,7 +13,14 @@ export default {
   title: '年级',
   title: '年级',
   getList: function(param,$ref) {
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
-      videoGrades({ course:param.videoCourse,subject:$ref.model.videoType }).then(res => resolve(res.rows))
+      videoGrades({ course:param.videoCourse.split(',')[0],subject:$ref.model.videoType }).then(res => resolve(
+        res.rows.map(item => {
+          return {
+            code:item.code + ',subject' +  param.videoCourse,
+            label:item.label
+          }
+        })
+      ))
         .catch(e => reject(e))
         .catch(e => reject(e))
     })
     })
   },
   },

+ 3 - 3
src/components/MxCondition/condition-object/condition-video-pack.js

@@ -14,12 +14,12 @@ export default {
   getList: function(param,$ref) {
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
       packList({
       packList({
-        course:$ref.model.videoCourse,
+        course:$ref.model.videoCourse.split(',')[0],
         subject:$ref.model.videoType,
         subject:$ref.model.videoType,
-        grade:$ref.model.videoGrade,
+        grade:$ref.model.videoGrade.split(',')[0],
         pageNum:1,
         pageNum:1,
         pageSize:20,
         pageSize:20,
-        version:param.videoVersion,
+        version:param.videoVersion.split(',')[0],
       }).then(res => resolve(res.rows))
       }).then(res => resolve(res.rows))
         .catch(e => reject(e))
         .catch(e => reject(e))
     })
     })

+ 8 - 1
src/components/MxCondition/condition-object/condition-video-subject.js

@@ -13,7 +13,14 @@ export default {
   title: '科目',
   title: '科目',
   getList: function(param,$ref) {
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
-      videoSubjects({ subject:param.videoType }).then(res => resolve(res.rows))
+      videoSubjects({ subject:param.videoType }).then(res => resolve(
+        res.rows.map(item => {
+          return {
+            code: item.code + ',type' + param.videoType,
+            label:item.label
+          }
+        })
+      ))
         .catch(e => reject(e))
         .catch(e => reject(e))
     })
     })
   },
   },

+ 9 - 2
src/components/MxCondition/condition-object/condition-video-version.js

@@ -14,9 +14,16 @@ export default {
   getList: function(param,$ref) {
   getList: function(param,$ref) {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
       videoVersions({
       videoVersions({
-        course:$ref.model.videoCourse,
+        course:$ref.model.videoCourse.split(',')[0],
         subject:$ref.model.videoType,
         subject:$ref.model.videoType,
-        grade:param.videoGrade }).then(res => resolve(res.rows))
+        grade:param.videoGrade.split(',')[0] }).then(res => resolve(
+          res.rows.map(item => {
+            return {
+              code: item.code + ',version' + $ref.model.videoCourse.split(',')[0],
+              label:item.label
+            }
+          })
+      ))
         .catch(e => reject(e))
         .catch(e => reject(e))
     })
     })
   },
   },

+ 3 - 4
src/views/career/zhiyuan/components/score.vue

@@ -45,7 +45,7 @@ export default {
             validator: (r, v, cb) => {
             validator: (r, v, cb) => {
               if (v > this.voluntaryData.maxScore) {
               if (v > this.voluntaryData.maxScore) {
                 cb(`成绩超出当前省份满分${this.voluntaryData.maxScore}`)
                 cb(`成绩超出当前省份满分${this.voluntaryData.maxScore}`)
-              } else if(v <= 0) {
+              } else if(v < 0) {
                 cb(`成绩不能为负数`)
                 cb(`成绩不能为负数`)
               }else {
               }else {
                 cb()
                 cb()
@@ -74,12 +74,11 @@ export default {
   },
   },
   watch: {
   watch: {
     'form.score': function(newval) {
     'form.score': function(newval) {
-      if(newval < 0) {
-        return
-      }
+      if(newval < 0 || newval > this.voluntaryData.maxScore)return
       this.setRankByScore()
       this.setRankByScore()
     },
     },
     'form.firstSubject': function() {
     'form.firstSubject': function() {
+      if(newval > this.voluntaryData.maxScore)  return
       this.setRankByScore()
       this.setRankByScore()
     }
     }
   },
   },

+ 3 - 3
src/views/videocourse/video_course.vue

@@ -107,10 +107,10 @@ export default {
     // 获取视频列表
     // 获取视频列表
     getVideoList() {
     getVideoList() {
       videoList({
       videoList({
-        course: this.queryParams.videoCourse, // 科目
+        course: this.queryParams.videoCourse.split(',')[0], // 科目
         subject: this.queryParams.videoType, // 大类
         subject: this.queryParams.videoType, // 大类
-        grade: this.queryParams.videoGrade, // 年级
-        version: this.queryParams.videoVersion, // 版本
+        grade: this.queryParams.videoGrade.split(',')[0], // 年级
+        version: this.queryParams.videoVersion.split(',')[0], // 版本
         pack: this.queryParams.videoPack,
         pack: this.queryParams.videoPack,
         ...this.pageForm,
         ...this.pageForm,
         sectionName: this.sectionName
         sectionName: this.sectionName