เพิ่ม [ ]
This commit is contained in:
parent
afa820f1f8
commit
f97cda0a8d
5 changed files with 10 additions and 9 deletions
|
|
@ -27,9 +27,9 @@ const store = useKpiDataStore();
|
||||||
|
|
||||||
const evaluationId = ref<string>(route.params.id.toString());
|
const evaluationId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
const rows_01 = ref<any[]>();
|
const rows_01 = ref<any[]>([]);
|
||||||
const rows_02 = ref<any[]>();
|
const rows_02 = ref<any[]>([]);
|
||||||
const rows_03 = ref<any[]>();
|
const rows_03 = ref<any[]>([]);
|
||||||
|
|
||||||
const totalResults1 = ref<number>(0);
|
const totalResults1 = ref<number>(0);
|
||||||
const totalResults2 = ref<number>(0);
|
const totalResults2 = ref<number>(0);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ const {
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const title = defineModel<string>("title", { required: true });
|
const title = defineModel<string>("title", { required: true });
|
||||||
const rows = defineModel<any>("data", { required: true });
|
const rows = defineModel<any[]>("data", { required: true });
|
||||||
const numpage = defineModel<number>("page", { required: true });
|
const numpage = defineModel<number>("page", { required: true });
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
||||||
|
|
@ -120,22 +120,23 @@ const visibleColumns = ref<string[]>(
|
||||||
: ["name", "level", "point", "weight"]
|
: ["name", "level", "point", "weight"]
|
||||||
);
|
);
|
||||||
|
|
||||||
const typeCompetency = ref<string>("");
|
const typeCompetency = ref<any>("");
|
||||||
function onAdd(type: string) {
|
function onAdd(type: string) {
|
||||||
typeCompetency.value = type;
|
typeCompetency.value = type;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rows = ref<any>([]);
|
const rows = ref<any[]>([]);
|
||||||
const lists = ref<any>([]);
|
const lists = ref<any>([]);
|
||||||
// const resultEvaluation = ref<string | 0>(0);
|
// const resultEvaluation = ref<string | 0>(0);
|
||||||
|
|
||||||
function getData(type: string) {
|
function getData(type: any) {
|
||||||
http
|
http
|
||||||
.get(config.API.kpiUserCapacity + `?id=${id.value}&type=${type}`)
|
.get(config.API.kpiUserCapacity + `?id=${id.value}&type=${type}`)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
rows.value[type] = data;
|
rows.value[type] = data;
|
||||||
|
console.log("🚀 ~ .then ~ rows.value[type]:", rows.value[type])
|
||||||
lists.value = await lists.value.filter((x: any) => x.type != type);
|
lists.value = await lists.value.filter((x: any) => x.type != type);
|
||||||
lists.value.push({ type: type, data });
|
lists.value.push({ type: type, data });
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export const useKpiDataStore = defineStore("KPIDataAdmin", () => {
|
||||||
specialPoint: 0,
|
specialPoint: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const competencyType = ref<DataOption[]>([
|
const competencyType = ref<any[]>([
|
||||||
{
|
{
|
||||||
id: "HEAD",
|
id: "HEAD",
|
||||||
name: "สมรรถนะหลัก",
|
name: "สมรรถนะหลัก",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import type { ResUserEvaluation } from "@/modules/14_KPI/interface/response/KPI"
|
||||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const itemsTab = ref<any>([
|
const itemsTab = ref<any[]>([
|
||||||
{
|
{
|
||||||
name: "1",
|
name: "1",
|
||||||
label: "จัดทำแบบฟอร์มการประเมิน",
|
label: "จัดทำแบบฟอร์มการประเมิน",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue