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