ปรับ ข้อมูลหลัก
This commit is contained in:
parent
55576bc7b3
commit
ba4703dac8
20 changed files with 249 additions and 62 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue