Files
SaaS-lib/hx-ai-intelligent/src/view/equipmentManage/group/index.vue

59 lines
1.6 KiB
Vue
Raw Normal View History

2024-05-29 10:18:12 +08:00
<template>
2024-05-29 16:29:22 +08:00
<editDrawer ref="editDrawerRef" />
<editGroup ref="editGroupRef" />
<editFormula ref="editFormulaRef" />
2024-06-27 15:21:14 +08:00
<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>
2024-05-29 10:18:12 +08:00
</template>
<script lang="ts" setup>
2024-05-29 16:29:22 +08:00
import { createVNode, onMounted, ref } from 'vue';
2024-06-27 15:21:14 +08:00
import { tableConfig, treeConfig, tableConfigCal } from './config';
2024-05-29 16:29:22 +08:00
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();
2024-06-27 15:21:14 +08:00
const defaultType = ref(true);
2024-05-29 16:29:22 +08:00
const config = tableConfig(editDrawerRef, editGroupRef, editFormulaRef);
2024-06-27 15:21:14 +08:00
const configCal = tableConfigCal(editDrawerRef, editGroupRef, editFormulaRef);
const handleSelect = () => {
defaultType.value = !defaultType.value;
};
2024-05-29 10:18:12 +08:00
</script>
2024-06-27 15:21:14 +08:00
<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>