Merge branch 'develop' into devTee
This commit is contained in:
commit
cbf94f1daa
13 changed files with 106 additions and 94 deletions
|
|
@ -51,41 +51,41 @@ const menuList = readonly<any[]>([
|
|||
path: "dashboard",
|
||||
role: "dashboard",
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
icon: "o_person",
|
||||
activeIcon: "person",
|
||||
label: "ข้อมูลหลัก",
|
||||
path: "metadataNew",
|
||||
role: "metadata",
|
||||
children: [
|
||||
{
|
||||
key: 2.0,
|
||||
label: "ข้อมูลเกี่ยวกับบุคคล",
|
||||
path: "masterPersonal",
|
||||
},
|
||||
{
|
||||
key: 2.0,
|
||||
label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
|
||||
path: "masterPosition",
|
||||
},
|
||||
{
|
||||
key: 2.0,
|
||||
label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
|
||||
path: "masterPositionEmployee",
|
||||
},
|
||||
{
|
||||
key: 2.0,
|
||||
label: "ข้อมูลปฏิทินวันหยุด",
|
||||
path: "masterCalendarWork",
|
||||
},
|
||||
{
|
||||
key: 2.0,
|
||||
label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
|
||||
path: "masterInsignia",
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// key: 2,
|
||||
// icon: "o_person",
|
||||
// activeIcon: "person",
|
||||
// label: "ข้อมูลหลัก",
|
||||
// path: "metadataNew",
|
||||
// role: "metadata",
|
||||
// children: [
|
||||
// {
|
||||
// key: 2.0,
|
||||
// label: "ข้อมูลเกี่ยวกับบุคคล",
|
||||
// path: "masterPersonal",
|
||||
// },
|
||||
// {
|
||||
// key: 2.0,
|
||||
// label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
|
||||
// path: "masterPosition",
|
||||
// },
|
||||
// {
|
||||
// key: 2.0,
|
||||
// label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
|
||||
// path: "masterPositionEmployee",
|
||||
// },
|
||||
// {
|
||||
// key: 2.0,
|
||||
// label: "ข้อมูลปฏิทินวันหยุด",
|
||||
// path: "masterCalendarWork",
|
||||
// },
|
||||
// {
|
||||
// key: 2.0,
|
||||
// label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
|
||||
// path: "masterInsignia",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
key: 2,
|
||||
icon: "o_person",
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ function onSubmit() {
|
|||
["org" + type + "RankSub"]:
|
||||
level.value !== 0 ? formData.orgLevelSub : undefined,
|
||||
[nameId]: rootId,
|
||||
responsibility: formData.responsibility,
|
||||
responsibility:
|
||||
formData.responsibility != null ? formData.responsibility : "",
|
||||
};
|
||||
|
||||
if (actionType.value === "ADD") {
|
||||
|
|
|
|||
|
|
@ -99,9 +99,6 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||
const profileStore = useProfileDataStore();
|
||||
|
||||
const props = defineProps({
|
||||
header: {
|
||||
type: String,
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import type { QForm } from "quasar";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import HeaderTop from "@/modules/04_registry/components/Information/top.vue";
|
||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||
import HeaderTop from "@/modules/03_recruiting/components/top1.vue";
|
||||
import ProfileTable from "@/modules/03_recruiting/components/Table1.vue";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "lastUpdatedAt",
|
||||
align: "left",
|
||||
label: "ว้นที่แก้ไขล่าสุด",
|
||||
label: "วันที่แก้ไขล่าสุด",
|
||||
sortable: true,
|
||||
field: "lastUpdatedAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ watchEffect(() => {
|
|||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="personalId"
|
||||
row-key="profileId"
|
||||
flat
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ watchEffect(() => {
|
|||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="personalId"
|
||||
row-key="profileId"
|
||||
flat
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ const addOther = async () => {
|
|||
let pId: string[] = [];
|
||||
let Type = props.type as string;
|
||||
selected.value.forEach((e: any) => {
|
||||
pId.push(e.personalId);
|
||||
pId.push(e.profileId);
|
||||
});
|
||||
let data = {
|
||||
id: pId,
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ watchEffect(() => {
|
|||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="personalId"
|
||||
row-key="id"
|
||||
flat
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
|
|
|
|||
|
|
@ -173,11 +173,14 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posLevelName",
|
||||
align: "left",
|
||||
label: "ระดับ",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "posLevelName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return row.posTypeName + " (" + row.posLevelName + ")";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "organizationOrganization",
|
||||
|
|
@ -299,21 +302,21 @@ async function filterKeyword2Fn(page: number) {
|
|||
}
|
||||
|
||||
/** fecth profile */
|
||||
async function fecthlistPersonal() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.then((res) => {
|
||||
const id = res.data.result[0].id;
|
||||
if (id !== "") {
|
||||
findlist(id);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
// async function fecthlistPersonal() {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profileOrganizRoot)
|
||||
// .then((res) => {
|
||||
// const id = res.data.result[0].id;
|
||||
// if (id !== "") {
|
||||
// findlist(id);
|
||||
// }
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {});
|
||||
// }
|
||||
|
||||
/**
|
||||
* ส่งข้อมูลเพื่อ รับ res
|
||||
|
|
@ -341,34 +344,34 @@ async function fecthlistProbation(id: string, data: any) {
|
|||
* ค้นหาข้อมูลตามไอดี
|
||||
* @param id string
|
||||
*/
|
||||
async function findlist(id: string) {
|
||||
let data: CriteriaType[] = [
|
||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||
{ criteriaType: "is_probation", criteriaValue: "true" },
|
||||
];
|
||||
let data2: CriteriaType[] = [
|
||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||
{ criteriaType: "is_probation", criteriaValue: "false" },
|
||||
];
|
||||
let response1 = await fecthlistProbation(id, data);
|
||||
let response2 = await fecthlistProbation(id, data2);
|
||||
// async function findlist(id: string) {
|
||||
// let data: CriteriaType[] = [
|
||||
// { criteriaType: "is_retire", criteriaValue: "false" },
|
||||
// { criteriaType: "is_probation", criteriaValue: "true" },
|
||||
// ];
|
||||
// let data2: CriteriaType[] = [
|
||||
// { criteriaType: "is_retire", criteriaValue: "false" },
|
||||
// { criteriaType: "is_probation", criteriaValue: "false" },
|
||||
// ];
|
||||
// let response1 = await fecthlistProbation(id, data);
|
||||
// let response2 = await fecthlistProbation(id, data2);
|
||||
|
||||
response1.forEach((e: any) =>
|
||||
probationlist.value.push({ ...e, probation: true })
|
||||
);
|
||||
response2.forEach((e: any) =>
|
||||
probationlist.value.push({ ...e, probation: false })
|
||||
);
|
||||
rows2.value = probationlist.value.map((e: mapData) => ({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
position: e.position,
|
||||
level: e.positionEmployeeLevel,
|
||||
organizationOrganization: e.oc,
|
||||
status: e.probation,
|
||||
}));
|
||||
modal.value = true;
|
||||
}
|
||||
// response1.forEach((e: any) =>
|
||||
// probationlist.value.push({ ...e, probation: true })
|
||||
// );
|
||||
// response2.forEach((e: any) =>
|
||||
// probationlist.value.push({ ...e, probation: false })
|
||||
// );
|
||||
// rows2.value = probationlist.value.map((e: mapData) => ({
|
||||
// id: e.id,
|
||||
// fullname: e.fullname,
|
||||
// position: e.position,
|
||||
// level: e.positionEmployeeLevel,
|
||||
// organizationOrganization: e.oc,
|
||||
// status: e.probation,
|
||||
// }));
|
||||
// modal.value = true;
|
||||
// }
|
||||
|
||||
/**
|
||||
* เพิ่มข้อมูล ผู้ทดลองปฏิบัติหน้าที่ราชการ
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ async function searchInput() {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
const list = data.map((e: ResponsePreson) => ({
|
||||
personId: e.personId,
|
||||
personId: e.id,
|
||||
idcard: e.idcard,
|
||||
prefix: e.prefix,
|
||||
firstName: e.firstName,
|
||||
|
|
@ -249,6 +249,7 @@ watch(props.data, async () => {
|
|||
formData.qualification = props.data.qualification;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<form @submit.prevent.stop="onValidate">
|
||||
<q-card bordered>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ interface typeOp {
|
|||
}
|
||||
|
||||
interface ResponsePreson {
|
||||
personId: string; //id อ้างอิง profile
|
||||
id?: string; //id อ้างอิง profile
|
||||
personId?: string; //id อ้างอิง profile
|
||||
idcard: string; //เลขประจำตัวประชาชน
|
||||
prefix: string; //คำนำหน้า
|
||||
firstName: string; //ชื่อ
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import type {
|
|||
} from "@/modules/11_discipline/interface/request/director";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
|
@ -207,7 +207,7 @@ async function searchInput() {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
const list = data.map((e: ResponsePreson) => ({
|
||||
personId: e.personId,
|
||||
personId: e.id,
|
||||
idcard: e.idcard,
|
||||
prefix: e.prefix,
|
||||
firstName: e.firstName,
|
||||
|
|
|
|||
|
|
@ -300,12 +300,12 @@ function deletePos(id: string) {
|
|||
.delete(config.API.orgEmployeePosById(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
searchInput();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
searchInput();
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
|
|
@ -351,6 +351,15 @@ watch(
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => modalAdd.value,
|
||||
() => {
|
||||
if (!modalAdd.value) {
|
||||
dataCopy.value = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue