ลบโฟล์เดอร์ที่เกินมา
This commit is contained in:
parent
2f0e86046b
commit
3ea94b18c2
1 changed files with 0 additions and 214 deletions
|
|
@ -1,214 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
dateToISO,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
success,
|
||||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const myForm = ref<QForm | null>(null); //form data input
|
||||
const edit = ref<boolean>(false);
|
||||
const channel = ref<string>("");
|
||||
|
||||
onMounted(async () => {
|
||||
// if (route.params.id) {
|
||||
// // มี params id ให้ เรียกข้อมูลของรอบการเสนอขอ
|
||||
// await fetchData();
|
||||
// }
|
||||
});
|
||||
// เรียกข้อมูลของรอบการเสนอขอ
|
||||
const fetchData = async () => {
|
||||
// edit.value = true;
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.getRoundInsignia(id.value))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// id.value = data.period_id;
|
||||
// roundInsig.value =
|
||||
// options.value.filter((r: any) => r.value == data.period_round).length >
|
||||
// 0
|
||||
// ? options.value.filter((r: any) => r.value == data.period_round)[0]
|
||||
// : null;
|
||||
// yearly.value = data.period_year;
|
||||
// datelast.value = data.period_amount;
|
||||
// dateStart.value = new Date(data.period_start);
|
||||
// dateEnd.value = new Date(data.period_end);
|
||||
// files.value = data.period_doc;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .delete(config.API.periodExamId(id))
|
||||
// .then((res) => {
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
// แก้ไขข้อมูล
|
||||
|
||||
// คลิกบันทึก
|
||||
const checkSave = () => {
|
||||
// if (myForm.value !== null) {
|
||||
// myForm.value.validate().then(async (success) => {
|
||||
// if (success) {
|
||||
// dialogConfirm($q, () => SaveData());
|
||||
// } else if (Number(datelast.value) !== 0) {
|
||||
// dialogMessageNotify($q, "กรุณาเลือกรอบการเสนอขอพระราชทานเครื่องราชฯ");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
};
|
||||
// บันทึกข้อมูล
|
||||
const SaveData = async () => {
|
||||
// if (edit.value) {
|
||||
// await editData(id.value);
|
||||
// } else {
|
||||
// await addData();
|
||||
// clickBack();
|
||||
// }
|
||||
};
|
||||
// เพิ่มข้อมูลรอบการเสนอขอพระราชทานเครื่องราชฯ
|
||||
const addData = async () => {
|
||||
// const formData = new FormData();
|
||||
// const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${
|
||||
// roundInsig.value.value
|
||||
// } ปี ${yearly.value + 543} `;
|
||||
// formData.append("name", name);
|
||||
// formData.append("year", yearly.value.toString());
|
||||
// formData.append("amount", datelast.value.toString());
|
||||
// formData.append("round", roundInsig.value.value);
|
||||
// if (dateStart.value !== null) {
|
||||
// formData.append("startDate", dateToISO(dateStart.value));
|
||||
// }
|
||||
// if (dateEnd.value !== null) {
|
||||
// formData.append("endDate", dateToISO(dateEnd.value));
|
||||
// }
|
||||
// formData.append("file", files.value);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .post(config.API.listRoundInsignia(), formData)
|
||||
// .then(() => {
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
// แก้ไขข้อมูล
|
||||
const editData = async (id: string) => {
|
||||
// const formData = new FormData();
|
||||
// const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${
|
||||
// roundInsig.value.value
|
||||
// } ปี ${yearly.value + 543}`;
|
||||
// formData.append("name", name);
|
||||
// formData.append("year", yearly.value.toString());
|
||||
// formData.append("amount", datelast.value.toString());
|
||||
// formData.append("round", roundInsig.value.value);
|
||||
// if (dateStart.value !== null) {
|
||||
// formData.append("startDate", dateToISO(dateStart.value));
|
||||
// }
|
||||
// if (dateEnd.value !== null) {
|
||||
// formData.append("endDate", dateToISO(dateEnd.value));
|
||||
// }
|
||||
// formData.append("file", files.value);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .put(config.API.editRoundInsignia(id), formData)
|
||||
// .then(() => {
|
||||
// success($q, "แก้ไขข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// clickBack();
|
||||
// });
|
||||
};
|
||||
|
||||
const clickBack = () => {
|
||||
router.push(`/discipline/channel`);
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
<div class="toptitle col-12 row items-center">
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="clickBack"
|
||||
/>
|
||||
{{ edit ? "ช่องทางการร้องเรียน" : "เพิ่มช่องทางการร้องเรียน" }}
|
||||
</div>
|
||||
<q-form ref="myForm">
|
||||
<div class="col-12">
|
||||
<q-card bordered>
|
||||
<div class="col-12 row q-col-gutter-md q-pa-md">
|
||||
<div class="col-xs-12 col-sm-12 row">
|
||||
<q-separator />
|
||||
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||
<q-input
|
||||
class="col-12"
|
||||
dense
|
||||
outlined
|
||||
v-model="channel"
|
||||
label="กรอกชื่อช่องทาง"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อช่องทาง'}`]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-separator />
|
||||
<div class="row col-12 q-pa-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="checkSave"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>{{ edit ? "แก้ไขข้อมูล" : "บันทึกข้อมูล" }}</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-form>
|
||||
</div>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue