目录树自定义右键菜单
Showing
3 changed files
with
452 additions
and
345 deletions
1 | <template> | 1 | <template> |
2 | <div class="tree_item_box"> | 2 | <div class="tree_item_box"> |
3 | <div | 3 | <div |
4 | class="column-start-start linkLine_default" | 4 | class="column-start-start linkLine_default" |
5 | v-for="(item,s_index) in list" | 5 | v-for="(item, s_index) in list" |
6 | :key="s_index" | 6 | :key="s_index" |
7 | :class="{ | 7 | :class="{ |
8 | 'linkLine_first': s_index===0&list.length>1, | 8 | linkLine_first: (s_index === 0) & (list.length > 1), |
9 | 'linkLine_half_top': s_index===0&&list.length===1, | 9 | linkLine_half_top: s_index === 0 && list.length === 1, |
10 | 'linkLine_last': (s_index===(list.length-1)&&s_index!==0), | 10 | linkLine_last: s_index === list.length - 1 && s_index !== 0, |
11 | 'third_layer':!item.children, | 11 | third_layer: !item.children, |
12 | 'second_layer':item.children | 12 | second_layer: item.children, |
13 | }" | 13 | }" |
14 | > | 14 | > |
15 | <div | 15 | <div |
16 | class="row-flex-start basic_banner" | 16 | class="row-flex-start basic_banner" |
17 | @click="itemClick(item)" | 17 | @click="itemClick(item)" |
18 | :class="{ | 18 | :class="{ |
19 | 'active_color': item.expand | 19 | active_color: item.expand, |
20 | }" | 20 | }" |
21 | > | 21 | > |
22 | <div | 22 | <div |
23 | v-if="item.children" | 23 | v-if="item.children" |
24 | class="reTree_icon" | 24 | class="reTree_icon" |
25 | :style="{height: (size||14*1.2) +'px',width: (size||14*1.2) +'px'}" | 25 | :style="{ |
26 | :class="{ | 26 | height: (size || 14 * 1.2) + 'px', |
27 | 'reTree_default_icon': item.children.length===0, | 27 | width: (size || 14 * 1.2) + 'px', |
28 | 'reTree_collapse_icon': item.expand && item.children.length>0, | 28 | }" |
29 | 'reTree_expand_icon': !item.expand && item.children.length>0, | 29 | :class="{ |
30 | }" | 30 | reTree_default_icon: item.children.length === 0, |
31 | ></div> | 31 | reTree_collapse_icon: item.expand && item.children.length > 0, |
32 | <div | 32 | reTree_expand_icon: !item.expand && item.children.length > 0, |
33 | class="layer_text nowrap" | 33 | }" |
34 | :class="{ | 34 | ></div> |
35 | 'active_color': item.expand | 35 | <div |
36 | }" | 36 | class="layer_text nowrap" |
37 | >{{item.label}}</div> | 37 | @contextmenu.prevent="openMenu($event, item)" |
38 | </div> | 38 | :class="{ |
39 | <line-item | 39 | active_color: item.expand, |
40 | :list="item.children" | 40 | }" |
41 | v-on="$listeners" | 41 | > |
42 | :size="size" | 42 | {{ item.label }} |
43 | v-if="item.expand&&item.children&&item.children.length>0" | 43 | </div> |
44 | ></line-item> | 44 | </div> |
45 | </div> | 45 | <line-item |
46 | </div> | 46 | :list="item.children" |
47 | v-on="$listeners" | ||
48 | :size="size" | ||
49 | v-if="item.expand && item.children && item.children.length > 0" | ||
50 | ></line-item> | ||
51 | </div> | ||
52 | </div> | ||
47 | </template> | 53 | </template> |
48 | <script> | 54 | <script> |
49 | export default { | 55 | export default { |
50 | name: "line-item", | 56 | name: "line-item", |
51 | props: { | 57 | props: { |
52 | list: { | 58 | list: { |
53 | type: Array, | 59 | type: Array, |
54 | default: () => { | 60 | default: () => { |
55 | return []; | 61 | return []; |
56 | } | 62 | }, |
57 | }, | 63 | }, |
58 | size: { | 64 | size: { |
59 | type: Number, | 65 | type: Number, |
60 | default: 14 | 66 | default: 14, |
61 | } | 67 | }, |
62 | }, | 68 | visible: { |
63 | methods: { | 69 | type: Boolean, |
64 | itemClick(item) { | 70 | default: false, |
65 | item.expand = !item.expand; | 71 | }, |
66 | this.$emit("itemClick", item); | 72 | }, |
67 | if (!item.children) { | 73 | methods: { |
68 | this.$emit("valClick", item); | 74 | itemClick(item) { |
69 | } | 75 | item.expand = !item.expand; |
70 | } | 76 | this.$emit("itemClick", item); |
71 | } | 77 | if (!item.children) { |
78 | this.$emit("valClick", item); | ||
79 | } | ||
80 | }, | ||
81 | openMenu(e, item) { | ||
82 | if (item.isZD!=undefined) { | ||
83 | var x = e.pageX; | ||
84 | var y = e.pageY; | ||
85 | this.$emit("changeIsZD", item.isZD); | ||
86 | this.$emit("changeTop", y); | ||
87 | this.$emit("changeLeft", x); | ||
88 | this.$emit("changeVisible", true); | ||
89 | } | ||
90 | // this.top = y; | ||
91 | // this.left = x; | ||
92 | // this.visible = true; | ||
93 | }, | ||
94 | closeMenu() { | ||
95 | this.$emit("changeVisible", false); | ||
96 | // this.visible = false; | ||
97 | }, | ||
98 | }, | ||
99 | watch: { | ||
100 | visible(value) { | ||
101 | if (value) { | ||
102 | document.body.addEventListener("click", this.closeMenu); | ||
103 | } else { | ||
104 | document.body.removeEventListener("click", this.closeMenu); | ||
105 | } | ||
106 | }, | ||
107 | }, | ||
72 | }; | 108 | }; |
73 | </script> | 109 | </script> |
74 | <style lang='less'> | 110 | <style lang="less"> |
75 | .content { | 111 | .content { |
76 | height: 100%; | 112 | height: 100%; |
77 | width: 100%; | 113 | width: 100%; |
... | @@ -96,132 +132,136 @@ export default { | ... | @@ -96,132 +132,136 @@ export default { |
96 | white-space: nowrap; | 132 | white-space: nowrap; |
97 | } | 133 | } |
98 | .active_color { | 134 | .active_color { |
99 | color: #ffffff; | 135 | color: #ffffff; |
100 | } | 136 | } |
101 | .reTree_icon { | 137 | .reTree_icon { |
102 | width: 17px; | 138 | width: 17px; |
103 | height: 17px; | 139 | height: 17px; |
104 | margin-right: 10px; | 140 | margin-right: 10px; |
105 | } | 141 | } |
106 | .no_icon { | 142 | .no_icon { |
107 | width: 17px; | 143 | width: 17px; |
108 | height: 17px; | 144 | height: 17px; |
109 | } | 145 | } |
110 | .tree_item_box { | 146 | .tree_item_box { |
111 | position: relative; | 147 | position: relative; |
112 | width: 100%; | 148 | width: 100%; |
113 | cursor: pointer; | 149 | cursor: pointer; |
114 | } | 150 | } |
115 | .basic_layer { | 151 | .basic_layer { |
116 | width: 100%; | 152 | width: 100%; |
117 | position: relative; | 153 | position: relative; |
118 | color: #FFFFFF; | 154 | color: #ffffff; |
119 | cursor: pointer; | 155 | cursor: pointer; |
120 | .layer_text { | 156 | .layer_text { |
121 | flex: 1; | 157 | flex: 1; |
122 | } | 158 | } |
123 | } | 159 | } |
124 | .first_vertical_line { | 160 | .first_vertical_line { |
125 | content: ""; | 161 | content: ""; |
126 | position: absolute; | 162 | position: absolute; |
127 | width: 1px; | 163 | width: 1px; |
128 | left: 6px; | 164 | left: 6px; |
129 | top: 17px; | 165 | top: 17px; |
130 | background: #c3c5c8; | 166 | background: #c3c5c8; |
131 | } | 167 | } |
132 | .basic_banner { | 168 | .basic_banner { |
133 | position: relative; | 169 | position: relative; |
134 | width: 100%; | 170 | width: 100%; |
135 | padding-bottom: 13px; | 171 | padding-bottom: 13px; |
136 | } | 172 | } |
137 | .second_layer { | 173 | .second_layer { |
138 | position: relative; | 174 | position: relative; |
139 | width: 100%; | 175 | width: 100%; |
140 | cursor: pointer; | 176 | cursor: pointer; |
141 | padding-left: 25px; | 177 | padding-left: 25px; |
142 | } | 178 | } |
143 | .third_layer { | 179 | .third_layer { |
144 | position: relative; | 180 | position: relative; |
145 | // padding-bottom: 15px; | 181 | // padding-bottom: 15px; |
146 | width: 100%; | 182 | width: 100%; |
147 | padding-left: 40px; | 183 | padding-left: 40px; |
148 | color: #FFFFFF; | 184 | color: #ffffff; |
149 | } | 185 | } |
150 | 186 | ||
151 | .second_layer::before { | 187 | .second_layer::before { |
152 | content: ""; | 188 | content: ""; |
153 | position: absolute; | 189 | position: absolute; |
154 | height: 1px; | 190 | height: 1px; |
155 | width: 16px; | 191 | width: 16px; |
156 | left: 9px; | 192 | left: 9px; |
157 | top: 9px; | 193 | top: 9px; |
158 | background: #c3c5c8; | 194 | background: #c3c5c8; |
159 | } | 195 | } |
160 | .third_layer::before { | 196 | .third_layer::before { |
161 | content: ""; | 197 | content: ""; |
162 | position: absolute; | 198 | position: absolute; |
163 | height: 1px; | 199 | height: 1px; |
164 | width: 22px; | 200 | width: 22px; |
165 | left: 9px; | 201 | left: 9px; |
166 | top: 9px; | 202 | top: 9px; |
167 | background: #c3c5c8; | 203 | background: #c3c5c8; |
168 | } | 204 | } |
169 | 205 | ||
170 | .linkLine_default::after { | 206 | .linkLine_default::after { |
171 | content: ""; | 207 | content: ""; |
172 | position: absolute; | 208 | position: absolute; |
173 | height: 100%; | 209 | height: 100%; |
174 | width: 1px; | 210 | width: 1px; |
175 | left: 9px; | 211 | left: 9px; |
176 | top: 0px; | 212 | top: 0px; |
177 | background: #c3c5c8; | 213 | background: #c3c5c8; |
178 | } | 214 | } |
179 | .linkLine_first::after { | 215 | .linkLine_first::after { |
180 | content: ""; | 216 | content: ""; |
181 | position: absolute; | 217 | position: absolute; |
182 | /* 为了触顶 */ | 218 | /* 为了触顶 */ |
183 | top: -14px; | 219 | top: -14px; |
184 | height: calc(100% + 14px); | 220 | height: calc(100% + 14px); |
185 | width: 1px; | 221 | width: 1px; |
186 | left: 9px; | 222 | left: 9px; |
187 | background: #c3c5c8; | 223 | background: #c3c5c8; |
188 | } | 224 | } |
189 | // 上半截 | 225 | // 上半截 |
190 | .linkLine_half_top::after { | 226 | .linkLine_half_top::after { |
191 | content: ""; | 227 | content: ""; |
192 | position: absolute; | 228 | position: absolute; |
193 | height: 24px; | 229 | height: 24px; |
194 | top: -14px; | 230 | top: -14px; |
195 | width: 1px; | 231 | width: 1px; |
196 | left: 9px; | 232 | left: 9px; |
197 | background: #c3c5c8; | 233 | background: #c3c5c8; |
198 | } | 234 | } |
199 | .linkLine_last::after { | 235 | .linkLine_last::after { |
200 | content: ""; | 236 | content: ""; |
201 | position: absolute; | 237 | position: absolute; |
202 | height: 9px; | 238 | height: 9px; |
203 | width: 1px; | 239 | width: 1px; |
204 | left: 9px; | 240 | left: 9px; |
205 | top: 0px; | 241 | top: 0px; |
206 | background: #c3c5c8; | 242 | background: #c3c5c8; |
207 | } | 243 | } |
208 | .reTree_collapse_icon { | 244 | .reTree_collapse_icon { |
209 | background: url("../../assets/images/reTree_collapse_.svg") no-repeat center center; | 245 | background: url("../../assets/images/reTree_collapse_.svg") no-repeat center |
210 | background-size: contain; | 246 | center; |
247 | background-size: contain; | ||
211 | } | 248 | } |
212 | 249 | ||
213 | .reTree_default_icon { | 250 | .reTree_default_icon { |
214 | background: url("../../assets/images/reTree_default_.svg") no-repeat center center; | 251 | background: url("../../assets/images/reTree_default_.svg") no-repeat center |
215 | background-size: contain; | 252 | center; |
253 | background-size: contain; | ||
216 | } | 254 | } |
217 | 255 | ||
218 | .reTree_expand_icon { | 256 | .reTree_expand_icon { |
219 | background: url("../../assets/images/reTree_expand_.svg") no-repeat center center; | 257 | background: url("../../assets/images/reTree_expand_.svg") no-repeat center |
220 | background-size: contain; | 258 | center; |
259 | background-size: contain; | ||
221 | } | 260 | } |
222 | 261 | ||
223 | .reTree_focus_icon { | 262 | .reTree_focus_icon { |
224 | background: url("../../assets/images/reTree_focus_.svg") no-repeat center center; | 263 | background: url("../../assets/images/reTree_focus_.svg") no-repeat center |
225 | background-size: contain; | 264 | center; |
265 | background-size: contain; | ||
226 | } | 266 | } |
227 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
267 | </style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <div | 2 | <div |
3 | class="content column-start-center reTree_box" | 3 | class="content column-start-center reTree_box" |
4 | :style="{fontSize: (size||14) +'px',lineHeight:(size||14) +'px'}" | 4 | :style="{ fontSize: (size || 14) + 'px', lineHeight: (size || 14) + 'px' }" |
5 | style="width:347px" | 5 | style="width:347px" |
6 | > | 6 | > |
7 | <div class="column-start-center basic_layer" v-for="(item,index) in formatData" :key="index"> | 7 | <div |
8 | <div | 8 | class="column-start-center basic_layer" |
9 | class="row-flex-start basic_banner" | 9 | v-for="(item, index) in formatData" |
10 | :class="{ | 10 | :key="index" |
11 | 'active_color': item.expand && item.children.length>0, | 11 | > |
12 | 12 | <div | |
13 | }" | 13 | class="row-flex-start basic_banner" |
14 | @click="itemClick(item)" | 14 | :class="{ |
15 | > | 15 | active_color: item.expand && item.children.length > 0, |
16 | <div | 16 | }" |
17 | class="reTree_icon" | 17 | @click="itemClick(item)" |
18 | :style="{height: (size||14*1.2 )+'px',width: (size||14*1.2) +'px'}" | 18 | > |
19 | :class="{ | 19 | <div |
20 | 'reTree_default_icon': item.children.length===0, | 20 | class="reTree_icon" |
21 | 'reTree_collapse_icon': item.expand && item.children.length>0, | 21 | :style="{ |
22 | 'reTree_expand_icon': !item.expand && item.children.length>0, | 22 | height: (size || 14 * 1.2) + 'px', |
23 | }" | 23 | width: (size || 14 * 1.2) + 'px', |
24 | ></div> | 24 | }" |
25 | <div class="layer_text nowrap">{{item.label}}</div> | 25 | :class="{ |
26 | </div> | 26 | reTree_default_icon: item.children.length === 0, |
27 | reTree_collapse_icon: item.expand && item.children.length > 0, | ||
28 | reTree_expand_icon: !item.expand && item.children.length > 0, | ||
29 | }" | ||
30 | ></div> | ||
31 | <div class="layer_text nowrap">{{ item.label }}</div> | ||
32 | </div> | ||
27 | 33 | ||
28 | <lineItem v-if="item.expand&&item.children.length>0" v-on="$listeners" :list="item.children" :size="size"></lineItem> | 34 | <lineItem |
29 | </div> | 35 | v-if="item.expand && item.children.length > 0" |
30 | </div> | 36 | v-on="$listeners" |
37 | @changeTop="changeTop" | ||
38 | @changeLeft="changeLeft" | ||
39 | @changeVisible="changeVisible" | ||
40 | @changeIsZD="changeIsZD" | ||
41 | :list="item.children" | ||
42 | :visible="visible" | ||
43 | :size="size" | ||
44 | ></lineItem> | ||
45 | </div> | ||
46 | |||
47 | <ul | ||
48 | v-show="visible" | ||
49 | :style="{ left: left + 'px', top: top + 'px' }" | ||
50 | class="contextmenu" | ||
51 | > | ||
52 | <li>定位</li> | ||
53 | <li>导入图形</li> | ||
54 | <li>导出图形</li> | ||
55 | <li v-show="isZD">导入属性</li> | ||
56 | <li v-show="!isZD">导入楼盘</li> | ||
57 | <li>重叠分析</li> | ||
58 | <li v-show="isZD">添加定着物</li> | ||
59 | </ul> | ||
60 | </div> | ||
31 | </template> | 61 | </template> |
32 | <script> | 62 | <script> |
33 | import lineItem from "./lineItem.vue"; | 63 | import lineItem from "./lineItem.vue"; |
34 | export default { | 64 | export default { |
35 | inheritAttrs: false, | 65 | inheritAttrs: false, |
36 | props: { | 66 | props: { |
37 | pd: {}, | 67 | pd: {}, |
38 | size: { | 68 | size: { |
39 | type: Number, | 69 | type: Number, |
40 | default: 14 | 70 | default: 14, |
41 | } | 71 | }, |
42 | }, | 72 | }, |
43 | components: { lineItem }, | 73 | components: { lineItem }, |
44 | data() { | 74 | data() { |
45 | return { | 75 | return { |
46 | selectedDetail: {}, | 76 | selectedDetail: {}, |
47 | timer: {}, | 77 | timer: {}, |
48 | formatData: [] | 78 | formatData: [], |
49 | }; | 79 | visible: false, |
50 | }, | 80 | top: 0, |
51 | watch: { | 81 | left: 0, |
52 | pd(n, o) { | 82 | isZD:true |
53 | this.formatData = this.preDealData(n); | 83 | }; |
54 | console.log(this.formatData); | 84 | }, |
55 | } | 85 | watch: { |
56 | }, | 86 | pd(n, o) { |
57 | created() { | 87 | this.formatData = this.preDealData(n); |
58 | console.log("lineTree create"); | 88 | console.log(this.formatData); |
59 | this.preDealData(this.pd); | 89 | }, |
60 | }, | 90 | }, |
91 | created() { | ||
92 | console.log("lineTree create"); | ||
93 | this.preDealData(this.pd); | ||
94 | }, | ||
61 | 95 | ||
62 | methods: { | 96 | methods: { |
63 | preDealData(list) { | 97 | // 改变菜单数据 |
64 | list.forEach(x => { | 98 | changeVisible(data) { |
65 | if (!x.expand) this.$set(x, "expand", false); | 99 | this.visible = data; |
66 | if (x.children && x.children.length > 0) this.preDealData(x.children); | 100 | }, |
67 | }); | 101 | changeTop(data) { |
68 | return list; | 102 | this.top = data; |
69 | }, | 103 | }, |
70 | // 根据id展开树的具体项 | 104 | changeLeft(data) { |
71 | expandTreeItemById(idList) { | 105 | this.left = data; |
72 | let _this = this; | 106 | }, |
73 | function loopTree(list) { | 107 | changeIsZD(data) { |
74 | list.forEach(x => { | 108 | this.isZD = data; |
75 | if (idList.includes(x.id)) { | 109 | }, |
76 | _this.$set(x, "expand", true); | 110 | preDealData(list) { |
77 | } else { | 111 | list.forEach((x) => { |
78 | _this.$set(x, "expand", false); | 112 | if (!x.expand) this.$set(x, "expand", false); |
79 | } | 113 | if (x.children && x.children.length > 0) this.preDealData(x.children); |
80 | if (x.children && x.children.length > 0) loopTree(x.children); | 114 | }); |
81 | }); | 115 | return list; |
82 | return list; | 116 | }, |
83 | } | 117 | // 根据id展开树的具体项 |
84 | this.formatData = loopTree(this.pd); | 118 | expandTreeItemById(idList) { |
85 | }, | 119 | let _this = this; |
86 | itemClick(item){ | 120 | function loopTree(list) { |
87 | item.expand=!item.expand | 121 | list.forEach((x) => { |
88 | this.$emit('itemClick',item) | 122 | if (idList.includes(x.id)) { |
89 | }, | 123 | _this.$set(x, "expand", true); |
90 | // 详情点击 | 124 | } else { |
91 | detailClick(data) { | 125 | _this.$set(x, "expand", false); |
92 | clearTimeout(this.timer); | 126 | } |
93 | this.timer = setTimeout(() => { | 127 | if (x.children && x.children.length > 0) loopTree(x.children); |
94 | this.selectedDetail = data; | 128 | }); |
95 | this.$emit("detailClick", data); | 129 | return list; |
96 | }, 300); | 130 | } |
97 | }, | 131 | this.formatData = loopTree(this.pd); |
98 | detailDoubleClick(data) { | 132 | }, |
99 | clearTimeout(this.timer); | 133 | itemClick(item) { |
100 | this.selectedDetail = data; | 134 | item.expand = !item.expand; |
101 | this.$emit("detailDoubleClick", data); | 135 | this.$emit("itemClick", item); |
102 | } | 136 | }, |
103 | } | 137 | // 详情点击 |
138 | detailClick(data) { | ||
139 | clearTimeout(this.timer); | ||
140 | this.timer = setTimeout(() => { | ||
141 | this.selectedDetail = data; | ||
142 | this.$emit("detailClick", data); | ||
143 | }, 300); | ||
144 | }, | ||
145 | detailDoubleClick(data) { | ||
146 | clearTimeout(this.timer); | ||
147 | this.selectedDetail = data; | ||
148 | this.$emit("detailDoubleClick", data); | ||
149 | }, | ||
150 | }, | ||
104 | }; | 151 | }; |
105 | </script> | 152 | </script> |
106 | <style lang="less" scoped> | 153 | <style lang="less" scoped> |
154 | // 自定义右键菜单样式 start | ||
155 | .contextmenu { | ||
156 | margin: 0; | ||
157 | background: #fff; | ||
158 | z-index: 3000; | ||
159 | position: absolute; | ||
160 | list-style-type: none; | ||
161 | padding: 5px 0; | ||
162 | border-radius: 4px; | ||
163 | font-size: 12px; | ||
164 | font-weight: 400; | ||
165 | color: #333; | ||
166 | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); | ||
167 | } | ||
168 | |||
169 | .contextmenu li { | ||
170 | margin: 0; | ||
171 | padding: 7px 16px; | ||
172 | cursor: pointer; | ||
173 | } | ||
174 | |||
175 | .contextmenu li:hover { | ||
176 | background: #eee; | ||
177 | } | ||
178 | // end | ||
107 | .content { | 179 | .content { |
108 | height: 100%; | 180 | height: 100%; |
109 | width: 100%; | 181 | width: 100%; |
... | @@ -127,128 +199,132 @@ export default { | ... | @@ -127,128 +199,132 @@ export default { |
127 | text-overflow: ellipsis; | 199 | text-overflow: ellipsis; |
128 | white-space: nowrap; | 200 | white-space: nowrap; |
129 | } | 201 | } |
130 | .active_color{ | 202 | .active_color { |
131 | color: #FFFFFF ; | 203 | color: #ffffff; |
132 | } | 204 | } |
133 | .reTree_box { | 205 | .reTree_box { |
134 | // overflow-y: auto; | 206 | // overflow-y: auto; |
135 | } | 207 | } |
136 | .reTree_icon { | 208 | .reTree_icon { |
137 | width: 17px; | 209 | width: 17px; |
138 | height: 17px; | 210 | height: 17px; |
139 | margin-right: 10px; | 211 | margin-right: 10px; |
140 | } | 212 | } |
141 | 213 | ||
142 | .basic_layer { | 214 | .basic_layer { |
143 | width: 100%; | 215 | width: 100%; |
144 | position: relative; | 216 | position: relative; |
145 | color: #FFFFFF; | 217 | color: #ffffff; |
146 | cursor: pointer; | 218 | cursor: pointer; |
147 | .layer_text { | 219 | .layer_text { |
148 | flex: 1; | 220 | flex: 1; |
149 | } | 221 | } |
150 | } | 222 | } |
151 | .first_vertical_line { | 223 | .first_vertical_line { |
152 | content: ""; | 224 | content: ""; |
153 | position: absolute; | 225 | position: absolute; |
154 | width: 1px; | 226 | width: 1px; |
155 | left: 6px; | 227 | left: 6px; |
156 | top: 17px; | 228 | top: 17px; |
157 | background: #c3c5c8; | 229 | background: #c3c5c8; |
158 | } | 230 | } |
159 | .basic_banner { | 231 | .basic_banner { |
160 | position: relative; | 232 | position: relative; |
161 | width: 100%; | 233 | width: 100%; |
162 | padding-bottom: 13px; | 234 | padding-bottom: 13px; |
163 | } | 235 | } |
164 | .second_layer { | 236 | .second_layer { |
165 | position: relative; | 237 | position: relative; |
166 | width: 100%; | 238 | width: 100%; |
167 | cursor: pointer; | 239 | cursor: pointer; |
168 | padding-left: 25px; | 240 | padding-left: 25px; |
169 | } | 241 | } |
170 | .third_layer { | 242 | .third_layer { |
171 | position: relative; | 243 | position: relative; |
172 | padding-bottom: 15px; | 244 | padding-bottom: 15px; |
173 | width: 100%; | 245 | width: 100%; |
174 | padding-left: 40px; | 246 | padding-left: 40px; |
175 | color: #ffffff; | 247 | color: #ffffff; |
176 | } | 248 | } |
177 | 249 | ||
178 | .second_layer::before { | 250 | .second_layer::before { |
179 | content: ""; | 251 | content: ""; |
180 | position: absolute; | 252 | position: absolute; |
181 | height: 1px; | 253 | height: 1px; |
182 | width: 16px; | 254 | width: 16px; |
183 | left: 9px; | 255 | left: 9px; |
184 | top: 9px; | 256 | top: 9px; |
185 | background: #c3c5c8; | 257 | background: #c3c5c8; |
186 | } | 258 | } |
187 | .third_layer::before { | 259 | .third_layer::before { |
188 | content: ""; | 260 | content: ""; |
189 | position: absolute; | 261 | position: absolute; |
190 | height: 1px; | 262 | height: 1px; |
191 | width: 20px; | 263 | width: 20px; |
192 | left: 9px; | 264 | left: 9px; |
193 | top: 9px; | 265 | top: 9px; |
194 | background: #c3c5c8; | 266 | background: #c3c5c8; |
195 | } | 267 | } |
196 | 268 | ||
197 | .linkLine_default::after { | 269 | .linkLine_default::after { |
198 | content: ""; | 270 | content: ""; |
199 | position: absolute; | 271 | position: absolute; |
200 | height: 100%; | 272 | height: 100%; |
201 | width: 1px; | 273 | width: 1px; |
202 | left: 9px; | 274 | left: 9px; |
203 | top: 0px; | 275 | top: 0px; |
204 | background: #c3c5c8; | 276 | background: #c3c5c8; |
205 | } | 277 | } |
206 | .linkLine_first::after { | 278 | .linkLine_first::after { |
207 | content: ""; | 279 | content: ""; |
208 | position: absolute; | 280 | position: absolute; |
209 | /* 为了触顶 */ | 281 | /* 为了触顶 */ |
210 | top: -14px; | 282 | top: -14px; |
211 | height: calc(100% + 14px); | 283 | height: calc(100% + 14px); |
212 | width: 1px; | 284 | width: 1px; |
213 | left: 9px; | 285 | left: 9px; |
214 | background: #c3c5c8; | 286 | background: #c3c5c8; |
215 | } | 287 | } |
216 | // 上半截 | 288 | // 上半截 |
217 | .linkLine_half_top::after { | 289 | .linkLine_half_top::after { |
218 | content: ""; | 290 | content: ""; |
219 | position: absolute; | 291 | position: absolute; |
220 | height: 24px; | 292 | height: 24px; |
221 | top: -14px; | 293 | top: -14px; |
222 | width: 1px; | 294 | width: 1px; |
223 | left: 9px; | 295 | left: 9px; |
224 | background: #c3c5c8; | 296 | background: #c3c5c8; |
225 | } | 297 | } |
226 | .linkLine_last::after { | 298 | .linkLine_last::after { |
227 | content: ""; | 299 | content: ""; |
228 | position: absolute; | 300 | position: absolute; |
229 | height: 9px; | 301 | height: 9px; |
230 | width: 1px; | 302 | width: 1px; |
231 | left: 9px; | 303 | left: 9px; |
232 | top: 0px; | 304 | top: 0px; |
233 | background: #c3c5c8; | 305 | background: #c3c5c8; |
234 | } | 306 | } |
235 | .reTree_collapse_icon { | 307 | .reTree_collapse_icon { |
236 | background: url("../../assets/images/reTree_collapse_.svg") no-repeat center center; | 308 | background: url("../../assets/images/reTree_collapse_.svg") no-repeat center |
237 | background-size: contain; | 309 | center; |
310 | background-size: contain; | ||
238 | } | 311 | } |
239 | 312 | ||
240 | .reTree_default_icon { | 313 | .reTree_default_icon { |
241 | background: url("../../assets/images/reTree_default_.svg") no-repeat center center; | 314 | background: url("../../assets/images/reTree_default_.svg") no-repeat center |
242 | background-size: contain; | 315 | center; |
316 | background-size: contain; | ||
243 | } | 317 | } |
244 | 318 | ||
245 | .reTree_expand_icon { | 319 | .reTree_expand_icon { |
246 | background: url("../../assets/images/reTree_expand_.svg") no-repeat center center; | 320 | background: url("../../assets/images/reTree_expand_.svg") no-repeat center |
247 | background-size: contain; | 321 | center; |
322 | background-size: contain; | ||
248 | } | 323 | } |
249 | 324 | ||
250 | .reTree_focus_icon { | 325 | .reTree_focus_icon { |
251 | background: url("../../assets/images/reTree_focus_.svg") no-repeat center center; | 326 | background: url("../../assets/images/reTree_focus_.svg") no-repeat center |
252 | background-size: contain; | 327 | center; |
328 | background-size: contain; | ||
253 | } | 329 | } |
254 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
330 | </style> | ... | ... |
... | @@ -144,20 +144,11 @@ export default { | ... | @@ -144,20 +144,11 @@ export default { |
144 | children: [ | 144 | children: [ |
145 | { | 145 | { |
146 | label: "宗地代码1933", | 146 | label: "宗地代码1933", |
147 | children: [ | 147 | isZD:true |
148 | { | ||
149 | id:'011', | ||
150 | label: "自然幢号1256", | ||
151 | }, | ||
152 | ], | ||
153 | }, | 148 | }, |
154 | { | 149 | { |
155 | label: "宗地代码2100", | 150 | label: "自然幢2100", |
156 | children: [ | 151 | isZD:false |
157 | { | ||
158 | label: "自然幢号1543", | ||
159 | }, | ||
160 | ], | ||
161 | }, | 152 | }, |
162 | ], | 153 | ], |
163 | } | 154 | } | ... | ... |
-
Please register or sign in to post a comment