ac652fd7 by 杨威

新建宗地/自然幢/多幢成功后更新目录树

1 parent e7c0cce7
......@@ -165,19 +165,11 @@ export default {
this.getTreeList();
}
},
"$store.state.zdbsm": function(bsm) {
this.getRightTree(bsm);
},
"$store.state.zrzbsm": function(bsm) {
this.getRightTreeByZrzbsm(this.$store.state.zrzbsm);
},
"$store.state.treeData":function (val) {
console.log(val,'val');
this.pd = val;
},
'$store.state.treeZdbsm':function (val) {
console.log(val,'val');
// console.log(val,'val');
},
},
mounted(){
......@@ -210,7 +202,10 @@ export default {
icon: "iconfont icontianjia",
path: "/add",
},
{ name: "更正", icon: "iconfont icongengzheng", path: "/modify" },
{
name: "更正",
icon: "iconfont icongengzheng",
path: "/modify" },
{
name: "变更",
icon: "iconfont iconbiangeng",
......
......@@ -156,6 +156,7 @@ import { insertDzjbxx } from "../../../api/dz";
export default {
name: "",
components: {},
inject:['getRightTree','getRightTreeByZrzbsm'],
props: ['auth'],
data() {
return {
......@@ -269,6 +270,7 @@ export default {
this.$store.state.zdbsm = res.result;
//todo 跳转到宗地基本信息内容表页面 (预留)
this.close();
this.getRightTree(this.$store.state.zdbsm);
this.$router.push({
path: '/zd', query:{
source: 2,
......@@ -290,7 +292,6 @@ export default {
//todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
this.$refs['ruleForm1'].validate((valid) => {
if (valid) {
this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : '';
this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : '';
insertZrzjbxx(this.ruleForm1)
......@@ -304,7 +305,10 @@ export default {
this.$store.state.zdbsm=res.result.zdbsm;
this.$store.state.zrzbsm=res.result.bsm;
this.$store.state.xmmc=res.result.xmmc;
this.$store.state.newZdbsm = res.result.zdbsm;
this.close();
//获取左侧树数据
this.getRightTreeByZrzbsm(this.$store.state.zdbsm);
this.$router.push({
path: '/zrz', query:{
source: 1,
......@@ -338,6 +342,7 @@ export default {
this.$store.state.zdbsm=res.result.zdbsm;
this.$store.state.dzbsm=res.result.bsm;
this.$store.state.xmmc=res.result.xmmc;
this.$store.state.newZdbsm = res.result.zdbsm;
this.close();
this.$router.push({
path: '/dz', query:{
......