Merge branch 'oat_dev' into develop
This commit is contained in:
commit
da3dbfe361
4 changed files with 41 additions and 12 deletions
|
|
@ -53,15 +53,16 @@ function fetchDataProject(id: string) {
|
|||
store.formAddProject.projectName = data.projectName;
|
||||
store.formAddProject.reason = data.reason;
|
||||
store.formAddProject.objective = data.objective;
|
||||
|
||||
/**เป้าหมาย*/
|
||||
const plannedGoals = data.plannedGoals.map((e: ResPlannedGoals) => ({
|
||||
groupTarget: e.groupTarget,
|
||||
groupTargetSub: e.groupTargetSub,
|
||||
position: e.position,
|
||||
posTypePlannedId: e.posTypePlannedId,
|
||||
posLevelPlannedId: e.posLevelPlannedId,
|
||||
type: e.type,
|
||||
positions: e.plannedGoalPositions.map((v: any) => ({
|
||||
position: v.position,
|
||||
posTypePlannedId: v.posTypePlannedId,
|
||||
posLevelPlannedId: v.posLevelPlannedId,
|
||||
})),
|
||||
type: e.type ? e.type : null,
|
||||
amount: e.amount,
|
||||
}));
|
||||
const plannedPeoples = data.plannedPeoples.map((e: ResPeople) => ({
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ const formGroupTarget = reactive<FormGroupTargetPlannedGoal>({
|
|||
position: "",
|
||||
posType: "",
|
||||
level: "",
|
||||
type: "",
|
||||
type: null,
|
||||
amount: null,
|
||||
// positions: {
|
||||
// position: "",
|
||||
|
|
@ -222,11 +222,14 @@ function onSubmitGroup() {
|
|||
const list = data.map((e: FormGroupTargetPlannedGoal) => ({
|
||||
groupTarget: e.groupTarget,
|
||||
groupTargetSub: e.groupTargetSub,
|
||||
positions: e.positions,
|
||||
positions: e.positions.map((v: any) => ({
|
||||
position: v.position,
|
||||
posTypePlannedId: v.posTypePlannedId,
|
||||
posLevelPlannedId: v.posLevelPlannedId,
|
||||
})),
|
||||
type: e.type ? e.type : null,
|
||||
amount: Number(e.amount),
|
||||
}));
|
||||
console.log(list);
|
||||
if (isEdit.value) {
|
||||
plannedGoals.value.splice(rowIndex.value, 1, ...list);
|
||||
} else {
|
||||
|
|
@ -376,7 +379,6 @@ onMounted(() => {
|
|||
plannedGoals.value = store.formAddProject.plannedGoals
|
||||
? store.formAddProject.plannedGoals
|
||||
: [];
|
||||
|
||||
plannedPeoples.value = store.formAddProject.plannedPeoples
|
||||
? store.formAddProject.plannedPeoples
|
||||
: [];
|
||||
|
|
@ -401,7 +403,10 @@ onMounted(() => {
|
|||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickOpenDialog('group', 'planned')"
|
||||
@click="
|
||||
cleanFormData();
|
||||
onClickOpenDialog('group', 'planned');
|
||||
"
|
||||
>
|
||||
<q-item-section>กลุ่มเป้าหมาย</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -464,6 +469,7 @@ onMounted(() => {
|
|||
formGroupTarget.groupTarget = props.row.groupTarget;
|
||||
formGroupTarget.groupTargetSub = props.row.groupTargetSub;
|
||||
formGroupTarget.amount = props.row.amount;
|
||||
formGroupTarget.positions = props.row.positions;
|
||||
newModalGroupTarget = true;
|
||||
}
|
||||
"
|
||||
|
|
|
|||
|
|
@ -32,6 +32,14 @@ interface FormGroupTargetPlannedGoal {
|
|||
posLevelPlannedId: string;
|
||||
}
|
||||
];
|
||||
plannedGoalPositions?: [
|
||||
{
|
||||
position: string;
|
||||
posTypePlannedId: string;
|
||||
posLevelPlannedId: string;
|
||||
}
|
||||
];
|
||||
|
||||
groupTarget: string;
|
||||
groupTargetSub: string;
|
||||
position: string;
|
||||
|
|
@ -202,7 +210,14 @@ interface actualGoals {
|
|||
interface PlannedGoals {
|
||||
groupTarget: string;
|
||||
groupTargetSub: string;
|
||||
positions: [
|
||||
positions?: [
|
||||
{
|
||||
position: string;
|
||||
posTypePlannedId: string;
|
||||
posLevelPlannedId: string;
|
||||
}
|
||||
];
|
||||
plannedGoalPositions?: [
|
||||
{
|
||||
position: string;
|
||||
posTypePlannedId: string;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,14 @@ interface ResActualGoals {
|
|||
interface ResPlannedGoals {
|
||||
groupTarget: string;
|
||||
groupTargetSub: string;
|
||||
position: [
|
||||
plannedGoalPositions?: [
|
||||
{
|
||||
position: string;
|
||||
posTypePlannedId: string;
|
||||
posLevelPlannedId: string;
|
||||
}
|
||||
];
|
||||
positions?: [
|
||||
{
|
||||
position: string;
|
||||
posTypePlannedId: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue