EtlImportModal.vue Usage Guide
This document provides a complete developer guide for integrating and using the EtlImportModal.vue component within a parent Vue component.
(English)
1. Component Overview
TheEtlImportModal.vue is the primary frontend component for the ETL system. It orchestrates a complete, multi-stage user interface for importing files:
- Stage 1 (Upload & Buffering): The user uploads a file. The component shows real-time progress as the backend parses the file into a temporary “buffer”.
- Stage 2 (Preview & Configure): Once buffering is complete, the modal displays a preview of the imported data and allows the user to configure import options (e.g., the field to use for “upserting”).
- Stage 3 (Commit): After the user confirms, the component shows a final progress bar as the data is committed from the buffer to the production database collection.
2. Component API
Props
These are the properties you must pass to the component.Public Methods
You can call these methods on the component instance using aref.
Events
You can listen for these events emitted by the component.3. Integration Example
Here is a complete example of how to use theEtlImportModal from a parent page (e.g., UsersPage.vue).
Step 1: Import and Register the Component
(Bahasa Indonesia)
1. Gambaran Umum Komponen
EtlImportModal.vue adalah komponen frontend utama untuk sistem ETL. Komponen ini mengatur antarmuka pengguna multi-tahap yang lengkap для mengimpor file:
- Tahap 1 (Upload & Buffering): Pengguna mengunggah file. Komponen menampilkan progres real-time saat backend mem-parsing file ke dalam “buffer” sementara.
- Tahap 2 (Preview & Konfigurasi): Setelah proses buffering selesai, modal menampilkan pratinjau data yang diimpor dan memungkinkan pengguna untuk mengkonfigurasi opsi impor (misalnya, field yang digunakan untuk “upsert”).
- Tahap 3 (Commit): Setelah pengguna mengkonfirmasi, komponen menampilkan progress bar terakhir saat data dipindahkan dari buffer ke koleksi database produksi.
2. API Komponen
Props
Ini adalah properti yang harus Anda teruskan ke komponen.Method Publik
Anda dapat memanggil method ini pada instance komponen menggunakanref.
Event
Anda dapat mendengarkan event yang dipancarkan (emit) oleh komponen ini.3. Contoh Integrasi
Berikut adalah contoh lengkap cara menggunakanEtlImportModal dari halaman induk (misalnya, UsersPage.vue).
Langkah 1: Impor dan Daftarkan Komponen

