017d8d44 by weimo934

Merge remote-tracking branch 'origin/master'

2 parents de304aea 262f684b
...@@ -122,3 +122,27 @@ ol, ul { list-style:none; } ...@@ -122,3 +122,27 @@ ol, ul { list-style:none; }
122 .el-tabs__content{ 122 .el-tabs__content{
123 position: unset; 123 position: unset;
124 } 124 }
125 // 自定义右键菜单样式
126 .contextmenu {
127 margin: 0;
128 background: #fff;
129 z-index: 3000;
130 position: absolute;
131 list-style-type: none;
132 padding: 5px 0;
133 border-radius: 4px;
134 font-size: 12px;
135 font-weight: 400;
136 color: #333;
137 box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
138 }
139 .contextmenu li {
140 margin: 0;
141 padding: 7px 16px;
142 cursor: pointer;
143 }
144
145 .contextmenu li:hover {
146 background: #eee;
147 }
148 // end
...\ No newline at end of file ...\ No newline at end of file
......
1 <template> 1 <template>
2 <div class="main">
3 <el-dialog 2 <el-dialog
4 title="户重新落宗" 3 title="户重新落宗"
5 :visible.sync="isVisible" 4 :visible.sync="isVisible"
...@@ -68,7 +67,6 @@ ...@@ -68,7 +67,6 @@
68 <query-data :centerDialogVisible="xzzdVisible" @close="xzzdClose" @getData="getZdxx" 67 <query-data :centerDialogVisible="xzzdVisible" @close="xzzdClose" @getData="getZdxx"
69 :isZdClose="true"></query-data> 68 :isZdClose="true"></query-data>
70 </el-dialog> 69 </el-dialog>
71 </div>
72 </template> 70 </template>
73 71
74 <script> 72 <script>
......
...@@ -260,31 +260,7 @@ export default { ...@@ -260,31 +260,7 @@ export default {
260 }; 260 };
261 </script> 261 </script>
262 <style lang="less" scoped> 262 <style lang="less" scoped>
263 // 自定义右键菜单样式 start
264 .contextmenu {
265 margin: 0;
266 background: #fff;
267 z-index: 3000;
268 position: absolute;
269 list-style-type: none;
270 padding: 5px 0;
271 border-radius: 4px;
272 font-size: 12px;
273 font-weight: 400;
274 color: #333;
275 box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
276 }
277
278 .contextmenu li {
279 margin: 0;
280 padding: 7px 16px;
281 cursor: pointer;
282 }
283 263
284 .contextmenu li:hover {
285 background: #eee;
286 }
287 // end
288 .content { 264 .content {
289 height: 100%; 265 height: 100%;
290 width: 100%; 266 width: 100%;
......
...@@ -626,7 +626,6 @@ export default { ...@@ -626,7 +626,6 @@ export default {
626 font-size: 16px; 626 font-size: 16px;
627 } 627 }
628 td { 628 td {
629 width: 60px;
630 text-align: center; 629 text-align: center;
631 height: 36px; 630 height: 36px;
632 } 631 }
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
12 <table class="chTable" :style="{'top':(ljzzdyHeight-1-zdys.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> 12 <table class="chTable" :style="{'top':(ljzzdyHeight-1-zdys.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
13 <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> 13 <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
14 <!-- 显示层数 --> 14 <!-- 显示层数 -->
15 <td class="floor">{{cs.sjc}}</td> 15 <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
16 <!-- 显示户 --> 16 <!-- 显示户 -->
17 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> 17 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
18 </tr> 18 </tr>
19 </table> 19 </table>
20 <!-- </div> --> 20 <!-- </div> -->
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
28 <table class="chTable" :style="{'top':(ljzzdyHeight+40-1-ljzs.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0"> 28 <table class="chTable" :style="{'top':(ljzzdyHeight+40-1-ljzs.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0">
29 <tr v-for="(cs) in ljzs.cs" :key="cs.bsm"> 29 <tr v-for="(cs) in ljzs.cs" :key="cs.bsm">
30 <!-- 显示层数 --> 30 <!-- 显示层数 -->
31 <td class="floor">{{cs.sjc}}</td> 31 <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
32 <!-- 显示户 --> 32 <!-- 显示户 -->
33 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> 33 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
34 </tr> 34 </tr>
35 </table> 35 </table>
36 </div> 36 </div>
...@@ -53,9 +53,9 @@ ...@@ -53,9 +53,9 @@
53 <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0"> 53 <table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
54 <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex"> 54 <tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
55 <!-- 显示层数 --> 55 <!-- 显示层数 -->
56 <td class="floor">{{cs.sjc}}</td> 56 <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
57 <!-- 显示户 --> 57 <!-- 显示户 -->
58 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> 58 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
59 </tr> 59 </tr>
60 </table> 60 </table>
61 </div> 61 </div>
...@@ -65,9 +65,9 @@ ...@@ -65,9 +65,9 @@
65 <table class="chTable" ref="ch" border="1" cellspacing="0" cellpadding="0" v-show="lpbData.cs != null && lpbData.cs.length>0" > 65 <table class="chTable" ref="ch" border="1" cellspacing="0" cellpadding="0" v-show="lpbData.cs != null && lpbData.cs.length>0" >
66 <tr v-for="(cs,csIndex) in lpbData.cs" :key="csIndex"> 66 <tr v-for="(cs,csIndex) in lpbData.cs" :key="csIndex">
67 <!-- 显示层数 --> 67 <!-- 显示层数 -->
68 <td class="floor">{{cs.sjc}}</td> 68 <td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
69 <!-- 显示户 --> 69 <!-- 显示户 -->
70 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> 70 <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
71 </tr> 71 </tr>
72 </table> 72 </table>
73 </div> 73 </div>
...@@ -81,6 +81,18 @@ ...@@ -81,6 +81,18 @@
81 > 81 >
82 {{ lpbData.xmmc }} 82 {{ lpbData.xmmc }}
83 </div> 83 </div>
84 <ul
85 v-show="lpbChVisible"
86 :style="{ left: lpbChLeft + 'px', top: lpbChTop + 'px' }"
87 class="contextmenu"
88 >
89 <li v-show='rightClickFlag=="h"' @click="handleAddH">添加</li>
90 <li v-show='rightClickFlag=="h"' @click="handleMoveH">移动</li>
91 <li v-show='rightClickFlag=="h"' @click="handleDeleteH">删除</li>
92 <li v-show='rightClickFlag=="h"' @click="handleSyczh">实预测转换</li>
93 <li v-show='rightClickFlag=="c"' @click="handleAddC">添加</li>
94 <li v-show='rightClickFlag=="c"' @click="handleDeleteC">删除</li>
95 </ul>
84 </div> 96 </div>
85 </template> 97 </template>
86 <script> 98 <script>
...@@ -109,6 +121,12 @@ export default { ...@@ -109,6 +121,12 @@ export default {
109 searchNum: Math.random(), 121 searchNum: Math.random(),
110 //接收父组件传入的根据单元状态/房屋性质/房屋用途筛选的户bsmList 122 //接收父组件传入的根据单元状态/房屋性质/房屋用途筛选的户bsmList
111 choosedList: [], 123 choosedList: [],
124 lpbChVisible:false, //层户右键菜单显隐
125 lpbChLeft:100,
126 lpbChTop:100,
127 //右键层户数据
128 chData:'',
129 rightClickFlag:""
112 }; 130 };
113 }, 131 },
114 created() {}, 132 created() {},
...@@ -247,7 +265,7 @@ export default { ...@@ -247,7 +265,7 @@ export default {
247 }, 265 },
248 //清除选中户 266 //清除选中户
249 clearChoosedH() { 267 clearChoosedH() {
250 this.$nextTick(() => { 268 // this.$nextTick(() => {
251 //将每个选中的户的选中状态清除 269 //将每个选中的户的选中状态清除
252 this.$refs.hBsm.forEach((item) => { 270 this.$refs.hBsm.forEach((item) => {
253 if (item.className == "tdSelect") { 271 if (item.className == "tdSelect") {
...@@ -256,8 +274,43 @@ export default { ...@@ -256,8 +274,43 @@ export default {
256 }); 274 });
257 // 清空hbsmList 275 // 清空hbsmList
258 this.hbsmList = []; 276 this.hbsmList = [];
259 }); 277 // });
278 },
279 //户右键点击事件
280 openMenu(e,item,type){
281 console.log(e,'e');
282 this.lpbChLeft = e.pageX;
283 this.lpbChTop = e.pageY;
284 this.chData = item;
285 this.rightClickFlag = type;
286 this.lpbChVisible = true;
287 },
288 //关闭右键菜单
289 closeMenu(){
290 this.lpbChVisible = false
291 },
292 //户右键菜单 start
293 handleAddH(){
294
295 },
296 handleMoveH(){
297
260 }, 298 },
299 handleDeleteH(){
300
301 },
302 handleSyczh(){
303
304 },
305 //end
306 // 层右键菜单 start
307 handleAddC(){
308
309 },
310 handleDeleteC(){
311
312 },
313 //end
261 }, 314 },
262 computed: { 315 computed: {
263 createFlagChange() { 316 createFlagChange() {
...@@ -298,11 +351,19 @@ export default { ...@@ -298,11 +351,19 @@ export default {
298 this.$refs.hBsm.forEach((item) => { 351 this.$refs.hBsm.forEach((item) => {
299 this.choosedList.forEach((i) => { 352 this.choosedList.forEach((i) => {
300 if (item.dataset.bsm == i) { 353 if (item.dataset.bsm == i) {
354 console.log(item.dataset.bsm+'----分割线-----'+i);
301 item.className = "tdSelect"; 355 item.className = "tdSelect";
302 } 356 }
303 }); 357 });
304 }); 358 });
305 }, 359 },
360 lpbChVisible(value) {
361 if (value) {
362 document.body.addEventListener("click", this.closeMenu);
363 } else {
364 document.body.removeEventListener("click", this.closeMenu);
365 }
366 }
306 }, 367 },
307 }; 368 };
308 </script> 369 </script>
...@@ -311,7 +372,6 @@ export default { ...@@ -311,7 +372,6 @@ export default {
311 width: 100%; 372 width: 100%;
312 height: 100%; 373 height: 100%;
313 overflow: hidden; 374 overflow: hidden;
314 position: relative;
315 .lpbContent { 375 .lpbContent {
316 width: 100%; 376 width: 100%;
317 height: 100%; 377 height: 100%;
...@@ -438,8 +498,8 @@ export default { ...@@ -438,8 +498,8 @@ export default {
438 height: 60px; 498 height: 60px;
439 line-height: 60px; 499 line-height: 60px;
440 background-color: darkgoldenrod; 500 background-color: darkgoldenrod;
441 position: absolute; 501 position: relative;
442 bottom: 6px; 502 bottom: 66px;
443 text-align: center; 503 text-align: center;
444 transition: 0.5s; 504 transition: 0.5s;
445 } 505 }
......