diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index ebe6d1cdb..219f71a38 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -33,7 +33,7 @@ const checkRoutePermisson = ref( const id = ref(route.params.id as string); const modalPerson = ref(false); const toggleModal = () => (modalPerson.value = !modalPerson.value); -const isEmpType = ref('') +const isEmpType = ref(""); /**เรียกใช้ store */ const investigateFactStore = useInvestigateFactStore(); const mainStore = useDisciplineMainStore(); @@ -544,10 +544,10 @@ async function saveDuty(id: string, duty: string, resolution: string) { } /** ดูข้อมูลในทะเบียนประวัติ */ -function onclickViewinfo(id: string,type:string) { +function onclickViewinfo(id: string, type: string) { modalPersonal.value = true; personId.value = id; - isEmpType.value = type + isEmpType.value = type; } /** อัพเดต ปิด/เปิดเมนู ทะเบียนประวัติ */ @@ -646,7 +646,7 @@ watch(props.data, async () => { formData.investigationExtendHistory = props.data.investigationExtendHistory; - mainStore.rowsAdd = props.data.persons.map((person: any) => ({ + const listDataMain = props.data.persons.map((person: any) => ({ id: person.id, idcard: person.idcard, name: person.name, @@ -663,7 +663,6 @@ watch(props.data, async () => { isSend: person.isSend, isDisciplinary: person.isDisciplinary, isAncestorDNA: person.isAncestorDNA, - root: person.root, rootId: person.rootId, rootShortName: person.rootShortName, @@ -686,6 +685,8 @@ watch(props.data, async () => { posLevelName: person.posLevelName, citizenId: person.idcard, })); + mainStore.rowsAdd = listDataMain; + mainStore.rowsAddCheck = listDataMain; mainStore.rowsCheck = mainStore.rowsAdd.filter( (item: any) => item.isDisciplinary === false && item.isSend === "NEW" ); @@ -964,9 +965,12 @@ onMounted(async () => { ({ + const listDataMain = props.data.persons.map((person: any) => ({ id: person.id, idcard: person.idcard, name: person.name, @@ -374,6 +374,8 @@ async function fetchDatadetail() { posLevelId: person.posLevelId, citizenId: person.idcard, })); + mainStore.rowsAdd = listDataMain; + mainStore.rowsAddCheck = listDataMain; mainStore.rowsCheck = mainStore.rowsAdd.filter( (item: any) => item.isSuspend === "NEW" && item.isSend === "NEW" ); @@ -946,9 +948,12 @@ onMounted(async () => { { { id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" }, ]); const rowsAdd = ref([]); + const rowsAddCheck = ref([]); const rowsSend = ref([]); const rowsCheck = ref([]); /** หัวตารางผู้ถูกร้องเรียน */ @@ -542,6 +543,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { columnsDirector, visibleColumnsDirector, rowsAdd, + rowsAddCheck, fetchData, statusResultOptions, convertStatusResult,