You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

10 months ago
<template>
10 months ago
<editDrawer ref="editDrawerRef" />
<editGroup ref="editGroupRef" />
<editFormula ref="editFormulaRef" />
<div class="groupContainer">
<div class="tree">
<ns-tree-api v-bind="treeConfig" @select="handleSelect" />
</div>
<ns-view-list-table v-show="defaultType" class="table" v-bind="config" />
<ns-view-list-table v-show="!defaultType" class="table" v-bind="configCal" />
</div>
10 months ago
</template>
<script lang="ts" setup>
10 months ago
import { createVNode, onMounted, ref } from 'vue';
import { tableConfig, treeConfig, tableConfigCal } from './config';
10 months ago
import { useParams } from '/nerv-lib/use';
import editDrawer from './edit.vue';
import editGroup from './editGroup.vue';
import editFormula from './editFormula.vue';
const { getParams } = useParams();
const editDrawerRef = ref();
const editGroupRef = ref();
const editFormulaRef = ref();
const defaultType = ref(true);
10 months ago
const config = tableConfig(editDrawerRef, editGroupRef, editFormulaRef);
const configCal = tableConfigCal(editDrawerRef, editGroupRef, editFormulaRef);
const handleSelect = () => {
defaultType.value = !defaultType.value;
};
10 months ago
</script>
<style lang="less" scoped>
.groupContainer {
height: 100%;
overflow-y: auto;
background-color: @ns-content-bg;
display: flex;
// gap: @ns-gap;
.tree,
.table {
background-color: @white;
border-radius: @ns-border-radius;
overflow-y: auto;
}
.tree {
margin-right: @ns-gap;
:deep(.ant-spin-nested-loading) {
width: 300px;
background-color: @white;
}
}
.table {
flex: 1;
min-width: 0;
}
}
</style>