jws-frontend/src/pages/05_quotation/MainPage.vue

137 lines
3.2 KiB
Vue
Raw Normal View History

2024-06-19 15:43:58 +07:00
<script lang="ts" setup>
2024-06-26 17:03:39 +07:00
import { ref } from 'vue';
2024-06-19 15:43:58 +07:00
import QuatationForm from './QuatationForm.vue';
2024-08-09 14:02:40 +07:00
import SideMenu from 'components/SideMenu.vue';
import ImageUploadDialog from 'components/ImageUploadDialog.vue';
2024-08-02 16:13:07 +07:00
import { watch } from 'vue';
2024-09-16 10:32:06 +07:00
import TreeView from 'src/components/shared/TreeView.vue';
2024-06-26 17:03:39 +07:00
2024-07-26 10:55:30 +07:00
const isOpen = ref(true);
2024-08-02 16:13:07 +07:00
const imageUploadDialog = ref<InstanceType<typeof ImageUploadDialog>>();
const file = ref<File | null>(null);
2024-09-16 10:32:06 +07:00
const nodes = ref([
{
title: 'กลุ่มสินค้าและบริการที่ 1',
subtitle: 'TG01000000001',
selected: false,
children: [
{
title: 'งานที่ 1',
subtitle: 'TG01000000001',
selected: false,
children: [
{
title: 'สินค้า 1',
subtitle: 'TG01000000001',
selected: false,
},
{
title: 'สินค้า 2',
subtitle: 'TG01000000001',
selected: false,
},
{
title: 'สินค้า 3',
subtitle: 'TG01000000001',
selected: false,
},
{
title: 'สินค้า 4',
subtitle: 'TG01000000001',
selected: false,
},
{
title: 'สินค้า 5',
subtitle: 'TG01000000001',
selected: false,
},
{
title: 'สินค้า 6',
subtitle: 'TG01000000001',
selected: false,
},
],
},
],
},
]);
2024-06-19 15:43:58 +07:00
</script>
<template>
2024-09-16 10:32:06 +07:00
<div class="surface-1 rounded full-height q-pa-md">
<TreeView
v-model:nodes="nodes"
expandable
:decoration="[
{
level: 0,
icon: 'mdi-folder-outline',
bg: 'hsla(var(--pink-6-hsl)/0.1)',
fg: 'var(--pink-6)',
},
{
level: 1,
icon: 'mdi-server-outline',
bg: 'hsla(var(--orange-5-hsl)/0.1)',
fg: 'var(--orange-5)',
},
{
level: 2,
icon: 'mdi-shopping-outline',
bg: 'hsla(var(--teal-10-hsl)/0.1)',
fg: 'var(--teal-10)',
},
]"
/>
</div>
<!-- <ImageUploadDialog
2024-08-02 16:13:07 +07:00
v-model:dialog-state="isOpen"
v-model:file="file"
ref="imageUploadDialog"
clear-button
>
<template #error>
<div style="display: flex; align-items: center; justify-content: center">
<h1>Fallback</h1>
</div>
</template>
</ImageUploadDialog>
<button @click="isOpen = !isOpen">Open</button>
<button @click="imageUploadDialog?.browse()">Click Me</button>
<div
style="
height: 100vh;
background: green;
width: 100%;
color: white;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
"
id="aaa"
>
My AAA
</div>
<div
style="
height: 100vh;
background: red;
width: 100%;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
"
id="my-anchor"
>
My Menu
</div>
2024-09-16 10:32:06 +07:00
<QuatationForm v-model:dialog-state="isOpen" /> -->
2024-06-19 15:43:58 +07:00
</template>
<style scoped></style>