|
@@ -28,6 +28,17 @@
|
|
|
</template>
|
|
|
<template #flow-log="{row}">
|
|
|
<el-link @click="handleFlowLog(row)" :underline="false">查看</el-link>
|
|
|
+ <el-popover v-if="row['enableForce']" :ref="'force_'+row['studentId']" width="80" trigger="click"
|
|
|
+ popper-class="zero-padding-popover">
|
|
|
+ <div class="fx-column">
|
|
|
+ <el-divider>调剂</el-divider>
|
|
|
+ <el-button v-for="(g,i) in prevData.groups" :key="i" class="ml0" plain type="text"
|
|
|
+ :disabled="g.groupId==row['disableForceGroupId']"
|
|
|
+ @click="handleForceAdjust(g, row)&&$refs['force_'+row['studentId']].doClose()">{{ g.groupName }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-link slot="reference" :underline="false" type="warning" class="ml10">调剂</el-link>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
</mx-table>
|
|
|
<pagination :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
@@ -42,16 +53,21 @@
|
|
|
<script>
|
|
|
import config from '@/common/mx-config'
|
|
|
import transferMixin from '@/components/mx-transfer-mixin'
|
|
|
+import groupTranslateMixin from '@/components/Cache/modules/mx-select-translate-mixin'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import MxCondition from '@/components/MxCondition/mx-condition'
|
|
|
-import { getElectiveGenerationDetails, getGenerationOptionalMajorsBatch } from '@/api/webApi/elective/generation'
|
|
|
+import {
|
|
|
+ enrollByForce,
|
|
|
+ getElectiveGenerationDetails,
|
|
|
+ getGenerationOptionalMajorsBatch
|
|
|
+} from '@/api/webApi/elective/generation'
|
|
|
import ElectiveGenerationFlowLog from '@/views/elective/generation/components/elective-generation-flow-log'
|
|
|
import ElectiveFlowMajor from '@/views/elective/generation/components/elective-flow-major'
|
|
|
import ElectiveFlowRankDescriptor from '@/views/elective/generation/components/elective-flow-rank-descriptor'
|
|
|
|
|
|
export default {
|
|
|
components: { ElectiveFlowRankDescriptor, ElectiveFlowMajor, ElectiveGenerationFlowLog, MxCondition },
|
|
|
- mixins: [transferMixin],
|
|
|
+ mixins: [transferMixin, groupTranslateMixin],
|
|
|
name: 'generation-detail',
|
|
|
computed: {
|
|
|
...mapGetters(['school']),
|
|
@@ -110,7 +126,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
- columns.actions = { label: '查看明细', slot: 'flow-log' }
|
|
|
+ columns.actions = { label: '操作', slot: 'flow-log', minWidth: '100px' }
|
|
|
return {
|
|
|
rows,
|
|
|
columns,
|
|
@@ -208,6 +224,17 @@ export default {
|
|
|
handleFlowLog(row) {
|
|
|
this.logRow = row
|
|
|
this.logVisible = true
|
|
|
+ },
|
|
|
+ handleForceAdjust(group, row) {
|
|
|
+ let message = `确认将'${row.studentName}'调剂至'${group.groupName}'?!`
|
|
|
+ if (row['disableForceGroupId'] > 0) {
|
|
|
+ message += `\n 当前录取组合'${this.translateGroup(row['disableForceGroupId'])}'`
|
|
|
+ }
|
|
|
+ this.$confirm(message, '强制调剂提醒', { type: 'warning' }).then(() => {
|
|
|
+ enrollByForce(group.groupId, row['studentId']).then(res => {
|
|
|
+ this.loadGenerationDetails() // refresh
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|