18fb52ac by xiaomiao

登记簿左侧菜单重构

1 parent 56ab0c7f
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
4 * @LastEditTime: 2023-07-28 15:45:21 4 * @LastEditTime: 2023-07-28 15:45:21
5 */ 5 */
6 import { getUserInfo } from '@/api/user' 6 import { getUserInfo } from '@/api/user'
7 import { log } from 'bpmn-js-token-simulation'
8 const state = { 7 const state = {
9 name: '', 8 name: '',
10 userInfo:{}, 9 userInfo:{},
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 </tr> 18 </tr>
19 <tr v-for="(item, index) in bdcqlml" :key="index"> 19 <tr v-for="(item, index) in bdcqlml" :key="index">
20 <td>{{ index + 1 }}</td> 20 <td>{{ index + 1 }}</td>
21 <td><el-link type="primary" @click="handleSelectBdcdyh(item.bdcdyh)" :underline="false">{{ item.bdcdyh }} </el-link></td> 21 <td><el-link type="primary" @click="handleSelectBdcdyh(item)" :underline="false">{{ item.bdcdyh }} </el-link></td>
22 <td>{{ item.bdclx }}</td> 22 <td>{{ item.bdclx }}</td>
23 <td>{{ item.szbs }}</td> 23 <td>{{ item.szbs }}</td>
24 <td>{{ item.bz }}</td> 24 <td>{{ item.bz }}</td>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 --> 5 -->
6 <template> 6 <template>
7 <div class="bdcqljqtsx"> 7 <div class="bdcqljqtsx">
8 <div class="content"> 8 <div class="content" v-if="qlxxList.ztqlmc">
9 <div class="title">不动产权利及其他事项<br />登记信息</div> 9 <div class="title">不动产权利及其他事项<br />登记信息</div>
10 <div> 10 <div>
11 不动产单元号: 11 不动产单元号:
......
...@@ -6,21 +6,60 @@ ...@@ -6,21 +6,60 @@
6 <template> 6 <template>
7 <div class="content"> 7 <div class="content">
8 <div class="left"> 8 <div class="left">
9 <el-tree ref="tree" :data="treedata" :props="defaultProps" @node-click="handleNodeClick" 9 <el-tree
10 :default-expand-all="true" :expand-on-click-node="false" node-key="id" :default-checked-keys="[showTab]"> 10 ref="tree"
11 :data="treedata"
12 :props="defaultProps"
13 @node-click="handleNodeClick"
14 :default-expand-all="true"
15 :expand-on-click-node="false"
16 node-key="id"
17 :default-checked-keys="[showTab]"
18 >
11 </el-tree> 19 </el-tree>
20 <el-collapse v-model="activeName" accordion>
21 <el-collapse-item
22 class="sfqqq"
23 ref="sfq"
24 v-for="(item, index) in sfqdata"
25 :key="index"
26 :name="index"
27 >
28 <template slot="title">
29 <span class="text" @click="addlist(item)">
30 <span>
31 {{ item.label }}
32 </span>
33 </span>
34 </template>
35 <el-button
36 v-for="(item, index) in item.children"
37 :re='item'
38 :key="index"
39 class="sfqcontent"
40 @click="addlist(item, index)"
41 >
42 {{ item.label }}
43 </el-button>
44 </el-collapse-item>
45 </el-collapse>
12 </div> 46 </div>
13 <div class="right"> 47 <div class="right">
14 <component :is="componentTag" @getBdcdyh="getBdcdyh" v-bind="currentSelectProps" /> 48 <component
49 :is="componentTag"
50 @getBdcdyh="getBdcdyh"
51 v-bind="currentSelectProps"
52 />
15 </div> 53 </div>
16 </div> 54 </div>
17 </template> 55 </template>
18 <script> 56 <script>
19 import { getBdcqljqtsx } from "@/api/djbDetail.js"; 57 import { getBdcqljqtsx } from "@/api/djbDetail.js";
20 import { loadTreeData, getNode } from "./djbFrameData.js"; 58 import { loadTreeData, loadsfqData, getNode } from "./djbFrameData.js";
21 export default { 59 export default {
22 data () { 60 data() {
23 return { 61 return {
62 activeName: 0,
24 //接收参数 63 //接收参数
25 // propsParam: this.$attrs, 64 // propsParam: this.$attrs,
26 //左侧目录 65 //左侧目录
...@@ -31,6 +70,7 @@ ...@@ -31,6 +70,7 @@
31 currentSelectProps: {}, 70 currentSelectProps: {},
32 //左侧树形结构数据 71 //左侧树形结构数据
33 treedata: [], 72 treedata: [],
73 sfqdata: [],
34 defaultNode: "", 74 defaultNode: "",
35 defaultProps: { 75 defaultProps: {
36 value: "id", 76 value: "id",
...@@ -41,47 +81,125 @@ ...@@ -41,47 +81,125 @@
41 }; 81 };
42 }, 82 },
43 props: ["formData"], 83 props: ["formData"],
44 mounted () { 84 mounted() {
45 this.loadData(this.formData.bdcdyh); 85 this.loadData(this.formData.bdcdyh);
46 }, 86 },
47 methods: { 87 methods: {
48 getBdcdyh (val) { 88
49 console.log(val, ';222222222222'); 89 /**
50 // this.loadData(val); 90 * @description: getBdcdyh
91 * @author: miaofang
92 * 点击不动产单元号事件
93 */
94 getBdcdyh(val) {
95 this.addloadData(val);
96 },
97 /**
98 * @description: addloadData
99 * @author: miaofang
100 */
101 addloadData(val) {
102 getBdcqljqtsx({
103 bdcdyid: val.bdcdyid,
104 bdcdyh: val.bdcdyh,
105 }).then((res) => {
106 if (res.code === 200) {
107 if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) {
108 let index= this.sfqdata.findIndex((item) => {
109 return item.bdcdyid ==val.bdcdyid;
110 });
111 this.activeName=index
112 this.setstyle(index,0);
113 } else {
114 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid));
115 this.activeName = this.sfqdata.length - 1;
116 this.$nextTick(() => {
117 this.setstyle(this.sfqdata.length - 1,0);
118 })
119 }
120 }
121 });
122 this.currentSelectProps = {
123 bdcdyid: val.bdcdyid,
124 bdcdyh: val.bdcdyh,
125 qllx: this.formData.qllx,
126 bsmQlxx: this.formData.bsmQlxx,
127 };
51 }, 128 },
52 /** 129 /**
53 * @description: loadData 130 * @description: loadData
54 * @author: renchao 131 * @author: renchao
55 */ 132 */
56 loadData (val) { 133 loadData(val) {
57 getBdcqljqtsx({ 134 getBdcqljqtsx({
58 bdcdyid: this.formData.bdcdyid, 135 bdcdyid: this.formData.bdcdyid,
59 bdcdyh: val, 136 bdcdyh: val,
60 }).then((res) => { 137 }).then((res) => {
61 if (res.code === 200) { 138 if (res.code === 200) {
62 this.treedata = loadTreeData(res.result, this.formData.bdcdyh); 139 this.treedata = loadTreeData(val);
140 this.sfqdata.push(
141 loadsfqData(res.result, val, this.formData.bdcdyid)
142 );
63 this.$nextTick(function () { 143 this.$nextTick(function () {
64 this.defaultNode = getNode(this.formData.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, this.formData.bdcdylx || ""); 144 this.defaultNode = getNode(
145 this.formData.qllx,
146 { linShi: 0, xianShi: 0, liShi: 0 },
147 this.formData.bdcdylx || ""
148 );
65 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 149 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
66 this.loadComponent(this.defaultNode.form); 150 this.loadComponent(this.defaultNode.form);
67 }) 151 this.setstyle(0,0);
152 });
68 } 153 }
69 }) 154 });
70 this.currentSelectProps = { 155 this.currentSelectProps = {
71 bdcdyid: this.formData.bdcdyid, 156 bdcdyid: this.formData.bdcdyid,
72 bdcdyh: this.formData.bdcdyh, 157 bdcdyh: val,
73 qllx: this.formData.qllx, 158 qllx: this.formData.qllx,
74 bsmQlxx: this.formData.bsmQlxx 159 bsmQlxx: this.formData.bsmQlxx,
75 } 160 };
76 }, 161 },
77 /** 162 /**
78 * @description: handleNodeClick 163 * @description: handleNodeClick
79 * @param {*} data 164 * @param {*} data
80 * @param {*} node
81 * @param {*} elem
82 * @author: renchao 165 * @author: renchao
83 */ 166 */
84 handleNodeClick (data, node, elem) { 167 handleNodeClick(data) {
168 this.loadComponent(data.form);
169 },
170 /**
171 * @description: setstyle
172 * @param {*} data
173 * @author: renchao
174 * 设置样式和点击定位到当前功能
175 */
176 setstyle(newindex,index) {
177 if(index==0){
178 this.loadComponent(this.$refs.sfq[newindex].$children[0].$attrs.re.form);
179 }
180 let dpme = this.$refs.sfq[newindex].$children[0].$el
181 if (index != 0) {
182 dpme.style.backgroundColor = "#ffffff";
183 dpme.style.color = "black";
184 dpme.style.border = "none";
185 } else {
186 dpme.style.backgroundColor = "#f5f5f5";
187 dpme.style.color = "#0079fe";
188 dpme.style.borderRight = "4px solid #0079fe";
189 }
190 },
191 /**
192 * @description: addlist
193 * @param {*} data
194 * @author: renchao
195 * 新增列表功能
196 */
197 addlist(data, index) {
198 let newindex= this.sfqdata.findIndex((item) => {
199 return item.bdcdyid ==data.bdcdyid;
200 });
201 this.setstyle(newindex,index);
202 this.currentSelectProps.bdcdyid = data.bdcdyid;
85 this.loadComponent(data.form); 203 this.loadComponent(data.form);
86 }, 204 },
87 /** 205 /**
...@@ -89,19 +207,19 @@ ...@@ -89,19 +207,19 @@
89 * @param {*} form 207 * @param {*} form
90 * @author: renchao 208 * @author: renchao
91 */ 209 */
92 loadComponent (form) { 210 loadComponent(form) {
93 this.componentTag = (r) => 211 this.componentTag = (r) =>
94 require.ensure([], () => r(require("@/views/registerBook/" + form))) 212 require.ensure([], () => r(require("@/views/registerBook/" + form)));
95 } 213 },
96 } 214 },
97 } 215 };
98 </script> 216 </script>
99 <style scoped lang="scss"> 217 <style scoped lang="scss">
100 /deep/.rollTable { 218 /deep/.rollTable {
101 height: calc(100vh - 300px) !important; 219 height: calc(100vh - 300px) !important;
102 } 220 }
103 221
104 .content { 222 .content {
105 width: 100%; 223 width: 100%;
106 height: 100%; 224 height: 100%;
107 display: flex; 225 display: flex;
...@@ -112,6 +230,7 @@ ...@@ -112,6 +230,7 @@
112 background-color: #f5f5f5; 230 background-color: #f5f5f5;
113 color: #333; 231 color: #333;
114 border: 1px solid rgb(228, 228, 228); 232 border: 1px solid rgb(228, 228, 228);
233 overflow-y: auto;
115 } 234 }
116 235
117 .right { 236 .right {
...@@ -122,31 +241,90 @@ ...@@ -122,31 +241,90 @@
122 background-color: #f5f5f5; 241 background-color: #f5f5f5;
123 border: 1px solid rgb(228, 228, 228); 242 border: 1px solid rgb(228, 228, 228);
124 } 243 }
125 } 244 }
126 245
127 /deep/ .expanded.el-tree-node__expand-icon, 246 /deep/ .expanded.el-tree-node__expand-icon,
128 /deep/ .el-tree-node__expand-icon { 247 /deep/ .el-tree-node__expand-icon {
129 visibility: hidden; 248 visibility: hidden;
130 } 249 }
131 250
132 /deep/ .el-tree-node__content { 251 /deep/ .el-tree-node__content {
133 border: 1px solid rgb(228, 228, 228); 252 border: 1px solid rgb(228, 228, 228);
134 height: 45px; 253 height: 45px;
135 } 254 }
136 255
137 /deep/ .el-tree-node:focus > .el-tree-node__content { 256 /deep/ .el-tree-node:focus > .el-tree-node__content {
138 background-color: #f5f5f5; 257 // background-color: #f5f5f5;
139 color: #0079fe; 258 // color: #0079fe;
140 border-right: 4px solid #0079fe; 259 // border-right: 4px solid #0079fe;
141 } 260 }
142 261
143 /deep/.el-tree-node { 262 /deep/.el-tree-node {
144 white-space: pre-wrap; 263 white-space: pre-wrap;
145 } 264 }
146 265
147 /deep/ .is-current > .el-tree-node__content { 266 /deep/ .is-current > .el-tree-node__content {
267 // background-color: #f5f5f5;
268 // color: #0079fe;
269 // border-right: 4px solid #0079fe;
270 }
271
272 /deep/.el-collapse-item__header {
273 width: 100%;
274 cursor: pointer;
275 position: relative;
276 .el-collapse-item__arrow {
277 position: absolute;
278 top: 15px;
279 right: 0px;
280 }
281 align-items: center;
282 .text {
283 width: 100%;
284 height: 45px;
285 display: inline-block;
286 span {
287 margin-left: 60px;
288 padding-top: 10px;
289 display: inline-block;
290 line-height: 15px;
291 }
292 }
293 height: 45px;
294 display: inline-block;
295 line-height: 45px;
296 border: 1px solid rgb(228, 228, 228);
297 }
298 /deep/.el-collapse-item__content {
299 padding-bottom: 5px;
300 }
301 /deep/.sfqcontent {
302 white-space: wrap;
303 border: none;
304 padding: 0;
305 margin: 0;
306 cursor: pointer;
307 width: 100%;
308 height: 100px;
309 word-break: break-word;
310 display: inline;
311 span {
312 font-size: 13px;
313 display: block;
314 line-height: 15px;
315 margin-left: 70px;
316 }
317 height: 45px;
318 border: 1px solid rgb(228, 228, 228);
319 border-right: 4px solid #f5f5f5;
320 }
321 .sfqcontent:hover {
322 background-color: #f5f5f5;
323 color: black;
324 }
325 .sfqcontent:focus {
148 background-color: #f5f5f5; 326 background-color: #f5f5f5;
149 color: #0079fe; 327 color: #0079fe;
150 border-right: 4px solid #0079fe; 328 border-right: 4px solid #0079fe;
151 } 329 }
152 </style> 330 </style>
......
1 import { log } from "bpmn-js-token-simulation";
1 2
2 3
3 var qlxxPage = [ 4 var qlxxPage = [
...@@ -41,31 +42,33 @@ var qlxxPage = [ ...@@ -41,31 +42,33 @@ var qlxxPage = [
41 //组装登记簿树形结构 42 //组装登记簿树形结构
42 /** 43 /**
43 * @description: 组装登记簿树形结构 44 * @description: 组装登记簿树形结构
44 * @param {*} qlxxData
45 * @param {*} bdcdyh 45 * @param {*} bdcdyh
46 * @author: renchao 46 * @author: renchao
47 */ 47 */
48 export function loadTreeData(qlxxData, bdcdyh) { 48 export function loadTreeData(bdcdyh) {
49 let treedata = []; 49 let treedata = [];
50 //加载封面 50 //加载封面
51 treedata.push({ id: "djbfm", form: "djbfm.vue", label: "登记簿封面" }); 51 treedata.push({ id: "djbfm", form: "djbfm.vue", label: "登记簿封面" });
52 treedata.push({ id: "zdjbxx", form: "zdjbxx.vue", label: "宗地基本信息\n(" + bdcdyh.substring(0, 19) + ")", children: [] }); 52 treedata.push({ id: "zdjbxx", form: "zdjbxx.vue", label: "宗地基本信息\n(" + bdcdyh.substring(0, 19) + ")", children: [] });
53 treedata[1].children.push({ id: "bdcqldjml", form: "bdcqldjml.vue", label: "不动产权利登记目录", children: [] }); 53 treedata[1].children.push({ id: "bdcqldjml", form: "bdcqldjml.vue", label: "不动产权利登记目录", children: [] });
54 treedata[1].children[0].children.push({ 54 return treedata;
55 id: "bdcqljqtsx", form: "bdcqljqtsx.vue", label: "不动产权利及其他事项\n (" + bdcdyh.slice(19) + ")", children: [], 55 }
56 }); 56 export function loadsfqData(qlxxData, bdcdyh,bdcdyid) {
57 let treedata={
58 bdcdyid:bdcdyid,id: "bdcqljqtsx", form: "bdcqljqtsx.vue", label: "不动产权利及其他事项\n (" + bdcdyh.slice(19) + ")", children: [],
59 };
57 //主体权利 60 //主体权利
58 treedata[1].children[0].children[0].children.push(getNode(qlxxData.ztqllx, qlxxData.ztql, qlxxData.bdcdylx)); 61 treedata.children.push(getNode(qlxxData.ztqllx, qlxxData.ztql, qlxxData.bdcdylx,bdcdyid));
59 //抵押权 62 //抵押权
60 treedata[1].children[0].children[0].children.push(getNode("A37", qlxxData.diyaq, '')); 63 treedata.children.push(getNode("A37", qlxxData.diyaq, '',bdcdyid));
61 //地役权 64 //地役权
62 treedata[1].children[0].children[0].children.push(getNode("A19", qlxxData.diyiq, '')); 65 treedata.children.push(getNode("A19", qlxxData.diyiq, '',bdcdyid));
63 //预告登记 66 //预告登记
64 treedata[1].children[0].children[0].children.push(getNode("B40", qlxxData.ygdj, '')); 67 treedata.children.push(getNode("B40", qlxxData.ygdj, '',bdcdyid));
65 //异议登记 68 //异议登记
66 treedata[1].children[0].children[0].children.push(getNode("B38", qlxxData.yydj, '')); 69 treedata.children.push(getNode("B38", qlxxData.yydj, '',bdcdyid));
67 //查封登记 70 //查封登记
68 treedata[1].children[0].children[0].children.push(getNode("B39", qlxxData.cfdj, '')); 71 treedata.children.push(getNode("B39", qlxxData.cfdj, '',bdcdyid));
69 72
70 return treedata; 73 return treedata;
71 } 74 }
...@@ -78,18 +81,18 @@ export function loadTreeData(qlxxData, bdcdyh) { ...@@ -78,18 +81,18 @@ export function loadTreeData(qlxxData, bdcdyh) {
78 * @param {*} bdcdylx 81 * @param {*} bdcdylx
79 * @author: renchao 82 * @author: renchao
80 */ 83 */
81 export function getNode(qllx, qlxx, bdcdylx) { 84 export function getNode(qllx, qlxx, bdcdylx,bdcdyid) {
82 let node; 85 let node;
83 for (var i = 0; i < qlxxPage.length; i++) { 86 for (var i = 0; i < qlxxPage.length; i++) {
84 if (qlxxPage[i].qllx == qllx) { 87 if (qlxxPage[i].qllx == qllx) {
85 if (qllx == "A04" || qllx == "A06" || qllx == "A08") { 88 if (qllx == "A04" || qllx == "A06" || qllx == "A08") {
86 if (bdcdylx == "4") { 89 if (bdcdylx == "4") {
87 node = { id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi +")"}; 90 node = {bdcdyid:bdcdyid,id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi +")"};
88 } else { 91 } else {
89 node = { id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi +")"}; 92 node = { bdcdyid:bdcdyid,id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi +")"};
90 } 93 }
91 } else { 94 } else {
92 node = { id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi +")"}; 95 node = { bdcdyid:bdcdyid,id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi +")"};
93 } 96 }
94 break; 97 break;
95 } 98 }
......
...@@ -6,24 +6,60 @@ ...@@ -6,24 +6,60 @@
6 <template> 6 <template>
7 <div class="content loadingtext"> 7 <div class="content loadingtext">
8 <div class="left"> 8 <div class="left">
9 <el-tree ref="tree" :data="treedata" :props="defaultProps" @node-click="handleNodeClick" 9 <el-tree
10 :default-expand-all="true" :expand-on-click-node="false" node-key="id" :default-checked-keys="[showTab]"> 10 ref="tree"
11 :data="treedata"
12 :props="defaultProps"
13 @node-click="handleNodeClick"
14 :default-expand-all="true"
15 :expand-on-click-node="false"
16 node-key="id"
17 :default-checked-keys="[showTab]"
18 >
11 </el-tree> 19 </el-tree>
20 <el-collapse v-model="activeName" accordion>
21 <el-collapse-item
22 class="sfqqq"
23 ref="sfq"
24 v-for="(item, index) in sfqdata"
25 :key="index"
26 :name="index"
27 >
28 <template slot="title">
29 <span class="text" @click="addlist(item)">
30 <span>
31 {{ item.label }}
32 </span>
33 </span>
34 </template>
35 <el-button
36 v-for="(item, index) in item.children"
37 :re='item'
38 :key="index"
39 class="sfqcontent"
40 @click="addlist(item, index)"
41 >
42 {{ item.label }}
43 </el-button>
44 </el-collapse-item>
45 </el-collapse>
12 </div> 46 </div>
13 <div class="right"> 47 <div class="right">
14 <component :is="componentTag" v-bind="currentSelectProps" /> 48 <component
49 :is="componentTag"
50 @getBdcdyh="getBdcdyh"
51 v-bind="currentSelectProps"
52 />
15 </div> 53 </div>
16 </div> 54 </div>
17 </template> 55 </template>
18 <script> 56 <script>
19 import { getBdcqljqtsx } from "@/api/djbDetail.js"; 57 import { getBdcqljqtsx } from "@/api/djbDetail.js";
20 import { loadTreeData, getNode } from "./djbFrameData.js"; 58 import { loadTreeData,loadsfqData, getNode } from "./djbFrameData.js";
21 import { searchTaskToDo } from "@/api/workflow/search.js"; 59 import { searchTaskToDo } from "@/api/workflow/search.js";
22 import { 60 import { leftMenu } from "@/api/workFlow.js";
23 leftMenu 61 export default {
24 } from "@/api/workFlow.js"; 62 data() {
25 export default {
26 data () {
27 return { 63 return {
28 //接收参数 64 //接收参数
29 // propsParam: this.$attrs, 65 // propsParam: this.$attrs,
...@@ -35,6 +71,8 @@ ...@@ -35,6 +71,8 @@
35 currentSelectProps: {}, 71 currentSelectProps: {},
36 //左侧树形结构数据 72 //左侧树形结构数据
37 treedata: [], 73 treedata: [],
74 sfqdata: [],
75 activeName: 0,
38 // 查询参数 76 // 查询参数
39 queryForm: {}, 77 queryForm: {},
40 78
...@@ -47,9 +85,8 @@ ...@@ -47,9 +85,8 @@
47 showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断 85 showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
48 }; 86 };
49 }, 87 },
50 mounted () { 88 mounted() {
51 this.getdata() 89 this.getdata();
52
53 }, 90 },
54 methods: { 91 methods: {
55 // 截取字符的方法 92 // 截取字符的方法
...@@ -58,17 +95,17 @@ ...@@ -58,17 +95,17 @@
58 * @param {*} obj 95 * @param {*} obj
59 * @author: renchao 96 * @author: renchao
60 */ 97 */
61 getCaption (obj) { 98 getCaption(obj) {
62 let index = obj.lastIndexOf("="); 99 let index = obj.lastIndexOf("=");
63 obj = obj.substring(index + 1, obj.length); 100 obj = obj.substring(index + 1, obj.length);
64 return obj 101 return obj;
65 }, 102 },
66 // 通过不动产业务号获取参数 103 // 通过不动产业务号获取参数
67 /** 104 /**
68 * @description: 通过不动产业务号获取参数 105 * @description: 通过不动产业务号获取参数
69 * @author: renchao 106 * @author: renchao
70 */ 107 */
71 getdata () { 108 getdata() {
72 this.queryForm = { 109 this.queryForm = {
73 bdcdyh: this.getCaption(window.location.href), 110 bdcdyh: this.getCaption(window.location.href),
74 currentPage: 1, 111 currentPage: 1,
...@@ -76,8 +113,8 @@ ...@@ -76,8 +113,8 @@
76 pageSize: 10, 113 pageSize: 10,
77 qllx: "", 114 qllx: "",
78 ywh: "", 115 ywh: "",
79 ywly: "" 116 ywly: "",
80 } 117 };
81 if (this.queryForm) { 118 if (this.queryForm) {
82 this.$startLoading(); 119 this.$startLoading();
83 searchTaskToDo({ 120 searchTaskToDo({
...@@ -91,7 +128,6 @@ ...@@ -91,7 +128,6 @@
91 } 128 }
92 }); 129 });
93 } 130 }
94
95 }, 131 },
96 132
97 // 获取不动产信息 133 // 获取不动产信息
...@@ -101,7 +137,7 @@ ...@@ -101,7 +137,7 @@
101 * @param {*} b 137 * @param {*} b
102 * @author: renchao 138 * @author: renchao
103 */ 139 */
104 loadBdcdylist (a, b) { 140 loadBdcdylist(a, b) {
105 var formdata = new FormData(); 141 var formdata = new FormData();
106 formdata.append("bsmSlsq", a); 142 formdata.append("bsmSlsq", a);
107 formdata.append("bestepid", b); 143 formdata.append("bestepid", b);
...@@ -109,26 +145,77 @@ ...@@ -109,26 +145,77 @@
109 if (res.code === 200) { 145 if (res.code === 200) {
110 if (res.result) { 146 if (res.result) {
111 this.currentSelectProps = res.result[0]; 147 this.currentSelectProps = res.result[0];
112 this.loadData(); 148 this.loadData(this.currentSelectProps.bdcdyh);
149 }
150 }
151 });
152 },
153
154 /**
155 * @description: getBdcdyh
156 * @author: miaofang
157 * 点击不动产单元号事件
158 */
159 getBdcdyh(val) {
160 this.addloadData(val);
161 },
162 /**
163 * @description: addloadData
164 * @author: miaofang
165 */
166 addloadData(val) {
167 getBdcqljqtsx({
168 bdcdyid: val.bdcdyid,
169 bdcdyh: val.bdcdyh,
170 }).then((res) => {
171 if (res.code === 200) {
172 if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) {
173 let index= this.sfqdata.findIndex((item) => {
174 return item.bdcdyid ==val.bdcdyid;
175 });
176 this.activeName=index
177 this.setstyle(index,0);
178 } else {
179 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid));
180 this.activeName = this.sfqdata.length - 1;
181 this.$nextTick(() => {
182 this.setstyle(this.sfqdata.length - 1,0);
183 })
113 } 184 }
114 } 185 }
115 }); 186 });
187 this.currentSelectProps = {
188 bdcdyid: val.bdcdyid,
189 bdcdyh: val.bdcdyh,
190 qllx: this.formData.qllx,
191 bsmQlxx: this.formData.bsmQlxx,
192 };
116 }, 193 },
117 /** 194 /**
118 * @description: loadData 195 * @description: loadData
119 * @author: renchao 196 * @author: renchao
120 */ 197 */
121 loadData () { 198 loadData(val) {
122 getBdcqljqtsx({ 199 getBdcqljqtsx({
123 bdcdyid: this.currentSelectProps.bdcdyid, 200 bdcdyid: this.currentSelectProps.bdcdyid,
124 bdcdyh: this.currentSelectProps.bdcdyh, 201 bdcdyh: val,
125 }).then((res) => { 202 }).then((res) => {
126 if (res.code === 200) { 203 if (res.code === 200) {
127 this.treedata = loadTreeData(res.result, this.currentSelectProps.bdcdyh); 204 this.treedata = loadTreeData(
205 val
206 );
207 this.sfqdata.push(
208 loadsfqData(res.result, val, this.currentSelectProps.bdcdyid)
209 );
128 this.$nextTick(function () { 210 this.$nextTick(function () {
129 this.defaultNode = getNode(this.currentSelectProps.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, ""); 211 this.defaultNode = getNode(
212 this.currentSelectProps.qllx,
213 { linShi: 0, xianShi: 0, liShi: 0 },
214 ""
215 );
130 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 216 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
131 this.loadComponent(this.defaultNode.form); 217 this.loadComponent(this.defaultNode.form);
218 this.setstyle(0,0);
132 }); 219 });
133 } 220 }
134 }); 221 });
...@@ -145,11 +232,45 @@ ...@@ -145,11 +232,45 @@
145 /** 232 /**
146 * @description: 点击登记簿菜单 233 * @description: 点击登记簿菜单
147 * @param {*} data 234 * @param {*} data
148 * @param {*} node
149 * @param {*} elem
150 * @author: renchao 235 * @author: renchao
151 */ 236 */
152 handleNodeClick (data, node, elem) { 237 handleNodeClick(data) {
238 this.loadComponent(data.form);
239 },
240
241 /**
242 * @description: setstyle
243 * @param {*} data
244 * @author: renchao
245 * 设置样式和点击定位到当前功能
246 */
247 setstyle(newindex,index) {
248 if(index==0){
249 this.loadComponent(this.$refs.sfq[newindex].$children[0].$attrs.re.form);
250 }
251 let dpme = this.$refs.sfq[newindex].$children[0].$el
252 if (index != 0) {
253 dpme.style.backgroundColor = "#ffffff";
254 dpme.style.color = "black";
255 dpme.style.border = "none";
256 } else {
257 dpme.style.backgroundColor = "#f5f5f5";
258 dpme.style.color = "#0079fe";
259 dpme.style.borderRight = "4px solid #0079fe";
260 }
261 },
262 /**
263 * @description: addlist
264 * @param {*} data
265 * @author: renchao
266 * 新增列表功能
267 */
268 addlist(data, index) {
269 let newindex= this.sfqdata.findIndex((item) => {
270 return item.bdcdyid ==data.bdcdyid;
271 });
272 this.setstyle(newindex,index);
273 this.currentSelectProps.bdcdyid = data.bdcdyid;
153 this.loadComponent(data.form); 274 this.loadComponent(data.form);
154 }, 275 },
155 /** 276 /**
...@@ -157,19 +278,19 @@ ...@@ -157,19 +278,19 @@
157 * @param {*} form 278 * @param {*} form
158 * @author: renchao 279 * @author: renchao
159 */ 280 */
160 loadComponent (form) { 281 loadComponent(form) {
161 this.componentTag = (r) => 282 this.componentTag = (r) =>
162 require.ensure([], () => r(require("@/views/registerBook/" + form))); 283 require.ensure([], () => r(require("@/views/registerBook/" + form)));
163 }, 284 },
164 }, 285 },
165 }; 286 };
166 </script> 287 </script>
167 <style scoped lang="scss"> 288 <style scoped lang="scss">
168 /deep/.rollTable { 289 /deep/.rollTable {
169 height: calc(120vh - 254px) !important; 290 height: calc(120vh - 254px) !important;
170 } 291 }
171 292
172 .content { 293 .content {
173 width: 100%; 294 width: 100%;
174 height: 100%; 295 height: 100%;
175 display: flex; 296 display: flex;
...@@ -190,31 +311,89 @@ ...@@ -190,31 +311,89 @@
190 background-color: #f5f5f5; 311 background-color: #f5f5f5;
191 border: 1px solid rgb(228, 228, 228); 312 border: 1px solid rgb(228, 228, 228);
192 } 313 }
193 } 314 }
194 315
195 /deep/ .expanded.el-tree-node__expand-icon, 316 /deep/ .expanded.el-tree-node__expand-icon,
196 /deep/ .el-tree-node__expand-icon { 317 /deep/ .el-tree-node__expand-icon {
197 visibility: hidden; 318 visibility: hidden;
198 } 319 }
199 320
200 /deep/ .el-tree-node__content { 321 /deep/ .el-tree-node__content {
201 border: 1px solid rgb(228, 228, 228); 322 border: 1px solid rgb(228, 228, 228);
202 height: 45px; 323 height: 45px;
203 } 324 }
204 325
205 /deep/ .el-tree-node:focus > .el-tree-node__content { 326 /deep/ .el-tree-node:focus > .el-tree-node__content {
206 background-color: #f5f5f5; 327 // background-color: #f5f5f5;
207 color: #0079fe; 328 // color: #0079fe;
208 border-right: 4px solid #0079fe; 329 // border-right: 4px solid #0079fe;
209 } 330 }
210 331
211 /deep/.el-tree-node { 332 /deep/.el-tree-node {
212 white-space: pre-wrap; 333 white-space: pre-wrap;
213 } 334 }
214 335
215 /deep/ .is-current > .el-tree-node__content { 336 /deep/ .is-current > .el-tree-node__content {
337 // background-color: #f5f5f5;
338 // color: #0079fe;
339 // border-right: 4px solid #0079fe;
340 }
341 /deep/.el-collapse-item__header {
342 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 }
362 height: 45px;
363 display: inline-block;
364 line-height: 45px;
365 border: 1px solid rgb(228, 228, 228);
366 }
367 /deep/.el-collapse-item__content {
368 padding-bottom: 5px;
369 }
370 /deep/.sfqcontent {
371 white-space: wrap;
372 border: none;
373 padding: 0;
374 margin: 0;
375 cursor: pointer;
376 width: 100%;
377 height: 100px;
378 word-break: break-word;
379 display: inline;
380 span {
381 font-size: 13px;
382 display: block;
383 line-height: 15px;
384 margin-left: 70px;
385 }
386 height: 45px;
387 border: 1px solid rgb(228, 228, 228);
388 border-right: 4px solid #f5f5f5;
389 }
390 .sfqcontent:hover {
391 background-color: #f5f5f5;
392 color: black;
393 }
394 .sfqcontent:focus {
216 background-color: #f5f5f5; 395 background-color: #f5f5f5;
217 color: #0079fe; 396 color: #0079fe;
218 border-right: 4px solid #0079fe; 397 border-right: 4px solid #0079fe;
219 } 398 }
220 </style> 399 </style>
......