fix
This commit is contained in:
parent
b0b077b1d4
commit
0d5db9160e
7 changed files with 30 additions and 68 deletions
|
|
@ -3,13 +3,11 @@ import { ref } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/**
|
||||
* importType*
|
||||
*/
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { QForm } from "quasar";
|
||||
import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main";
|
||||
|
|
@ -18,27 +16,19 @@ import type {
|
|||
Position,
|
||||
} from "@/modules/04_registryPerson/interface/response/History";
|
||||
|
||||
/**
|
||||
* import components
|
||||
*/
|
||||
/** import components*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
//use
|
||||
const myForm = ref<QForm>();
|
||||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
//props
|
||||
const modal = defineModel<boolean>("modal", { required: true }); //แสดง popup ประวัติถือครองตำแหน่ง
|
||||
|
||||
/**
|
||||
* ตัวแปร
|
||||
*/
|
||||
//ตัวแปร
|
||||
const employeeClass = ref<string>(""); //ประเภทข้า่รายการ
|
||||
const typeKeyword = ref<string>("");
|
||||
const Keyword = ref<string>("");
|
||||
|
|
@ -47,6 +37,7 @@ const employeeClassOps = ref<DataOption[]>([
|
|||
{ id: "officer", name: "ข้าราชการ กทม.สามัญ" },
|
||||
{ id: "perm", name: "ลูกจ้างประจำ" },
|
||||
]);
|
||||
//ตัวเลือกประเภทการค้นหา
|
||||
const typeKeywordOps = ref<DataOption[]>([
|
||||
{ id: "no", name: "ตำแหน่งเลขที่" },
|
||||
{ id: "position", name: "ตำแหน่ง" },
|
||||
|
|
@ -54,9 +45,7 @@ const typeKeywordOps = ref<DataOption[]>([
|
|||
const positionOps = ref<DataOption[]>([]);
|
||||
const options = ref<DataOption[]>([]);
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -110,9 +99,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
const rows = ref<HistoryPos[]>([]);
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลตำแหน่ง ข้าราชการ
|
||||
*/
|
||||
/** function fetch ข้อมูลตำแหน่ง ข้าราชการ*/
|
||||
function fecthPositionOfficer() {
|
||||
http
|
||||
.get(config.API.listPositionPathHistory)
|
||||
|
|
@ -130,9 +117,7 @@ function fecthPositionOfficer() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลตำแหน่ง ลูกจ้างประจำ
|
||||
*/
|
||||
/** function fetch ข้อมูลตำแหน่ง ลูกจ้างประจำ*/
|
||||
function fetchPositionPerm() {
|
||||
http
|
||||
.get(config.API.listPositionEmployeePositionHistory)
|
||||
|
|
@ -151,9 +136,7 @@ function fetchPositionPerm() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เปลี่ยนประเภท
|
||||
*/
|
||||
/** function เปลี่ยนประเภท*/
|
||||
function changeEmployeeClass() {
|
||||
typeKeyword.value = "";
|
||||
Keyword.value = "";
|
||||
|
|
@ -256,9 +239,7 @@ function clickRedirect(id: string) {
|
|||
router.push(`${url}/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* function ปิด popup
|
||||
*/
|
||||
/** function ปิด popup*/
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
employeeClass.value = "";
|
||||
|
|
|
|||
|
|
@ -5,26 +5,18 @@ import { checkPermission } from "@/utils/permissions";
|
|||
import { useRouter } from "vue-router";
|
||||
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
|
||||
|
||||
/**
|
||||
*importType
|
||||
*/
|
||||
//importType
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { FormFilter } from "@/modules/04_registryPerson/interface/request/Main";
|
||||
|
||||
/**
|
||||
* importComponent
|
||||
*/
|
||||
//importComponent
|
||||
import DialogHistory from "@/modules/04_registryPerson/components/DialogHistory.vue";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
//use
|
||||
const store = useRegistryNewDataStore();
|
||||
const router = useRouter();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
//props
|
||||
const formFilter = defineModel<FormFilter>("formFilter", { required: true }); //ข้อมูลการค้นหา
|
||||
const maxPage = defineModel<Number>("maxPage", { required: true }); //จำนวนหน้าทั้งหมด
|
||||
const empType = defineModel<string>("empType", { required: true }); //ประเภท ข้ารายการ,ลูกจ้าง
|
||||
|
|
@ -36,12 +28,10 @@ const props = defineProps({
|
|||
total: { type: Number, default: 0 },
|
||||
});
|
||||
|
||||
/**
|
||||
* ตัวแปร
|
||||
*/
|
||||
//ตัวแปร
|
||||
const modalHistory = ref<boolean>(false); //ประวัติถือครองตำแหน่ง
|
||||
|
||||
/** ข้อมูล Table*/
|
||||
//ข้อมูล Table
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -163,9 +153,7 @@ const pagination = ref({
|
|||
rowsPerPage: formFilter.value.pageSize,
|
||||
});
|
||||
|
||||
/**
|
||||
* function เปลี่ยนหน้า Table
|
||||
*/
|
||||
/** function เปลี่ยนหน้า Table*/
|
||||
function updatePagePagination() {
|
||||
props.fetchData?.();
|
||||
}
|
||||
|
|
@ -179,9 +167,7 @@ function updatePageSizePagination(newPagination: any) {
|
|||
formFilter.value.pageSize = newPagination.rowsPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* function เปิด popup ประวัติถือครองตำแหน่ง
|
||||
*/
|
||||
/** function เปิด popup ประวัติถือครองตำแหน่ง*/
|
||||
function onClickHistory() {
|
||||
modalHistory.value = !modalHistory.value;
|
||||
}
|
||||
|
|
@ -198,16 +184,13 @@ function onClickViewDetail(id: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* function redirect ไปหน้ารายการคำร้องขอแก้ไขข้อมูล
|
||||
*/
|
||||
/** function redirect ไปหน้ารายการคำร้องขอแก้ไขข้อมูล*/
|
||||
function redirectToPagePetition() {
|
||||
router.push(`/registry-officer/request-edit`);
|
||||
}
|
||||
|
||||
/**
|
||||
* ดูการเปลี่ยนแปลงของ formFilter.value.pageSize
|
||||
*
|
||||
* เมื่อมีการเปลี่ยนแปลงจำทำการดึงข้อมูลรายการทะเบียนประวัติใหม่ตามจำนวน formFilter.value.pageSize
|
||||
*/
|
||||
watch(
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
/** HooK lifecycle ทำงานเมื่อมีการเรียกใช้งาน Componenets */
|
||||
onMounted(() => {
|
||||
fetchListRequset();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,18 +19,15 @@ import DialogEditIDP from "@/modules/04_registryPerson/components/requestEdit/Di
|
|||
const $q = useQuasar();
|
||||
const store = useRequestEditStore();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||
/**
|
||||
* ตัวแปร
|
||||
*/
|
||||
|
||||
//ตัวแปร
|
||||
const status = ref<string>("PENDING"); //ค้นหาตามสถานะ
|
||||
const keyword = ref<string>(""); //คำค้นหา
|
||||
const statusOption = ref<DataOption[]>(store.optionStatusIDP); //รายการสถานะ
|
||||
const modalEdit = ref<boolean>(false); //แก้ไขสถานะคำร้อง
|
||||
const requestId = ref<string>(""); //id รายการแก้ไข
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
//Table
|
||||
const rows = ref<DataListsIDP[]>([]); //รายการข้อมูลการพัฒนารายบุคคล
|
||||
const page = ref<number>(1); //หน้า
|
||||
const pageSize = ref<number>(10); //จำนวนต่อหน้า
|
||||
|
|
@ -279,6 +276,8 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
/** HooK lifecycle ทำงานเมื่อมีการเรียกใช้งาน Componenets*/
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -265,10 +265,6 @@ watch(modal, (val) => {
|
|||
<!-- สถานะคำร้อง -->
|
||||
<q-card-section>
|
||||
<q-card bordered class="col-12">
|
||||
<!-- <div class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
|
||||
สถานะคำร้อง
|
||||
</div>
|
||||
<q-separator /> -->
|
||||
<div class="row q-pa-md q-col-gutter-sm">
|
||||
<!-- สถานะ -->
|
||||
<div class="col-4">
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
* @param data ข้อมูลรายชื่อข้าราชการสามัญ
|
||||
*/
|
||||
async function fetchData(data: any) {
|
||||
|
||||
if (data !== null) {
|
||||
let datalist = await data.map((e: any) => ({
|
||||
id: e.id,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ import type {
|
|||
|
||||
/** import Stores */
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
/** useStore*/
|
||||
|
||||
/** use*/
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue