liuhj 2 年之前
父节点
当前提交
74ce20c7df
共有 2 个文件被更改,包括 84 次插入0 次删除
  1. 78 0
      src/components/child/Controltree.vue
  2. 6 0
      src/router/index.js

+ 78 - 0
src/components/child/Controltree.vue

@@ -0,0 +1,78 @@
+<template>
+    
+</template>
+
+
+
+<script>
+export default {
+    components: { Vue2OrgTree },
+    data() {
+        return {
+            treeData: {
+                id: 0,
+                label: "XXX科技有限公司",
+                children: [
+                {
+                    id: 2,
+                    label: "产品研发部",
+                    children: [
+                    {
+                        id: 5,
+                        label: "研发-前端"
+                    },
+                    {
+                        id: 6,
+                        label: "研发-后端"
+                    },
+                    {
+                        id: 9,
+                        label: "UI设计"
+                    },
+                    {
+                        id: 10,
+                        label: "产品经理"
+                    }
+                    ]
+                },
+                {
+                    id: 3,
+                    label: "销售部",
+                    children: [
+                    {
+                        id: 7,
+                        label: "销售一部"
+                    },
+                    {
+                        id: 8,
+                        label: "销售二部"
+                    }
+                    ]
+                },
+                {
+                    id: 4,
+                    label: "财务部"
+                },
+                {
+                    id: 9,
+                    label: "HR人事"
+                }
+                ]
+            }
+        }
+    },
+    created(){
+       
+    },
+    methods:{
+
+    }
+}
+</script>
+<style>
+    .controltree-box{
+        background-color: #fff;
+        box-shadow: 0 0 5px #0005;
+        border-radius: 10px;
+    }
+</style>

+ 6 - 0
src/router/index.js

@@ -12,6 +12,7 @@ import financeindex from '@/components/child/financeindex'
 import Globalindex from '@/components/child/Globalindex'
 import Generalindex from '@/components/child/Generalindex'
 import AuthorityJob from '@/components/child/AuthorityJob'
+import Controltree from '@/components/child/Controltree'
 
 Vue.use(Router)
 
@@ -66,6 +67,11 @@ export default new Router({
           path: '/home/AuthorityJob',
           name: 'AuthorityJob',
           component: AuthorityJob
+        },
+        {
+          path: '/home/Controltree',
+          name: 'Controltree',
+          component: Controltree
         }
       ]
     },