ปรับวินัย

This commit is contained in:
setthawutttty 2023-12-27 15:50:41 +07:00
parent 117cc8aeb8
commit 5c1b67a642
12 changed files with 161 additions and 190 deletions

View file

@ -8,7 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
import DialogHistory from '@/modules/11_discipline/components/4_Result/DialogHistory.vue'
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
import type {
FormData,
@ -45,8 +45,8 @@ const consideredAgency = ref<string>("");
const organizationOption = ref<DataOption[]>([]);
/** ตัวแปร ref สำหรับแสดง validate */
const detailRef = ref<Object | null>(null);
const modalHistory = ref<boolean>(false)
const personalId = ref<string>('')
const modalHistory = ref<boolean>(false);
const personalId = ref<string>("");
/** รับ props มาจากหน้าหลัก */
const props = defineProps({
@ -233,15 +233,14 @@ function confirmDelete(docid: string) {
});
}
function openDetial(id:string){
personalId.value = id
modalHistory.value = true
function openDetial(id: string) {
personalId.value = id;
modalHistory.value = true;
}
function closeDetail(){
modalHistory.value = false
function closeDetail() {
modalHistory.value = false;
}
</script>
<template>
<div class="row q-col-gutter-sm">
@ -276,8 +275,6 @@ function closeDetail(){
map-options
hide-bottom-space
:options="dataStore.complainantoptions"
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
lazy-rules
@update:model-value="selectComplainant(respondentType)"
@filter="(inputValue: any,
doneFn: Function) => dataStore.filterSelector(inputValue, doneFn, 'filterrespondentType'
@ -311,8 +308,6 @@ function closeDetail(){
v-model="organizationId"
:options="organizationOption"
label="เลือกสำนักงาน"
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
lazy-rules
/>
</div>
<div class="row col-12" v-if="respondentType === 'PERSON'">
@ -347,7 +342,6 @@ function closeDetail(){
:key="col.name"
:props="props"
style="color: #000000; font-weight: 500"
>
<span class="text-weight-medium">{{
col.label
@ -361,21 +355,23 @@ function closeDetail(){
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div v-if="col.name == 'no'" @click="openDetial(props.row.id)">
<div
v-if="col.name == 'no'"
@click="openDetial(props.row.id)"
>
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'info'">
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</div>
<div
v-else-if="col.name === 'organization'"
@ -405,8 +401,6 @@ function closeDetail(){
for="#detail"
label="สรุปผลการพิจารณา"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกสรุปผลการพิจารณา'}`]"
lazy-rules
@update:model-value="changeFormData()"
/>
</div>
@ -456,7 +450,6 @@ function closeDetail(){
<template #trigger>
<q-input
dense
lazy-rules
:class="inputEdit(isReadonly)"
outlined
:model-value="
@ -514,7 +507,6 @@ function closeDetail(){
@added="uploadFile"
label="ไฟล์เอกสารหลักฐาน"
hide-bottom-space
lazy-rules
accept=".pdf,.xlsx,.doc"
clearable
>
@ -582,10 +574,9 @@ function closeDetail(){
</div>
</div>
<DialogHistory
:modal="modalHistory"
:close="closeDetail"
:person-id="personalId"
<DialogHistory
:modal="modalHistory"
:close="closeDetail"
:person-id="personalId"
/>
</template>

View file

@ -92,12 +92,12 @@ onMounted(async () => {
:paging="true"
:titleText="''"
:page="page"
:fetchListResult="fetchListResult"
:pageSize="pageSize"
:maxPage="maxPage"
@update:queryString="updateQueryString"
v-model:open-edit="openEdit"
>
</Table>
</div>
</q-card>

View file

@ -22,6 +22,10 @@ const props = defineProps({
type: Function,
default: () => console.log("not function"),
},
fetchListResult: {
type: Function,
default: () => console.log("not function"),
},
openEdit: {
type: Function,
default: () => console.log("not function"),
@ -68,6 +72,7 @@ function resetFilter() {
// reset X
emit("update:inputfilter", "");
filterRef.value.focus();
props.fetchListResult?.();
}
function updateRowsPerPage(newPagination: any) {
@ -75,10 +80,6 @@ function updateRowsPerPage(newPagination: any) {
currentPage.value = 1;
}
function filterFn() {
updatePaging(1, Number(pagination.value.rowsPerPage), filter.value);
}
function updatePaging(p: number, pS: number, key: string) {
emit("update:queryString", p, pS, key);
}
@ -95,6 +96,13 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
function dataUpdate() {
console.log(statusFilter.value);
}
function updateInput(value: string | number | null) {
emit("update:inputfilter", value);
}
function filterFn() {
props.fetchListResult?.();
}
</script>
<template>
@ -118,18 +126,19 @@ function dataUpdate() {
<q-input
standout
dense
v-model="filter"
:model-value="inputfilter"
ref="filterRef"
@keydown.enter.prevent="filterFn"
@update:model-value="updateInput"
outlined
placeholder="ค้นหา"
style="max-width: 200px"
class="col-xs-12 col-sm-3 col-md-2"
>
<template v-slot:append>
<q-icon v-if="filter == ''" name="search" />
<q-icon v-if="inputfilter == ''" name="search" />
<q-icon
v-if="filter !== ''"
v-if="inputfilter !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"