แก้ลบ ผู้ร้องเรียน
This commit is contained in:
parent
d84e590670
commit
02b96da93b
3 changed files with 23 additions and 12 deletions
|
|
@ -33,7 +33,7 @@ const checkRoutePermisson = ref<boolean>(
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const modalPerson = ref<boolean>(false);
|
||||
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
||||
const isEmpType = ref<string>('')
|
||||
const isEmpType = ref<string>("");
|
||||
/**เรียกใช้ 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 () => {
|
|||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
!isReadonly &&
|
||||
!checkRoutePermisson &&
|
||||
props.row.isAncestorDNA === false
|
||||
(!isReadonly &&
|
||||
!checkRoutePermisson &&
|
||||
props.row.isAncestorDNA === false) ||
|
||||
!mainStore.rowsAddCheck.some(
|
||||
(row) => row.personId === props.row.personId
|
||||
)
|
||||
"
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ async function fetchDatadetail() {
|
|||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
||||
|
||||
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,
|
||||
|
|
@ -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 () => {
|
|||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
!isReadonly &&
|
||||
props.row.isAncestorDNA === false
|
||||
(!checkRoutePermisson &&
|
||||
!isReadonly &&
|
||||
props.row.isAncestorDNA === false) ||
|
||||
!mainStore.rowsAddCheck.some(
|
||||
(row) => row.personId === props.row.personId
|
||||
)
|
||||
"
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
{ id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" },
|
||||
]);
|
||||
const rowsAdd = ref<ArrayPersonAdd[]>([]);
|
||||
const rowsAddCheck = ref<ArrayPersonAdd[]>([]);
|
||||
const rowsSend = ref<ArrayPersonAdd[]>([]);
|
||||
const rowsCheck = ref<ArrayPersonAdd[]>([]);
|
||||
/** หัวตารางผู้ถูกร้องเรียน */
|
||||
|
|
@ -542,6 +543,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
columnsDirector,
|
||||
visibleColumnsDirector,
|
||||
rowsAdd,
|
||||
rowsAddCheck,
|
||||
fetchData,
|
||||
statusResultOptions,
|
||||
convertStatusResult,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue