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

View file

@ -34,7 +34,6 @@ const saveEdit = (id: string) => {
const edit = () => {
status.value = true;
// console.log(status.value);
};
const cancel = () => {
@ -104,10 +103,6 @@ const list2_3 = [
];
onMounted(async () => {
// if (props.action == 'add') {
// fecthFormdata();
// }
// console.log("props===>", props)
if (props.tab && props.action == "edit") {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
@ -120,19 +115,9 @@ watch(props, async () => {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
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 () => {
showLoader();
await http
@ -149,11 +134,6 @@ const fecthAssign = async () => {
start_date.value = res.data.data.start_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) => {
messageError($q, e);
@ -166,13 +146,6 @@ const fecthAssign = 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;
evaluate_id.value = data.id;
start_date.value = data.date_start;
@ -215,22 +188,8 @@ const fetchEvaluate = async () => {
etc2.value = true;
} else etc2.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 dateAutherise = ref<any>(new Date());
const option = ref<any>([]);
@ -348,7 +307,6 @@ const save = () => {
data
)
.then((res: any) => {
// console.log(res);
status.value = false;
success($q, "บันทึกสำเร็จ");
})

View file

@ -92,7 +92,6 @@ const fecthAssign = async (id: string) => {
await http
.get(config.API.evaluateCreate(id))
.then(async (res: any) => {
console.log(res);
person.value = res.data.data.person;
assign.value = res.data.data.assign;
commander.value = res.data.data.commander;
@ -223,7 +222,6 @@ const putformData = () => {
await http
.post(config.API.createformCommader(assignId.value), data)
.then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ");
router.push(
`/probation/detail/${personalId.value}/${assignId.value}`
@ -233,30 +231,6 @@ const putformData = () => {
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>

View file

@ -31,7 +31,6 @@ const saveEdit = (id: string) => {
};
const edit = () => {
status.value = true;
// console.log(status.value);
};
const cancel = () => {
status.value = false;
@ -57,10 +56,6 @@ const props = defineProps({
});
onMounted(async () => {
// if (props.action == 'add') {
// fecthFormdata();
// }
// console.log("props===>", props)
if (props.tab && props.action == "edit") {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
@ -73,24 +68,16 @@ watch(props, async () => {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
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 () => {
showLoader();
await http
.get(config.API.evaluateChairman(assignId.value))
.then(async (res: any) => {
// console.log(res);
if (props.action == "add") {
assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no;
@ -114,11 +101,6 @@ const fecthAssign = async () => {
const fetchEvaluate = async () => {
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;
evaluate_id.value = data.id;
@ -447,14 +429,12 @@ const putformData = () => {
};
dialogConfirm($q, async () => {
console.log("data==>", data);
await http
.put(
config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value),
data
)
.then((res: any) => {
// console.log(res);
status.value = false;
success($q, "บันทึกสำเร็จ");
router.push(`/probation/detail/${personalId.value}/${assignId.value}`);
@ -463,33 +443,6 @@ const putformData = () => {
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>

View file

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

View file

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

View file

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

View file

@ -42,7 +42,6 @@ const fecthFormdata = async (id: string) => {
await http
.get(config.API.formevaluateRecord(id))
.then((res: any) => {
console.log(res);
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_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) => {
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,
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,
text: "",
}));
checkArray.value = list1_1.value.length;
})
.catch((e: any) => {
console.log(e);
});
};
@ -305,7 +303,6 @@ const saveformdata = async (data: any) => {
await http
.post(config.API.createformevaluate(assignId.value), data)
.then((res: any) => {
// console.log(res);
success($q, "บันทึกสำเร็จ");
router.push(
`/probation/detail/${personalId.value}/${assignId.value}`

View file

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

View file

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

View file

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

View file

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

View file

@ -68,7 +68,6 @@ const saveEdit = (id: string) => {
};
const edit = () => {
status.value = true;
// console.log(status.value);
};
const cancel = () => {
status.value = false;
@ -110,28 +109,6 @@ const getReportScore = async () => {
onMounted(() => {
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>
<template>

View file

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