在多幢下新建自然幢
Showing
4 changed files
with
33 additions
and
4 deletions
... | @@ -109,7 +109,7 @@ export default { | ... | @@ -109,7 +109,7 @@ export default { |
109 | self.time = setTimeout(() => { | 109 | self.time = setTimeout(() => { |
110 | item.expand = item.expand == undefined? true:!item.expand; | 110 | item.expand = item.expand == undefined? true:!item.expand; |
111 | // self.$emit("itemClick", item); | 111 | // self.$emit("itemClick", item); |
112 | if (!item.children) { | 112 | if (!item.children && !item.type) { |
113 | let data = { | 113 | let data = { |
114 | xzqbsm:item.xzq, | 114 | xzqbsm:item.xzq, |
115 | djqbsm:item.djq, | 115 | djqbsm:item.djq, |
... | @@ -150,6 +150,9 @@ export default { | ... | @@ -150,6 +150,9 @@ export default { |
150 | this.$emit("changeIsZD", true); | 150 | this.$emit("changeIsZD", true); |
151 | this.$emit("changeVisible", true); | 151 | this.$emit("changeVisible", true); |
152 | break; | 152 | break; |
153 | case 'dz': | ||
154 | this.$emit("changeDzVisible", true); | ||
155 | break; | ||
153 | case 'zrz': | 156 | case 'zrz': |
154 | this.$emit("changeIsZD", false); | 157 | this.$emit("changeIsZD", false); |
155 | this.$emit("changeVisible", true); | 158 | this.$emit("changeVisible", true); | ... | ... |
... | @@ -42,6 +42,7 @@ | ... | @@ -42,6 +42,7 @@ |
42 | @changeLpbVisible="changeLpbVisible" | 42 | @changeLpbVisible="changeLpbVisible" |
43 | @changeIsZD="changeIsZD" | 43 | @changeIsZD="changeIsZD" |
44 | @changeCreateVisible="changeCreateVisible" | 44 | @changeCreateVisible="changeCreateVisible" |
45 | @changeDzVisible="changeDzVisible" | ||
45 | :list="item.children" | 46 | :list="item.children" |
46 | :visible="visible" | 47 | :visible="visible" |
47 | :size="size" | 48 | :size="size" |
... | @@ -65,6 +66,13 @@ | ... | @@ -65,6 +66,13 @@ |
65 | <li @click="deleteByBsm()">删除</li> | 66 | <li @click="deleteByBsm()">删除</li> |
66 | </ul> | 67 | </ul> |
67 | <ul | 68 | <ul |
69 | v-show="dzVisible" | ||
70 | :style="{ left: left + 'px', top: top + 'px' }" | ||
71 | class="contextmenu" | ||
72 | > | ||
73 | <li @click="openCreateDialog">新建自然幢</li> | ||
74 | </ul> | ||
75 | <ul | ||
68 | v-show="createVisible" | 76 | v-show="createVisible" |
69 | :style="{ left: left + 'px', top: top + 'px' }" | 77 | :style="{ left: left + 'px', top: top + 'px' }" |
70 | class="contextmenu" | 78 | class="contextmenu" |
... | @@ -121,6 +129,8 @@ export default { | ... | @@ -121,6 +129,8 @@ export default { |
121 | lpbleft: 0, | 129 | lpbleft: 0, |
122 | //控制新建宗地菜单 | 130 | //控制新建宗地菜单 |
123 | createVisible:false, | 131 | createVisible:false, |
132 | //多幢 | ||
133 | dzVisible:false | ||
124 | }; | 134 | }; |
125 | }, | 135 | }, |
126 | watch: { | 136 | watch: { |
... | @@ -136,6 +146,13 @@ export default { | ... | @@ -136,6 +146,13 @@ export default { |
136 | document.body.removeEventListener("click", this.closeMenu); | 146 | document.body.removeEventListener("click", this.closeMenu); |
137 | } | 147 | } |
138 | }, | 148 | }, |
149 | dzVisible(value) { | ||
150 | if (value) { | ||
151 | document.body.addEventListener("click", this.closeMenu); | ||
152 | } else { | ||
153 | document.body.removeEventListener("click", this.closeMenu); | ||
154 | } | ||
155 | }, | ||
139 | 156 | ||
140 | // createVisible(value) { | 157 | // createVisible(value) { |
141 | // if (value) { | 158 | // if (value) { |
... | @@ -176,10 +193,16 @@ export default { | ... | @@ -176,10 +193,16 @@ export default { |
176 | changeCreateVisible(data){ | 193 | changeCreateVisible(data){ |
177 | this.createVisible = true; | 194 | this.createVisible = true; |
178 | }, | 195 | }, |
196 | //多幢 | ||
197 | changeDzVisible(data){ | ||
198 | this.dzVisible = data | ||
199 | }, | ||
179 | //添加定着物 | 200 | //添加定着物 |
180 | openCreateDialog(){ | 201 | openCreateDialog(){ |
202 | console.log(this.zdData,'this.zdData'); | ||
181 | this.dialogVisible = true; | 203 | this.dialogVisible = true; |
182 | this.$store.state.rightClickZdbsm = this.zdData.zdbsm; | 204 | this.$store.state.zdbsm = this.zdData.zdbsm; |
205 | this.$store.state.dzbsm = this.zdData.bsm; | ||
183 | }, | 206 | }, |
184 | //关闭添加定着物弹框 | 207 | //关闭添加定着物弹框 |
185 | closeDialog() { | 208 | closeDialog() { |
... | @@ -262,6 +285,7 @@ export default { | ... | @@ -262,6 +285,7 @@ export default { |
262 | //关闭右键菜单 | 285 | //关闭右键菜单 |
263 | closeMenu(){ | 286 | closeMenu(){ |
264 | this.lpbvisible = false; | 287 | this.lpbvisible = false; |
288 | this.dzVisible = false; | ||
265 | // this.createVisible = false; | 289 | // this.createVisible = false; |
266 | }, | 290 | }, |
267 | //楼盘表右键菜单项打开父组件弹框 | 291 | //楼盘表右键菜单项打开父组件弹框 | ... | ... |
... | @@ -45,7 +45,8 @@ const store = new Vuex.Store({ | ... | @@ -45,7 +45,8 @@ const store = new Vuex.Store({ |
45 | gyfsList: [], | 45 | gyfsList: [], |
46 | hbsm:'', | 46 | hbsm:'', |
47 | contentWidth:'', //内容区域宽度 | 47 | contentWidth:'', //内容区域宽度 |
48 | zrzh:'' //自然幢号 | 48 | zrzh:'', //自然幢号 |
49 | dzbsm:'' // 多幢bsm | ||
49 | }, | 50 | }, |
50 | modules: { | 51 | modules: { |
51 | user, | 52 | user, | ... | ... |
... | @@ -250,7 +250,8 @@ export default { | ... | @@ -250,7 +250,8 @@ export default { |
250 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm | 250 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm |
251 | this.$refs['ruleForm1'].validate((valid) => { | 251 | this.$refs['ruleForm1'].validate((valid) => { |
252 | if (valid) { | 252 | if (valid) { |
253 | this.ruleForm1.zdbsm = this.$store.state.rightClickZdbsm != '' ? this.$store.state.rightClickZdbsm : ''; | 253 | this.ruleForm1.zdbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : ''; |
254 | this.ruleForm1.dzbsm = this.$store.state.dzbsm != '' ? this.$store.state.dzbsm : ''; | ||
254 | insertZrzjbxx(this.ruleForm1) | 255 | insertZrzjbxx(this.ruleForm1) |
255 | .then((res) => { | 256 | .then((res) => { |
256 | if (res.code == "200") { | 257 | if (res.code == "200") { | ... | ... |
-
Please register or sign in to post a comment