updated get tree by system
This commit is contained in:
parent
af56b950b1
commit
ffde0fe79c
27 changed files with 128 additions and 72 deletions
|
|
@ -23,6 +23,7 @@ import Header from "@/components/DialogHeader.vue";
|
|||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
|
|
@ -35,6 +36,7 @@ const {
|
|||
dialogMessageNotify,
|
||||
success,
|
||||
} = useCounterMixin();
|
||||
const route = useRoute();
|
||||
|
||||
/** props*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
|
@ -56,7 +58,7 @@ async function fetchTree() {
|
|||
showLoader();
|
||||
const id: string = store.activeId ? store.activeId?.toString() : "";
|
||||
await http
|
||||
.get(config.API.orgByid(id))
|
||||
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||
.then((res) => {
|
||||
nodeTree.value = res.data.result;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -20,11 +20,13 @@ import TreeTable from "@/modules/16_positionEmployee/components/TreeTable.vue";
|
|||
/** importStore*/
|
||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
/** use*/
|
||||
const store = usePositionEmp();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
const route = useRoute();
|
||||
|
||||
const nodeTree = ref<OrgTree[]>([]); // ข้อมูล Tree
|
||||
const nodeId = ref<string>(""); // id ของ Tree
|
||||
|
|
@ -56,7 +58,7 @@ function fetchDataTree(id: string) {
|
|||
isLoadTree.value = false;
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.orgByid(id.toString()))
|
||||
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
nodeTree.value = data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue