แก้ฟิล
This commit is contained in:
parent
1447b789ef
commit
39f969a5f2
2 changed files with 61 additions and 100 deletions
|
|
@ -170,4 +170,6 @@ export default {
|
||||||
workflow: `${workflow}/`,
|
workflow: `${workflow}/`,
|
||||||
|
|
||||||
keycloakLogSSO: `${org}/keycloak/log/sso`,
|
keycloakLogSSO: `${org}/keycloak/log/sso`,
|
||||||
|
|
||||||
|
orgAssistance:(id:string)=>`${profileOrg}/assistance/${id}`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -28,101 +28,40 @@ const filterKeyword = ref<string>("");
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"commandName",
|
||||||
"name",
|
"agency",
|
||||||
"posMasterNoOld",
|
|
||||||
"positionOld",
|
|
||||||
"positionLevel",
|
|
||||||
"organizationPositionOld",
|
|
||||||
"organization",
|
|
||||||
"dateStart",
|
"dateStart",
|
||||||
"dateEnd",
|
"dateEnd",
|
||||||
"createdAt",
|
|
||||||
"status",
|
|
||||||
"commandNo",
|
"commandNo",
|
||||||
|
"document",
|
||||||
|
"lastUpdateFullName",
|
||||||
|
"lastUpdatedAt",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//หัวตาราง
|
//หัวตาราง
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "commandName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ลำดับ",
|
label: "ประเภทคำสั่ง",
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-นามสกุล",
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "commandName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
sort: (a: string, b: string) =>
|
||||||
return `${row.prefix}${row.firstName} ${row.lastName}`;
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "posMasterNoOld",
|
name: "agency",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขที่ตำแหน่ง",
|
label: "หน่วยงานที่ให้ช่วยราชการ/ส่งตัวกลับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posMasterNoOld",
|
field: "agency",
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return findPosMasterNoOld(row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionOld",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งในสายงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionOld",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งประเภท",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
let name = "";
|
|
||||||
if (row.posTypeNameOld && row.posLevelNameOld) {
|
|
||||||
name = `${row.posTypeNameOld} (${row.posLevelNameOld})`;
|
|
||||||
} else if (row.posTypeNameOld) {
|
|
||||||
name = `${row.posTypeNameOld}`;
|
|
||||||
} else if (row.posLevelNameOld) {
|
|
||||||
name = `(${row.posLevelNameOld})`;
|
|
||||||
} else name = "-";
|
|
||||||
return name;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organizationPositionOld",
|
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงานที่ให้ช่วยราชการ",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
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: "dateStart",
|
name: "dateStart",
|
||||||
|
|
@ -130,9 +69,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "วันเริ่มช่วยราชการ",
|
label: "วันเริ่มช่วยราชการ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateStart",
|
field: "dateStart",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (val) => date2Thai(val),
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateEnd",
|
name: "dateEnd",
|
||||||
|
|
@ -140,29 +81,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "วันสิ้นสุดการช่วยราชการ",
|
label: "วันสิ้นสุดการช่วยราชการ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateEnd",
|
field: "dateEnd",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (val) => date2Thai(val),
|
sort: (a: string, b: string) =>
|
||||||
},
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
{
|
|
||||||
name: "createdAt",
|
|
||||||
align: "left",
|
|
||||||
label: "วันที่ดำเนินการ",
|
|
||||||
sortable: true,
|
|
||||||
field: "createdAt",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (val) => date2Thai(val),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "status",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "status",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (val) => statusText(val),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "commandNo",
|
name: "commandNo",
|
||||||
|
|
@ -172,6 +95,42 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
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: "document",
|
||||||
|
align: "left",
|
||||||
|
label: "เอกสารอ้างอิง",
|
||||||
|
sortable: true,
|
||||||
|
field: "document",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdateFullName",
|
||||||
|
align: "left",
|
||||||
|
label: "ผู้ดำเนินการ",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdateFullName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdatedAt",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่แก้ไข",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdatedAt",
|
||||||
|
format: (v) => date2Thai(v, false, true),
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -207,7 +166,7 @@ function close() {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.placementKeycloak + `/${store.dataEvaluation.profileId}`)
|
.get(config.API.orgAssistance(store.dataEvaluation.profileId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue