2024-01-26 09:19:55 +07:00
|
|
|
<script setup lang="ts">
|
2024-01-26 11:18:47 +07:00
|
|
|
import { ref, onMounted } from "vue";
|
2024-01-26 17:19:42 +07:00
|
|
|
|
|
|
|
|
/** importType*/
|
|
|
|
|
import type { DataActive } from "@/modules/02_organizationalNew/interface/response/organizational";
|
|
|
|
|
|
2024-01-26 09:19:55 +07:00
|
|
|
import TreeView from "@/modules/02_organizationalNew/components/mainTree.vue";
|
|
|
|
|
import TableView from "@/modules/02_organizationalNew/components/tableTree.vue";
|
2024-01-26 11:18:47 +07:00
|
|
|
|
2024-01-26 09:54:20 +07:00
|
|
|
const showData = ref<boolean>(false);
|
2024-01-26 11:18:47 +07:00
|
|
|
const nodeTree = ref<any>();
|
|
|
|
|
|
2024-01-26 17:19:42 +07:00
|
|
|
// defineProps<{ dataActive: DataActive }>();
|
|
|
|
|
|
2024-01-26 11:18:47 +07:00
|
|
|
async function fetchDataTree() {
|
|
|
|
|
const data = [
|
|
|
|
|
{
|
|
|
|
|
organizationName: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร",
|
|
|
|
|
organizationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx01",
|
|
|
|
|
organizationLevel: 0,
|
|
|
|
|
lazy: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
organizationName: "สำนักปลัดกรุงเทพมหานคร",
|
|
|
|
|
organizationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx02",
|
|
|
|
|
organizationLevel: 0,
|
|
|
|
|
lazy: true,
|
|
|
|
|
},
|
|
|
|
|
];
|
2024-01-29 17:38:49 +07:00
|
|
|
|
|
|
|
|
// const data = [
|
|
|
|
|
// {
|
|
|
|
|
// orgRootId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgLevel: 0,
|
|
|
|
|
// orgRootName: "ปลัดกรุงเทพ",
|
|
|
|
|
// orgRootShortName: "ก.น.",
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// orgCode: "0400",
|
|
|
|
|
// orgRootOrder: 1,
|
|
|
|
|
// orgRootPhoneEx: "0849562355",
|
|
|
|
|
// orgRootPhoneIn: "0845124512",
|
|
|
|
|
// orgRootFax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgChild1: [
|
|
|
|
|
// {
|
|
|
|
|
// orgChild1Id: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgLevel: 1,
|
|
|
|
|
// orgChild1Name: "ปลัดกรุงเทพ",
|
|
|
|
|
// orgChild1ShortName: "ก.น.",
|
|
|
|
|
// orgChild1Code: "01",
|
|
|
|
|
// orgCode: "0401",
|
|
|
|
|
// orgChild1Order: 1,
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// orgChild1PhoneEx: "0849562355",
|
|
|
|
|
// orgChild1PhoneIn: "0845124512",
|
|
|
|
|
// orgChild1Fax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgChild2: [
|
|
|
|
|
// {
|
|
|
|
|
// orgChild2Id: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgLevel: 2,
|
|
|
|
|
// orgChild2Name: "ปลัดกรุงเทพ",
|
|
|
|
|
// orgChild2ShortName: "ก.น.",
|
|
|
|
|
// orgChild2Code: "01",
|
|
|
|
|
// orgCode: "0401",
|
|
|
|
|
// orgChild2Order: 1,
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// orgChild2PhoneEx: "0849562355",
|
|
|
|
|
// orgChild2PhoneIn: "0845124512",
|
|
|
|
|
// orgChild2Fax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgChild3: [
|
|
|
|
|
// {
|
|
|
|
|
// orgChild3Id: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgLevel: 3,
|
|
|
|
|
// orgChild3Name: "ปลัดกรุงเทพ",
|
|
|
|
|
// orgChild3ShortName: "ก.น.",
|
|
|
|
|
// orgChild3Code: "01",
|
|
|
|
|
// orgCode: "0401",
|
|
|
|
|
// orgChild3Order: 1,
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// orgChild3PhoneEx: "0849562355",
|
|
|
|
|
// orgChild3PhoneIn: "0845124512",
|
|
|
|
|
// orgChild3Fax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// lazy: true,
|
|
|
|
|
// orgChild4: [
|
|
|
|
|
// {
|
|
|
|
|
// orgChild4Id: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgLevel: 4,
|
|
|
|
|
// orgChild4Name: "ปลัดกรุงเทพ",
|
|
|
|
|
// orgChild4ShortName: "ก.น.",
|
|
|
|
|
// orgChild4Code: "01",
|
|
|
|
|
// orgCode: "0401",
|
|
|
|
|
// orgChild4Order: 1,
|
|
|
|
|
// orgChild4PhoneEx: "0849562355",
|
|
|
|
|
// orgChild4PhoneIn: "0845124512",
|
|
|
|
|
// orgChild4Fax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// lazy: true,
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
// orgRootId: "00000000-0000-0000-0000-000000000001",
|
|
|
|
|
// orgLevel: 0,
|
|
|
|
|
// orgRootName: "ปลัดกรุงเทพ2",
|
|
|
|
|
// orgRootShortName: "ก.น.",
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// orgCode: "0400",
|
|
|
|
|
// orgRootOrder: 1,
|
|
|
|
|
// orgRootPhoneEx: "0849562355",
|
|
|
|
|
// orgRootPhoneIn: "0845124512",
|
|
|
|
|
// orgRootFax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgChild1: [
|
|
|
|
|
// {
|
|
|
|
|
// orgChild1Id: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgLevel: 1,
|
|
|
|
|
// orgChild1Name: "ปลัดกรุงเทพ2",
|
|
|
|
|
// orgChild1ShortName: "ก.น.",
|
|
|
|
|
// orgChild1Code: "01",
|
|
|
|
|
// orgCode: "0401",
|
|
|
|
|
// orgChild1Order: 1,
|
|
|
|
|
// orgRootCode: "04",
|
|
|
|
|
// orgChild1PhoneEx: "0849562355",
|
|
|
|
|
// orgChild1PhoneIn: "0845124512",
|
|
|
|
|
// orgChild1Fax: "021576452",
|
|
|
|
|
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
// orgChild2: [],
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-26 11:18:47 +07:00
|
|
|
nodeTree.value = data;
|
2024-01-29 17:38:49 +07:00
|
|
|
console.log(nodeTree.value);
|
2024-01-26 11:18:47 +07:00
|
|
|
}
|
|
|
|
|
|
2024-01-29 17:38:49 +07:00
|
|
|
|
|
|
|
|
|
2024-01-26 11:18:47 +07:00
|
|
|
onMounted(() => {
|
|
|
|
|
fetchDataTree();
|
|
|
|
|
});
|
2024-01-26 09:19:55 +07:00
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-card bordered class="col-12 row caedNone">
|
|
|
|
|
<div class="col-xs-12 col-sm-3 row">
|
|
|
|
|
<div class="col-12 row no-wrap bg-grey-1">
|
2024-01-26 11:18:47 +07:00
|
|
|
<TreeView v-model:nodeTree="nodeTree" />
|
2024-01-26 09:19:55 +07:00
|
|
|
|
|
|
|
|
<div class="col-12 row">
|
|
|
|
|
<q-separator :vertical="!$q.screen.lt.md" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-xs-12 col-sm-9 q-pa-md">
|
2024-01-26 09:54:20 +07:00
|
|
|
<div class="col-12 row items-center">
|
|
|
|
|
<TableView v-model:showData="showData" />
|
|
|
|
|
</div>
|
2024-01-26 09:19:55 +07:00
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped></style>
|