เป้าหมาย: แก้ไขบัค+เพิ่มcolumn เป้าหมายย่อย
This commit is contained in:
parent
e6a2d99fb2
commit
0dba62fb43
1 changed files with 37 additions and 19 deletions
|
|
@ -21,7 +21,6 @@ import type {
|
|||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
const route = useRoute();
|
||||
const projectId = ref<string>(route.params.id.toLocaleString());
|
||||
|
|
@ -42,6 +41,16 @@ const columnsPlannedGoals = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
format: (val) => convertNameGoals(val),
|
||||
},
|
||||
{
|
||||
name: "groupTargetSub",
|
||||
align: "left",
|
||||
label: "กลุ่มเป้าหมายย่อย",
|
||||
sortable: true,
|
||||
field: "groupTargetSub",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val) => convertNameSubGoals(val),
|
||||
},
|
||||
{
|
||||
name: "posTypePlannedId",
|
||||
align: "left",
|
||||
|
|
@ -75,6 +84,16 @@ const columnsActualGoals = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
format: (val) => convertNameGoals(val),
|
||||
},
|
||||
{
|
||||
name: "groupTargetSub",
|
||||
align: "left",
|
||||
label: "กลุ่มเป้าหมายย่อย",
|
||||
sortable: true,
|
||||
field: "groupTargetSub",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val) => convertNameSubGoals(val),
|
||||
},
|
||||
{
|
||||
name: "posTypeActualId",
|
||||
align: "left",
|
||||
|
|
@ -83,9 +102,7 @@ const columnsActualGoals = ref<QTableProps["columns"]>([
|
|||
field: "posTypeActualId",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
// format: (val) => convertTypeGoals(val),
|
||||
},
|
||||
|
||||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
|
|
@ -248,12 +265,18 @@ async function onSubmitGroup() {
|
|||
{
|
||||
groupTarget: formGroupTarget.groupTarget,
|
||||
groupTargetSub: formGroupTarget.groupTargetSub,
|
||||
positions: formGroupTarget.positions.map((v) => ({
|
||||
position: v.position ? v.position : "",
|
||||
posTypePlannedId: v.posTypeId ? v.posTypeId : "",
|
||||
posLevelPlannedId: v.posLevelId ? v.posLevelId : "",
|
||||
})),
|
||||
type: formGroupTarget.type ? formGroupTarget.type : "",
|
||||
positions:
|
||||
formGroupTarget.groupTarget !== "OUTSIDERS"
|
||||
? formGroupTarget.positions.map((v) => ({
|
||||
position: v.position ? v.position : "",
|
||||
posTypePlannedId: v.posTypeId ? v.posTypeId : "",
|
||||
posLevelPlannedId: v.posLevelId ? v.posLevelId : "",
|
||||
}))
|
||||
: [],
|
||||
type:
|
||||
formGroupTarget.groupTarget === "OUTSIDERS"
|
||||
? formGroupTarget.type
|
||||
: "",
|
||||
amount: formGroupTarget.amount,
|
||||
}
|
||||
)
|
||||
|
|
@ -416,6 +439,11 @@ function convertNameGoals(id: string) {
|
|||
return data && data?.name;
|
||||
}
|
||||
|
||||
function convertNameSubGoals(id: string) {
|
||||
const data = groupSubOp.value.find((e: DataOption) => e.id === id);
|
||||
return data && data?.name;
|
||||
}
|
||||
|
||||
function convertNamePeoples(id: string) {
|
||||
const data = peoplesOp.value.find((e: DataOption) => e.id === id);
|
||||
return data && data?.name;
|
||||
|
|
@ -665,16 +693,6 @@ onMounted(() => {
|
|||
<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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue