cd13d0a5 by xiaomiao

--no commit message

1 parent 58370ae7
...@@ -6,8 +6,16 @@ ...@@ -6,8 +6,16 @@
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>
12 </div> 20 </div>
13 <div class="right"> 21 <div class="right">
...@@ -16,238 +24,213 @@ ...@@ -16,238 +24,213 @@
16 </div> 24 </div>
17 </template> 25 </template>
18 <script> 26 <script>
19 import { getBdcqljqtsx } from "@/api/djbDetail.js"; 27 import { getBdcqljqtsx } from "@/api/djbDetail.js";
20 import { loadTreeData, getNode } from "./djbFrameData.js"; 28 import { loadTreeData, getNode } from "./djbFrameData.js";
21 // import { searchTaskToDo } from "@/api/workflow/search.js"; 29 // import { searchTaskToDo } from "@/api/workflow/search.js";
22 import { getDjbBysearch } from "@/api/search.js"; 30 import { getDjbBysearch } from "@/api/search.js";
23 import { 31 import {
24 leftMenu 32 leftMenu
25 } from "@/api/workFlow.js"; 33 } from "@/api/workFlow.js";
26 export default { 34 export default {
27 data () { 35 data () {
28 return { 36 return {
29 //接收参数 37 //选择加载哪一个组件
30 // propsParam: this.$attrs, 38 componentTag: "",
31 //左侧目录 39 //子组件接收参数
32 catalog: {}, 40 currentSelectProps: {},
33 //选择加载哪一个组件 41 //左侧树形结构数据
34 componentTag: "", 42 treedata: [],
35 //子组件接收参数 43 // 查询参数
36 currentSelectProps: {}, 44 queryForm: {},
37 //左侧树形结构数据 45
38 treedata: [], 46 defaultNode: "",
39 // 查询参数 47 defaultProps: {
40 queryForm: {}, 48 value: "id",
41 49 children: "children",
42 defaultNode: "", 50 label: "label",
43 defaultProps: {
44 value: "id",
45 children: "children",
46 label: "label",
47 },
48 showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
49 };
50 },
51 mounted () {
52 this.getdata()
53
54 },
55 methods: {
56 // 截取字符的方法
57 /**
58 * @description: 截取字符的方法
59 * @param {*} obj
60 * @author: renchao
61 */
62 getCaption (obj) {
63 let index = obj.lastIndexOf("=");
64 obj = obj.substring(index + 1, obj.length);
65 return obj
66 }, 51 },
67 // 通过不动产业务号获取参数 52 showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
68 /** 53 bdcdyid:"",
69 * @description: 通过不动产业务号获取参数 54 bdcdyh: "",
70 * @author: renchao 55 qllx: "",
71 */ 56 bsmQlxx: "",
72 getdata () { 57 };
73 this.queryForm = { 58 },
74 bdcdyh: this.getCaption(window.location.href) 59 mounted () {
75 60 this.getdata()
76 } 61
77 62 },
78 // if (this.getCaption(window.location.href)) { 63 methods: {
79 // this.$startLoading(); 64 // 截取字符的方法
80 // searchTaskToDo({ 65 /**
81 // ...this.queryForm, 66 * @description: 截取字符的方法
82 // }).then((res) => { 67 * @param {*} obj
83 // if (res.code === 200) { 68 * @author: renchao
84 // this.$endLoading(); 69 */
85 // let { records } = res.result; 70 getCaption (obj) {
86 // if(records.length){ 71 let index = obj.lastIndexOf("=");
87 // console.log("true",records.length); 72 obj = obj.substring(index + 1, obj.length);
88 // this.loadBdcdylist(records[0].bsmSlsq, records[0].bestepid); 73 return obj
89 74 },
90 // }else{ 75 // 通过不动产业务号获取参数
91 // console.log("false",records.length); 76 /**
92 // this.treedata=[] 77 * @description: 通过不动产业务号获取参数
93 78 * @author: renchao
94 79 */
95 // } 80 getdata () {
96 81 this.queryForm = {
97 // } 82 bdcdyh: this.getCaption(window.location.href)
98 // }); 83
99 // }else{ 84 }
100 // this.treedata=[] 85 if (this.getCaption(window.location.href)) {
101 // } 86 this.$startLoading();
102 87 getDjbBysearch({
103 if (this.getCaption(window.location.href)) { 88 ...this.queryForm,
104 this.$startLoading(); 89 }).then((res) => {
105 getDjbBysearch({ 90 if (res.code === 200) {
106 ...this.queryForm, 91 this.$endLoading();
107 }).then((res) => { 92 let { records } = res.result;
108 if (res.code === 200) { 93 if(records.length){
109 this.$endLoading(); 94 console.log("true",records.length);
110 let { records } = res.result; 95 this.bdcdyid=records[0].bdcdyid
111 if(records.length){ 96 this.bdcdyh=records[0].bdcdyh
112 console.log("true",records.length); 97 this.qllx=records[0].qllx
113 this.loadBdcdylist(records[0].bdcdyh, records[0].bdcdyid); 98 this.bsmQlxx=records[0].bsmQlxx
114 99 this.loadData()
115 }else{ 100 }else{
116 console.log("false",records.length); 101 console.log("false",records.length);
117 this.treedata=[] 102 this.treedata=[]
103 }
118 104
105 }
106 });
107 }else{
108 this.treedata=[]
109 }
119 110
120 } 111 },
121 112
122 } 113 // 获取不动产信息
114 /**
115 * @description: 获取不动产信息
116 * @param {*} a
117 * @param {*} b
118 * @author: renchao
119 */
120 // loadBdcdylist (a, b) {
121 // var formdata = new FormData();
122 // formdata.append("bsmSlsq", a);
123 // formdata.append("bestepid", b);
124 // leftMenu(formdata).then((res) => {
125 // if (res.code === 200) {
126 // if (res.result) {
127 // this.currentSelectProps = res.result[0];
128 // this.loadData();
129 // }
130 // }
131 // });
132 // },
133 /**
134 * @description: loadData
135 * @author: renchao
136 */
137 loadData () {
138 getBdcqljqtsx({
139 bdcdyid: this.bdcdyid,
140 bdcdyh: this.bdcdyh,
141 }).then((res) => {
142 if (res.code === 200) {
143 this.treedata = loadTreeData(res.result, this.bdcdyh);
144 this.$nextTick(function () {
145 this.defaultNode = getNode(this.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, "");
146 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
147 this.loadComponent(this.defaultNode.form);
123 }); 148 });
124 }else{
125 this.treedata=[]
126 } 149 }
127 150 });
128 }, 151 this.currentSelectProps = {
129 152 bdcdyid: this.bdcdyid,
130 // 获取不动产信息 153 bdcdyh: this.bdcdyh,
131 /** 154 qllx: this.qllx,
132 * @description: 获取不动产信息 155 bsmQlxx: this.bsmQlxx,
133 * @param {*} a 156 };
134 * @param {*} b 157 },
135 * @author: renchao 158 /*
136 */ 159 点击登记簿菜单
137 loadBdcdylist (a, b) { 160 */
138 var formdata = new FormData(); 161 /**
139 formdata.append("bsmSlsq", a); 162 * @description: 点击登记簿菜单
140 formdata.append("bestepid", b); 163 * @param {*} data
141 leftMenu(formdata).then((res) => { 164 * @param {*} node
142 if (res.code === 200) { 165 * @param {*} elem
143 if (res.result) { 166 * @author: renchao
144 this.currentSelectProps = res.result[0]; 167 */
145 this.loadData(); 168 handleNodeClick (data, node, elem) {
146 } 169 this.loadComponent(data.form);
147 }
148 });
149 },
150 /**
151 * @description: loadData
152 * @author: renchao
153 */
154 loadData () {
155 getBdcqljqtsx({
156 bdcdyid: this.currentSelectProps.bdcdyid,
157 bdcdyh: this.currentSelectProps.bdcdyh,
158 }).then((res) => {
159 if (res.code === 200) {
160 this.treedata = loadTreeData(res.result, this.currentSelectProps.bdcdyh);
161 this.$nextTick(function () {
162 this.defaultNode = getNode(this.currentSelectProps.qllx, { linShi: 0, xianShi: 0, liShi: 0 }, "");
163 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
164 this.loadComponent(this.defaultNode.form);
165 });
166 }
167 });
168 this.currentSelectProps = {
169 bdcdyid: this.currentSelectProps.bdcdyid,
170 bdcdyh: this.currentSelectProps.bdcdyh,
171 qllx: this.currentSelectProps.qllx,
172 bsmQlxx: this.currentSelectProps.bsmQlxx,
173 };
174 },
175 /*
176 点击登记簿菜单
177 */
178 /**
179 * @description: 点击登记簿菜单
180 * @param {*} data
181 * @param {*} node
182 * @param {*} elem
183 * @author: renchao
184 */
185 handleNodeClick (data, node, elem) {
186 this.loadComponent(data.form);
187 },
188 /**
189 * @description: loadComponent
190 * @param {*} form
191 * @author: renchao
192 */
193 loadComponent (form) {
194 this.componentTag = (r) =>
195 require.ensure([], () => r(require("@/views/registerBook/" + form)));
196 },
197 }, 170 },
198 }; 171 /**
172 * @description: loadComponent
173 * @param {*} form
174 * @author: renchao
175 */
176 loadComponent (form) {
177 this.componentTag = (r) =>
178 require.ensure([], () => r(require("@/views/registerBook/" + form)));
179 },
180 },
181 };
199 </script> 182 </script>
200 <style scoped lang="scss"> 183 <style scoped lang="scss">
201 /deep/.rollTable { 184 /deep/.rollTable {
202 height: calc(120vh - 254px) !important; 185 height: calc(120vh - 254px) !important;
203 } 186 }
204
205 .content {
206 width: 100%;
207 height: 100%;
208 display: flex;
209
210 .left {
211 width: 256px;
212 height: 100%;
213 background-color: #f5f5f5;
214 color: #333;
215 border: 1px solid rgb(228, 228, 228);
216 }
217
218 .right {
219 width: calc(100% - 256px);
220 height: 100%;
221 // overflow-y: scroll;
222 overflow: auto;
223 background-color: #f5f5f5;
224 border: 1px solid rgb(228, 228, 228);
225 }
226 }
227 187
228 /deep/ .expanded.el-tree-node__expand-icon, 188 .content {
229 /deep/ .el-tree-node__expand-icon { 189 width: 100%;
230 visibility: hidden; 190 height: 100%;
231 } 191 display: flex;
232
233 /deep/ .el-tree-node__content {
234 border: 1px solid rgb(228, 228, 228);
235 height: 45px;
236 }
237 192
238 /deep/ .el-tree-node:focus > .el-tree-node__content { 193 .left {
194 width: 256px;
195 height: 100%;
239 background-color: #f5f5f5; 196 background-color: #f5f5f5;
240 color: #0079fe; 197 color: #333;
241 border-right: 4px solid #0079fe; 198 border: 1px solid rgb(228, 228, 228);
242 }
243
244 /deep/.el-tree-node {
245 white-space: pre-wrap;
246 } 199 }
247 200
248 /deep/ .is-current > .el-tree-node__content { 201 .right {
202 width: calc(100% - 256px);
203 height: 100%;
204 // overflow-y: scroll;
205 overflow: auto;
249 background-color: #f5f5f5; 206 background-color: #f5f5f5;
250 color: #0079fe; 207 border: 1px solid rgb(228, 228, 228);
251 border-right: 4px solid #0079fe;
252 } 208 }
209 }
210
211 /deep/ .expanded.el-tree-node__expand-icon,
212 /deep/ .el-tree-node__expand-icon {
213 visibility: hidden;
214 }
215
216 /deep/ .el-tree-node__content {
217 border: 1px solid rgb(228, 228, 228);
218 height: 45px;
219 }
220
221 /deep/ .el-tree-node:focus > .el-tree-node__content {
222 background-color: #f5f5f5;
223 color: #0079fe;
224 border-right: 4px solid #0079fe;
225 }
226
227 /deep/.el-tree-node {
228 white-space: pre-wrap;
229 }
230
231 /deep/ .is-current > .el-tree-node__content {
232 background-color: #f5f5f5;
233 color: #0079fe;
234 border-right: 4px solid #0079fe;
235 }
253 </style> 236 </style>
......