แก้ space ขึ้นบรรทัดใหม่ เเก้คำ พ้นราชการ

This commit is contained in:
setthawutttty 2025-03-19 17:41:35 +07:00
parent 90ed596dec
commit b8f971e251
23 changed files with 377 additions and 170 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { reactive, ref, watch } from "vue";
import { reactive, ref, watch, computed } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
@ -18,13 +18,14 @@ const {
showLoader,
hideLoader,
dialogConfirm,
findOrgName,
findOrgChildName,
} = mixin;
const route = useRoute();
const retireld_params = route.params.id;
/** props*/
const props = defineProps({
employeeType: Boolean,
retireld: String,
profileId: String,
dataProfile: Object,
@ -34,12 +35,12 @@ const props = defineProps({
},
});
const modal = ref<boolean>(false);
const modal = defineModel<boolean>("modal", { required: true });
const retireld = ref<any>();
const type = ref<any>();
/** คอลัมน์ */
const columns = ref<any["columns"]>([
const columns = computed(() => [
{
name: "index",
required: true,
@ -57,14 +58,14 @@ const columns = ref<any["columns"]>([
{
name: "position",
required: true,
label: "ตำแหน่งในสายงาน",
label: props.employeeType ? "ตำแหน่งในสายงาน" : "ตำแหน่ง",
field: "position",
align: "left",
},
{
name: "level",
required: true,
label: "ประเภทตำแหน่ง",
label: props.employeeType ? "ตำแหน่งประเภท" : "กลุ่มงาน",
field: "level",
align: "left",
},
@ -78,42 +79,6 @@ const columns = ref<any["columns"]>([
]);
const rows = ref<PersonData[]>([]);
function findOrgChildName(obj: any) {
if (obj) {
let name =
obj.orgChild4Name != null && obj.orgChild3Name != null
? obj.orgChild4Name + " "
: obj.orgChild4Name != null
? obj.orgChild4Name
: "";
name +=
obj.orgChild3Name != null && obj.orgChild2Name != null
? obj.orgChild3Name + " "
: obj.orgChild3Name !== null
? obj.orgChild3Name
: "";
name +=
obj.orgChild2Name != null && obj.orgChild1Name != null
? obj.orgChild2Name + " "
: obj.orgChild2Name != null
? obj.orgChild2Name
: "";
name +=
obj.orgChild1Name != null && obj.orgRootName != null
? obj.orgChild1Name + " "
: obj.orgChild1Name != null
? obj.orgChild1Name
: "";
name += obj.orgRootName != null ? obj.orgRootName : "";
return name == "" ? "-" : name;
} else {
return "";
}
}
const formPagePersonList = reactive({ keyword: "", pageSize: 10, page: 1 });
const maxPage = ref<number>(1);
const totalList = ref<number>(0);
@ -251,11 +216,7 @@ watch(modal, () => {
</script>
<template>
<q-btn flat round color="primary" icon="mdi-plus" @click="modal = true">
<q-tooltip>เพมรายช</q-tooltip></q-btn
>
<q-dialog v-model="modal" Persistent>
<q-dialog v-model="modal" persistent>
<q-card style="width: 900px; max-width: 80vw">
<DialogHeader :tittle="'เพิ่มรายชื่อ'" :close="closeDialog" />
<q-separator />
@ -315,12 +276,10 @@ watch(modal, () => {
{{ props.row.position ? props.row.position : "-" }}
</q-td>
<q-td key="level" :props="props">{{ props.row.level }}</q-td>
<q-td
key="organizationOrganization"
:props="props"
class="table_ellipsis"
>
{{ props.row.organizationOrganization }}
<q-td key="organizationOrganization" :props="props">
<div class="text-html">
{{ props.row.organizationOrganization }}
</div>
</q-td>
<q-td>
<q-btn

View file

@ -64,7 +64,6 @@ function clickAdd() {
round: `รอบ ${e.round} (ประกาศ ณ วันที่ ${e.signDate})`,
}));
actionOption.value = list;
console.log("🚀 ~ clickAdd ~ actionOption.value:", actionOption.value);
}
}
}

View file

@ -31,11 +31,13 @@ const {
date2Thai,
dateToISO,
findOrgName,
findOrgNameHtml,
onSearchDataTable,
} = mixin;
const myForm = ref<QForm | null>(null);
/** ตัวแปร */
const modal = ref<boolean>(false);
const retireld_params = route.params.retirementId;
const retireld = ref<string>(retireld_params.toString());
const modalPersonal = ref<boolean>(false);
@ -54,7 +56,7 @@ const fileUpload = ref<any>(null);
const round = ref<number>();
const typeReport = ref<string>("");
const statusReport = ref<boolean>();
const dataProfile = ref<Object>([]);
const dataProfile = ref<any>([]);
/** คอลัมน์ที่แสดง */
const columns = computed(() => [
@ -75,6 +77,9 @@ const columns = computed(() => [
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val: any, row: any) {
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
},
},
{
name: "position",
@ -92,8 +97,8 @@ const columns = computed(() => [
label: `ตำแหน่ง (${
employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน"
})`,
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน",
title: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "กลุ่มงาน",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "",
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -103,8 +108,8 @@ const columns = computed(() => [
name: "positionNumber",
align: "left",
label: "ตำแหน่ง (เลขที่)",
title: "ตำแหน่ง",
subtitle: "เลขที่",
title: employeeType.value == "OFFICER" ? "เลขที่" : "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "เลขที่",
field: "positionNumber",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -168,7 +173,6 @@ async function fetchlistprofile(id: string) {
prefix: e.prefix,
firstName: e.firstName,
lastName: e.lastName,
name: `${e.prefix}${e.firstName} ${e.lastName}`,
organization: e.root,
position: e.position,
positionNumber: e.posNo,
@ -452,18 +456,15 @@ onMounted(async () => {
<q-card class="col-12 q-pa-md">
<div class="row col-12 q-pb-sm">
<div class="row">
<AddList
:dataProfile="dataProfile"
:retireld="retireld"
:profile-id="profileId"
:UpdateListId="UpdateListId"
v-if="
!checkRoutePermisson &&
!statusReport &&
(typeReport == 'ADD' || typeReport == '' || typeReport == null) &&
!statusUpload
"
/>
<q-btn
flat
round
color="primary"
icon="mdi-plus"
@click="modal = true"
>
<q-tooltip>เพมรายช</q-tooltip></q-btn
>
<q-btn color="primary" flat round icon="mdi-dots-vertical">
<q-menu>
<q-list style="min-width: 100px">
@ -670,7 +671,10 @@ onMounted(async () => {
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div class="table_ellipsis">
<div v-if="col.name == 'organization'" class="text-html">
{{ props.row ? findOrgNameHtml(props.row) : "-" }}
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
@ -845,11 +849,27 @@ onMounted(async () => {
:textReport="textReport"
/>
<AddList
v-model:modal="modal"
v-model:dataProfile="dataProfile"
:retireld="retireld"
:employeeType="employeeType == 'OFFICER' ? true : false"
:profile-id="profileId"
:UpdateListId="UpdateListId"
v-if="
!checkRoutePermisson &&
!statusReport &&
(typeReport == 'ADD' || typeReport == '' || typeReport == null) &&
!statusUpload
"
/>
<PopupPersonal
:modal="modalPersonal"
:id="personId"
@update:modal="updatemodalPersonal"
v-model:is-employee="employeeType"
:type="employeeType === 'OFFICER' ? 'officer' : 'employee'"
/>
</template>

View file

@ -33,7 +33,7 @@ const dataMapToSend = computed(() => {
}));
});
const mixin = useCounterMixin();
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
const { dialogConfirm, date2Thai, onSearchDataTable, textTranForm } = mixin;
/** props*/
const props = defineProps({
@ -41,11 +41,11 @@ const props = defineProps({
closeModal: { type: Function, requreid: true },
fecthList: { type: Function, requreid: true },
rows: { type: Array as PropType<ResponseItems[]>, requreid: true },
filterKeyword2: { type: String, requreid: true },
mainTabs: { type: String, requreid: true },
});
//Table
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
const rowsData = ref<ResponseItems[]>([]);
const rowsDataMain = ref<ResponseItems[]>([]);
const columns = ref<QTableProps["columns"]>([
@ -84,7 +84,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -104,7 +104,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
@ -118,6 +118,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: "datetext",
@ -161,7 +164,6 @@ const modalCommand = ref<boolean>(false);
/** popup ยืนยันส่งัว */
function saveOrder() {
console.log(selected.value);
dialogConfirm(
$q,
@ -181,7 +183,7 @@ function updateInput(value: any) {
async function onSearch() {
rowsData.value = onSearchDataTable(
props.filterKeyword2 ? props.filterKeyword2 : "",
filterKeyword.value,
rowsDataMain.value,
columns.value ? columns.value : []
);
@ -214,8 +216,7 @@ watch(
borderless
outlined
dense
:model-value="filterKeyword2"
@update:model-value="updateInput"
v-model="filterKeyword"
@keydown.enter="onSearch"
placeholder="ค้นหา"
>
@ -269,14 +270,17 @@ watch(
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis2'
: ''
"
v-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{ col.value ? col.value : "" }}
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>

View file

@ -1274,9 +1274,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ตำแหน่ง'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
:label="`${'เลขที่ตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -636,9 +636,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ตำแหน่ง'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
:label="`${'เลขที่ตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -23,8 +23,15 @@ const stroeResign = useDataStore();
const { statusText } = stroe;
const router = useRouter();
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } =
mixin;
const {
messageError,
date2Thai,
showLoader,
hideLoader,
onSearchDataTable,
findOrgName,
textTranForm,
} = mixin;
/** Table */
const rows = ref<ResponseItems[]>([]);
@ -65,7 +72,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -85,7 +92,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
@ -99,6 +106,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: "datetext",
@ -377,7 +387,19 @@ onMounted(async () => {
: ''
"
>
{{ col.value ? col.value : "-" }}
<div
v-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</div>
</q-td>
</q-tr>
@ -389,7 +411,7 @@ onMounted(async () => {
<DialogSendToCommand
v-model:modal="modal"
v-model:filter-keyword2="filterKeyword2"
v-model:filter-keyword="filterKeyword2"
:close-modal="closeModal"
:rows="rowsSendToCommand"
:fecth-list="fecthlist"

View file

@ -33,7 +33,7 @@ const dataMapToSend = computed(() => {
}));
});
const mixin = useCounterMixin();
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
const { dialogConfirm, date2Thai, onSearchDataTable, textTranForm } = mixin;
/** props*/
const props = defineProps({
@ -41,10 +41,11 @@ const props = defineProps({
closeModal: { type: Function, requreid: true },
fecthList: { type: Function, requreid: true },
rows: { type: Array as PropType<ResponseItems[]>, requreid: true },
filterKeyword2: { type: String, requreid: true },
mainTabs: { type: String, requreid: true },
});
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
//Table
const rowsData = ref<ResponseItems[]>([]);
const rowsDataMain = ref<ResponseItems[]>([]);
@ -104,7 +105,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
label: "ตำแหน่งเลขที่",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
@ -118,6 +119,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: "datetext",
@ -179,7 +183,7 @@ function updateInput(value: any) {
async function onSearch() {
rowsData.value = onSearchDataTable(
props.filterKeyword2 ? props.filterKeyword2 : "",
filterKeyword.value,
rowsDataMain.value,
columns.value ? columns.value : []
);
@ -212,8 +216,7 @@ watch(
borderless
outlined
dense
:model-value="filterKeyword2"
@update:model-value="updateInput"
:model-value="filterKeyword"
placeholder="ค้นหา"
@keydown.enter="onSearch"
>
@ -267,14 +270,17 @@ watch(
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis2'
: ''
"
v-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{ col.value ? col.value : "" }}
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>

View file

@ -1295,9 +1295,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
:label="`${'ตำแหน่งเลขที่'}`"
/>
</div>
</div>

View file

@ -667,9 +667,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
:label="`${'ตำแหน่งเลขที่'}`"
/>
</div>
</div>

View file

@ -23,8 +23,14 @@ const stroeResign = useDataStore();
const { statusText } = stroe;
const router = useRouter();
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader, onSearchDataTable } =
mixin;
const {
messageError,
date2Thai,
showLoader,
hideLoader,
onSearchDataTable,
textTranForm,
} = mixin;
/** Table */
const rows = ref<ResponseItems[]>([]);
@ -85,7 +91,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
label: "ตำแหน่งเลขที่",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
@ -99,6 +105,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: "datetext",
@ -374,13 +383,16 @@ onMounted(async () => {
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis2'
: ''
"
v-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
@ -393,7 +405,7 @@ onMounted(async () => {
<DialogSendToCommand
v-model:modal="modal"
v-model:filter-keyword2="filterKeyword2"
v-model:filter-keyword="filterKeyword2"
:close-modal="closeModal"
:rows="rowsSendToCommand"
:fecth-list="fecthlist"

View file

@ -274,9 +274,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
</div>
@ -306,9 +306,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ตำแหน่ง'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
:label="`${'เลขที่ตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -307,9 +307,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
:label="`${'ตำแหน่งเลขที่'}`"
/>
</div>
</div>

View file

@ -52,6 +52,7 @@ const {
hideLoader,
date2Thai,
onSearchDataTable,
textTranForm,
} = mixin;
/** คอลัมน์ */
@ -80,7 +81,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -105,6 +106,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: "createdAt",
@ -256,10 +260,14 @@ watchEffect(() => {
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="col.name === 'org' ? 'table_ellipsis' : ''"
>
<div v-else-if="col.name == 'org'" class="text-html">
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -52,6 +52,7 @@ const {
hideLoader,
date2Thai,
onSearchDataTable,
textTranForm,
} = mixin;
/** คอลัมน์ */
@ -105,6 +106,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: "createdAt",
@ -257,9 +261,16 @@ watchEffect(() => {
</div>
<div
v-else
:class="col.name === 'org' ? 'table_ellipsis' : ''"
v-else-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -189,7 +189,6 @@ async function fecthlist() {
});
rows.value = list;
rowsData.value = list;
console.log(rows.value);
filters.value = list;
})

View file

@ -23,6 +23,7 @@ const {
date2Thai,
findOrgName,
onSearchDataTable,
findOrgNameHtml,
} = mixin;
/** คอลัมน์ */
@ -62,7 +63,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "profileType",
align: "left",
label: "สถานภาพ",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "profileType",
headerStyle: "font-size: 14px",
@ -89,7 +90,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -155,7 +156,6 @@ async function fectListDecased() {
.get(config.API.listDeceased())
.then((res) => {
const data = res.data.result;
console.log(data);
rows.value = data;
rowsData.value = data;
@ -214,7 +214,7 @@ onMounted(() => {
map-options
option-value="id"
option-label="name"
label="สถานภาพ"
label="ประเภทตำแหน่ง"
:clearable="employeeClass !== ''"
style="width: 200px"
@clear="employeeClass = ''"
@ -294,10 +294,10 @@ onMounted(() => {
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="col.name === 'org' ? 'table_ellipsis' : ''"
>
<div v-else-if="col.name == 'org'" class="text-html">
{{ props.row ? findOrgNameHtml(props.row) : "-" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -29,6 +29,7 @@ const {
success,
onSearchDataTable,
dialogRemove,
textTranForm,
} = mixin;
const modal = ref<boolean>(false);
@ -79,7 +80,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -104,6 +105,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: "createdAt",
@ -370,15 +374,17 @@ onMounted(async () => {
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="
col.name === 'organizationPositionOld'
? 'table_ellipsis2'
: ''
"
v-else-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -29,6 +29,7 @@ const {
success,
onSearchDataTable,
dialogRemove,
textTranForm,
} = mixin;
const modal = ref<boolean>(false);
@ -104,6 +105,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: "createdAt",
@ -160,7 +164,6 @@ async function getData() {
.then((res) => {
const data = res.data.result;
rows.value = data;
console.log("🚀 ~ .then ~ data:", data)
rowsData.value = data;
filters.value = data;
onSearch();
@ -378,13 +381,16 @@ onMounted(async () => {
</div>
<div
v-else
:class="
col.name === 'organizationPositionOld'
? 'table_ellipsis2'
: ''
"
v-else-if="col.name == 'organizationPositionOld'"
class="text-html"
>
{{
props.row.organizationPositionOld
? textTranForm(props.row.organizationPositionOld)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>