Forráskód Böngészése

student class elective query

hare8999@163.com 2 éve
szülő
commit
73b7dc960e

+ 3 - 0
src/common/mx-config.js

@@ -95,6 +95,7 @@ export default {
       decisionMaking: false,
       stepsVisible: true,
       title: '初录报名',
+      enrollName: '初录录取',
       description: '',
       icon: ''
     },
@@ -116,6 +117,7 @@ export default {
       decisionMaking: false,
       stepsVisible: true,
       title: '补录报名',
+      enrollName: '补录录取',
       description: '',
       icon: ''
     },
@@ -137,6 +139,7 @@ export default {
       decisionMaking: false,
       stepsVisible: true,
       title: '二次补录报名',
+      enrollName: '二次补录录取',
       description: '',
       icon: ''
     },

+ 6 - 1
src/views/elective/generation/components/elective-generation-flow-log.vue

@@ -39,7 +39,12 @@ export default {
       this.groups.forEach(group => {
         const keyPrefix = 'group_'
         const key = keyPrefix + group.groupId
-        columns[key] = { label: group.groupName, minWidth: '160px', slot: 'group-flow', slotHeader: 'group-header' }
+        columns[key] = {
+          label: group.groupName || group.name,
+          minWidth: '160px',
+          slot: 'group-flow',
+          slotHeader: 'group-header'
+        }
         // match major
         const groupMajors = (this.matchedMajors?.marjors
           ?.filter(m => m['matchedGroupIds'].some(id => id == group.groupId)) || [])

+ 44 - 4
src/views/elective/select/release-list.vue

@@ -6,9 +6,24 @@
     </el-card>
     <evaluation-empty v-if="emptyTitle" :title="emptyTitle" class="mt20"></evaluation-empty>
     <template v-else>
-      <el-button circle class="el-icon-refresh mt20 mb10" @click="handleQuery"></el-button>
-      <dynamic-table :columns="tableData.columns" :rows="tableData.rows"></dynamic-table>
+      <div class="fx-row jc-sta ai-cen mt20 mb10">
+        <el-button circle class="el-icon-refresh" @click="handleQuery"></el-button>
+        <div>
+          <span class="ml30">班级人数:{{ studentCount }}人</span>
+          <span class="ml20">已录取:{{ enrolledCount }}人</span>
+          <span class="ml20">未录取:{{ disenrollCount }}人</span>
+        </div>
+      </div>
+      <dynamic-table :columns="tableData.columns" :rows="tableData.rows">
+        <template #history="{row}">
+          <el-button type="text" @click="handleLogView(row)">查看</el-button>
+        </template>
+      </dynamic-table>
     </template>
+    <el-dialog :title="'选科流程明细 - '+logDetail.studentName" v-if="logVisible"
+               :visible.sync="logVisible" :width="logDialogWidth">
+      <elective-generation-flow-log :groups="roundGroups" :histories="logDetail.histories"/>
+    </el-dialog>
   </div>
 </template>
 
@@ -19,10 +34,11 @@ import config from '@/common/mx-config'
 import { mapGetters } from 'vuex'
 import DynamicTable from '@/components/dynamic-table/index'
 import { getClassGenerationDetails } from '@/api/webApi/elective/generation'
+import ElectiveGenerationFlowLog from '@/views/elective/generation/components/elective-generation-flow-log'
 
 export default {
   name: 'ElectiveReleaseList',
-  components: { DynamicTable, MxCondition },
+  components: { ElectiveGenerationFlowLog, DynamicTable, MxCondition },
   data() {
     return {
       loading: false,
@@ -35,7 +51,10 @@ export default {
       requireFields: ['studentRoundId', 'releaseGeneration', 'releaseQueryCode'],
       // status & results
       electiveStatus: null,
-      releaseSummary: null
+      releaseSummary: null,
+      // log
+      logVisible: false,
+      logDetail: null
     }
   },
   computed: {
@@ -66,6 +85,15 @@ export default {
     roundName() {
       return this.$refs.condition.getConditionLabel('studentRoundId', this.queryParams.studentRoundId)
     },
+    studentCount() {
+      return this.releaseSummary?.studentCount || 0
+    },
+    enrolledCount() {
+      return this.releaseSummary?.enrolledCount || 0
+    },
+    disenrollCount() {
+      return this.studentCount - this.enrolledCount
+    },
     tableData() {
       const rows = this.releaseSummary?.details || []
       const columns = [
@@ -94,6 +122,14 @@ export default {
         rows,
         columns
       }
+    },
+    roundGroups() {
+      return this.electiveStatus?.selectResult?.groupList || []
+    },
+    logDialogWidth() {
+      const expectedWidth = (this.roundGroups.length + 3) * 160 // 假定elective-generation-flow-log 单格宽160
+      const finalWidth = Math.min(expectedWidth, window.innerWidth * 0.8)
+      return finalWidth + 'px'
     }
   },
   methods: {
@@ -113,6 +149,10 @@ export default {
     handleInvalid() {
       this.electiveStatus = null
       this.releaseSummary = null
+    },
+    handleLogView(row) {
+      this.logDetail = row
+      this.logVisible = true
     }
   }
 }