ประวัติยการแก้ไข

This commit is contained in:
STW_TTTY\stwtt 2024-05-09 09:28:20 +07:00
parent 55111ed126
commit 6299afbeab
3 changed files with 59 additions and 18 deletions

View file

@ -13,6 +13,7 @@ import DialogHistory from "@/modules/01_metadataNew/components/Indicators/Dialog
import { useCounterMixin } from "@/stores/mixin";
/** use*/
const dataHistory = ref<any[]>([]);
const modalHistory = ref<boolean>(false);
const isAll = ref<boolean>(false);
const $q = useQuasar();
@ -170,7 +171,20 @@ function clearFilter() {
* @param id
*/
function onClickHistory(id: string) {
modalHistory.value = true;
showLoader();
http
.get(config.API.kpiPlan + `/history/${id}`)
.then((res) => {
const data = res.data.result;
dataHistory.value = data;
modalHistory.value = true;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
onMounted(async () => {
@ -362,7 +376,6 @@ onMounted(async () => {
<q-checkbox
keep-color
v-model="isAll"
label="แสดงตำแหน่งทั้งหมด"
color="primary"
@update:model-value="fetchListProjectNew"
@ -378,7 +391,7 @@ onMounted(async () => {
v-model="nodeData.keyword"
ref="filterRef"
outlined
style="width:150px"
style="width: 150px"
placeholder="ค้นหา"
@keydown.enter.prevent="fetchListProjectNew"
>
@ -510,7 +523,7 @@ onMounted(async () => {
</div>
</q-card>
<DialogHistory v-model:modal="modalHistory" />
<DialogHistory v-model:modal="modalHistory" :rows="dataHistory" />
</template>
<style lang="scss" scoped>

View file

@ -17,6 +17,7 @@ import DialogHistory from "@/modules/01_metadataNew/components/Indicators/Dialog
import { useCounterMixin } from "@/stores/mixin";
/** use*/
const dataHistory = ref<any[]>([]);
const modalHistory = ref<boolean>(false);
const total = ref<number>();
const $q = useQuasar();
@ -211,7 +212,20 @@ function setModel(val: string) {
* @param id
*/
function onClickHistory(id: string) {
modalHistory.value = true;
showLoader();
http
.get(config.API.kpiRoleMainList + `/history/${id}`)
.then((res) => {
const data = res.data.result;
dataHistory.value = data;
modalHistory.value = true;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
onMounted(async () => {
@ -275,7 +289,7 @@ onMounted(async () => {
</div>
<div class="row q-gutter-sm">
<q-select
v-if="$q.screen.gt.md"
v-if="$q.screen.gt.md"
dense
:model-value="formFilter.position"
label="ตำแหน่ง"
@ -386,18 +400,18 @@ onMounted(async () => {
@update:model-value="fetchList"
style="width: 160px"
>
<template v-if="formFilter.round" v-slot:append>
<template v-if="formFilter.round" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.round = ''), fetchList()"
class="cursor-pointer"
/>
</template>
</q-select>
</q-select>
</div>
<q-btn
v-if="$q.screen.gt.md"
v-if="$q.screen.gt.md"
flat
round
dense
@ -570,7 +584,7 @@ onMounted(async () => {
</div>
</q-card>
<DialogHistory v-model:modal="modalHistory" />
<DialogHistory v-model:modal="modalHistory" :rows="dataHistory" />
</template>
<style scoped></style>