first commit
This commit is contained in:
commit
6e3c1a90f7
31 changed files with 14083 additions and 0 deletions
16
src/App.vue
Normal file
16
src/App.vue
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
// import { RouterLink, RouterView } from "vue-router";
|
||||
// import HelloWorld from "./components/HelloWorld.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="azay-admin-app">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition>
|
||||
<component :is="Component" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
BIN
src/assets/1.png
Normal file
BIN
src/assets/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
BIN
src/assets/avatar_user.jpg
Normal file
BIN
src/assets/avatar_user.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
src/assets/logo.png
Normal file
BIN
src/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
186
src/components/Table.vue
Normal file
186
src/components/Table.vue
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
<template>
|
||||
<div class="q-pb-sm row">
|
||||
<div>
|
||||
<q-btn
|
||||
size="14px"
|
||||
flat
|
||||
dense
|
||||
color="blue"
|
||||
@click="add"
|
||||
icon="mdi-plus"
|
||||
>
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="items-center q-gutter-sm" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
:model-value="inputfilter"
|
||||
ref="filterRef"
|
||||
@update:model-value="updateInput"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="inputfilter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="inputfilter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
:model-value="inputvisible"
|
||||
@update:model-value="updateVisible"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
:options="attrs.columns"
|
||||
options-dense
|
||||
option-value="name"
|
||||
map-options
|
||||
emit-value
|
||||
style="min-width: 150px"
|
||||
class="gt-xs"
|
||||
>
|
||||
<template> </template>
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<q-table
|
||||
ref="table"
|
||||
flat
|
||||
bordered
|
||||
class="custom-table2"
|
||||
v-bind="attrs"
|
||||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
dense
|
||||
:pagination-label="paginationLabel"
|
||||
:pagination="initialPagination"
|
||||
:rows-per-page-options="[0]"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium" v-html="col.label" />
|
||||
</q-th>
|
||||
<q-th auto-width v-if="inputShow" />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<slot v-bind="props" name="columns"></slot>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, useAttrs } from "vue";
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const table = ref<any>(null);
|
||||
const filterRef = ref<any>(null);
|
||||
const initialPagination = ref({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
count: Number,
|
||||
pass: Number,
|
||||
notpass: Number,
|
||||
|
||||
inputfilter: String,
|
||||
name: String,
|
||||
icon: String,
|
||||
inputvisible: Array,
|
||||
editvisible: Boolean,
|
||||
|
||||
inputShow: Boolean,
|
||||
|
||||
add: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
"update:inputfilter",
|
||||
"update:inputvisible",
|
||||
"update:editvisible",
|
||||
]);
|
||||
const updateInput = (value: string | number | null) => {
|
||||
emit("update:inputfilter", value);
|
||||
};
|
||||
const updateVisible = (value: []) => {
|
||||
emit("update:inputvisible", value);
|
||||
};
|
||||
|
||||
const paginationLabel = (start: string, end: string, total: string) => {
|
||||
return start + "-" + end + " ใน " + total;
|
||||
};
|
||||
|
||||
const resetFilter = () => {
|
||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||
emit("update:inputfilter", "");
|
||||
filterRef.value.focus();
|
||||
};
|
||||
|
||||
const add = () => {
|
||||
props.add();
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.icon-color {
|
||||
color: #4154b3;
|
||||
}
|
||||
|
||||
.custom-table2 {
|
||||
max-height: 64vh;
|
||||
|
||||
.q-table tr:nth-child(odd) td {
|
||||
background: white;
|
||||
}
|
||||
|
||||
.q-table tr:nth-child(even) td {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.q-table thead tr {
|
||||
background: #ecebeb;
|
||||
}
|
||||
|
||||
.q-table thead tr th {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.q-table td:nth-of-type(2) {
|
||||
z-index: 3 !important;
|
||||
}
|
||||
|
||||
.q-table th:nth-of-type(2),
|
||||
.q-table td:nth-of-type(2) {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* this will be the loading indicator */
|
||||
.q-table thead tr:last-child th {
|
||||
/* height of all previous header rows */
|
||||
top: 48px;
|
||||
}
|
||||
|
||||
.q-table thead tr:first-child th {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
32
src/main.ts
Normal file
32
src/main.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { createApp, defineAsyncComponent } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import { Dialog, Notify, Quasar } from "quasar";
|
||||
import th from "quasar/lang/th";
|
||||
import quasarUserOptions from "./quasar-user-options"
|
||||
import { createPinia } from "pinia";
|
||||
import "@vuepic/vue-datepicker/dist/main.css";
|
||||
|
||||
import 'quasar/src/css/index.sass'
|
||||
|
||||
// import './assets/main.css'
|
||||
|
||||
const app = createApp(App);
|
||||
const pinia = createPinia();
|
||||
|
||||
app.use(router);
|
||||
|
||||
app.use(Quasar, {
|
||||
plugins: {
|
||||
Notify,
|
||||
Dialog
|
||||
},
|
||||
lang: th,
|
||||
}
|
||||
);
|
||||
|
||||
app.component(
|
||||
"datepicker",
|
||||
defineAsyncComponent(() => import("@vuepic/vue-datepicker"))
|
||||
);
|
||||
app.mount('#app');
|
||||
110
src/modules/01_metadata/views/Main.vue
Normal file
110
src/modules/01_metadata/views/Main.vue
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<script setup lang="ts">
|
||||
</script>
|
||||
<template>
|
||||
<div class="q-px-md q-py-sm text-subtitle1 text-white bg-primary text-weight-medium">
|
||||
ข้อมูลหลัก
|
||||
</div>
|
||||
|
||||
<div class="q-pa-md col-12">
|
||||
<div class="text-weight-medium">วัตถุประสงค์ของการพัฒนา
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<li>
|
||||
ระบบที่มีวัตถุประสงค์เพื่อจัดการข้อมูลทรัพยากรบุคคล ช่วยให้สามารถจัดเก็บข้อมูลของพนักงานทั้งหมดได้อย่างมีระบบเกี่ยวข้องกับข้อมูลเกี่ยวกับบุคคล, ข้อมูลโครงสร้างหน่วยงาน ข้อมูลข้าราชการ ข้อมูลลูกจ้าง วันลา และข้อมูลอื่นๆ ที่เกี่ยวข้องกับการจัดการทรัพยากรบุคคล
|
||||
</li>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="q-pa-md col-12" style="padding-top: 0px;">
|
||||
<div class="text-weight-medium">ขอบเขตการดูแลระบบ
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<li>
|
||||
เจ้าหน้าที่ทรัพยากรบุคคลต้องรับผิดชอบในการเก็บรวบรวม บันทึก และบริหารจัดการข้อมูลทรัพยากรบุคคลของพนักงานนอกจากนี้พวกเขาต้องรักษา
|
||||
ความถูกต้องและปลอดภัยของข้อมูลทรัพยากรบุคคลและปฏิบัติตามนโยบายความเป็นส่วนตัว
|
||||
</li>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
</div>
|
||||
|
||||
<div class="q-pa-md col-12" style="padding-top: 0px;">
|
||||
<div class="text-weight-medium">รายละเอียดและขั้นตอนการดูแลระบบ
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<div class="col-12">
|
||||
<div class="text-weight-medium">1.) ความปลอดภัยของข้อมูล</div>
|
||||
<ul>
|
||||
<li>
|
||||
มีมาตรการที่เข้มงวดเพื่อรักษาความปลอดภัยของข้อมูลที่เกี่ยวข้องกับทรัพยากรบุคคล รวมถึงการใช้เทคโนโลยีการรักษาความปลอดภัย การให้สิทธิ์การ
|
||||
เข้าถึงข้อมูล, และการป้องกันการใช้ข้อมูลที่ไม่ถูกต้อง
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">2.) การจัดการสิทธิ์การเข้าถึง</div>
|
||||
<ul>
|
||||
<li>
|
||||
กำหนดสิทธิ์การเข้าถึงข้อมูลทรัพยากรบุคคลให้แต่ละบุคคลในองค์กรการควบคุมสิทธิ์จะช่วยลดความเสี่ยงที่เกี่ยวข้องกับการเข้าถึงข้อมูลโดยไม่ได้รับอนุญาต
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">3.) การตรวจสอบและการพัฒนาระบบ</div>
|
||||
<ul>
|
||||
<li>
|
||||
ตรวจสอบและบำรุงรักษาข้อมูลเพื่อให้มั่นใจว่าข้อมูลทรัพยากรบุคคลมีความถูกต้อง,ครบถ้วน และอับเดต ทำการตรวจสอบการป้องกันข้อมูลไม่ถูกส่ง
|
||||
หลายครั้ง และดูแลให้มีการบันทึกข้อมูลทรัพยากรบุคคลตลอดเวลา
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="q-pa-md col-12" style="padding-top: 0px;">
|
||||
<div class="text-weight-medium">คำถามที่พบบ่อย
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<div class="col-12 row">
|
||||
|
||||
<div class="text-weight-medium" style="color: #02A998;">ข้อมูลส่วนบุคคลถูกปกปิดหรือปล่อยไว้หรือไม่?</div>
|
||||
<ul>
|
||||
<li>
|
||||
มีมาตรการที่เข้มงวดเพื่อรักษาความปลอดภัยของข้อมูลที่เกี่ยวข้องกับทรัพยากรบุคคล รวมถึงการใช้เทคโนโลยีการรักษาความปลอดภัย การให้สิทธิ์การ
|
||||
เข้าถึงข้อมูล, และการป้องกันการใช้ข้อมูลที่ไม่ถูกต้อง
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">2.) การจัดการสิทธิ์การเข้าถึง</div>
|
||||
<ul>
|
||||
<li>
|
||||
กำหนดสิทธิ์การเข้าถึงข้อมูลทรัพยากรบุคคลให้แต่ละบุคคลในองค์กรการควบคุมสิทธิ์จะช่วยลดความเสี่ยงที่เกี่ยวข้องกับการเข้าถึงข้อมูลโดยไม่ได้รับอนุญาต
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">3.) การตรวจสอบและการพัฒนาระบบ</div>
|
||||
<ul>
|
||||
<li>
|
||||
ตรวจสอบและบำรุงรักษาข้อมูลเพื่อให้มั่นใจว่าข้อมูลทรัพยากรบุคคลมีความถูกต้อง,ครบถ้วน และอับเดต ทำการตรวจสอบการป้องกันข้อมูลไม่ถูกส่ง
|
||||
หลายครั้ง และดูแลให้มีการบันทึกข้อมูลทรัพยากรบุคคลตลอดเวลา
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.card1{
|
||||
margin-top:15px;
|
||||
background-color:#F8F8F8;
|
||||
border-color: #EDEDED !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
110
src/modules/02_organizational/views/Main.vue
Normal file
110
src/modules/02_organizational/views/Main.vue
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<script setup lang="ts">
|
||||
</script>
|
||||
<template>
|
||||
<div class="q-px-md q-py-sm text-subtitle1 text-white bg-primary text-weight-medium">
|
||||
ข้อมูลหลัก
|
||||
</div>
|
||||
|
||||
<div class="q-pa-md col-12">
|
||||
<div class="text-weight-medium">วัตถุประสงค์ของการพัฒนา
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<li>
|
||||
ระบบที่มีวัตถุประสงค์เพื่อจัดการข้อมูลทรัพยากรบุคคล ช่วยให้สามารถจัดเก็บข้อมูลของพนักงานทั้งหมดได้อย่างมีระบบเกี่ยวข้องกับข้อมูลเกี่ยวกับบุคคล, ข้อมูลโครงสร้างหน่วยงาน ข้อมูลข้าราชการ ข้อมูลลูกจ้าง วันลา และข้อมูลอื่นๆ ที่เกี่ยวข้องกับการจัดการทรัพยากรบุคคล
|
||||
</li>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="q-pa-md col-12" style="padding-top: 0px;">
|
||||
<div class="text-weight-medium">ขอบเขตการดูแลระบบ
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<li>
|
||||
เจ้าหน้าที่ทรัพยากรบุคคลต้องรับผิดชอบในการเก็บรวบรวม บันทึก และบริหารจัดการข้อมูลทรัพยากรบุคคลของพนักงานนอกจากนี้พวกเขาต้องรักษา
|
||||
ความถูกต้องและปลอดภัยของข้อมูลทรัพยากรบุคคลและปฏิบัติตามนโยบายความเป็นส่วนตัว
|
||||
</li>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
</div>
|
||||
|
||||
<div class="q-pa-md col-12" style="padding-top: 0px;">
|
||||
<div class="text-weight-medium">รายละเอียดและขั้นตอนการดูแลระบบ
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<div class="col-12">
|
||||
<div class="text-weight-medium">1.) ความปลอดภัยของข้อมูล</div>
|
||||
<ul>
|
||||
<li>
|
||||
มีมาตรการที่เข้มงวดเพื่อรักษาความปลอดภัยของข้อมูลที่เกี่ยวข้องกับทรัพยากรบุคคล รวมถึงการใช้เทคโนโลยีการรักษาความปลอดภัย การให้สิทธิ์การ
|
||||
เข้าถึงข้อมูล, และการป้องกันการใช้ข้อมูลที่ไม่ถูกต้อง
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">2.) การจัดการสิทธิ์การเข้าถึง</div>
|
||||
<ul>
|
||||
<li>
|
||||
กำหนดสิทธิ์การเข้าถึงข้อมูลทรัพยากรบุคคลให้แต่ละบุคคลในองค์กรการควบคุมสิทธิ์จะช่วยลดความเสี่ยงที่เกี่ยวข้องกับการเข้าถึงข้อมูลโดยไม่ได้รับอนุญาต
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">3.) การตรวจสอบและการพัฒนาระบบ</div>
|
||||
<ul>
|
||||
<li>
|
||||
ตรวจสอบและบำรุงรักษาข้อมูลเพื่อให้มั่นใจว่าข้อมูลทรัพยากรบุคคลมีความถูกต้อง,ครบถ้วน และอับเดต ทำการตรวจสอบการป้องกันข้อมูลไม่ถูกส่ง
|
||||
หลายครั้ง และดูแลให้มีการบันทึกข้อมูลทรัพยากรบุคคลตลอดเวลา
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="q-pa-md col-12" style="padding-top: 0px;">
|
||||
<div class="text-weight-medium">คำถามที่พบบ่อย
|
||||
<q-card class="card1 q-pa-md text-weight-regular">
|
||||
<div class="col-12 row">
|
||||
|
||||
<div class="text-weight-medium" style="color: #02A998;">ข้อมูลส่วนบุคคลถูกปกปิดหรือปล่อยไว้หรือไม่?</div>
|
||||
<ul>
|
||||
<li>
|
||||
มีมาตรการที่เข้มงวดเพื่อรักษาความปลอดภัยของข้อมูลที่เกี่ยวข้องกับทรัพยากรบุคคล รวมถึงการใช้เทคโนโลยีการรักษาความปลอดภัย การให้สิทธิ์การ
|
||||
เข้าถึงข้อมูล, และการป้องกันการใช้ข้อมูลที่ไม่ถูกต้อง
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">2.) การจัดการสิทธิ์การเข้าถึง</div>
|
||||
<ul>
|
||||
<li>
|
||||
กำหนดสิทธิ์การเข้าถึงข้อมูลทรัพยากรบุคคลให้แต่ละบุคคลในองค์กรการควบคุมสิทธิ์จะช่วยลดความเสี่ยงที่เกี่ยวข้องกับการเข้าถึงข้อมูลโดยไม่ได้รับอนุญาต
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-weight-medium">3.) การตรวจสอบและการพัฒนาระบบ</div>
|
||||
<ul>
|
||||
<li>
|
||||
ตรวจสอบและบำรุงรักษาข้อมูลเพื่อให้มั่นใจว่าข้อมูลทรัพยากรบุคคลมีความถูกต้อง,ครบถ้วน และอับเดต ทำการตรวจสอบการป้องกันข้อมูลไม่ถูกส่ง
|
||||
หลายครั้ง และดูแลให้มีการบันทึกข้อมูลทรัพยากรบุคคลตลอดเวลา
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-12" style="margin-top: 30px;"><q-separator color="grey-3" /></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.card1{
|
||||
margin-top:15px;
|
||||
background-color:#F8F8F8;
|
||||
border-color: #EDEDED !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
11
src/quasar-user-options.ts
Normal file
11
src/quasar-user-options.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// import "./styles/quasar.scss"
|
||||
import "@quasar/extras/material-icons/material-icons.css"
|
||||
import "@quasar/extras/material-icons-outlined/material-icons-outlined.css"
|
||||
import "@quasar/extras/fontawesome-v5/fontawesome-v5.css"
|
||||
import "@quasar/extras/mdi-v4/mdi-v4.css"
|
||||
|
||||
// To be used on app.use(Quasar, { ... })
|
||||
export default {
|
||||
config: {},
|
||||
plugins: {},
|
||||
}
|
||||
30
src/router/index.ts
Normal file
30
src/router/index.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
const MainLayout = () => import("@/views/MainLayout.vue");
|
||||
const Metadata = () => import("@/modules/01_metadata/views/Main.vue");
|
||||
const Organizational = () => import("@/modules/02_organizational/views/Main.vue");
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: MainLayout,
|
||||
children:[
|
||||
{
|
||||
path: "/metadata",
|
||||
name: "metadata",
|
||||
component: Metadata,
|
||||
},
|
||||
{
|
||||
path: "/organizational",
|
||||
name: "organizational",
|
||||
component: Organizational
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
export default router;
|
||||
13
src/router/loader.ts
Normal file
13
src/router/loader.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
***** DEPRECATED - Must be delete later *****
|
||||
*/
|
||||
|
||||
/**โหลดหน้าแบบ async/await
|
||||
* @param view "ชี่อไฟล์".vue
|
||||
* @param folder "folderในsrc" [Ex. /src/"folder"] default=views เมื่อไม่ส่งค่า
|
||||
*/
|
||||
export function load(view: string, folder: string = "views") {
|
||||
// console.log(`@/${folder}/${view}.vue`);
|
||||
return async () => await import(`@/${folder}/${view}.vue`);
|
||||
}
|
||||
|
||||
31
src/style/quasar-variables.sass
Normal file
31
src/style/quasar-variables.sass
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// FILE (create it): src/quasar-variables.sass
|
||||
|
||||
$primary: #02A998
|
||||
$secondary: #016987
|
||||
$accent: #9C27B0
|
||||
|
||||
// $dark: #1D1D1D
|
||||
$dark: #35473C
|
||||
|
||||
$positive: #21BA45
|
||||
$negative: #C10015
|
||||
$info: #31CCEC
|
||||
$warning: #F2C037
|
||||
|
||||
$add: #00aa86
|
||||
|
||||
.bg-white-btn
|
||||
background: #ffffff20 !important
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@100;200;300;400;500;600;700;800;900&display=swap')
|
||||
|
||||
$noto-thai: 'Noto Sans Thai', sans-serif
|
||||
|
||||
#azay-app,
|
||||
div
|
||||
font-family: $noto-thai !important
|
||||
text-rendering: optimizeLegibility
|
||||
-webkit-font-smoothing: antialiased
|
||||
-moz-osx-font-smoothing: grayscale
|
||||
|
||||
$separator-color: #EDEDED !default
|
||||
179
src/views/MainLayout.vue
Normal file
179
src/views/MainLayout.vue
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const $q = useQuasar();
|
||||
|
||||
const currentRouteName = ref('home');
|
||||
const text = ref('');
|
||||
const menuList = [
|
||||
{text:'ข้อมูลหลัก',path: 'metadata'},
|
||||
{text:'โครงสร้างอัตรากำลัง',path: 'organizational'},
|
||||
];
|
||||
|
||||
const mainmenu = [
|
||||
{text: 'ข้อมูลหลัก', icon:'mdi-account-outline', path: 'metadata'},
|
||||
{text: 'โครงสร้างอัตรากำลัง', icon:'mdi-account-outline',path: 'organizational'},
|
||||
{text: 'โครงสร้างอัตรากำลัง', icon:'mdi-account-outline',path: 'organizational'},
|
||||
{text: 'โครงสร้างอัตรากำลัง', icon:'mdi-account-outline',path: 'organizational'},
|
||||
{text: 'โครงสร้างอัตรากำลัง', icon:'mdi-account-outline',path: 'organizational'},
|
||||
];
|
||||
|
||||
const clickMain = (val: string) => {
|
||||
router.push(val)
|
||||
currentRouteName.value = val
|
||||
};
|
||||
|
||||
const goHome = () => {
|
||||
router.push('/')
|
||||
currentRouteName.value = 'home'
|
||||
};
|
||||
</script>
|
||||
<!-- โครงเว็บ -->
|
||||
<template>
|
||||
<q-layout view="hHh LpR fFr">
|
||||
<!-- header -->
|
||||
<q-header flat class="text-dark col-12 bg-header bg-transparent" height-hint="7">
|
||||
<q-toolbar class="q-my-xs items-center" :style="$q.screen.gt.xs ? 'padding: 1% 2%;': 'padding: 1% 4%;'">
|
||||
<div class="row items-center no-wrap" v-if="$q.screen.gt.xs">
|
||||
<q-img src="@/assets/logo.png" spinner-color="white" style="height: 35px; max-width: 35px" class=" cursor-pointer" @click="goHome" />
|
||||
<q-separator vertical inset class="q-ml-md" />
|
||||
<div class="row q-ml-md items-center q-pt-xs">
|
||||
<div
|
||||
style="color: #ffffff; letter-spacing: 1px; line-height:10px;"
|
||||
class="text-body2 text-weight-bolder col-12"
|
||||
>
|
||||
ระบบ<span class="text-primary">ทรัพยากรบุคคล</span>
|
||||
</div>
|
||||
<div class="text-caption text-white">SUPPORT</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="row items-center">
|
||||
<img src="@/assets/logo.png" style="height: 35px; max-width: 35px" />
|
||||
</div>
|
||||
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
|
||||
<div class="bg-top" :style="$q.screen.gt.xs ? 'height: 240px;': 'height: 240px;'" />
|
||||
<!-- end header -->
|
||||
|
||||
<q-page-container class="bg-grey-2 q-pb-md">
|
||||
<q-page :style="$q.screen.gt.xs ? 'padding: 1.8% 2%; margin-top: -250px;': 'padding: 5% 4%; margin-top: -250px;'">
|
||||
<div class="col-12 row justify-center">
|
||||
<div class="col-xs-10 col-md-8 text-h6 text-white">
|
||||
<div class="q-pb-md">เราจะช่วยคุณได้อย่างไร</div>
|
||||
<q-input outlined bg-color="white" label="ค้นหา" v-model="text" dense>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-xs-10 col-md-8 row q-col-gutter-md" style=" margin-top: 80px;" v-if="currentRouteName == 'home'">
|
||||
<div class="col-12 row justify-center text-h6 text-dark">ระบบทรัพยากรบุคคล</div>
|
||||
<div class="col-12"><q-separator color="grey-4" /></div>
|
||||
<div class="col-12 row q-col-gutter-lg">
|
||||
<div class="col-xs-12 col-sm-4"
|
||||
v-for="(menu , index) in mainmenu"
|
||||
:key="index"
|
||||
>
|
||||
<q-card class="q-pa-md row col-12 items-center text-dark cursor-pointer cardmenu" @click="clickMain(menu.path)" ><!-- router.push({ name: `${}`}) -->
|
||||
<q-icon size="20px" :name="`${menu.icon}`" />
|
||||
<div class="q-pl-md">{{ menu.text }}</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-11 row q-col-gutter-md" style=" margin-top: 80px;" v-else>
|
||||
<div class="col-3 row">
|
||||
<q-card class="q-px-sm col-12">
|
||||
<q-list dense bordered padding class="rounded-borders text-grey-8">
|
||||
<q-item
|
||||
v-for="(menuItem, index) in menuList" :key="index"
|
||||
class="rounded-borders text-weight-light"
|
||||
clickable
|
||||
v-ripple
|
||||
:to="{ name: `${menuItem.path}`}"
|
||||
active-class="text-blue-7 text-weight-medium bg-blue-1"
|
||||
>
|
||||
<q-item-section class="q-py-sm">
|
||||
{{ menuItem.text }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-9 row">
|
||||
<q-card class="col-12">
|
||||
<router-view :key="$route.fullPath" />
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-page>
|
||||
</q-page-container>
|
||||
</q-layout>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.bg-drawer{
|
||||
background: #242a3d;
|
||||
}
|
||||
.menu {
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.tabsHome .q-tab__icon{
|
||||
font-size: 18px;
|
||||
}
|
||||
.border-100{
|
||||
border-radius: 100px;
|
||||
}
|
||||
.bg-header{
|
||||
background:rgba(39, 50, 56, 0)8 !important;
|
||||
}
|
||||
|
||||
.bg-top{
|
||||
/* background: #273238; */
|
||||
background-image: url("@/assets/1.png");
|
||||
background-size: cover;
|
||||
}
|
||||
.header-br{
|
||||
border-bottom: 1px solid #fdfdfd31;
|
||||
}
|
||||
.menuActive {
|
||||
background: #1e2234;
|
||||
border-radius: 0 100px 100px 0;
|
||||
margin-right: 4%;
|
||||
}
|
||||
.q-card {
|
||||
box-shadow: 3px 3px 20px -10px rgba(151, 150, 150, 0.261) !important;
|
||||
border: 1px solid #eeeded;
|
||||
}
|
||||
.q-menu {
|
||||
box-shadow: 3px 3px 10px 1px rgba(95, 95, 95, 0.15) !important;
|
||||
}
|
||||
.toptitle {
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1.2%;
|
||||
}
|
||||
.q-field--outlined .q-field__control{
|
||||
border-radius: 5px;
|
||||
}
|
||||
.q-field--outlined .q-field__control:before {
|
||||
border-color: #C8D3DB;
|
||||
}
|
||||
.q-field--outlined .q-icon{
|
||||
color: #7474747f;
|
||||
}
|
||||
|
||||
.cardmenu:hover{
|
||||
border-color: #02A998;
|
||||
color: #02A998 !important;
|
||||
box-shadow: 3px 3px 10px 1px rgba(95, 95, 95, 0.15) !important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue