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",
|
field: "posTypePlannedId",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "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",
|
field: "posTypeActualId",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (val) => convertTypeGoals(val),
|
// format: (val) => convertTypeGoals(val),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -200,7 +200,6 @@ function fetchType() {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
name: e.posTypeName,
|
name: e.posTypeName,
|
||||||
}));
|
}));
|
||||||
console.log(data);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -214,6 +213,7 @@ async function fetchData(id: string) {
|
||||||
.get(config.API.developmentMainTab("tab2", id))
|
.get(config.API.developmentMainTab("tab2", id))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
actualGoals.value = data.actualGoals;
|
actualGoals.value = data.actualGoals;
|
||||||
actualPeoples.value = data.actualPeoples;
|
actualPeoples.value = data.actualPeoples;
|
||||||
plannedGoals.value = data.plannedGoals;
|
plannedGoals.value = data.plannedGoals;
|
||||||
|
|
@ -259,9 +259,9 @@ async function onSubmitGroup() {
|
||||||
groupTarget: formGroupTarget.groupTarget,
|
groupTarget: formGroupTarget.groupTarget,
|
||||||
groupTargetSub: formGroupTarget.groupTargetSub,
|
groupTargetSub: formGroupTarget.groupTargetSub,
|
||||||
positions: formGroupTarget.positions.map((v) => ({
|
positions: formGroupTarget.positions.map((v) => ({
|
||||||
position: v.position,
|
position: v.position ? v.position : "",
|
||||||
posTypePlannedId: v.posTypePlannedId,
|
posTypePlannedId: v.posTypePlannedId ? v.posTypePlannedId : "",
|
||||||
posLevelPlannedId: v.posLevelPlannedId,
|
posLevelPlannedId: v.posLevelPlannedId ? v.posLevelPlannedId : "",
|
||||||
})),
|
})),
|
||||||
type: formGroupTarget.type ? formGroupTarget.type : "",
|
type: formGroupTarget.type ? formGroupTarget.type : "",
|
||||||
amount: formGroupTarget.amount,
|
amount: formGroupTarget.amount,
|
||||||
|
|
@ -431,9 +431,16 @@ function convertNamePeoples(id: string) {
|
||||||
return data && data?.name;
|
return data && data?.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertTypeGoals(id: string) {
|
function convertTypeGoals(row: ResActualGoals) {
|
||||||
const data = posTypeMain.value.find((e: ResGroup) => e.id === id);
|
const posTypeName = posTypeMain.value.find(
|
||||||
return data && data?.posTypeName;
|
(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 () => {
|
const addGroupTargetData = async () => {
|
||||||
|
|
@ -528,7 +535,18 @@ onMounted(() => {
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<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 : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -673,7 +691,30 @@ onMounted(() => {
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<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 : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -876,8 +917,11 @@ onMounted(() => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
v-model="formGroupTarget.level"
|
v-model="formGroupTarget.level"
|
||||||
:options="posLevelOp"
|
:options="
|
||||||
option-label="name"
|
posTypeMain.find((v) => formGroupTarget.posType === v.id)
|
||||||
|
?.posLevels || []
|
||||||
|
"
|
||||||
|
option-label="posLevelName"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue