This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-03-24 09:08:00 +07:00
parent 77381dbd09
commit 924ca29cb1
6 changed files with 51 additions and 12 deletions

View file

@ -115,6 +115,9 @@ const columns = ref<QTableProps["columns"]>([
label: "สังกัด",
sortable: false,
field: "org",
format(val, row) {
return val.replace(/(.*)\s(.*)$/, "$1\n$2");
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -361,7 +364,11 @@ onMounted(() => {
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{
(formFilter.page - 1) * formFilter.pageSize + props.rowIndex + 1
(
(formFilter.page - 1) * formFilter.pageSize +
props.rowIndex +
1
)?.toLocaleString()
}}
</div>
<div v-else-if="col.name == 'fullName'">
@ -414,7 +421,11 @@ onMounted(() => {
</q-item>
</div>
</div>
<div v-else class="table_ellipsis">
<div v-else-if="col.name === 'org'" class="text-html">
{{ col.value ? col.value : "-" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -282,7 +282,7 @@ onMounted(() => {
<div class="col-12 col-sm-12 col-md-5 text-grey-6 text-weight-medium">
<div>งก</div>
</div>
<div class="col-12 col-sm-12 col-md-7">
<div class="col-12 col-sm-12 col-md-7 text-html">
{{ formMain.ocId ? formMain.ocId : "-" }}
</div>
</div>

View file

@ -52,6 +52,7 @@ const {
formatDatePosition,
findOrgName,
convertDateToAPI,
findOrgNameHtml,
} = useCounterMixin();
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
@ -195,8 +196,9 @@ const baseColumns = ref<QTableColumn[]>([
label: "สังกัด",
sortable: true,
field: "organization",
headerStyle: "font-size: 14px",
headerStyle: "font-size: 14px;",
style: "font-size: 14px",
format(val, row) {
return findOrgName({
root: row.orgRoot,
@ -960,8 +962,21 @@ onMounted(async () => {
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
</div>
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
{{ col.value ? col.value : "-" }}
<div
v-else-if="col.name == 'organization'"
class="text-html"
>
{{
props.row
? findOrgNameHtml({
root: props.row.orgRoot,
child1: props.row.orgChild1,
child2: props.row.orgChild2,
child3: props.row.orgChild3,
child4: props.row.orgChild4,
})
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}

View file

@ -50,6 +50,7 @@ const {
pathRegistryEmp,
onSearchDataTable,
convertDateToAPI,
findOrgNameHtml,
} = useCounterMixin();
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
@ -906,8 +907,18 @@ onMounted(async () => {
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
</div>
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
{{ col.value ? col.value : "-" }}
<div v-else-if="col.name == 'organization'" class="text-html">
{{
props.row
? findOrgNameHtml({
root: props.row.orgRoot,
child1: props.row.orgChild1,
child2: props.row.orgChild2,
child3: props.row.orgChild3,
child4: props.row.orgChild4,
})
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}

View file

@ -61,9 +61,11 @@ const columns = ref<QTableProps["columns"]>([
label: "ลำดับ",
sortable: false,
field: (row) =>
(queryParams.page - 1) * queryParams.pageSize +
rows.value.indexOf(row) +
1,
(
(queryParams.page - 1) * queryParams.pageSize +
rows.value.indexOf(row) +
1
).toLocaleString(),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},

View file

@ -31,7 +31,7 @@ const activeType = defineModel<string>("activeType", { required: true });
const props = defineProps({
isStatusEdit: { type: Boolean, required: true },
data: { type: Object, required: true },
data: { type: Object, required: true, default: () => ({}) },
fetchData: {
type: Function,
required: true,