|
@@ -2,7 +2,7 @@
|
|
|
<div class="app-container" v-loading="loading">
|
|
|
<el-card>
|
|
|
<mx-condition :query-params="queryParams" :require-fields="requireFields"
|
|
|
- @query="handleQuery" @invalid="handleInvalid"></mx-condition>
|
|
|
+ @query="handleQuery(true)" @invalid="handleInvalid"></mx-condition>
|
|
|
</el-card>
|
|
|
<el-card v-if="electiveStatus" class="mt20">
|
|
|
<template #header>
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
this.electiveStatus = null
|
|
|
this.electiveSummary = []
|
|
|
},
|
|
|
- async handleQuery() {
|
|
|
+ async handleQuery(syncStep) {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
// TODO: remove when test completed
|
|
@@ -122,13 +122,18 @@ export default {
|
|
|
const resSummary = await getElectiveSummary(this.queryParams)
|
|
|
this.electiveStatus = resStatus.data
|
|
|
this.electiveSummary = resSummary.data
|
|
|
+ // reset step
|
|
|
+ if (syncStep) {
|
|
|
+ await this.$nextTick()
|
|
|
+ this.$refs.step.syncStepWithCurrent()
|
|
|
+ }
|
|
|
+
|
|
|
} finally {
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
- async refreshData(syncStep) {
|
|
|
- await this.handleQuery()
|
|
|
- if (syncStep) this.$refs.step.syncStepWithCurrent()
|
|
|
+ refreshData(syncStep) {
|
|
|
+ this.handleQuery(syncStep)
|
|
|
}
|
|
|
}
|
|
|
}
|