fix bug kpi

This commit is contained in:
Warunee Tamkoo 2024-05-15 18:23:55 +07:00
parent 63611d0811
commit 1fa38897cf
7 changed files with 82 additions and 69 deletions

View file

@ -13,7 +13,6 @@ import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/08_KPI/store";
const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin();
const store = useKpiDataStore();
const {
@ -294,6 +293,7 @@ function clickList(id: string, isData: boolean = false) {
formDetail.strategy = data.strategy;
formDetail.strategyId = data.strategyId;
formDetail.strategyName = data.strategyName;
formDetail.documentInfoEvidence = data.documentInfoEvidence;
})
.catch((err) => {
messageError($q, err);
@ -452,6 +452,7 @@ const title = computed(() => {
return name;
});
</script>
<template>
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 100%">

View file

@ -108,7 +108,7 @@ function onSubmitAdd() {
config.API.kpiCommentP(
"problem",
type.value + sendType.value,
"user",
store.rolePerson.toLowerCase(),
sendId.value ? sendId.value : idList.value
),
{
@ -162,7 +162,14 @@ function closeAdd() {
function getList() {
showLoader();
http
.get(config.API.kpiCommentP("problem", type.value, "user", idList.value))
.get(
config.API.kpiCommentP(
"problem",
type.value,
store.rolePerson.toLowerCase(),
idList.value
)
)
.then((res) => {
const data = res.data.result;
listTarget.value = data;
@ -190,7 +197,12 @@ function onSubmitComment(role: string) {
showLoader();
http
.put(
config.API.kpiCommentP("problem", type.value, role, formDataView.id),
config.API.kpiCommentP(
"problem",
type.value,
store.rolePerson.toLowerCase(),
formDataView.id
),
body
)
.then((res) => {
@ -345,11 +357,11 @@ watch(
<div v-else>
<div class="row q-pa-md q-col-gutter-sm">
<div class="row col-12 text-weight-medium">
<div class="col-4 text-grey-6">วขความกาวหน</div>
<div class="col-4 text-grey-6">วขญห</div>
<div class="col-8">{{ formDataView.topic }}</div>
</div>
<div class="row col-12 text-weight-medium">
<div class="col-4 text-grey-6">รายละเอยดความกาวหน</div>
<div class="col-4 text-grey-6">รายละเอยดญห</div>
<div class="col-8">{{ formDataView.reason }}</div>
</div>
<div class="col-12">

View file

@ -16,17 +16,8 @@ import { useKpiDataStore } from "@/modules/08_KPI/store";
const store = useKpiDataStore();
const $q = useQuasar();
const route = useRoute();
const id = ref<string>(route.params.id as string);
const mixin = useCounterMixin();
const {
dialogConfirm,
showLoader,
hideLoader,
messageError,
dialogMessageNotify,
success,
} = mixin;
const { dialogConfirm, showLoader, hideLoader, messageError, success } = mixin;
const modal = defineModel<boolean>("modal", { required: true });
const type = defineModel<string>("type", { required: true });
@ -93,7 +84,12 @@ function onSubmitAdd() {
showLoader();
http
.put(
config.API.kpiCommentP("progress", type.value, "user", idList.value),
config.API.kpiCommentP(
"progress",
type.value,
store.rolePerson.toLocaleLowerCase(),
idList.value
),
{
reason: formDataAdd.reason,
topic: formDataAdd.topic,
@ -136,7 +132,14 @@ function closeAdd() {
function getList() {
showLoader();
http
.get(config.API.kpiCommentP("progress", type.value, "user", idList.value))
.get(
config.API.kpiCommentP(
"progress",
type.value,
store.rolePerson.toLocaleLowerCase(),
idList.value
)
)
.then((res) => {
const data = res.data.result;
listTarget.value = data;
@ -164,7 +167,12 @@ function onSubmitComment(role: string) {
showLoader();
http
.put(
config.API.kpiCommentP("progress", type.value, role, formDataView.id),
config.API.kpiCommentP(
"progress",
type.value,
store.rolePerson.toLocaleLowerCase(),
formDataView.id
),
body
)
.then((res) => {

View file

@ -8,7 +8,7 @@ import http from "@/plugins/http";
import type { QTableProps } from "quasar";
import Dialog from "@/modules/08_KPI/components/Tab/Dialog/01_FormIndicator.vue";
import Dialog03 from "@/modules/08_KPI/components/Tab/Dialog/03_FormIndicatorSpecial.vue";
// import Dialog03 from "@/modules/08_KPI/components/Tab/Dialog/03_FormIndicatorSpecial.vue";
import DialogEvaluate from "@/modules/08_KPI/components/Tab/DialogEvaluate/01_Indicator.vue";
import DialogViewInfo from "@/modules/08_KPI/components/Tab/Dialog/DialogViewInfo.vue";
import DialogProgress from "@/modules/08_KPI/components/Tab/Dialog/DialogCommentProgress.vue";