Explorar el Código

elective detail - accumulate query & sub-title display

hare8999@163.com hace 2 años
padre
commit
5a55e63f76

+ 1 - 1
src/views/elective/generation/components/elective-generation-table.vue

@@ -75,7 +75,7 @@ export default {
         const prefix = 'accumulate_'
         const ext = {
           roundId: this.chartBinding.generation.status.roundId,
-          generation: -1, // for detail page special display,
+          generation: this.chartBinding.generation.active, // for detail page special display,
           queryableCategories: [], // 本代支持查询的列
           ignoreGroupCategories: [], // 本代支持查询,且与组合无关的列
           isAccumulate: true

+ 4 - 3
src/views/elective/generation/detail.vue

@@ -106,9 +106,10 @@ export default {
       return Object.values(this.options).find(opt => opt.value == this.prevData.activeGeneration)
     },
     subTitle() {
-      if (this.prevData.isAccumulate) return ''
       const hideGenerations = [this.options.init, this.options.terminate]
-      return hideGenerations.includes(this.activeOpt) ? '' : this.activeOpt?.title || ''
+      let generationDesc = hideGenerations.includes(this.activeOpt) ? '' : this.activeOpt?.title || ''
+      if (this.prevData.isAccumulate && generationDesc) generationDesc = this.options.primary.title + ' 至 ' + generationDesc
+      return generationDesc
     },
     localData() {
       this.queryParams.generation = this.prevData.queryGeneration
@@ -131,7 +132,7 @@ export default {
         index: { label: '序号', slot: 'pagedIndex' },
         className: { label: '班级' },
         studentName: { label: '姓名', slot: 'studentName' },
-        userName: {label: '账号'}
+        userName: { label: '账号' }
       }
       if (!ignoreGroups) {
         columns.groupName = { label: queryCategory.detailName || '组合' }