ย้าย sammary สมรถนะ
This commit is contained in:
parent
44632967c6
commit
2b67885210
7 changed files with 189 additions and 153 deletions
|
|
@ -17,6 +17,8 @@ import type { ResDataCapacity } from "@/modules/01_masterdata/interface/response
|
||||||
import { useKPIDataStore } from "@/modules/01_masterdata/stores/KPIStore";
|
import { useKPIDataStore } from "@/modules/01_masterdata/stores/KPIStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
|
import CompetencyTotal from "@/modules/01_masterdata/components/competency/Summary.vue";
|
||||||
|
|
||||||
const total = ref<number>();
|
const total = ref<number>();
|
||||||
const store = useKPIDataStore();
|
const store = useKPIDataStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -149,6 +151,11 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<CompetencyTotal />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
<q-select
|
<q-select
|
||||||
v-model="store.competencyTypeVal"
|
v-model="store.competencyTypeVal"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import CompetencyTotal from "@/modules/01_masterdata/components/competency/Summary.vue";
|
||||||
const total = ref<number>();
|
const total = ref<number>();
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
|
|
@ -207,6 +207,11 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<CompetencyTotal />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsCreate"
|
v-if="checkPermission($route)?.attrIsCreate"
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import CompetencyTotal from "@/modules/01_masterdata/components/competency/Summary.vue";
|
||||||
|
|
||||||
const total = ref<number>();
|
const total = ref<number>();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
|
@ -345,6 +346,11 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<CompetencyTotal />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsCreate"
|
v-if="checkPermission($route)?.attrIsCreate"
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import CompetencyTotal from "@/modules/01_masterdata/components/competency/Summary.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataLevel = ref<any>();
|
const dataLevel = ref<any>();
|
||||||
|
|
@ -71,64 +72,66 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-card>
|
<div class="row q-mb-sm">
|
||||||
|
<div class="col-12">
|
||||||
|
<CompetencyTotal />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<q-card flat bordered>
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<q-card flat bordered>
|
<q-card-section class="bg-grey-3">
|
||||||
<q-card-section class="bg-grey-3">
|
<div class="row text-dark text-body2 text-weight-medium">
|
||||||
<div class="row text-dark text-body2 text-weight-medium">
|
<div class="text-center col-8">เกณฑ์การประเมิน</div>
|
||||||
<div class="text-center col-8">เกณฑ์การประเมิน</div>
|
<div class="text-center col-4">ระดับคะแนน</div>
|
||||||
<div class="text-center col-4">ระดับคะแนน</div>
|
</div>
|
||||||
</div>
|
</q-card-section>
|
||||||
</q-card-section>
|
<q-card-section class="q-pa-none">
|
||||||
<q-card-section class="q-pa-none">
|
<div v-for="(field, index) in dataLevel" :key="field.id">
|
||||||
<div v-for="(field, index) in dataLevel" :key="field.id">
|
<div class="row q-pa-sm">
|
||||||
<div class="row q-pa-sm">
|
<div class="col-8 text-left">
|
||||||
<div class="col-8 text-left">
|
<q-field
|
||||||
<q-field
|
class="q_field_p_none"
|
||||||
class="q_field_p_none"
|
ref="fieldRef"
|
||||||
ref="fieldRef"
|
v-model="field.description"
|
||||||
v-model="field.description"
|
label-slot
|
||||||
label-slot
|
borderless
|
||||||
borderless
|
:rules="[(val) => !!val || 'กรุณากรอกมาตรฐานพฤติกรรม']"
|
||||||
:rules="[(val) => !!val || 'กรุณากรอกมาตรฐานพฤติกรรม']"
|
hide-bottom-space
|
||||||
hide-bottom-space
|
>
|
||||||
>
|
<template #control>
|
||||||
<template #control>
|
<q-editor
|
||||||
<q-editor
|
:readonly="checkPermission($route)?.attrIsUpdate == false"
|
||||||
:readonly="
|
class="full-width"
|
||||||
checkPermission($route)?.attrIsUpdate == false
|
v-model="field.description"
|
||||||
"
|
:dense="$q.screen.lt.md"
|
||||||
class="full-width"
|
min-height="5rem"
|
||||||
v-model="field.description"
|
:toolbar="[
|
||||||
:dense="$q.screen.lt.md"
|
[
|
||||||
min-height="5rem"
|
'bold',
|
||||||
:toolbar="[
|
'italic',
|
||||||
[
|
'strike',
|
||||||
'bold',
|
'underline',
|
||||||
'italic',
|
'subscript',
|
||||||
'strike',
|
'superscript',
|
||||||
'underline',
|
],
|
||||||
'subscript',
|
|
||||||
'superscript',
|
|
||||||
],
|
|
||||||
|
|
||||||
['unordered', 'ordered'],
|
['unordered', 'ordered'],
|
||||||
]"
|
]"
|
||||||
:fonts="{
|
:fonts="{
|
||||||
arial: 'Arial',
|
arial: 'Arial',
|
||||||
arial_black: 'Arial Black',
|
arial_black: 'Arial Black',
|
||||||
comic_sans: 'Comic Sans MS',
|
comic_sans: 'Comic Sans MS',
|
||||||
courier_new: 'Courier New',
|
courier_new: 'Courier New',
|
||||||
impact: 'Impact',
|
impact: 'Impact',
|
||||||
lucida_grande: 'Lucida Grande',
|
lucida_grande: 'Lucida Grande',
|
||||||
times_new_roman: 'Times New Roman',
|
times_new_roman: 'Times New Roman',
|
||||||
verdana: 'Verdana',
|
verdana: 'Verdana',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-field>
|
</q-field>
|
||||||
<!-- <q-input
|
<!-- <q-input
|
||||||
v-model="formScore[field]"
|
v-model="formScore[field]"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -137,22 +140,21 @@ onMounted(() => {
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกข้อความเพื่อไว้ใช้อ้างอิงเท่านั้น'}`,]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกข้อความเพื่อไว้ใช้อ้างอิงเท่านั้น'}`,]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/> -->
|
/> -->
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="col-4 text-center text-body1 text-weight-bold self-center"
|
|
||||||
>
|
|
||||||
{{ field.level }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="col-12"
|
class="col-4 text-center text-body1 text-weight-bold self-center"
|
||||||
v-if="index !== Object.keys(fieldLabels).length - 1"
|
|
||||||
>
|
>
|
||||||
<q-separator />
|
{{ field.level }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
<div
|
||||||
</q-card>
|
class="col-12"
|
||||||
|
v-if="index !== Object.keys(fieldLabels).length - 1"
|
||||||
|
>
|
||||||
|
<q-separator />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
import CompetencyTotal from "@/modules/01_masterdata/components/competency/Summary.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="row q-mb-sm">
|
||||||
|
<div class="col-12">
|
||||||
|
<CompetencyTotal />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="display-table">
|
<div class="display-table">
|
||||||
<q-card flat bordered class="q-mb-lg">
|
<q-card flat bordered class="q-mb-lg">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
|
|
|
||||||
93
src/modules/01_masterdata/components/competency/Summary.vue
Normal file
93
src/modules/01_masterdata/components/competency/Summary.vue
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref } from "vue";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
const { showLoader, hideLoader, dialogRemove, success, messageError } =
|
||||||
|
useCounterMixin();
|
||||||
|
|
||||||
|
const competencyTotal = ref<any[]>([
|
||||||
|
{
|
||||||
|
value: "HEAD",
|
||||||
|
label: "สมรรถนะหลัก",
|
||||||
|
color: "edit",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "GROUP",
|
||||||
|
label: "สมรรถนะประจำกลุ่มงาน",
|
||||||
|
color: "primary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "EXECUTIVE",
|
||||||
|
label: "สมรรถนะประจำผู้บริหารกรุงเทพมหานคร",
|
||||||
|
color: "blue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "total",
|
||||||
|
label: "ทั้งหมด",
|
||||||
|
color: "red",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "DIRECTOR",
|
||||||
|
label:
|
||||||
|
"สมรรถนะเฉพาะสำหรับตำแหน่ง ผอ.เขต ผช.ผอ.เขต และหัวหน้าฝ่ายในสังกัด สนง.เขต",
|
||||||
|
color: "deep-purple",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "INSPECTOR",
|
||||||
|
label: "สมรรถนะเฉพาะสำหรับตำแหน่งผู้ตรวจราชการ กทม. และผู้ตรวจราชการ",
|
||||||
|
color: "orange",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
function getTotal() {
|
||||||
|
http
|
||||||
|
.get(config.API.capacitySummary)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
competencyTotal.value.forEach((i) => {
|
||||||
|
const map = data.find((item: any) => item.type === i.value);
|
||||||
|
if (map) i.total = map.total;
|
||||||
|
});
|
||||||
|
const totalSum = data.reduce((i: any, j: any) => i + +j.total, 0);
|
||||||
|
competencyTotal.value.find((i) => i.value === "total").total =
|
||||||
|
totalSum.toString();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getTotal();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<q-card class="bg-grey-1">
|
||||||
|
<div class="row q-col-gutter-xs">
|
||||||
|
<div
|
||||||
|
v-for="(i, index) in competencyTotal"
|
||||||
|
:class="
|
||||||
|
index > 3
|
||||||
|
? 'col-12 col-sm-12 col-md-6 col-lg-6'
|
||||||
|
: 'col-12 col-sm-12 col-md-6 col-lg-3'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="bg-white rounded-borders q-pa-sm"
|
||||||
|
style="border: 1px solid #ededed"
|
||||||
|
>
|
||||||
|
<div class="row items-center no-wrap">
|
||||||
|
{{ i.label }}
|
||||||
|
<q-space />
|
||||||
|
<q-badge :color="i.color" text-color="white" :label="i.total" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
|
@ -19,60 +19,7 @@ const { showLoader, hideLoader, dialogRemove, success, messageError } =
|
||||||
const currentTab = ref<string>("list_competency");
|
const currentTab = ref<string>("list_competency");
|
||||||
const tabs = ref<Array<any>>([]);
|
const tabs = ref<Array<any>>([]);
|
||||||
|
|
||||||
const indicatorTotal = ref<any[]>([
|
|
||||||
{
|
|
||||||
value: "HEAD",
|
|
||||||
label: "สมรรถนะหลัก",
|
|
||||||
color: "edit",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "GROUP",
|
|
||||||
label: "สมรรถนะประจำกลุ่มงาน",
|
|
||||||
color: "primary",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "EXECUTIVE",
|
|
||||||
label: "สมรรถนะประจำผู้บริหารกรุงเทพมหานคร",
|
|
||||||
color: "blue",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "total",
|
|
||||||
label: "ทั้งหมด",
|
|
||||||
color: "red",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "DIRECTOR",
|
|
||||||
label:
|
|
||||||
"สมรรถนะเฉพาะสำหรับตำแหน่ง ผอ.เขต ผช.ผอ.เขต และหัวหน้าฝ่ายในสังกัด สนง.เขต",
|
|
||||||
color: "deep-purple",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "INSPECTOR",
|
|
||||||
label: "สมรรถนะเฉพาะสำหรับตำแหน่งผู้ตรวจราชการ กทม. และผู้ตรวจราชการ",
|
|
||||||
color: "orange",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
function getTotal() {
|
|
||||||
http
|
|
||||||
.get(config.API.capacitySummary)
|
|
||||||
.then((res) => {
|
|
||||||
const data = res.data.result;
|
|
||||||
indicatorTotal.value.forEach((i) => {
|
|
||||||
const map = data.find((item: any) => item.type === i.value);
|
|
||||||
if (map) i.total = map.total;
|
|
||||||
});
|
|
||||||
const totalSum = data.reduce((i:any, j:any) => i + +j.total, 0);
|
|
||||||
indicatorTotal.value.find((i) => i.value === "total").total =
|
|
||||||
totalSum.toString();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getTotal();
|
|
||||||
const tab = [
|
const tab = [
|
||||||
{ label: "รายการสมรรถนะ", value: "list_competency" },
|
{ label: "รายการสมรรถนะ", value: "list_competency" },
|
||||||
{ label: "กลุ่มงาน", value: "list_linkPosition" },
|
{ label: "กลุ่มงาน", value: "list_linkPosition" },
|
||||||
|
|
@ -87,38 +34,7 @@ onMounted(() => {
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">สมรรถนะ</div>
|
<div class="toptitle text-dark col-12 row items-center">สมรรถนะ</div>
|
||||||
<q-card flat bordered>
|
<q-card flat bordered>
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-card class="q-pa-xs bg-grey-1">
|
|
||||||
<div class="row q-col-gutter-xs">
|
|
||||||
<div
|
|
||||||
v-for="(i, index) in indicatorTotal"
|
|
||||||
:class="
|
|
||||||
index > 3
|
|
||||||
? 'col-12 col-sm-12 col-md-6 col-lg-6'
|
|
||||||
: 'col-12 col-sm-12 col-md-6 col-lg-3'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="bg-white rounded-borders q-pa-sm"
|
|
||||||
style="border: 1px solid #ededed"
|
|
||||||
>
|
|
||||||
<div class="row items-center no-wrap">
|
|
||||||
{{ i.label }}
|
|
||||||
<q-space />
|
|
||||||
<q-badge
|
|
||||||
:color="i.color"
|
|
||||||
text-color="white"
|
|
||||||
:label="i.total"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<q-separator />
|
|
||||||
<div class="text-subtitle1 text-grey-9">
|
<div class="text-subtitle1 text-grey-9">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue