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 () => {