|
@@ -3,17 +3,17 @@
|
|
<div class="fx-1">
|
|
<div class="fx-1">
|
|
<el-button v-if="showDMAlgorithm" type="primary" @click="applyAlgorithm">智能匹配</el-button>
|
|
<el-button v-if="showDMAlgorithm" type="primary" @click="applyAlgorithm">智能匹配</el-button>
|
|
<el-button v-if="showDMAlgorithmResults" type="primary" @click="goDetailPage">查看匹配明细</el-button>
|
|
<el-button v-if="showDMAlgorithmResults" type="primary" @click="goDetailPage">查看匹配明细</el-button>
|
|
- <el-button v-if="showForceAdjust" type="primary" @click="goDetailPage">调剂/提醒</el-button>
|
|
|
|
|
|
+ <el-button v-if="showForceAdjust" type="primary" @click="goDetailPage">查看/调剂</el-button>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<el-button v-if="showFastPush" type="primary" @click="flushIntoDM">提前进入{{ nextStepName }}</el-button>
|
|
<el-button v-if="showFastPush" type="primary" @click="flushIntoDM">提前进入{{ nextStepName }}</el-button>
|
|
<el-button v-if="showSend" type="primary" @click="pushGeneration">发送</el-button>
|
|
<el-button v-if="showSend" type="primary" @click="pushGeneration">发送</el-button>
|
|
<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 type="primary" @click="jumpTerminate">查看分班结果</el-button>-->
|
|
|
|
-<!-- <el-button type="primary" @click="jumpTerminate">查看选科数据</el-button>-->
|
|
|
|
|
|
+ <el-button v-if="showClassDispatch" type="primary" @click="terminateAndJumpDispatch">选科分班</el-button>
|
|
|
|
+ <el-button v-else type="primary" @click="jumpDispatch">选科分班</el-button>
|
|
</div>
|
|
</div>
|
|
- <el-dialog :visible.sync="pushSettingFormVisible" :title="nextStepName+'设置'" width="350">
|
|
|
|
|
|
+ <el-dialog v-if="pushSettingFormVisible" :visible.sync="pushSettingFormVisible"
|
|
|
|
+ :title="nextStepName+'设置'" width="350">
|
|
<elective-generation-push-setting ref="settingForm"/>
|
|
<elective-generation-push-setting ref="settingForm"/>
|
|
<div class="fx-row fx-end-cen mt15">
|
|
<div class="fx-row fx-end-cen mt15">
|
|
<el-button @click="pushSettingFormVisible=false">取消</el-button>
|
|
<el-button @click="pushSettingFormVisible=false">取消</el-button>
|
|
@@ -32,8 +32,10 @@ import {
|
|
} 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'
|
|
import ElectiveGenerationPushSetting from '@/views/elective/generation/components/elective-generation-push-setting'
|
|
|
|
+import transferMixin from '@/components/mx-transfer-mixin'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ mixins: [transferMixin],
|
|
name: 'elective-generation-commands',
|
|
name: 'elective-generation-commands',
|
|
components: { ElectiveGenerationPushSetting },
|
|
components: { ElectiveGenerationPushSetting },
|
|
inject: ['refreshData'],
|
|
inject: ['refreshData'],
|
|
@@ -81,19 +83,23 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ notifyRootRefresh() {
|
|
|
|
+ this.refreshData()
|
|
|
|
+ },
|
|
applyAlgorithm() {
|
|
applyAlgorithm() {
|
|
// 暂时只支持一种算法,不排队以后会支持多种
|
|
// 暂时只支持一种算法,不排队以后会支持多种
|
|
const algorithm = config.electiveDMAlgorithm.rankFirst.value
|
|
const algorithm = config.electiveDMAlgorithm.rankFirst.value
|
|
- applyElectiveDMAlgorithm(algorithm).then(res => {
|
|
|
|
- this.refreshData()
|
|
|
|
|
|
+ applyElectiveDMAlgorithm(algorithm).finally(() => {
|
|
|
|
+ this.notifyRootRefresh()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
goDetailPage() {
|
|
goDetailPage() {
|
|
- //
|
|
|
|
|
|
+ // 默认跳第1个可查询项 // 外抛让table子组件处理
|
|
|
|
+ this.$emit('jumpDetail')
|
|
},
|
|
},
|
|
flushIntoDM() {
|
|
flushIntoDM() {
|
|
- flushIntoGenerationDM().then(_ => {
|
|
|
|
- this.refreshData()
|
|
|
|
|
|
+ flushIntoGenerationDM().finally(() => {
|
|
|
|
+ this.notifyRootRefresh()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
pushGeneration() {
|
|
pushGeneration() {
|
|
@@ -104,18 +110,24 @@ export default {
|
|
async commitPushSetting() {
|
|
async commitPushSetting() {
|
|
const setting = await this.$refs.settingForm.validate()
|
|
const setting = await this.$refs.settingForm.validate()
|
|
setting.roundId = this.status.roundId
|
|
setting.roundId = this.status.roundId
|
|
- const res = await pushGenerationSetting(setting)
|
|
|
|
- this.refreshData()
|
|
|
|
|
|
+ pushGenerationSetting(setting).finally(() => {
|
|
|
|
+ this.notifyRootRefresh()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
jumpRankBalance() {
|
|
jumpRankBalance() {
|
|
- jumpGenerationRankBalance().then(res => {
|
|
|
|
- this.refreshData()
|
|
|
|
|
|
+ jumpGenerationRankBalance().finally(() => {
|
|
|
|
+ this.notifyRootRefresh()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- jumpTerminate() {
|
|
|
|
|
|
+ terminateAndJumpDispatch() {
|
|
terminateGeneration().then(res => {
|
|
terminateGeneration().then(res => {
|
|
- this.refreshData()
|
|
|
|
- })
|
|
|
|
|
|
+ // this.refreshData()
|
|
|
|
+ this.jumpDispatch()
|
|
|
|
+ }).catch(_ => this.notifyRootRefresh())
|
|
|
|
+ },
|
|
|
|
+ jumpDispatch() {
|
|
|
|
+ const path = '/evaluating/master-manage/permission/elective/dispatch/index'
|
|
|
|
+ this.transferTo(path)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|