เพิ่ม [ ]

This commit is contained in:
STW_TTTY\stwtt 2024-07-01 11:40:07 +07:00
parent afa820f1f8
commit f97cda0a8d
5 changed files with 10 additions and 9 deletions

View file

@ -27,9 +27,9 @@ const store = useKpiDataStore();
const evaluationId = ref<string>(route.params.id.toString());
const rows_01 = ref<any[]>();
const rows_02 = ref<any[]>();
const rows_03 = ref<any[]>();
const rows_01 = ref<any[]>([]);
const rows_02 = ref<any[]>([]);
const rows_03 = ref<any[]>([]);
const totalResults1 = ref<number>(0);
const totalResults2 = ref<number>(0);

View file

@ -30,7 +30,7 @@ const {
} = useCounterMixin();
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 props = defineProps({

View file

@ -120,22 +120,23 @@ const visibleColumns = ref<string[]>(
: ["name", "level", "point", "weight"]
);
const typeCompetency = ref<string>("");
const typeCompetency = ref<any>("");
function onAdd(type: string) {
typeCompetency.value = type;
modal.value = true;
}
const rows = ref<any>([]);
const rows = ref<any[]>([]);
const lists = ref<any>([]);
// const resultEvaluation = ref<string | 0>(0);
function getData(type: string) {
function getData(type: any) {
http
.get(config.API.kpiUserCapacity + `?id=${id.value}&type=${type}`)
.then(async (res) => {
const data = res.data.result.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.push({ type: type, data });
})

View file

@ -59,7 +59,7 @@ export const useKpiDataStore = defineStore("KPIDataAdmin", () => {
specialPoint: 0,
});
const competencyType = ref<DataOption[]>([
const competencyType = ref<any[]>([
{
id: "HEAD",
name: "สมรรถนะหลัก",

View file

@ -22,7 +22,7 @@ import type { ResUserEvaluation } from "@/modules/14_KPI/interface/response/KPI"
import { useKpiDataStore } from "@/modules/14_KPI/store";
import { useCounterMixin } from "@/stores/mixin";
const itemsTab = ref<any>([
const itemsTab = ref<any[]>([
{
name: "1",
label: "จัดทำแบบฟอร์มการประเมิน",