แก้ kpi
This commit is contained in:
parent
b71ca2ddf5
commit
2ccafd5a7b
2 changed files with 35 additions and 25 deletions
|
|
@ -71,22 +71,20 @@ async function fetchEvaluation() {
|
|||
formProfile.status = store.convertStatus(data.evaluationStatus);
|
||||
formProfile.result = store.convertResults(data.evaluationResults);
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
await getAvatar(data.profileId);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลโปรไฟล์ */
|
||||
async function getProfile() {
|
||||
async function getAvatar(id: string) {
|
||||
await http
|
||||
.get(config.API.profilePosition())
|
||||
.get(config.API.orgCheckAvatar(id))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
store.dataProfile = await data;
|
||||
|
||||
if (data.avatarName) {
|
||||
await fetchProfile(data.profileId, data.avatarName);
|
||||
await fetchProfile(id, data.avatarName);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -222,7 +220,7 @@ function filterOption(val: string, update: Function, refData: string) {
|
|||
|
||||
/** ดึงข้อมูลทั้งหมดในหน้า */
|
||||
async function getAll() {
|
||||
await Promise.all([fetchEvaluation(), getProfile(), getOrgOp()]);
|
||||
await Promise.all([fetchEvaluation(), getOrgOp()]);
|
||||
await store.checkStep();
|
||||
}
|
||||
|
||||
|
|
@ -321,7 +319,7 @@ function openGovernment() {
|
|||
|
||||
/** เช็ค สถานะการทดลองงาน */
|
||||
function openStatus() {
|
||||
router.push(`/probation-detail/${store.dataEvaluation.profileId}`);
|
||||
router.push(`/probation-detail/${store.dataEvaluation.id}`);
|
||||
}
|
||||
|
||||
/** ส่งให้ผู้ประเมิน */
|
||||
|
|
@ -532,7 +530,7 @@ onMounted(async () => {
|
|||
: ""
|
||||
}}</span>
|
||||
<p class="q-mb-none">
|
||||
{{ findOrgName(store.dataProfile) }}
|
||||
{{ findOrgName(store.dataEvaluation) }}
|
||||
</p>
|
||||
</div>
|
||||
<q-space v-if="$q.screen.gt.xs" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue