โครงสร้างอัตรากำลัง => แก้ไขการ fetch โครางสร้าง ประวัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-05 10:31:05 +07:00
parent cd26f1a08a
commit b331a79277
3 changed files with 100 additions and 5 deletions

View file

@ -9,6 +9,7 @@ import { StructChart } from "structure-chart";
import "structure-chart/structure-chart.css";
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational";
import { log } from "console";
const mixin = useCounterMixin();
const store = useOrganizational();
@ -31,13 +32,12 @@ const savePDF = () => {
const loader = ref<boolean>(false); // Loader
onMounted(async () => {
// await fetchTreeRoot();
const id =
store.typeOrganizational === "current"
? store.activeId
: store.typeOrganizational === "draft"
? store.draftId
: "";
: store.historyId;
id && (await fetchStructChart(id, "0"));
});