download ข้อตกลง

This commit is contained in:
setthawutttty 2025-02-20 11:40:35 +07:00
parent 431abcbfa4
commit c19c8a5966
2 changed files with 46 additions and 1 deletions

View file

@ -73,6 +73,8 @@ export default {
developmentReQuestIDP: (id: string) => `${developmentOrg}/profile/development/registry/USER/${id}`,
developmentIDP: (id: string) => `${development}/main/registry/USER/${id}`,
kpiReject:(id:string)=>`${kpiEvaluation}/reject-agreement/${id}`
kpiReject:(id:string)=>`${kpiEvaluation}/reject-agreement/${id}`,
kpiReportList:(id:string)=>`${Kpi}/report/list/${id}`
};

View file

@ -2,6 +2,7 @@
import { ref, onMounted, reactive } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useQuasar } from "quasar";
import genReport from "@/plugins/genreport";
import http from "@/plugins/http";
import config from "@/app.config";
@ -472,6 +473,26 @@ async function getProfile() {
});
}
async function downloadReport() {
await http
.get(config.API.kpiReportList(id.value))
.then(async (res) => {
const data = res.data.result;
await genReport(
data,
"แบบรายงานผลการปฏิบัติราชการ " +
store.dataEvaluation.prefix +
store.dataEvaluation.firstName +
" " +
store.dataEvaluation.lastName
);
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
}
onMounted(async () => {
showLoader();
store.isUpdate = false;
@ -707,6 +728,28 @@ onMounted(async () => {
>อมลการทดลองปฏหนาทราชการ</q-tooltip
>
</q-btn>
<q-btn
v-if="
store.dataEvaluation.evaluationStatus !== 'NEW' ||
store.dataEvaluation.evaluationStatus !==
'NEW_EVALUATOR' ||
store.dataEvaluation.evaluationStatus !==
'NEW_COMMANDER' ||
store.dataEvaluation.evaluationStatus !==
'NEW_COMMANDER_HIGH'
"
unelevated
round
color="grey-2"
text-color="primary"
icon="download"
size="md"
@click="downloadReport()"
>
<q-tooltip
>ดาวนโหลดแบบกำหนดขอตกลงการประเมนผลสมฤทธของงานและพฤตกรรมการปฏราชการ</q-tooltip
>
</q-btn>
</div>
</div>
</div>