|
@@ -5,7 +5,11 @@
|
|
|
<mx-condition :query-params="queryParams" :require-fields="requireFields" :local-data="localData"
|
|
|
@query="handleQuery"></mx-condition>
|
|
|
</el-card>
|
|
|
- <mx-table :rows="detailTable.rows" :prop-defines="detailTable.columns" border class="mt20 elective-flow-table">
|
|
|
+ <div v-if="enableOutput" class="text-right mt20">
|
|
|
+ <el-button type="primary" icon="el-icon-printer" @click="exportExcel">导出</el-button>
|
|
|
+ </div>
|
|
|
+ <mx-table :rows="detailTable.rows" :prop-defines="detailTable.columns" border
|
|
|
+ id="output-table" class="mt20 elective-flow-table">
|
|
|
<template #pagedIndex="{$index}">
|
|
|
{{ (queryParams.pageNum - 1) * queryParams.pageSize + $index + 1 }}
|
|
|
</template>
|
|
@@ -49,6 +53,7 @@
|
|
|
</template>
|
|
|
</mx-table>
|
|
|
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
+ :page-sizes="pageSizes"
|
|
|
@pagination="loadGenerationDetails"></pagination>
|
|
|
<el-dialog title="选科流程明细" v-if="logVisible" :visible.sync="logVisible" :width="logDialogWidth">
|
|
|
<elective-generation-flow-log :groups="prevData.groups" :histories="logRow.histories"
|
|
@@ -80,6 +85,7 @@ import ElectiveFlowRankDescriptor from '@/views/elective/generation/components/e
|
|
|
import { getStudentElectiveModels } from '@/api/webApi/elective/selected-subject'
|
|
|
import ElectiveAiTable from '@/views/elective/select/components/elective-ai-table'
|
|
|
import EventBus from '@/components/EventBus'
|
|
|
+import ExportExcelMixin from '@/components/table-to-excel-mixin'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -89,7 +95,7 @@ export default {
|
|
|
ElectiveGenerationFlowLog,
|
|
|
MxCondition
|
|
|
},
|
|
|
- mixins: [transferMixin, groupTranslateMixin, ElectiveColorMap, ElectiveToolsMixin],
|
|
|
+ mixins: [transferMixin, groupTranslateMixin, ElectiveColorMap, ElectiveToolsMixin, ExportExcelMixin],
|
|
|
name: 'generation-detail',
|
|
|
computed: {
|
|
|
...mapGetters(['school']),
|
|
@@ -170,6 +176,13 @@ export default {
|
|
|
const expectedWidth = (this.prevData.groups.length + 3) * 160 // 假定elective-generation-flow-log 单格宽160
|
|
|
const finalWidth = Math.min(expectedWidth, window.innerWidth * 0.8)
|
|
|
return finalWidth + 'px'
|
|
|
+ },
|
|
|
+ enableOutput() {
|
|
|
+ // noinspection JSIncompatibleTypesComparison
|
|
|
+ return this.$route.query?.output == 1
|
|
|
+ },
|
|
|
+ pageSizes() {
|
|
|
+ return this.enableOutput ? [20, 50, 100, 200, 500, 9999] : undefined
|
|
|
}
|
|
|
},
|
|
|
data() {
|