เพิ่มแสดงตำแหน่งติดเงื่อนไข
This commit is contained in:
parent
df29a5b02a
commit
f9ff464e7e
8 changed files with 42 additions and 20 deletions
|
|
@ -282,11 +282,14 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
positionIsSelected: e.fullNameCurrentHolder,
|
positionIsSelected: e.fullNameCurrentHolder
|
||||||
|
? e.fullNameCurrentHolder
|
||||||
|
: "-",
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
positions: e.positions,
|
positions: e.positions,
|
||||||
node: e.node,
|
node: e.node,
|
||||||
nodeId: e.nodeId,
|
nodeId: e.nodeId,
|
||||||
|
isCondition: e.isCondition,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
positionNo.value = listPosNo;
|
positionNo.value = listPosNo;
|
||||||
|
|
@ -652,7 +655,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -692,11 +694,10 @@ onMounted(async () => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="onClickSelectPos(props.row.id)"
|
@click="onClickSelectPos(props.row.id)"
|
||||||
:class="
|
:class="{
|
||||||
props.row.id === positionId
|
'text-red': props.row.isCondition === true,
|
||||||
? 'bg-blue-2'
|
'bg-blue-2': props.row.id === positionId,
|
||||||
: ''
|
}"
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
|
|
|
||||||
|
|
@ -267,11 +267,14 @@ async function getDataTable(id: string, level: number = 0) {
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
positionIsSelected: e.fullNameCurrentHolder,
|
positionIsSelected: e.fullNameCurrentHolder
|
||||||
|
? e.fullNameCurrentHolder
|
||||||
|
: "-",
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
positions: e.positions,
|
positions: e.positions,
|
||||||
node: e.node,
|
node: e.node,
|
||||||
nodeId: e.nodeId,
|
nodeId: e.nodeId,
|
||||||
|
isCondition: e.isCondition,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
positionNo.value = listPosNo;
|
positionNo.value = listPosNo;
|
||||||
|
|
@ -666,11 +669,10 @@ onMounted(() => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="onClickSelectPos(props.row.id)"
|
@click="onClickSelectPos(props.row.id)"
|
||||||
:class="
|
:class="{
|
||||||
props.row.id === positionId
|
'text-red': props.row.isCondition === true,
|
||||||
? 'bg-blue-2'
|
'bg-blue-2': props.row.id === positionId,
|
||||||
: ''
|
}"
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ interface PositionMain {
|
||||||
positions: Positions[];
|
positions: Positions[];
|
||||||
node: number;
|
node: number;
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
|
isCondition: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PositionNo {
|
interface PositionNo {
|
||||||
|
|
@ -110,9 +111,10 @@ interface DataPositionNo {
|
||||||
positionName: string;
|
positionName: string;
|
||||||
posTypeName: string;
|
posTypeName: string;
|
||||||
posLevelName: string;
|
posLevelName: string;
|
||||||
positionIsSelected: string | null;
|
positionIsSelected: string;
|
||||||
isSit: boolean;
|
isSit: boolean;
|
||||||
positions: Positions[];
|
positions: Positions[];
|
||||||
|
isCondition: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormActive {
|
interface FormActive {
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -402,7 +401,10 @@ onMounted(async () => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="onClickSelectPos(props.row.id)"
|
@click="onClickSelectPos(props.row.id)"
|
||||||
:class="props.row.id === positionId ? 'bg-blue-2' : ''"
|
:class="{
|
||||||
|
'bg-blue-2': props.row.id === positionId,
|
||||||
|
'text-red': props.row.isCondition === true,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ async function fetchDataTable(id: string, level: number = 0) {
|
||||||
const newUse = positionUse.value.filter(
|
const newUse = positionUse.value.filter(
|
||||||
(e) => e !== props.dataRow?.posmasterId
|
(e) => e !== props.dataRow?.posmasterId
|
||||||
);
|
);
|
||||||
|
|
||||||
positionNo.value = posMain.filter((e: any) => !newUse.includes(e.id));
|
positionNo.value = posMain.filter((e: any) => !newUse.includes(e.id));
|
||||||
} else {
|
} else {
|
||||||
positionNo.value = posMain.filter(
|
positionNo.value = posMain.filter(
|
||||||
|
|
@ -266,6 +267,7 @@ function clearData() {
|
||||||
posType.value = null;
|
posType.value = null;
|
||||||
posLevel.value = "";
|
posLevel.value = "";
|
||||||
isPosition.value = "exam";
|
isPosition.value = "exam";
|
||||||
|
filterTree.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** callback function เมื่อมีการเปิด popup*/
|
/** callback function เมื่อมีการเปิด popup*/
|
||||||
|
|
@ -403,7 +405,7 @@ onMounted(() => {
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:nodes="lazy"
|
:nodes="lazy"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="orgTreeName"
|
label-key="labelName"
|
||||||
:filter="filterTree"
|
:filter="filterTree"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ interface DataPositionNo {
|
||||||
positionIsSelected: string | null;
|
positionIsSelected: string | null;
|
||||||
isSit: boolean;
|
isSit: boolean;
|
||||||
positions: Positions[];
|
positions: Positions[];
|
||||||
|
isCondition: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Positions {
|
interface Positions {
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ interface PositionMaim {
|
||||||
positions: Positions[];
|
positions: Positions[];
|
||||||
node: number;
|
node: number;
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
|
isCondition: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PositionNo {
|
interface PositionNo {
|
||||||
|
|
@ -114,8 +115,16 @@ interface FormPosLevel {
|
||||||
interface FormPosType {
|
interface FormPosType {
|
||||||
id: string;
|
id: string;
|
||||||
posTypeName: string;
|
posTypeName: string;
|
||||||
posTypeRank: number|null;
|
posTypeRank: number | null;
|
||||||
posLevels: FormPosLevel[];
|
posLevels: FormPosLevel[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { DataList, PositionMaim, PositionNo, Positions, TreeMain,FormPosType ,FormPosLevel};
|
export type {
|
||||||
|
DataList,
|
||||||
|
PositionMaim,
|
||||||
|
PositionNo,
|
||||||
|
Positions,
|
||||||
|
TreeMain,
|
||||||
|
FormPosType,
|
||||||
|
FormPosLevel,
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,14 @@ export const useSelectOrgStore = defineStore("selectorg", () => {
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
positionIsSelected: e.positionIsSelected ? e.fullNameCurrentHolder : "-",
|
positionIsSelected: e.fullNameCurrentHolder
|
||||||
|
? e.fullNameCurrentHolder
|
||||||
|
: "-",
|
||||||
isSit: e.isSit,
|
isSit: e.isSit,
|
||||||
positions: e.positions,
|
positions: e.positions,
|
||||||
node: e.node,
|
node: e.node,
|
||||||
nodeId: e.nodeId,
|
nodeId: e.nodeId,
|
||||||
|
isCondition: e.isCondition,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return listPosNo;
|
return listPosNo;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue