|
@@ -11,6 +11,13 @@
|
|
<el-button v-if="showRankBalance" type="primary" @click="jumpRankBalance">排名均衡</el-button>
|
|
<el-button v-if="showRankBalance" type="primary" @click="jumpRankBalance">排名均衡</el-button>
|
|
<el-button v-if="showClassDispatch" type="primary" @click="jumpTerminate">选科分班</el-button>
|
|
<el-button v-if="showClassDispatch" type="primary" @click="jumpTerminate">选科分班</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog :visible.sync="pushSettingFormVisible" :title="nextStepName+'设置'" width="350">
|
|
|
|
+ <elective-generation-push-setting ref="settingForm"/>
|
|
|
|
+ <div class="fx-row fx-end-cen mt15">
|
|
|
|
+ <el-button @click="pushSettingFormVisible=false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="commitPushSetting">确认</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -18,13 +25,15 @@
|
|
import {
|
|
import {
|
|
applyElectiveDMAlgorithm,
|
|
applyElectiveDMAlgorithm,
|
|
flushIntoGenerationDM,
|
|
flushIntoGenerationDM,
|
|
- jumpGenerationRankBalance,
|
|
|
|
|
|
+ jumpGenerationRankBalance, pushGenerationSetting,
|
|
terminateGeneration
|
|
terminateGeneration
|
|
} from '@/api/webApi/elective/generation'
|
|
} from '@/api/webApi/elective/generation'
|
|
import config from '@/common/mx-config'
|
|
import config from '@/common/mx-config'
|
|
|
|
+import ElectiveGenerationPushSetting from '@/views/elective/generation/components/elective-generation-push-setting'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'elective-generation-commands',
|
|
name: 'elective-generation-commands',
|
|
|
|
+ components: { ElectiveGenerationPushSetting },
|
|
inject: ['refreshData'],
|
|
inject: ['refreshData'],
|
|
props: ['chartBinding', 'disabled'],
|
|
props: ['chartBinding', 'disabled'],
|
|
computed: {
|
|
computed: {
|
|
@@ -64,6 +73,11 @@ export default {
|
|
return this.status.allMatched && this.generation.current <= options.rankBalance.value
|
|
return this.status.allMatched && this.generation.current <= options.rankBalance.value
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ pushSettingFormVisible: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
applyAlgorithm() {
|
|
applyAlgorithm() {
|
|
// 暂时只支持一种算法,不排队以后会支持多种
|
|
// 暂时只支持一种算法,不排队以后会支持多种
|
|
@@ -83,6 +97,13 @@ export default {
|
|
pushGeneration() {
|
|
pushGeneration() {
|
|
// show dialog form for push settings
|
|
// show dialog form for push settings
|
|
// then call push api
|
|
// then call push api
|
|
|
|
+ this.pushSettingFormVisible = true
|
|
|
|
+ },
|
|
|
|
+ async commitPushSetting() {
|
|
|
|
+ const setting = await this.$refs.settingForm.validate()
|
|
|
|
+ setting.roundId = this.status.roundId
|
|
|
|
+ const res = await pushGenerationSetting(setting)
|
|
|
|
+ this.refreshData()
|
|
},
|
|
},
|
|
jumpRankBalance() {
|
|
jumpRankBalance() {
|
|
jumpGenerationRankBalance().then(res => {
|
|
jumpGenerationRankBalance().then(res => {
|