ac652fd7 by 杨威

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

1 parent e7c0cce7
...@@ -165,19 +165,11 @@ export default { ...@@ -165,19 +165,11 @@ export default {
165 this.getTreeList(); 165 this.getTreeList();
166 } 166 }
167 }, 167 },
168 "$store.state.zdbsm": function(bsm) {
169 this.getRightTree(bsm);
170 },
171 "$store.state.zrzbsm": function(bsm) {
172 this.getRightTreeByZrzbsm(this.$store.state.zrzbsm);
173 },
174
175 "$store.state.treeData":function (val) { 168 "$store.state.treeData":function (val) {
176 console.log(val,'val');
177 this.pd = val; 169 this.pd = val;
178 }, 170 },
179 '$store.state.treeZdbsm':function (val) { 171 '$store.state.treeZdbsm':function (val) {
180 console.log(val,'val'); 172 // console.log(val,'val');
181 }, 173 },
182 }, 174 },
183 mounted(){ 175 mounted(){
...@@ -210,7 +202,10 @@ export default { ...@@ -210,7 +202,10 @@ export default {
210 icon: "iconfont icontianjia", 202 icon: "iconfont icontianjia",
211 path: "/add", 203 path: "/add",
212 }, 204 },
213 { name: "更正", icon: "iconfont icongengzheng", path: "/modify" }, 205 {
206 name: "更正",
207 icon: "iconfont icongengzheng",
208 path: "/modify" },
214 { 209 {
215 name: "变更", 210 name: "变更",
216 icon: "iconfont iconbiangeng", 211 icon: "iconfont iconbiangeng",
......
...@@ -156,6 +156,7 @@ import { insertDzjbxx } from "../../../api/dz"; ...@@ -156,6 +156,7 @@ import { insertDzjbxx } from "../../../api/dz";
156 export default { 156 export default {
157 name: "", 157 name: "",
158 components: {}, 158 components: {},
159 inject:['getRightTree','getRightTreeByZrzbsm'],
159 props: ['auth'], 160 props: ['auth'],
160 data() { 161 data() {
161 return { 162 return {
...@@ -269,6 +270,7 @@ export default { ...@@ -269,6 +270,7 @@ export default {
269 this.$store.state.zdbsm = res.result; 270 this.$store.state.zdbsm = res.result;
270 //todo 跳转到宗地基本信息内容表页面 (预留) 271 //todo 跳转到宗地基本信息内容表页面 (预留)
271 this.close(); 272 this.close();
273 this.getRightTree(this.$store.state.zdbsm);
272 this.$router.push({ 274 this.$router.push({
273 path: '/zd', query:{ 275 path: '/zd', query:{
274 source: 2, 276 source: 2,
...@@ -290,7 +292,6 @@ export default { ...@@ -290,7 +292,6 @@ export default {
290 //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm 292 //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
291 this.$refs['ruleForm1'].validate((valid) => { 293 this.$refs['ruleForm1'].validate((valid) => {
292 if (valid) { 294 if (valid) {
293
294 this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : ''; 295 this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : '';
295 this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : ''; 296 this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : '';
296 insertZrzjbxx(this.ruleForm1) 297 insertZrzjbxx(this.ruleForm1)
...@@ -304,7 +305,10 @@ export default { ...@@ -304,7 +305,10 @@ export default {
304 this.$store.state.zdbsm=res.result.zdbsm; 305 this.$store.state.zdbsm=res.result.zdbsm;
305 this.$store.state.zrzbsm=res.result.bsm; 306 this.$store.state.zrzbsm=res.result.bsm;
306 this.$store.state.xmmc=res.result.xmmc; 307 this.$store.state.xmmc=res.result.xmmc;
308 this.$store.state.newZdbsm = res.result.zdbsm;
307 this.close(); 309 this.close();
310 //获取左侧树数据
311 this.getRightTreeByZrzbsm(this.$store.state.zdbsm);
308 this.$router.push({ 312 this.$router.push({
309 path: '/zrz', query:{ 313 path: '/zrz', query:{
310 source: 1, 314 source: 1,
...@@ -338,6 +342,7 @@ export default { ...@@ -338,6 +342,7 @@ export default {
338 this.$store.state.zdbsm=res.result.zdbsm; 342 this.$store.state.zdbsm=res.result.zdbsm;
339 this.$store.state.dzbsm=res.result.bsm; 343 this.$store.state.dzbsm=res.result.bsm;
340 this.$store.state.xmmc=res.result.xmmc; 344 this.$store.state.xmmc=res.result.xmmc;
345 this.$store.state.newZdbsm = res.result.zdbsm;
341 this.close(); 346 this.close();
342 this.$router.push({ 347 this.$router.push({
343 path: '/dz', query:{ 348 path: '/dz', query:{
......