2023-07-13 13:06:09 +09:00
6 changed files with 3301 additions and 1760 deletions

View File

@@ -1,18 +1,20 @@
<template>
<div class="q-pa-md">
<q-uploader
:on-finish="uploadFinished"
style="max-width: 400px"
:url="uploadUrl"
:label="title"
accept=".csv,.xlsx"
v-on:rejected="onRejected"
v-on:finish="onUploadFinish"
v-on:finish="uploadFinished"
field-name="file"
></q-uploader>
</div>
</template>
<script setup lang="ts">
import { useQuasar } from 'quasar';
import { createUploaderComponent, useQuasar } from 'quasar';
const $q=useQuasar();
@@ -36,27 +38,25 @@
$q.notify({
type: 'negative',
message: `CSVおよびExcelファイルを選択してください。`
});
})
}
function onUploadFinish(){
$q.notify({
message:"ファイルアップロードしました!",
caption:"通知",
type:"positive"
})
function uploadFinished(){
$q.notify({
type: 'info',
caption:"通知",
message: 'ファイルの読込が完了しました。'
})
}
interface Props {
title: string;
uploadUrl:string;
}
const props = withDefaults(defineProps<Props>(), {
title:"設計書から導入する(csv or excel)",
uploadUrl:process.env.KAB_BACKEND_URL
});
interface Props {
title: string;
uploadUrl:string;
}
const props = withDefaults(defineProps<Props>(), {
title:"設計書から導入する(csv or excel)",
uploadUrl:process.env.KAB_BACKEND_URL
});
</script>
<style lang="scss">