แก้วินัย

This commit is contained in:
setthawutttty 2025-04-21 16:29:32 +07:00
parent 456cf574f6
commit 91502f6d8b
8 changed files with 80 additions and 9 deletions

View file

@ -6,6 +6,7 @@ import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
import { useRoute } from "vue-router";
const mainStore = useDisciplineMainStore();
@ -14,6 +15,7 @@ const total = ref<number>(0);
const totalList = ref<number>(1);
const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin();
const { dialogMessageNotify, showLoader, hideLoader, messageError } = mixin;
@ -190,7 +192,23 @@ async function getSearch() {
child4DnaId: e.child4DnaId,
}));
rows.value = list;
if (route.name == "disciplineInvestigatefactsEdit") {
const idIsSend = mainStore.rowsAdd
.filter(
(item: any) => item.isSend === "DONE" || item.isAncestorDNA === true
)
.map((item: any) => item.personId);
rows.value = list.filter(
(item: any) => !idIsSend.includes(item.personId)
);
} else {
const idIsSend = mainStore.rowsAdd
.filter((item: any) => item.isAncestorDNA === true)
.map((item: any) => item.personId);
rows.value = list.filter(
(item: any) => !idIsSend.includes(item.personId)
);
}
})
.catch((err) => {
messageError($q, err);
@ -301,7 +319,7 @@ watch(
<div class="full-width">
<d-table
ref="table"
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'profileType')"
:columns="mainStore.columnsRespondent?.filter((item:any)=>item.name !== 'profileType' && item.name !== 'isSend' && item.name !== 'remarkReject')"
:rows="rows"
row-key="personId"
flat