|  | @@ -33,6 +33,18 @@
 | 
											
												
													
														|  |                <el-input-number :min="1" :max="roundGroup.number?setPubMax(scope.$index):Infinity" v-model="scope.row.actualCount" @change="countEdit(scope.row,scope.$index)" ></el-input-number>
 |  |                <el-input-number :min="1" :max="roundGroup.number?setPubMax(scope.$index):Infinity" v-model="scope.row.actualCount" @change="countEdit(scope.row,scope.$index)" ></el-input-number>
 | 
											
												
													
														|  |            </template>
 |  |            </template>
 | 
											
												
													
														|  |          </el-table-column>
 |  |          </el-table-column>
 | 
											
												
													
														|  | 
 |  | +        <el-table-column
 | 
											
												
													
														|  | 
 |  | +          label="是否设为重点班"
 | 
											
												
													
														|  | 
 |  | +        >
 | 
											
												
													
														|  | 
 |  | +          <template slot-scope="scope">
 | 
											
												
													
														|  | 
 |  | +            <el-switch
 | 
											
												
													
														|  | 
 |  | +              @change="openBtn(scope.row,scope.$index)"
 | 
											
												
													
														|  | 
 |  | +              v-model="scope.row.topPriority"
 | 
											
												
													
														|  | 
 |  | +              active-color="#13ce66"
 | 
											
												
													
														|  | 
 |  | +              inactive-color="#ff4949">
 | 
											
												
													
														|  | 
 |  | +            </el-switch>
 | 
											
												
													
														|  | 
 |  | +          </template>
 | 
											
												
													
														|  | 
 |  | +        </el-table-column>
 | 
											
												
													
														|  |        </el-table>
 |  |        </el-table>
 | 
											
												
													
														|  |        <el-radio-group class="mt10" v-model="mode">
 |  |        <el-radio-group class="mt10" v-model="mode">
 | 
											
												
													
														|  |          <el-popover
 |  |          <el-popover
 | 
											
										
											
												
													
														|  | @@ -128,6 +140,9 @@ export default {
 | 
											
												
													
														|  |      countEdit(newVal,index){
 |  |      countEdit(newVal,index){
 | 
											
												
													
														|  |        this.settingContainer[index].actualCount = newVal.actualCount
 |  |        this.settingContainer[index].actualCount = newVal.actualCount
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | 
 |  | +    openBtn(newVal,index){
 | 
											
												
													
														|  | 
 |  | +      this.settingContainer[index].topPriority = newVal.topPriority
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |      init(roundGroup,settingContainer) {
 |  |      init(roundGroup,settingContainer) {
 | 
											
												
													
														|  |        console.log(roundGroup,settingContainer)
 |  |        console.log(roundGroup,settingContainer)
 | 
											
												
													
														|  |        this.roundGroup = roundGroup
 |  |        this.roundGroup = roundGroup
 | 
											
										
											
												
													
														|  | @@ -139,11 +154,10 @@ export default {
 | 
											
												
													
														|  |        if( isSetting > 0) {
 |  |        if( isSetting > 0) {
 | 
											
												
													
														|  |          // 填充后台的
 |  |          // 填充后台的
 | 
											
												
													
														|  |          this.settingContainer = settingContainer.filter(item => item.groupId == roundGroup.groupId)
 |  |          this.settingContainer = settingContainer.filter(item => item.groupId == roundGroup.groupId)
 | 
											
												
													
														|  | -        console.log(this.settingContainer)
 |  | 
 | 
											
												
													
														|  |          return
 |  |          return
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        // 没有setting就初始化人数
 |  |        // 没有setting就初始化人数
 | 
											
												
													
														|  | -      console.log('初始化')
 |  | 
 | 
											
												
													
														|  | 
 |  | +      console.log('初始化',settingContainer)
 | 
											
												
													
														|  |        const remainder = roundGroup.number % roundGroup.classCount // 余数
 |  |        const remainder = roundGroup.number % roundGroup.classCount // 余数
 | 
											
												
													
														|  |        const divide = Math.floor(roundGroup.number / roundGroup.classCount) // 向下取整的除数
 |  |        const divide = Math.floor(roundGroup.number / roundGroup.classCount) // 向下取整的除数
 | 
											
												
													
														|  |        this.settingContainer = settingContainer.filter(item => item.groupId == roundGroup.groupId).map((item,index)  => {
 |  |        this.settingContainer = settingContainer.filter(item => item.groupId == roundGroup.groupId).map((item,index)  => {
 | 
											
										
											
												
													
														|  | @@ -154,6 +168,7 @@ export default {
 | 
											
												
													
														|  |            // 余数分完
 |  |            // 余数分完
 | 
											
												
													
														|  |            item.actualCount = divide
 |  |            item.actualCount = divide
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +        item.topPriority = false
 | 
											
												
													
														|  |          return item
 |  |          return item
 | 
											
												
													
														|  |          console.log(item)
 |  |          console.log(item)
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
										
											
												
													
														|  | @@ -164,6 +179,8 @@ export default {
 | 
											
												
													
														|  |        const count =this.formatSetting.reduce((pre, cur) => {
 |  |        const count =this.formatSetting.reduce((pre, cur) => {
 | 
											
												
													
														|  |            return pre + cur.actualCount
 |  |            return pre + cur.actualCount
 | 
											
												
													
														|  |        }, 0)
 |  |        }, 0)
 | 
											
												
													
														|  | 
 |  | +      console.log(this.settingContainer)
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |        if(count != this.roundGroup.number) {
 |  |        if(count != this.roundGroup.number) {
 | 
											
												
													
														|  |          this.$message.warning('还有学生未分班')
 |  |          this.$message.warning('还有学生未分班')
 | 
											
												
													
														|  |          return
 |  |          return
 | 
											
										
											
												
													
														|  | @@ -178,6 +195,7 @@ export default {
 | 
											
												
													
														|  |          item.expectedCount = item.actualCount
 |  |          item.expectedCount = item.actualCount
 | 
											
												
													
														|  |          return item
 |  |          return item
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  | 
 |  | +      console.log(this.settingContainer)
 | 
											
												
													
														|  |        applySettings({
 |  |        applySettings({
 | 
											
												
													
														|  |          roundId:this.roundId,
 |  |          roundId:this.roundId,
 | 
											
												
													
														|  |          mode:this.mode,
 |  |          mode:this.mode,
 |