fix bug
This commit is contained in:
parent
6399e23d28
commit
aafef60aab
3 changed files with 15 additions and 9 deletions
|
|
@ -89,6 +89,8 @@ function getRound() {
|
||||||
store.roundYear = roundFilter.value.year;
|
store.roundYear = roundFilter.value.year;
|
||||||
store.isClosedRound = roundFilter.value.isClose;
|
store.isClosedRound = roundFilter.value.isClose;
|
||||||
|
|
||||||
|
console.log(roundFilter.value);
|
||||||
|
|
||||||
await getSnap(roundFilter.value.shortCode);
|
await getSnap(roundFilter.value.shortCode);
|
||||||
await getAgency(roundFilter.value.revisionId);
|
await getAgency(roundFilter.value.revisionId);
|
||||||
await getAgencyPosition(roundFilter.value.revisionId);
|
await getAgencyPosition(roundFilter.value.revisionId);
|
||||||
|
|
@ -150,8 +152,8 @@ function getSnap(code: string) {
|
||||||
* @param id revisionId
|
* @param id revisionId
|
||||||
*/
|
*/
|
||||||
async function getAgency(id: string) {
|
async function getAgency(id: string) {
|
||||||
id &&
|
if (id) {
|
||||||
(await http
|
await http
|
||||||
.get(config.API.activeOrganizationRootById(id))
|
.get(config.API.activeOrganizationRootById(id))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -170,7 +172,11 @@ async function getAgency(id: string) {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}));
|
});
|
||||||
|
} else {
|
||||||
|
agencyOptionsMain.value = [];
|
||||||
|
agencyFilter.value = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -120,15 +120,13 @@ function fetchTree(id: string) {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function เลือกหน่วยงาน
|
/** function เลือกหน่วยงาน
|
||||||
* @param data ข้อมูลทั้งหมดของ row
|
* @param data ข้อมูลทั้งหมดของ row
|
||||||
*/
|
*/
|
||||||
function updateSelected(data: DataTree) {
|
function updateSelected(data: DataTree) {
|
||||||
orgName.value = data.orgTreeName;
|
orgName.value = data.orgTreeName;
|
||||||
formData.node = data.orgLevel;
|
formData.node = data.orgLevel;
|
||||||
|
|
@ -240,8 +238,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-10 col-sm-10 col-md-10">
|
<div class="col-xs-10 col-sm-10 col-md-10"></div>
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,9 @@ function onSubmit() {
|
||||||
orgChild3Id: props.orgLevel === 3 ? props.treeId : null,
|
orgChild3Id: props.orgLevel === 3 ? props.treeId : null,
|
||||||
orgChild4Id: props.orgLevel === 4 ? props.treeId : null,
|
orgChild4Id: props.orgLevel === 4 ? props.treeId : null,
|
||||||
positions: positionsData,
|
positions: positionsData,
|
||||||
|
isDirector: false,
|
||||||
|
isOfficer: false,
|
||||||
|
|
||||||
// succession: succession.value,
|
// succession: succession.value,
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue