| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <div class="ele-body">
- <el-card shadow="never" v-loading="loading">
- <ele-split-layout
- width="266px"
- allow-collapse
- :right-style="{ overflow: 'hidden' }"
- >
- <div>
- <div class="ele-border-lighter sys-organization-list">
- <AssetTree
- @handleNodeClick="handleNodeClick"
- @setRootId="setRootId"
- id="15"
- ref="treeList"
- />
- <!-- 1738160749383847938 -->
- </div>
- </div>
- <template v-slot:content>
- <data-list
- v-if="current"
- :category-id="current.id"
- :root-id="rootId"
- />
- </template>
- </ele-split-layout>
- </el-card>
- </div>
- </template>
- <script>
- import AssetTree from '@/components/AssetTree';
- import DataList from './components/data-list.vue';
- export default {
- components: {
- AssetTree,
- DataList
- },
- data() {
- return {
- // 加载状态
- loading: false,
- // 表格选中数据
- selection: [],
- current: null,
- rootId: null
- };
- },
- computed: {},
- methods: {
- handleNodeClick(info) {
- this.current = info;
- },
- // 获取根节点id
- setRootId(id) {
- this.rootId = id;
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .sys-organization-list {
- height: calc(100vh - 264px);
- box-sizing: border-box;
- border-width: 1px;
- border-style: solid;
- overflow: auto;
- }
- .sys-organization-list :deep(.el-tree-node__content) {
- height: 40px;
- & > .el-tree-node__expand-icon {
- margin-left: 10px;
- }
- }
- </style>
|