From 92d0d45d4df6f79a1208165e6ae21c14efbf3310 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 23 Apr 2024 13:27:24 +0700 Subject: [PATCH] =?UTF-8?q?ui=20=E0=B8=AD=E0=B8=87=E0=B8=84=E0=B9=8C?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=97?= =?UTF-8?q?=E0=B8=B5=E0=B9=88=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tab/Dialog/04_FormCompetency.vue | 69 ++++++++++++++++++- src/modules/08_KPI/store.ts | 2 + 2 files changed, 70 insertions(+), 1 deletion(-) 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 }; });