updated get tree by system

This commit is contained in:
Warunee Tamkoo 2024-08-20 10:39:17 +07:00
parent af56b950b1
commit ffde0fe79c
27 changed files with 128 additions and 72 deletions

View file

@ -17,6 +17,7 @@ import DialogPopupReason from "@/components/Dialogs/PopupReason.vue"; //หม
import { useCounterMixin } from "@/stores/mixin";
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
import { useroleUserDataStore } from "@/stores/roleUser";
import { useRoute } from "vue-router";
/**use */
const $q = useQuasar(); // noti quasar
@ -24,6 +25,7 @@ const roleDataStore = useroleUserDataStore();
const DataStore = useInsigniaDataStore();
const mixin = useCounterMixin();
const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin;
const route = useRoute();
/**
* วแปร
@ -137,7 +139,7 @@ function fetchActiveId() {
function fetchListOrg(id: string) {
showLoader();
http
.get(config.API.orgByid(id))
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
.then(async (res) => {
const data = await res.data.result.map((item: any) => ({
id: item.orgTreeId,

View file

@ -14,6 +14,7 @@ import DialogHeader from "../DialogHeader.vue";
/** import Stores */
import { useCounterMixin } from "@/stores/mixin";
import { useRoute } from "vue-router";
/** useStore*/
const mixin = useCounterMixin();
@ -27,6 +28,7 @@ const {
dateToISO,
} = mixin;
const route = useRoute();
const $q = useQuasar();
const myForm = ref<any>();
@ -126,7 +128,7 @@ function fetchOrgList() {
const data = res.data.result;
http
.get(config.API.orgByid(data.activeId))
.get(config.API.orgByIdSystem(data.activeId, route.meta.Key as string))
.then(async (res) => {
const data = await res.data.result.map((item: any) => ({
id: item.orgTreeId,

View file

@ -144,7 +144,7 @@ async function fetchOrgList() {
const data = res.data.result;
http
.get(config.API.orgByid(data.activeId))
.get(config.API.orgByIdSystem(data.activeId, route.meta.Key as string))
.then(async (res) => {
const data = await res.data.result.map((item: any) => ({
id: item.orgTreeId,
@ -468,7 +468,6 @@ onMounted(async () => {
<q-td key="remain" :props="props">
{{ props.row.remain }}
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -13,9 +13,11 @@ import DialogHeader from "@/components/DialogHeader.vue";
/** impotrStores */
import { useCounterMixin } from "@/stores/mixin";
import { useBrrowDataStore } from "@/modules/07_insignia/storeBrrow";
import { useRoute } from "vue-router";
const $q = useQuasar();
const myForm = ref<QForm>();
const route = useRoute();
const DataStore = useBrrowDataStore();
const mixin = useCounterMixin();
@ -133,7 +135,7 @@ async function fetchOrgList() {
const data = res.data.result;
http
.get(config.API.orgByid(data.activeId))
.get(config.API.orgByIdSystem(data.activeId, route.meta.Key as string))
.then(async (res) => {
const data = await res.data.result.map((item: any) => ({
id: item.orgTreeId,