ปรับ ui
This commit is contained in:
parent
5d6c63f242
commit
202079bb13
15 changed files with 281 additions and 102 deletions
|
|
@ -101,15 +101,15 @@ const objectComplaintsRef: MyObjectComplaintsRef = {
|
|||
organizationId: organizationIdRef,
|
||||
consideredAgency: consideredAgencyRef,
|
||||
title: titleRef,
|
||||
description: descriptionRef,
|
||||
// description: descriptionRef,
|
||||
dateReceived: dateReceivedRef,
|
||||
dateConsideration: dateConsiderationRef,
|
||||
// dateConsideration: dateConsiderationRef,
|
||||
offenseDetails: offenseDetailsRef,
|
||||
levelConsideration: levelConsiderationRef,
|
||||
dateNotification: dateNotificationRef,
|
||||
complaintFrom: complaintFromRef,
|
||||
appellant: appellantRef,
|
||||
result: resultRef,
|
||||
// levelConsideration: levelConsiderationRef,
|
||||
// dateNotification: dateNotificationRef,
|
||||
// complaintFrom: complaintFromRef,
|
||||
// appellant: appellantRef,
|
||||
// result: resultRef,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ const filterKeyword = ref<string>("");
|
|||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const statusFilter = ref<string>('ALL')
|
||||
|
||||
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||
rowsPerPage.value = rowPerpage;
|
||||
|
|
@ -68,6 +69,10 @@ function filterFn() {
|
|||
getList();
|
||||
}
|
||||
|
||||
function dataUpdate(){
|
||||
console.log(statusFilter.value)
|
||||
}
|
||||
|
||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||
onMounted(async () => {
|
||||
await getList();
|
||||
|
|
@ -78,6 +83,20 @@ onMounted(async () => {
|
|||
<div class="toptitle text-dark col-12 row items-center">รายการเรื่องร้องเรียน</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
v-model="statusFilter"
|
||||
label="สถานะ"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="complainstStore.statusOptions"
|
||||
@update:model-value="dataUpdate"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
id="addComplaints"
|
||||
|
|
|
|||
|
|
@ -132,25 +132,40 @@ const formData = reactive<FormData>({
|
|||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
const objectInvestigate: MyObjectInvestigateRef = {
|
||||
complaint: complaintRef,
|
||||
complaintdetail: complaintdetailRef,
|
||||
investigationDescription: investigationDescriptionRef,
|
||||
fault: faultRef,
|
||||
investigationDetailOther: investigationDetailOtherRef,
|
||||
fileComplaint: fileComplaintRef,
|
||||
date: dateRef,
|
||||
dateEnd: dateEndRef,
|
||||
investigationDetail: investigationDetailRef,
|
||||
daysExtend: daysExtendRef,
|
||||
investigationStatusResult: investigationStatusResultRef,
|
||||
investigationCauseText: investigationCauseTextRef,
|
||||
result: resultRef,
|
||||
// complaint: complaintRef,
|
||||
// complaintdetail: complaintdetailRef,
|
||||
// investigationDescription: investigationDescriptionRef,
|
||||
// fault: faultRef,
|
||||
// investigationDetailOther: investigationDetailOtherRef,
|
||||
// fileComplaint: fileComplaintRef,
|
||||
// date: dateRef,
|
||||
// dateEnd: dateEndRef,
|
||||
// investigationDetail: investigationDetailRef,
|
||||
// daysExtend: daysExtendRef,
|
||||
// investigationStatusResult: investigationStatusResultRef,
|
||||
// investigationCauseText: investigationCauseTextRef,
|
||||
// result: resultRef,
|
||||
};
|
||||
|
||||
const rows = ref([]);
|
||||
const statusStep = computed(() => {
|
||||
return route.name === "/discipline-disciplinaryEdit" ? true : false;
|
||||
});
|
||||
const dateEndInputStyle = computed(() => {
|
||||
const currentDate = new Date();
|
||||
const investigationDateEnd = new Date(formData.investigationDateEnd as Date);
|
||||
|
||||
const isInNext7Days =
|
||||
investigationDateEnd >= currentDate &&
|
||||
investigationDateEnd <=
|
||||
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
|
||||
|
||||
console.log(isInNext7Days);
|
||||
return isInNext7Days
|
||||
? { textDecoration: "underline", color: "red", borderColor: "red" }
|
||||
: {};
|
||||
});
|
||||
|
||||
const initialPagination = ref<any>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -565,7 +580,7 @@ function closeEditDirector() {
|
|||
modalEditDirector.value = false;
|
||||
}
|
||||
|
||||
async function saveDuty(id: string, duty: string){
|
||||
async function saveDuty(id: string, duty: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.investigateEditDuty(formData.id, id), { duty: duty })
|
||||
|
|
@ -580,7 +595,7 @@ async function saveDuty(id: string, duty: string){
|
|||
props.getData?.();
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
mainStore.rowsAdd = [];
|
||||
|
|
@ -1024,7 +1039,7 @@ onMounted(async () => {
|
|||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
for="#dateEnd"
|
||||
for="#dateEndInvestigatefacts"
|
||||
ref="dateEndRef"
|
||||
:class="inputEditExtend(isReadonly)"
|
||||
:readonly="
|
||||
|
|
@ -1048,6 +1063,7 @@ onMounted(async () => {
|
|||
`${'กรุณาเลือกวันที่สิ้นสุดการสืบสวน'}`,
|
||||
]"
|
||||
:label="`${'วันที่สิ้นสุดการสืบสวน'}`"
|
||||
:input-style="dateEndInputStyle"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1581,7 +1597,8 @@ onMounted(async () => {
|
|||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
<style scope>
|
||||
|
||||
.q-banner {
|
||||
min-height: 25px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const resetFilter = () => {
|
|||
filterRef.value.focus();
|
||||
}
|
||||
};
|
||||
|
||||
const statusFilter = ref<string>('ALL')
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -90,6 +90,10 @@ async function editPage(id: string) {
|
|||
router.push(`/discipline/investigatefacts/${id}`);
|
||||
}
|
||||
|
||||
function dataUpdate(){
|
||||
console.log(statusFilter.value)
|
||||
}
|
||||
|
||||
/**เมื่อเริ่มโหลดหน้า
|
||||
* ส่งข้อมูลจำลองไปยัง store
|
||||
*/
|
||||
|
|
@ -103,6 +107,20 @@ onMounted(async () => {
|
|||
</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
v-model="statusFilter"
|
||||
label="สถานะ"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="dataInvestigate.statusOptions"
|
||||
@update:model-value="dataUpdate"
|
||||
/>
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { ref, onMounted, reactive, watch,computed } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -108,6 +108,7 @@ const formData = reactive<FormData>({
|
|||
disciplinaryCauseText: "",
|
||||
disciplinaryResult: "",
|
||||
disciplinaryExtendHistory: [],
|
||||
disciplinaryFaultLevelOther: "",
|
||||
});
|
||||
const disciplineDisciplinary_DocRelevants = ref<FileLists[]>([]); // ยังไม่มีรอ api
|
||||
const disciplineDisciplinary_DocSummaryEvidences = ref<FileLists[]>([]);
|
||||
|
|
@ -139,16 +140,16 @@ const disciplinaryResultRef = ref<Object | null>(null);
|
|||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
const objectdisciplinary: DisciplinaryRef = {
|
||||
respondentType: respondentTypeRef,
|
||||
organizationId: organizationIdRef,
|
||||
consideredAgency: consideredAgencyRef,
|
||||
disciplinaryFaultLevel: disciplinaryFaultLevelRef,
|
||||
date: dateRef,
|
||||
dateEnd: dateEndRef,
|
||||
daysExtend: daysExtendRef,
|
||||
disciplinaryDateResult: disciplinaryDateResultRef,
|
||||
disciplinaryStatusResult: disciplinaryStatusResultRef,
|
||||
disciplinaryResult: disciplinaryResultRef,
|
||||
// respondentType: respondentTypeRef,
|
||||
// organizationId: organizationIdRef,
|
||||
// consideredAgency: consideredAgencyRef,
|
||||
// disciplinaryFaultLevel: disciplinaryFaultLevelRef,
|
||||
// date: dateRef,
|
||||
// dateEnd: dateEndRef,
|
||||
// daysExtend: daysExtendRef,
|
||||
// disciplinaryDateResult: disciplinaryDateResultRef,
|
||||
// disciplinaryStatusResult: disciplinaryStatusResultRef,
|
||||
// disciplinaryResult: disciplinaryResultRef,
|
||||
};
|
||||
|
||||
const initialPagination = ref<any>({
|
||||
|
|
@ -172,6 +173,19 @@ const props = defineProps({
|
|||
});
|
||||
const emit = defineEmits(["submit:disciplinary"]);
|
||||
|
||||
const dateEndInputStyle = computed(() => {
|
||||
const currentDate = new Date();
|
||||
const investigationDateEnd = new Date(formData.disciplinaryDateEnd as Date);
|
||||
|
||||
const isInNext7Days =
|
||||
investigationDateEnd >= currentDate &&
|
||||
investigationDateEnd <=
|
||||
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
|
||||
|
||||
console.log(isInNext7Days);
|
||||
return isInNext7Days ? { textDecoration: "underline", color: "red" } : {};
|
||||
});
|
||||
|
||||
/** เปิด dialog */
|
||||
function popup() {
|
||||
modal.value = true;
|
||||
|
|
@ -360,7 +374,6 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
/** function เรียกรายชื่อหน่วยงาน*/
|
||||
async function fetchOrganization() {
|
||||
await http
|
||||
|
|
@ -377,7 +390,6 @@ async function fetchOrganization() {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
/** function เรียกรายชื่อกรรมการ*/
|
||||
async function fetchDListDirector() {
|
||||
showLoader();
|
||||
|
|
@ -454,6 +466,9 @@ async function selectComplainant(val: string) {
|
|||
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||
function changeFormData() {
|
||||
isSave.value = true;
|
||||
if(formData.disciplinaryFaultLevel !== 'อื่นๆ'){
|
||||
formData.disciplinaryFaultLevelOther = ''
|
||||
}
|
||||
}
|
||||
|
||||
function calendarOpen() {
|
||||
|
|
@ -523,7 +538,6 @@ function emitPerson(data: PersonsArray[]) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
function openEditDirector(idVal: string, duty: string) {
|
||||
editDirectorId.value = idVal;
|
||||
modalEditDirector.value = true;
|
||||
|
|
@ -534,7 +548,7 @@ function closeEditDirector() {
|
|||
modalEditDirector.value = false;
|
||||
}
|
||||
|
||||
async function saveDuty(id: string, duty: string){
|
||||
async function saveDuty(id: string, duty: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.disciplinaryEditDuty(props.data.id, id), { duty: duty })
|
||||
|
|
@ -549,7 +563,7 @@ async function saveDuty(id: string, duty: string){
|
|||
props.fetchData();
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/** Hook */
|
||||
onMounted(async () => {
|
||||
|
|
@ -1103,6 +1117,7 @@ onMounted(async () => {
|
|||
`${'กรุณาเลือกวันที่สิ้นสุดการสอบสวน'}`,
|
||||
]"
|
||||
:label="`${'วันที่สิ้นสุดการสอบสวน'}`"
|
||||
:input-style="dateEndInputStyle"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1320,7 +1335,10 @@ onMounted(async () => {
|
|||
round
|
||||
color="blue"
|
||||
@click="
|
||||
openEditDirector(props.row.idRaw, props.row.duty)
|
||||
openEditDirector(
|
||||
props.row.idRaw,
|
||||
props.row.duty
|
||||
)
|
||||
"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
|
|
@ -1433,7 +1451,15 @@ onMounted(async () => {
|
|||
@update:model-value="changeFormData()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12" v-if="formData.disciplinaryFaultLevel === 'อื่นๆ'">
|
||||
<q-input
|
||||
:class="inputEdit(isReadonly)"
|
||||
outlined
|
||||
dense
|
||||
label="ระดับโทษความผิดอื่นๆ"
|
||||
v-model="formData.disciplinaryFaultLevelOther"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
:readonly="isReadonly"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs, watch } from "vue";
|
||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
|
||||
const dataInvestigateDis = useInvestigateDisStore();
|
||||
const table = ref<any>(null);
|
||||
const filterRef = ref<any>(null);
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging = ref<boolean>(true);
|
||||
const currentPage = ref<number>(1);
|
||||
const statusFilter = ref<string>('ALL')
|
||||
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
|
|
@ -104,10 +107,29 @@ watch(
|
|||
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
||||
}
|
||||
);
|
||||
|
||||
function dataUpdate(){
|
||||
console.log(statusFilter.value)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pb-sm row q-col-gutter-sm">
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
v-model="statusFilter"
|
||||
label="สถานะ"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="dataInvestigateDis.statusOptions"
|
||||
@update:model-value="dataUpdate"
|
||||
/>
|
||||
</div>
|
||||
<q-space />
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs, watch } from "vue";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
|
||||
const store = useDisciplineResultStore();
|
||||
const table = ref<any>(null);
|
||||
const filterRef = ref<any>(null);
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging = ref<boolean>(true);
|
||||
|
||||
const statusFilter = ref<string>("ALL");
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
count: Number,
|
||||
|
|
@ -89,11 +91,28 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
filter.value
|
||||
);
|
||||
});
|
||||
|
||||
function dataUpdate() {
|
||||
console.log(statusFilter.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pb-sm row q-col-gutter-sm">
|
||||
<div class="q-gutter-sm" v-if="nornmalData == true">
|
||||
<div class="q-gutter-sm" v-if="nornmalData == true"></div>
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
v-model="statusFilter"
|
||||
label="สถานะ"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="store.statusOptions"
|
||||
@update:model-value="dataUpdate"
|
||||
/>
|
||||
</div>
|
||||
<q-space />
|
||||
<q-input
|
||||
|
|
@ -143,7 +162,6 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
:pagination="pagination"
|
||||
@update:pagination="updateRowsPerPage"
|
||||
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
@ -184,7 +202,6 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
|
||||
</d-table>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
resolution: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
save: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
|
|
@ -31,6 +35,7 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const duty = ref<string>("");
|
||||
const resolution = ref<string>("");
|
||||
const myForm = ref<QForm | null>(null);
|
||||
|
||||
/**
|
||||
|
|
@ -56,6 +61,7 @@ async function submit(){
|
|||
|
||||
watch(props, () => {
|
||||
duty.value = props?.duty;
|
||||
resolution.value = props?.resolution;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -63,7 +69,7 @@ watch(props, () => {
|
|||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="width: 30vw">
|
||||
<q-form ref="myForm">
|
||||
<DialogHeader title="แก้ไขหน้าที่กรรมการ" :close="props.closePopup" />
|
||||
<DialogHeader title="แก้ไขข้อมูลกรรมการ" :close="props.closePopup" />
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<q-input
|
||||
|
|
@ -74,6 +80,17 @@ watch(props, () => {
|
|||
debounce="300"
|
||||
placeholder="หน้าที่"
|
||||
:rules="[(val) => !!val || `กรุณากรอกหน้าที่`]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
<q-input
|
||||
v-model="resolution"
|
||||
outlined
|
||||
dense
|
||||
class="col-12 q-mb-sm"
|
||||
debounce="300"
|
||||
placeholder="มติ/คำสั่งแต่งตั้ง"
|
||||
:rules="[(val) => !!val || `กรุณากรอก มติ/คำสั่งแต่งตั้ง`]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</q-card-section>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,15 +44,15 @@ interface MyObjectComplaintsRef {
|
|||
organizationId: object | null;
|
||||
consideredAgency: object | null;
|
||||
title: object | null;
|
||||
description: object | null;
|
||||
// description: object | null;
|
||||
dateReceived: object | null;
|
||||
dateConsideration: object | null;
|
||||
// dateConsideration: object | null;
|
||||
offenseDetails: object | null;
|
||||
levelConsideration: object | null;
|
||||
dateNotification: object | null;
|
||||
complaintFrom: object | null;
|
||||
appellant: object | null;
|
||||
result: object | null;
|
||||
// levelConsideration: object | null;
|
||||
// dateNotification: object | null;
|
||||
// complaintFrom: object | null;
|
||||
// appellant: object | null;
|
||||
// result: object | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ interface FormData {
|
|||
disciplinaryCauseText: string;
|
||||
disciplinaryResult: string;
|
||||
disciplinaryExtendHistory: ExtendHistoryObject[];
|
||||
disciplinaryFaultLevelOther:string
|
||||
}
|
||||
|
||||
interface ExtendHistoryObject {
|
||||
|
|
@ -91,22 +92,22 @@ interface ExtendHistoryObject {
|
|||
}
|
||||
|
||||
interface DisciplinaryRef {
|
||||
respondentType: object | null;
|
||||
organizationId: object | null;
|
||||
// respondentType: object | null;
|
||||
// organizationId: object | null;
|
||||
// disciplinaryDateAllegation: object | null;
|
||||
// disciplinaryDateEvident: object | null;
|
||||
// disciplinaryCaseFault: object | null;
|
||||
// disciplinaryInvestigateAt: object | null;
|
||||
disciplinaryFaultLevel: object | null;
|
||||
// disciplinaryFaultLevel: object | null;
|
||||
// disciplinaryRefLaw: object | null;
|
||||
// disciplinarySummaryEvidence: object | null;
|
||||
// disciplinaryRecordAccuser: object | null;
|
||||
// disciplinaryWitnesses: object | null;
|
||||
// result: object | null;
|
||||
date: object | null;
|
||||
dateEnd: object | null;
|
||||
daysExtend: object | null;
|
||||
disciplinaryDateResult: object | null;
|
||||
// date: object | null;
|
||||
// dateEnd: object | null;
|
||||
// daysExtend: object | null;
|
||||
// disciplinaryDateResult: object | null;
|
||||
|
||||
// filesRecordAccuser: object | null;
|
||||
// filesWitnesses: object | null;
|
||||
|
|
|
|||
|
|
@ -44,18 +44,18 @@ interface ArrayPerson {
|
|||
phone: string;
|
||||
}
|
||||
interface MyObjectInvestigateRef {
|
||||
complaint: object | null;
|
||||
complaintdetail: object | null;
|
||||
investigationDescription: object | null;
|
||||
fault: object | null;
|
||||
fileComplaint: object | null;
|
||||
date: object | null;
|
||||
dateEnd: object | null;
|
||||
investigationDetail: object | null;
|
||||
daysExtend: object | null;
|
||||
investigationStatusResult: object | null;
|
||||
investigationCauseText: object | null;
|
||||
result: object | null;
|
||||
// complaint: object | null;
|
||||
// complaintdetail: object | null;
|
||||
// investigationDescription: object | null;
|
||||
// fault: object | null;
|
||||
// fileComplaint: object | null;
|
||||
// date: object | null;
|
||||
// dateEnd: object | null;
|
||||
// investigationDetail: object | null;
|
||||
// daysExtend: object | null;
|
||||
// investigationStatusResult: object | null;
|
||||
// investigationCauseText: object | null;
|
||||
// result: object | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,16 +26,14 @@ export const useComplainstDataStore = defineStore(
|
|||
let dataList: DataListRow[] = data.map((e: DataList) => ({
|
||||
id: e.id,
|
||||
personId: e.personId,
|
||||
title: e.title,
|
||||
title: e.title ? e.title : '-',
|
||||
dateReceived: e.dateReceived ? date2Thai(e.dateReceived) : "-",
|
||||
respondentType: mainStore.convertComplaintType(e.respondentType),
|
||||
offenseDetails: mainStore.convertOffenseDetailst(e.offenseDetails),
|
||||
createdAt: date2Thai(e.createdAt)!,
|
||||
levelConsideration: levelConsiderationTran(e.levelConsideration),
|
||||
dateConsideration: e.dateConsideration
|
||||
? date2Thai(e.dateConsideration)
|
||||
: "-",
|
||||
status: statusTothai(e.status),
|
||||
respondentType: e.respondentType ? mainStore.convertComplaintType(e.respondentType) : '-',
|
||||
offenseDetails: e.offenseDetails ? mainStore.convertOffenseDetailst(e.offenseDetails) : '-',
|
||||
createdAt: e.createdAt ? date2Thai(e.createdAt)! : '-',
|
||||
levelConsideration: e.levelConsideration ? levelConsiderationTran(e.levelConsideration) : '-',
|
||||
dateConsideration: e.dateConsideration ? date2Thai(e.dateConsideration) : "-",
|
||||
status: e.status ? statusTothai(e.status) : '-',
|
||||
}));
|
||||
rows.value = dataList;
|
||||
}
|
||||
|
|
@ -69,6 +67,17 @@ export const useComplainstDataStore = defineStore(
|
|||
const optionListNameMain = ref<DataOption[]>([]);
|
||||
const optionListName = ref<DataOption[]>([]);
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
|
||||
function levelConsiderationTran(val: string) {
|
||||
return (
|
||||
levelConsiderationtOptions.value.find((v: any) => v.id === val)?.name ??
|
||||
|
|
@ -121,6 +130,7 @@ export const useComplainstDataStore = defineStore(
|
|||
organizationIdOp,
|
||||
ocListFn,
|
||||
levelConsiderationtOptions,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
{ id: "4", name: "ร้ายแรง", disable: true },
|
||||
{ id: "ปลดออก", name: "ปลดออก", disable: false },
|
||||
{ id: "ไล่ออก", name: "ไล่ออก", disable: false },
|
||||
{ id: "อื่นๆ", name: "อื่นๆ", disable: false },
|
||||
]);
|
||||
|
||||
const statusOps = ref<DataOption[]>([
|
||||
|
|
@ -66,7 +67,16 @@ export const useInvestigateDisStore = defineStore(
|
|||
{ id: "ร้ายแรง", name: "ร้ายแรง" },
|
||||
{ id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" },
|
||||
]);
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"title",
|
||||
|
|
@ -235,9 +245,9 @@ export const useInvestigateDisStore = defineStore(
|
|||
async function fetchList(data: investigateDisDataRowType[]) {
|
||||
let datalist: any[] = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
title: e.title,
|
||||
respondentType: convertRespondentType(e.respondentType),
|
||||
offenseDetails: convertFault(e.offenseDetails),
|
||||
title: e.title ? e.title :'-',
|
||||
respondentType: e.respondentType ? convertRespondentType(e.respondentType):'-',
|
||||
offenseDetails: e.offenseDetails ? convertFault(e.offenseDetails):'-',
|
||||
disciplinaryFaultLevel: e.disciplinaryFaultLevel ?? "-",
|
||||
disciplinaryCaseFault: e.disciplinaryCaseFault ?? "-",
|
||||
status: convertStatus(e.status) ?? "-",
|
||||
|
|
@ -322,6 +332,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
|
||||
convertRespondentType,
|
||||
convertFault,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,16 @@ export const useInvestigateFactStore = defineStore(
|
|||
investigationDetailOps.value
|
||||
);
|
||||
const faultOp = ref<DataOption[]>(faultOps.value);
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"title",
|
||||
|
|
@ -206,28 +216,26 @@ export const useInvestigateFactStore = defineStore(
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function fecthList(data: ListData[]) {
|
||||
rows.value = await data.map((e: ListData) => {
|
||||
return {
|
||||
id: e.id,
|
||||
title: e.title,
|
||||
respondentType: mainStore.convertComplaintType(e.respondentType),
|
||||
offenseDetails: mainStore.convertOffenseDetailst(e.offenseDetails),
|
||||
investigationDetail: convertInvestigationDetail(
|
||||
e.investigationDetail
|
||||
),
|
||||
title: e.title ? e.title : '-',
|
||||
respondentType: e.respondentType ? mainStore.convertComplaintType(e.respondentType) : '-',
|
||||
offenseDetails: e.offenseDetails ? mainStore.convertOffenseDetailst(e.offenseDetails) : '-',
|
||||
investigationDetail: e.investigationDetail ? convertInvestigationDetail(e.investigationDetail) : '-',
|
||||
dateInvestigate:
|
||||
e.investigationDateStart && e.investigationDateEnd
|
||||
? `${date2Thai(e.investigationDateStart)} - ${date2Thai(
|
||||
e.investigationDateEnd
|
||||
)}`
|
||||
: "-",
|
||||
investigationStatusResult: mainStore.convertStatusResult(
|
||||
investigationStatusResult:e.investigationStatusResult ? mainStore.convertStatusResult(
|
||||
e.investigationStatusResult
|
||||
),
|
||||
createdAt: date2Thai(e.createdAt as Date),
|
||||
status: convertStatus(e.status),
|
||||
):'-',
|
||||
createdAt: e.createdAt ? date2Thai(e.createdAt as Date):'-',
|
||||
status: e.status ? convertStatus(e.status):'-',
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
@ -261,6 +269,7 @@ export const useInvestigateFactStore = defineStore(
|
|||
respondentTypeOps,
|
||||
organizationIdOp,
|
||||
ocListFn,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,17 @@ export const useDisciplineResultStore = defineStore(
|
|||
storeMain.complainantoptionsMain
|
||||
);
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"title",
|
||||
|
|
@ -227,7 +238,7 @@ export const useDisciplineResultStore = defineStore(
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
function filterSelector(val: string, update: Function, type: string) {
|
||||
update(() => {
|
||||
const needle = val.toLowerCase();
|
||||
|
|
@ -257,9 +268,9 @@ export const useDisciplineResultStore = defineStore(
|
|||
: "-",
|
||||
status: e.status && convertStatus(e.status),
|
||||
createdAt: e.createdAt && date2Thai(e.createdAt),
|
||||
disciplineType: e.disciplineType ? e.disciplineType:'-' ,
|
||||
titleType: e.titleType ? e.titleType:'-' ,
|
||||
oc: e.oc ? e.oc:'-'
|
||||
disciplineType: e.disciplineType ? e.disciplineType : '-',
|
||||
titleType: e.titleType ? e.titleType : '-',
|
||||
oc: e.oc ? e.oc : '-'
|
||||
}));
|
||||
rows.value = datalist;
|
||||
}
|
||||
|
|
@ -285,6 +296,7 @@ export const useDisciplineResultStore = defineStore(
|
|||
columnsDirector,
|
||||
complainantoptions,
|
||||
filterSelector,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue