แบบประเมิน=> งานตามหน้าที่ความรับผิดชอบหลัก
This commit is contained in:
parent
1cf3476dad
commit
c2bf98e053
3 changed files with 35 additions and 5 deletions
|
|
@ -4,12 +4,14 @@ const url = `${env.API_URI}/salary`;
|
|||
const kpiPeriod = `${env.API_URI}/kpi/period`;
|
||||
const kpiEvaluation = `${env.API_URI}/kpi/user/evaluation`;
|
||||
const kpiPlan = `${env.API_URI}/kpi/plan`;
|
||||
const kpiRole = `${env.API_URI}/kpi/role`;
|
||||
const KpiCapacity = `${env.API_URI}/kpi/capacity`;
|
||||
const KpiFile = `${env.API_URI}/salary/file`;
|
||||
export default {
|
||||
kpiPeriod,
|
||||
kpiEvaluation,
|
||||
kpiPlan,
|
||||
kpiRole,
|
||||
KpiCapacity,
|
||||
file: KpiFile,
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,10 @@ const formDetail = reactive<any>({
|
|||
formula: "",
|
||||
node: null,
|
||||
nodeId: "",
|
||||
nodeName: "",
|
||||
strategy: null,
|
||||
strategyId: "",
|
||||
strategyName: "",
|
||||
});
|
||||
|
||||
function fetchIndicators() {
|
||||
|
|
@ -68,10 +70,27 @@ function fetchIndicators() {
|
|||
});
|
||||
}
|
||||
|
||||
function fetchListRole() {
|
||||
const kpiPeriodId = store.dataEvaluation.kpiPeriodId;
|
||||
const position = store.dataProfile.position;
|
||||
http
|
||||
.get(
|
||||
config.API.kpiRole +
|
||||
`?page=${1}&pageSize=${50}&kpiPeriodId=${kpiPeriodId}&position=${position}`
|
||||
)
|
||||
.then((res) => {
|
||||
listTarget.value = res.data.result.data;
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function clickList(index: number, id: string) {
|
||||
showLoader();
|
||||
const url = numpage.value === 1 ? config.API.kpiPlan : config.API.kpiRole;
|
||||
http
|
||||
.get(config.API.kpiPlan + `/${id}`)
|
||||
.get(`${url}/${id}`)
|
||||
.then((res) => {
|
||||
listCheck.value = index;
|
||||
const data = res.data.result;
|
||||
|
|
@ -94,8 +113,11 @@ function clickList(index: number, id: string) {
|
|||
formDetail.formula = data.formula;
|
||||
formDetail.node = data.node;
|
||||
formDetail.nodeId = data.nodeId;
|
||||
formDetail.nodeName = data.nodeName;
|
||||
formDetail.strategy = data.strategy;
|
||||
formDetail.strategyId = data.strategyId;
|
||||
formDetail.strategyName = data.strategyName;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -146,7 +168,11 @@ watch(
|
|||
() => modal.value,
|
||||
() => {
|
||||
if (modal.value) {
|
||||
fetchIndicators();
|
||||
if (numpage.value === 1) {
|
||||
fetchIndicators();
|
||||
} else if (numpage.value === 2) {
|
||||
fetchListRole();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -241,11 +267,11 @@ watch(
|
|||
<div class="q-pa-sm q-col-gutter-lg">
|
||||
<div class="col-12 row">
|
||||
<div class="col-4 text-grey-6">หน่วยงาน/ส่วนราชการ</div>
|
||||
<div class="col-8">{{ formDetail.nodeId }}</div>
|
||||
<div class="col-8">{{ formDetail.nodeName }}</div>
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 row" v-if="numpage === 1">
|
||||
<div class="col-4 text-grey-6">ยุทธศาสตร์ / แผน</div>
|
||||
<div class="col-8">{{ formDetail.strategyId }}</div>
|
||||
<div class="col-8">{{ formDetail.strategyName }}</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 row">
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ function onAdd() {
|
|||
<q-card bordered style="border-radius: 5px" class="no-shadow">
|
||||
<q-card-section class="bg-grey-2 q-py-sm">
|
||||
<span class="text-weight-medium">{{ title }}</span>
|
||||
|
||||
|
||||
<q-btn
|
||||
class="q-ml-xs"
|
||||
flat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue