no message
This commit is contained in:
parent
06d9b22205
commit
756daf8d68
6 changed files with 124 additions and 181 deletions
|
|
@ -33,6 +33,7 @@ const formData = reactive<any>({
|
|||
});
|
||||
|
||||
async function fetchDetailTree(id: string, type: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.orgLevelByid(type.toLocaleLowerCase(), id))
|
||||
.then((res) => {
|
||||
|
|
@ -40,8 +41,9 @@ async function fetchDetailTree(id: string, type: string) {
|
|||
formData.orgName = data[`org${type}Name`];
|
||||
formData.agencyName = data[`org${type}Name`];
|
||||
formData.orgType = data[`org${type}Name`];
|
||||
formData.orgLevel = data[`org${type}Rank`];
|
||||
formData.status = data[`org${type}Name`];
|
||||
formData.orgLevel = store.convertType(data[`org${type}Rank`]);
|
||||
formData.status =
|
||||
store.typeOrganizational === "current" ? "ปัจจุบัน" : "แบบร่าง";
|
||||
formData.orgPhoneEx = data[`org${type}PhoneEx`];
|
||||
formData.orgPhoneIn = data[`org${type}PhoneIn`];
|
||||
formData.orgFax = data[`org${type}Fax`];
|
||||
|
|
@ -61,10 +63,10 @@ function close() {
|
|||
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
async () => {
|
||||
if (modal.value == true) {
|
||||
const type = store.checkLevel(orgLevel.value);
|
||||
fetchDetailTree(treeId.value, type);
|
||||
const type = await store.checkLevel(orgLevel.value);
|
||||
await fetchDetailTree(treeId.value, type);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue