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