Refactoring code module 12_organization
This commit is contained in:
parent
606064c77c
commit
33f23e4fc5
1 changed files with 6 additions and 6 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue