diff --git a/src/modules/15_probationReport/components/01_SurveyPage.vue b/src/modules/15_probationReport/components/01_SurveyPage.vue index ffb598d..11c0c54 100644 --- a/src/modules/15_probationReport/components/01_SurveyPage.vue +++ b/src/modules/15_probationReport/components/01_SurveyPage.vue @@ -34,6 +34,7 @@ const props = defineProps({ getSurveyData: Function, }); const isData = defineModel("isData", { required: true }); +const isLoad = defineModel("isLoad", { required: true }); const dataSurvey = defineModel("dataSurvey", { required: true }); const status = ref(true); @@ -53,7 +54,7 @@ async function save() { answer3: answer3.value, }; dialogConfirm($q, async () => { - showLoader(); + isLoad.value = true; await http .post(config.API.summarySurveyDetail(store.assignId), data) .then(async () => { @@ -115,6 +116,7 @@ onMounted(() => {
{ type="textarea" :rules="[(val: string) => !!val || `${'กรุณากรอกความคิดเห็น'}`]" /> +
@@ -135,6 +138,7 @@ onMounted(() => {
{ type="textarea" :rules="[(val: string) => !!val || `${'กรุณากรอกความคิดเห็น'}`]" /> +
@@ -154,7 +159,7 @@ onMounted(() => { ความพึงพอใจกับการทดลองปฏิบัติหน้าที่ราชการของคุณอยู่ในระดับใด - + { +
@@ -218,10 +224,10 @@ onMounted(() => {
- + - - + บันทึกข้อมูล diff --git a/src/modules/15_probationReport/components/02_ResultPage.vue b/src/modules/15_probationReport/components/02_ResultPage.vue index 7fadf29..5356b2c 100644 --- a/src/modules/15_probationReport/components/02_ResultPage.vue +++ b/src/modules/15_probationReport/components/02_ResultPage.vue @@ -35,6 +35,7 @@ const dev_options = defineModel("dev_options", { required: true }); const result_option = defineModel("result_option", { required: true }); const status = ref(false); +const isLoad = ref(false); const formData = ref({ develop_orientation_score: 0, develop_self_learning_score: 0, @@ -89,7 +90,7 @@ async function clickdownloadFile() { } async function getData() { - showLoader(); + isLoad.value = true; http .get( config.API.summaryReportDetail(store.assignId) + @@ -133,14 +134,13 @@ async function getData() { formData.value.reason = data.reason; formData.value.pass_result = data.pass_result; formData.value.evaluate_date = data.evaluate_date; - hideLoader(); + isLoad.value = false; }) .catch((e) => { messageError($q, e); + isLoad.value = false; }) - .finally(() => { - hideLoader(); - }); + .finally(() => {}); } onMounted(async () => { @@ -191,13 +191,26 @@ onMounted(async () => {
-
{{ formData.achievement_score }}
-
{{ formData.achievement_percent }}
+
+ {{ formData.achievement_score }} +
+
+
+ {{ formData.achievement_percent }} +
+
- + + + + + ผ่าน (สูงกว่าร้อยละ 60) @@ -224,13 +237,24 @@ onMounted(async () => {
-
{{ formData.behavior_score }}
-
{{ formData.behavior_percent }}
+
+ {{ formData.behavior_score }} +
+
+
+ {{ formData.behavior_percent }} +
+
- - + + + + ผ่าน (สูงกว่าร้อยละ 60) @@ -257,13 +281,22 @@ onMounted(async () => {
-
{{ formData.sum_score }}
-
{{ formData.sum_percent }}
+
{{ formData.sum_score }}
+
+
+ {{ formData.sum_percent }} +
+
- - + + + + ผ่าน (สูงกว่าร้อยละ 60) @@ -296,22 +329,26 @@ onMounted(async () => {
1. การปฐมนิเทศ
+
+
@@ -320,22 +357,26 @@ onMounted(async () => {
2. การเรียนรู้ด้วยตนเอง
+
+
@@ -344,22 +385,26 @@ onMounted(async () => {
3. การอบรมสัมนาร่วมกัน
+
+
@@ -367,22 +412,26 @@ onMounted(async () => {
4. การอบรมอื่นๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
+
+
@@ -394,10 +443,18 @@ onMounted(async () => { >คะแนนผลการพัฒนาข้าราชการที่อยู่ระหว่างการทดลองปฏิบัติหน้าที่ราชการ -
{{ formData.develop_total_score }}
-
+
+ {{ formData.develop_total_score }} +
+
+ +
+
{{ formData.develop_total_percent }}
+
+ +
@@ -410,6 +467,7 @@ onMounted(async () => {
{ emit-value :readonly="!status" /> +
@@ -429,6 +488,7 @@ onMounted(async () => { เหตุผลอื่น ๆ ในการพิจารณา { :row="3" :readonly="!status" /> +
@@ -450,6 +511,7 @@ onMounted(async () => {
{ emit-value :readonly="!status" /> +
@@ -469,6 +532,7 @@ onMounted(async () => {
{ +
diff --git a/src/modules/15_probationReport/components/03_AssignPage.vue b/src/modules/15_probationReport/components/03_AssignPage.vue index 4be7990..e762abc 100644 --- a/src/modules/15_probationReport/components/03_AssignPage.vue +++ b/src/modules/15_probationReport/components/03_AssignPage.vue @@ -16,6 +16,7 @@ import type { } from "@/modules/15_probationReport/interface/Main"; import genReport from "@/plugins/genreport"; +import SkeletonTemplate from "@/modules/15_probationReport/components/SkeletonTemplate.vue"; const dataProbation = defineModel("dataProbation", { required: true, @@ -1069,8 +1070,12 @@ function updateAppointMent() { } } +const isLoad = ref(false); + /** เมื่อโหลดหน้า เรียกใช้งานฟังชั่น */ onMounted(async () => { + isLoad.value = true; + const promises = [ getAssignNew(dataStore.formData.profileId), getLaw(dataStore.formData.profileId), @@ -1084,14 +1089,15 @@ onMounted(async () => { if (probationStore.assignId !== undefined) { promises.push(getAssign()); } - showLoader(); await Promise.all(promises) - .then(() => {}) + .then(() => { + isLoad.value = false; + }) .catch((e) => { messageError($q, e); }) .finally(() => { - hideLoader(); + isLoad.value = false; }); }); @@ -1117,8 +1123,7 @@ onMounted(async () => { - -
+
@@ -2803,6 +2808,7 @@ onMounted(async () => {
+
diff --git a/src/modules/15_probationReport/components/SkeletonTemplate.vue b/src/modules/15_probationReport/components/SkeletonTemplate.vue new file mode 100644 index 0000000..b641063 --- /dev/null +++ b/src/modules/15_probationReport/components/SkeletonTemplate.vue @@ -0,0 +1,544 @@ + diff --git a/src/modules/15_probationReport/views/main.vue b/src/modules/15_probationReport/views/main.vue index 88d5114..6df03ac 100644 --- a/src/modules/15_probationReport/views/main.vue +++ b/src/modules/15_probationReport/views/main.vue @@ -22,6 +22,7 @@ const { showLoader, hideLoader, messageError } = mixin; const dataSurvey = ref(null); const isData = ref(true); +const isLoad = ref(false); const dataProbation = ref([]); const dataResult1 = ref([]); const dataResult2 = ref([]); @@ -44,11 +45,15 @@ const result_option = reactive([ /** ดึง ข้อมูลแบบสำรวจ */ async function getSurveyData() { isData.value = true; - showLoader(); + await http .get(config.API.summaryDetail()) .then(async (res: any) => { const data = await res.data.result.data; + if (data) { + isLoad.value = true; + } + isData.value = true; store.assignId = res.data.result.assignId; if (res.data.result.assignId) { @@ -75,13 +80,13 @@ async function getSurveyData() { } if (data !== null) { dataSurvey.value = data; + isLoad.value = false; } - hideLoader(); }) .catch((e) => { // messageError($q, e); isData.value = false; - hideLoader(); + isLoad.value = false; }); } @@ -167,6 +172,7 @@ onMounted(async () => {