hrms-mgt/src/modules/02_organizationalNew/components/listView.vue

60 lines
1.6 KiB
Vue
Raw Normal View History

<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";
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
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,
},
];
nodeTree.value = data;
}
onMounted(() => {
fetchDataTree();
});
</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" />
<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">
<div class="col-12 row items-center">
<TableView v-model:showData="showData" />
</div>
</div>
</q-card>
</div>
</template>
<style scoped></style>