ผูก API สรุปผลการพิจารณา
This commit is contained in:
parent
e0fa2d9632
commit
4dac59a781
11 changed files with 467 additions and 117 deletions
|
|
@ -1,10 +1,18 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||
import FormResult from "@/modules/11_discipline/components/4_Result/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/result";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
|
|
@ -14,7 +22,7 @@ import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/Dia
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const store = useDisciplineResultStore();
|
||||
const { dialogConfirm } = mixin;
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
|
@ -61,11 +69,201 @@ function sentIssue() {
|
|||
// );
|
||||
}
|
||||
|
||||
const dataResult = ref<Object[]>([]);
|
||||
/** function เรียกรายละเอียดผลการพิจารณาทางวินัย*/
|
||||
async function fetchDetailResult() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listResultById(id.value))
|
||||
.then((res) => {
|
||||
dataResult.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const dataDisciplinary = ref<object>([]);
|
||||
/** function เรียกรายละเอียดสอบสวนความผิดทางวินัย*/
|
||||
async function fetchDetailDisciplinary() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineDisciplinaryById(id.value))
|
||||
.then((res) => {
|
||||
dataDisciplinary.value = res.data.result;
|
||||
// status.value = res.data.result.status;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||
id: "",
|
||||
idComplaint: "",
|
||||
investigationDetail: "",
|
||||
complaint: "",
|
||||
complaintdetail: "",
|
||||
investigationDescription: "",
|
||||
fault: "",
|
||||
investigationDetailOther: "",
|
||||
evidenceFiles: null,
|
||||
fileComplaint: null,
|
||||
clickTime: false,
|
||||
investigationDateStart: null,
|
||||
investigationDateEnd: null,
|
||||
daysExtend: null,
|
||||
investigationStatusResult: "",
|
||||
investigationCauseText: "",
|
||||
complaintStatus: "",
|
||||
result: "",
|
||||
directors: [],
|
||||
disciplineInvestigateDocs: [],
|
||||
disciplineInvestigateRelevantDocs: [],
|
||||
status: "",
|
||||
documentFile: null,
|
||||
respondentType: "",
|
||||
organizationId: "",
|
||||
persons: [],
|
||||
});
|
||||
/** function เรียกรายละเอียดสืบสวนข้อเท็จจริง*/
|
||||
async function fetchDetailInvestigate() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineInvestigateById(id.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataInvestigatefacts.id = dataList.id;
|
||||
dataInvestigatefacts.idComplaint = dataList.idComplaint;
|
||||
dataInvestigatefacts.respondentType = dataList.respondentType;
|
||||
dataInvestigatefacts.persons = dataList.persons;
|
||||
dataInvestigatefacts.investigationDetail = dataList.investigationDetail;
|
||||
dataInvestigatefacts.investigationDetailOther =
|
||||
dataList.investigationDetailOther;
|
||||
dataInvestigatefacts.investigationDateStart =
|
||||
dataList.investigationDateStart;
|
||||
dataInvestigatefacts.investigationDateEnd = dataList.investigationDateEnd;
|
||||
dataInvestigatefacts.investigationDescription =
|
||||
dataList.investigationDescription;
|
||||
dataInvestigatefacts.investigationCauseText =
|
||||
dataList.investigationCauseText;
|
||||
dataInvestigatefacts.status = dataList.status;
|
||||
dataInvestigatefacts.result = dataList.result;
|
||||
dataInvestigatefacts.directors = dataList.director;
|
||||
dataInvestigatefacts.disciplineInvestigateDocs =
|
||||
dataList.disciplineInvestigateDocs;
|
||||
dataInvestigatefacts.disciplineInvestigateRelevantDocs =
|
||||
dataList.disciplineInvestigateRelevantDocs;
|
||||
dataInvestigatefacts.investigationStatusResult =
|
||||
dataList.investigationStatusResult;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const personObjComplaint = reactive<ArrayPerson>({
|
||||
personId: "",
|
||||
idcard: "",
|
||||
name: "",
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
posNo: "",
|
||||
position: "",
|
||||
positionLevel: "",
|
||||
salary: null,
|
||||
organization: "",
|
||||
});
|
||||
const fileListObjComplaint = reactive<ArrayFileList>({
|
||||
id: "",
|
||||
pathName: "",
|
||||
fileName: "",
|
||||
});
|
||||
const dataComplaints = reactive<FormDataComplaint>({
|
||||
id: "",
|
||||
respondentType: "",
|
||||
organizationId: "",
|
||||
consideredAgency: "",
|
||||
title: "",
|
||||
description: "",
|
||||
dateReceived: null,
|
||||
dateConsideration: null,
|
||||
offenseDetails: "",
|
||||
levelConsideration: "",
|
||||
dateNotification: null,
|
||||
complaintFrom: "",
|
||||
appellant: "",
|
||||
documentFile: null,
|
||||
status: "",
|
||||
persons: [personObjComplaint],
|
||||
result: "",
|
||||
disciplineComplaintDocs: [fileListObjComplaint],
|
||||
});
|
||||
/** function เรียกรายละเอียดเรื่องร้องเรียน*/
|
||||
async function fetchDetailComplaints() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineComplaintsById(id.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataComplaints.id = dataList.id;
|
||||
dataComplaints.respondentType = dataList.respondentType;
|
||||
dataComplaints.organizationId = dataList.organizationId;
|
||||
dataComplaints.consideredAgency = dataList.consideredAgency;
|
||||
dataComplaints.title = dataList.title;
|
||||
dataComplaints.description = dataList.description;
|
||||
dataComplaints.dateReceived = dataList.dateReceived;
|
||||
dataComplaints.levelConsideration = dataList.levelConsideration;
|
||||
dataComplaints.dateConsideration = dataList.dateConsideration;
|
||||
dataComplaints.offenseDetails = dataList.offenseDetails;
|
||||
dataComplaints.dateNotification = dataList.dateNotification;
|
||||
dataComplaints.complaintFrom = dataList.complaintFrom;
|
||||
dataComplaints.appellant = dataList.appellant;
|
||||
dataComplaints.status = dataList.status;
|
||||
dataComplaints.persons = dataList.persons;
|
||||
dataComplaints.result = dataList.result;
|
||||
dataComplaints.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(async () => {
|
||||
store.tabMenu = "result";
|
||||
await fetchData();
|
||||
await fetchDetailResult();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => store.tabMenu,
|
||||
async () => {
|
||||
const fetchFunction =
|
||||
store.tabMenu === "disciplinary"
|
||||
? fetchDetailDisciplinary
|
||||
: store.tabMenu === "investigatefacts"
|
||||
? fetchDetailInvestigate
|
||||
: store.tabMenu === "complaints"
|
||||
? fetchDetailComplaints
|
||||
: store.tabMenu === "result"
|
||||
? fetchDetailResult
|
||||
: null;
|
||||
|
||||
fetchFunction && (await fetchFunction());
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
|
|
@ -105,16 +303,23 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<q-tab-panels v-model="store.tabMenu" animated>
|
||||
<q-tab-panel name="complaints">
|
||||
<FormComplaints :on-submit="onSubmit" :data="data" />
|
||||
<FormComplaints :on-submit="onSubmit" :data="dataComplaints" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="investigatefacts">
|
||||
<FormInvestigatefacts :on-submit="onSubmit" :data="data" />
|
||||
<FormInvestigatefacts
|
||||
:on-submit="onSubmit"
|
||||
:data="dataInvestigatefacts"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="disciplinary">
|
||||
<FormDisciplinary :on-submit="onSubmit" :data="data" />
|
||||
<FormDisciplinary :on-submit="onSubmit" :data="dataDisciplinary" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="result">
|
||||
<FormResult :on-submit="onSubmit" :data="data" />
|
||||
<FormResult
|
||||
:on-submit="onSubmit"
|
||||
:data="dataResult"
|
||||
:fetchData="fetchDetailResult"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
|
||||
|
|
@ -14,7 +17,7 @@ const investigateDis = useInvestigateDisStore();
|
|||
const { fecthDirector } = investigateDis;
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, hideLoader, dialogConfirm } = mixin;
|
||||
const { date2Thai, hideLoader, dialogConfirm, success, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
|
|
@ -34,16 +37,20 @@ const props = defineProps({
|
|||
type: Function,
|
||||
default: () => "",
|
||||
},
|
||||
fetchData: {
|
||||
type: Function,
|
||||
default: () => "",
|
||||
},
|
||||
});
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const formData = reactive<FormData>({
|
||||
detail: "",
|
||||
resultDescription: "",
|
||||
});
|
||||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
const objectdisciplinary: FormRef = {
|
||||
detail: detailRef,
|
||||
resultDescription: detailRef,
|
||||
};
|
||||
|
||||
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
|
||||
|
|
@ -74,8 +81,17 @@ function onSubmit() {
|
|||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
console.log(formData);
|
||||
props.onSubmit();
|
||||
await http
|
||||
.put(config.API.listResultById(id.value), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
await props.fetchData();
|
||||
});
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
|
|
@ -83,23 +99,24 @@ function onSubmit() {
|
|||
}
|
||||
|
||||
async function fetchDatadetail() {
|
||||
formData.detail = props.data.detail;
|
||||
formData.resultDescription = props.data.resultDescription;
|
||||
}
|
||||
/**
|
||||
* เช็คข้อมูลจาก props
|
||||
* เมื่อมีข้อมูล
|
||||
* เก็บข้อมูลลง formData
|
||||
*/
|
||||
watch(props.data, async () => {
|
||||
fetchDatadetail();
|
||||
});
|
||||
watch(
|
||||
() => props.data,
|
||||
async () => {
|
||||
await fetchDatadetail();
|
||||
}
|
||||
);
|
||||
|
||||
/**เมื่อเริ่มโหลดหน้า
|
||||
* ส่งข้อมูลจำลองไปยัง store
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await fetchDatadetail();
|
||||
});
|
||||
onMounted(async () => {});
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
|
|
@ -114,7 +131,7 @@ onMounted(async () => {
|
|||
dense
|
||||
outlined
|
||||
ref="detailRef"
|
||||
v-model="formData.detail"
|
||||
v-model="formData.resultDescription"
|
||||
for="#detail"
|
||||
label="สรุปผลการพิจารณา"
|
||||
hide-bottom-space
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import Table from "@/modules/11_discipline/components/4_Result/Table.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
|
|
@ -9,16 +12,51 @@ import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
|||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const router = useRouter();
|
||||
const filter = ref<string>(""); //search data table
|
||||
//search data table
|
||||
const mixin = useCounterMixin();
|
||||
const dataInvestigateDis = useDisciplineResultStore();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { fecthList } = dataInvestigateDis;
|
||||
const store = useDisciplineResultStore();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const { fetchList } = store;
|
||||
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
||||
const page = ref<number>(1);
|
||||
const pageSize = ref<number>(5);
|
||||
const maxPage = ref<number>(1);
|
||||
const filter = ref<string>("");
|
||||
|
||||
/** function เรียกรายการผลการพิจารณาทางวินัย*/
|
||||
async function fetchListResult() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.listResult() +
|
||||
`?page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||
await fetchList(data);
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
async function updateQueryString(p: number, pS: number, key: string) {
|
||||
page.value = pS === pageSize.value ? p : 1;
|
||||
pageSize.value = pS;
|
||||
filter.value = key;
|
||||
await fetchListResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* ไปหน้าแก้ไข
|
||||
* @param id ไอดีเฉพาะ รายบุคคล
|
||||
|
|
@ -32,43 +70,7 @@ function openEdit(id: string) {
|
|||
* ส่งข้อมูลจำลองไปยัง store
|
||||
*/
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
fecthList([
|
||||
{
|
||||
id: "001",
|
||||
subject: "ทุจริตในหน้าที่",
|
||||
interrogated: "ศิรินภา คงน้อยี่",
|
||||
fault: "1",
|
||||
penaltyLevel: "7",
|
||||
caseFault: "ทุจริตในหน้าที่",
|
||||
dateInvestigate: "2023-12-01",
|
||||
status: "0",
|
||||
active: "2",
|
||||
},
|
||||
{
|
||||
id: "002",
|
||||
subject: "ทุจริตในหน้าที่",
|
||||
interrogated: "ภัทรานุช คงน้อย",
|
||||
fault: "1",
|
||||
penaltyLevel: "7",
|
||||
caseFault: "ทุจริตในหน้าที่",
|
||||
dateInvestigate: "2023-11-30",
|
||||
status: "0",
|
||||
active: "0",
|
||||
},
|
||||
{
|
||||
id: "003",
|
||||
subject: "กระทำทุจริตเงินกองทุน",
|
||||
interrogated: "ปรมาพร ศรีมี",
|
||||
fault: "2",
|
||||
penaltyLevel: "1",
|
||||
caseFault: "พบการทุจริต",
|
||||
dateInvestigate: "2023-09-14",
|
||||
status: "1",
|
||||
active: "1",
|
||||
},
|
||||
]);
|
||||
await hideLoader();
|
||||
await fetchListResult();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -80,16 +82,19 @@ onMounted(async () => {
|
|||
<div>
|
||||
<Table
|
||||
style="max-height: 80vh"
|
||||
:rows="dataInvestigateDis.rows"
|
||||
:columns="dataInvestigateDis.columns"
|
||||
:filter="filter"
|
||||
:visible-columns="dataInvestigateDis.visibleColumns"
|
||||
:rows="store.rows"
|
||||
:columns="store.columns"
|
||||
:visible-columns="store.visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="dataInvestigateDis.visibleColumns"
|
||||
v-model:inputvisible="store.visibleColumns"
|
||||
:pagination="initialPagination"
|
||||
:nornmalData="true"
|
||||
:paging="true"
|
||||
:titleText="''"
|
||||
:page="page"
|
||||
:pageSize="pageSize"
|
||||
:maxPage="maxPage"
|
||||
@update:queryString="updateQueryString"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs } from "vue";
|
||||
import { ref, useAttrs, watch } from "vue";
|
||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
||||
|
||||
const table = ref<any>(null);
|
||||
const filterRef = ref<any>(null);
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
// sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
|
|
@ -35,19 +29,32 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
defualt: false,
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
},
|
||||
pageSize: {
|
||||
type: Number,
|
||||
},
|
||||
maxPage: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const filter = ref<string>("");
|
||||
const pagination = ref({
|
||||
descending: false,
|
||||
page: props.page,
|
||||
rowsPerPage: props.pageSize,
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
"update:inputfilter",
|
||||
"update:inputvisible",
|
||||
"update:editvisible",
|
||||
"update:queryString",
|
||||
]);
|
||||
|
||||
function paginationLabel(start: string, end: string, total: string) {
|
||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||
else return start + "-" + end + " ใน " + total;
|
||||
}
|
||||
|
||||
function updateInput(value: string | number | null) {
|
||||
emit("update:inputfilter", value);
|
||||
}
|
||||
|
|
@ -61,6 +68,22 @@ function resetFilter() {
|
|||
emit("update:inputfilter", "");
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
updatePaging(
|
||||
currentPage.value,
|
||||
Number(pagination.value.rowsPerPage),
|
||||
filter.value
|
||||
);
|
||||
}
|
||||
|
||||
function updatePaging(p: number, pS: number, key: string) {
|
||||
emit("update:queryString", p, pS, key);
|
||||
}
|
||||
|
||||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||
filterFn();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -82,9 +105,9 @@ function resetFilter() {
|
|||
<q-input
|
||||
standout
|
||||
dense
|
||||
:model-value="inputfilter"
|
||||
v-model="filter"
|
||||
ref="filterRef"
|
||||
@update:model-value="updateInput"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
|
|
@ -92,9 +115,9 @@ function resetFilter() {
|
|||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="inputfilter == ''" name="search" />
|
||||
<q-icon v-if="filter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="inputfilter !== ''"
|
||||
v-if="filter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
|
|
@ -125,8 +148,8 @@ function resetFilter() {
|
|||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
dense
|
||||
:pagination-label="paginationLabel"
|
||||
v-model:pagination="pagination"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
@ -138,6 +161,17 @@ function resetFilter() {
|
|||
<template #body="props">
|
||||
<slot v-bind="props" name="columns"></slot>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="currentPage"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="Number(props.maxPage)"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</d-table>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue