download ข้อตกลง
This commit is contained in:
parent
bb864d8913
commit
b55935d9c4
2 changed files with 43 additions and 0 deletions
|
|
@ -98,4 +98,5 @@ export default {
|
|||
|
||||
indicatorSummary: `${kpiPlan}/summary/indicator`,
|
||||
capacitySummary: `${kpiCapacity}/summary`,
|
||||
kpiReportList: (id: string) => `${KPI}/report/list/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
import { ref, onMounted, reactive, onUnmounted } 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";
|
||||
|
||||
|
|
@ -427,6 +429,26 @@ async function fetchProfileEvaluator(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
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 () => {
|
||||
store.isUpdate = false;
|
||||
await fetchEvaluation();
|
||||
|
|
@ -663,6 +685,26 @@ onUnmounted(() => {
|
|||
>
|
||||
<q-tooltip>ดูข้อมูลการทดลองปฏิบัติหน้าที่ราชการ</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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue