|
@@ -22,6 +22,13 @@
|
|
|
:show-search-button="false"
|
|
:show-search-button="false"
|
|
|
:show-expand-button="false"
|
|
:show-expand-button="false"
|
|
|
:show-reload-button="false">
|
|
:show-reload-button="false">
|
|
|
|
|
+ <template #toolbar>
|
|
|
|
|
+ <q-btn color="primary"
|
|
|
|
|
+ :loading="exportReportLoading"
|
|
|
|
|
+ @click="getReportExcel">
|
|
|
|
|
+ خروجی اکسل
|
|
|
|
|
+ </q-btn>
|
|
|
|
|
+ </template>
|
|
|
<template #entity-index-table-cell="{inputData}">
|
|
<template #entity-index-table-cell="{inputData}">
|
|
|
<template v-if="inputData.col.name === 'number'">
|
|
<template v-if="inputData.col.name === 'number'">
|
|
|
{{ inputData.rowNumber }}
|
|
{{ inputData.rowNumber }}
|
|
@@ -63,6 +70,7 @@ import BtnControl from 'src/components/Control/btn.vue'
|
|
|
import { Registration } from 'src/models/Registration.js'
|
|
import { Registration } from 'src/models/Registration.js'
|
|
|
import Breadcrumbs from 'src/components/Widgets/Breadcrumbs/Breadcrumbs.vue'
|
|
import Breadcrumbs from 'src/components/Widgets/Breadcrumbs/Breadcrumbs.vue'
|
|
|
import { SessionAttendanceSheets } from 'src/models/SessionAttendanceSheets.js'
|
|
import { SessionAttendanceSheets } from 'src/models/SessionAttendanceSheets.js'
|
|
|
|
|
+import Assist from 'assets/js/Assist'
|
|
|
|
|
|
|
|
const BtnControlComp = shallowRef(BtnControl)
|
|
const BtnControlComp = shallowRef(BtnControl)
|
|
|
|
|
|
|
@@ -141,6 +149,7 @@ export default {
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
mounted: false,
|
|
mounted: false,
|
|
|
|
|
+ exportReportLoading: false,
|
|
|
createRouteName: ''
|
|
createRouteName: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -177,6 +186,22 @@ export default {
|
|
|
search () {
|
|
search () {
|
|
|
this.$refs.entityIndex.search()
|
|
this.$refs.entityIndex.search()
|
|
|
},
|
|
},
|
|
|
|
|
+ getReportExcel () {
|
|
|
|
|
+ this.exportReportLoading = true
|
|
|
|
|
+ const status = FormBuilderAssist.getInputsByName(this.inputs, 'registration__status').value ? FormBuilderAssist.getInputsByName(this.inputs, 'registration__status').value : null
|
|
|
|
|
+ APIGateway.sessionAttendanceSheets.exportReport({
|
|
|
|
|
+ session: this.$route.params.session_id,
|
|
|
|
|
+ type: 'list',
|
|
|
|
|
+ registration__status: status
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((xlsxData) => {
|
|
|
|
|
+ Assist.saveXlsx(xlsxData, this.classroom.title)
|
|
|
|
|
+ this.exportReportLoading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((e) => {
|
|
|
|
|
+ this.exportReportLoading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
setActionBtn () {
|
|
setActionBtn () {
|
|
|
FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.search)
|
|
FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.search)
|
|
|
},
|
|
},
|