จัดโค้ดวินัย
This commit is contained in:
parent
71d3b54ef0
commit
7262000680
37 changed files with 492 additions and 697 deletions
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue