diff --git a/src/api/reports/api.report.ts b/src/api/reports/api.report.ts index 6b00ebe13..6230ed1ae 100644 --- a/src/api/reports/api.report.ts +++ b/src/api/reports/api.report.ts @@ -4,6 +4,7 @@ import env from "../index"; const reportOrder = `${env.API_REPORT2_URI}/report/order`; const reportRetire = `${env.API_REPORT2_URI}/report/retire`; +const reportProbation = `${env.API_REPORT2_URI}/report/probation`; export default { reportOrderCover: (fileType: string, id: string, commandCode: string) => @@ -17,4 +18,14 @@ export default { `${reportOrder}/${format}/cover/${fileType}/${id}`, fileAttachment: (format: string, fileType: string, id: string) => `${reportOrder}/${format}/attachment/${fileType}/${id}`, + + + //ระบบทดลองงาน + reportAssign:(type:string, id:string) => `${reportProbation}/13/${type}/${id}`, + reportEvaluate:(type:string, id:string) => `${reportProbation}/14/${type}/${id}`, + reportEvaluateRecord1:(type:string, id:string) => `${reportProbation}/15/${type}/${id}`, + reportEvaluateRecord2:(type:string, id:string) => `${reportProbation}/16/${type}/${id}`, + reportEvaluateChairman:(type:string, id:string) => `${reportProbation}/17/${type}/${id}`, + reportEvaluateResult:(type:string, id:string) => `${reportProbation}/18/${type}/${id}`, + reportSurvey:(type:string, id:string) => `${reportProbation}/19/${type}/${id}` }; diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index cd171aa8c..f18e1b69c 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -25,18 +25,16 @@ const dataEdit = async (id: string) => { // console.log("success put==>",res) // console.log("save") }) - .catch((e) => { }) + .catch((e) => {}) .finally(async () => { - status.value = false - getAssign() + status.value = false; + getAssign(); hideLoader(); }); - - -} +}; const saveEdit = (id: string) => { - dialogConfirm($q, () => dataEdit(id)) -} + dialogConfirm($q, () => dataEdit(id)); +}; const edit = () => { status.value = true; // console.log(status.value); @@ -56,7 +54,7 @@ const { hideLoader, dialogConfirm, dialogMessageNotify, - modalWarning + modalWarning, } = mixin; const filterData = (options: any[], excludedGroups: any[]) => { return options.filter( @@ -371,7 +369,7 @@ const postDateTime = async () => { const result = res.data; date_finish.value = result.finish_date; }) - .catch((e) => { }) + .catch((e) => {}) .finally(async () => { hideLoader(); }); @@ -431,17 +429,26 @@ const putDataEdit = (id: string) => { { personal_id: caretaker1.value.personal_id, role: "mentor", - dated: date2.value instanceof Date ? dateToISO(date2.value) : dateToISO(new Date(date2.value)), + dated: + date2.value instanceof Date + ? dateToISO(date2.value) + : dateToISO(new Date(date2.value)), }, { personal_id: caretaker2.value.personal_id, role: "mentor", - dated: date3.value instanceof Date ? dateToISO(date3.value) : dateToISO(new Date(date3.value)), + dated: + date3.value instanceof Date + ? dateToISO(date3.value) + : dateToISO(new Date(date3.value)), }, { personal_id: commander.value.personal_id, role: "commander", - dated: date4.value instanceof Date ? dateToISO(date4.value) : dateToISO(new Date(date4.value)), + dated: + date4.value instanceof Date + ? dateToISO(date4.value) + : dateToISO(new Date(date4.value)), }, { personal_id: chairman.value.personal_id, @@ -475,7 +482,8 @@ const putDataEdit = (id: string) => { assign_outputs: Productivity_assign.filter((item) => item !== null), // commander: commander.value, assign_director: assign_director, - experimenter_dated: date1.value instanceof Date ? dateToISO(date1.value) : new Date(), + experimenter_dated: + date1.value instanceof Date ? dateToISO(date1.value) : new Date(), // date_2: date2.value instanceof Date ? dateToISO(date2.value) : new Date(), // date_3: date3.value instanceof Date ? dateToISO(date3.value) : new Date(), // date_4: date4.value instanceof Date ? dateToISO(date4.value) : new Date(), @@ -545,12 +553,18 @@ const putData = (id: string) => { { personal_id: caretaker1.value.id, role: "mentor", - dated: date2.value instanceof Date ? dateToISO(date2.value) : dateToISO(new Date(date2.value)), + dated: + date2.value instanceof Date + ? dateToISO(date2.value) + : dateToISO(new Date(date2.value)), }, { personal_id: commander.value.id, role: "commander", - dated: date4.value instanceof Date ? dateToISO(date4.value) : dateToISO(new Date(date4.value)), + dated: + date4.value instanceof Date + ? dateToISO(date4.value) + : dateToISO(new Date(date4.value)), }, { personal_id: chairman.value.id, @@ -561,7 +575,10 @@ const putData = (id: string) => { assign_director.push({ personal_id: caretaker2.value.id, role: "mentor", - dated: date3.value instanceof Date ? dateToISO(date3.value) : dateToISO(new Date(date3.value)), + dated: + date3.value instanceof Date + ? dateToISO(date3.value) + : dateToISO(new Date(date3.value)), }); } const data = { @@ -620,7 +637,7 @@ const DataSave = async (id: string) => { .then((res) => { router.push(`/probation/detail/${id}`); }) - .catch((e) => { }) + .catch((e) => {}) .finally(() => { hideLoader(); }); @@ -730,6 +747,32 @@ const getAssign = async () => { // ); }); }; +const downloadFile = (response: any, filename: string) => { + const link = document.createElement("a"); + var fileName = filename; + link.href = window.URL.createObjectURL(new Blob([response.data])); + link.setAttribute("download", fileName); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); +}; + +const clickdownloadFile = async (type: string) => { + showLoader(); + await http + .get(config.API.reportAssign(type, assignId.value), { + responseType: "blob", + }) + .then((res) => { + downloadFile(res,`แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ-${fullname.value}.${type}`); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +}; onMounted(async () => { getAssign(); await getUser(); @@ -759,26 +802,53 @@ watch(knowledge.value, () => {
- +
เพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
-
- แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ -
+
แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
+ - + ดาวน์โหลด - - + + ไฟล์ .PDF - - + + ไฟล์ .docx @@ -786,16 +856,37 @@ watch(knowledge.value, () => {
- + แก้ไขข้อมูล
- + ยกเลิก - + บันทึกข้อมูล
@@ -811,12 +902,28 @@ watch(knowledge.value, () => {
- +
- +
@@ -824,14 +931,32 @@ watch(knowledge.value, () => {
- +
- + @@ -839,17 +964,38 @@ watch(knowledge.value, () => { {{ parseInt(value + 543) }}
- + @@ -857,11 +1003,22 @@ watch(knowledge.value, () => { {{ parseInt(value + 543) }} @@ -880,22 +1037,64 @@ watch(knowledge.value, () => {
- - + +
- - + +
@@ -910,29 +1109,71 @@ watch(knowledge.value, () => {
3.1 ชื่องาน / ภารกิจงานที่มอบหมาย (ควรมีมากกว่า 1 ภารกิจงาน) - +
- +
- +
- +
-
- +
+
@@ -949,21 +1190,59 @@ watch(knowledge.value, () => {
ความรู้ความสามารถในการปฏิบัติงาน - +
-
+
- +
-
- +
+
@@ -981,13 +1260,28 @@ watch(knowledge.value, () => { class="q-ml-sm" /> -->
- +
-
+
- +
{{ item.description }} @@ -995,7 +1289,10 @@ watch(knowledge.value, () => {
-
+
{{ item.description }} @@ -1003,16 +1300,27 @@ watch(knowledge.value, () => {
-
+
{{ item.description }}
-
+
- +
{{ item.description }} @@ -1020,16 +1328,27 @@ watch(knowledge.value, () => {
-
+
{{ item.description }}
-
+
- +
{{ item.description }} @@ -1037,16 +1356,27 @@ watch(knowledge.value, () => {
-
+
{{ item.description }}
-
+
- +
{{ item.description }} @@ -1054,16 +1384,27 @@ watch(knowledge.value, () => {
-
+
{{ item.description }}
-
+
- +
{{ item.description }} @@ -1099,8 +1440,15 @@ watch(knowledge.value, () => {
- +
@@ -1108,60 +1456,121 @@ watch(knowledge.value, () => {
ทักษะ
- + +
- + +
- + +
- + +
@@ -1180,69 +1589,145 @@ watch(knowledge.value, () => {
สมรรถนะหลัก
- + +
- + +
- + +
- + +
- + +
@@ -1250,43 +1735,88 @@ watch(knowledge.value, () => {
สมรรถนะประจํากลุ่มงาน
- + +
- + +
- + +
@@ -1297,9 +1827,12 @@ watch(knowledge.value, () => {
- 3.4 พฤติกรรมที่จําเป็นสําหรับการปฏิบัติงาน + 3.4 พฤติกรรมที่จําเป็นสําหรับการปฏิบัติงาน ( ได้แก่ ความประพฤติ ความมีคุณธรรมจริยธรรม การรักษาวินัย - ) + )
@@ -1373,7 +1906,13 @@ watch(knowledge.value, () => {
- +
@@ -1381,28 +1920,70 @@ watch(knowledge.value, () => {
3.6 ผลผลิตของงานที่คาดหวังและตัวชี้วัดความสําเร็จของงาน - +
- +
- +
- +
-
- +
+
@@ -1471,8 +2052,14 @@ watch(knowledge.value, () => {
  • ความสำเร็จของงานที่ได้รับมอบหมาย
  • อื่นๆ (ถ้ามี) - +
  • @@ -1555,16 +2142,36 @@ watch(knowledge.value, () => {
    - +
    - +
    - + @@ -1572,12 +2179,23 @@ watch(knowledge.value, () => { {{ parseInt(value + 543) }}
    - - + +
    - + @@ -1636,11 +2323,24 @@ watch(knowledge.value, () => { {{ parseInt(value + 543) }}