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

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

@ -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>