mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.6 KiB
69 lines
1.6 KiB
<template>
|
|
<div>
|
|
<action-menu
|
|
:items="menuItems"
|
|
:text="$t('dataset.actions')"
|
|
@upload="importDialog=true"
|
|
@download="exportDialog=true"
|
|
/>
|
|
<v-dialog
|
|
v-model="importDialog"
|
|
width="800"
|
|
>
|
|
<document-upload-form
|
|
:upload-document="uploadDocument"
|
|
:formats="getImportFormat"
|
|
@close="importDialog=false"
|
|
/>
|
|
</v-dialog>
|
|
<v-dialog
|
|
v-model="exportDialog"
|
|
width="800"
|
|
>
|
|
<document-export-form
|
|
:export-document="exportDocument"
|
|
:formats="getExportFormat"
|
|
@close="exportDialog=false"
|
|
/>
|
|
</v-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
import ActionMenu from '@/components/molecules/ActionMenu'
|
|
import DocumentUploadForm from '@/components/organisms/documents/DocumentUploadForm'
|
|
import DocumentExportForm from '@/components/organisms/documents/DocumentExportForm'
|
|
|
|
export default {
|
|
components: {
|
|
ActionMenu,
|
|
DocumentUploadForm,
|
|
DocumentExportForm
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
importDialog: false,
|
|
exportDialog: false,
|
|
menuItems: [
|
|
{ title: this.$t('dataset.importDataset'), icon: 'mdi-upload', event: 'upload' },
|
|
{ title: this.$t('dataset.exportDataset'), icon: 'mdi-download', event: 'download' }
|
|
]
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
...mapGetters('projects', ['getImportFormat', 'getExportFormat'])
|
|
},
|
|
|
|
created() {
|
|
this.setCurrentProject(this.$route.params.id)
|
|
},
|
|
|
|
methods: {
|
|
...mapActions('documents', ['uploadDocument', 'exportDocument']),
|
|
...mapActions('projects', ['setCurrentProject'])
|
|
}
|
|
}
|
|
</script>
|