|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <dispatch-table :round="round" :allowDispatch="round.allowDispatch"></dispatch-table>
|
|
|
+ <dispatch-table :round="formatRound" :allowDispatch="round.allowDispatch"></dispatch-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -12,13 +12,39 @@ export default {
|
|
|
created() {
|
|
|
},
|
|
|
methods: {},
|
|
|
+ computed: {
|
|
|
+ formatRound() {
|
|
|
+ if(!this.round.allowDispatch)return
|
|
|
+ for (const key in this.round.enrollGroupCount) {
|
|
|
+ console.log(key)
|
|
|
+ this.round.roundGroups.filter(item => {
|
|
|
+ if (item.groupId == key) {
|
|
|
+ item['number'] = this.round.enrollGroupCount[key]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return this.round.roundGroups
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
round: {
|
|
|
+ roundId: '1',
|
|
|
allowDispatch: true,
|
|
|
+ roundGroups: [{
|
|
|
+ groupId: '1', // 组合
|
|
|
+ classNum: 5 // 班级数
|
|
|
+ },{
|
|
|
+ groupId: '2',
|
|
|
+ classNum: 0
|
|
|
+ },{
|
|
|
+ groupId: '4',
|
|
|
+ classNum: 5
|
|
|
+ }],
|
|
|
enrollGroupCount:{
|
|
|
- groupIds: '1,2,3',
|
|
|
- roundGroups: []
|
|
|
+ '1': 250, // 录取人数
|
|
|
+ '2': 122,
|
|
|
+ '4': 100
|
|
|
}
|
|
|
}
|
|
|
};
|