diff --git a/src/assets/photo.png b/src/assets/photo.png new file mode 100644 index 0000000..90e64c2 Binary files /dev/null and b/src/assets/photo.png differ diff --git a/src/assets/photo1.png b/src/assets/photo1.png new file mode 100644 index 0000000..403f945 Binary files /dev/null and b/src/assets/photo1.png differ diff --git a/src/router/router.js b/src/router/router.js index bdd1dbb..f22ca1c 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -1,10 +1,12 @@ import { createRouter, createWebHashHistory } from "vue-router"; import ResourceChart from "../views/resource-chart.vue"; import OrganizationChart from "../views/organization-chart.vue"; +import DemoChart from "../views/demo-chart.vue"; const routes = [ { name: 'resource-chart', path: "/resource-chart", component: ResourceChart }, - { name: 'organization-chart', path: "/organization-chart", component: OrganizationChart } + { name: 'organization-chart', path: "/organization-chart", component: OrganizationChart }, + { name: 'demo-chart', path: "/demo-chart", component: DemoChart }, ]; // 初始化路由 diff --git a/src/style.css b/src/style.css index 0ac4856..3d8bf7a 100644 --- a/src/style.css +++ b/src/style.css @@ -62,7 +62,6 @@ button:focus-visible { width: 100%; height: 100%; margin: 0 auto; - padding: 2rem; text-align: center; } @@ -78,3 +77,59 @@ button:focus-visible { background-color: #f9f9f9; } } + + +.tree-org-node__content .tree-org-node__text { + padding: 0 !important; +} + +.tree-org-node__content .tree-org-node__text{ + width: 150px; + height: 120px; +} + +.custom-content-top{ + height: 30px; + text-align: center; + font-size: 16px; + line-height: 30px; + font-weight: 900; + color: #fff; + background-color: #0e339b; +} + +.custom-content-center{ + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: calc(100% - 30px); +} + +.custom-content-left { + flex: 1; + height: 100%; +} + +.custom-content-left img{ + width: 100%; + height: 100%; +} + +.custom-content-right { + font-size: 14px; + flex: 1; + height: 100%; + font-weight: 400; + background-color: #e6f6ff; + color: #000; +} + +.custom-content-right-job,.custom-content-right-lastname { + margin-top: 12px; + width: 70px; + white-space: nowrap; /* 文字不换行 */ + overflow: hidden; /* 超出部分隐藏 */ + text-overflow: ellipsis; /* 超出部分显示省略号 */ + +} \ No newline at end of file diff --git a/src/views/demo-chart.vue b/src/views/demo-chart.vue new file mode 100644 index 0000000..ced9d1e --- /dev/null +++ b/src/views/demo-chart.vue @@ -0,0 +1,216 @@ + + + + + + + {{node.$$data.deptName}} + + + + + + + {{node.$$data.jobName}} + + + {{node.$$data.lastName}} + + + + + + {{node.$$data.deptName}} + + + + + + + {{item.jobName}} + + + {{item.lastName}} + + + + + + + + {{node.children.length}} + + + + + +