จัดโค้ดวินัย
This commit is contained in:
parent
71d3b54ef0
commit
7262000680
37 changed files with 492 additions and 697 deletions
|
|
@ -28,71 +28,14 @@ const { showLoader, hideLoader, messageError } = mixin;
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const titlePopup = ref<string>('')
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
const onSubmit = async (id: string) => {
|
||||
console.log("edit");
|
||||
router.push(`/discipline-result`);
|
||||
};
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const filterKeyword = ref<string>("");
|
||||
/** ฟังชั่นปิด dialog */
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
|
||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||
function sentIssue(title:string) {
|
||||
modal.value = true;
|
||||
titlePopup.value = title
|
||||
}
|
||||
|
||||
const titlePopup = ref<string>("");
|
||||
const idInvestigate = ref<string>("");
|
||||
const idComplaint = ref<string>("");
|
||||
const status = ref<string>("");
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const dataResult = ref<DataListRow[]>([]);
|
||||
/** function เรียกรายละเอียดผลการพิจารณาทางวินัย*/
|
||||
async function fetchDetailResult() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listResultById(id.value))
|
||||
.then((res) => {
|
||||
dataResult.value = res.data.result;
|
||||
status.value = res.data.result.status;
|
||||
idComplaint.value = res.data.result.idComplaint;
|
||||
idInvestigate.value = res.data.result.idInvestigate;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const dataDisciplinary = ref<object>([]);
|
||||
/** function เรียกรายละเอียดสอบสวนความผิดทางวินัย*/
|
||||
async function fetchDetailDisciplinary() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineDisciplinaryById(id.value))
|
||||
.then((res) => {
|
||||
dataDisciplinary.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||
id: "",
|
||||
|
|
@ -121,8 +64,103 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
|||
respondentType: "",
|
||||
organizationId: "",
|
||||
persons: [],
|
||||
investigationExtendHistory:[]
|
||||
investigationExtendHistory: [],
|
||||
});
|
||||
|
||||
const personObjComplaint = reactive<ArrayPerson>({
|
||||
id: "",
|
||||
personId: "",
|
||||
idcard: "",
|
||||
name: "",
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
posNo: "",
|
||||
position: "",
|
||||
positionLevel: "",
|
||||
salary: null,
|
||||
organization: "",
|
||||
});
|
||||
const fileListObjComplaint = reactive<ArrayFileList>({
|
||||
id: "",
|
||||
pathName: "",
|
||||
fileName: "",
|
||||
});
|
||||
const dataComplaints = reactive<FormDataComplaint>({
|
||||
id: "",
|
||||
respondentType: "",
|
||||
organizationId: "",
|
||||
consideredAgency: "",
|
||||
title: "",
|
||||
description: "",
|
||||
dateReceived: null,
|
||||
dateConsideration: null,
|
||||
offenseDetails: "",
|
||||
levelConsideration: "",
|
||||
dateNotification: null,
|
||||
complaintFrom: "",
|
||||
appellant: "",
|
||||
documentFile: null,
|
||||
status: "",
|
||||
persons: [personObjComplaint],
|
||||
result: "",
|
||||
disciplineComplaintDocs: [fileListObjComplaint],
|
||||
});
|
||||
|
||||
/** ฟังชั่นปิด dialog */
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
async function onSubmit() {
|
||||
router.push(`/discipline-result`);
|
||||
}
|
||||
|
||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||
function sentIssue(title: string) {
|
||||
modal.value = true;
|
||||
titlePopup.value = title;
|
||||
}
|
||||
|
||||
/** function เรียกรายละเอียดผลการพิจารณาทางวินัย*/
|
||||
async function fetchDetailResult() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listResultById(id.value))
|
||||
.then((res) => {
|
||||
dataResult.value = res.data.result;
|
||||
status.value = res.data.result.status;
|
||||
idComplaint.value = res.data.result.idComplaint;
|
||||
idInvestigate.value = res.data.result.idInvestigate;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** function เรียกรายละเอียดสอบสวนความผิดทางวินัย*/
|
||||
async function fetchDetailDisciplinary() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineDisciplinaryById(id.value))
|
||||
.then((res) => {
|
||||
dataDisciplinary.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** function เรียกรายละเอียดสืบสวนข้อเท็จจริง*/
|
||||
async function fetchDetailInvestigate() {
|
||||
showLoader();
|
||||
|
|
@ -166,45 +204,6 @@ async function fetchDetailInvestigate() {
|
|||
});
|
||||
}
|
||||
|
||||
const personObjComplaint = reactive<ArrayPerson>({
|
||||
id: "",
|
||||
personId: "",
|
||||
idcard: "",
|
||||
name: "",
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
posNo: "",
|
||||
position: "",
|
||||
positionLevel: "",
|
||||
salary: null,
|
||||
organization: "",
|
||||
});
|
||||
const fileListObjComplaint = reactive<ArrayFileList>({
|
||||
id: "",
|
||||
pathName: "",
|
||||
fileName: "",
|
||||
});
|
||||
const dataComplaints = reactive<FormDataComplaint>({
|
||||
id: "",
|
||||
respondentType: "",
|
||||
organizationId: "",
|
||||
consideredAgency: "",
|
||||
title: "",
|
||||
description: "",
|
||||
dateReceived: null,
|
||||
dateConsideration: null,
|
||||
offenseDetails: "",
|
||||
levelConsideration: "",
|
||||
dateNotification: null,
|
||||
complaintFrom: "",
|
||||
appellant: "",
|
||||
documentFile: null,
|
||||
status: "",
|
||||
persons: [personObjComplaint],
|
||||
result: "",
|
||||
disciplineComplaintDocs: [fileListObjComplaint],
|
||||
});
|
||||
/** function เรียกรายละเอียดเรื่องร้องเรียน*/
|
||||
async function fetchDetailComplaints() {
|
||||
showLoader();
|
||||
|
|
@ -238,12 +237,6 @@ async function fetchDetailComplaints() {
|
|||
});
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(async () => {
|
||||
store.tabMenu = "result";
|
||||
await fetchDetailResult();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => store.tabMenu,
|
||||
async () => {
|
||||
|
|
@ -261,6 +254,12 @@ watch(
|
|||
fetchFunction && (await fetchFunction());
|
||||
}
|
||||
);
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(async () => {
|
||||
store.tabMenu = "result";
|
||||
await fetchDetailResult();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
|
|
@ -331,7 +330,6 @@ watch(
|
|||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
<!-- <Form :on-submit="onSubmit" :data="data" /> -->
|
||||
</div>
|
||||
|
||||
<DialogSendToCommand
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue