权籍调登记簿调整
Showing
1 changed file
with
75 additions
and
52 deletions
| ... | @@ -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: {}, |
| ... | @@ -167,28 +169,28 @@ export default { | ... | @@ -167,28 +169,28 @@ export default { |
| 167 | getBdcqljqtsx({ | 169 | getBdcqljqtsx({ |
| 168 | bdcdyid: val.bdcdyid, | 170 | bdcdyid: val.bdcdyid, |
| 169 | bdcdyh: val.bdcdyh, | 171 | bdcdyh: val.bdcdyh, |
| 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 | }) |
| 186 | } | ||
| 184 | } | 187 | } |
| 185 | } | 188 | }); |
| 186 | }); | ||
| 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,14 +211,22 @@ export default { | ... | @@ -211,14 +211,22 @@ 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 | }); | 219 | } |
| 220 | } | 220 | }) |
| 221 | }); | 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 | |||
| 227 | }); | ||
| 228 | } | ||
| 229 | }); | ||
| 222 | this.currentSelectProps = { | 230 | this.currentSelectProps = { |
| 223 | bdcdyid: this.currentSelectProps.bdcdyid, | 231 | bdcdyid: this.currentSelectProps.bdcdyid, |
| 224 | bdcdyh: this.currentSelectProps.bdcdyh, | 232 | bdcdyh: this.currentSelectProps.bdcdyh, |
| ... | @@ -244,35 +252,50 @@ export default { | ... | @@ -244,35 +252,50 @@ 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) { |
| 250 | } | 258 | this.keyy = key |
| 251 | let dpme = this.$refs.sfq[newindex].$children[0].$el | 259 | } |
| 252 | if (index != 0) { | 260 | this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form); |
| 253 | dpme.style.backgroundColor = "#ffffff"; | 261 | let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el |
| 254 | dpme.style.color = "black"; | 262 | dpme.style.backgroundColor = "#f5f5f5"; |
| 255 | dpme.style.border = "none"; | 263 | dpme.style.color = "#0079fe"; |
| 256 | } else { | 264 | dpme.style.borderRight = "4px solid #0079fe"; |
| 257 | dpme.style.backgroundColor = "#f5f5f5"; | 265 | } else { |
| 258 | dpme.style.color = "#0079fe"; | 266 | let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el |
| 259 | dpme.style.borderRight = "4px solid #0079fe"; | 267 | dpme.style.backgroundColor = "#ffffff"; |
| 260 | } | 268 | dpme.style.color = "black"; |
| 261 | }, | 269 | dpme.style.border = "none"; |
| 270 | } | ||
| 271 | |||
| 272 | |||
| 273 | |||
| 274 | |||
| 275 | }, | ||
| 262 | /** | 276 | /** |
| 263 | * @description: addlist | 277 | * @description: addlist |
| 264 | * @param {*} data | 278 | * @param {*} data |
| 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) => { |
| 271 | }); | 285 | return item.bdcdyid == data.bdcdyid; |
| 272 | this.setstyle(newindex,index); | 286 | }); |
| 273 | this.currentSelectProps.bdcdyid = data.bdcdyid; | 287 | this.setstyle(newindex, index); |
| 274 | this.loadComponent(data.form); | 288 | this.currentSelectProps.bdcdyid = data.bdcdyid; |
| 275 | }, | 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 | |||
| 298 | }, | ||
| 276 | /** | 299 | /** |
| 277 | * @description: loadComponent | 300 | * @description: loadComponent |
| 278 | * @param {*} form | 301 | * @param {*} form | ... | ... |
-
Please register or sign in to post a comment