宗地提交成功后,更新左侧树结构数据
Showing
3 changed files
with
18 additions
and
9 deletions
| ... | @@ -47,7 +47,8 @@ const store = new Vuex.Store({ | ... | @@ -47,7 +47,8 @@ const store = new Vuex.Store({ |
| 47 | hbsm:'', | 47 | hbsm:'', |
| 48 | contentWidth:'', //内容区域宽度 | 48 | contentWidth:'', //内容区域宽度 |
| 49 | zrzh:'', //自然幢号 | 49 | zrzh:'', //自然幢号 |
| 50 | dzbsm:'' // 多幢bsm | 50 | dzbsm:'', // 多幢bsm |
| 51 | treeData:[], // 树数据 | ||
| 51 | }, | 52 | }, |
| 52 | modules: { | 53 | modules: { |
| 53 | user, | 54 | user, | ... | ... |
| ... | @@ -177,9 +177,11 @@ export default { | ... | @@ -177,9 +177,11 @@ export default { |
| 177 | "$store.state.zdbsm": function(bsm) { | 177 | "$store.state.zdbsm": function(bsm) { |
| 178 | this.getRightTree(bsm); | 178 | this.getRightTree(bsm); |
| 179 | }, | 179 | }, |
| 180 | // "$store.state.zdbsms":function (zdbsms) { | 180 | |
| 181 | // this.getTreeByS(zdbsms) | 181 | "$store.state.treeData":function (val) { |
| 182 | // } | 182 | console.log(val,'val'); |
| 183 | this.pd = val; | ||
| 184 | } | ||
| 183 | }, | 185 | }, |
| 184 | mounted(){ | 186 | mounted(){ |
| 185 | 187 | ... | ... |
| ... | @@ -339,7 +339,7 @@ | ... | @@ -339,7 +339,7 @@ |
| 339 | </table> | 339 | </table> |
| 340 | 340 | ||
| 341 | <div style="min-height: 40px;text-align: center;margin-top: 10px"> | 341 | <div style="min-height: 40px;text-align: center;margin-top: 10px"> |
| 342 | <el-button type="success" @click="updateZDxx()">保存</el-button> | 342 | <el-button type="success" @click="updateZDxx">保存</el-button> |
| 343 | <el-button type="primary" @click="submitZDxx">提交</el-button> | 343 | <el-button type="primary" @click="submitZDxx">提交</el-button> |
| 344 | </div> | 344 | </div> |
| 345 | </div> | 345 | </div> |
| ... | @@ -349,12 +349,13 @@ | ... | @@ -349,12 +349,13 @@ |
| 349 | <script> | 349 | <script> |
| 350 | import Qlr from "../../../components/formMenu/qlr"; | 350 | import Qlr from "../../../components/formMenu/qlr"; |
| 351 | import Qlxz from "../../../components/formMenu/qlxz"; | 351 | import Qlxz from "../../../components/formMenu/qlxz"; |
| 352 | import {submit} from "../../../api/common" | ||
| 353 | import { | 352 | import { |
| 354 | getAllList, | 353 | getAllList, |
| 355 | getDdicByMC, | 354 | getDdicByMC, |
| 356 | getListByXzqbsm, | 355 | getListByXzqbsm, |
| 357 | getListByPbsm, | 356 | getListByPbsm, |
| 357 | submit, | ||
| 358 | getTree, | ||
| 358 | } from "../../../api/common"; | 359 | } from "../../../api/common"; |
| 359 | import { | 360 | import { |
| 360 | getBdcdyh, | 361 | getBdcdyh, |
| ... | @@ -623,11 +624,16 @@ export default { | ... | @@ -623,11 +624,16 @@ export default { |
| 623 | status:1, | 624 | status:1, |
| 624 | type:"zd" | 625 | type:"zd" |
| 625 | } | 626 | } |
| 626 | |||
| 627 | submit(data).then((res)=>{ | 627 | submit(data).then((res)=>{ |
| 628 | if(res.code===200){ | 628 | if(res.code===200){ |
| 629 | this.$message.success("提交完成!") | 629 | this.$message.success("提交成功!") |
| 630 | this.getZdjbxxData(this.$store.state.zdbsm); | 630 | this.getZdjbxxData(this.curZdbsm); |
| 631 | getTree(this.curZdbsm).then((res) => { | ||
| 632 | if (res.success) { | ||
| 633 | // console.log('successsuccesssuccesssuccess'); | ||
| 634 | this.$store.state.treeData = res.result; | ||
| 635 | } | ||
| 636 | }); | ||
| 631 | } | 637 | } |
| 632 | }) | 638 | }) |
| 633 | }, | 639 | }, | ... | ... |
-
Please register or sign in to post a comment