no message

This commit is contained in:
setthawutttty 2023-08-29 15:58:21 +07:00
parent b3ce9039ff
commit 2c3658e591
14 changed files with 6 additions and 200 deletions

View file

@ -21,10 +21,7 @@ const dataEdit = async (id: string) => {
const data = putDataEdit(id); const data = putDataEdit(id);
await http await http
.put(config.API.saveEditAssign(id), data) .put(config.API.saveEditAssign(id), data)
.then((res) => { .then((res) => {})
// console.log("success put==>",res)
// console.log("save")
})
.catch((e) => {}) .catch((e) => {})
.finally(async () => { .finally(async () => {
status.value = false; status.value = false;
@ -37,7 +34,6 @@ const saveEdit = (id: string) => {
}; };
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
@ -305,12 +301,8 @@ const getAssignNew = async (id: string) => {
value: data.assign_month, value: data.assign_month,
label: `${data.assign_month} เดือน`, label: `${data.assign_month} เดือน`,
}; };
// console.log("Assign-New", data);
monthOp.push(monthOption); monthOp.push(monthOption);
monthSelect.value = `${data.assign_month} เดือน`; monthSelect.value = `${data.assign_month} เดือน`;
// OPcaretaker.value = data.mentors;
// OPcommander.value = [data.commander];
// OPchairman.value = [data.chairman];
fullname.value = data.person.name; fullname.value = data.person.name;
position.value = data.person.OrganizationOrganization; position.value = data.person.OrganizationOrganization;
}); });
@ -685,7 +677,6 @@ const getAssign = async () => {
await http.get(config.API.probationsGetAssign(assignId.value)).then((res) => { await http.get(config.API.probationsGetAssign(assignId.value)).then((res) => {
status.value = false; status.value = false;
const data = res.data.data; const data = res.data.data;
// console.log("ASSIGN-list ==>", data);
fullname.value = data.profile.name; fullname.value = data.profile.name;
position.value = data.profile.OrganizationOrganization; position.value = data.profile.OrganizationOrganization;
date_start.value = data.assign.date_start; date_start.value = data.assign.date_start;

View file

@ -34,7 +34,6 @@ const saveEdit = (id: string) => {
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
@ -104,10 +103,6 @@ const list2_3 = [
]; ];
onMounted(async () => { onMounted(async () => {
// if (props.action == 'add') {
// fecthFormdata();
// }
// console.log("props===>", props)
if (props.tab && props.action == "edit") { if (props.tab && props.action == "edit") {
evaluate_no.value = Number(props.tab.charAt(4)); evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data; dataArr.value = await props.data;
@ -120,19 +115,9 @@ watch(props, async () => {
evaluate_no.value = Number(props.tab.charAt(4)); evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data; dataArr.value = await props.data;
fecthAssign(); fecthAssign();
// console.log("props===>", props);
} }
}); });
// onMounted(async () => {
// if (props.tab !== undefined) {
// round.value = props.tab.charAt(4);
// // fetchEvaluate(assignId.value, round.value);
// }
// fecthAssign(assignId.value);
// // console.log(round.value);
// // console.log(assignId.value);
// });
const fecthAssign = async () => { const fecthAssign = async () => {
showLoader(); showLoader();
await http await http
@ -149,11 +134,6 @@ const fecthAssign = async () => {
start_date.value = res.data.data.start_date; start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date; date_finish.value = res.data.data.end_date;
} }
// console.log(props.tab, res.data.data.evaluate_no);
// if (res.data.data.evaluate_no > evaluate_no.value) {
// await fetchEvaluate(assignId.value, evaluate_no.value);
// }
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -166,13 +146,6 @@ const fecthAssign = async () => {
}); });
}; };
const fetchEvaluate = async () => { const fetchEvaluate = async () => {
// showLoader();
// await http
// .get(config.API.evaluatecommader(assignId.value, evaluate_no.value))
// .then((res: any) => {
// console.log(res);
// let data = res.data.data.evaluate;
// console.log(data);
let data = await dataArr.value; let data = await dataArr.value;
evaluate_id.value = data.id; evaluate_id.value = data.id;
start_date.value = data.date_start; start_date.value = data.date_start;
@ -215,22 +188,8 @@ const fetchEvaluate = async () => {
etc2.value = true; etc2.value = true;
} else etc2.value = false; } else etc2.value = false;
status.value = false; status.value = false;
// })
// .catch((e) => {
// console.log(e);
// if (e.data.message !== "Data not found!") {
// messageError($q, e);
// }
// })
// .finally(() => {
// hideLoader();
// });
}; };
// const dateToday = ref<Date>(new Date("10-10-2023"));
// const dateEnd = ref<Date>(new Date("12-10-2023"));
// const period = ref<number>(1);
const Autherise = ref<any>(null); const Autherise = ref<any>(null);
const dateAutherise = ref<any>(new Date()); const dateAutherise = ref<any>(new Date());
const option = ref<any>([]); const option = ref<any>([]);
@ -348,7 +307,6 @@ const save = () => {
data data
) )
.then((res: any) => { .then((res: any) => {
// console.log(res);
status.value = false; status.value = false;
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
}) })

View file

@ -92,7 +92,6 @@ const fecthAssign = async (id: string) => {
await http await http
.get(config.API.evaluateCreate(id)) .get(config.API.evaluateCreate(id))
.then(async (res: any) => { .then(async (res: any) => {
console.log(res);
person.value = res.data.data.person; person.value = res.data.data.person;
assign.value = res.data.data.assign; assign.value = res.data.data.assign;
commander.value = res.data.data.commander; commander.value = res.data.data.commander;
@ -223,7 +222,6 @@ const putformData = () => {
await http await http
.post(config.API.createformCommader(assignId.value), data) .post(config.API.createformCommader(assignId.value), data)
.then((res: any) => { .then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
router.push( router.push(
`/probation/detail/${personalId.value}/${assignId.value}` `/probation/detail/${personalId.value}/${assignId.value}`
@ -233,30 +231,6 @@ const putformData = () => {
messageError($q, e); messageError($q, e);
}); });
}); });
// $q.dialog({
// title: "",
// message: " ?",
// cancel: {
// flat: true,
// color: "negative",
// },
// persistent: true,
// })
// .onOk(async () => {
// console.log("", data);
// await http
// .post(config.API.createformCommader(assignId.value), data)
// .then((res: any) => {
// console.log(res);
// success($q, "");
// })
// .catch((e: any) => {
// messageError($q, e);
// });
// })
// .onCancel(() => {})
// .onDismiss(() => {});
}; };
</script> </script>

View file

@ -31,7 +31,6 @@ const saveEdit = (id: string) => {
}; };
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
@ -57,10 +56,6 @@ const props = defineProps({
}); });
onMounted(async () => { onMounted(async () => {
// if (props.action == 'add') {
// fecthFormdata();
// }
// console.log("props===>", props)
if (props.tab && props.action == "edit") { if (props.tab && props.action == "edit") {
evaluate_no.value = Number(props.tab.charAt(4)); evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data; dataArr.value = await props.data;
@ -73,24 +68,16 @@ watch(props, async () => {
evaluate_no.value = Number(props.tab.charAt(4)); evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data; dataArr.value = await props.data;
fecthAssign(); fecthAssign();
// console.log("props===>", props);
} }
}); });
// onMounted(() => {
// if (props.tab !== undefined) {
// round.value = props.tab.charAt(4);
// // fetchEvaluate(assignId.value, round.value);
// }
// fecthAssign(assignId.value);
// });
const fecthAssign = async () => { const fecthAssign = async () => {
showLoader(); showLoader();
await http await http
.get(config.API.evaluateChairman(assignId.value)) .get(config.API.evaluateChairman(assignId.value))
.then(async (res: any) => { .then(async (res: any) => {
// console.log(res);
if (props.action == "add") { if (props.action == "add") {
assign.value = res.data.data.assign; assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no; evaluate_no.value = res.data.data.evaluate_no;
@ -114,11 +101,6 @@ const fecthAssign = async () => {
const fetchEvaluate = async () => { const fetchEvaluate = async () => {
showLoader(); showLoader();
// await http
// .get(config.API.evaluateRoundChairman(assignId.value, evaluate_no.value))
// .then((res: any) => {
// let data = res.data.data.evaluate;
// console.log(data);
let data = await dataArr.value; let data = await dataArr.value;
evaluate_id.value = data.id; evaluate_id.value = data.id;
@ -447,14 +429,12 @@ const putformData = () => {
}; };
dialogConfirm($q, async () => { dialogConfirm($q, async () => {
console.log("data==>", data);
await http await http
.put( .put(
config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value), config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value),
data data
) )
.then((res: any) => { .then((res: any) => {
// console.log(res);
status.value = false; status.value = false;
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
router.push(`/probation/detail/${personalId.value}/${assignId.value}`); router.push(`/probation/detail/${personalId.value}/${assignId.value}`);
@ -463,33 +443,6 @@ const putformData = () => {
messageError($q, e); messageError($q, e);
}); });
}); });
// $q.dialog({
// title: "",
// message: " ?",
// cancel: {
// flat: true,
// color: "negative",
// },
// persistent: true,
// })
// .onOk(async () => {
// console.log("", data);
// await http
// .post(config.API.createformChairman(assignId.value), data)
// .then((res: any) => {
// console.log(res);
// success($q, "");
// })
// .catch((e: any) => {
// console.log(e);
// messageError($q, e);
// })
// .finally(() => {
// fetchEvaluate(assignId.value, round.value);
// });
// })
// .onCancel(() => {})
// .onDismiss(() => {});
}; };
</script> </script>

View file

@ -49,7 +49,6 @@ const fecthAssign = async (id: string) => {
await http await http
.get(config.API.evaluateChairman(id)) .get(config.API.evaluateChairman(id))
.then(async (res: any) => { .then(async (res: any) => {
console.log(res);
person.value = res.data.data.person; person.value = res.data.data.person;
assign.value = res.data.data.assign; assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no; evaluate_no.value = res.data.data.evaluate_no;
@ -343,7 +342,6 @@ const putformData = () => {
await http await http
.post(config.API.createformChairman(assignId.value), data) .post(config.API.createformChairman(assignId.value), data)
.then((res: any) => { .then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
router.push( router.push(
`/probation/detail/${personalId.value}/${assignId.value}` `/probation/detail/${personalId.value}/${assignId.value}`

View file

@ -27,13 +27,12 @@ const assign = ref<any>([]);
const mentors = ref<any>([]); const mentors = ref<any>([]);
const commander = ref<any>([]); const commander = ref<any>([]);
const status = ref<boolean>(true); const status = ref<boolean>(true);
// const evaluate = ref<any>([]);
const saveEdit = (id: string) => { const saveEdit = (id: string) => {
dialogConfirm($q, () => console.log("save")); dialogConfirm($q, () => console.log("save"));
}; };
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
@ -48,7 +47,6 @@ const fecthAssign = async (id: string) => {
await http await http
.get(config.API.evaluateReportcreate(id)) .get(config.API.evaluateReportcreate(id))
.then((res) => { .then((res) => {
console.log(res);
assign.value = res.data.data.assign; assign.value = res.data.data.assign;
mentors.value = res.data.data.mentors; mentors.value = res.data.data.mentors;
date_start.value = assign.value.date_start; date_start.value = assign.value.date_start;
@ -62,7 +60,6 @@ const fecthAssign = async (id: string) => {
optionDirector.value = mentors.value; optionDirector.value = mentors.value;
}) })
.catch((e) => { .catch((e) => {
console.log(e);
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
@ -74,7 +71,7 @@ const date_finish = ref<Date>();
const develop = ref<number>(); const develop = ref<number>();
const result = ref<number>(); const result = ref<number>();
const reson = ref<string>(""); const reson = ref<string>("");
const chairman_dated = ref<string>(""); const chairman_dated = ref<Date>();
const director1_dated = ref<any>(""); const director1_dated = ref<any>("");
const director2_dated = ref<any>(""); const director2_dated = ref<any>("");
const fullname = ref<string>("") const fullname = ref<string>("")
@ -83,7 +80,6 @@ const fecthResult = async (id: string) => {
.get(config.API.createformReport(id)) .get(config.API.createformReport(id))
.then((res: any) => { .then((res: any) => {
let data = res.data.data.evaluate; let data = res.data.data.evaluate;
console.log(data);
fullname.value = res.data.data.profile.name; fullname.value = res.data.data.profile.name;
date_start.value = data.date_start; date_start.value = data.date_start;
date_finish.value = data.date_finish; date_finish.value = data.date_finish;
@ -97,7 +93,6 @@ const fecthResult = async (id: string) => {
action.value = "edit"; action.value = "edit";
}) })
.catch((e) => { .catch((e) => {
console.log(e);
}); });
}; };
@ -162,8 +157,6 @@ const postData = async () => {
director1_dated: director1_dated.value, director1_dated: director1_dated.value,
director2_dated: director2_dated.value, director2_dated: director2_dated.value,
}; };
// console.log("postData===>", data);
await http await http
.post(config.API.createformReport(assignId.value), data) .post(config.API.createformReport(assignId.value), data)
.then(() => { .then(() => {
@ -171,7 +164,6 @@ const postData = async () => {
router.push(`/probation/detail/${personalId.value}/${assignId.value}`); router.push(`/probation/detail/${personalId.value}/${assignId.value}`);
}) })
.catch((e: any) => { .catch((e: any) => {
console.log(e);
messageError($q, e); messageError($q, e);
}); });
}; };

View file

@ -42,7 +42,6 @@ const checkArray = ref<number>(0);
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
@ -70,9 +69,7 @@ watch(props, async () => {
if (props.tab && props.action == "edit") { if (props.tab && props.action == "edit") {
evaluate_no.value = Number(props.tab.charAt(4)); evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data; dataArr.value = await props.data;
console.log(dataArr.value)
fecthFormdata(); fecthFormdata();
// console.log("props===>", props.data);
} }
}); });
@ -80,7 +77,6 @@ const fecthFormdata = async () => {
await http await http
.get(config.API.formevaluateRecord(assignId.value)) .get(config.API.formevaluateRecord(assignId.value))
.then(async (res: any) => { .then(async (res: any) => {
// console.log(res);
if (props.action == "add") { if (props.action == "add") {
evaluate_no.value = res.data.data.evaluate_no; evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date; start_date.value = res.data.data.start_date;
@ -112,7 +108,6 @@ const fecthFormdata = async () => {
// } // }
}) })
.catch((e: any) => { .catch((e: any) => {
console.log(e);
}) })
.finally(() => { .finally(() => {
if (props.action == "edit") { if (props.action == "edit") {
@ -123,12 +118,6 @@ const fecthFormdata = async () => {
const fecthFormRound = async () => { const fecthFormRound = async () => {
showLoader(); showLoader();
try { try {
console.log(dataArr.value);
// await http
// .get(config.API.formevaluateround(assignId.value, round.value))
// .then(async(res: any) => {
// console.log("dataArr===>", dataArr.value);
let data = await dataArr.value; let data = await dataArr.value;
evaluate_id.value = data.id; evaluate_id.value = data.id;
start_date.value = data.date_start; start_date.value = data.date_start;
@ -181,15 +170,6 @@ const fecthFormRound = async () => {
} }
status.value = false; status.value = false;
console.log(etc.value);
// })
// .catch((e) => {
// console.log(e);
// })
// .finally(() => {
// hideLoader();
// });
setTimeout(() => { setTimeout(() => {
hideLoader(); hideLoader();
}, 1000); }, 1000);
@ -442,7 +422,6 @@ const saveformdata = async (data: any) => {
await http await http
.post(config.API.createformevaluate(assignId.value), data) .post(config.API.createformevaluate(assignId.value), data)
.then((res: any) => { .then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
router.push(`/probation/detail/${personalId.value}/${assignId.value}`); router.push(`/probation/detail/${personalId.value}/${assignId.value}`);
}) })

View file

@ -42,7 +42,6 @@ const fecthFormdata = async (id: string) => {
await http await http
.get(config.API.formevaluateRecord(id)) .get(config.API.formevaluateRecord(id))
.then((res: any) => { .then((res: any) => {
console.log(res);
evaluate_no.value = res.data.data.evaluate_no; evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date; start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date; date_finish.value = res.data.data.end_date;
@ -57,18 +56,17 @@ const fecthFormdata = async (id: string) => {
res.data.data.assign_output.forEach((e: any) => { res.data.data.assign_output.forEach((e: any) => {
list1_2.push({ id: "", label: "" }) list1_2.push({ id: "", label: "" })
}); });
evaluate_expenct_level.value = res.data.data.assign_output.map((e) => ({ evaluate_expenct_level.value = res.data.data.assign_output.map((e:any) => ({
id: e.id, id: e.id,
labal: e.output_desc, labal: e.output_desc,
})); }));
evaluate_ouptut.value = res.data.data.assign_output.map((e) => ({ evaluate_ouptut.value = res.data.data.assign_output.map((e:any) => ({
id: e.id, id: e.id,
text: "", text: "",
})); }));
checkArray.value = list1_1.value.length; checkArray.value = list1_1.value.length;
}) })
.catch((e: any) => { .catch((e: any) => {
console.log(e);
}); });
}; };
@ -305,7 +303,6 @@ const saveformdata = async (data: any) => {
await http await http
.post(config.API.createformevaluate(assignId.value), data) .post(config.API.createformevaluate(assignId.value), data)
.then((res: any) => { .then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
router.push( router.push(
`/probation/detail/${personalId.value}/${assignId.value}` `/probation/detail/${personalId.value}/${assignId.value}`

View file

@ -47,7 +47,6 @@ const fecthAssign = async (id: string) => {
dataArrayNumber.value = 1; dataArrayNumber.value = 1;
}) })
.catch((e: any) => { .catch((e: any) => {
// console.log(e);
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {

View file

@ -50,10 +50,8 @@ const fecthAssign = async (id: string) => {
fullname.value = res.data.data.person.name; fullname.value = res.data.data.person.name;
tabs.value = evaluate.value; tabs.value = evaluate.value;
dataArrayNumber.value = 1; dataArrayNumber.value = 1;
console.log(fullname.value);
}) })
.catch((e: any) => { .catch((e: any) => {
// console.log(e);
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {

View file

@ -230,7 +230,6 @@ const getpersonalList = async () => {
order_number: item.order_number, order_number: item.order_number,
probation_status: item.probation_status, probation_status: item.probation_status,
})); }));
console.log("(data)", data);
}) })
.catch(() => {}) .catch(() => {})
.finally(() => { .finally(() => {
@ -266,7 +265,6 @@ const findlist = async (id: string) => {
criterias: data, criterias: data,
}) })
.then((res) => { .then((res) => {
// console.log("res:", res);
rows2.value = res.data.result.map((e: any) => ({ rows2.value = res.data.result.map((e: any) => ({
id: e.id, id: e.id,
fullname: e.fullname, fullname: e.fullname,
@ -307,11 +305,9 @@ const clickAdd = (id: string) => {
const postData = { const postData = {
personal_id: id, personal_id: id,
}; };
// console.log("postData:", postData);
await http await http
.post(config.API.personalAdd(), postData) .post(config.API.personalAdd(), postData)
.then((res) => { .then((res) => {
// console.log("res:", res);
getpersonalList(); getpersonalList();
}) })
.catch((e) => { .catch((e) => {

View file

@ -91,7 +91,6 @@ const rows = ref<FormProbationDetail[]>([]);
const clickAdd = () => {}; const clickAdd = () => {};
const clickSelect = (id: string) => { const clickSelect = (id: string) => {
// console.log(route.fullPath);
router.push(`${route.fullPath}/${id}`); router.push(`${route.fullPath}/${id}`);
}; };
@ -115,7 +114,6 @@ const getAssignList = async () => {
await http await http
.get(config.API.probationGetAssignList(personalId.value)) .get(config.API.probationGetAssignList(personalId.value))
.then((res) => { .then((res) => {
console.log("LIST ===>", res.data.data);
const data = res.data.data; const data = res.data.data;
rows.value = data.map((item: FormProbationDetail) => ({ rows.value = data.map((item: FormProbationDetail) => ({
id: item.id, id: item.id,
@ -143,8 +141,6 @@ const getpersonalList = async () => {
position_level.value = data.position_level; position_level.value = data.position_level;
organization.value = data.organization; organization.value = data.organization;
probation_status.value = data.probation_status; probation_status.value = data.probation_status;
console.log("(data)", data);
}) })
.catch(() => {}) .catch(() => {})
.finally(() => { .finally(() => {

View file

@ -68,7 +68,6 @@ const saveEdit = (id: string) => {
}; };
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
@ -110,28 +109,6 @@ const getReportScore = async () => {
onMounted(() => { onMounted(() => {
getReportScore(); getReportScore();
}); });
// const fecthResult = async (id: string) => {
// await http
// .get(config.API.createformReport(id))
// .then((res: any) => {
// let data = res.data.data.evaluate;
// console.log(data);
// date_start.value = data.date_start;
// date_finish.value = data.date_finish;
// develop.value = Number(data.develop_complete);
// result.value = Number(data.pass_result);
// reson.value = data.reson;
// chairman_dated.value = data.chairman_dated;
// director1_dated.value = data.director1_dated;
// director2_dated.value = data.director2_dated;
// status.value = false;
// action.value = 'edit';
// })
// .catch((e) => {
// console.log(e);
// });
// };
</script> </script>
<template> <template>

View file

@ -50,7 +50,6 @@ const saveEdit = (id: string) => {
}; };
const edit = () => { const edit = () => {
status.value = true; status.value = true;
// console.log(status.value);
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
@ -80,7 +79,6 @@ const save = () => {
await http await http
.post(config.API.summarySurveyDetail(assignId.value), data) .post(config.API.summarySurveyDetail(assignId.value), data)
.then((res: any) => { .then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
}) })
.catch((e: any) => { .catch((e: any) => {