clear search
This commit is contained in:
parent
4d47694ea5
commit
2967faf441
5 changed files with 8 additions and 21 deletions
|
|
@ -9,6 +9,7 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
|||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const modal = defineModel<boolean>('modal',{required:true})
|
||||
const total = ref<number>(0);
|
||||
const totalList = ref<number>(1);
|
||||
|
||||
|
|
@ -59,11 +60,6 @@ const typeOps = ref<typeOp[]>([
|
|||
|
||||
/** รับค่ามาจาก หน้าหลัก */
|
||||
const props = defineProps({
|
||||
modal: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: true,
|
||||
},
|
||||
btnTitle: {
|
||||
type: String,
|
||||
default: "เพิ่ม",
|
||||
|
|
@ -101,7 +97,7 @@ const emit = defineEmits(["returnData"]);
|
|||
|
||||
/** ปิด dialog */
|
||||
async function close() {
|
||||
props.close();
|
||||
modal.value = false
|
||||
rows.value = [];
|
||||
employeeClass.value = "officer";
|
||||
search.value = "";
|
||||
|
|
@ -119,8 +115,7 @@ function savePost() {
|
|||
/** save data หลังจาก ยืนยัน */
|
||||
function saveData() {
|
||||
props.save(selected.value, employeeClass.value);
|
||||
rows.value = [];
|
||||
employeeClass.value = "officer";
|
||||
close()
|
||||
}
|
||||
|
||||
const searchRef = ref<any>(null);
|
||||
|
|
@ -233,7 +228,7 @@ watch(
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="min-width: 60vw">
|
||||
<q-toolbar>
|
||||
<q-toolbar-title class="text-subtitle2 text-bold">{{
|
||||
|
|
|
|||
|
|
@ -208,7 +208,6 @@ function upLoadFileDoc() {
|
|||
* @param data ข้อมูลรายชื่อผู้ถูกสอบสวนเป็น array
|
||||
*/
|
||||
async function addPerson(data: any, type?: string) {
|
||||
toggleModal();
|
||||
changeFormData();
|
||||
await mainStore.fetchData(data, type);
|
||||
}
|
||||
|
|
@ -1109,9 +1108,8 @@ onMounted(async () => {
|
|||
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:modal="modal"
|
||||
v-model:modal="modal"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -310,7 +310,6 @@ function confirmDelete(id: string) {
|
|||
async function addPerson(data: any, type: string) {
|
||||
await mainStore.fetchData(data, type);
|
||||
changeFormData();
|
||||
toggleModal();
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล active */
|
||||
|
|
@ -1760,9 +1759,8 @@ onMounted(async () => {
|
|||
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:modal="modalPerson"
|
||||
v-model:modal="modalPerson"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
:save="addPerson"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -435,7 +435,6 @@ function returnCount(num: number) {
|
|||
async function addPerson(data: any, type?: string) {
|
||||
await mainStore.fetchData(data, type);
|
||||
changeFormData();
|
||||
toggleModal();
|
||||
}
|
||||
|
||||
/** function เรียกรายชื่อหน่วยงาน*/
|
||||
|
|
@ -1986,9 +1985,8 @@ onMounted(async () => {
|
|||
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:modal="modalPerson"
|
||||
v-model:modal="modalPerson"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกสอบสวน"
|
||||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -194,7 +194,6 @@ function toggleModal() {
|
|||
}
|
||||
|
||||
async function addPerson(data: any, type?: string) {
|
||||
modalPerson.value = false;
|
||||
dataStore.rowsAdd = data.map((item: any) => ({
|
||||
profileId: item.personId,
|
||||
fullname: item.name,
|
||||
|
|
@ -763,9 +762,8 @@ onMounted(() => {
|
|||
|
||||
<DialogAddPersonal
|
||||
title="ผู้ยื่นอุทธรณ์/ร้องทุกข์"
|
||||
:modal="modalPerson"
|
||||
v-model:modal="modalPerson"
|
||||
btn-title="เพิ่มรายชื่อผู้ยื่นอุทธรณ์/ร้องทุกข์"
|
||||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
selecetSwitch="single"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue