fix ชื่อ-นามสกุล
This commit is contained in:
parent
4966b1d2e2
commit
1c57374868
12 changed files with 833 additions and 1082 deletions
|
|
@ -9,18 +9,20 @@ import config from "@/app.config";
|
|||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, success ,date2Thai} = mixin;
|
||||
const { showLoader, hideLoader, messageError, success, date2Thai } = mixin;
|
||||
|
||||
const rows = ref<any>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "prefix",
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "คำนำหน้า",
|
||||
label: "ลำดับ",
|
||||
sortable: true,
|
||||
field: "prefix",
|
||||
field: "no",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "fullname",
|
||||
|
|
@ -87,6 +89,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"prefix",
|
||||
"fullname",
|
||||
"positionType",
|
||||
|
|
@ -104,17 +107,15 @@ const fectListDecased = async () => {
|
|||
await http
|
||||
.get(config.API.listDeceased())
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
rows.value = res.data.result.map((e: any) => ({
|
||||
personalId: e.id,
|
||||
prefix: e.prefix,
|
||||
fullname: e.firstName + " " + e.lastName,
|
||||
fullname: `${e.prefix ?? ""}${e.firstName ?? ""} ${e.lastName ?? ""}`,
|
||||
positionType: e.positionType,
|
||||
position: e.positionLine,
|
||||
positionLevel: e.positionLevel,
|
||||
positionExecutive: e.positionExecutive,
|
||||
oc: e.organization,
|
||||
createdAt:date2Thai(e.createdAt),
|
||||
createdAt: date2Thai(e.createdAt),
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -125,8 +126,6 @@ const fectListDecased = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
|
|
@ -219,11 +218,8 @@ const pagination = ref({
|
|||
class="cursor-pointer"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
<!-- <q-td key="no" :props="props">
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td> -->
|
||||
<q-td key="prefix" :props="props">
|
||||
{{ props.row.prefix }}
|
||||
</q-td>
|
||||
<q-td key="fullname" :props="props">
|
||||
{{ props.row.fullname }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue