แก้บรรจุแต่งตั้ง รายชื่อที่สอบผ่าน
This commit is contained in:
parent
627696ea65
commit
e6dcc39765
5 changed files with 87 additions and 102 deletions
|
|
@ -50,10 +50,6 @@ const props = defineProps({
|
|||
require: true,
|
||||
},
|
||||
fetchStatCard: { type: Function, require: true },
|
||||
typeCommand: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
});
|
||||
|
||||
/** Tree*/
|
||||
|
|
@ -116,32 +112,34 @@ function updateSelected(data: TreeMain) {
|
|||
*/
|
||||
const isAll = ref<boolean>(false);
|
||||
const isBlank = ref<boolean>(true);
|
||||
const isPosition = ref<boolean>(true);
|
||||
const isPositionOld = ref<boolean>(false);
|
||||
const isPosition = ref<string>("exam");
|
||||
// const isPositionOld = ref<boolean>(false);
|
||||
async function fetchDataTable(id: string, level: number = 0) {
|
||||
showLoader();
|
||||
const body = {
|
||||
node: level,
|
||||
nodeId: id,
|
||||
position: props?.dataRow?.positionCandidate,
|
||||
typeCommand: props.typeCommand,
|
||||
posLevel: props.dataRow?.posLevelCandidateId
|
||||
? props.dataRow?.posLevelCandidateId
|
||||
: "",
|
||||
posType: props.dataRow?.posTypeCandidateId
|
||||
? props.dataRow?.posTypeCandidateId
|
||||
: "",
|
||||
position:
|
||||
isPosition.value === "exam" ? props?.dataRow?.positionCandidate : null,
|
||||
posLevel:
|
||||
isPosition.value === "exam"
|
||||
? props.dataRow?.posLevelCandidateId
|
||||
: posLevel.value
|
||||
? posLevel.value
|
||||
: null,
|
||||
|
||||
posType:
|
||||
isPosition.value === "exam"
|
||||
? props.dataRow?.posTypeCandidateId
|
||||
: posType.value
|
||||
? posType.value.id
|
||||
: null,
|
||||
isAll: isAll.value,
|
||||
isBlank: isBlank.value,
|
||||
isPosition: isPosition.value,
|
||||
isPositionOld: isPositionOld.value,
|
||||
|
||||
positionType: posType.value ? posType.value.posTypeName : null,
|
||||
positionLevel: posLevel.value ? posLevel.value : null,
|
||||
};
|
||||
|
||||
await http
|
||||
.post(config.API.orgPosPlacement, body)
|
||||
.post(config.API.orgPosPlacementAll, body)
|
||||
.then((res) => {
|
||||
const dataMain: PositionMaim[] = [];
|
||||
posMasterMain.value = res.data.result.data;
|
||||
|
|
@ -236,7 +234,6 @@ async function onClickSubmit() {
|
|||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||
reportingDate: datePos.value,
|
||||
posmasterId: dataPosMaster.id,
|
||||
typeCommand: props.typeCommand,
|
||||
};
|
||||
|
||||
await http
|
||||
|
|
@ -268,7 +265,7 @@ function clearData() {
|
|||
expanded.value = [];
|
||||
posType.value = null;
|
||||
posLevel.value = "";
|
||||
isPositionOld.value = false;
|
||||
isPosition.value = "exam";
|
||||
}
|
||||
|
||||
/** callback function เมื่อมีการเปิด popup*/
|
||||
|
|
@ -351,7 +348,7 @@ watch(
|
|||
);
|
||||
|
||||
watch(
|
||||
() => isPositionOld.value,
|
||||
() => isPosition.value === "select",
|
||||
(value, oldVal) => {
|
||||
if (value !== oldVal) {
|
||||
fetchDataTable(nodeId.value, nodeLevel.value);
|
||||
|
|
@ -463,7 +460,6 @@ onMounted(() => {
|
|||
v-model:is-all="isAll"
|
||||
v-model:is-blank="isBlank"
|
||||
v-model:is-position="isPosition"
|
||||
v-model:is-position-old="isPositionOld"
|
||||
v-model:pos-type="posType as FormPosType"
|
||||
v-model:pos-level="posLevel"
|
||||
v-model:option-pos-type="optionPosType"
|
||||
|
|
@ -472,6 +468,7 @@ onMounted(() => {
|
|||
:on-pos-type="onPosType"
|
||||
:node-id="nodeId"
|
||||
:node-level="nodeLevel"
|
||||
:bma-officer="props.dataRow?.bmaOfficer"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue