ประเมินบุคคล => permission ,รายการชื่อกรรมการ
This commit is contained in:
parent
d2f52a2551
commit
3d3013277b
3 changed files with 109 additions and 132 deletions
|
|
@ -12,12 +12,21 @@ import type { FormData } from "@/modules/11_discipline/interface/request/directo
|
|||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import Form from "@/modules/12_evaluatePersonal/components/Director/Form.vue";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
const $q = useQuasar();
|
||||
const { messageError, showLoader, hideLoader, dialogConfirm, success } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const directorId = defineModel<string>("directorId", { required: true });
|
||||
const actionType = defineModel<string>("actionType", { required: true });
|
||||
|
|
@ -25,6 +34,7 @@ const props = defineProps({
|
|||
fetchDataList: { type: Function, required: true },
|
||||
});
|
||||
|
||||
// ชื่อ Dialog
|
||||
const title = computed(() =>
|
||||
actionType.value === "VIEW" ? "รายละเอียด" : "แก้ไขรายชื่อกรรมการ"
|
||||
);
|
||||
|
|
@ -44,7 +54,7 @@ const dataDettail = reactive<FormData>({
|
|||
});
|
||||
|
||||
/**
|
||||
* ดึงค่าจาก api
|
||||
* function fetch ช้อมูลชื่อกรรมการ
|
||||
*/
|
||||
function fetchData() {
|
||||
showLoader();
|
||||
|
|
@ -66,6 +76,10 @@ function fetchData() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ยืนยันการบันทึกการแก้ไขข้อมุล
|
||||
* @param formData ข้อมุลชื่อกรรมการ
|
||||
*/
|
||||
function onSubmit(formData: FormData) {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
|
|
@ -92,6 +106,9 @@ function onSubmit(formData: FormData) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด dialog
|
||||
*/
|
||||
function onCloseDialog() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue