Merge branch 'develop' into devTee
# Conflicts: # src/modules/14_KPI/interface/request/Main.ts
This commit is contained in:
commit
adadddc222
11 changed files with 678 additions and 415 deletions
|
|
@ -5,9 +5,12 @@ 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 { FormQueryCapacity } from "@/modules/14_KPI/interface/request/Main";
|
||||
import type { ResDataCapacity } from "@/modules/14_KPI/interface/response/Main";
|
||||
|
||||
import { useKPIDataStore } from "@/modules/14_KPI/store/KPIStore";
|
||||
|
||||
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -54,8 +57,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
const visibleColumns = ref<string[]>(["name"]);
|
||||
|
||||
const rows = ref<any[]>([]);
|
||||
const formQuery = reactive({
|
||||
const rows = ref<ResDataCapacity[]>([]);
|
||||
const formQuery = reactive<FormQueryCapacity>({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
|
|
@ -71,7 +74,7 @@ async function fetchList() {
|
|||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyType}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
const data: ResDataCapacity[] = res.data.result.data;
|
||||
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
||||
rows.value = data;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -56,11 +56,13 @@ function fetchDetail() {
|
|||
function onClickAddLevels() {
|
||||
const levelName = formData.levels.length + 1;
|
||||
const data = {
|
||||
level: levelName.toString(),
|
||||
level:
|
||||
store.competencyType === "HEAD" || store.competencyType === "GROUP"
|
||||
? (formData.levels[formData.levels.length].level = levelName.toString())
|
||||
: "",
|
||||
description: "",
|
||||
};
|
||||
formData.levels.push(data);
|
||||
formData.levels[formData.levels.length].level = levelName.toString();
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
|
@ -256,9 +258,10 @@ onMounted(() => {
|
|||
v-if="
|
||||
(store.competencyType === 'HEAD' && index > 4) ||
|
||||
(store.competencyType === 'GROUP' && index > 4) ||
|
||||
store.competencyType === 'EXECUTIVE' ||
|
||||
store.competencyType === 'DIRECTOR' ||
|
||||
store.competencyType === 'INSPECTOR'
|
||||
((store.competencyType === 'EXECUTIVE' ||
|
||||
store.competencyType === 'DIRECTOR' ||
|
||||
store.competencyType === 'INSPECTOR') &&
|
||||
index > 0)
|
||||
"
|
||||
>
|
||||
<q-tooltip>ลบ</q-tooltip></q-btn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue