Merge branch 'develop' into warunee-dev
This commit is contained in:
commit
ab15f989cc
14 changed files with 637 additions and 42 deletions
|
|
@ -207,6 +207,7 @@ async function onSubmit(data: any) {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
getData();
|
||||
hideLoader();
|
||||
});
|
||||
// router.push(`/discipline/complaints`);
|
||||
|
|
|
|||
|
|
@ -184,10 +184,9 @@ function onSubmit() {
|
|||
$q,
|
||||
async () => {
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = mainStore.rowsAdd;
|
||||
props.onSubmit(formData);
|
||||
} else props.onSubmit(formData);
|
||||
// props.onSubmit(formData);
|
||||
formData.persons = await mainStore.rowsAdd;
|
||||
}
|
||||
await props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
|
|
@ -321,10 +320,10 @@ function getOc() {
|
|||
*/
|
||||
function deletePerson(id: string) {
|
||||
// dialogRemove($q, () => {
|
||||
changeFormData();
|
||||
const dataRow = mainStore.rowsAdd;
|
||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||
mainStore.rowsAdd = updatedRows;
|
||||
changeFormData();
|
||||
// });
|
||||
}
|
||||
|
||||
|
|
@ -984,11 +983,11 @@ onMounted(() => {
|
|||
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:checkId="mainStore.rowsAdd"
|
||||
:modal="modal"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
@returnData="handleSave"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1302,7 +1302,7 @@ onMounted(async () => {
|
|||
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:checkId="mainStore.rowsAdd"
|
||||
:mainData="mainStore.rowsAdd"
|
||||
:modal="modalPerson"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, onMounted } from "vue";
|
||||
import { ref, computed, watchEffect, onMounted, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
|
@ -119,6 +119,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
const props = defineProps({
|
||||
data:Array,
|
||||
Modal: Boolean,
|
||||
closeModal: Function,
|
||||
getData: Function,
|
||||
|
|
@ -209,8 +210,15 @@ watchEffect(() => {
|
|||
}
|
||||
});
|
||||
|
||||
watch(()=>props.data,()=>{
|
||||
if(props.data){
|
||||
const data = props.data.persons
|
||||
console.log(data)
|
||||
}
|
||||
})
|
||||
onMounted(async () => {
|
||||
await fecthTypeOption();
|
||||
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -28,15 +28,6 @@ const route = useRoute();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const type = ref<string>("");
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const data = reactive<FormData>({
|
||||
detail: "",
|
||||
});
|
||||
|
||||
/** จำลองข้อมูลจาก api */
|
||||
const fetchData = async () => {
|
||||
data.detail = "";
|
||||
};
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
|
|
@ -331,6 +322,7 @@ watch(
|
|||
v-model:Modal="modal"
|
||||
:closeModal="closeModal"
|
||||
:rows2="[]"
|
||||
:data="dataResult"
|
||||
v-model:filterKeyword2="filterKeyword"
|
||||
:getData="getData"
|
||||
v-model:type="type"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue