จัดโค้ด รายการการสอบสวนความผิดทางวินัย
This commit is contained in:
parent
f4ee2b89fc
commit
c216c29abe
7 changed files with 167 additions and 132 deletions
|
|
@ -1,19 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import Form from "@/modules/11_discipline/components/3_investigateDisciplinary/Form.vue";
|
||||
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
|
||||
// get ข้อมูลเก่ากรณีแก้ไขข้อมูล
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const data = reactive<FormData>({
|
||||
Complaint: "",
|
||||
complaint: "",
|
||||
dateInvestigate: null,
|
||||
dateAllegation: null,
|
||||
dateEvident: null,
|
||||
|
|
@ -33,8 +31,10 @@ const data = reactive<FormData>({
|
|||
filesWitnesses: null,
|
||||
filesEtc: null,
|
||||
});
|
||||
|
||||
/** จำลองข้อมูลจาก api */
|
||||
const fetchData = async () => {
|
||||
data.Complaint = "test1"
|
||||
data.complaint = "test1"
|
||||
data.dateInvestigate = new Date("2023-11-08T14:58:00")
|
||||
data.dateAllegation = new Date("2023-11-08T14:58:00")
|
||||
data.dateEvident = new Date("2023-11-08T14:58:00")
|
||||
|
|
@ -55,12 +55,19 @@ const fetchData = async () => {
|
|||
data.filesEtc = null
|
||||
};
|
||||
|
||||
// แก้ไขข้อมูล
|
||||
const onSubmit = async () => {
|
||||
// put
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
const onSubmit = async (id:string) => {
|
||||
console.log("edit");
|
||||
router.push(`/discipline/disciplinary`);
|
||||
};
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue