fix Columns Org
This commit is contained in:
parent
5a47f5be5b
commit
b8b812c319
8 changed files with 72 additions and 59 deletions
|
|
@ -22,6 +22,7 @@ const {
|
||||||
findPosMasterNoOld,
|
findPosMasterNoOld,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
|
findOrgNameOldHtml,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
|
|
@ -108,7 +109,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organization",
|
field: "organizationPositionOld",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (val, row) => findOrgNameOld(row),
|
format: (val, row) => findOrgNameOld(row),
|
||||||
|
|
@ -306,14 +307,13 @@ function onSearch() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ findOrgNameOldHtml(props.row) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{
|
{{
|
||||||
col.value == null
|
col.value == null
|
||||||
? ""
|
? ""
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่ง/สังกัดเดิม",
|
label: "ตำแหน่ง/สังกัดเดิม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -309,11 +312,13 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'affiliation' ? 'table_ellipsis' : ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ props.row.organizationPositionOld ?? '-' }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่ง/สังกัดเดิม",
|
label: "ตำแหน่ง/สังกัดเดิม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -261,14 +264,13 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ props.row.organizationPositionOld ?? "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{ !col.value ? "-" : col.value }}
|
{{ !col.value ? "-" : col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่ง/สังกัดเดิม",
|
label: "ตำแหน่ง/สังกัดเดิม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -241,16 +244,14 @@ watch(
|
||||||
<div v-if="col.name === 'no'">
|
<div v-if="col.name === 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ props.row.organizationPositionOld ?? "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organization",
|
name: "organization",
|
||||||
|
|
@ -303,14 +306,13 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis2'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ props.row.organizationPositionOld ?? "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{
|
{{
|
||||||
col.value == null ? "" : col.value == "" ? "-" : col.value
|
col.value == null ? "" : col.value == "" ? "-" : col.value
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ const {
|
||||||
findOrgNameOld,
|
findOrgNameOld,
|
||||||
findPosMasterNoOld,
|
findPosMasterNoOld,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
|
findOrgNameOldHtml,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** Table*/
|
/** Table*/
|
||||||
|
|
@ -111,8 +112,8 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สังกัด",
|
label: "สังกัด",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organization",
|
field: "organizationPositionOld",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px;min-width: 280px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (val, row) => findOrgNameOld(row),
|
format: (val, row) => findOrgNameOld(row),
|
||||||
},
|
},
|
||||||
|
|
@ -405,14 +406,13 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ findOrgNameOldHtml(props.row) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{
|
{{
|
||||||
col.value == null ? "" : col.value == "" ? "-" : col.value
|
col.value == null ? "" : col.value == "" ? "-" : col.value
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่ง/สังกัดเดิม",
|
label: "ตำแหน่ง/สังกัดเดิม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -154,7 +157,7 @@ function openDetail(id: string) {
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.repatriationMain()+`?status=${status.value}`)
|
.get(config.API.repatriationMain() + `?status=${status.value}`)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -363,16 +366,14 @@ onMounted(async () => {
|
||||||
<div v-if="col.name === 'no'">
|
<div v-if="col.name === 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis2'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ props.row.organizationPositionOld ?? "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{ !col.value ? "-" : col.value }}
|
{{ !col.value ? "-" : col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "ตำแหน่ง/สังกัดเดิม",
|
label: "ตำแหน่ง/สังกัดเดิม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -355,14 +358,13 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
:class="
|
class="text-html"
|
||||||
col.name === 'organizationPositionOld' ||
|
|
||||||
col.name === 'organization'
|
|
||||||
? 'table_ellipsis2'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
|
{{ props.row.organizationPositionOld ?? "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue