ปรับฟิลด์ รายการย้าย
This commit is contained in:
parent
8c1fe518c5
commit
38fbce2093
2 changed files with 137 additions and 150 deletions
|
|
@ -40,22 +40,18 @@ const {
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
|
"citizenId",
|
||||||
"fullname",
|
"fullname",
|
||||||
"position",
|
"organizationName",
|
||||||
"positionLevel",
|
"dateOfBirth",
|
||||||
"organizationPositionOld",
|
|
||||||
"organization",
|
|
||||||
"statusText",
|
|
||||||
"btn",
|
"btn",
|
||||||
]);
|
]);
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
|
"citizenId",
|
||||||
"fullname",
|
"fullname",
|
||||||
"position",
|
"organizationName",
|
||||||
"positionLevel",
|
"dateOfBirth",
|
||||||
"organizationPositionOld",
|
|
||||||
"organization",
|
|
||||||
"statusText",
|
|
||||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
|
|
@ -66,57 +62,9 @@ const resetFilter = () => {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
// const nextPage = (id:string) => {
|
|
||||||
// router.push("/retirement/resign/"+id);
|
|
||||||
// };
|
|
||||||
const rows = ref<relocationType[]>([]);
|
const rows = ref<relocationType[]>([]);
|
||||||
const rows2 = ref<any>([
|
const rows2 = ref<any[]>([]);
|
||||||
{
|
|
||||||
personalId: "0a846508-4932-40de-9a9e-5b519492217c",
|
|
||||||
fullname: "นางสาวอย พชช",
|
|
||||||
position: "นักบริหาร",
|
|
||||||
positionLevel: "ต้น",
|
|
||||||
oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร",
|
|
||||||
agency: "กลุ่มงานกุมารเวชกรรม",
|
|
||||||
status: "รออนุมัติ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
|
|
||||||
fullname: "นางสาววญ สพ",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
positionLevel: "ปฏิบัติการ",
|
|
||||||
oc: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
agency: "กลุ่มงานข้อมูลเมือง",
|
|
||||||
status: "รออนุมัติ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
personalId: "08db721d-adf2-4842-8056-1abb1539356e",
|
|
||||||
fullname: "นางสาววญ สพ",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
positionLevel: "ปฏิบัติการ",
|
|
||||||
oc: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
agency: "กลุ่มงานข้อมูลเมือง",
|
|
||||||
status: "รออนุมัติ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
personalId: "08db721d-adff-47b0-8762-41cd5c991001",
|
|
||||||
fullname: "นางสาววญ สพ",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
positionLevel: "ปฏิบัติการ",
|
|
||||||
oc: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
agency: "กลุ่มงานข้อมูลเมือง",
|
|
||||||
status: "รออนุมัติ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
personalId: "08db721d-ae22-424d-8f4a-87ba30cc3ee7",
|
|
||||||
fullname: "นางสาววญ สพ",
|
|
||||||
position: "นักจัดการงานทั่วไป",
|
|
||||||
positionLevel: "ปฏิบัติการ",
|
|
||||||
oc: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
agency: "กลุ่มงานข้อมูลเมือง",
|
|
||||||
status: "รออนุมัติ",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -127,6 +75,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "citizenId",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขประจำตัวประชาชน",
|
||||||
|
sortable: true,
|
||||||
|
field: "fullname",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "fullname",
|
name: "fullname",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -137,47 +94,22 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "organizationName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "หน่วยงานที่รับโอน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "position",
|
field: "organizationName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "dateOfBirth",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับ",
|
label: "วัน/เดือน/ปี เกิด",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionLevel",
|
field: "dateOfBirth",
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organizationPositionOld",
|
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "organizationPositionOld",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงานที่ขอย้ายไป",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "statusText",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "statusText",
|
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -190,6 +122,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
]);
|
]);
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
const columns2 = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -201,6 +134,15 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "citizenId",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขประจำตัวประชาชน",
|
||||||
|
sortable: true,
|
||||||
|
field: "citizenId",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "fullname",
|
name: "fullname",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -211,47 +153,22 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "organizationName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "หน่วยงานที่รับโอน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "position",
|
field: "organizationName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "dateOfBirth",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับ",
|
label: "วัน/เดือน/ปี เกิด",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionLevel",
|
field: "dateOfBirth",
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organizationPositionOld",
|
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "organizationPositionOld",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงานที่ขอย้ายไป",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "statusText",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "statusText",
|
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -294,7 +211,7 @@ const getData = async () => {
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
firstname: item.firstname,
|
firstname: item.firstname,
|
||||||
lastname: item.lastname,
|
lastname: item.lastname,
|
||||||
dateOfBirth: item.dateOfBirth,
|
dateOfBirth: date2Thai(item.dateOfBirth),
|
||||||
gender: item.gender,
|
gender: item.gender,
|
||||||
status: item.status,
|
status: item.status,
|
||||||
statusText:statusText(item.status),
|
statusText:statusText(item.status),
|
||||||
|
|
@ -468,6 +385,13 @@ onMounted(async () => {
|
||||||
<q-td key="no" :props="props" @click="openDetail(props.row.id)">
|
<q-td key="no" :props="props" @click="openDetail(props.row.id)">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td
|
||||||
|
key="citizenId"
|
||||||
|
:props="props"
|
||||||
|
@click="openDetail(props.row.id)"
|
||||||
|
>
|
||||||
|
{{ props.row.citizenId !== null ? props.row.citizenId : "-" }}
|
||||||
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
key="fullname"
|
key="fullname"
|
||||||
:props="props"
|
:props="props"
|
||||||
|
|
@ -476,20 +400,55 @@ onMounted(async () => {
|
||||||
{{ props.row.fullname !== null ? props.row.fullname : "-" }}
|
{{ props.row.fullname !== null ? props.row.fullname : "-" }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
key="position"
|
key="organizationName"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="openDetail(props.row.id)"
|
@click="openDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
{{ props.row.position !== null ? props.row.position : "-" }}
|
<div
|
||||||
</q-td>
|
v-if="
|
||||||
|
props.row.organizationName !== null ||
|
||||||
|
props.row.positionPath !== null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">
|
||||||
|
{{
|
||||||
|
props.row.organizationName !== null ? props.row.organizationName : "-"
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
props.row.organizationShortName !== null
|
||||||
|
? `(${props.row.organizationShortName})`
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-light">
|
||||||
|
{{
|
||||||
|
props.row.positionPath !== null
|
||||||
|
? props.row.positionPath
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
props.row.positionNumber !== null
|
||||||
|
? `(${props.row.positionNumber})`
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">-</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
key="positionLevel"
|
key="dateOfBirth"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="openDetail(props.row.id)"
|
@click="openDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
props.row.positionLevel !== null
|
props.row.dateOfBirth !== null
|
||||||
? props.row.positionLevel
|
? props.row.dateOfBirth
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -668,28 +627,55 @@ onMounted(async () => {
|
||||||
<q-td key="no" :props="props">
|
<q-td key="no" :props="props">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td key="citizenId" :props="props">
|
||||||
|
{{ props.row.citizenId }}
|
||||||
|
</q-td>
|
||||||
<q-td key="fullname" :props="props">
|
<q-td key="fullname" :props="props">
|
||||||
{{ props.row.fullname }}
|
{{ props.row.fullname }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td
|
||||||
{{ props.row.position }}
|
key="organizationName"
|
||||||
</q-td>
|
:props="props"
|
||||||
<q-td key="positionLevel" :props="props">
|
>
|
||||||
{{ props.row.positionLevel }}
|
<div
|
||||||
</q-td>
|
v-if="
|
||||||
<q-td key="organizationPositionOld" :props="props">
|
props.row.organizationName !== null ||
|
||||||
<div class="table_ellipsis">
|
props.row.positionPath !== null
|
||||||
{{ props.row.organizationPositionOld }}
|
"
|
||||||
|
>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">
|
||||||
|
{{ props.row.organizationName !== null ? props.row.organizationName : "-" }}
|
||||||
|
{{
|
||||||
|
props.row.organizationShortName !== null
|
||||||
|
? `(${props.row.organizationShortName})`
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-light">
|
||||||
|
{{
|
||||||
|
props.row.positionPath !== null
|
||||||
|
? props.row.positionPath
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
props.row.positionNumber !== null
|
||||||
|
? `(${props.row.positionNumber})`
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">-</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="organization" :props="props">
|
<q-td key="dateOfBirth" :props="props">
|
||||||
<div class="table_ellipsis">
|
{{ props.row.dateOfBirth }}
|
||||||
{{ props.row.organization }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
<q-td key="statusText" :props="props">
|
|
||||||
{{ props.row.statusText }}
|
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,7 @@ const selectedPosition = async (data: any) => {
|
||||||
positionPathSideArr.length > 1 || positionPathSideArr.length == 0
|
positionPathSideArr.length > 1 || positionPathSideArr.length == 0
|
||||||
? ""
|
? ""
|
||||||
: positionPathSideArr[0].value;
|
: positionPathSideArr[0].value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// positionType Options
|
// positionType Options
|
||||||
|
|
@ -658,6 +659,7 @@ function findByPerson(element: any): any {
|
||||||
outlined
|
outlined
|
||||||
class="full-width inputgreen cursor-pointer custom-input"
|
class="full-width inputgreen cursor-pointer custom-input"
|
||||||
standout
|
standout
|
||||||
|
emit-value
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -667,7 +669,6 @@ function findByPerson(element: any): any {
|
||||||
map-options
|
map-options
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||||
<q-select
|
<q-select
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue