สมรรถนะ => Bug paging กลุ่มงาน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-23 16:21:59 +07:00
parent b9d43329cf
commit 7eb364b152
3 changed files with 80 additions and 31 deletions

View file

@ -174,7 +174,7 @@ function onAdd() {
modal.value = true;
}
async function onEdit(data: any) {
async function onEdit(data: any) {
id.value = data;
await getOptions();
await getListGroup();
@ -191,11 +191,11 @@ function getDataEdit(id: string) {
.then((res) => {
const data = res.data.result;
groupName.value = {
id:data.groupId,
name:data.groupName
}
position.value = data.positions.map((i:any) => i.name);
competency.value = data.capacitys.map((i:any) => i.id);
id: data.groupId,
name: data.groupName,
};
position.value = data.positions.map((i: any) => i.name);
competency.value = data.capacitys.map((i: any) => i.id);
})
.finally(() => {
hideLoader();
@ -213,7 +213,7 @@ function onSubmit() {
};
dialogConfirm($q, () => {
http[editStatus.value ? "put" : "post"](url, body)
.then((res) => {
.then(() => {
success($q, "บันทึกสำเร็จ");
close();
getData();
@ -272,18 +272,6 @@ onMounted(async () => {
<template>
<q-toolbar style="padding: 0">
<!-- <q-select
v-model="competencyType"
outlined
label="ประเภทสมรรถนะ"
dense
option-label="name"
option-value="id"
:options="competencyTypeOp"
style="min-width: 200px"
emit-value
map-options
/> -->
<q-btn flat round color="primary" icon="add" @click="onAdd()">
<q-tooltip> เพมขอม </q-tooltip>
</q-btn>
@ -321,6 +309,7 @@ onMounted(async () => {
class="custom-header-table"
:visible-columns="visibleColumns"
:separator="'cell'"
:rows-per-page-options="[10, 25, 50, 100]"
>
<template v-slot:header="props">
<q-tr :props="props">
@ -332,12 +321,7 @@ onMounted(async () => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.id"
class="vertical-top"
>
<q-td v-for="col in props.cols" :key="col.id" class="vertical-top">
<div v-if="col.name == 'positions'">
<div v-if="col.value.length !== 0">
<div v-for="(pos, index) in col.value" :key="pos.id">