Refactoring code module 12_organization

This commit is contained in:
STW_TTTY\stwtt 2024-09-10 15:50:23 +07:00
parent 606064c77c
commit 33f23e4fc5

View file

@ -1,19 +1,21 @@
<script setup lang="ts">
import { ref, computed, onMounted, watch } from "vue";
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { StructChart } from "structure-chart";
import "structure-chart/structure-chart.css";
import { useCounterMixin } from "@/stores/mixin";
import "structure-chart/structure-chart.css";
/** use*/
const $q = useQuasar();
const router = useRouter();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const router = useRouter();
const $q = useQuasar();
const chartRef = ref(); // chart
const theBreadcrumb = ref();
const rootOrgID = ref(); // org id root
@ -98,7 +100,6 @@ function savePDF() {
* @param data
*/
async function refreshChart(data: any, type: number) {
if (data.value === undefined) {
fetchStructChart(data, type.toString());
rootOrgID.value = data;
@ -112,7 +113,6 @@ async function fetchStructChart(
type: string,
status: boolean = false
) {
showLoader();
await http
.get(config.API.orgStructChart(id, type))