API ดูประวัติโครงสร้าง

This commit is contained in:
setthawutttty 2024-01-31 17:27:12 +07:00
parent 80b40ead85
commit 0b4011437c
5 changed files with 106 additions and 70 deletions

View file

@ -11,7 +11,7 @@ import type { OrgTree } from "@/modules/02_organizationalNew/interface/response/
import DialogAgency from "@/modules/02_organizationalNew/components/DialogFormAgency.vue";
import DialogStructureDetail from "@/modules/02_organizationalNew/components/StructureDetail.vue";
import DialogSortAgency from "@/modules/02_organizationalNew/components/DialogSortAgency.vue";
import DialogHistory from "@/modules/02_organizationalNew/components/DialogHistory.vue";
/** importStore*/
import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational";
import { useCounterMixin } from "@/stores/mixin";
@ -81,7 +81,7 @@ const listAdd = ref<ListMenu[]>([
const nodeTEST = defineModel<OrgTree[]>("nodeTree", { default: [] });
const filter = ref<string>("");
const level = ref<number>(0);
const nodes = ref<Array<OrgTree>>([]);
const dataSort = ref<Array<any>>([]);
const lazy = ref(nodes);
@ -90,6 +90,8 @@ const notFound = ref<string>("ไม่พบข้อมูลที่ค้
const noData = ref<string>("ไม่มีข้อมูล");
const selected = ref("");
const orgLevel = ref<number>(0);
const type = ref<number>(0);
const orgId = ref<string>("");
const updateSelected = (target: any) => {
console.log("updateSelected===>", target);
@ -168,6 +170,7 @@ function deleteNode(treeNode: any, organizationId: any): boolean {
return false;
}
const modalHistory = ref<boolean>(false);
const modalSortAgency = ref<boolean>(false);
const dialogAgency = ref<boolean>(false);
const actionType = ref<string>("");
@ -254,6 +257,13 @@ async function onClickSort(id: string) {
}
}
}
function onClickHistory(level: number, id: string) {
type.value = level;
orgId.value = id;
modalHistory.value = true;
}
watch(
() => nodeTEST.value,
() => {
@ -370,6 +380,11 @@ onMounted(async () => {});
? onClickDel(prop.node.orgLevel, prop.node.orgTreeId)
: item.type === 'SORT'
? onClickSort(prop.node.orgRootId)
: item.type === 'HISTORY'
? onClickHistory(
prop.node.orgLevel,
prop.node.orgTreeId
)
: null
"
>
@ -498,6 +513,11 @@ onMounted(async () => {});
v-model:sort-agency="modalSortAgency"
v-model:data="dataSort"
/>
<DialogHistory
v-model:history="modalHistory"
v-model:type="type"
v-model:org-id="orgId"
/>
</template>
<style scoped></style>