fix bug
This commit is contained in:
parent
14df149dc0
commit
c39723338a
1 changed files with 35 additions and 37 deletions
|
|
@ -93,45 +93,45 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.posTypeShortName
|
return row.posTypeShortName
|
||||||
? row.posTypeShortName +" "+ row.posLevel
|
? row.posTypeShortName + " " + row.posLevel
|
||||||
: row.posLevel;
|
: row.posLevel;
|
||||||
},
|
},
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posOc",
|
name: "org",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posOc",
|
field: "org",
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "year",
|
|
||||||
align: "left",
|
|
||||||
label: "ปีงบประมาณ",
|
|
||||||
sortable: true,
|
|
||||||
field: "year",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salary",
|
|
||||||
align: "left",
|
|
||||||
label: "ค่าจ้าง",
|
|
||||||
sortable: true,
|
|
||||||
field: "salary",
|
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: "year",
|
||||||
|
// align: "left",
|
||||||
|
// label: "ปีงบประมาณ",
|
||||||
|
// sortable: true,
|
||||||
|
// field: "year",
|
||||||
|
// headerStyle: "font-size: 14px",
|
||||||
|
// style: "font-size: 14px",
|
||||||
|
// sort: (a: string, b: string) =>
|
||||||
|
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: "salary",
|
||||||
|
// align: "left",
|
||||||
|
// label: "ค่าจ้าง",
|
||||||
|
// sortable: true,
|
||||||
|
// field: "salary",
|
||||||
|
// headerStyle: "font-size: 14px",
|
||||||
|
// style: "font-size: 14px",
|
||||||
|
// sort: (a: string, b: string) =>
|
||||||
|
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
// },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -142,9 +142,9 @@ const visibleColumns = ref<string[]>([
|
||||||
"posPath",
|
"posPath",
|
||||||
"posType",
|
"posType",
|
||||||
"posLevel",
|
"posLevel",
|
||||||
"posOc",
|
"org",
|
||||||
"year",
|
// "year",
|
||||||
"salary",
|
// "salary",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function updatePagePagination() {
|
function updatePagePagination() {
|
||||||
|
|
@ -292,11 +292,9 @@ watch(
|
||||||
<span class="text-weight-medium" v-if="col.name === 'posLevel'">{{
|
<span class="text-weight-medium" v-if="col.name === 'posLevel'">{{
|
||||||
empType === "officer" ? col.label : "ระดับชั้นงาน"
|
empType === "officer" ? col.label : "ระดับชั้นงาน"
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span class="text-weight-medium" v-else-if="col.name === 'posPath'">{{
|
||||||
class="text-weight-medium"
|
empType === "officer" ? col.label : "กลุ่มงาน"
|
||||||
v-else-if="col.name === 'posPath'"
|
}}</span>
|
||||||
>{{ empType === "officer" ? col.label : "กลุ่มงาน" }}</span
|
|
||||||
>
|
|
||||||
|
|
||||||
<span class="text-weight-medium" v-else>{{ col.label }}</span>
|
<span class="text-weight-medium" v-else>{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
|
|
@ -310,7 +308,7 @@ watch(
|
||||||
(formFilter.page - 1) * formFilter.pageSize + props.rowIndex + 1
|
(formFilter.page - 1) * formFilter.pageSize + props.rowIndex + 1
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<template v-else-if="col.name == 'fullName'">
|
<div v-else-if="col.name == 'fullName'">
|
||||||
<div class="row col-12 wrap items-center">
|
<div class="row col-12 wrap items-center">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
|
|
@ -332,10 +330,10 @@ watch(
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
<template v-else>
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</template>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue