Refactoring code module 14_KPI
This commit is contained in:
parent
bd33093d3e
commit
76118a8d11
37 changed files with 827 additions and 1675 deletions
|
|
@ -1,8 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { DataOptionTechnique } from "@/modules/14_KPI/interface/index/Main";
|
||||
/**
|
||||
* importType
|
||||
|
|
@ -17,10 +20,8 @@ import type {
|
|||
*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
const $q = useQuasar();
|
||||
const { showLoader, messageError, hideLoader } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* use
|
||||
|
|
@ -41,22 +42,6 @@ const checkOtherBox13 = computed<boolean>(() => {
|
|||
return development.value.includes("other3");
|
||||
});
|
||||
|
||||
const isDevelopment70 = computed(() => {
|
||||
return projectTechniquesOp1.value.some((txt) =>
|
||||
development.value.includes(txt.value)
|
||||
);
|
||||
});
|
||||
const isDevelopment20 = computed(() => {
|
||||
return projectTechniquesOp2.value.some((txt) =>
|
||||
development.value.includes(txt.value)
|
||||
);
|
||||
});
|
||||
const isDevelopment10 = computed(() => {
|
||||
return projectTechniquesOp3.value.some((txt) =>
|
||||
development.value.includes(txt.value)
|
||||
);
|
||||
});
|
||||
|
||||
const projectTechniquesOp1 = ref<DataOptionTechnique[]>([
|
||||
{
|
||||
value: "on_the_job_training",
|
||||
|
|
@ -121,9 +106,6 @@ const projectTechniquesOp3 = ref<DataOptionTechnique[]>([
|
|||
{ value: "other3", label: "อื่น ๆ (ระบุ)" },
|
||||
]);
|
||||
|
||||
const $q = useQuasar();
|
||||
const { showLoader, messageError, hideLoader } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
|
|
@ -163,17 +145,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
*/
|
||||
const title = ref<string>("");
|
||||
const develop = ref<string[]>([]);
|
||||
const options = ref<OptionCheckbox[]>([
|
||||
{
|
||||
label: "70 การลงมือปฏิบัต (โดยผู้บังคับบัญชามอบหมาย)",
|
||||
value: "isDevelopment70",
|
||||
},
|
||||
{
|
||||
label: "20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)",
|
||||
value: "isDevelopment20",
|
||||
},
|
||||
{ label: "10 การฝึกอบรมอื่นๆ", value: "isDevelopment10" },
|
||||
]);
|
||||
const target = ref<string>("");
|
||||
|
||||
/**
|
||||
|
|
@ -257,15 +228,6 @@ watch(
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<div class="text-weight-bold">วิธีการพัฒนา</div>
|
||||
<!-- <div class="q-pa-sm">
|
||||
<q-option-group
|
||||
:options="options"
|
||||
type="checkbox"
|
||||
v-model="develop"
|
||||
disable
|
||||
/>
|
||||
</div> -->
|
||||
|
||||
<div class="row q-col-gutter-md full-width">
|
||||
<div class="col-12 col-sm-6 col-md-6 col-lg-4">
|
||||
<span class="text-weight-bold"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/**
|
||||
* importType
|
||||
|
|
@ -12,21 +16,13 @@ import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
|
|||
import type {
|
||||
ResRound,
|
||||
ResDevelopment,
|
||||
} from "@/modules/14_KPI/interface/response/index";
|
||||
} from "@/modules/14_KPI/interface/response/Index";
|
||||
|
||||
/**
|
||||
* importComponents
|
||||
*/
|
||||
import DialogIndividual from "@/modules/14_KPI/components/results/dialogIndividual.vue";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
|
|
@ -236,14 +232,6 @@ function onSearchData() {
|
|||
fetcDataList();
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า
|
||||
*/
|
||||
watch(pagination, () => {
|
||||
page.value = 1;
|
||||
pageSize.value = pagination.value.rowsPerPage;
|
||||
});
|
||||
|
||||
/**
|
||||
* function รายละเอียดแผนพัฒนาการปฏิบัติราชการรายบุคคล
|
||||
* @param id แผนพัฒนาการปฏิบัติราชการรายบุคคล
|
||||
|
|
@ -253,6 +241,14 @@ function onClickView(id: string) {
|
|||
devId.value = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า
|
||||
*/
|
||||
watch(pagination, () => {
|
||||
page.value = 1;
|
||||
pageSize.value = pagination.value.rowsPerPage;
|
||||
});
|
||||
|
||||
/**
|
||||
* HookLifecycle
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/**
|
||||
* importType
|
||||
|
|
@ -14,13 +18,6 @@ import type {
|
|||
} from "@/modules/14_KPI/interface/response/Main";
|
||||
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue