ลบ log
This commit is contained in:
parent
e4188b7ed3
commit
7adf787d49
14 changed files with 52 additions and 110 deletions
|
|
@ -161,11 +161,6 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
defualt: false,
|
||||
},
|
||||
// optionsHistory: Array,
|
||||
// updateHistory: {
|
||||
// type: Function,
|
||||
// default: () => console.log("not function"),
|
||||
// },
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
|
|
|
|||
|
|
@ -216,7 +216,6 @@ const uploadData = async () => {
|
|||
const formData = new FormData();
|
||||
formData.append("avatar", newFile);
|
||||
formData.append("moss", "newFile");
|
||||
console.log(formData);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profilePaperId(profileId.value), formData)
|
||||
|
|
|
|||
|
|
@ -332,7 +332,6 @@ const fetchData = async () => {
|
|||
.get(config.API.profileAvatarId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
fullname.value = data.fullname;
|
||||
imageUrl.value = data.avatar;
|
||||
position.value = data.position;
|
||||
|
|
@ -363,7 +362,6 @@ const fetchAvatarHistory = async () => {
|
|||
.get(config.API.profileAvatarHistoryId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
images.value = [];
|
||||
data.map((e: any) => {
|
||||
images.value.push({
|
||||
|
|
|
|||
|
|
@ -723,7 +723,6 @@ const fetchData = async () => {
|
|||
.get(config.API.profileLeaveId(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
data.map((e: ResponseObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
|
|
@ -909,7 +908,6 @@ const clickAddLeave = async () => {
|
|||
numUsedLeave.value = 0;
|
||||
await clickTotal();
|
||||
if (rowsTotal.value.length > 0) {
|
||||
// console.log(rowsTotal.value);
|
||||
let data: DataOptionLeave[] = [];
|
||||
rowsTotal.value.map((e: ResponseTotalObject) => {
|
||||
data.push({
|
||||
|
|
@ -1131,7 +1129,6 @@ const selectData = async (props: DataProps) => {
|
|||
numUsedLeave.value = props.row.sumLeave;
|
||||
await clickTotal();
|
||||
if (rowsTotal.value.length > 0) {
|
||||
// console.log(rowsTotal.value);
|
||||
let data: DataOptionLeave[] = [];
|
||||
rowsTotal.value.map((e: ResponseTotalObject) => {
|
||||
data.push({
|
||||
|
|
|
|||
|
|
@ -1479,7 +1479,6 @@ const fetchData = async () => {
|
|||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObjectEmployee) => {
|
||||
rows.value.push({
|
||||
|
|
@ -1600,7 +1599,6 @@ const checkRowPage = () => {
|
|||
editRow.value = false;
|
||||
next.value = true;
|
||||
previous.value = true;
|
||||
// console.log(rowIndex.value);
|
||||
if (rowIndex.value + 1 >= rows.value.length) {
|
||||
next.value = false;
|
||||
}
|
||||
|
|
@ -1834,7 +1832,6 @@ const clickClose = async () => {
|
|||
* @param props ค่า props ใน row ที่เลือก
|
||||
*/
|
||||
const selectData = async (props: DataPropsEmployee) => {
|
||||
// console.log(props.row);
|
||||
modalEdit.value = true;
|
||||
modal.value = true;
|
||||
edit.value = false;
|
||||
|
|
@ -1945,7 +1942,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
|||
.get(config.API.profileSalaryHisId(row.id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log("clickHistory", data);
|
||||
rowsHistory.value = [];
|
||||
data.map((e: ResponseObjectEmployee) => {
|
||||
rowsHistory.value.push({
|
||||
|
|
|
|||
|
|
@ -1509,7 +1509,6 @@ const fetchData = async () => {
|
|||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObjectEmployee) => {
|
||||
rows.value.push({
|
||||
|
|
@ -1630,7 +1629,6 @@ const checkRowPage = () => {
|
|||
editRow.value = false;
|
||||
next.value = true;
|
||||
previous.value = true;
|
||||
// console.log(rowIndex.value);
|
||||
if (rowIndex.value + 1 >= rows.value.length) {
|
||||
next.value = false;
|
||||
}
|
||||
|
|
@ -1864,7 +1862,6 @@ const clickClose = async () => {
|
|||
* @param props ค่า props ใน row ที่เลือก
|
||||
*/
|
||||
const selectData = async (props: DataPropsEmployee) => {
|
||||
// console.log(props.row);
|
||||
modalEdit.value = true;
|
||||
modal.value = true;
|
||||
edit.value = false;
|
||||
|
|
@ -1975,7 +1972,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
|||
.get(config.API.profileSalaryHisId(row.id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log("clickHistory", data);
|
||||
rowsHistory.value = [];
|
||||
data.map((e: ResponseObjectEmployee) => {
|
||||
rowsHistory.value.push({
|
||||
|
|
|
|||
|
|
@ -954,8 +954,6 @@ const fetchPosition = async () => {
|
|||
.get(config.API.position)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data.positionPaths);
|
||||
|
||||
let optionpositionpaths: DataOption[] = [];
|
||||
data.positionPaths.map((r: any) => {
|
||||
optionpositionpaths.push({
|
||||
|
|
@ -1394,7 +1392,6 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
let data = res.data.result;
|
||||
rowsHistory.value = [];
|
||||
data.map((e: RequestItemsObject, index: number) => {
|
||||
console.log(index);
|
||||
if (index != 0) {
|
||||
rowsHistory.value.push({
|
||||
id: e.id,
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ const ddNoResultMsg = defineAsyncComponent(
|
|||
); //แสดงข้อความเมื่อ Dropdown Filter ไม่เจอข้อมูล
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const $q = useQuasar(); // show dialog
|
||||
const emit = defineEmits(["update:positions", "update:formprops"]);
|
||||
const props = defineProps({
|
||||
|
|
@ -405,8 +405,6 @@ watch(myForm, (form: QForm | null, prevForm: QForm | null) => {
|
|||
if (!props.isAddNew) {
|
||||
positions.value.push(JSON.parse(JSON.stringify(positionSet.value)));
|
||||
if (!props.editObj != null && !props.editObj != undefined) {
|
||||
// console.log("position.value", position.value);
|
||||
// console.log("props.editObj", props.editObj);
|
||||
positions.value[0].positionMasterId = props.editObj?.positionMasterId;
|
||||
positions.value[0].positionUserNote = props.editObj?.positionUserNote;
|
||||
positions.value[0].isActive = props.editObj?.isActive;
|
||||
|
|
@ -442,7 +440,6 @@ const fetchPositionMaster = async () => {
|
|||
// .get(config.API.getPostionMasterDraft(false))
|
||||
.get(config.API.getPostionMaster(false))
|
||||
.then((res) => {
|
||||
// console.log("psMaster:", res.data.result);
|
||||
res.data.result.map((e: any) => {
|
||||
positionFilter.value.push({
|
||||
id: e.id,
|
||||
|
|
@ -475,7 +472,7 @@ const fetchPositionMaster = async () => {
|
|||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -503,7 +500,6 @@ const filterFn = (val: string, update: any) => {
|
|||
(v: any) => v.positionPath != null && v.positionPath.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
// console.log(positions.value);
|
||||
};
|
||||
|
||||
/**Add new positionSet item into positions
|
||||
|
|
@ -511,7 +507,6 @@ const filterFn = (val: string, update: any) => {
|
|||
*ข้อมูลไม่ครบแสดง Alert เตือนให้รู้เฉยๆ แล้วไม่ให้เพิ่ม
|
||||
*/
|
||||
const addPositionItem = () => {
|
||||
// console.log(positions.value);
|
||||
myForm.value!.validate().then((result) => {
|
||||
if (result) {
|
||||
positions.value.push(JSON.parse(JSON.stringify(positionSet.value)));
|
||||
|
|
@ -539,15 +534,15 @@ const deletePositionItem = (val: object) => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(() => {
|
||||
// console.log(">>>> OK");
|
||||
|
||||
positions.value = positions.value.filter((x: object) => x !== val); //คำสั่งลบ
|
||||
// console.log(positions.value);
|
||||
|
||||
})
|
||||
.onCancel(() => {
|
||||
// console.log(">>>> Cancel");
|
||||
|
||||
})
|
||||
.onDismiss(() => {
|
||||
// console.log("I am triggered on both OK and Cancel");
|
||||
|
||||
});
|
||||
} else {
|
||||
positions.value = positions.value.filter((x: object) => x !== val);
|
||||
|
|
@ -560,11 +555,9 @@ const deletePositionItem = (val: object) => {
|
|||
* @param items Array of position
|
||||
*/
|
||||
const isEmptyPosition = (items: any[]) => {
|
||||
console.log("items", items);
|
||||
const isEmpty = items.map((f: any) => !f.positionMasterId);
|
||||
// ถ้าว่างเป็น true
|
||||
// ถ้ามี data false
|
||||
console.log("isEmpty", isEmpty[0]);
|
||||
return isEmpty[0];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ const props = defineProps({
|
|||
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const myForm = ref<QForm | null>(null);
|
||||
|
|
@ -415,7 +415,7 @@ const fetchOrganizationOri = async () => {
|
|||
organizationOriFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -430,7 +430,6 @@ const fetchOrganizationAgencyCode = async () => {
|
|||
.get(config.API.organizationCode)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let option: GovermentOption[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
|
|
@ -444,7 +443,7 @@ const fetchOrganizationAgencyCode = async () => {
|
|||
organizationAgencyCodeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -459,7 +458,6 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
.get(config.API.organizationShortName)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let option: GovermentOption[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
|
|
@ -473,7 +471,7 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
organizationGovernmentCodeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -488,7 +486,6 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
// .get(config.API.organizationShortName)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// // console.log(data);
|
||||
// let option: GovermentOption[] = [];
|
||||
// data.map((r: any) => {
|
||||
// option.push({
|
||||
|
|
@ -502,7 +499,6 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
// organizationShortNameFilter.value = option;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// console.log(e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
|
|
@ -528,7 +524,7 @@ const fetchOrganizationAgency = async () => {
|
|||
organizationAgencyFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -554,7 +550,7 @@ const fetchOrganizationGovernmentAgency = async () => {
|
|||
organizationGovernmentAgencyFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -577,7 +573,7 @@ const fetchOrganizationType = async () => {
|
|||
organizationTypeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -600,7 +596,7 @@ const fetchOrganizationLevel = async () => {
|
|||
organizationLevelFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -623,7 +619,7 @@ const fetchOrganizationTelInternal = async () => {
|
|||
organizationTelInternalFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -646,7 +642,7 @@ const fetchOrganizationTelExternal = async () => {
|
|||
organizationTelExternalFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -669,7 +665,7 @@ const fetchOrganizationFax = async () => {
|
|||
organizationFaxFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -692,18 +688,12 @@ const deleteOrgItem = (val: OrganizaOption) => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(() => {
|
||||
// console.log(">>>> OK");
|
||||
organizations.value = organizations.value.filter(
|
||||
(x: object) => x !== val
|
||||
); //คำสั่งลบ
|
||||
// console.log(positions.value);
|
||||
})
|
||||
.onCancel(() => {
|
||||
// console.log(">>>> Cancel");
|
||||
})
|
||||
.onDismiss(() => {
|
||||
// console.log("I am triggered on both OK and Cancel");
|
||||
});
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
} else {
|
||||
organizations.value = organizations.value.filter((x: object) => x !== val);
|
||||
}
|
||||
|
|
@ -738,7 +728,6 @@ const isEmptyOrganization = (items: OrganizaOption[]) => {
|
|||
*/
|
||||
const addOrganizationItem = async () => {
|
||||
await myForm.value!.validate().then(async (result: boolean) => {
|
||||
// console.log(result);
|
||||
if (result) {
|
||||
// organizations.value.push(JSON.parse(JSON.stringify(organizationSet)));
|
||||
organizations.value.push({
|
||||
|
|
@ -767,7 +756,6 @@ const addOrganizationItem = async () => {
|
|||
isActive: true,
|
||||
});
|
||||
emit("update:organizprops", organizations.value);
|
||||
// console.log(organizations);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -791,7 +779,7 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
|||
// organizationAgencyCodeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -818,7 +806,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
|||
item.organizationGovernmentCodeOptionFilter = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ import type { EnumStringMember } from "@babel/types";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
organizprops: Object as PropType<OrganizaOption>,
|
||||
|
|
@ -411,9 +411,7 @@ onMounted(async () => {
|
|||
await fetchOrganizationTelExternal();
|
||||
await fetchOrganizationTelInternal();
|
||||
await fetchOrganizationStatus();
|
||||
// console.log("Edit:organization.value", organization.value);
|
||||
console.log("props.orgId", props.org);
|
||||
console.log("props.orgId.organizationId", props.org.organizationId);
|
||||
|
||||
await fillOrgEdit(); // ต้องอยู่ตรงนี้ ไม่งั้น input shortName & shortCode ไม่มา
|
||||
});
|
||||
|
||||
|
|
@ -434,7 +432,7 @@ const fillOrgEdit = async () => {
|
|||
.get(config.API.getOrgDraft(props.org.organizationId))
|
||||
.then((res) => {
|
||||
//ใส่ข้อมูลลงใน objOrg ที่ได้จาก OrganizationDialogAddEdit.vue
|
||||
console.log("ข้อมูลเดิม", res.data.result);
|
||||
|
||||
organization.value.organizationOrganizationId =
|
||||
res.data.result.organizationOrganizationId;
|
||||
organization.value.organizationShortNameId =
|
||||
|
|
@ -498,12 +496,11 @@ const fillOrgEdit = async () => {
|
|||
emit("update:organizprops", organization.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
console.log("success");
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -523,7 +520,7 @@ const fetchOrganizationOri = async () => {
|
|||
organizationOriFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -538,7 +535,7 @@ const fetchOrganizationAgencyCode = async () => {
|
|||
.get(config.API.organizationCode)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
||||
let option: GovermentOption[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
|
|
@ -552,7 +549,7 @@ const fetchOrganizationAgencyCode = async () => {
|
|||
organizationAgencyCodeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -567,7 +564,6 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
.get(config.API.organizationShortName)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let option: GovermentOption[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
|
|
@ -584,7 +580,7 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
emit("update:organizprops", organization.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -599,7 +595,6 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
// .get(config.API.organizationShortName)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// // console.log(data);
|
||||
// let option: GovermentOption[] = [];
|
||||
// data.map((r: any) => {
|
||||
// option.push({
|
||||
|
|
@ -613,7 +608,7 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
// organizationShortNameFilter.value = option;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// console.log(e);
|
||||
// messageError($q,e)
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
|
|
@ -640,7 +635,7 @@ const fetchOrganizationAgency = async () => {
|
|||
organizationAgencyFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -657,7 +652,7 @@ const fetchOrganizationGovernmentAgency = async () => {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
// console.log(data);
|
||||
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
id: r.organizationId.toString(),
|
||||
|
|
@ -668,7 +663,7 @@ const fetchOrganizationGovernmentAgency = async () => {
|
|||
organizationGovernmentAgencyFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -691,7 +686,7 @@ const fetchOrganizationType = async () => {
|
|||
organizationTypeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -715,7 +710,7 @@ const fetchOrganizationStatus = async () => {
|
|||
organizationStatusFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -739,7 +734,7 @@ const fetchOrganizationLevel = async () => {
|
|||
organizationLevelFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -762,7 +757,7 @@ const fetchOrganizationTelInternal = async () => {
|
|||
organizationTelInternalFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -785,7 +780,7 @@ const fetchOrganizationTelExternal = async () => {
|
|||
organizationTelExternalFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -808,7 +803,7 @@ const fetchOrganizationFax = async () => {
|
|||
organizationFaxFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -834,7 +829,7 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
|||
// organizationAgencyCodeFilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -861,7 +856,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
|||
item.organizationGovernmentCodeOptionFilter = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -11,7 +12,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import chartData from "@/assets/orgChartData";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const $q = useQuasar(); // show dialog
|
||||
|
||||
const dataSource = ref(chartData);
|
||||
// const dataSource = ref() // ข้อมูล Chart
|
||||
|
|
@ -45,7 +47,7 @@ const fetchTreeRoot = async () => {
|
|||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -65,7 +67,7 @@ const fetchOrgChart = async () => {
|
|||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ const fetchOrganizationAgency = async () => {
|
|||
govermentOPfilter.value = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -248,6 +248,5 @@ const fetchOrganizationAgency = async () => {
|
|||
onMounted(async () => {
|
||||
hideLoader();
|
||||
await fetchOrganizationAgency();
|
||||
console.log(govermentOP.value);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { defineAsyncComponent } from "@vue/runtime-core";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -10,7 +11,8 @@ import "structure-chart/structure-chart.css";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const $q = useQuasar(); // show dialog
|
||||
|
||||
// import chartData from '@/assets/structChartData'
|
||||
// const dataSource = ref(chartData)
|
||||
|
|
@ -46,7 +48,7 @@ const fetchTreeRoot = async () => {
|
|||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -70,7 +72,7 @@ const fetchStructChart = async () => {
|
|||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -969,7 +969,6 @@ watch(selectedFile, async (value, oldValue) => {
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
console.log("onMounted");
|
||||
await fetchTreeRoot(true); //fetch Root Edit Tree level 1
|
||||
expandedNodeView.value = [`1`];
|
||||
|
||||
|
|
@ -988,7 +987,6 @@ const loadTreeData = async () => {
|
|||
"https://s3cluster.frappet.com/bma-public-test/organization/strueture/61a11705-8346-4336-8289-49f72ed9463f-%E0%B8%AA%E0%B8%B3%E0%B8%99%E0%B8%B1%E0%B8%81%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%93%E0%B8%B0%E0%B8%81%E0%B8%A3%E0%B8%A3%E0%B8%A1%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B9%80%E0%B8%97%E0%B8%9E%E0%B8%A1%E0%B8%AB%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%A3.json"
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res.data.result);
|
||||
dataTree.value = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -1007,7 +1005,6 @@ const loadViewTree = async () => {
|
|||
};
|
||||
|
||||
const loadPublishScreen = async () => {
|
||||
console.log("onMounted");
|
||||
await fetchPublishFile();
|
||||
expandedNodeView.value = [`1`];
|
||||
setTimeout(async () => {
|
||||
|
|
@ -1041,12 +1038,9 @@ const loadFileServer = async (node: any) => {
|
|||
`${config.s3ClusterUrl}${node.organizationId}-${node.organizationName}.json`
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
node.children = res.data;
|
||||
})
|
||||
.catch((e) => {
|
||||
// console.log(e);
|
||||
// console.log(e.response);
|
||||
manageApiErrorMsg(e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -1061,13 +1055,9 @@ const isTreeHasDraft = async () => {
|
|||
await http
|
||||
.get(config.API.isOrgPohasDraft)
|
||||
.then((res) => {
|
||||
// console.log("isOrgPohasDraft:", res.data.result);
|
||||
orgPoHasDraft = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log("====isOrgPohasDraft====");
|
||||
console.log(e);
|
||||
console.log(e.response);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -1077,13 +1067,9 @@ const isTreeHasDraft = async () => {
|
|||
await http
|
||||
.get(config.API.isOrghasDraft)
|
||||
.then((res) => {
|
||||
// console.log("isOrghasDraft:", res.data.result);
|
||||
orgHasDraft = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log("====isOrghasDraft====");
|
||||
console.log(e);
|
||||
console.log(e.response);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -1101,7 +1087,6 @@ const isTreeHasDraft = async () => {
|
|||
* @param isDraft แสดงข้อมูลดราฟหรือ Production
|
||||
*/
|
||||
const fetchTreeRoot = async (isDraft: boolean) => {
|
||||
// console.log(isDraft);
|
||||
showLoader();
|
||||
console.log("Call API14 GetTreeRoot");
|
||||
isShowEditTree.value = isDraft; // to show same tree that we fetch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue