fixing bug api kpi
This commit is contained in:
parent
9e0b341a5a
commit
96d0764f76
5 changed files with 9 additions and 6 deletions
|
|
@ -2,6 +2,7 @@ import env from "../index";
|
|||
const KPI = `${env.API_URI}/kpi`;
|
||||
const kpiPeriod = `${env.API_URI}/kpi/period`;
|
||||
const kpiEvaluation = `${env.API_URI}/kpi/evaluation`;
|
||||
const kpiUserEvaluation = `${env.API_URI}/kpi/user/evaluation`;
|
||||
const kpiPlan = `${env.API_URI}/kpi/plan`;
|
||||
const kpiRole = `${env.API_URI}/kpi/role`;
|
||||
const kpiSpecial = `${env.API_URI}/kpi/special`;
|
||||
|
|
@ -21,6 +22,7 @@ const kpiLink = `${env.API_URI}/kpi/link`;
|
|||
|
||||
export default {
|
||||
KPI,
|
||||
kpiUserEvaluation,
|
||||
/** รอบการประเมินผล*/
|
||||
kpiPeriod,
|
||||
kpiPeriodById: (id: string) => `${kpiPeriod}/${id}`,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ function onSubmit() {
|
|||
};
|
||||
|
||||
http
|
||||
.put(config.API.kpiEvaluation, body.formScore)
|
||||
.put(config.API.kpiUserEvaluation, body.formScore)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
|
|
@ -53,7 +53,7 @@ function onSubmit() {
|
|||
function getData() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiEvaluation)
|
||||
.get(config.API.kpiUserEvaluation)
|
||||
.then((res) => {
|
||||
dataLevel.value = res.data.result.data;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const optionTopic = ref<string[]>(optionTopicMain.value);
|
|||
function fetchList() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiEvaluation + `/${props.type}/${evaluatorId.value}`)
|
||||
.get(config.API.kpiUserEvaluation + `/${props.type}/${evaluatorId.value}`)
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
@ -115,7 +115,7 @@ function onSubmit() {
|
|||
showLoader();
|
||||
http
|
||||
.put(
|
||||
config.API.kpiEvaluation + `/${props.type}/${evaluatorId.value}`,
|
||||
config.API.kpiUserEvaluation + `/${props.type}/${evaluatorId.value}`,
|
||||
formComment
|
||||
)
|
||||
.then(() => {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ const router = useRouter();
|
|||
|
||||
async function fetchEvaluation() {
|
||||
await http
|
||||
.get(config.API.kpiEvaluation + `/${id.value}`)
|
||||
.get(config.API.kpiUserEvaluation + `/${id.value}`)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ function fetchList() {
|
|||
};
|
||||
|
||||
http
|
||||
.post(config.API.kpiEvaluation + `/admin`, body)
|
||||
.post(config.API.kpiUserEvaluation + `/admin`, body)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
maxPage.value = Math.ceil(data.total / formQuery.pageSize);
|
||||
|
|
@ -155,6 +155,7 @@ function changRound() {
|
|||
}
|
||||
|
||||
function redirectViewDetail(id: string) {
|
||||
store.tabMain = "1";
|
||||
router.push(`KPI-list/${id}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue