恢复代码
Showing
1 changed file
with
248 additions
and
236 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2024-01-31 09:52:39 | 4 | * @LastEditTime: 2023-07-19 09:52:59 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="content loadingtext"> | 7 | <div class="content loadingtext"> |
| ... | @@ -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,7 +23,8 @@ | ... | @@ -22,7 +23,8 @@ |
| 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="tap(item)"> | 29 | <span class="text" @click="tap(item)"> |
| 28 | <span> | 30 | <span> |
| ... | @@ -35,7 +37,8 @@ | ... | @@ -35,7 +37,8 @@ |
| 35 | :re="item" | 37 | :re="item" |
| 36 | :key="index" | 38 | :key="index" |
| 37 | :class="[isActive == index ? activeCls : '', errorCls]" | 39 | :class="[isActive == index ? activeCls : '', errorCls]" |
| 38 | @click="taplist(item, index)"> | 40 | @click="taplist(item, index)" |
| 41 | > | ||
| 39 | <span> | 42 | <span> |
| 40 | {{ item.label }} | 43 | {{ item.label }} |
| 41 | </span> | 44 | </span> |
| ... | @@ -50,43 +53,146 @@ | ... | @@ -50,43 +53,146 @@ |
| 50 | <component | 53 | <component |
| 51 | :is="componentTag" | 54 | :is="componentTag" |
| 52 | @getBdcdyh="getBdcdyh" | 55 | @getBdcdyh="getBdcdyh" |
| 53 | v-bind="currentSelectProps" /> | 56 | v-bind="currentSelectProps" |
| 57 | /> | ||
| 54 | </div> | 58 | </div> |
| 55 | </div> | 59 | </div> |
| 56 | </template> | 60 | </template> |
| 57 | <script> | 61 | <script> |
| 58 | import { getBdcqljqtsx, getBdcqljqtsxBdcdyh } from "@/api/djbDetail.js"; | 62 | import { getBdcqljqtsx, getBdcqljqtsxBdcdyh } from "@/api/djbDetail.js"; |
| 59 | import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; | 63 | import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js"; |
| 60 | export default { | 64 | export default { |
| 61 | data () { | 65 | data() { |
| 62 | return { | 66 | return { |
| 63 | //接收参数 | 67 | //接收参数 |
| 64 | // propsParam: this.$attrs, | 68 | // propsParam: this.$attrs, |
| 65 | //左侧目录 | 69 | //左侧目录 |
| 66 | catalog: {}, | 70 | catalog: {}, |
| 67 | //选择加载哪一个组件 | 71 | //选择加载哪一个组件 |
| 68 | componentTag: "", | 72 | componentTag: "", |
| 69 | //子组件接收参数 | 73 | //子组件接收参数 |
| 70 | currentSelectProps: {}, | 74 | currentSelectProps: {}, |
| 71 | //左侧树形结构数据 | 75 | //左侧树形结构数据 |
| 72 | treedata: [], | 76 | treedata: [], |
| 73 | sfqdata: [], | 77 | sfqdata: [], |
| 74 | keyy: "", | 78 | keyy: "", |
| 75 | iskey: "", | 79 | iskey: "", |
| 76 | activeName: 0, | 80 | activeName: 0, |
| 77 | // 查询参数 | 81 | // 查询参数 |
| 78 | queryForm: {}, | 82 | queryForm: {}, |
| 79 | 83 | ||
| 80 | defaultNode: "", | 84 | defaultNode: "", |
| 81 | isActive: "", | 85 | isActive: "", |
| 82 | activeCls: "select", | 86 | activeCls: "select", |
| 83 | errorCls: "unselected", | 87 | errorCls: "unselected", |
| 84 | defaultProps: { | 88 | defaultProps: { |
| 85 | value: "id", | 89 | value: "id", |
| 86 | children: "children", | 90 | children: "children", |
| 87 | label: "label", | 91 | label: "label", |
| 88 | }, | 92 | }, |
| 89 | showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 | 93 | showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 |
| 94 | }; | ||
| 95 | }, | ||
| 96 | mounted() { | ||
| 97 | this.loadData(this.getCaption(window.location.href)); | ||
| 98 | }, | ||
| 99 | methods: { | ||
| 100 | // 截取字符的方法 | ||
| 101 | /** | ||
| 102 | * @description: 截取字符的方法 | ||
| 103 | * @param {*} obj | ||
| 104 | * @author: renchao | ||
| 105 | */ | ||
| 106 | getCaption(obj) { | ||
| 107 | let index = obj.lastIndexOf("="); | ||
| 108 | obj = obj.substring(index + 1, obj.length); | ||
| 109 | return obj; | ||
| 110 | }, | ||
| 111 | // 通过不动产业务号获取参数 | ||
| 112 | /** | ||
| 113 | * @description: 通过不动产业务号获取参数 | ||
| 114 | * @author: renchao | ||
| 115 | */ | ||
| 116 | // getdata () { | ||
| 117 | // this.queryForm = { | ||
| 118 | // bdcdyh: this.getCaption(window.location.href), | ||
| 119 | // currentPage: 1, | ||
| 120 | // djlx: "", | ||
| 121 | // pageSize: 10, | ||
| 122 | // qllx: "", | ||
| 123 | // ywh: "", | ||
| 124 | // ywly: "", | ||
| 125 | // }; | ||
| 126 | // if (this.queryForm) { | ||
| 127 | // this.$startLoading(); | ||
| 128 | // searchTaskToDo({ | ||
| 129 | // ...this.queryForm, | ||
| 130 | // }).then((res) => { | ||
| 131 | // if (res.code === 200) { | ||
| 132 | // let { records } = res.result; | ||
| 133 | |||
| 134 | // this.loadBdcdylist(records[0].bsmSlsq, records[0].bestepid); | ||
| 135 | // this.$endLoading(); | ||
| 136 | // } | ||
| 137 | // }); | ||
| 138 | // } | ||
| 139 | // }, | ||
| 140 | |||
| 141 | // 获取不动产信息 | ||
| 142 | /** | ||
| 143 | * @description: 获取不动产信息 | ||
| 144 | * @param {*} a | ||
| 145 | * @param {*} b | ||
| 146 | * @author: renchao | ||
| 147 | */ | ||
| 148 | // loadBdcdylist (a, b) { | ||
| 149 | // var formdata = new FormData(); | ||
| 150 | // formdata.append("bsmSlsq", a); | ||
| 151 | // formdata.append("bestepid", b); | ||
| 152 | // leftMenu(formdata).then((res) => { | ||
| 153 | // if (res.code === 200) { | ||
| 154 | // if (res.result) { | ||
| 155 | // this.currentSelectProps = res.result[0]; | ||
| 156 | // this.loadData(this.currentSelectProps.bdcdyh); | ||
| 157 | // } | ||
| 158 | // } | ||
| 159 | // }); | ||
| 160 | // }, | ||
| 161 | |||
| 162 | /** | ||
| 163 | * @description: getBdcdyh | ||
| 164 | * @author: miaofang | ||
| 165 | * 点击不动产单元号事件 | ||
| 166 | */ | ||
| 167 | getBdcdyh(val) { | ||
| 168 | this.addloadData(val); | ||
| 169 | }, | ||
| 170 | /** | ||
| 171 | * @description: addloadData | ||
| 172 | * @author: miaofang | ||
| 173 | */ | ||
| 174 | addloadData(val) { | ||
| 175 | getBdcqljqtsx({ | ||
| 176 | bdcdyid: val.bdcdyid, | ||
| 177 | bdcdyh: val.bdcdyh, | ||
| 178 | }).then((res) => { | ||
| 179 | if (res.code === 200) { | ||
| 180 | if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) { | ||
| 181 | let index = this.sfqdata.findIndex((item) => { | ||
| 182 | return item.bdcdyid == val.bdcdyid; | ||
| 183 | }); | ||
| 184 | this.activeName = index; | ||
| 185 | } else { | ||
| 186 | this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); | ||
| 187 | this.activeName = this.sfqdata.length - 1; | ||
| 188 | } | ||
| 189 | } | ||
| 190 | }); | ||
| 191 | this.currentSelectProps = { | ||
| 192 | bdcdyid: val.bdcdyid, | ||
| 193 | bdcdyh: val.bdcdyh, | ||
| 194 | qllx: this.currentSelectProps.qllx, | ||
| 195 | bsmQlxx: this.currentSelectProps.bsmQlxx, | ||
| 90 | }; | 196 | }; |
| 91 | }, | 197 | }, |
| 92 | /** | 198 | /** |
| ... | @@ -182,229 +288,135 @@ | ... | @@ -182,229 +288,135 @@ |
| 182 | this.loadComponent(data.form); | 288 | this.loadComponent(data.form); |
| 183 | this.isActive = index; | 289 | this.isActive = index; |
| 184 | }, | 290 | }, |
| 185 | methods: { | 291 | /** |
| 186 | // 截取字符的方法 | ||
| 187 | /** | ||
| 188 | * @description: 截取字符的方法 | ||
| 189 | * @param {*} obj | ||
| 190 | * @author: renchao | ||
| 191 | */ | ||
| 192 | getCaption (obj) { | ||
| 193 | let index = obj.lastIndexOf("="); | ||
| 194 | obj = obj.substring(index + 1, obj.length); | ||
| 195 | return obj; | ||
| 196 | }, | ||
| 197 | /** | ||
| 198 | * @description: getBdcdyh | ||
| 199 | * @author: miaofang | ||
| 200 | * 点击不动产单元号事件 | ||
| 201 | */ | ||
| 202 | getBdcdyh (val) { | ||
| 203 | this.addloadData(val); | ||
| 204 | }, | ||
| 205 | /** | ||
| 206 | * @description: addloadData | ||
| 207 | * @author: miaofang | ||
| 208 | */ | ||
| 209 | addloadData (val) { | ||
| 210 | getBdcqljqtsx({ | ||
| 211 | bdcdyid: val.bdcdyid, | ||
| 212 | bdcdyh: val.bdcdyh, | ||
| 213 | }).then((res) => { | ||
| 214 | if (res.code === 200) { | ||
| 215 | if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) { | ||
| 216 | let index = this.sfqdata.findIndex((item) => { | ||
| 217 | return item.bdcdyid == val.bdcdyid; | ||
| 218 | }); | ||
| 219 | this.activeName = index; | ||
| 220 | } else { | ||
| 221 | this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); | ||
| 222 | this.activeName = this.sfqdata.length - 1; | ||
| 223 | } | ||
| 224 | } | ||
| 225 | }); | ||
| 226 | this.currentSelectProps = { | ||
| 227 | bdcdyid: val.bdcdyid, | ||
| 228 | bdcdyh: val.bdcdyh, | ||
| 229 | qllx: this.currentSelectProps.qllx, | ||
| 230 | bsmQlxx: this.currentSelectProps.bsmQlxx, | ||
| 231 | }; | ||
| 232 | }, | ||
| 233 | /** | ||
| 234 | * @description: loadData | ||
| 235 | * @author: renchao | ||
| 236 | */ | ||
| 237 | loadData (val) { | ||
| 238 | getBdcqljqtsxBdcdyh({ | ||
| 239 | bdcdyh: val, | ||
| 240 | }).then((res) => { | ||
| 241 | if (res.code === 200) { | ||
| 242 | this.treedata = loadTreeData(val); | ||
| 243 | this.sfqdata.push(loadsfqData(res.result, val, res.result.bdcdyid)); | ||
| 244 | this.$nextTick(function () { | ||
| 245 | this.defaultNode = getNode( | ||
| 246 | res.result.ztqllx, | ||
| 247 | { linShi: 0, xianShi: 0, liShi: 0 }, | ||
| 248 | res.result.bdcdylx || "" | ||
| 249 | ); | ||
| 250 | this.sfqdata[0].children.forEach((item, index) => { | ||
| 251 | if (item.id == this.defaultNode.id) { | ||
| 252 | this.loadComponent(item.form); | ||
| 253 | this.isActive = index; | ||
| 254 | } | ||
| 255 | }); | ||
| 256 | this.currentSelectProps = { | ||
| 257 | bdcdyid: res.result.bdcdyid, | ||
| 258 | bdcdyh: val, | ||
| 259 | qllx: res.result.qllx, | ||
| 260 | bsmQlxx: this.currentSelectProps.bsmQlxx, | ||
| 261 | }; | ||
| 262 | }) | ||
| 263 | } | ||
| 264 | }) | ||
| 265 | }, | ||
| 266 | /** | ||
| 267 | * @description: 点击登记簿菜单 | ||
| 268 | * @param {*} data | ||
| 269 | * @author: renchao | ||
| 270 | */ | ||
| 271 | handleNodeClick (data) { | ||
| 272 | this.loadComponent(data.form); | ||
| 273 | }, | ||
| 274 | tap (data, index) { | ||
| 275 | this.loadComponent(data.form); | ||
| 276 | }, | ||
| 277 | /** | ||
| 278 | * @description: taplist | ||
| 279 | * @param {*} data | ||
| 280 | * @author: renchao | ||
| 281 | * 新增列表功能 | ||
| 282 | */ | ||
| 283 | taplist (data, index) { | ||
| 284 | this.loadComponent(data.form); | ||
| 285 | this.isActive = index; | ||
| 286 | }, | ||
| 287 | /** | ||
| 288 | * @description: loadComponent | 292 | * @description: loadComponent |
| 289 | * @param {*} form | 293 | * @param {*} form |
| 290 | * @author: renchao | 294 | * @author: renchao |
| 291 | */ | 295 | */ |
| 292 | loadComponent (form) { | 296 | loadComponent(form) { |
| 293 | this.componentTag = (r) => | 297 | this.componentTag = (r) => |
| 294 | require.ensure([], () => r(require("@/views/registerBook/" + form))); | 298 | require.ensure([], () => r(require("@/views/registerBook/" + form))); |
| 295 | } | 299 | }, |
| 296 | } | 300 | }, |
| 297 | } | 301 | }; |
| 298 | </script> | 302 | </script> |
| 299 | <style scoped lang="scss"> | 303 | <style scoped lang="scss"> |
| 300 | /deep/.rollTable { | 304 | /deep/.rollTable { |
| 301 | height: calc(120vh - 254px) !important; | 305 | height: calc(120vh - 254px) !important; |
| 306 | } | ||
| 307 | |||
| 308 | .content { | ||
| 309 | width: 100%; | ||
| 310 | height: 100%; | ||
| 311 | display: flex; | ||
| 312 | |||
| 313 | .left { | ||
| 314 | width: 256px; | ||
| 315 | height: 100%; | ||
| 316 | background-color: #f5f5f5; | ||
| 317 | color: #333; | ||
| 318 | border: 1px solid rgb(228, 228, 228); | ||
| 302 | } | 319 | } |
| 303 | 320 | ||
| 304 | .content { | 321 | .right { |
| 305 | width: 100%; | 322 | width: calc(100% - 256px); |
| 306 | height: 100%; | 323 | height: 100%; |
| 307 | display: flex; | 324 | // overflow-y: scroll; |
| 325 | overflow: auto; | ||
| 326 | background-color: #f5f5f5; | ||
| 327 | border: 1px solid rgb(228, 228, 228); | ||
| 328 | } | ||
| 329 | } | ||
| 308 | 330 | ||
| 309 | .left { | 331 | /deep/ .expanded.el-tree-node__expand-icon, |
| 310 | width: 256px; | 332 | /deep/ .el-tree-node__expand-icon { |
| 311 | height: 100%; | 333 | visibility: hidden; |
| 312 | background-color: #f5f5f5; | 334 | } |
| 313 | color: #333; | ||
| 314 | border: 1px solid rgb(228, 228, 228); | ||
| 315 | } | ||
| 316 | 335 | ||
| 317 | .right { | 336 | /deep/ .el-tree-node__content { |
| 318 | width: calc(100% - 256px); | 337 | border: 1px solid rgb(228, 228, 228); |
| 319 | height: 100%; | 338 | height: 45px; |
| 320 | // overflow-y: scroll; | 339 | } |
| 321 | overflow: auto; | ||
| 322 | background-color: #f5f5f5; | ||
| 323 | border: 1px solid rgb(228, 228, 228); | ||
| 324 | } | ||
| 325 | } | ||
| 326 | 340 | ||
| 327 | /deep/ .expanded.el-tree-node__expand-icon, | 341 | /deep/ .el-tree-node:focus > .el-tree-node__content { |
| 328 | /deep/ .el-tree-node__expand-icon { | 342 | // background-color: #f5f5f5; |
| 329 | visibility: hidden; | 343 | // color: #0079fe; |
| 330 | } | 344 | // border-right: 4px solid #0079fe; |
| 345 | } | ||
| 331 | 346 | ||
| 332 | /deep/ .el-tree-node__content { | 347 | /deep/.el-tree-node { |
| 333 | border: 1px solid rgb(228, 228, 228); | 348 | white-space: pre-wrap; |
| 334 | height: 45px; | 349 | } |
| 335 | } | ||
| 336 | 350 | ||
| 337 | /deep/.el-tree-node { | 351 | /deep/ .is-current > .el-tree-node__content { |
| 338 | white-space: pre-wrap; | 352 | // background-color: #f5f5f5; |
| 353 | // color: #0079fe; | ||
| 354 | // border-right: 4px solid #0079fe; | ||
| 355 | } | ||
| 356 | /deep/.el-collapse-item__header { | ||
| 357 | width: 100%; | ||
| 358 | cursor: pointer; | ||
| 359 | position: relative; | ||
| 360 | .el-collapse-item__arrow { | ||
| 361 | position: absolute; | ||
| 362 | top: 15px; | ||
| 363 | right: 0px; | ||
| 339 | } | 364 | } |
| 340 | 365 | align-items: center; | |
| 341 | /deep/.el-collapse-item__header { | 366 | .text { |
| 342 | width: 100%; | 367 | width: 100%; |
| 343 | cursor: pointer; | ||
| 344 | position: relative; | ||
| 345 | .el-collapse-item__arrow { | ||
| 346 | position: absolute; | ||
| 347 | top: 15px; | ||
| 348 | right: 0px; | ||
| 349 | } | ||
| 350 | align-items: center; | ||
| 351 | .text { | ||
| 352 | width: 100%; | ||
| 353 | height: 45px; | ||
| 354 | display: inline-block; | ||
| 355 | span { | ||
| 356 | margin-left: 60px; | ||
| 357 | padding-top: 10px; | ||
| 358 | display: inline-block; | ||
| 359 | line-height: 15px; | ||
| 360 | } | ||
| 361 | height: 45px; | ||
| 362 | border: 1px solid rgb(228, 228, 228); | ||
| 363 | border-right: 4px solid #f5f5f5; | ||
| 364 | } | ||
| 365 | height: 45px; | 368 | height: 45px; |
| 366 | display: inline-block; | 369 | display: inline-block; |
| 367 | line-height: 45px; | ||
| 368 | border: 1px solid rgb(228, 228, 228); | ||
| 369 | } | ||
| 370 | /deep/.el-collapse-item__content { | ||
| 371 | padding-bottom: 5px; | ||
| 372 | } | ||
| 373 | /deep/.unselected { | ||
| 374 | // white-space: wrap; | ||
| 375 | border: none; | ||
| 376 | cursor: pointer; | ||
| 377 | width: 250px; | ||
| 378 | height: 45px; | ||
| 379 | border: 1px solid rgb(228, 228, 228); | ||
| 380 | border-right: 4px solid #f5f5f5; | ||
| 381 | margin: auto; | ||
| 382 | text-align: center; | ||
| 383 | align-items: center; | ||
| 384 | span { | 370 | span { |
| 385 | width: 100%; | 371 | margin-left: 60px; |
| 372 | padding-top: 10px; | ||
| 386 | display: inline-block; | 373 | display: inline-block; |
| 387 | justify-content: center; | 374 | line-height: 15px; |
| 388 | align-items: center; | ||
| 389 | } | 375 | } |
| 390 | } | 376 | } |
| 377 | height: 45px; | ||
| 378 | display: inline-block; | ||
| 379 | line-height: 45px; | ||
| 380 | border: 1px solid rgb(228, 228, 228); | ||
| 381 | } | ||
| 382 | /deep/.el-collapse-item__content { | ||
| 383 | padding-bottom: 5px; | ||
| 384 | } | ||
| 385 | /deep/.unselected { | ||
| 386 | // white-space: wrap; | ||
| 387 | border: none; | ||
| 388 | cursor: pointer; | ||
| 389 | width: 250px; | ||
| 390 | height: 45px; | ||
| 391 | border: 1px solid rgb(228, 228, 228); | ||
| 392 | border-right: 4px solid #f5f5f5; | ||
| 393 | margin: auto; | ||
| 394 | text-align: center; | ||
| 395 | align-items: center; | ||
| 396 | span { | ||
| 397 | width: 100%; | ||
| 398 | display: inline-block; | ||
| 399 | justify-content: center; | ||
| 400 | align-items: center; | ||
| 401 | } | ||
| 402 | } | ||
| 391 | 403 | ||
| 392 | .select { | 404 | .select { |
| 393 | border: none; | 405 | border: none; |
| 394 | cursor: pointer; | 406 | cursor: pointer; |
| 395 | width: 250px; | 407 | width: 250px; |
| 396 | height: 45px; | 408 | height: 45px; |
| 397 | background-color: #f5f5f5; | 409 | background-color: #f5f5f5; |
| 398 | color: #0079fe; | 410 | color: #0079fe; |
| 399 | border-right: 4px solid #0079fe; | 411 | border-right: 4px solid #0079fe; |
| 400 | margin: auto; | 412 | margin: auto; |
| 401 | text-align: center; | 413 | text-align: center; |
| 414 | align-items: center; | ||
| 415 | span { | ||
| 416 | width: 100%; | ||
| 417 | display: inline-block; | ||
| 418 | justify-content: center; | ||
| 402 | align-items: center; | 419 | align-items: center; |
| 403 | span { | ||
| 404 | width: 100%; | ||
| 405 | display: inline-block; | ||
| 406 | justify-content: center; | ||
| 407 | align-items: center; | ||
| 408 | } | ||
| 409 | } | 420 | } |
| 421 | } | ||
| 410 | </style> | 422 | </style> | ... | ... |
-
Please register or sign in to post a comment