From 5ed7f314e83de8a8ff92c1c435ef149a2ec63e9b Mon Sep 17 00:00:00 2001 From: sc Date: Sat, 19 Jun 2021 12:23:48 +0800 Subject: [PATCH] UP --- public/img/floorplan.svg | 3298 +++++---------------------- src/views/template/svgmap/index.vue | 85 +- 2 files changed, 699 insertions(+), 2684 deletions(-) diff --git a/public/img/floorplan.svg b/public/img/floorplan.svg index 369f74f2..d6581fb7 100644 --- a/public/img/floorplan.svg +++ b/public/img/floorplan.svg @@ -2,2693 +2,633 @@ image/svg+xml + + + 502 -504505506507508511509 -537 -583 -SeminarRoom -582A -Archives &ResearchCollections -581 -ReadingRoom -582 - - 574 - 573 - 572 - 571 - 570 - - 569568567566565564563562561582C582B -Silent Study -Open to below -SilentStudySilent Study -SilentStudy -B -H -A -E -C -D - - - - - - - - - - - - - - - - - - - - - - Silent Study -Collections/Silent StudyA–GVM–MT -503 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + 513 - \ No newline at end of file + id="tspan11191" + style="stroke-width:0.264583" + x="108.38425" + y="133.0761">自由区域 + C1 + C2 + C3 + C4 + C5 + C6 + C7 + C8 + C9 + C10 + C11 + C12 + C13 + C14 + C15 + C16 + C17 + C18 + 自由区域 + W1 + W2 + + diff --git a/src/views/template/svgmap/index.vue b/src/views/template/svgmap/index.vue index 5bb5cbc4..27804bcb 100644 --- a/src/views/template/svgmap/index.vue +++ b/src/views/template/svgmap/index.vue @@ -15,13 +15,37 @@ - tree + + + + + c1 + computer + + + + +
+ +

windows 10

+
+
+ +
+ S +
+
+ + + +
+
@@ -37,9 +61,35 @@ return { svgLoading: false, filterText: "", + treeList: [ + { + label: 'computer', + children: [ + {label: 'c1'}, + {label: 'c2'}, + {label: 'c3'}, + {label: 'c4'}, + {label: 'c5'}, + {label: '...'} + ] + }, + { + label: 'network', + children: [ + {label: 'W1'}, + {label: 'W2'} + ] + } + ], + info: {}, option: {} } }, + watch: { + filterText(val) { + this.$refs.tree.filter(val); + } + }, mounted() { this.getSvg() }, @@ -90,8 +140,8 @@ tooltip: 2 }, data: [ - [329.0704991641723, 202.9464925472316, 100], - [254.6904486027168, 623.9059276397206, 50] + [137.01938166540623, 51.93905433869099], + [192.73843670517726, 52.00025351818228] ] } } @@ -109,10 +159,35 @@ console.log(dataPoint); }); - } + }, + //树过滤 + treeFilterNode(value, data){ + if (!value) return true; + var targetText = data.label; + return targetText.indexOf(value) !== -1; + }, } } -