|
@@ -26,7 +26,10 @@
|
|
|
<!-- <el-button>查看</el-button>-->
|
|
|
</template>
|
|
|
<template #signUp="{row}">
|
|
|
- <span class="f-red" v-if="!row.allowSelect">{{ row.disabledReason || '无法报名' }}</span>
|
|
|
+ <div class="f-red" v-if="!row.allowSelect">
|
|
|
+ <span v-if="row.selected">已报名</span>
|
|
|
+ <span v-else>{{ row.disabledReason || '无法报名' }}</span>
|
|
|
+ </div>
|
|
|
<div v-else>
|
|
|
<!-- 初录后报名代 -->
|
|
|
<span v-if="generation.current > 1" @click="singleCommit(row)" class="btn-green">报名</span>
|
|
@@ -76,13 +79,13 @@
|
|
|
<!-- 初录 多志愿拖拽 -->
|
|
|
<div
|
|
|
v-if="this.generation.active == generation.options.primary.value || this.generation.active == generation.options.primaryDM.value">
|
|
|
- <p>您的选科志愿: <span v-for="(item,index) in activeModels.selectedList">
|
|
|
+ <p>您的选科志愿: <span v-for="(item,index) in activeModels.generation.selectedList">
|
|
|
{{ item.groupName }}
|
|
|
</span>
|
|
|
</p>
|
|
|
<div>
|
|
|
<test-drage ref="drage" :btnDisabled="this.generation.current != generation.options.primary.value"
|
|
|
- :selectedList="activeModels.selectedList"
|
|
|
+ :selectedList="activeModels.generation.selectedList"
|
|
|
></test-drage>
|
|
|
<el-button @click="commit" type="primary" v-if="this.generation.current == generation.options.primary.value">
|
|
|
提交
|
|
@@ -97,13 +100,14 @@
|
|
|
<div v-if="flagShow">
|
|
|
<div class="mb5 mt10 text-right">
|
|
|
<el-popover
|
|
|
+ v-if="activeModels.generation.models.filter(item => {item.allowSelect}).length > 0"
|
|
|
placement="right"
|
|
|
width="300"
|
|
|
v-model="popoShow"
|
|
|
trigger="click"
|
|
|
>
|
|
|
<div>
|
|
|
- 确定拒绝系统给您推荐的<span class="f-primary">{{recommendGroup.groupName}}</span>组合么?
|
|
|
+<!-- 确定拒绝<span class="f-primary">{{recommendGroup.groupName}}</span>组合么?-->
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
:rows="4"
|
|
@@ -118,6 +122,7 @@
|
|
|
</div>
|
|
|
<el-button slot="reference" type="danger">不同意</el-button>
|
|
|
</el-popover>
|
|
|
+ <el-button v-else type="primary">撤销拒绝报名</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<esign-dialog ref="esignDialog"></esign-dialog>
|
|
@@ -201,14 +206,23 @@ export default {
|
|
|
if (this.generation.active < this.generation.options.primaryDM.value) return ''
|
|
|
let info = ''
|
|
|
const activeModels = this.generation.models.find(item => item.generation == this.generation.active)
|
|
|
- // 是否被录取?
|
|
|
+ // 当前代是否被录取?
|
|
|
const approved = activeModels.models.filter(item => {
|
|
|
return item.approved
|
|
|
})
|
|
|
if (approved.length) {
|
|
|
- // 查找
|
|
|
- // 已被录取
|
|
|
- info = `同学,你好,你之前所选择的${approved.groupName}已被录取`
|
|
|
+ // // 查找在哪一阶段被录取 ? 根据selected 和 approved 都为true
|
|
|
+ // const model =this.generation.activeModels.filter(model => {
|
|
|
+ // const flag = model.models.some(item=> {
|
|
|
+ // return item.selected && item.approved
|
|
|
+ // })
|
|
|
+ // if(flag) return model
|
|
|
+ // })
|
|
|
+ // console.log(model)
|
|
|
+ // const admissionAgent = Object.values(this.generation.options).find(item => item.value == model[0].generation - 1)
|
|
|
+ // console.log(Object.values(this.generation.options))
|
|
|
+ // // 已被录取
|
|
|
+ // info = `你在${admissionAgent.title}所选择的${approved[0].groupName}已被录取`
|
|
|
} else {
|
|
|
// 已报名未被录取的group 取当前models的前一个
|
|
|
const prevModels = this.generation.models.find(item => item.generation == activeModels.generation - 1)
|
|
@@ -225,7 +239,7 @@ export default {
|
|
|
tips = prevGen.title
|
|
|
}
|
|
|
const isSupply = prevGen.decisionMaking ? ',现有以下标黄组合可以重新报名' : ''
|
|
|
- info = `<p>同学,你好,你在${tips}时拒绝填报志愿 ${isSupply} </p>`
|
|
|
+ info = `<p>你在${tips}时拒绝填报志愿 ${isSupply} </p>`
|
|
|
} else {
|
|
|
// 没被录取的组合
|
|
|
const refuseGroup = prevModels.models.filter(item => {
|
|
@@ -241,9 +255,9 @@ export default {
|
|
|
}
|
|
|
const isSupply = prevGen.decisionMaking ? ',现有以下标黄组合可以重新报名' : ''
|
|
|
if (refuseGroup.length > 0) {
|
|
|
- info = `<p>同学,你好,你在${tips}所选择的 <span class="f-red">${refuseGroup.map(g => g.groupName).join(',').toString()}</span> 不符合条件${isSupply} </p>`
|
|
|
+ info = `<p>你在${tips}所选择的 <span class="f-red">${refuseGroup.map(g => g.groupName).join(',').toString()}</span> 不符合条件${isSupply} </p>`
|
|
|
} else {
|
|
|
- info = `<p>同学,你好,你在${tips}时未填报志愿 ${isSupply} </p>`
|
|
|
+ info = `<p>你在${tips}时未填报志愿 ${isSupply} </p>`
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -252,7 +266,7 @@ export default {
|
|
|
flagShow() {
|
|
|
const stepMatched = this.generation.active == this.generation.current
|
|
|
const selectStep = !this.generation.activeOpt.decisionMaking
|
|
|
- return stepMatched && selectStep && !this.readonly
|
|
|
+ return stepMatched && selectStep && !this.readonly && !this.activeModels.isAdmission
|
|
|
},
|
|
|
aiButtonShow() {
|
|
|
if (!this.generation.activeOpt) return false
|
|
@@ -336,13 +350,19 @@ export default {
|
|
|
activeModels() {
|
|
|
if (!this.generation) return {}
|
|
|
const generation = this.generation.models.find(item => item.generation == this.generation.active)
|
|
|
+ // 是否被录取
|
|
|
+ const isAdmission = generation.models.some(item => item.approved || item.forceAdjusted)
|
|
|
+ console.log(isAdmission)
|
|
|
// generation.selectedList = generation.models.filter(item => {
|
|
|
// return item.selected
|
|
|
// })
|
|
|
- return generation
|
|
|
+ return {
|
|
|
+ isAdmission,
|
|
|
+ generation
|
|
|
+ }
|
|
|
},
|
|
|
recommendGroup() {
|
|
|
- return this.activeModels?.models?.find(m => m.isRecommend) || {}
|
|
|
+ return this.activeModels?.generation.models?.find(m => m.isRecommend) || {}
|
|
|
},
|
|
|
// 初始化 rows 填充固定数据
|
|
|
formatRows() {
|
|
@@ -352,7 +372,7 @@ export default {
|
|
|
const generationModels = this.generation.activeModels.last()?.models || []
|
|
|
return this.generation.roundGroups.map(rg => {
|
|
|
const row = generationModels.find(item => item.groupId == rg.groupId) || {}
|
|
|
- row.allowSelectTips = row.allowSelect ? '报名中' : row.disabledReason || '无法报名'
|
|
|
+ row.allowSelectTips = row.allowSelect ? '报名中' : row.selected ? '已报名' : row.disabledReason || '无法报名'
|
|
|
const matchedMajors = this.optionalMajors.filter(college => college.matchedGroupIds.includes(row.groupId))
|
|
|
row.colleges = matchedMajors.map(m => ({ college: m.collegeName, major: m.majorCategoryName }))
|
|
|
row.subjects = matchedMajors.map(m => m['majorCategoryName'])
|
|
@@ -367,7 +387,7 @@ export default {
|
|
|
...this.resolveDynamicTable,
|
|
|
...this.resolveTableSuffix
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
getModelsByStep() {
|
|
@@ -384,7 +404,7 @@ export default {
|
|
|
},
|
|
|
toReport() {
|
|
|
// 是否更改了报名数据 ?
|
|
|
- const flag = this.activeModels.models.filter(item => item.selected).length == this.activeModels.selectedList.length
|
|
|
+ const flag = this.activeModels.generation.models.filter(item => item.selected).length == this.activeModels.generation.selectedList.length
|
|
|
if (!flag) {
|
|
|
this.$message.warning('请先提交更改过的志愿')
|
|
|
return
|
|
@@ -396,6 +416,7 @@ export default {
|
|
|
this.$refs.aiDialog.open(this.formatRows)
|
|
|
},
|
|
|
singleCommit(row) {
|
|
|
+ // 补录及之后
|
|
|
this.$confirm(`是否要提交报名`, {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -411,7 +432,6 @@ export default {
|
|
|
this.$message.success('报名成功')
|
|
|
this.refreshData()
|
|
|
}
|
|
|
- console.log(res)
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
@@ -421,16 +441,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
commit(row) {
|
|
|
- if (this.generation.current == 1) {
|
|
|
- const real = this.activeModels.selectedList.filter(item => {
|
|
|
+ // 初录
|
|
|
+ const real = this.activeModels.generation.selectedList.filter(item => {
|
|
|
return item.selected == true
|
|
|
- })
|
|
|
- if (real.length < this.generation.status.preferenceCount) {
|
|
|
- this.$message.warning(`初录报名需要选择${this.generation.status.preferenceCount}个志愿`)
|
|
|
+ })
|
|
|
+ if (real.length < this.generation.status.preferenceCount) {
|
|
|
+ this.$message.warning(`需要选择${this.generation.status.preferenceCount}个志愿`)
|
|
|
return
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.toSelect(row)
|
|
|
}
|
|
|
this.$confirm(`是否要提交报名`, {
|
|
|
confirmButtonText: '确定',
|
|
@@ -438,14 +455,13 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
submitElectiveModels({
|
|
|
- models: this.activeModels.selectedList
|
|
|
+ models: this.activeModels.generation.selectedList
|
|
|
// esign:this.base64Img
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('报名成功')
|
|
|
this.refreshData()
|
|
|
}
|
|
|
- console.log(res)
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
@@ -466,9 +482,9 @@ export default {
|
|
|
this.$message.warning(`最多选择${preferenceCount}个志愿`)
|
|
|
return
|
|
|
}
|
|
|
- this.activeModels.models.find(item => item.groupId == row.groupId).selected = true
|
|
|
+ this.activeModels.generation.models.find(item => item.groupId == row.groupId).selected = true
|
|
|
row.selected = true
|
|
|
- if (!this.activeModels.selectedList.includes(row)) this.activeModels.selectedList.push(row)
|
|
|
+ if (!this.activeModels.selectedList.includes(row)) this.activeModels.generation.selectedList.push(row)
|
|
|
},
|
|
|
toUnSelect(row) {
|
|
|
this.$confirm(`是否解除选科组合【${row.groupName}】`, '警告', {
|
|
@@ -476,11 +492,10 @@ export default {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- this.activeModels.models.find(item => item.groupId == row.groupId).selected = false
|
|
|
+ this.activeModels.generation.models.find(item => item.groupId == row.groupId).selected = false
|
|
|
row.selected = false
|
|
|
- const start = this.activeModels.selectedList.findIndex(item => item.groupId == row.groupId)
|
|
|
- console.log(start)
|
|
|
- this.activeModels.selectedList.splice(start, 1)
|
|
|
+ const start = this.activeModels.generation.selectedList.findIndex(item => item.groupId == row.groupId)
|
|
|
+ this.activeModels.generation.selectedList.splice(start, 1)
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
@@ -490,7 +505,7 @@ export default {
|
|
|
},
|
|
|
toSelectSub(row) {
|
|
|
// 是否更改了报名数据 ?
|
|
|
- const flag = this.activeModels.models.filter(item => item.selected).length == this.activeModels.selectedList.length
|
|
|
+ const flag = this.activeModels.generation.models.filter(item => item.selected).length == this.activeModels.generation.selectedList.length
|
|
|
if (!flag) {
|
|
|
this.$message.warning('请先提交更改过的志愿')
|
|
|
return
|
|
@@ -501,14 +516,13 @@ export default {
|
|
|
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
|
|
|
+ const rejectRow = this.activeModels.generation.models.filter(item => item.allowSelect)
|
|
|
+ await this.$confirm(`是否拒绝报名${rejectRow.map(item=> item.groupName).join(',')}?`)
|
|
|
+ // 可以报名的组合都拒绝
|
|
|
rejectRecommend({
|
|
|
models: rejectRow
|
|
|
}).then(res => {
|
|
@@ -520,7 +534,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
initOption(optionalMajors) {
|
|
|
- console.log(optionalMajors)
|
|
|
this.optionalMajors = optionalMajors
|
|
|
}
|
|
|
}
|