【招生用户端】 优化# 子账号管理:账号名额
parent
935d73277b
commit
ebbe48d31c
|
@ -116,7 +116,6 @@ const fetchPostionData = async () => {
|
||||||
positionOptions.value = result.lists
|
positionOptions.value = result.lists
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
fetchPostionData()
|
|
||||||
const fetchOrganizationData = async () => {
|
const fetchOrganizationData = async () => {
|
||||||
try {
|
try {
|
||||||
const result = await organzationLists()
|
const result = await organzationLists()
|
||||||
|
@ -136,6 +135,7 @@ const setDsiabled = (nodes: any[]) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const openDialog = (params: IParams) => {
|
const openDialog = (params: IParams) => {
|
||||||
|
fetchPostionData()
|
||||||
fetchOrganizationData()
|
fetchOrganizationData()
|
||||||
proDialogRef.value?.openDialog(params)
|
proDialogRef.value?.openDialog(params)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col h-full">
|
<div class="flex flex-col h-full">
|
||||||
<account-number />
|
<account-number :accoutnInfo="accoutnInfo" />
|
||||||
<div class="flex flex-1 bg-white overflow-x-auto">
|
<div class="flex flex-1 bg-white overflow-x-auto">
|
||||||
<organization @set-selected-node="setSelectedNode" :curSelectedNode="selectedNode" @fetch-table-list="fetchTableList" />
|
<organization @set-selected-node="setSelectedNode" :curSelectedNode="selectedNode" @fetch-table-list="fetchTableList" />
|
||||||
<account-list ref="accountListRef" :curOrganization="selectedNode" />
|
<account-list ref="accountListRef" :curOrganization="selectedNode" />
|
||||||
|
@ -9,10 +9,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import accountNumber from './modules/account-number.vue'
|
import accountNumber, { type IAccountInfo } from './modules/account-number.vue'
|
||||||
import organization from './modules/organization.vue'
|
import organization from './modules/organization.vue'
|
||||||
import accountList from './modules/account-list.vue'
|
import accountList from './modules/account-list.vue'
|
||||||
import type { Tree } from './components/organization/organization-tree.vue'
|
import type { Tree } from './components/organization/organization-tree.vue'
|
||||||
|
import { subAccountNumber } from '@/api/account_center/sub_account'
|
||||||
|
|
||||||
const selectedNode = ref()
|
const selectedNode = ref()
|
||||||
const setSelectedNode = (data: Tree) => {
|
const setSelectedNode = (data: Tree) => {
|
||||||
|
@ -30,5 +31,13 @@ const accountListRef = ref<InstanceType<typeof accountList>>()
|
||||||
const fetchTableList = () => {
|
const fetchTableList = () => {
|
||||||
accountListRef.value?.fetchTableList(selectedNode.value?.id)
|
accountListRef.value?.fetchTableList(selectedNode.value?.id)
|
||||||
}
|
}
|
||||||
|
const accoutnInfo = ref<IAccountInfo>()
|
||||||
|
const fetchSubAccountNumber = async () => {
|
||||||
|
try {
|
||||||
|
const result = await subAccountNumber()
|
||||||
|
accoutnInfo.value = result
|
||||||
|
} catch (error) {}
|
||||||
|
}
|
||||||
|
fetchSubAccountNumber()
|
||||||
</script>
|
</script>
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
@ -11,17 +11,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { subAccountNumber } from '@/api/account_center/sub_account'
|
import type { PropType } from 'vue'
|
||||||
|
|
||||||
const accoutnInfo = ref()
|
export interface IAccountInfo {
|
||||||
const parseUnuseNumber = computed(() => accoutnInfo.value?.quota - accoutnInfo.value?.quantity)
|
quota: number
|
||||||
|
quantity: number
|
||||||
const fetchSubAccountNumber = async () => {
|
|
||||||
try {
|
|
||||||
const result = await subAccountNumber()
|
|
||||||
accoutnInfo.value = result
|
|
||||||
} catch (error) {}
|
|
||||||
}
|
}
|
||||||
fetchSubAccountNumber()
|
const props = defineProps({
|
||||||
|
accoutnInfo: {
|
||||||
|
type: Object as PropType<IAccountInfo>,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const parseUnuseNumber = computed(() => props.accoutnInfo.quota - props.accoutnInfo.quantity)
|
||||||
</script>
|
</script>
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
Loading…
Reference in New Issue