|
@@ -67,19 +67,19 @@
|
|
|
</mx-table>
|
|
|
<!-- 初录 多志愿拖拽 -->
|
|
|
<div v-if="this.generation.current == 1">
|
|
|
- <p>您的选科志愿: <span v-for="(item,index) in selectedList">
|
|
|
+ <p>您的选科志愿: <span v-for="(item) in activeModels.selectedList">
|
|
|
{{ item.groupName }}
|
|
|
<!-- {{ index + 1 < selectedList.length ? '、' : '' }}-->
|
|
|
</span>
|
|
|
</p>
|
|
|
- <test-drage ref="drage" :sortList="selectedList"></test-drage>
|
|
|
+ <test-drage ref="drage" :selectedList="activeModels.selectedList"></test-drage>
|
|
|
<el-button @click="commit" type="primary">提交</el-button>
|
|
|
</div>
|
|
|
<!-- 补录报名和二次补录报名和调剂报名 -->
|
|
|
<div v-if="flagShow">
|
|
|
- <div v-for="item in singleList" class="mb5 mt5">
|
|
|
- <el-button @click="commit" type="primary">{{ `${item.groupName} : 报名` }}</el-button>
|
|
|
- </div>
|
|
|
+<!-- <div v-for="item in singleList" class="mb5 mt5">-->
|
|
|
+<!-- <el-button @click="commit" type="primary">{{ `${item.groupName} : 报名` }}</el-button>-->
|
|
|
+<!-- </div>-->
|
|
|
<div class="mb5 mt10 text-right">
|
|
|
<el-popover
|
|
|
placement="right"
|
|
@@ -97,7 +97,7 @@
|
|
|
</el-input>
|
|
|
<p class="fx-row jc-between mt10">
|
|
|
<el-button type="primary" size="mini" @click="popoShow = false">取消</el-button>
|
|
|
- <el-button type="danger" size="mini">提交</el-button>
|
|
|
+ <el-button type="danger" size="mini" v-if="">提交</el-button>
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
@@ -137,7 +137,6 @@ import ForceAdjustResolverMixins
|
|
|
import OverUnderBadge from '@/views/elective/publish/components/steps/fauclty/over-under-badge'
|
|
|
|
|
|
export default {
|
|
|
-
|
|
|
props: {
|
|
|
generation: Object,
|
|
|
readonly: Boolean, // 校长端不允许操作
|
|
@@ -170,7 +169,6 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
singleList: [], // 单志愿列表
|
|
|
rows: [],
|
|
|
- selectedList:[]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -187,7 +185,7 @@ export default {
|
|
|
return {
|
|
|
index: {
|
|
|
type: 'index',
|
|
|
- label: '编号'
|
|
|
+ label: '编号',
|
|
|
},
|
|
|
groupName: {
|
|
|
label: '选科组合'
|
|
@@ -253,14 +251,17 @@ export default {
|
|
|
}
|
|
|
return dynamicColumns
|
|
|
},
|
|
|
+ activeModels(){
|
|
|
+ if(!this.generation) return {}
|
|
|
+ return this.generation.models.find(item => item.generation == this.generation.active)
|
|
|
+ },
|
|
|
// 初始化 rows 填充固定数据
|
|
|
-
|
|
|
formatRows() {
|
|
|
if (!this.optionalMajors) return []
|
|
|
if (!this.generation.roundGroups?.length) return []
|
|
|
if (!this.generation.activeModels?.length) return []
|
|
|
const generationModels = this.generation.activeModels.last()?.models || []
|
|
|
- return this.generation.roundGroups.map(rg => {
|
|
|
+ return this.generation.roundGroups.map(rg => {
|
|
|
const row = generationModels.find(item => item.groupId == rg.groupId) || {}
|
|
|
row.allowSelectTips = row.allowSelect ? '报名中' : row.disabledReason || '无法报名'
|
|
|
const matchedMajors = this.optionalMajors.filter(college => college.matchedGroupIds.includes(row.groupId))
|
|
@@ -304,7 +305,7 @@ export default {
|
|
|
},
|
|
|
commit() {
|
|
|
if (this.generation.current == 1) {
|
|
|
- const real = this.selectedList.filter(item => {
|
|
|
+ const real = this.activeModels.selectedList.filter(item => {
|
|
|
return item.selected == true
|
|
|
})
|
|
|
if (real.length < this.generation.status.preferenceCount) {
|
|
@@ -312,7 +313,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- this.$refs.esignDialog.open(this.selectedList)
|
|
|
+ this.$refs.esignDialog.open(this.activeModels.selectedList)
|
|
|
},
|
|
|
toSelect(row) {
|
|
|
const preferenceCount = this.generation.status.preferenceCount
|
|
@@ -324,8 +325,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
row.selected = true
|
|
|
- this.selectedList.push(row)
|
|
|
- this.$refs.drage.init(this.selectedList)
|
|
|
+ this.activeModels.selectedList.push(row)
|
|
|
},
|
|
|
toUnSelect(row) {
|
|
|
this.$confirm(`是否解除选科组合【${row.groupName}】`, '警告', {
|
|
@@ -334,11 +334,9 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
row.selected = false
|
|
|
- const start = this.selectedList.indexOf(this.selectedList.find((selected) => {
|
|
|
- return selected.groupId == row.groupId
|
|
|
- }))
|
|
|
- this.selectedList.splice(start, 1)
|
|
|
- this.$refs.drage.init(this.selectedList)
|
|
|
+ const start = this.activeModels.selectedList.findIndex(item => item.groupId == row.groupId)
|
|
|
+ console.log(start)
|
|
|
+ this.activeModels.selectedList.splice(start, 1)
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|