This commit is contained in:
Warunee Tamkoo 2024-05-13 18:05:47 +07:00
parent f453b95f32
commit c3cc2e0aeb
7 changed files with 484 additions and 168 deletions

View file

@ -11,6 +11,8 @@ 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 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";
import DialogProblem from "@/modules/08_KPI/components/Tab/Dialog/DialogCommentProblem.vue";
import { useCounterMixin } from "@/stores/mixin";
import { useKpiDataStore } from "@/modules/08_KPI/store";
@ -171,14 +173,20 @@ function onDelete(id: string) {
const modalProgress = ref<boolean>(false);
const modalProblem = ref<boolean>(false);
const type = ref<string>("");
function openPopupProgress() {
const idList = ref<string>("");
function openPopupProgress(id: string) {
modalProgress.value = true;
type.value = rows.value ? "plan" : rows.value ? "role" : "special";
type.value =
numpage.value === 1 ? "plan" : numpage.value === 2 ? "role" : "special";
idList.value = id;
}
function openPopupProblem() {
function openPopupProblem(id: string) {
modalProblem.value = true;
type.value = rows.value ? "plan" : rows.value ? "role" : "special";
type.value =
numpage.value === 1 ? "plan" : numpage.value === 2 ? "role" : "special";
idList.value = id;
}
watch(
@ -349,14 +357,15 @@ watch(
</div>
</q-td>
<td>
<!-- <div v-if="store.dataEvaluation.evaluationStatus == 'APPROVE'"> -->
<q-btn
flat
round
icon="note"
color="blue-5"
icon="mdi-developer-board"
color="blue-6"
size="12px"
dense
@click="openPopupProgress()"
@click="openPopupProgress(props.row.id)"
>
<q-tooltip>รายงานความกาวหน</q-tooltip>
</q-btn>
@ -367,44 +376,47 @@ watch(
color="red-5"
size="12px"
dense
:type="data ? 'plan' : data ? 'role' : 'special'"
main="problem"
@click="openPopupProblem()"
@click="openPopupProblem(props.row.id)"
>
<q-tooltip>รายงานปญหา</q-tooltip>
</q-btn>
<!-- </div> -->
<q-btn
<div
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
flat
round
icon="edit"
color="edit"
size="12px"
dense
@click="onAdd(true, props.row.id)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
flat
round
icon="edit"
color="edit"
size="12px"
dense
@click="onAdd(true, props.row.id)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
flat
round
icon="delete"
color="red"
size="12px"
dense
@click="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
<q-btn
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
flat
round
icon="delete"
color="red"
size="12px"
dense
@click="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</div>
</td>
</q-tr>
</template>
@ -438,7 +450,19 @@ watch(
:isStatusEdit="isStatusEdit"
:kpiUserPlannedId="kpiUserPlannedId"
/>
<DialogProgress
v-model:modal="modalProgress"
v-model:type="type"
:idList="idList"
/>
<DialogProblem
v-model:modal="modalProblem"
v-model:type="type"
:idList="idList"
/>
</template>
<style scoped>
.custom-table2 {
max-height: 64vh;

View file

@ -197,6 +197,19 @@ function onEvaluate(type: string) {
modalEvaluate.value = true;
}
const modalProgress = ref<boolean>(false);
const modalProblem = ref<boolean>(false);
const type = ref<string>("");
function openPopupProgress() {
modalProgress.value = true;
type.value = rows.value ? "plan" : rows.value ? "role" : "special";
}
function openPopupProblem() {
modalProblem.value = true;
type.value = rows.value ? "plan" : rows.value ? "role" : "special";
}
watch(
() => store.dataEvaluation.capacityPoint,
(newValue, oldValue) => {
@ -345,30 +358,62 @@ onMounted(() => {
{{ col.value }}
</div>
</q-td>
<q-td
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
>
<q-btn
flat
round
icon="edit"
color="edit"
@click.stop.pervent="onEdit(props.row, item.id)"
<q-td>
<div v-if="store.dataEvaluation.evaluationStatus == 'APPROVE'">
<q-btn
flat
round
icon="mdi-developer-board"
color="blue-6"
size="12px"
dense
@click="openPopupProgress()"
>
<q-tooltip>รายงานความกาวหน</q-tooltip>
</q-btn>
<q-btn
flat
round
icon="warning"
color="red-5"
size="12px"
dense
main="problem"
@click="openPopupProblem()"
>
<q-tooltip>รายงานปญหา</q-tooltip>
</q-btn>
</div>
<div
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
>
<q-tooltip>แกไข </q-tooltip>
</q-btn>
<q-btn
flat
round
icon="delete"
color="red"
@click.stop.pervent="onDelete(props.row.id, item.id)"
>
<q-tooltip>ลบขอม </q-tooltip>
</q-btn>
<q-btn
flat
round
icon="edit"
color="edit"
@click.stop.pervent="onEdit(props.row, item.id)"
>
<q-tooltip>แกไข </q-tooltip>
</q-btn>
<q-btn
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
flat
round
icon="delete"
color="red"
@click.stop.pervent="onDelete(props.row.id, item.id)"
>
<q-tooltip>ลบขอม </q-tooltip>
</q-btn>
</div>
</q-td>
</q-tr>
</template>

View file

@ -139,6 +139,19 @@ function onDelete(id: string) {
});
}
const modalProgress = ref<boolean>(false);
const modalProblem = ref<boolean>(false);
const type = ref<string>("");
function openPopupProgress() {
modalProgress.value = true;
type.value = rows.value ? "plan" : rows.value ? "role" : "special";
}
function openPopupProblem() {
modalProblem.value = true;
type.value = rows.value ? "plan" : rows.value ? "role" : "special";
}
onMounted(() => {
getDevelop();
});
@ -273,30 +286,58 @@ onMounted(() => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
>
<q-btn
flat
round
icon="edit"
color="edit"
@click.stop.pervent="onEdit(props.row.id)"
<q-td>
<div v-if="store.dataEvaluation.evaluationStatus == 'APPROVE'">
<q-btn
flat
round
icon="mdi-developer-board"
color="blue-6"
size="12px"
dense
@click="openPopupProgress()"
>
<q-tooltip>รายงานความกาวหน</q-tooltip>
</q-btn>
<q-btn
flat
round
icon="warning"
color="red-5"
size="12px"
dense
main="problem"
@click="openPopupProblem()"
>
<q-tooltip>รายงานปญหา</q-tooltip>
</q-btn>
</div>
<div
v-if="
store.dataEvaluation.evaluationStatus === 'NEW' &&
store.rolePerson === 'USER'
"
>
<q-tooltip>แกไข </q-tooltip>
</q-btn>
<q-btn
flat
round
icon="delete"
color="red"
@click.stop.pervent="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม </q-tooltip>
</q-btn>
<q-btn
flat
round
icon="edit"
color="edit"
@click.stop.pervent="onEdit(props.row.id)"
>
<q-tooltip>แกไข </q-tooltip>
</q-btn>
<q-btn
flat
round
icon="delete"
color="red"
@click.stop.pervent="onDelete(props.row.id)"
>
<q-tooltip>ลบขอม </q-tooltip>
</q-btn>
</div>
</q-td>
</q-tr>
</template>