fix bug kpi
This commit is contained in:
parent
63611d0811
commit
1fa38897cf
7 changed files with 82 additions and 69 deletions
|
|
@ -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%">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue