|
@@ -157,6 +157,18 @@
|
|
|
:to="{name: 'Admin.Unit.TranscriptSheetHistory.Create', params: {unit_id: $route.params.id}}" />
|
|
:to="{name: 'Admin.Unit.TranscriptSheetHistory.Create', params: {unit_id: $route.params.id}}" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template #after-index-table>
|
|
|
|
|
+ <q-separator class="q-my-lg" />
|
|
|
|
|
+ <entity-edit ref="uploadExcelEntity"
|
|
|
|
|
+ v-model:value="uploadInputs"
|
|
|
|
|
+ title="ارسال لیست نمرات"
|
|
|
|
|
+ :loaded-data="{}"
|
|
|
|
|
+ :api="uploadAPI"
|
|
|
|
|
+ :show-reload-button="false"
|
|
|
|
|
+ :show-expand-button="false"
|
|
|
|
|
+ :show-save-button="false"
|
|
|
|
|
+ :show-close-button="false" />
|
|
|
|
|
+ </template>
|
|
|
<template #entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
|
|
<template #entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
|
|
|
<template v-if="inputData.col.name === 'actions'">
|
|
<template v-if="inputData.col.name === 'actions'">
|
|
|
<div class="q-gutter-md">
|
|
<div class="q-gutter-md">
|
|
@@ -188,10 +200,14 @@ import DeleteBtn from 'src/components/Control/DeleteBtn.vue'
|
|
|
import { UnitCategoryList } from 'src/models/UnitCategory.js'
|
|
import { UnitCategoryList } from 'src/models/UnitCategory.js'
|
|
|
import PostRequisites from 'src/components/Control/PostRequisites.vue'
|
|
import PostRequisites from 'src/components/Control/PostRequisites.vue'
|
|
|
import FormBuilderInputEditor from 'src/components/FormBuilderCustumComponents/FormBuilderInputEditor.vue'
|
|
import FormBuilderInputEditor from 'src/components/FormBuilderCustumComponents/FormBuilderInputEditor.vue'
|
|
|
|
|
+import { FormBuilderAssist } from 'quasar-form-builder'
|
|
|
|
|
+import BtnControl from 'src/components/Control/btn.vue'
|
|
|
|
|
|
|
|
const PostRequisitesComp = shallowRef(PostRequisites)
|
|
const PostRequisitesComp = shallowRef(PostRequisites)
|
|
|
const FormBuilderInputEditorComp = shallowRef(FormBuilderInputEditor)
|
|
const FormBuilderInputEditorComp = shallowRef(FormBuilderInputEditor)
|
|
|
|
|
|
|
|
|
|
+const BtnControlComp = shallowRef(BtnControl)
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
name: 'Admin.Category.Index',
|
|
name: 'Admin.Category.Index',
|
|
|
components: {
|
|
components: {
|
|
@@ -219,6 +235,13 @@ export default {
|
|
|
{ type: 'hidden', name: 'category', responseKey: 'category_info.id' }
|
|
{ type: 'hidden', name: 'category', responseKey: 'category_info.id' }
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
|
|
+ uploadInputs: [
|
|
|
|
|
+ { type: 'hidden', name: 'type', value: 'excel' },
|
|
|
|
|
+ { type: 'file', name: 'file', label: 'انتخاب فایل', placeholder: ' ', value: null, col: 'col-md-8 col-12' },
|
|
|
|
|
+ { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'ارسال', placeholder: ' ', atClick: () => {}, col: 'col-md-4 col-12' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ uploadAPI: APIGateway.transcriptSheetHistory.APIAdresses.importList,
|
|
|
|
|
+
|
|
|
categories: new UnitCategoryList(),
|
|
categories: new UnitCategoryList(),
|
|
|
units: new UnitCategoryList(),
|
|
units: new UnitCategoryList(),
|
|
|
prerequisite: {
|
|
prerequisite: {
|
|
@@ -399,6 +422,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
// this.getCategories()
|
|
// this.getCategories()
|
|
|
|
|
+ this.setActionBtn()
|
|
|
this.mounted = true
|
|
this.mounted = true
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -446,6 +470,21 @@ export default {
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
this.newSessionLoading = false
|
|
this.newSessionLoading = false
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ setActionBtn () {
|
|
|
|
|
+ FormBuilderAssist.setAttributeByName(this.uploadInputs, 'btn', 'atClick', this.uploadExcelEntity)
|
|
|
|
|
+ },
|
|
|
|
|
+ search () {
|
|
|
|
|
+ this.$refs.entityIndex.search()
|
|
|
|
|
+ },
|
|
|
|
|
+ uploadExcelEntity () {
|
|
|
|
|
+ this.$refs.uploadExcelEntity.editEntity(false)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.search()
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ this.search()
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|