From 618037135def0ca9cf20f24e07a8b72acf6536fe Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 9 Apr 2024 11:36:19 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20list=20=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A0=E0=B8=97=E0=B8=AA=E0=B8=A1?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=96=E0=B8=99=E0=B8=B0=E0=B8=8B=E0=B9=89?= =?UTF-8?q?=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../competency/01ListCompetency.vue | 89 ++++++++----------- .../14_KPI/components/competency/AddPage.vue | 8 +- 2 files changed, 40 insertions(+), 57 deletions(-) diff --git a/src/modules/14_KPI/components/competency/01ListCompetency.vue b/src/modules/14_KPI/components/competency/01ListCompetency.vue index d42561868..0b182794f 100644 --- a/src/modules/14_KPI/components/competency/01ListCompetency.vue +++ b/src/modules/14_KPI/components/competency/01ListCompetency.vue @@ -5,40 +5,35 @@ import { useCounterMixin } from "@/stores/mixin"; import { useQuasar } from "quasar"; import { useRouter } from "vue-router"; -import type{ DataOption } from '@/modules/14_KPI/interface/index/Main' +import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; import http from "@/plugins/http"; import config from "@/app.config"; - -const router = useRouter() -const rows = ref() +const router = useRouter(); +const rows = ref(); const competencyTypeOp = ref([ { - id:'ID1', - name:'สมรรถนะหลัก', + id: "ID1", + name: "สมรรถนะหลัก", }, { - id:'ID2', - name:'สมรรถนะประจำกลุ่มงาน', + id: "ID2", + name: "สมรรถนะประจำกลุ่มงาน", }, { - id:'ID3', - name:'สมรรถนะประจำกลุ่มงาน', + id: "ID3", + name: "สมรรถนะประจำผู้บริหารกรุงเทพมหานคร", }, { - id:'ID4', - name:'สมรรถนะประจำผู้บริหารกรุงเทพมหานคร', + id: "ID4", + name: "สมรรถนะเฉพาะสำหรับตำแหน่ง ผอ.เขต ผช.ผอ.เขต และหัวหน้าฝ่ายในสังกัด สนง.เขต", }, { - id:'ID5', - name:'สมรรถนะเฉพาะสำหรับตำแหน่ง ผอ.เขต ผช.ผอ.เขต และหัวหน้าฝ่ายในสังกัด สนง.เขต', + id: "ID5", + name: "สมรรถนะเฉพาะสำหรับตำแหน่งผู้ตรวจราชการ กทม. และผู้ตรวจราชการ", }, - { - id:'ID6', - name:'สมรรถนะเฉพาะสำหรับตำแหน่งผู้ตรวจราชการ กทม. และผู้ตรวจราชการ', - }, -]) +]); const columns = ref([ { name: "competency", @@ -51,32 +46,30 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, -]) +]); const $q = useQuasar(); const mixin = useCounterMixin(); const { dialogRemove, messageError, showLoader, hideLoader, success } = mixin; -const competencyType = ref('ID1') +const competencyType = ref("ID1"); const filterKeyword = ref(""); -const visibleColumns = ref([ - "competency", -]); +const visibleColumns = ref(["competency"]); /** ดึงข้อมูล */ async function getData() { const data = [ { - id:'ID1', - competency:'รายการสมรรถะ 1' + id: "ID1", + competency: "รายการสมรรถะ 1", }, { - id:'ID2', - competency:'รายการสมรรถะ 2' + id: "ID2", + competency: "รายการสมรรถะ 2", }, - ] - rows.value = data + ]; + rows.value = data; // showLoader(); // await http // .get(config.API.orgPrefix) @@ -91,7 +84,7 @@ async function getData() { } async function editData(id: string) { - console.log(id) + console.log(id); // await http // .put(config.API.orgPrefixId(id), { // name: prefix.value, @@ -109,7 +102,7 @@ async function editData(id: string) { } async function deleteData(id: string) { - console.log(id) + console.log(id); // await http // .delete(config.API.orgPrefixId(id)) // .then(() => { @@ -125,8 +118,8 @@ async function deleteData(id: string) { } /** เปลี่ยนเป็นหน้าเพิ่มข้อมูล */ -function onAdd(){ - router.push(`/KPI-competency/add`) +function onAdd() { + router.push(`/KPI-competency/add`); } onMounted(async () => { @@ -137,24 +130,18 @@ onMounted(async () => {