浏览代码

分班 调整问题修复

shilipojs 3 年之前
父节点
当前提交
b2c5819abf

+ 1 - 1
src/api/webApi/elective/dispatch.js

@@ -66,7 +66,7 @@ export function lockDispatch(params) {
 
 
 export function getClass(params) {
 export function getClass(params) {
   return request({
   return request({
-    url: '/mock/front/report/getCurrentRound',
+    url: '/front/elective/classes/list',
     method: 'get',
     method: 'get',
     params
     params
   })
   })

+ 1 - 4
src/components/MxCondition/condition-object/condition-dispatch-class.js

@@ -10,10 +10,7 @@ export default {
   },
   },
   getList: function(param) {
   getList: function(param) {
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
-      getClass({
-        groupId: 10
-      }).then(res => {
-        console.log('111111111111',res.data)
+      getClass().then(res => {
         resolve(res.data)
         resolve(res.data)
       })
       })
       .catch(e => reject(e))
       .catch(e => reject(e))

+ 5 - 1
src/views/elective/dispatch/components/class-adjust.vue

@@ -74,18 +74,22 @@ export default {
       selectedLeft: [],
       selectedLeft: [],
       selectedRight: [],
       selectedRight: [],
       show: false,
       show: false,
-      tranRight: []
     }
     }
   },
   },
   created() {
   created() {
   },
   },
   computed: {
   computed: {
+    tranRight() {
+      if (!this.selectedLeft.length) return []
+      return this.selectedLeft.map(s => { return s.studentId })
+    },
     parentFrame() {
     parentFrame() {
       const selected = this.selectedRight.concat(this.selectedLeft)
       const selected = this.selectedRight.concat(this.selectedLeft)
       return selected.map(item => {
       return selected.map(item => {
         return {
         return {
           key: item.studentId,
           key: item.studentId,
           label: item.name,
           label: item.name,
+          disabled: true
         }
         }
       })
       })
     },
     },

+ 1 - 1
src/views/elective/dispatch/components/dispatch-table.vue

@@ -154,7 +154,7 @@ export default {
       this.$refs.adjustDialog.open(row,this.settings.filter(item => item.groupId == row.groupId))
       this.$refs.adjustDialog.open(row,this.settings.filter(item => item.groupId == row.groupId))
     },
     },
     toDetail(row) {
     toDetail(row) {
-      const params = {groupId: row.groupId,groupIds: (this.round.groupIds &&this.round.groupIds.split(','))||[]}
+      const params = {group: row,groupIds: (this.round.groupIds &&this.round.groupIds.split(','))||[]}
       const path = '/elective/dispatch/detail'
       const path = '/elective/dispatch/detail'
       console.log('prev transfer', row, this.round)
       console.log('prev transfer', row, this.round)
       this.transferTo(path, params)
       this.transferTo(path, params)

+ 1 - 1
src/views/elective/dispatch/detail.vue

@@ -39,7 +39,7 @@ export default {
           }
           }
         })
         })
       }
       }
-      this.$nextTick(_ => this.queryParams = { localGroupId: this.prevData.groupId })
+      this.$nextTick(_ => this.queryParams = { localGroupId: this.prevData.group.groupId })
       return source
       return source
     }
     }
   },
   },