diff --git a/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue b/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue index 145d749..52817ec 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue @@ -9,7 +9,9 @@ import http from "@/plugins/http"; import config from "@/app.config"; const store = useKpiDataStore(); +const expectedLevel = ref(); +const weight = ref(null); const { showLoader, hideLoader } = useCounterMixin(); const modal = defineModel("modal", { required: true }); const competencyType = defineModel("competencyType", { @@ -26,6 +28,13 @@ const listCheck = ref(); const listTarget = ref([]); const listTargetMain = ref([]); +const expectedLevelOp = ref([ + { id: "1", name: "1" }, + { id: "2", name: "2" }, + { id: "3", name: "3" }, + { id: "4", name: "4" }, + { id: "5", name: "5" }, +]); const formDetail = reactive({ type: "สมรรถนะหลัก", name: "สมรรถนะ 1", @@ -84,6 +93,9 @@ function closeDialog() { formDetail.name = ""; formDetail.definition = ""; formDetail.criteria = ""; + + weight.value = null + expectedLevel.value = null } /** เรียกใช้ class */ @@ -126,6 +138,14 @@ watch( () => { if (modal.value == true) { type.value = competencyType.value; + if(type.value == 'HEAD'){ + expectedLevel.value = store.defaultCompetencyCoreLevel + } + else if(type.value == 'GROUP'){ + expectedLevel.value = store.defaultCompetencyGroupLevel + }else{ + expectedLevel.value = null + } getData(); } } @@ -229,7 +249,7 @@ watch(
รายละเอียดตัวชี้วัดรายละเอียดสมรรถนะ
@@ -262,6 +282,53 @@ watch(
+
+
+ +
+
+ +
+
+ +
+
diff --git a/src/modules/08_KPI/store.ts b/src/modules/08_KPI/store.ts index e83ffb4..3b3bfa5 100644 --- a/src/modules/08_KPI/store.ts +++ b/src/modules/08_KPI/store.ts @@ -180,5 +180,7 @@ export const useKpiDataStore = defineStore("KPIDate", () => { convertResults, checkCompetency, checkCompetencyDefaultCompetencyLevel, + defaultCompetencyCoreLevel, + defaultCompetencyGroupLevel }; });