|
@@ -28,7 +28,7 @@
|
|
|
<template #signUp="{row}">
|
|
|
<span class="f-red" v-if="!row.allowSelect">无法报名</span>
|
|
|
<div v-else>
|
|
|
- <span v-if="generation.current > 1" @click="commit" class="btn-green">报名</span>
|
|
|
+ <span v-if="generation.current > 1" @click="commit(row)" class="btn-green">报名</span>
|
|
|
<div v-else>
|
|
|
<span class="f-red btn-red" v-if="row.selected" @click="toUnSelect(row)">取消报名</span>
|
|
|
<span class="btn-green" v-else @click="toSelect(row)">报名</span>
|
|
@@ -101,6 +101,7 @@
|
|
|
trigger="click"
|
|
|
>
|
|
|
<div>
|
|
|
+ 确定拒绝系统给您推荐的<span class="f-primary">{{recommendGroup.groupName}}</span>组合么?
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
:rows="4"
|
|
@@ -110,7 +111,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" v-if="">提交</el-button>
|
|
|
+ <el-button type="danger" size="mini" @click="handleRejectRecommend">提交</el-button>
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
@@ -326,7 +327,7 @@ export default {
|
|
|
const resolver = this[resolverKey]
|
|
|
if (typeof resolver === 'function') {
|
|
|
const genColumns = resolver(gen, this.generation.active, dynamicColumns)
|
|
|
- Object.assign(dynamicColumns, genColumn)
|
|
|
+ Object.assign(dynamicColumns, genColumns)
|
|
|
}
|
|
|
}
|
|
|
return dynamicColumns
|
|
@@ -339,6 +340,9 @@ export default {
|
|
|
// })
|
|
|
return generation
|
|
|
},
|
|
|
+ recommendGroup() {
|
|
|
+ return this.activeModels?.models?.find(m => m.isRecommend) || {}
|
|
|
+ },
|
|
|
// 初始化 rows 填充固定数据
|
|
|
formatRows() {
|
|
|
if (!this.optionalMajors) return []
|
|
@@ -390,16 +394,17 @@ export default {
|
|
|
// AI 分析 跳转
|
|
|
this.$refs.aiDialog.open(this.formatRows)
|
|
|
},
|
|
|
- commit() {
|
|
|
+ commit(row) {
|
|
|
if (this.generation.current == 1) {
|
|
|
const real = this.activeModels.selectedList.filter(item => {
|
|
|
return item.selected == true
|
|
|
})
|
|
|
- console.log(real)
|
|
|
if (real.length < this.generation.status.preferenceCount) {
|
|
|
this.$message.warning(`初录报名需要选择${this.generation.status.preferenceCount}个志愿`)
|
|
|
return
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.toSelect(row)
|
|
|
}
|
|
|
this.$confirm(`是否要提交报名`, {
|
|
|
confirmButtonText: '确定',
|
|
@@ -412,8 +417,7 @@ export default {
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('报名成功')
|
|
|
- this.loadStudentSelected()
|
|
|
- this.getStudentElectiveModels()
|
|
|
+ this.refreshData()
|
|
|
}
|
|
|
console.log(res)
|
|
|
})
|
|
@@ -438,7 +442,7 @@ export default {
|
|
|
}
|
|
|
this.activeModels.models.find(item => item.groupId == row.groupId).selected = true
|
|
|
row.selected = true
|
|
|
- this.activeModels.selectedList.push(row)
|
|
|
+ if (!this.activeModels.selectedList.includes(row)) this.activeModels.selectedList.push(row)
|
|
|
},
|
|
|
toUnSelect(row) {
|
|
|
this.$confirm(`是否解除选科组合【${row.groupName}】`, '警告', {
|
|
@@ -470,6 +474,10 @@ export default {
|
|
|
const course1 = this.translateCourse1(row.groupId)
|
|
|
this.$refs.chooseDialog.open(course0, course1)
|
|
|
},
|
|
|
+ async handleRejectRecommend() {
|
|
|
+ await this.$confirm(`拒绝系统给您推荐的${this.recommendGroup.groupName}组合可能会导致您无法正常录取,确认继续?`)
|
|
|
+
|
|
|
+ },
|
|
|
initOption(optionalMajors) {
|
|
|
console.log(optionalMajors)
|
|
|
this.optionalMajors = optionalMajors
|