ow
This commit is contained in:
1 parent
8285fb4090
commit
8a13dfb836
6 files changed
+740
-25
No files matched your search
@@ -95,7 +95,7 @@
|
||||
v-model:value="data.CurrentPerson.FamilyPerson.PersonId"
|
||||
@search="onModalCurrentPerson" />
|
||||
<a-button type="primary" :disabled="!hasData" :icon="h(ApartmentOutlined)"
|
||||
@click.prevent="">祖谱系图</a-button>
|
||||
@click.prevent="onShowAncestryChart">祖谱系图</a-button>
|
||||
</a-input-group>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -314,6 +314,7 @@
|
||||
</dragModal>
|
||||
<FamilyTreeChartModal v-model:open="chartVisible" :data="data" :loaded-nodes="loadedNodes" title="谱系图"
|
||||
@select-child="onChartSelectChild" />
|
||||
<AncestryTreeChartModal v-model:open="ancestryChartVisible" :tree-id="treeId" title="祖谱系图" />
|
||||
</a-spin>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -328,6 +329,7 @@ import dragModal from "@/components/basic/DragModal.vue"
|
||||
import FamilyTreeEnquiry from "./FamilyTreeEnquiry.vue";
|
||||
import FamilyPersonEnquiry from "./FamilyPersonEnquiry.vue";
|
||||
import FamilyTreeChartModal from "@/components/master/FamilyTreeChartModal.vue";
|
||||
import AncestryTreeChartModal from "@/components/master/AncestryTreeChartModal.vue";
|
||||
import { FamilyTreeData } from "@/data/auto/familyTreeData";
|
||||
import { FamilyTreeSpouseMapViewEntity } from "@/data/auto/familyTreeSpouseMapViewEntity";
|
||||
import { FamilyTreeChildrenMapViewEntity } from "@/data/auto/familyTreeChildrenMapViewEntity";
|
||||
@@ -359,6 +361,7 @@ const canCreate = ref<boolean>(false);
|
||||
|
||||
const showModalType = ref<number>(0);
|
||||
const chartVisible = ref<boolean>(false);
|
||||
const ancestryChartVisible = ref<boolean>(false);
|
||||
|
||||
const data = ref<FamilyTreeData>(new FamilyTreeData());
|
||||
const hasData = ref<boolean>(false);
|
||||
@@ -602,6 +605,11 @@ const onShowChart = (() => {
|
||||
chartVisible.value = true;
|
||||
})
|
||||
|
||||
const onShowAncestryChart = (() => {
|
||||
if (!hasData.value || !treeId.value) return;
|
||||
ancestryChartVisible.value = true;
|
||||
})
|
||||
|
||||
/** 谱系图中已加载的族员节点(personId -> { person, spouses, children }),不清空原 data,只追加 */
|
||||
const loadedNodes = ref<Record<string, any>>({});
|
||||
|
||||
|
||||
Reference in new issue
Block a user