Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-09-26 15:24:23 +07:00
commit 016f256d38
52 changed files with 165 additions and 278 deletions

View file

@ -78,7 +78,6 @@ const loadTreeData = async () => {
};
function filterByPersonIdNull(obj: any) {
// console.log(obj);
if (obj.name === null && obj.isCondition != true) {
return true;
}
@ -155,8 +154,6 @@ const validateData = async () => {
};
const id = ref<string>("");
const saveAppoint = async () => {
console.log("save", dataForm);
myFormPosition.value.validate().then(async (result: boolean) => {
if (props.personalId !== undefined) {
id.value = props.personalId.toString();
@ -175,12 +172,11 @@ const saveAppoint = async () => {
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
// positionSalaryAmount: dataForm.positionSalaryAmount,
};
console.log("save appoint===>", dataAppoint);
showLoader();
await http
.put(config.API.otherPosition(id.value), dataAppoint)
.then((res) => {
console.log("respone=>", res);
.then(() => {
success($q, "บันทึกสำเร็จ");
})
.catch((e) => {
@ -280,9 +276,8 @@ const positionLevelOptions = ref<Object[]>([
]);
const selectedPosition = async (data: any) => {
console.log("selecteds", data);
if (data.name == null && selected.value != data.keyId) {
// console.log("selecteds", data);
editDataStatus.value = true;
selected.value = data.keyId;
@ -364,7 +359,7 @@ const selectedPosition = async (data: any) => {
dataForm.positionPathSideId = "";
dataForm.positionTypeId = "";
}
console.log("dataForm", dataForm);
};
const checkPosition = (val: string) => {
@ -377,25 +372,25 @@ const expanded = ref<string[]>([]);
watch(props, () => {
expanded.value = [];
const dataPersonal = props.personal;
console.log(props.personal);
if (dataPersonal) {
dataPersonal.map((data: any) => {
personal.value = data;
});
console.log("personal", personal.value);
}
// console.log("draft===>", personal.value.draft);
if (personal.value) {
// const findData = dataRespone.value.find(findByPerson);
let findData: any = null;
dataRespone.value.map((x: any) => {
findData = findByPerson(x);
// console.log(findData);
if (findData != null) {
// console.log("findData===>", findData);
selectedPosition(findData);
for (let i = 3; i <= findData.keyId.length; i += 2) {
expanded.value.push(findData.keyId.slice(0, i));
@ -408,7 +403,6 @@ watch(props, () => {
});
function findByPerson(element: any): any {
// console.log("searchTree element===>", element)
if (
element.positionNumId &&
element.positionLineId === personal.value.positionLineId &&

View file

@ -114,8 +114,7 @@ const fetchData = async () => {
.get(config.API.placementPersonalId(examId.value))
.then((res: any) => {
const data = res.data.result;
// data.value = data;
// console.log(data);
personalData.value.fullName = data.fullName;
personalData.value.id = data.personalId;

View file

@ -604,7 +604,6 @@ const clickClose = async () => {
* @param _props props ใน row เลอก
*/
const selectData = async (_props: DataProps) => {
// console.log(_props.row);
modalEdit.value = true;
modal.value = true;
edit.value = false;

View file

@ -327,9 +327,7 @@ const clickSave = async () => {
/**
* นทกเพมขอม
*/
const saveData = async () => {
// console.log("saveData");
const saveData = async () => {
showLoader();
await http
.post(config.API.placementCertId(route.params.personalId.toString()), {

View file

@ -115,7 +115,6 @@ const fetchPerson = async () => {
.then((res) => {
const data = res.data.result;
let optionbloodGroups: optionData[] = [];
// console.log(data);
data.bloodGroups.map((r: any) => {
optionbloodGroups.push({
id: r.id ?? "",

View file

@ -214,7 +214,6 @@ const openModalOrder = () => {
};
const openModalTree = (id: string) => {
personalId.value = id;
console.log(personalId.value);
personal.value = rows.value.filter((e: any) => e.id === id);
modalTree.value = true;
};
@ -224,7 +223,6 @@ const getData = async () => {
.get(config.API.relocationMain())
.then((res: any) => {
const data = res.data.result;
console.log("data==>", data);
rows.value = data.map((item: relocationType) => ({
fullname: `${item.prefix}${item.firstname} ${item.lastname}`,
id: item.id,
@ -262,7 +260,6 @@ const getData = async () => {
organizationPositionOld: item.organizationPositionOld,
createdAt:date2Thai(item.createdAt),
}));
console.log(rows.value);
})
.catch((e) => {
// messageError($q, e);
@ -280,9 +277,7 @@ const saveOrder = async () => {
showLoader();
await http
.post(config.API.relocationMainReport(), body)
.then((res: any) => {
// const data = res.data.result;
// console.log(data);
.then(() => {
success($q, "ส่งไปออกคำสั่งย้าย");
closeModal();
})
@ -297,9 +292,8 @@ const saveOrder = async () => {
const deleteData = async (id: string) => {
await http
.delete(config.API.relocationMainDelete(id))
.then((res) => {
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
console.log(res);
})
.catch((e) => {
messageError($q, e);

View file

@ -85,7 +85,6 @@ const loadTreeData = async () => {
};
function filterByPersonIdNull(obj: any) {
// console.log(obj);
if (obj.name === null && obj.isCondition != true) {
return true;
}
@ -162,8 +161,6 @@ const validateData = async () => {
};
const id = ref<string>("");
const saveAppoint = async () => {
console.log("save", dataForm);
myFormPosition.value.validate().then(async (result: boolean) => {
if (props.personalId !== undefined) {
id.value = props.personalId.toString();
@ -182,12 +179,11 @@ const saveAppoint = async () => {
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
// positionSalaryAmount: dataForm.positionSalaryAmount,
};
console.log("save appoint===>", dataAppoint);
showLoader();
await http
.put(config.API.relocationMainPut(id.value), dataAppoint)
.then((res) => {
console.log("respone=>", res);
.then(() => {
success($q, "บันทึกสำเร็จ");
})
.catch((e) => {
@ -286,9 +282,8 @@ const positionLevelOptions = ref<Object[]>([
]);
const selectedPosition = async (data: any) => {
console.log("selecteds", data);
if (data.name == null && selected.value != data.keyId) {
// console.log("selecteds", data);
editDataStatus.value = true;
selected.value = data.keyId;
@ -370,7 +365,6 @@ const selectedPosition = async (data: any) => {
dataForm.positionPathSideId = "";
dataForm.positionTypeId = "";
}
console.log("dataForm", dataForm);
};
const checkPosition = (val: string) => {
@ -383,25 +377,21 @@ const expanded = ref<string[]>([]);
watch(props, () => {
expanded.value = [];
const dataPersonal = props.personal;
console.log(props.personal);
if (dataPersonal) {
dataPersonal.map((data: any) => {
personal.value = data;
});
console.log("personal", personal.value);
}
// console.log("draft===>", personal.value.draft);
if (personal.value) {
// const findData = dataRespone.value.find(findByPerson);
let findData: any = null;
dataRespone.value.map((x: any) => {
findData = findByPerson(x);
// console.log(findData);
if (findData != null) {
// console.log("findData===>", findData);
selectedPosition(findData);
for (let i = 3; i <= findData.keyId.length; i += 2) {
expanded.value.push(findData.keyId.slice(0, i));
@ -414,7 +404,6 @@ watch(props, () => {
});
function findByPerson(element: any): any {
// console.log("searchTree element===>", element)
if (
element.positionNumId &&
element.positionLineId === personal.value.positionLineId &&

View file

@ -207,9 +207,7 @@ const saveData = async () => {
showLoader();
await http
.put(config.API.relocationMainEdit(dataId), body)
.then((res: any) => {
// const data = res.data.result;
// console.log(data);
.then(() => {
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
edit.value = false;
})

View file

@ -287,7 +287,6 @@ const getClass = (val: boolean) => {
onMounted(async () => {
if (keycloak.tokenParsed != null) {
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
console.log("roleAdmin===>", roleAdmin.value);
}
await getData();
});

View file

@ -223,7 +223,6 @@ const deleteData = async (id: string) => {
.delete(config.API.officerMainDelete(id))
.then((res) => {
success($q, "ลบข้อมูลสำเร็จ");
console.log(res);
})
.catch((e) => {
messageError($q, e);

View file

@ -95,8 +95,7 @@ const fecthAssign = async () => {
showLoader();
await http
.get(config.API.evaluateCreate(assignId.value))
.then(async (res: any) => {
console.log(res);
.then(async (res) => {
if (props.action == "add") {
person.value = res.data.data.person;
commander.value = res.data.data.commander;

View file

@ -6,7 +6,7 @@ import { useCounterMixin } from "@/stores/mixin";
import { useRouter, useRoute } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import criterion from "@/modules/05_placement/components/Other/Criterion.vue"
import criterion from "@/modules/05_placement/components/Other/Criterion.vue";
const router = useRouter();
const routeName = router.currentRoute.value.name;
@ -28,9 +28,7 @@ const {
const route = useRoute();
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const saveEdit = (id: string) => {
dialogConfirm($q, () => console.log("save"));
};
const edit = () => {
status.value = true;
};
@ -87,7 +85,6 @@ const fecthAssign = async () => {
chairman.value = res.data.data.chairman;
commander.value = res.data.data.commander;
mentors.value = res.data.data.mentors;
console.log(commander.value.name);
})
.catch((e) => {
messageError($q, e);

View file

@ -265,7 +265,7 @@ const savaForm = () => {
alerts[index + 11].value = true;
}
});
console.log(evaluate_expenct_level.value);
dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
} else {
@ -346,13 +346,13 @@ ArrayCountbotton.forEach((variable, index) => {
});
watch(lengthevaluate_expenct_level, (newLength) => {
if (newLength === evaluate_expenct_level.value.length) {
console.log(true);
alerts[0].value = false;
}
});
watch(lengthevaluate_ouptut, (newLength) => {
if (newLength === evaluate_ouptut.value.length) {
console.log(true);
alerts[1].value = false;
}
});

View file

@ -235,8 +235,6 @@ const savaForm = () => {
alerts[index + 11].value = true;
}
});
console.log(evaluate_expenct_level.value);
dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
} else {
putformData();
@ -311,13 +309,13 @@ ArrayCountbotton.forEach((variable, index) => {
});
watch(lengthevaluate_expenct_level, (newLength) => {
if (newLength === evaluate_expenct_level.value.length) {
console.log(true);
alerts[0].value = false;
}
});
watch(lengthevaluate_ouptut, (newLength) => {
if (newLength === evaluate_ouptut.value.length) {
console.log(true);
alerts[1].value = false;
}
});

View file

@ -64,9 +64,6 @@ const result_option = ref<any>([
const note = ref<string>("");
const date = ref<Date>(new Date());
const saveEdit = (id: string) => {
dialogConfirm($q, () => console.log("save"));
};
const edit = () => {
status.value = true;
};
@ -349,24 +346,24 @@ onMounted(() => {
</div>
<div class="row col-12 q-gutter-lg q-mt-md">
<div class="col-xs-12 col-sm-6">
<div class="col-12 text-top0 items-center">
ผลการพฒนาขาราชการทอยระหวางการทดลองปฏหนาทราชการ
</div>
<div class="col-12">
<q-select
class="col-12"
dense
v-model="develop_result"
outlined
:options="result_option"
option-label="name"
option-value="value"
map-options
emit-value
:disable="!status"
/>
</div>
</div>
<div class="col-12 text-top0 items-center">
ผลการพฒนาขาราชการทอยระหวางการทดลองปฏหนาทราชการ
</div>
<div class="col-12">
<q-select
class="col-12"
dense
v-model="develop_result"
outlined
:options="result_option"
option-label="name"
option-value="value"
map-options
emit-value
:disable="!status"
/>
</div>
</div>
<div class="col-xs-12 col-sm-11">
<div class="col-12 text-top0 row items-center">
@ -434,7 +431,9 @@ onMounted(() => {
dense
:disable="!status"
class="full-width datepicker"
:model-value="evaluate_date != null ? date2Thai(evaluate_date) : null"
:model-value="
evaluate_date != null ? date2Thai(evaluate_date) : null
"
:rules="[(val) => !!val || `${'วัน เดือน ปี ที่ประเมิน'}`]"
>
<template v-slot:prepend>
@ -472,8 +471,8 @@ onMounted(() => {
.q-rating__icon {
text-shadow: transparent !important;
}
.color-txt{
color: black!important;;
.color-txt {
color: black !important;
}
.q-card {
box-shadow: 0px 0px 0px 0px !important;

View file

@ -63,7 +63,7 @@ const getSurveyData = async () => {
}
})
.catch((e) => {
console.log(e);
messageError($q,e)
});
};
const classBordered = ref<string>("");