ข้อมูลการประเมิน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-03 15:10:46 +07:00
parent d52e37965f
commit daecd9524a
10 changed files with 106 additions and 176 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, onMounted,watch } from "vue";
import { ref, reactive, onMounted, watch } from "vue";
import { useQuasar, type QTableProps } from "quasar";
import { useRouter, useRoute } from "vue-router";
@ -87,7 +87,7 @@ function fetchList() {
http
.post(config.API.kpiPlan + `/search-edit`, {
isAll: isAll.value,
keyword: nodeData.keyword,
keyword: nodeData.keyword.trim(),
node: nodeData.node ? nodeData.node : 0,
nodeId: nodeData.nodeId,
period: nodeData.round,
@ -98,9 +98,9 @@ function fetchList() {
.then((res) => {
const data = res.data.result.data;
totalList.value = Math.ceil(
res.data.result.total / pagination.value.rowsPerPage
);
total.value = res.data.result.total;
res.data.result.total / pagination.value.rowsPerPage
);
total.value = res.data.result.total;
rows.value = data;
})
.catch((err) => {
@ -127,20 +127,6 @@ function onClickView(id: string = "") {
router.push(`/masterdata/indicator-plan/view/${id}`);
}
function fetchActive() {
// showLoader();
// http
// .get(config.API.activeOrganization)
// .then((res) => {
// const data = res.data.result;
// // fetchTree(data.activeId);
// })
// .catch((err) => {
// messageError($q, err);
// hideLoader();
// });
}
/** ดึงข้อมูลโครงสรร้าง */
async function fetchTree() {
node.value = await fetchStructureTree(route.meta.Key as string, true);
@ -206,7 +192,6 @@ function onClickHistory(id: string) {
function updatePagination(newPagination: any) {
pagination.value.page = 1;
pagination.value.rowsPerPage = newPagination.rowsPerPage;
}
function getSearch() {
@ -242,13 +227,7 @@ onMounted(() => {
<q-input dense outlined v-model="filterMain" label="ค้นหา">
<template v-slot:append>
<q-icon
v-if="filterMain !== ''"
name="clear"
class="cursor-pointer"
@click="filterMain = ''"
/>
<q-icon v-else name="search" color="grey-5" />
<q-icon name="search" color="grey-5" />
</template>
</q-input>
<q-tree
@ -258,7 +237,7 @@ onMounted(() => {
node-key="orgTreeName"
label-key="labelName"
v-model:expanded="expanded"
:filter="filterMain"
:filter="filterMain.trim()"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"
v-model:selected="nodeData.nodeId"
@ -329,9 +308,7 @@ onMounted(() => {
<template v-if="year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="
(year = null),getSearch()
"
@click.stop.prevent="(year = null), getSearch()"
class="cursor-pointer"
/>
</template>
@ -354,9 +331,7 @@ onMounted(() => {
<template v-if="nodeData.round" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="
(nodeData.round = ''), getSearch()
"
@click.stop.prevent="(nodeData.round = ''), getSearch()"
class="cursor-pointer"
/>
</template>
@ -393,18 +368,11 @@ onMounted(() => {
v-model="nodeData.keyword"
ref="filterRef"
outlined
style="width: 150px"
placeholder="ค้นหา"
@keydown.enter.prevent="getSearch"
>
<template v-slot:append>
<q-icon v-if="nodeData.keyword == ''" name="search" />
<q-icon
v-if="nodeData.keyword !== ''"
name="clear"
class="cursor-pointer"
@click="clearFilter"
/>
<q-icon name="search" />
</template>
</q-input>
<q-select
@ -418,7 +386,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>