Merge branch 'NiceDev' into develop
This commit is contained in:
commit
7ae23e1110
3 changed files with 68 additions and 7 deletions
|
|
@ -1,9 +1,29 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import type { FormDataAssigned } from "@/modules/08_KPI/interface/request/index";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
const $q = useQuasar();
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
dialogMessageNotify,
|
||||
success,
|
||||
} = useCounterMixin();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const isStatusEdit = defineModel<boolean>("isStatusEdit", { required: true });
|
||||
const kpiUserPlannedId = defineModel<string>("kpiUserPlannedId", {
|
||||
required: true,
|
||||
});
|
||||
|
||||
const formData = reactive<FormDataAssigned>({
|
||||
including: "", //รหัสตัวชี้วัด
|
||||
|
|
@ -35,7 +55,26 @@ function closeDialog() {
|
|||
formData.definition = "";
|
||||
}
|
||||
|
||||
function onSubmit() {}
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
console.log(formData);
|
||||
|
||||
// try {
|
||||
// const url = isStatusEdit.value
|
||||
// ? config.API.kpiAchievement("planned") + `/${kpiUserPlannedId.value}`
|
||||
// : config.API.kpiAchievement("planned");
|
||||
|
||||
// const method = isStatusEdit.value ? "put" : "post";
|
||||
// await http[method](url, formData);
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
closeDialog();
|
||||
// }
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue