Refactoring code module 04_registryPerson
This commit is contained in:
parent
1164d79122
commit
eeb92dfb5d
46 changed files with 1935 additions and 2230 deletions
|
|
@ -1,7 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
|
||||
|
||||
/**
|
||||
*importType
|
||||
|
|
@ -14,10 +16,6 @@ import type { FormFilter } from "@/modules/04_registryPerson/interface/request/M
|
|||
*/
|
||||
import DialogHistory from "@/modules/04_registryPerson/components/DialogHistory.vue";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
|
|
@ -27,10 +25,10 @@ const router = useRouter();
|
|||
/**
|
||||
* props
|
||||
*/
|
||||
const formFilter = defineModel<FormFilter>("formFilter", { required: true });
|
||||
const maxPage = defineModel<Number>("maxPage", { required: true });
|
||||
const empType = defineModel<string>("empType", { required: true });
|
||||
const isFilter = defineModel<boolean>("isFilter", { required: true });
|
||||
const formFilter = defineModel<FormFilter>("formFilter", { required: true }); //ข้อมูลการค้นหา
|
||||
const maxPage = defineModel<Number>("maxPage", { required: true }); //จำนวนหน้าทั้งหมด
|
||||
const empType = defineModel<string>("empType", { required: true }); //ประเภท ข้ารายการ,ลูกจ้าง
|
||||
const isFilter = defineModel<boolean>("isFilter", { required: true }); //แสดงการค้นหา
|
||||
const props = defineProps({
|
||||
rows: { type: Array },
|
||||
fetchData: { type: Function },
|
||||
|
|
@ -207,6 +205,11 @@ function redirectToPagePetition() {
|
|||
router.push(`/registry-officer/request-edit`);
|
||||
}
|
||||
|
||||
/**
|
||||
* ดูการเปลี่ยนแปลงของ formFilter.value.pageSize
|
||||
*
|
||||
* เมื่อมีการเปลี่ยนแปลงจำทำการดึงข้อมูลรายการทะเบียนประวัติใหม่ตามจำนวน formFilter.value.pageSize
|
||||
*/
|
||||
watch(
|
||||
() => formFilter.value.pageSize,
|
||||
() => {
|
||||
|
|
@ -294,6 +297,7 @@ watch(
|
|||
</q-btn-toggle>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
ref="table"
|
||||
row-key="id"
|
||||
|
|
@ -478,15 +482,6 @@ watch(
|
|||
</q-card-section>
|
||||
</q-card>
|
||||
</q-card-section>
|
||||
<!-- <q-separator inset v-if="checkPermission($route)?.attrIsGet" />
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
color="black"
|
||||
label="ดูเพิ่มเติม"
|
||||
class="hover-button full-width q-pa-md"
|
||||
@click="onClickViewDetail(props.row.id)"
|
||||
/> -->
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -526,13 +521,7 @@ watch(
|
|||
</template>
|
||||
</d-table>
|
||||
|
||||
<!-- <DialogAddData
|
||||
v-model:modal="modalDialogAdd"
|
||||
:fetchData="props.fetchData"
|
||||
:fetchType="props.fetchType"
|
||||
:empType="empType"
|
||||
/> -->
|
||||
|
||||
<!-- ประวัติถือครองตำแหน่ง -->
|
||||
<DialogHistory v-model:modal="modalHistory" />
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue