ข้อมูลทะเบียนประวัติ => Dialog
This commit is contained in:
parent
cbf34695b8
commit
e452c6dfe0
8 changed files with 1536 additions and 626 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
import type { DataOption } from "@/modules/04_registryNew/interface/index/Main";
|
||||
import type {
|
||||
|
|
@ -7,22 +8,47 @@ import type {
|
|||
} from "@/modules/04_registryNew/interface/response/Main";
|
||||
|
||||
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||
const searchTypeOption = ref<DataOption[]>([
|
||||
{ id: "fullName", name: "ชื่อ-นามสกุล" },
|
||||
{ id: "citizenId", name: "เลขประจำตัวประชาชน" },
|
||||
{ id: "posNo", name: "ตำแหน่งเลขที่" },
|
||||
{ id: "position", name: "ตำแหน่งสายงาน" },
|
||||
]);
|
||||
const employeeClassOps = ref<DataOption[]>([
|
||||
{ id: "officer", name: "ข้าราชการ กทม.สามัญ" },
|
||||
{ id: "perm", name: "ลูกจ้างประจำ" },
|
||||
{ id: "temp", name: "ลูกจ้างชั่วคราว" },
|
||||
]);
|
||||
const posTypeOps = ref<DataOption[]>([]);
|
||||
const posTypeMain = ref<DataType[]>([]);
|
||||
const posLevelOps = ref<DataOption[]>([]);
|
||||
const yearOps = ref<DataOption[]>([]);
|
||||
const mode = ref<string>("card");
|
||||
|
||||
function fetchType(data: DataType[]) {
|
||||
posTypeMain.value = data;
|
||||
const list: DataOption[] = data.map((e: DataType) => ({
|
||||
id: e.id,
|
||||
name: e.posTypeName,
|
||||
}));
|
||||
return list;
|
||||
posTypeOps.value = list;
|
||||
}
|
||||
function fetchLevel(data: DataLevel[]) {
|
||||
const list: DataOption[] = data.map((e: DataLevel) => ({
|
||||
id: e.id,
|
||||
name: e.posLevelName,
|
||||
}));
|
||||
return list;
|
||||
posLevelOps.value = list;
|
||||
}
|
||||
return {
|
||||
fetchType,
|
||||
fetchLevel,
|
||||
posTypeMain,
|
||||
searchTypeOption,
|
||||
employeeClassOps,
|
||||
posTypeOps,
|
||||
posLevelOps,
|
||||
yearOps,
|
||||
mode,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue