Merge branch 'develop' into devTee
This commit is contained in:
commit
8de8636e12
2 changed files with 33 additions and 28 deletions
|
|
@ -39,11 +39,7 @@ async function savePNG() {
|
|||
// }
|
||||
showLoadingSpinner();
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
// export แบบเต็มๆ
|
||||
scrollContainer.value && (await exportChartToPNG(scrollContainer.value));
|
||||
} finally {
|
||||
}
|
||||
scrollContainer.value && (await exportChartToPNG(scrollContainer.value));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
|
|
@ -61,11 +57,7 @@ async function savePDF() {
|
|||
|
||||
showLoadingSpinner();
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
// export แบบเต็มๆ
|
||||
scrollContainer.value && (await exportChartToPDF(scrollContainer.value));
|
||||
} finally {
|
||||
}
|
||||
scrollContainer.value && (await exportChartToPDF(scrollContainer.value));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ import { useOrganizational } from "@/modules/02_organization/store/organizationa
|
|||
import { useStructStore } from "@/modules/02_organization/store/chart";
|
||||
import avatar from "@/assets/avatar_user.jpg";
|
||||
import chartData from "@/assets/orgChartData";
|
||||
import {
|
||||
showLoadingSpinner,
|
||||
exportChartToPDF,
|
||||
exportChartToPNG,
|
||||
} from "@/plugins/exportChart";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const store = useOrganizational();
|
||||
|
|
@ -98,28 +103,36 @@ async function refreshChart(data: any) {
|
|||
|
||||
/** โหลด Chart รูป*/
|
||||
async function savePNG() {
|
||||
try {
|
||||
showLoader();
|
||||
await scrollToCenter();
|
||||
await chartRef.value.savePNG();
|
||||
} catch {
|
||||
messageError($q);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
// try {
|
||||
// showLoader();
|
||||
// await scrollToCenter();
|
||||
// await chartRef.value.savePNG();
|
||||
// } catch {
|
||||
// messageError($q);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
showLoadingSpinner();
|
||||
setTimeout(async () => {
|
||||
scrollContainer.value && (await exportChartToPNG(scrollContainer.value));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
/** โหลด Chart PDF*/
|
||||
async function savePDF() {
|
||||
try {
|
||||
showLoader();
|
||||
await scrollToCenter();
|
||||
await chartRef.value.savePDF();
|
||||
} catch {
|
||||
messageError($q);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
// try {
|
||||
// showLoader();
|
||||
// await scrollToCenter();
|
||||
// await chartRef.value.savePDF();
|
||||
// } catch {
|
||||
// messageError($q);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
showLoadingSpinner();
|
||||
setTimeout(async () => {
|
||||
scrollContainer.value && (await exportChartToPDF(scrollContainer.value));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue