feat(Home):登记调用之后刷新左侧目录树
Showing
5 changed files
with
14 additions
and
2 deletions
| ... | @@ -66,6 +66,11 @@ export default { | ... | @@ -66,6 +66,11 @@ export default { |
| 66 | LineTree, | 66 | LineTree, |
| 67 | Create, | 67 | Create, |
| 68 | }, | 68 | }, |
| 69 | provide(){ | ||
| 70 | return{ | ||
| 71 | getRightTree: this.getRightTree | ||
| 72 | } | ||
| 73 | }, | ||
| 69 | data() { | 74 | data() { |
| 70 | return { | 75 | return { |
| 71 | navigationList: [], | 76 | navigationList: [], |
| ... | @@ -180,7 +185,7 @@ export default { | ... | @@ -180,7 +185,7 @@ export default { |
| 180 | "$store.state.zrzbsm": function(bsm) { | 185 | "$store.state.zrzbsm": function(bsm) { |
| 181 | this.getRightTreeByZrzbsm(this.$store.state.zrzbsm); | 186 | this.getRightTreeByZrzbsm(this.$store.state.zrzbsm); |
| 182 | }, | 187 | }, |
| 183 | 188 | ||
| 184 | "$store.state.treeData":function (val) { | 189 | "$store.state.treeData":function (val) { |
| 185 | console.log(val,'val'); | 190 | console.log(val,'val'); |
| 186 | this.pd = val; | 191 | this.pd = val; | ... | ... |
| ... | @@ -217,6 +217,7 @@ | ... | @@ -217,6 +217,7 @@ |
| 217 | Qlr, | 217 | Qlr, |
| 218 | Qlxz, | 218 | Qlxz, |
| 219 | }, | 219 | }, |
| 220 | inject:['getRightTree'], | ||
| 220 | data () { | 221 | data () { |
| 221 | return { | 222 | return { |
| 222 | 223 | ||
| ... | @@ -298,6 +299,7 @@ | ... | @@ -298,6 +299,7 @@ |
| 298 | registerCall(data).then(res=>{ | 299 | registerCall(data).then(res=>{ |
| 299 | if (res.success) { | 300 | if (res.success) { |
| 300 | this.$message.success("登记成功") | 301 | this.$message.success("登记成功") |
| 302 | this.getRightTree(this.$store.state.zdbsm) | ||
| 301 | } | 303 | } |
| 302 | }) | 304 | }) |
| 303 | }, | 305 | }, | ... | ... |
| ... | @@ -367,6 +367,7 @@ import { | ... | @@ -367,6 +367,7 @@ import { |
| 367 | } from "../../../api/zd"; | 367 | } from "../../../api/zd"; |
| 368 | 368 | ||
| 369 | export default { | 369 | export default { |
| 370 | inject:['getRightTree'], | ||
| 370 | name: "", | 371 | name: "", |
| 371 | components: { | 372 | components: { |
| 372 | Qlr, | 373 | Qlr, |
| ... | @@ -476,6 +477,7 @@ export default { | ... | @@ -476,6 +477,7 @@ export default { |
| 476 | registerCall(data).then(res=>{ | 477 | registerCall(data).then(res=>{ |
| 477 | if (res.success) { | 478 | if (res.success) { |
| 478 | this.$message.success("登记成功") | 479 | this.$message.success("登记成功") |
| 480 | this.getRightTree(this.$store.state.zdbsm) | ||
| 479 | } | 481 | } |
| 480 | }) | 482 | }) |
| 481 | }, | 483 | }, | ... | ... |
| ... | @@ -299,6 +299,7 @@ export default { | ... | @@ -299,6 +299,7 @@ export default { |
| 299 | hbj, | 299 | hbj, |
| 300 | HCxlz, | 300 | HCxlz, |
| 301 | }, | 301 | }, |
| 302 | inject:['getRightTree'], | ||
| 302 | props: {}, | 303 | props: {}, |
| 303 | data() { | 304 | data() { |
| 304 | return { | 305 | return { |
| ... | @@ -413,6 +414,7 @@ export default { | ... | @@ -413,6 +414,7 @@ export default { |
| 413 | registerCall(data).then(res=>{ | 414 | registerCall(data).then(res=>{ |
| 414 | if (res.success) { | 415 | if (res.success) { |
| 415 | this.$message.success("登记成功") | 416 | this.$message.success("登记成功") |
| 417 | this.getRightTree(this.$store.state.zdbsm) | ||
| 416 | } | 418 | } |
| 417 | }) | 419 | }) |
| 418 | }, | 420 | }, | ... | ... |
| ... | @@ -283,7 +283,7 @@ | ... | @@ -283,7 +283,7 @@ |
| 283 | Qlr, | 283 | Qlr, |
| 284 | Qlxz, | 284 | Qlxz, |
| 285 | }, | 285 | }, |
| 286 | inject:['reload'], | 286 | inject:['reload','getRightTree'], |
| 287 | data () { | 287 | data () { |
| 288 | return { | 288 | return { |
| 289 | 289 | ||
| ... | @@ -404,6 +404,7 @@ | ... | @@ -404,6 +404,7 @@ |
| 404 | registerCall(data).then(res=>{ | 404 | registerCall(data).then(res=>{ |
| 405 | if (res.success) { | 405 | if (res.success) { |
| 406 | this.$message.success("登记成功") | 406 | this.$message.success("登记成功") |
| 407 | this.getRightTree(this.$store.state.zdbsm) | ||
| 407 | } | 408 | } |
| 408 | }) | 409 | }) |
| 409 | }, | 410 | }, | ... | ... |
-
Please register or sign in to post a comment