fix
This commit is contained in:
parent
7f3eb5225f
commit
4c35662eed
22 changed files with 632 additions and 343 deletions
|
|
@ -94,6 +94,33 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่สร้าง",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "lastUpdatedAt",
|
||||
align: "left",
|
||||
label: "วันที่แก้ไข",
|
||||
sortable: true,
|
||||
field: "lastUpdatedAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "lastUpdateFullName",
|
||||
align: "left",
|
||||
label: "ผู้ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "lastUpdateFullName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
|
|
@ -104,6 +131,9 @@ const visibleColumns = ref<string[]>([
|
|||
"posExecutiveName",
|
||||
"positionExecutiveField",
|
||||
"positionArea",
|
||||
"createdAt",
|
||||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
|
||||
// ฟอร์มข้อมูลตำแหน่ง
|
||||
|
|
@ -254,8 +284,60 @@ onMounted(async () => {
|
|||
|
||||
<template>
|
||||
<q-form @submit.prevent="fetchData()">
|
||||
<div class="row col-12 q-mb-sm">
|
||||
<div class="col-md-2">
|
||||
<div class="row col-12 q-mb-sm q-col-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<q-space />
|
||||
<div class="row col-md-10 q-col-gutter-sm">
|
||||
<div class="col-md-4">
|
||||
<q-select
|
||||
label="ค้นหาจาก"
|
||||
v-model="type"
|
||||
:options="optionFilter"
|
||||
emit-value
|
||||
dense
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:clearable="type !== 'ALL'"
|
||||
@clear="type = 'ALL'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<q-input
|
||||
:class="inputEdit(isReadonly)"
|
||||
v-model="search"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
label="คำค้น"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="search"
|
||||
name="cancel"
|
||||
@click="search = ''"
|
||||
class="cursor-pointer"
|
||||
></q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="row col-md-2">
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width"
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row col-12">
|
||||
<q-btn
|
||||
id="addComplaints"
|
||||
for="addComplaints"
|
||||
|
|
@ -267,55 +349,21 @@ onMounted(async () => {
|
|||
@click="popupAdd()"
|
||||
><q-tooltip>เพิ่มตำเเหน่ง </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<div class="row col-md-10 q-col-gutter-sm">
|
||||
<div class="col-md-4">
|
||||
<q-select
|
||||
label="ค้นหาจาก"
|
||||
v-model="type"
|
||||
:options="optionFilter"
|
||||
emit-value
|
||||
dense
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:clearable="type !== 'ALL'"
|
||||
@clear="type = 'ALL'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<q-input
|
||||
:class="inputEdit(isReadonly)"
|
||||
v-model="search"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
label="คำค้น"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="search"
|
||||
name="cancel"
|
||||
@click="search = ''"
|
||||
class="cursor-pointer"
|
||||
></q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="row col-md-2">
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="search"
|
||||
label="ค้นหา"
|
||||
class="full-width"
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,13 @@ const columns = [
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
] as const satisfies QTableProps["columns"];
|
||||
const visibleColumns = ref<string[]>(["posTypeName", "posTypeRank"]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"posTypeName",
|
||||
"posTypeRank",
|
||||
"createdAt",
|
||||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
|
||||
const editId = ref<string>(""); // id รายกรปะเภทตำแหน่ง
|
||||
const dialog = ref<boolean>(false); // modal popu เพิ่มข้อมูล,แก้ไข
|
||||
|
|
@ -201,7 +207,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -257,7 +262,7 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
{{ col.value }}
|
||||
{{ col.value ?? "-" }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ const visibleColumns = ref<string[]>([
|
|||
"no",
|
||||
"posExecutiveName",
|
||||
"posExecutivePriority",
|
||||
"createdAt",
|
||||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -50,6 +53,33 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่สร้าง",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "lastUpdatedAt",
|
||||
align: "left",
|
||||
label: "วันที่แก้ไข",
|
||||
sortable: true,
|
||||
field: "lastUpdatedAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "lastUpdateFullName",
|
||||
align: "left",
|
||||
label: "ผู้ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "lastUpdateFullName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const dataEdit = ref<RowListForm>(); // ข้อมูลตำแหน่งทางการบริหารที่แก้ไข
|
||||
|
|
@ -130,7 +160,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -197,7 +226,7 @@ onMounted(async () => {
|
|||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
{{ col.value ?? "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ const visibleColumns = ref<string[]>([
|
|||
"posLevelName",
|
||||
"posLevelRank",
|
||||
"posLevelAuthority",
|
||||
"createdAt",
|
||||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
|
||||
const id = ref<string>(route.params.id.toString()); //ประเภทตำแหน่ง
|
||||
|
|
@ -295,7 +298,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -376,7 +378,7 @@ onMounted(async () => {
|
|||
{{ posName }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
{{ col.value ?? "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
@ -458,7 +460,6 @@ onMounted(async () => {
|
|||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
|
||||
hide-bottom-space
|
||||
readonly
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue