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