รายการสืบสวนข้อเท็จจริง

This commit is contained in:
STW_TTTY\stwtt 2024-08-08 10:42:47 +07:00
parent 3f2aff52e1
commit 8b54d6b4b1
4 changed files with 123 additions and 66 deletions

View file

@ -9,6 +9,8 @@ import config from "@/app.config";
import http from "@/plugins/http";
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
import { checkPermission } from "@/utils/permissions";
const dataInvestigate = useInvestigateFactStore();
const mixin = useCounterMixin();
const { messageError, showLoader, hideLoader } = mixin;
@ -94,6 +96,14 @@ async function editPage(id: string) {
dataInvestigate.tabMenu = await "investigatefacts";
router.push(`/discipline/investigatefacts/${id}`);
}
/**
* ไปหนาแกไข
* @param id ไอดเฉพาะ รายบคคล
*/
async function detailPage(id: string) {
dataInvestigate.tabMenu = await "investigatefacts";
router.push(`/discipline-detail/investigatefacts/${id}`);
}
function filterFn() {
getList();
@ -149,12 +159,15 @@ onMounted(async () => {
<template v-if="statusFilter !== 'ALL'" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(option = dataInvestigate.statusOptions),(statusFilter = 'ALL'), getList()"
@click.stop.prevent="
(option = dataInvestigate.statusOptions),
(statusFilter = 'ALL'),
getList()
"
class="cursor-pointer"
/> </template
>
</q-select
>
/>
</template>
</q-select>
</div>
<q-space />
@ -216,6 +229,7 @@ onMounted(async () => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
@ -228,13 +242,35 @@ onMounted(async () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="editPage(props.row.id)"
>
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsGet"
flat
dense
round
color="info"
icon="mdi-eye"
@click="detailPage(props.row.id)"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
color="edit"
icon="edit"
@click="editPage(props.row.id)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{
(currentPage - 1) * Number(pagination.rowsPerPage) +