จัดโค้ดวินัย
This commit is contained in:
parent
71d3b54ef0
commit
7262000680
37 changed files with 492 additions and 697 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
|
||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
// import config from "@/app.config";
|
||||
// import http from "@/plugins/http";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import FullCalendar from "@fullcalendar/vue3";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ async function fetchCalendar() {
|
|||
mouth: dateMonth.value.month,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import type {
|
|||
responseType,
|
||||
directorType,
|
||||
} from "@/modules/11_discipline/interface/index/Main";
|
||||
import type { FormDataList } from "@/modules/11_discipline/interface/request/investigate";
|
||||
import type { DataOptionRes } from "@/modules/11_discipline/interface/response/Main";
|
||||
|
||||
/** import components*/
|
||||
|
|
@ -58,6 +57,17 @@ const route = useRoute();
|
|||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
|
||||
const organizationOption = ref<DataOption[]>([]);
|
||||
/** query string*/
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const listDirector = ref<any>([]);
|
||||
const modalEditDirector = ref<boolean>(false);
|
||||
const editDirectorId = ref<string>();
|
||||
const dutyVal = ref<string>();
|
||||
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const isUpdate = ref<boolean>(false);
|
||||
const type = ref<string>("");
|
||||
|
|
@ -71,10 +81,6 @@ const isSave = ref<boolean>(false); // มีการแก้ไขรอบ
|
|||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const extendStatus = ref<boolean>(false);
|
||||
|
||||
function toggleModal() {
|
||||
modalPerson.value = !modalPerson.value;
|
||||
}
|
||||
|
||||
/** formData*/
|
||||
const formData = reactive<FormData>({
|
||||
respondentType: "",
|
||||
|
|
@ -136,16 +142,7 @@ const objectdisciplinary: DisciplinaryRef = {
|
|||
respondentType: respondentTypeRef,
|
||||
organizationId: organizationIdRef,
|
||||
consideredAgency: consideredAgencyRef,
|
||||
// disciplinaryDateAllegation: disciplinaryDateAllegationRef,
|
||||
// disciplinaryDateEvident: disciplinaryDateEvidentRef,
|
||||
// disciplinaryCaseFault: disciplinaryCaseFaultRef,
|
||||
// disciplinaryInvestigateAt: disciplinaryInvestigateAtRef,
|
||||
disciplinaryFaultLevel: disciplinaryFaultLevelRef,
|
||||
// disciplinaryRefLaw: disciplinaryRefLawRef,
|
||||
// disciplinarySummaryEvidence: disciplinarySummaryEvidenceRef,
|
||||
// disciplinaryRecordAccuser: disciplinaryRecordAccuserRef,
|
||||
// disciplinaryWitnesses: disciplinaryWitnessesRef,
|
||||
// result: resultRef,
|
||||
date: dateRef,
|
||||
dateEnd: dateEndRef,
|
||||
daysExtend: daysExtendRef,
|
||||
|
|
@ -186,6 +183,10 @@ function clickClose() {
|
|||
modal.value = false;
|
||||
}
|
||||
|
||||
function toggleModal() {
|
||||
modalPerson.value = !modalPerson.value;
|
||||
}
|
||||
|
||||
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
|
||||
function validateForm() {
|
||||
const hasError = [];
|
||||
|
|
@ -347,13 +348,6 @@ function handleSave(returnData: any) {
|
|||
toggleModal();
|
||||
}
|
||||
|
||||
function deletePerson(id: string) {
|
||||
changeFormData();
|
||||
const dataRow = mainStore.rowsAdd;
|
||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||
mainStore.rowsAdd = updatedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* เช็คข้อมูลจาก props
|
||||
* เมื่อมีข้อมูล
|
||||
|
|
@ -366,7 +360,7 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
const organizationOption = ref<DataOption[]>([]);
|
||||
|
||||
/** function เรียกรายชื่อหน่วยงาน*/
|
||||
async function fetchOrganization() {
|
||||
await http
|
||||
|
|
@ -383,12 +377,7 @@ async function fetchOrganization() {
|
|||
});
|
||||
}
|
||||
|
||||
/** query string*/
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const listDirector = ref<any>([]);
|
||||
|
||||
/** function เรียกรายชื่อกรรมการ*/
|
||||
async function fetchDListDirector() {
|
||||
showLoader();
|
||||
|
|
@ -534,9 +523,7 @@ function emitPerson(data: PersonsArray[]) {
|
|||
});
|
||||
}
|
||||
|
||||
const modalEditDirector = ref<boolean>(false);
|
||||
const editDirectorId = ref<string>();
|
||||
const dutyVal = ref<string>();
|
||||
|
||||
function openEditDirector(idVal: string, duty: string) {
|
||||
editDirectorId.value = idVal;
|
||||
modalEditDirector.value = true;
|
||||
|
|
@ -547,7 +534,7 @@ function closeEditDirector() {
|
|||
modalEditDirector.value = false;
|
||||
}
|
||||
|
||||
const saveDuty = async (id: string, duty: string) => {
|
||||
async function saveDuty(id: string, duty: string){
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.disciplinaryEditDuty(props.data.id, id), { duty: duty })
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ async function fetchListDisciplinary() {
|
|||
fetchList(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -52,7 +51,6 @@ async function fetchListDisciplinary() {
|
|||
* @param id ไอดีเฉพาะ รายบุคคล
|
||||
*/
|
||||
function openEdit(id: string) {
|
||||
console.log(id);
|
||||
router.push(`/discipline/disciplinary/${id}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue