Refactoring code module 11_discipline
This commit is contained in:
parent
202fbf27b6
commit
9653ae78cb
58 changed files with 1021 additions and 1305 deletions
|
|
@ -1,13 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import { useQuasar } from "quasar";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
|
||||
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
|
|
@ -15,9 +17,9 @@ import type {
|
|||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
|
|
@ -110,6 +112,7 @@ const dataComplaints = reactive<FormDataComplaint>({
|
|||
disciplineComplaintDocs: [fileListObjComplaint],
|
||||
});
|
||||
|
||||
/** ดึงข้อมูลร้องเรียน */
|
||||
async function getDataComplaint() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -148,6 +151,7 @@ async function getDataComplaint() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลรายละเอียด */
|
||||
function getData() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -228,6 +232,7 @@ function sentInvestigate() {
|
|||
}
|
||||
}
|
||||
|
||||
/** ส่งไปสอบสวน */
|
||||
function sentConfirmNoPerson() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -246,6 +251,7 @@ function sentConfirmNoPerson() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ปิด popup */
|
||||
function closePopup() {
|
||||
modalPopup.value = false;
|
||||
}
|
||||
|
|
@ -320,14 +326,6 @@ function emitPerson(data: FormData[]) {
|
|||
});
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
getData();
|
||||
if (store.tabMenu == "complaints") {
|
||||
getDataComplaint();
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => store.tabMenu,
|
||||
() => {
|
||||
|
|
@ -338,6 +336,14 @@ watch(
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
getData();
|
||||
if (store.tabMenu == "complaints") {
|
||||
getDataComplaint();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue