Merge branch 'develop' into warunee-dev
# Conflicts: # src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore copy.vue # src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue
This commit is contained in:
commit
556264c5f2
59 changed files with 1785 additions and 282 deletions
|
|
@ -124,6 +124,11 @@ const putAppointment = async () => {
|
|||
edit.value = false;
|
||||
});
|
||||
};
|
||||
const cancel = () => {
|
||||
edit.value = false
|
||||
fecthappointmentByid()
|
||||
|
||||
}
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
"full-width inputgreen cursor-pointer": val,
|
||||
|
|
@ -200,7 +205,7 @@ onMounted(async () => {
|
|||
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก"
|
||||
style="width: 80px" @click="clickSave" />
|
||||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px"
|
||||
@click="edit = !edit" />
|
||||
@click="cancel()" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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()), {
|
||||
|
|
|
|||
|
|
@ -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 ?? "",
|
||||
|
|
|
|||
|
|
@ -636,10 +636,10 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="informaData.lastname"
|
||||
lazy-rules
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||
:label="`${'นามสกุล'}`"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -274,7 +274,10 @@ const saveData = async () => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const cancel = () => {
|
||||
edit.value = false
|
||||
getData()
|
||||
}
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
"full-width inputgreen cursor-pointer": val,
|
||||
|
|
@ -284,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();
|
||||
});
|
||||
|
|
@ -523,7 +525,7 @@ onMounted(async () => {
|
|||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
@click="cancel()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ const edit = () => {
|
|||
};
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
getAssign()
|
||||
};
|
||||
|
||||
const filterData = (options: any[], excludedGroups: any[]) => {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const edit = () => {
|
|||
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
fecthAssign()
|
||||
};
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -94,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;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -36,6 +36,7 @@ const edit = () => {
|
|||
};
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
fecthAssign()
|
||||
};
|
||||
const evaluate_no = ref<number>();
|
||||
const evaluate_id = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -76,11 +76,13 @@ const edit = () => {
|
|||
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
props.fecthAssign?.(assignId.value)
|
||||
};
|
||||
const props = defineProps({
|
||||
tab: String,
|
||||
data: Object,
|
||||
action: String,
|
||||
fecthAssign: Function,
|
||||
});
|
||||
|
||||
const fecthFormdata = async () => {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -88,11 +88,13 @@ const edit = () => {
|
|||
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
props.fecthAssign?.(assignId.value)
|
||||
};
|
||||
const props = defineProps({
|
||||
tab: String,
|
||||
data: Object,
|
||||
action: String,
|
||||
fecthAssign: Function,
|
||||
});
|
||||
|
||||
const fecthFormdata = async () => {
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ const addData = () => {
|
|||
:key="item.no"
|
||||
>
|
||||
<FormSaveResult
|
||||
:fecthAssign="fecthAssign"
|
||||
:tab="tab"
|
||||
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
|
||||
action="edit"
|
||||
|
|
|
|||
|
|
@ -142,19 +142,12 @@ const addData = () => {
|
|||
:key="item.no"
|
||||
>
|
||||
<FormSaveResultCommader
|
||||
:fecthAssign="fecthAssign"
|
||||
:tab="tab"
|
||||
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
|
||||
action="edit"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
|
||||
<!-- <q-page-container>
|
||||
<FormSaveResult
|
||||
:tab="tab"
|
||||
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
|
||||
action="edit"
|
||||
/>
|
||||
</q-page-container> -->
|
||||
</q-tab-panels>
|
||||
|
||||
<div class="q-gutter-md" v-else-if="probationStore.tabs.length == 0">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const getSurveyData = async () => {
|
|||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q,e)
|
||||
});
|
||||
};
|
||||
const classBordered = ref<string>("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue