0136a01e by 杨威

宗地提交成功后,更新左侧树结构数据

1 parent ae1b1163
......@@ -47,7 +47,8 @@ const store = new Vuex.Store({
hbsm:'',
contentWidth:'', //内容区域宽度
zrzh:'', //自然幢号
dzbsm:'' // 多幢bsm
dzbsm:'', // 多幢bsm
treeData:[], // 树数据
},
modules: {
user,
......
......@@ -177,9 +177,11 @@ export default {
"$store.state.zdbsm": function(bsm) {
this.getRightTree(bsm);
},
// "$store.state.zdbsms":function (zdbsms) {
// this.getTreeByS(zdbsms)
// }
"$store.state.treeData":function (val) {
console.log(val,'val');
this.pd = val;
}
},
mounted(){
......
......@@ -339,7 +339,7 @@
</table>
<div style="min-height: 40px;text-align: center;margin-top: 10px">
<el-button type="success" @click="updateZDxx()">保存</el-button>
<el-button type="success" @click="updateZDxx">保存</el-button>
<el-button type="primary" @click="submitZDxx">提交</el-button>
</div>
</div>
......@@ -349,12 +349,13 @@
<script>
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import {submit} from "../../../api/common"
import {
getAllList,
getDdicByMC,
getListByXzqbsm,
getListByPbsm,
submit,
getTree,
} from "../../../api/common";
import {
getBdcdyh,
......@@ -623,11 +624,16 @@ export default {
status:1,
type:"zd"
}
submit(data).then((res)=>{
if(res.code===200){
this.$message.success("提交完成!")
this.getZdjbxxData(this.$store.state.zdbsm);
this.$message.success("提交成功!")
this.getZdjbxxData(this.curZdbsm);
getTree(this.curZdbsm).then((res) => {
if (res.success) {
// console.log('successsuccesssuccesssuccess');
this.$store.state.treeData = res.result;
}
});
}
})
},
......