Merge branch 'oat_dev' into develop
This commit is contained in:
commit
d8942c422a
1 changed files with 57 additions and 13 deletions
|
|
@ -59,7 +59,7 @@ const columnsPlannedGoals = ref<QTableProps["columns"]>([
|
|||
field: "posTypePlannedId",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val) => convertTypeGoals(val),
|
||||
// format: (val) => convertTypeGoals(val),
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -92,7 +92,7 @@ const columnsActualGoals = ref<QTableProps["columns"]>([
|
|||
field: "posTypeActualId",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val) => convertTypeGoals(val),
|
||||
// format: (val) => convertTypeGoals(val),
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -200,7 +200,6 @@ function fetchType() {
|
|||
id: e.id,
|
||||
name: e.posTypeName,
|
||||
}));
|
||||
console.log(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -214,6 +213,7 @@ async function fetchData(id: string) {
|
|||
.get(config.API.developmentMainTab("tab2", id))
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
actualGoals.value = data.actualGoals;
|
||||
actualPeoples.value = data.actualPeoples;
|
||||
plannedGoals.value = data.plannedGoals;
|
||||
|
|
@ -259,9 +259,9 @@ async function onSubmitGroup() {
|
|||
groupTarget: formGroupTarget.groupTarget,
|
||||
groupTargetSub: formGroupTarget.groupTargetSub,
|
||||
positions: formGroupTarget.positions.map((v) => ({
|
||||
position: v.position,
|
||||
posTypePlannedId: v.posTypePlannedId,
|
||||
posLevelPlannedId: v.posLevelPlannedId,
|
||||
position: v.position ? v.position : "",
|
||||
posTypePlannedId: v.posTypePlannedId ? v.posTypePlannedId : "",
|
||||
posLevelPlannedId: v.posLevelPlannedId ? v.posLevelPlannedId : "",
|
||||
})),
|
||||
type: formGroupTarget.type ? formGroupTarget.type : "",
|
||||
amount: formGroupTarget.amount,
|
||||
|
|
@ -431,9 +431,16 @@ function convertNamePeoples(id: string) {
|
|||
return data && data?.name;
|
||||
}
|
||||
|
||||
function convertTypeGoals(id: string) {
|
||||
const data = posTypeMain.value.find((e: ResGroup) => e.id === id);
|
||||
return data && data?.posTypeName;
|
||||
function convertTypeGoals(row: ResActualGoals) {
|
||||
const posTypeName = posTypeMain.value.find(
|
||||
(e: ResGroup) => e.id === row.posTypeActualId
|
||||
);
|
||||
const posLevelName = posTypeName?.posLevels.find(
|
||||
(e: any) => e.id === row.posLevelActualId
|
||||
);
|
||||
const fullName = posTypeName?.posTypeName + " " + posLevelName?.posLevelName;
|
||||
// return posTypeName && posTypeName?.posTypeName;
|
||||
return fullName;
|
||||
}
|
||||
|
||||
const addGroupTargetData = async () => {
|
||||
|
|
@ -528,7 +535,18 @@ onMounted(() => {
|
|||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
<div v-if="col.name === 'posTypePlannedId'">
|
||||
<div
|
||||
v-if="props.row.groupTarget !== 'OUTSIDERS'"
|
||||
v-for="row in props.row.plannedGoalPositions"
|
||||
>
|
||||
{{ `- ${row.position} (${row.posType} ${row.posLevel})` }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ props.row.type ? props.row.type : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
@ -673,7 +691,30 @@ onMounted(() => {
|
|||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
<div v-if="col.name === 'posTypeActualId'">
|
||||
<div v-if="props.row.groupTarget !== 'OUTSIDERS'">
|
||||
{{
|
||||
`${props.row.position} (${props.row.posType} ${props.row.posLevel})`
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ props.row.type ? props.row.type : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
<!-- <div
|
||||
v-if="col.name === 'posTypeActualId'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{
|
||||
props.row.posTypeActualId !== null
|
||||
? convertTypeGoals(props.row)
|
||||
: props.row.type
|
||||
}}
|
||||
</div> -->
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
@ -876,8 +917,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
class="inputgreen"
|
||||
v-model="formGroupTarget.level"
|
||||
:options="posLevelOp"
|
||||
option-label="name"
|
||||
:options="
|
||||
posTypeMain.find((v) => formGroupTarget.posType === v.id)
|
||||
?.posLevels || []
|
||||
"
|
||||
option-label="posLevelName"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue