|
@@ -56,26 +56,25 @@
|
|
</el-table>
|
|
</el-table>
|
|
<el-radio-group class="mt10" v-model="mode">
|
|
<el-radio-group class="mt10" v-model="mode">
|
|
<el-popover
|
|
<el-popover
|
|
-
|
|
|
|
placement="bottom-start"
|
|
placement="bottom-start"
|
|
width="200"
|
|
width="200"
|
|
trigger="hover"
|
|
trigger="hover"
|
|
- content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
|
|
|
|
- <el-radio-button class="radio-btn" slot="reference">均衡</el-radio-button>
|
|
|
|
|
|
+ content="默认分配方式,按成绩平均分配">
|
|
|
|
+ <el-radio-button class="radio-btn" label="RankBalance" slot="reference">均衡</el-radio-button>
|
|
</el-popover>
|
|
</el-popover>
|
|
<el-popover
|
|
<el-popover
|
|
placement="bottom-start"
|
|
placement="bottom-start"
|
|
width="200"
|
|
width="200"
|
|
trigger="hover"
|
|
trigger="hover"
|
|
- content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
|
|
|
|
- <el-radio-button class="radio-btn" slot="reference">排名</el-radio-button>
|
|
|
|
|
|
+ content="按成绩优先分配">
|
|
|
|
+ <el-radio-button class="radio-btn" label="RankPriority" slot="reference">排名</el-radio-button>
|
|
</el-popover>
|
|
</el-popover>
|
|
<el-popover
|
|
<el-popover
|
|
placement="bottom-start"
|
|
placement="bottom-start"
|
|
width="200"
|
|
width="200"
|
|
trigger="hover"
|
|
trigger="hover"
|
|
- content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
|
|
|
|
- <el-radio-button class="radio-btn" slot="reference">随机</el-radio-button>
|
|
|
|
|
|
+ content="随机分配">
|
|
|
|
+ <el-radio-button class="radio-btn" label="random" slot="reference">随机</el-radio-button>
|
|
</el-popover>
|
|
</el-popover>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
@@ -83,7 +82,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import MxClassTreeTranslateMixin from '@/components/Cache/modules/mx-classTree-translate-mixin.js'
|
|
import MxClassTreeTranslateMixin from '@/components/Cache/modules/mx-classTree-translate-mixin.js'
|
|
-import { saveSettings } from '@/api/webApi/elective/dispatch'
|
|
|
|
|
|
+import { saveSettings, applySettings } from '@/api/webApi/elective/dispatch'
|
|
export default {
|
|
export default {
|
|
name: 'set-classcount',
|
|
name: 'set-classcount',
|
|
mixins: [MxClassTreeTranslateMixin],
|
|
mixins: [MxClassTreeTranslateMixin],
|
|
@@ -92,7 +91,10 @@ export default {
|
|
setShow: false,
|
|
setShow: false,
|
|
roundId: '',
|
|
roundId: '',
|
|
roundGroup: {},
|
|
roundGroup: {},
|
|
- mode: '',
|
|
|
|
|
|
+ mode: 'RankBalance',
|
|
|
|
+ // RankBalance, // 按成绩平均分配,默认按这种分配方式,可保证各个班成绩都差不多
|
|
|
|
+ // RankPriority, // 按成绩优先,会导致成绩好的集中到一起
|
|
|
|
+ // Random // 随机
|
|
settingContainer: []
|
|
settingContainer: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -163,16 +165,28 @@ export default {
|
|
this.confirm()
|
|
this.confirm()
|
|
return true
|
|
return true
|
|
},
|
|
},
|
|
- confirm() {
|
|
|
|
- console.log(this.settingContainer)
|
|
|
|
|
|
+ saveSettings() {
|
|
saveSettings(
|
|
saveSettings(
|
|
{roundId: this.roundId }, this.settingContainer ).then(res => {
|
|
{roundId: this.roundId }, this.settingContainer ).then(res => {
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message.success(res.msg)
|
|
|
|
- }
|
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message.success(res.msg)
|
|
|
|
+ }
|
|
}).finally(res => {
|
|
}).finally(res => {
|
|
this.refreshData()
|
|
this.refreshData()
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ confirm() {
|
|
|
|
+ console.log(this.settingContainer)
|
|
|
|
+ // 应用分班配置
|
|
|
|
+ applySettings({
|
|
|
|
+ roundId:this.roundId,
|
|
|
|
+ mode:this.mode,
|
|
|
|
+ groupId:this.roundGroup.groupId,
|
|
|
|
+ }).then(res => {})
|
|
|
|
+ // 保存settings
|
|
|
|
+ this.$nextTick(_ => {
|
|
|
|
+ this.saveSettings()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -180,7 +194,6 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
.radio-btn{
|
|
.radio-btn{
|
|
-
|
|
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|