From 0e03d4279d3b8988306c0b82c10fdfa83415874b Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 10 Nov 2023 13:35:26 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=88=E0=B8=B1=E0=B8=94=20=E0=B9=82?= =?UTF-8?q?=E0=B8=84=E0=B9=89=E0=B8=94=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AA=E0=B8=B7=E0=B8=9A=E0=B8=AA?= =?UTF-8?q?=E0=B8=A7=E0=B8=99=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B9=80=E0=B8=97?= =?UTF-8?q?=E0=B9=87=E0=B8=88=E0=B8=88=E0=B8=A3=E0=B8=B4=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Complaint/Form.vue | 6 +- .../components/2_InvestigateFacts/AddPage.vue | 6 +- .../2_InvestigateFacts/EditPage.vue | 21 ++++--- .../components/2_InvestigateFacts/Form.vue | 56 +++++++++++++------ .../2_InvestigateFacts/MainPage.vue | 21 +++++-- 5 files changed, 79 insertions(+), 31 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index e1a2e6915..d12fdcb90 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -211,7 +211,11 @@ function onSubmit() { ); } -/** เช็คข้อมูลจาก props*/ +/** + * เช็คข้อมูลจาก props + * เมื่อมีข้อมูล + * เก็บข้อมูลลง formData + */ watch(props.data, async () => { formData.complainantType = props.data.complainantType; formData.complainant = props.data.complainant; diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue index 293549aac..00a3f1378 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue @@ -1,11 +1,11 @@ +
{
+
{
+
{ ]" />
+
{ keep-color />
+
+
{
+
{ type="textarea" />
+
{
+
{ type="textarea" />
+
{
+
(""); const filterRef = ref(null); const resetFilter = () => { @@ -34,6 +34,8 @@ const resetFilter = () => { }; const attrs = ref(useAttrs()); + +/** แสดงจำนวนในตาราง */ const pagination = ref({ // sortBy: "desc", descending: false, @@ -41,9 +43,22 @@ const pagination = ref({ rowsPerPage: 10, }); +/**ไปยังหน้าเพิ่มข้อมูล */ const clickAdd = () => { router.push(`/discipline/investigatefacts/add`); }; + +/** + * ไปหน้าแก้ไข + * @param id ไอดีเฉพาะ รายบุคคล + */ +function editPage(id: string) { + router.push(`/discipline/investigatefacts/${id}`); +} + +/**เมื่อเริ่มโหลดหน้า + * ส่งข้อมูลจำลองไปยัง store + */ onMounted(async () => { await fecthList([ { @@ -80,9 +95,6 @@ onMounted(async () => { }, ]); }); -function editPage(id: string) { - router.push(`/discipline/investigatefacts/${id}`); -}