2023-10-16 18:07:42 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted } from "vue";
|
|
|
|
|
import { useRouter } from "vue-router";
|
2023-10-19 15:39:18 +07:00
|
|
|
|
2023-10-20 10:31:07 +07:00
|
|
|
// import type
|
2023-10-19 15:39:18 +07:00
|
|
|
import type { DataList } from "@/modules/11_discipline/interface/response/complaint";
|
2023-10-16 18:07:42 +07:00
|
|
|
// importStroe
|
2023-10-19 15:39:18 +07:00
|
|
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
2023-10-20 10:31:07 +07:00
|
|
|
// impoet Components
|
|
|
|
|
import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue";
|
2023-10-19 15:39:18 +07:00
|
|
|
|
2023-10-16 18:07:42 +07:00
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
const complainstStore = useComplainstDataStore();
|
2023-10-19 15:39:18 +07:00
|
|
|
const { fetchComplainst } = complainstStore; // function จาก stores
|
2023-10-16 18:07:42 +07:00
|
|
|
|
|
|
|
|
//ข้อมูล Table
|
|
|
|
|
const filterTable = ref<string>("");
|
2023-10-20 10:31:07 +07:00
|
|
|
|
2023-10-16 18:07:42 +07:00
|
|
|
onMounted(async () => {
|
2023-10-19 15:39:18 +07:00
|
|
|
await fetchListComplaints();
|
2023-10-16 18:07:42 +07:00
|
|
|
});
|
|
|
|
|
|
2023-10-18 14:41:11 +07:00
|
|
|
// เรีนกรายการเรื่องร้องเรียน
|
2023-10-19 15:39:18 +07:00
|
|
|
async function fetchListComplaints() {
|
|
|
|
|
const listData: DataList[] = [
|
2023-10-16 18:07:42 +07:00
|
|
|
{
|
|
|
|
|
subject: "ทุจริตในหน้าที่",
|
|
|
|
|
detail: "มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน",
|
|
|
|
|
complainant: "นางศิรินภา คงน้อย",
|
|
|
|
|
offenseDescription: "ร้ายแรง",
|
2023-10-26 13:47:42 +07:00
|
|
|
creationDate: new Date("2023-12-01"),
|
2023-10-16 18:07:42 +07:00
|
|
|
considerationLevel: "ด่วนมาก",
|
2023-10-26 13:47:42 +07:00
|
|
|
considerationDeadlineDate: new Date("2023-12-02"),
|
2023-10-16 18:07:42 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
subject: "ทุจริตในหน้าที่",
|
|
|
|
|
detail: "มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน",
|
|
|
|
|
complainant: "นายแก้ว คำ",
|
|
|
|
|
offenseDescription: "ร้ายแรง",
|
2023-10-26 13:47:42 +07:00
|
|
|
creationDate: new Date("2023-12-01"),
|
2023-10-16 18:07:42 +07:00
|
|
|
considerationLevel: "ด่วนมาก",
|
2023-10-26 13:47:42 +07:00
|
|
|
considerationDeadlineDate: new Date("2023-12-02"),
|
2023-10-16 18:07:42 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
subject: "ทุจริตในหน้าที่",
|
|
|
|
|
detail:
|
|
|
|
|
"มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน",
|
|
|
|
|
complainant: "นายภัทรานุย คงนอย",
|
|
|
|
|
offenseDescription: "ร้ายแรง",
|
2023-10-26 13:47:42 +07:00
|
|
|
creationDate: new Date("2023-12-01"),
|
2023-10-16 18:07:42 +07:00
|
|
|
considerationLevel: "ด่วนมาก",
|
2023-10-26 13:47:42 +07:00
|
|
|
considerationDeadlineDate: new Date("2023-12-02"),
|
2023-10-16 18:07:42 +07:00
|
|
|
},
|
|
|
|
|
];
|
2023-10-19 15:39:18 +07:00
|
|
|
await fetchComplainst(listData);
|
2023-10-16 18:07:42 +07:00
|
|
|
}
|
|
|
|
|
function redirectToPageadd() {
|
|
|
|
|
router.push(`/discipline/complaints/add`);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2023-10-16 13:28:48 +07:00
|
|
|
|
|
|
|
|
<template>
|
2023-10-16 18:07:42 +07:00
|
|
|
<div class="toptitle text-dark col-12 row items-center">เรื่องร้องเรียน</div>
|
2023-10-20 16:50:28 +07:00
|
|
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
2023-10-24 15:03:48 +07:00
|
|
|
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
|
|
|
|
<div>
|
|
|
|
|
<q-btn
|
|
|
|
|
id="addComplaints"
|
|
|
|
|
for="addComplaints"
|
|
|
|
|
size="12px"
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
color="primary"
|
|
|
|
|
icon="mdi-plus"
|
|
|
|
|
@click="redirectToPageadd()"
|
|
|
|
|
><q-tooltip>เพิ่มเรื่องร้องเรียน </q-tooltip></q-btn
|
|
|
|
|
>
|
2023-10-16 18:07:42 +07:00
|
|
|
</div>
|
2023-10-24 15:03:48 +07:00
|
|
|
<q-space />
|
|
|
|
|
<q-input
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-2"
|
|
|
|
|
id="filterTable"
|
|
|
|
|
for="filterTable"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
v-model="filterTable"
|
|
|
|
|
label="ค้นหา"
|
2023-10-31 14:55:55 +07:00
|
|
|
debounce="300"
|
2023-10-24 15:03:48 +07:00
|
|
|
>
|
|
|
|
|
<template v-slot:append>
|
|
|
|
|
<q-icon name="search" />
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
<q-select
|
|
|
|
|
id="visibleColumns"
|
|
|
|
|
for="visibleColumns"
|
|
|
|
|
v-model="complainstStore.visibleColumns"
|
|
|
|
|
multiple
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
options-dense
|
|
|
|
|
:display-value="$q.lang.table.columns"
|
|
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
:options="complainstStore.columns"
|
|
|
|
|
option-value="name"
|
|
|
|
|
options-cover
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-2"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<TableComplaint :filterTable="filterTable" />
|
|
|
|
|
</div>
|
2023-10-20 16:50:28 +07:00
|
|
|
</q-card>
|
2023-10-16 13:28:48 +07:00
|
|
|
</template>
|
|
|
|
|
|
2023-10-16 18:07:42 +07:00
|
|
|
<style scoped></style>
|