|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-container" v-loading="loading">
|
|
|
<el-card>
|
|
|
- <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
|
|
|
+ <mx-condition :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
|
|
|
@invalid="handleInvalid" label-width="80px"></mx-condition>
|
|
|
</el-card>
|
|
|
<evaluation-empty v-if="emptyTitle" :title="emptyTitle" class="mt20"></evaluation-empty>
|
|
@@ -44,11 +44,12 @@ export default {
|
|
|
loading: false,
|
|
|
// query params
|
|
|
queryParams: {
|
|
|
- studentRoundId: '',
|
|
|
+ year: '',
|
|
|
+ roundId: '',
|
|
|
releaseGeneration: '',
|
|
|
releaseQueryCode: ''
|
|
|
},
|
|
|
- requireFields: ['studentRoundId', 'releaseGeneration', 'releaseQueryCode'],
|
|
|
+ requireFields: ['year', 'roundId', 'releaseGeneration', 'releaseQueryCode'],
|
|
|
// status & results
|
|
|
electiveStatus: null,
|
|
|
releaseSummary: null,
|
|
@@ -61,8 +62,8 @@ export default {
|
|
|
...mapGetters(['currentUser']),
|
|
|
mappedParams() {
|
|
|
return {
|
|
|
- year: this.currentUser.year,
|
|
|
- roundId: this.queryParams.studentRoundId,
|
|
|
+ year: this.queryParams.year,
|
|
|
+ roundId: this.queryParams.roundId,
|
|
|
generation: this.queryParams.releaseGeneration,
|
|
|
queryCode: this.queryParams.releaseQueryCode
|
|
|
}
|
|
@@ -83,7 +84,7 @@ export default {
|
|
|
return ''
|
|
|
},
|
|
|
roundName() {
|
|
|
- return this.$refs.condition.getConditionLabel('studentRoundId', this.queryParams.studentRoundId)
|
|
|
+ return this.electiveStatus?.selectResult?.name || ''
|
|
|
},
|
|
|
studentCount() {
|
|
|
return this.releaseSummary?.studentCount || 0
|
|
@@ -136,7 +137,7 @@ export default {
|
|
|
async handleQuery() {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
- if (this.queryParams.studentRoundId != this.electiveStatus?.selectResult?.roundId) {
|
|
|
+ if (this.queryParams.roundId != this.electiveStatus?.selectResult?.roundId) {
|
|
|
const resStatus = await getStudentSelected(this.mappedParams)
|
|
|
this.electiveStatus = resStatus.data
|
|
|
}
|