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