ปรับเเก้
This commit is contained in:
parent
d2c6837a86
commit
46f82b78fc
18 changed files with 446 additions and 190 deletions
|
|
@ -19,12 +19,16 @@ import type {
|
|||
MyObjectInvestigateRef,
|
||||
} from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
|
||||
import type {
|
||||
ArrayPersonAdd
|
||||
} from '@/modules/11_discipline/interface/response/investigate'
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const modalPerson = ref<boolean>(false);
|
||||
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
||||
/**เรียกใช้ store */
|
||||
|
|
@ -271,7 +275,8 @@ watch(props.data, async () => {
|
|||
formData.investigationExtendHistory = props.data.investigationExtendHistory;
|
||||
|
||||
mainStore.rowsAdd = props.data.persons;
|
||||
|
||||
mainStore.rowsCheck = mainStore.rowsAdd.filter((item:any)=> item.isSend === false )
|
||||
console.log(mainStore.rowsCheck)
|
||||
const dataMap = props.data.directors.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||
|
|
@ -523,21 +528,21 @@ function closePopup() {
|
|||
function emitPerson(data: FormData[]) {
|
||||
const dataMapId = data.map((item: FormData) => item.id);
|
||||
console.log(dataMapId);
|
||||
// showLoader();
|
||||
// http
|
||||
// .put(config.API.investigateApprove(id.value), {
|
||||
// persons: dataMapId,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// // router.push(`/discipline/investigatefacts`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// getData();
|
||||
// });
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.investigateReport(), {
|
||||
Id: dataMapId,
|
||||
})
|
||||
.then((res) => {
|
||||
// router.push(`/discipline/investigatefacts`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
getOc();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -1504,7 +1509,7 @@ onMounted(async () => {
|
|||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งรายชื่อไปออกคำสั่งยุติเรื่อง"
|
||||
:rows="mainStore.rowsAdd"
|
||||
:rows="mainStore.rowsCheck"
|
||||
:columns="mainStore.columnsDirector"
|
||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||
@return-person="emitPerson"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue