ปรับ ข้อมูลหลัก
This commit is contained in:
parent
55576bc7b3
commit
ba4703dac8
20 changed files with 249 additions and 62 deletions
|
|
@ -292,11 +292,17 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
|
||||||
dense
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
label="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
></q-input>
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -332,7 +338,7 @@ onMounted(async () => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-bold">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,19 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
borderless
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -181,7 +193,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="TABLE_COLUMNS"
|
:options="TABLE_COLUMNS"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -181,7 +192,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -181,7 +192,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -181,7 +192,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -180,7 +191,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -181,7 +192,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -192,7 +203,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ const visibleColumns = ref<string[]>([
|
||||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||||
const educationRank = ref<number>(); // ลำดับ
|
const educationRank = ref<number>(); // ลำดับ
|
||||||
const educationLevel = ref<string>(""); // ระดับการศึกษา
|
const educationLevel = ref<string>(""); // ระดับการศึกษา
|
||||||
const editId = ref<string>(""); // id รายการระดับการศึกษา
|
const editId = ref<string>(""); // id รายการระดับการศึกษา
|
||||||
const dialogStatus = ref<string>(""); // สถานะ เพิ่มข้อมูล,แก้ไขข้อมูล
|
const dialogStatus = ref<string>(""); // สถานะ เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||||
const personalName = ref<string>("ระดับการศึกษา"); //label input
|
const personalName = ref<string>("ระดับการศึกษา"); //label input
|
||||||
|
|
@ -183,7 +183,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -195,7 +206,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
date2Thai,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
//table
|
//table
|
||||||
|
|
@ -76,6 +77,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -85,6 +89,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@ import dialogHeader from "@/components/DialogHeader.vue";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {
|
const {
|
||||||
dialogRemove,
|
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
success,
|
success,
|
||||||
messageError,
|
messageError,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
|
date2Thai,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
//Table
|
//Table
|
||||||
|
|
@ -65,6 +65,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -74,7 +77,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -222,7 +229,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,7 @@ import config from "@/app.config";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type { ResLevel } from "@/modules/01_metadata/interface/response/positionEmployee/Main";
|
||||||
ResGroup,
|
|
||||||
ResLevel,
|
|
||||||
} from "@/modules/01_metadata/interface/response/positionEmployee/Main";
|
|
||||||
import type { DataGroup } from "@/modules/01_metadata/interface/index/positionEmployee";
|
import type { DataGroup } from "@/modules/01_metadata/interface/index/positionEmployee";
|
||||||
import type { FormDataLevel } from "@/modules/01_metadata/interface/request/positionEmployee";
|
import type { FormDataLevel } from "@/modules/01_metadata/interface/request/positionEmployee";
|
||||||
|
|
||||||
|
|
@ -26,8 +23,14 @@ const $q = useQuasar();
|
||||||
const storeOption = useMainOptionDataStore();
|
const storeOption = useMainOptionDataStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
const {
|
||||||
useCounterMixin();
|
dialogConfirm,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
messageError,
|
||||||
|
success,
|
||||||
|
date2Thai,
|
||||||
|
} = useCounterMixin();
|
||||||
|
|
||||||
// Table
|
// Table
|
||||||
const rows = ref<DataGroup[]>([]); // รายการกลุ่มงาน
|
const rows = ref<DataGroup[]>([]); // รายการกลุ่มงาน
|
||||||
|
|
@ -45,7 +48,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posLevelName",
|
name: "posLevelName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับชั้นงาน",
|
label: "กลุ่มงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posLevelName",
|
field: "posLevelName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -78,6 +81,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -87,6 +93,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
@ -249,7 +258,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.go(-1)"
|
||||||
/>
|
/>
|
||||||
รายการระดับชั้นงาน{{ titleName }}
|
รายการระดับชั้นงานของกลุ่มงาน{{ titleName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-card flat bordered>
|
<q-card flat bordered>
|
||||||
|
|
@ -266,7 +275,18 @@ onMounted(() => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filter" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filter"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filter = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filter === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -300,7 +320,7 @@ onMounted(() => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-bold">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,14 @@ import type {
|
||||||
import DialogFormPosition from "@/modules/01_metadata/components/position/DialogFormPosition.vue";
|
import DialogFormPosition from "@/modules/01_metadata/components/position/DialogFormPosition.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError, success, dialogRemove } =
|
const {
|
||||||
useCounterMixin();
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
messageError,
|
||||||
|
success,
|
||||||
|
dialogRemove,
|
||||||
|
date2Thai,
|
||||||
|
} = useCounterMixin();
|
||||||
|
|
||||||
/** Table*/
|
/** Table*/
|
||||||
const rowsPositionSelect = ref<RowDetailPositions[]>([]); // รายการข้อมูลตำแหน่งข้าราชการ ฯ
|
const rowsPositionSelect = ref<RowDetailPositions[]>([]); // รายการข้อมูลตำแหน่งข้าราชการ ฯ
|
||||||
|
|
@ -100,6 +106,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "วันที่สร้าง",
|
label: "วันที่สร้าง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -111,6 +120,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
@ -154,10 +166,9 @@ const statusEdit = ref<boolean>(false); // สถานะการแก้ไ
|
||||||
const copyPosition = ref<boolean>(false); // สถานะการคัดลอกข้อมูล
|
const copyPosition = ref<boolean>(false); // สถานะการคัดลอกข้อมูล
|
||||||
|
|
||||||
const search = ref<string>(""); // คำค้นหา
|
const search = ref<string>(""); // คำค้นหา
|
||||||
const type = ref<string>("ALL"); // ประเภท
|
const type = ref<string>("positionName"); // ประเภท
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
const optionFilter = ref<DataOption[]>([
|
const optionFilter = ref<DataOption[]>([
|
||||||
{ id: "ALL", name: "ทั้งหมด" },
|
|
||||||
{ id: "positionName", name: "ตำแหน่งในสายงาน" },
|
{ id: "positionName", name: "ตำแหน่งในสายงาน" },
|
||||||
{ id: "positionField", name: "สายงาน" },
|
{ id: "positionField", name: "สายงาน" },
|
||||||
{ id: "positionType", name: "ประเภทตำแหน่ง" },
|
{ id: "positionType", name: "ประเภทตำแหน่ง" },
|
||||||
|
|
@ -298,14 +309,11 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:clearable="type !== 'ALL'"
|
|
||||||
@clear="type = 'ALL'"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
v-model="search"
|
v-model="search"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,18 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import type { RowListForm } from "@/modules/01_metadata/interface/request/positi
|
||||||
import DialogAdd from "@/modules/01_metadata/components/position/DialogFormExecutive.vue";
|
import DialogAdd from "@/modules/01_metadata/components/position/DialogFormExecutive.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||||
|
|
||||||
// Table
|
// Table
|
||||||
const rows = ref<RowListForm[]>([]); // รายากรข้อมูลตำแหน่งทางการบริหาร
|
const rows = ref<RowListForm[]>([]); // รายากรข้อมูลตำแหน่งทางการบริหาร
|
||||||
|
|
@ -61,6 +61,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -70,6 +73,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(val, false, true);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
@ -148,7 +154,18 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
v-model="filterKeyword"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -168,6 +185,7 @@ onMounted(async () => {
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
:filter="filterKeyword"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ const columns = [
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "createdAt",
|
name: "createdAt",
|
||||||
align: "center",
|
align: "left",
|
||||||
label: "วันที่สร้าง",
|
label: "วันที่สร้าง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
|
|
@ -98,7 +98,7 @@ const columns = [
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
align: "center",
|
align: "left",
|
||||||
label: "วันที่แก้ไข",
|
label: "วันที่แก้ไข",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
|
|
@ -153,7 +153,7 @@ async function fetchData() {
|
||||||
.get(config.API.orgPosTypeId(id.value))
|
.get(config.API.orgPosTypeId(id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
posName.value = res.data.result.posTypeName;
|
posName.value = res.data.result.posTypeName;
|
||||||
store.save(res.data.result.posLevels);
|
store.save(res.data.result.posLevels, posName.value);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -282,11 +282,17 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
|
||||||
dense
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
label="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
></q-input>
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -320,7 +326,7 @@ onMounted(async () => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-bold">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -374,7 +380,7 @@ onMounted(async () => {
|
||||||
<div v-if="col.name === 'no'">
|
<div v-if="col.name === 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="col.name === 'posTypeName'">
|
<div v-else-if="col.name === 'posTypeName'">
|
||||||
{{ posName }}
|
{{ posName }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,10 @@ export const useInsigniaDataStore = defineStore("insigniaData", () => {
|
||||||
const list = data.map((e) => ({
|
const list = data.map((e) => ({
|
||||||
...e,
|
...e,
|
||||||
insigniaType: insigniaType,
|
insigniaType: insigniaType,
|
||||||
createdAt: e.createdAt ? date2Thai(e.createdAt) : "",
|
createdAt: e.createdAt ? date2Thai(e.createdAt, false, true) : "-",
|
||||||
lastUpdatedAt: e.lastUpdatedAt ? date2Thai(e.lastUpdatedAt) : "",
|
lastUpdatedAt: e.lastUpdatedAt
|
||||||
|
? date2Thai(e.lastUpdatedAt, false, true)
|
||||||
|
: "-",
|
||||||
}));
|
}));
|
||||||
list;
|
list;
|
||||||
row.value = list;
|
row.value = list;
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,17 @@ const { date2Thai } = useCounterMixin();
|
||||||
export const usePositionDataStore = defineStore("PositionData", () => {
|
export const usePositionDataStore = defineStore("PositionData", () => {
|
||||||
const pathLocation = ref<string>("list_position");
|
const pathLocation = ref<string>("list_position");
|
||||||
const row = ref<DataRow[]>([]);
|
const row = ref<DataRow[]>([]);
|
||||||
function save(data: DataResponse[]) {
|
function save(data: DataResponse[], posTypeName: string) {
|
||||||
const list = data.map((e) => ({
|
const list = data.map((e) => ({
|
||||||
...e,
|
...e,
|
||||||
posTypes: undefined,
|
posTypes: undefined,
|
||||||
posTypeId: e.posTypes?.id,
|
posTypeId: e.posTypes?.id,
|
||||||
posTypeName: e.posTypes?.posTypeName,
|
posTypeName: posTypeName,
|
||||||
posTypeRank: e.posTypes?.posTypeRank,
|
posTypeRank: e.posTypes?.posTypeRank,
|
||||||
createdAt: e.createdAt ? date2Thai(e.createdAt) : "-",
|
createdAt: e.createdAt ? date2Thai(e.createdAt, false, true) : "-",
|
||||||
lastUpdatedAt: e.lastUpdatedAt ? date2Thai(e.lastUpdatedAt) : "-",
|
lastUpdatedAt: e.lastUpdatedAt
|
||||||
|
? date2Thai(e.lastUpdatedAt, false, true)
|
||||||
|
: "-",
|
||||||
posLevelAuthority: e.posLevelAuthority
|
posLevelAuthority: e.posLevelAuthority
|
||||||
? storeOption.posLevelAuthorityConvert(e.posLevelAuthority)
|
? storeOption.posLevelAuthorityConvert(e.posLevelAuthority)
|
||||||
: "-",
|
: "-",
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,10 @@ export const usePositionTypeDataStore = defineStore("PositionTypeData", () => {
|
||||||
...e,
|
...e,
|
||||||
posTypes: undefined,
|
posTypes: undefined,
|
||||||
posTypeId: e.posTypes?.id,
|
posTypeId: e.posTypes?.id,
|
||||||
createdAt: e.createdAt ? date2Thai(e.createdAt) : "-",
|
createdAt: e.createdAt ? date2Thai(e.createdAt, false, true) : "-",
|
||||||
lastUpdatedAt: e.lastUpdatedAt ? date2Thai(e.lastUpdatedAt) : "-",
|
lastUpdatedAt: e.lastUpdatedAt
|
||||||
|
? date2Thai(e.lastUpdatedAt, false, true)
|
||||||
|
: "-",
|
||||||
})) satisfies DataRow[];
|
})) satisfies DataRow[];
|
||||||
row.value = list;
|
row.value = list;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,11 +198,17 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
|
||||||
dense
|
dense
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
label="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
></q-input>
|
@clear="filterKeyword = ''"
|
||||||
|
>
|
||||||
|
<template v-slot:append v-if="filterKeyword === ''">
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue