fix
This commit is contained in:
parent
77381dbd09
commit
924ca29cb1
6 changed files with 51 additions and 12 deletions
|
|
@ -115,6 +115,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "org",
|
field: "org",
|
||||||
|
format(val, row) {
|
||||||
|
return val.replace(/(.*)\s(.*)$/, "$1\n$2");
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -361,7 +364,11 @@ onMounted(() => {
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name === 'no'">
|
<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>
|
||||||
<div v-else-if="col.name == 'fullName'">
|
<div v-else-if="col.name == 'fullName'">
|
||||||
|
|
@ -414,7 +421,11 @@ onMounted(() => {
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
</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 : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ onMounted(() => {
|
||||||
<div class="col-12 col-sm-12 col-md-5 text-grey-6 text-weight-medium">
|
<div class="col-12 col-sm-12 col-md-5 text-grey-6 text-weight-medium">
|
||||||
<div>สังกัด</div>
|
<div>สังกัด</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 : "-" }}
|
{{ formMain.ocId ? formMain.ocId : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ const {
|
||||||
formatDatePosition,
|
formatDatePosition,
|
||||||
findOrgName,
|
findOrgName,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
|
findOrgNameHtml,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||||
|
|
@ -195,8 +196,9 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organization",
|
field: "organization",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px;",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return findOrgName({
|
return findOrgName({
|
||||||
root: row.orgRoot,
|
root: row.orgRoot,
|
||||||
|
|
@ -960,8 +962,21 @@ onMounted(async () => {
|
||||||
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
|
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
|
<div
|
||||||
{{ col.value ? col.value : "-" }}
|
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>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
|
findOrgNameHtml,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||||
|
|
@ -906,8 +907,18 @@ onMounted(async () => {
|
||||||
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
|
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
|
<div v-else-if="col.name == 'organization'" class="text-html">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{
|
||||||
|
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>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "ลำดับ",
|
label: "ลำดับ",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: (row) =>
|
field: (row) =>
|
||||||
(queryParams.page - 1) * queryParams.pageSize +
|
(
|
||||||
rows.value.indexOf(row) +
|
(queryParams.page - 1) * queryParams.pageSize +
|
||||||
1,
|
rows.value.indexOf(row) +
|
||||||
|
1
|
||||||
|
).toLocaleString(),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const activeType = defineModel<string>("activeType", { required: true });
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isStatusEdit: { type: Boolean, required: true },
|
isStatusEdit: { type: Boolean, required: true },
|
||||||
data: { type: Object, required: true },
|
data: { type: Object, required: true, default: () => ({}) },
|
||||||
fetchData: {
|
fetchData: {
|
||||||
type: Function,
|
type: Function,
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue