a9ee7796 by xiaomiao

权籍调登记簿调整

1 parent 794f43d5
...@@ -72,6 +72,8 @@ export default { ...@@ -72,6 +72,8 @@ export default {
72 //左侧树形结构数据 72 //左侧树形结构数据
73 treedata: [], 73 treedata: [],
74 sfqdata: [], 74 sfqdata: [],
75 keyy: "",
76 iskey: "",
75 activeName: 0, 77 activeName: 0,
76 // 查询参数 78 // 查询参数
77 queryForm: {}, 79 queryForm: {},
...@@ -170,16 +172,16 @@ export default { ...@@ -170,16 +172,16 @@ export default {
170 }).then((res) => { 172 }).then((res) => {
171 if (res.code === 200) { 173 if (res.code === 200) {
172 if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) { 174 if (this.sfqdata.some((item) => item.bdcdyid === val.bdcdyid)) {
173 let index= this.sfqdata.findIndex((item) => { 175 let index = this.sfqdata.findIndex((item) => {
174 return item.bdcdyid ==val.bdcdyid; 176 return item.bdcdyid == val.bdcdyid;
175 }); 177 });
176 this.activeName=index 178 this.activeName = index
177 this.setstyle(index,0); 179 this.setstyle(index, 0, this.iskey);
178 } else { 180 } else {
179 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid)); 181 this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid));
180 this.activeName = this.sfqdata.length - 1; 182 this.activeName = this.sfqdata.length - 1;
181 this.$nextTick(() => { 183 this.$nextTick(() => {
182 this.setstyle(this.sfqdata.length - 1,0); 184 this.setstyle(this.sfqdata.length - 1, 0, this.iskey);
183 }) 185 })
184 } 186 }
185 } 187 }
...@@ -187,8 +189,8 @@ export default { ...@@ -187,8 +189,8 @@ export default {
187 this.currentSelectProps = { 189 this.currentSelectProps = {
188 bdcdyid: val.bdcdyid, 190 bdcdyid: val.bdcdyid,
189 bdcdyh: val.bdcdyh, 191 bdcdyh: val.bdcdyh,
190 qllx: this.formData.qllx, 192 qllx: this.currentSelectProps.qllx,
191 bsmQlxx: this.formData.bsmQlxx, 193 bsmQlxx: this.currentSelectProps.bsmQlxx,
192 }; 194 };
193 }, 195 },
194 /** 196 /**
...@@ -201,9 +203,7 @@ export default { ...@@ -201,9 +203,7 @@ export default {
201 bdcdyh: val, 203 bdcdyh: val,
202 }).then((res) => { 204 }).then((res) => {
203 if (res.code === 200) { 205 if (res.code === 200) {
204 this.treedata = loadTreeData( 206 this.treedata = loadTreeData(val);
205 val
206 );
207 this.sfqdata.push( 207 this.sfqdata.push(
208 loadsfqData(res.result, val, this.currentSelectProps.bdcdyid) 208 loadsfqData(res.result, val, this.currentSelectProps.bdcdyid)
209 ); 209 );
...@@ -211,11 +211,19 @@ export default { ...@@ -211,11 +211,19 @@ export default {
211 this.defaultNode = getNode( 211 this.defaultNode = getNode(
212 this.currentSelectProps.qllx, 212 this.currentSelectProps.qllx,
213 { linShi: 0, xianShi: 0, liShi: 0 }, 213 { linShi: 0, xianShi: 0, liShi: 0 },
214 "" 214 res.result.bdcdylx|| ""
215 ); 215 );
216 this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点 216 this.sfqdata[0].children.forEach((item, index) => {
217 this.loadComponent(this.defaultNode.form); 217 if (item.id == this.defaultNode.id) {
218 this.setstyle(0,0); 218 this.iskey = index
219 }
220 })
221 // this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
222 // this.loadComponent(this.defaultNode.form);
223
224 this.setstyle(0, 0, this.iskey);
225
226
219 }); 227 });
220 } 228 }
221 }); 229 });
...@@ -244,20 +252,26 @@ export default { ...@@ -244,20 +252,26 @@ export default {
244 * @author: renchao 252 * @author: renchao
245 * 设置样式和点击定位到当前功能 253 * 设置样式和点击定位到当前功能
246 */ 254 */
247 setstyle(newindex,index) { 255 setstyle (newindex, index, key) {
248 if(index==0){ 256 if (key != undefined || this.keyy == index) {
249 this.loadComponent(this.$refs.sfq[newindex].$children[0].$attrs.re.form); 257 if (key != undefined) {
258 this.keyy = key
250 } 259 }
251 let dpme = this.$refs.sfq[newindex].$children[0].$el 260 this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form);
252 if (index != 0) { 261 let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
253 dpme.style.backgroundColor = "#ffffff";
254 dpme.style.color = "black";
255 dpme.style.border = "none";
256 } else {
257 dpme.style.backgroundColor = "#f5f5f5"; 262 dpme.style.backgroundColor = "#f5f5f5";
258 dpme.style.color = "#0079fe"; 263 dpme.style.color = "#0079fe";
259 dpme.style.borderRight = "4px solid #0079fe"; 264 dpme.style.borderRight = "4px solid #0079fe";
265 } else {
266 let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
267 dpme.style.backgroundColor = "#ffffff";
268 dpme.style.color = "black";
269 dpme.style.border = "none";
260 } 270 }
271
272
273
274
261 }, 275 },
262 /** 276 /**
263 * @description: addlist 277 * @description: addlist
...@@ -265,13 +279,22 @@ export default { ...@@ -265,13 +279,22 @@ export default {
265 * @author: renchao 279 * @author: renchao
266 * 新增列表功能 280 * 新增列表功能
267 */ 281 */
268 addlist(data, index) { 282 addlist (data, index) {
269 let newindex= this.sfqdata.findIndex((item) => { 283 if (index != undefined) {
270 return item.bdcdyid ==data.bdcdyid; 284 let newindex = this.sfqdata.findIndex((item) => {
285 return item.bdcdyid == data.bdcdyid;
271 }); 286 });
272 this.setstyle(newindex,index); 287 this.setstyle(newindex, index);
273 this.currentSelectProps.bdcdyid = data.bdcdyid; 288 this.currentSelectProps.bdcdyid = data.bdcdyid;
274 this.loadComponent(data.form); 289 this.loadComponent(data.form);
290 } else {
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
275 }, 298 },
276 /** 299 /**
277 * @description: loadComponent 300 * @description: loadComponent
......