|
@@ -91,6 +91,7 @@
|
|
|
<script>
|
|
|
import addFloor from "@/views/ready/buildfloor/addFloor/index";
|
|
|
import addBuild from "@/components/ready/buildfloor/addBuild";
|
|
|
+import { mapGetters, mapActions } from "vuex";
|
|
|
import addConnectivity from "@/components/ready/buildfloor/addConnectivity";
|
|
|
import {
|
|
|
buildingQuery,
|
|
@@ -131,20 +132,26 @@ export default {
|
|
|
curFloorId: '', //当前选中的楼层id
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters("layout", ["projectId"])
|
|
|
+ },
|
|
|
mounted() { },
|
|
|
created() {
|
|
|
- let bdParam = {
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 500
|
|
|
- }
|
|
|
- buildingQuery(bdParam, res => {
|
|
|
- this.buildList = res.Content;
|
|
|
- if (this.buildList.length) {
|
|
|
- this.changeBuild(0)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ let bdParam = {
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 500
|
|
|
+ }
|
|
|
+ buildingQuery(bdParam, res => {
|
|
|
+ this.buildList = res.Content;
|
|
|
+ if (this.buildList.length) {
|
|
|
+ this.changeBuild(0)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//change build
|
|
|
changeBuild(index) {
|
|
|
this.buildList.map(item => {
|
|
@@ -222,6 +229,11 @@ export default {
|
|
|
this.$refs.addConnectivity.showDialog()
|
|
|
this.$refs.addConnectivity.floor = row
|
|
|
}
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ projectId() {
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|