|
@@ -22,8 +22,8 @@
|
|
|
<!--<el-link type="primary" icon="el-icon-video-play" underline @click="helpVideo.visible=true">介绍视频</el-link>-->
|
|
|
<!--、-->
|
|
|
咨询客服或拨打电话4001797985
|
|
|
- <div v-if="reportVisible" class="mt15">
|
|
|
- <el-button type="primary" @click="$router.push({name: 'ElectiveReportIndex'})">查看报告</el-button>
|
|
|
+ <div v-if="true" class="mt15">
|
|
|
+ <el-button :type="reportVisible?'primary':'info'" @click="goReportDemo">查看选科整体报告</el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -73,6 +73,7 @@ import {
|
|
|
getStudentElectiveModels,
|
|
|
getStudentSelected
|
|
|
} from '@/api/webApi/elective/selected-subject'
|
|
|
+import {classesResult} from "@/api/webApi/elective/dispatch";
|
|
|
|
|
|
export default {
|
|
|
mixins: [TransferMixin, ElectiveToolsMixin],
|
|
@@ -102,7 +103,9 @@ export default {
|
|
|
selectObj: null,
|
|
|
stepOptions: config.electiveGenerationOptions,
|
|
|
activeStep: '',
|
|
|
- generationModels: []
|
|
|
+ generationModels: [],
|
|
|
+ //
|
|
|
+ dispatchInfo: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -111,7 +114,8 @@ export default {
|
|
|
},
|
|
|
reportVisible() {
|
|
|
// TODO: 这里需要确认一下,选科结束后虽然能看到大部分报告内容,但可能是缺少签名与分班信息
|
|
|
- return this.electiveVisible && this.selectObj.currentGeneration >= this.stepOptions.terminate
|
|
|
+ return this.electiveVisible && this.dispatchInfo?.statusText == '分班完成' &&
|
|
|
+ this.selectObj.currentGeneration >= this.stepOptions.terminate.value
|
|
|
},
|
|
|
emptyTitle() {
|
|
|
if (!this.activeOpt) return
|
|
@@ -184,6 +188,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadDispatchInfo() {
|
|
|
+ const { year, roundId } = this.generation.status
|
|
|
+ classesResult({ year, roundId }).then(res => this.dispatchInfo = res.rows.first())
|
|
|
+ },
|
|
|
refreshData() {
|
|
|
try {
|
|
|
this.loading = true
|
|
@@ -222,10 +230,15 @@ export default {
|
|
|
this.loadStudentElectiveModels()
|
|
|
this.getOptionalMajors()
|
|
|
this.getRecommendMajor()
|
|
|
+ this.loadDispatchInfo()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
goReportDemo() {
|
|
|
+ if (!this.reportVisible) {
|
|
|
+ this.$message.error('需要选科结束且完成分班后才可能查看整体报告')
|
|
|
+ return
|
|
|
+ }
|
|
|
const path = '/elective/report/index'
|
|
|
this.transferTo(path)
|
|
|
},
|