--no commit message
Showing
3 changed files
with
194 additions
and
177 deletions
... | @@ -14,7 +14,8 @@ | ... | @@ -14,7 +14,8 @@ |
14 | :default-expand-all="true" | 14 | :default-expand-all="true" |
15 | :expand-on-click-node="false" | 15 | :expand-on-click-node="false" |
16 | node-key="id" | 16 | node-key="id" |
17 | :default-checked-keys="[showTab]"> | 17 | :default-checked-keys="[showTab]" |
18 | > | ||
18 | </el-tree> | 19 | </el-tree> |
19 | <el-collapse v-model="activeName" accordion> | 20 | <el-collapse v-model="activeName" accordion> |
20 | <el-collapse-item | 21 | <el-collapse-item |
... | @@ -22,22 +23,27 @@ | ... | @@ -22,22 +23,27 @@ |
22 | ref="sfq" | 23 | ref="sfq" |
23 | v-for="(item, index) in sfqdata" | 24 | v-for="(item, index) in sfqdata" |
24 | :key="index" | 25 | :key="index" |
25 | :name="index"> | 26 | :name="index" |
27 | > | ||
26 | <template slot="title"> | 28 | <template slot="title"> |
27 | <span class="text" @click="addlist(item)"> | 29 | <span class="text" @click="tap(item, index)"> |
28 | <span> | 30 | <span> {{ item.label }}</span> |
29 | {{ item.label }} | ||
30 | </span> | ||
31 | </span> | 31 | </span> |
32 | </template> | 32 | </template> |
33 | <el-button | 33 | <p |
34 | v-for="(item, index) in item.children" | 34 | v-for="(item, index) in item.children" |
35 | :re='item' | 35 | :re="item" |
36 | :key="index" | 36 | :key="index" |
37 | class="sfqcontent" | 37 | :class="[isActive == index ? activeCls : '', errorCls]" |
38 | @click="addlist(item, index)"> | 38 | @click="taplist(item, index)" |
39 | > | ||
40 | <span> | ||
39 | {{ item.label }} | 41 | {{ item.label }} |
40 | </el-button> | 42 | </span> |
43 | <span> | ||
44 | {{ item.zt }} | ||
45 | </span> | ||
46 | </p> | ||
41 | </el-collapse-item> | 47 | </el-collapse-item> |
42 | </el-collapse> | 48 | </el-collapse> |
43 | </div> | 49 | </div> |
... | @@ -45,15 +51,16 @@ | ... | @@ -45,15 +51,16 @@ |
45 | <component | 51 | <component |
46 | :is="componentTag" | 52 | :is="componentTag" |
47 | @getBdcdyh="getBdcdyh" | 53 | @getBdcdyh="getBdcdyh" |
48 | v-bind="currentSelectProps" /> | 54 | v-bind="currentSelectProps" |
55 | /> | ||
49 | </div> | 56 | </div> |
50 | </div> | 57 | </div> |
51 | </template> | 58 | </template> |
52 | <script> | 59 | <script> |
53 | import { getBdcqljqtsx } from "@/api/djbDetail.js"; | 60 | import { getBdcqljqtsx } from "@/api/djbDetail.js"; |
54 | import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; | 61 | import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; |
55 | export default { | 62 | export default { |
56 | data () { | 63 | data() { |
57 | return { | 64 | return { |
58 | activeName: 0, | 65 | activeName: 0, |
59 | //接收参数 | 66 | //接收参数 |
... | @@ -70,6 +77,9 @@ | ... | @@ -70,6 +77,9 @@ |
70 | keyy: "", | 77 | keyy: "", |
71 | iskey: "", | 78 | iskey: "", |
72 | defaultNode: "", | 79 | defaultNode: "", |
80 | isActive: "", | ||
81 | activeCls: "select", | ||
82 | errorCls: "unselected", | ||
73 | defaultProps: { | 83 | defaultProps: { |
74 | value: "id", | 84 | value: "id", |
75 | children: "children", | 85 | children: "children", |
... | @@ -79,7 +89,7 @@ | ... | @@ -79,7 +89,7 @@ |
79 | }; | 89 | }; |
80 | }, | 90 | }, |
81 | props: ["formData"], | 91 | props: ["formData"], |
82 | mounted () { | 92 | mounted() { |
83 | this.loadData(this.formData.bdcdyh); | 93 | this.loadData(this.formData.bdcdyh); |
84 | }, | 94 | }, |
85 | methods: { | 95 | methods: { |
... | @@ -88,14 +98,14 @@ | ... | @@ -88,14 +98,14 @@ |
88 | * @author: miaofang | 98 | * @author: miaofang |
89 | * 点击不动产单元号事件 | 99 | * 点击不动产单元号事件 |
90 | */ | 100 | */ |
91 | getBdcdyh (val) { | 101 | getBdcdyh(val) { |
92 | this.addloadData(val); | 102 | this.addloadData(val); |
93 | }, | 103 | }, |
94 | /** | 104 | /** |
95 | * @description: addloadData | 105 | * @description: addloadData |
96 | * @author: miaofang | 106 | * @author: miaofang |
97 | */ | 107 | */ |
98 | addloadData (val) { | 108 | addloadData(val) { |
99 | getBdcqljqtsx({ | 109 | getBdcqljqtsx({ |
100 | bdcdyid: val.bdcdyid, | 110 | bdcdyid: val.bdcdyid, |
101 | bdcdyh: val.bdcdyh, | 111 | bdcdyh: val.bdcdyh, |
... | @@ -105,14 +115,15 @@ | ... | @@ -105,14 +115,15 @@ |
105 | let index = this.sfqdata.findIndex((item) => { | 115 | let index = this.sfqdata.findIndex((item) => { |
106 | return item.bdcdyid == val.bdcdyid; | 116 | return item.bdcdyid == val.bdcdyid; |
107 | }); | 117 | }); |
108 | this.activeName = index | 118 | this.activeName = index; |
109 | this.setstyle(index, 0, this.iskey); | 119 | |
120 | // this.setstyle(index, 0, this.iskey); | ||
110 | } else { | 121 | } else { |
111 | this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); | 122 | this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); |
112 | this.activeName = this.sfqdata.length - 1; | 123 | this.activeName = this.sfqdata.length - 1; |
113 | this.$nextTick(() => { | 124 | // this.$nextTick(() => { |
114 | this.setstyle(this.sfqdata.length - 1, 0, this.iskey); | 125 | // this.setstyle(this.sfqdata.length - 1, 0, this.iskey); |
115 | }) | 126 | // }) |
116 | } | 127 | } |
117 | } | 128 | } |
118 | }); | 129 | }); |
... | @@ -121,13 +132,13 @@ | ... | @@ -121,13 +132,13 @@ |
121 | bdcdyh: val.bdcdyh, | 132 | bdcdyh: val.bdcdyh, |
122 | qllx: this.formData.qllx, | 133 | qllx: this.formData.qllx, |
123 | bsmQlxx: this.formData.bsmQlxx, | 134 | bsmQlxx: this.formData.bsmQlxx, |
124 | } | 135 | }; |
125 | }, | 136 | }, |
126 | /** | 137 | /** |
127 | * @description: loadData | 138 | * @description: loadData |
128 | * @author: renchao | 139 | * @author: renchao |
129 | */ | 140 | */ |
130 | loadData (val) { | 141 | loadData(val) { |
131 | getBdcqljqtsx({ | 142 | getBdcqljqtsx({ |
132 | bdcdyid: this.formData.bdcdyid, | 143 | bdcdyid: this.formData.bdcdyid, |
133 | bdcdyh: val, | 144 | bdcdyh: val, |
... | @@ -145,87 +156,80 @@ | ... | @@ -145,87 +156,80 @@ |
145 | ); | 156 | ); |
146 | this.sfqdata[0].children.forEach((item, index) => { | 157 | this.sfqdata[0].children.forEach((item, index) => { |
147 | if (item.id == this.defaultNode.id) { | 158 | if (item.id == this.defaultNode.id) { |
148 | this.iskey = index | 159 | this.loadComponent(item.form); |
160 | this.isActive = index; | ||
149 | } | 161 | } |
150 | }) | 162 | }); |
151 | this.setstyle(0, 0, this.iskey); | 163 | // this.setstyle(0, 0, this.iskey); |
152 | }) | 164 | }); |
153 | } | 165 | } |
154 | }) | 166 | }); |
155 | this.currentSelectProps = { | 167 | this.currentSelectProps = { |
156 | bdcdyid: this.formData.bdcdyid, | 168 | bdcdyid: this.formData.bdcdyid, |
157 | bdcdyh: val, | 169 | bdcdyh: val, |
158 | qllx: this.formData.qllx, | 170 | qllx: this.formData.qllx, |
159 | bsmQlxx: this.formData.bsmQlxx, | 171 | bsmQlxx: this.formData.bsmQlxx, |
160 | } | 172 | }; |
161 | }, | 173 | }, |
162 | /** | 174 | /** |
163 | * @description: handleNodeClick | 175 | * @description: handleNodeClick |
164 | * @param {*} data | 176 | * @param {*} data |
165 | * @author: renchao | 177 | * @author: renchao |
166 | */ | 178 | */ |
167 | handleNodeClick (data) { | 179 | handleNodeClick(data) { |
168 | this.loadComponent(data.form); | 180 | this.loadComponent(data.form); |
169 | }, | 181 | }, |
170 | setstyle (newindex, index, key) { | 182 | // setstyle(newindex, index, key) { |
171 | if (key != undefined || this.keyy == index) { | 183 | // if (key != undefined || this.keyy == index) { |
172 | if (key != undefined) { | 184 | // if (key != undefined) { |
173 | this.keyy = key | 185 | // this.keyy = key; |
174 | } | 186 | // } |
175 | this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form); | 187 | // this.loadComponent( |
176 | let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el | 188 | // this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form |
177 | dpme.style.backgroundColor = "#f5f5f5"; | 189 | // ); |
178 | dpme.style.color = "#0079fe"; | 190 | // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el; |
179 | dpme.style.borderRight = "4px solid #0079fe"; | 191 | // dpme.style.backgroundColor = "#f5f5f5"; |
180 | } else { | 192 | // dpme.style.color = "#0079fe"; |
181 | let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el | 193 | // dpme.style.borderRight = "4px solid #0079fe"; |
182 | dpme.style.backgroundColor = "#ffffff"; | 194 | // } else { |
183 | dpme.style.color = "black"; | 195 | // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el; |
184 | dpme.style.border = "none"; | 196 | // dpme.style.backgroundColor = "#ffffff"; |
185 | } | 197 | // dpme.style.color = "black"; |
186 | }, | 198 | // dpme.style.border = "none"; |
199 | // } | ||
200 | // }, | ||
187 | /** | 201 | /** |
188 | * @description: addlist | 202 | * @description: addlist |
189 | * @param {*} data | 203 | * @param {*} data |
190 | * @author: renchao | 204 | * @author: renchao |
191 | * 新增列表功能 | 205 | * 新增列表功能 |
192 | */ | 206 | */ |
193 | addlist (data, index) { | 207 | tap(data, index) { |
194 | if (index != undefined) { | ||
195 | let newindex = this.sfqdata.findIndex((item) => { | ||
196 | return item.bdcdyid == data.bdcdyid; | ||
197 | }); | ||
198 | this.setstyle(newindex, index); | ||
199 | this.currentSelectProps.bdcdyid = data.bdcdyid; | ||
200 | this.loadComponent(data.form); | 208 | this.loadComponent(data.form); |
201 | } else { | 209 | }, |
210 | taplist(data, index) { | ||
202 | this.loadComponent(data.form); | 211 | this.loadComponent(data.form); |
203 | let newindex = this.sfqdata.findIndex((item) => { | 212 | this.isActive = index; |
204 | return item.bdcdyid == data.bdcdyid; | ||
205 | }); | ||
206 | this.setstyle(newindex, index); | ||
207 | } | ||
208 | |||
209 | }, | 213 | }, |
210 | /** | 214 | /** |
211 | * @description: loadComponent | 215 | * @description: loadComponent |
212 | * @param {*} form | 216 | * @param {*} form |
213 | * @author: renchao | 217 | * @author: renchao |
214 | */ | 218 | */ |
215 | loadComponent (form) { | 219 | loadComponent(form) { |
216 | console.log(form, 'form'); | 220 | console.log(form, "form"); |
217 | this.componentTag = (r) => | 221 | this.componentTag = (r) => |
218 | require.ensure([], () => r(require("@/views/registerBook/" + form))); | 222 | require.ensure([], () => r(require("@/views/registerBook/" + form))); |
219 | } | 223 | }, |
220 | } | 224 | }, |
221 | } | 225 | }; |
222 | </script> | 226 | </script> |
223 | <style scoped lang="scss"> | 227 | <style scoped lang="scss"> |
224 | /deep/.rollTable { | 228 | /deep/.rollTable { |
225 | height: calc(100vh - 300px) !important; | 229 | height: calc(100vh - 300px) !important; |
226 | } | 230 | } |
227 | 231 | ||
228 | .content { | 232 | .content { |
229 | width: 100%; | 233 | width: 100%; |
230 | height: 100%; | 234 | height: 100%; |
231 | display: flex; | 235 | display: flex; |
... | @@ -247,35 +251,35 @@ | ... | @@ -247,35 +251,35 @@ |
247 | background-color: #f5f5f5; | 251 | background-color: #f5f5f5; |
248 | border: 1px solid rgb(228, 228, 228); | 252 | border: 1px solid rgb(228, 228, 228); |
249 | } | 253 | } |
250 | } | 254 | } |
251 | 255 | ||
252 | /deep/ .expanded.el-tree-node__expand-icon, | 256 | /deep/ .expanded.el-tree-node__expand-icon, |
253 | /deep/ .el-tree-node__expand-icon { | 257 | /deep/ .el-tree-node__expand-icon { |
254 | visibility: hidden; | 258 | visibility: hidden; |
255 | } | 259 | } |
256 | 260 | ||
257 | /deep/ .el-tree-node__content { | 261 | /deep/ .el-tree-node__content { |
258 | border: 1px solid rgb(228, 228, 228); | 262 | border: 1px solid rgb(228, 228, 228); |
259 | height: 45px; | 263 | height: 45px; |
260 | } | 264 | } |
261 | 265 | ||
262 | /deep/ .el-tree-node:focus > .el-tree-node__content { | 266 | /deep/ .el-tree-node:focus > .el-tree-node__content { |
263 | // background-color: #f5f5f5; | 267 | // background-color: #f5f5f5; |
264 | // color: #0079fe; | 268 | // color: #0079fe; |
265 | // border-right: 4px solid #0079fe; | 269 | // border-right: 4px solid #0079fe; |
266 | } | 270 | } |
267 | 271 | ||
268 | /deep/.el-tree-node { | 272 | /deep/.el-tree-node { |
269 | white-space: pre-wrap; | 273 | white-space: pre-wrap; |
270 | } | 274 | } |
271 | 275 | ||
272 | /deep/ .is-current > .el-tree-node__content { | 276 | /deep/ .is-current > .el-tree-node__content { |
273 | // background-color: #f5f5f5; | 277 | // background-color: #f5f5f5; |
274 | // color: #0079fe; | 278 | // color: #0079fe; |
275 | // border-right: 4px solid #0079fe; | 279 | // border-right: 4px solid #0079fe; |
276 | } | 280 | } |
277 | 281 | ||
278 | /deep/.el-collapse-item__header { | 282 | /deep/.el-collapse-item__header { |
279 | width: 100%; | 283 | width: 100%; |
280 | cursor: pointer; | 284 | cursor: pointer; |
281 | position: relative; | 285 | position: relative; |
... | @@ -300,37 +304,45 @@ | ... | @@ -300,37 +304,45 @@ |
300 | display: inline-block; | 304 | display: inline-block; |
301 | line-height: 45px; | 305 | line-height: 45px; |
302 | border: 1px solid rgb(228, 228, 228); | 306 | border: 1px solid rgb(228, 228, 228); |
303 | } | 307 | } |
304 | /deep/.el-collapse-item__content { | 308 | /deep/.el-collapse-item__content { |
305 | padding-bottom: 5px; | 309 | padding-bottom: 5px; |
306 | } | 310 | } |
307 | /deep/.sfqcontent { | 311 | /deep/.unselected { |
308 | white-space: wrap; | 312 | // white-space: wrap; |
309 | border: none; | 313 | border: none; |
310 | padding: 0; | ||
311 | margin: 0; | ||
312 | cursor: pointer; | 314 | cursor: pointer; |
313 | width: 100%; | 315 | width: 250px; |
314 | height: 100px; | ||
315 | word-break: break-word; | ||
316 | display: inline; | ||
317 | span { | ||
318 | font-size: 13px; | ||
319 | display: block; | ||
320 | line-height: 15px; | ||
321 | margin-left: 70px; | ||
322 | } | ||
323 | height: 45px; | 316 | height: 45px; |
324 | border: 1px solid rgb(228, 228, 228); | 317 | border: 1px solid rgb(228, 228, 228); |
325 | border-right: 4px solid #f5f5f5; | 318 | border-right: 4px solid #f5f5f5; |
319 | margin: auto; | ||
320 | text-align: center; | ||
321 | align-items: center; | ||
322 | span { | ||
323 | width: 100%; | ||
324 | display: inline-block; | ||
325 | justify-content: center; | ||
326 | align-items: center; | ||
326 | } | 327 | } |
327 | .sfqcontent:hover { | 328 | } |
328 | background-color: #f5f5f5; | 329 | |
329 | color: black; | 330 | .select { |
330 | } | 331 | border: none; |
331 | .sfqcontent:focus { | 332 | cursor: pointer; |
333 | width: 250px; | ||
334 | height: 45px; | ||
332 | background-color: #f5f5f5; | 335 | background-color: #f5f5f5; |
333 | color: #0079fe; | 336 | color: #0079fe; |
334 | border-right: 4px solid #0079fe; | 337 | border-right: 4px solid #0079fe; |
338 | margin: auto; | ||
339 | text-align: center; | ||
340 | align-items: center; | ||
341 | span { | ||
342 | width: 100%; | ||
343 | display: inline-block; | ||
344 | justify-content: center; | ||
345 | align-items: center; | ||
335 | } | 346 | } |
347 | } | ||
336 | </style> | 348 | </style> | ... | ... |
... | @@ -89,12 +89,12 @@ export function getNode (qllx, qlxx, bdcdylx, bdcdyid) { | ... | @@ -89,12 +89,12 @@ export function getNode (qllx, qlxx, bdcdylx, bdcdyid) { |
89 | if (qlxxPage[i].qllx == qllx) { | 89 | if (qlxxPage[i].qllx == qllx) { |
90 | if (qllx == "A04" || qllx == "A06" || qllx == "A08") { | 90 | if (qllx == "A04" || qllx == "A06" || qllx == "A08") { |
91 | if (bdcdylx == "4") { | 91 | if (bdcdylx == "4") { |
92 | node = { bdcdyid: bdcdyid, id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; | 92 | node = { bdcdyid: bdcdyid, id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; |
93 | } else { | 93 | } else { |
94 | node = { bdcdyid: bdcdyid, id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; | 94 | node = { bdcdyid: bdcdyid, id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; |
95 | } | 95 | } |
96 | } else { | 96 | } else { |
97 | node = { bdcdyid: bdcdyid, id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; | 97 | node = { bdcdyid: bdcdyid, id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" }; |
98 | } | 98 | } |
99 | break; | 99 | break; |
100 | } | 100 | } | ... | ... |
... | @@ -26,21 +26,26 @@ | ... | @@ -26,21 +26,26 @@ |
26 | :name="index" | 26 | :name="index" |
27 | > | 27 | > |
28 | <template slot="title"> | 28 | <template slot="title"> |
29 | <span class="text" @click="addlist(item)"> | 29 | <span class="text" @click="tap(item)"> |
30 | <span> | 30 | <span> |
31 | {{ item.label }} | 31 | {{ item.label }} |
32 | </span> | 32 | </span> |
33 | </span> | 33 | </span> |
34 | </template> | 34 | </template> |
35 | <el-button | 35 | <p |
36 | v-for="(item, index) in item.children" | 36 | v-for="(item, index) in item.children" |
37 | :re='item' | 37 | :re="item" |
38 | :key="index" | 38 | :key="index" |
39 | class="sfqcontent" | 39 | :class="[isActive == index ? activeCls : '', errorCls]" |
40 | @click="addlist(item, index)" | 40 | @click="taplist(item, index)" |
41 | > | 41 | > |
42 | <span> | ||
42 | {{ item.label }} | 43 | {{ item.label }} |
43 | </el-button> | 44 | </span> |
45 | <span> | ||
46 | {{ item.zt }} | ||
47 | </span> | ||
48 | </p> | ||
44 | </el-collapse-item> | 49 | </el-collapse-item> |
45 | </el-collapse> | 50 | </el-collapse> |
46 | </div> | 51 | </div> |
... | @@ -79,6 +84,9 @@ export default { | ... | @@ -79,6 +84,9 @@ export default { |
79 | queryForm: {}, | 84 | queryForm: {}, |
80 | 85 | ||
81 | defaultNode: "", | 86 | defaultNode: "", |
87 | isActive: "", | ||
88 | activeCls: "select", | ||
89 | errorCls: "unselected", | ||
82 | defaultProps: { | 90 | defaultProps: { |
83 | value: "id", | 91 | value: "id", |
84 | children: "children", | 92 | children: "children", |
... | @@ -176,13 +184,9 @@ export default { | ... | @@ -176,13 +184,9 @@ export default { |
176 | return item.bdcdyid == val.bdcdyid; | 184 | return item.bdcdyid == val.bdcdyid; |
177 | }); | 185 | }); |
178 | this.activeName = index | 186 | this.activeName = index |
179 | this.setstyle(index, 0, this.iskey); | ||
180 | } else { | 187 | } else { |
181 | this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); | 188 | this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); |
182 | this.activeName = this.sfqdata.length - 1; | 189 | this.activeName = this.sfqdata.length - 1; |
183 | this.$nextTick(() => { | ||
184 | this.setstyle(this.sfqdata.length - 1, 0, this.iskey); | ||
185 | }) | ||
186 | } | 190 | } |
187 | } | 191 | } |
188 | }); | 192 | }); |
... | @@ -215,13 +219,14 @@ export default { | ... | @@ -215,13 +219,14 @@ export default { |
215 | ); | 219 | ); |
216 | this.sfqdata[0].children.forEach((item, index) => { | 220 | this.sfqdata[0].children.forEach((item, index) => { |
217 | if (item.id == this.defaultNode.id) { | 221 | if (item.id == this.defaultNode.id) { |
218 | this.iskey = index | 222 | this.loadComponent(item.form); |
223 | this.isActive = index; | ||
219 | } | 224 | } |
220 | }) | 225 | }) |
221 | // this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 | 226 | // this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 |
222 | // this.loadComponent(this.defaultNode.form); | 227 | // this.loadComponent(this.defaultNode.form); |
223 | 228 | ||
224 | this.setstyle(0, 0, this.iskey); | 229 | // this.setstyle(0, 0, this.iskey); |
225 | 230 | ||
226 | 231 | ||
227 | }); | 232 | }); |
... | @@ -252,49 +257,41 @@ export default { | ... | @@ -252,49 +257,41 @@ export default { |
252 | * @author: renchao | 257 | * @author: renchao |
253 | * 设置样式和点击定位到当前功能 | 258 | * 设置样式和点击定位到当前功能 |
254 | */ | 259 | */ |
255 | setstyle (newindex, index, key) { | 260 | // setstyle (newindex, index, key) { |
256 | if (key != undefined || this.keyy == index) { | 261 | // if (key != undefined || this.keyy == index) { |
257 | if (key != undefined) { | 262 | // if (key != undefined) { |
258 | this.keyy = key | 263 | // this.keyy = key |
259 | } | 264 | // } |
260 | this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form); | 265 | // this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form); |
261 | let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el | 266 | // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el |
262 | dpme.style.backgroundColor = "#f5f5f5"; | 267 | // dpme.style.backgroundColor = "#f5f5f5"; |
263 | dpme.style.color = "#0079fe"; | 268 | // dpme.style.color = "#0079fe"; |
264 | dpme.style.borderRight = "4px solid #0079fe"; | 269 | // dpme.style.borderRight = "4px solid #0079fe"; |
265 | } else { | 270 | // } else { |
266 | let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el | 271 | // let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el |
267 | dpme.style.backgroundColor = "#ffffff"; | 272 | // dpme.style.backgroundColor = "#ffffff"; |
268 | dpme.style.color = "black"; | 273 | // dpme.style.color = "black"; |
269 | dpme.style.border = "none"; | 274 | // dpme.style.border = "none"; |
270 | } | 275 | // } |
271 | 276 | // }, | |
272 | 277 | /** | |
273 | 278 | * @description: tap | |
274 | 279 | * @param {*} data | |
280 | * @author: renchao | ||
281 | * 新增列表功能 | ||
282 | */ | ||
283 | tap(data, index) { | ||
284 | this.loadComponent(data.form); | ||
275 | }, | 285 | }, |
276 | /** | 286 | /** |
277 | * @description: addlist | 287 | * @description: taplist |
278 | * @param {*} data | 288 | * @param {*} data |
279 | * @author: renchao | 289 | * @author: renchao |
280 | * 新增列表功能 | 290 | * 新增列表功能 |
281 | */ | 291 | */ |
282 | addlist (data, index) { | 292 | taplist(data, index) { |
283 | if (index != undefined) { | ||
284 | let newindex = this.sfqdata.findIndex((item) => { | ||
285 | return item.bdcdyid == data.bdcdyid; | ||
286 | }); | ||
287 | this.setstyle(newindex, index); | ||
288 | this.currentSelectProps.bdcdyid = data.bdcdyid; | ||
289 | this.loadComponent(data.form); | 293 | this.loadComponent(data.form); |
290 | } else { | 294 | this.isActive = index; |
291 | let newindex = this.sfqdata.findIndex((item) => { | ||
292 | return item.bdcdyid == data.bdcdyid; | ||
293 | }); | ||
294 | this.setstyle(newindex, index, this.iskey); | ||
295 | this.currentSelectProps.bdcdyid = data.bdcdyid; | ||
296 | } | ||
297 | |||
298 | }, | 295 | }, |
299 | /** | 296 | /** |
300 | * @description: loadComponent | 297 | * @description: loadComponent |
... | @@ -390,33 +387,41 @@ export default { | ... | @@ -390,33 +387,41 @@ export default { |
390 | /deep/.el-collapse-item__content { | 387 | /deep/.el-collapse-item__content { |
391 | padding-bottom: 5px; | 388 | padding-bottom: 5px; |
392 | } | 389 | } |
393 | /deep/.sfqcontent { | 390 | /deep/.unselected { |
394 | white-space: wrap; | 391 | // white-space: wrap; |
395 | border: none; | 392 | border: none; |
396 | padding: 0; | ||
397 | margin: 0; | ||
398 | cursor: pointer; | 393 | cursor: pointer; |
399 | width: 100%; | 394 | width: 250px; |
400 | height: 100px; | ||
401 | word-break: break-word; | ||
402 | display: inline; | ||
403 | span { | ||
404 | font-size: 13px; | ||
405 | display: block; | ||
406 | line-height: 15px; | ||
407 | margin-left: 70px; | ||
408 | } | ||
409 | height: 45px; | 395 | height: 45px; |
410 | border: 1px solid rgb(228, 228, 228); | 396 | border: 1px solid rgb(228, 228, 228); |
411 | border-right: 4px solid #f5f5f5; | 397 | border-right: 4px solid #f5f5f5; |
398 | margin: auto; | ||
399 | text-align: center; | ||
400 | align-items: center; | ||
401 | span { | ||
402 | width: 100%; | ||
403 | display: inline-block; | ||
404 | justify-content: center; | ||
405 | align-items: center; | ||
406 | } | ||
412 | } | 407 | } |
413 | .sfqcontent:hover { | 408 | |
414 | background-color: #f5f5f5; | 409 | .select { |
415 | color: black; | 410 | border: none; |
416 | } | 411 | cursor: pointer; |
417 | .sfqcontent:focus { | 412 | width: 250px; |
413 | height: 45px; | ||
418 | background-color: #f5f5f5; | 414 | background-color: #f5f5f5; |
419 | color: #0079fe; | 415 | color: #0079fe; |
420 | border-right: 4px solid #0079fe; | 416 | border-right: 4px solid #0079fe; |
417 | margin: auto; | ||
418 | text-align: center; | ||
419 | align-items: center; | ||
420 | span { | ||
421 | width: 100%; | ||
422 | display: inline-block; | ||
423 | justify-content: center; | ||
424 | align-items: center; | ||
425 | } | ||
421 | } | 426 | } |
422 | </style> | 427 | </style> | ... | ... |
-
Please register or sign in to post a comment