|
@@ -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" @click="rejectSupply">提交</el-button>
|
|
|
+ <el-button type="danger" size="mini" @click="handleRejectRecommend">提交</el-button>
|
|
|
</p>
|
|
|
</div>
|
|
|
<el-button slot="reference" type="danger">不同意</el-button>
|
|
@@ -338,6 +339,9 @@ export default {
|
|
|
// })
|
|
|
return generation
|
|
|
},
|
|
|
+ recommendGroup() {
|
|
|
+ return this.activeModels?.models?.find(m => m.isRecommend) || {}
|
|
|
+ },
|
|
|
// 初始化 rows 填充固定数据
|
|
|
formatRows() {
|
|
|
if (!this.optionalMajors) return []
|
|
@@ -367,24 +371,6 @@ export default {
|
|
|
getModelsByStep() {
|
|
|
return this.models.findIndex()
|
|
|
},
|
|
|
- rejectSupply() {
|
|
|
- if(!this.regInfo.length) {
|
|
|
- this.$message.error('拒绝原因不能为空')
|
|
|
- return
|
|
|
- }
|
|
|
- const rejectRow = this.activeModels.models.find(item => item.isRecommend)
|
|
|
- rejectRow.rejected = true
|
|
|
- rejectRow.rejectedReason = this.regInfo
|
|
|
- rejectRecommend({
|
|
|
- models: [rejectRow]
|
|
|
- }).then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
- this.refreshData()
|
|
|
- }
|
|
|
- }).finally(_ => {
|
|
|
- this.regInfo = ''
|
|
|
- })
|
|
|
- },
|
|
|
isGroupOverSetting(row) {
|
|
|
if (this.generation.activeOpt.decisionMaking) {
|
|
|
console.log('isGroupOverSetting decisionMaking', row.groupApprovedCount >= row.personCount, row)
|
|
@@ -432,16 +418,17 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- 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: '确定',
|
|
@@ -479,7 +466,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}】`, '警告', {
|
|
@@ -511,6 +498,25 @@ export default {
|
|
|
const course1 = this.translateCourse1(row.groupId)
|
|
|
this.$refs.chooseDialog.open(course0, course1)
|
|
|
},
|
|
|
+ async handleRejectRecommend() {
|
|
|
+ await this.$confirm(`拒绝系统给您推荐的${this.recommendGroup.groupName}组合可能会导致您无法正常录取,确认继续?`)
|
|
|
+ if(!this.regInfo.length) {
|
|
|
+ this.$message.error('拒绝原因不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const rejectRow = this.activeModels.models.find(item => item.isRecommend)
|
|
|
+ rejectRow.rejected = true
|
|
|
+ rejectRow.rejectedReason = this.regInfo
|
|
|
+ rejectRecommend({
|
|
|
+ models: [rejectRow]
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.refreshData()
|
|
|
+ }
|
|
|
+ }).finally(_ => {
|
|
|
+ this.regInfo = ''
|
|
|
+ })
|
|
|
+ },
|
|
|
initOption(optionalMajors) {
|
|
|
console.log(optionalMajors)
|
|
|
this.optionalMajors = optionalMajors
|