017d8d44 by weimo934

Merge remote-tracking branch 'origin/master'

2 parents de304aea 262f684b
......@@ -121,4 +121,28 @@ ol, ul { list-style:none; }
}
.el-tabs__content{
position: unset;
}
\ No newline at end of file
}
// 自定义右键菜单样式
.contextmenu {
margin: 0;
background: #fff;
z-index: 3000;
position: absolute;
list-style-type: none;
padding: 5px 0;
border-radius: 4px;
font-size: 12px;
font-weight: 400;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
}
.contextmenu li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
}
.contextmenu li:hover {
background: #eee;
}
// end
\ No newline at end of file
......
<template>
<div class="main">
<el-dialog
title="户重新落宗"
:visible.sync="isVisible"
......@@ -68,7 +67,6 @@
<query-data :centerDialogVisible="xzzdVisible" @close="xzzdClose" @getData="getZdxx"
:isZdClose="true"></query-data>
</el-dialog>
</div>
</template>
<script>
......
......@@ -260,31 +260,7 @@ export default {
};
</script>
<style lang="less" scoped>
// 自定义右键菜单样式 start
.contextmenu {
margin: 0;
background: #fff;
z-index: 3000;
position: absolute;
list-style-type: none;
padding: 5px 0;
border-radius: 4px;
font-size: 12px;
font-weight: 400;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
}
.contextmenu li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
}
.contextmenu li:hover {
background: #eee;
}
// end
.content {
height: 100%;
width: 100%;
......
......@@ -626,7 +626,6 @@ export default {
font-size: 16px;
}
td {
width: 60px;
text-align: center;
height: 36px;
}
......
......@@ -12,9 +12,9 @@
<table class="chTable" :style="{'top':(ljzzdyHeight-1-zdys.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
<tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
<!-- 显示户 -->
<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>
<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>
</tr>
</table>
<!-- </div> -->
......@@ -28,9 +28,9 @@
<table class="chTable" :style="{'top':(ljzzdyHeight+40-1-ljzs.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0">
<tr v-for="(cs) in ljzs.cs" :key="cs.bsm">
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
<!-- 显示户 -->
<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>
<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>
</tr>
</table>
</div>
......@@ -53,9 +53,9 @@
<table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
<tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
<!-- 显示户 -->
<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>
<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>
</tr>
</table>
</div>
......@@ -65,9 +65,9 @@
<table class="chTable" ref="ch" border="1" cellspacing="0" cellpadding="0" v-show="lpbData.cs != null && lpbData.cs.length>0" >
<tr v-for="(cs,csIndex) in lpbData.cs" :key="csIndex">
<!-- 显示层数 -->
<td class="floor">{{cs.sjc}}</td>
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')">{{cs.sjc}}</td>
<!-- 显示户 -->
<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>
<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>
</tr>
</table>
</div>
......@@ -81,6 +81,18 @@
>
{{ lpbData.xmmc }}
</div>
<ul
v-show="lpbChVisible"
:style="{ left: lpbChLeft + 'px', top: lpbChTop + 'px' }"
class="contextmenu"
>
<li v-show='rightClickFlag=="h"' @click="handleAddH">添加</li>
<li v-show='rightClickFlag=="h"' @click="handleMoveH">移动</li>
<li v-show='rightClickFlag=="h"' @click="handleDeleteH">删除</li>
<li v-show='rightClickFlag=="h"' @click="handleSyczh">实预测转换</li>
<li v-show='rightClickFlag=="c"' @click="handleAddC">添加</li>
<li v-show='rightClickFlag=="c"' @click="handleDeleteC">删除</li>
</ul>
</div>
</template>
<script>
......@@ -109,6 +121,12 @@ export default {
searchNum: Math.random(),
//接收父组件传入的根据单元状态/房屋性质/房屋用途筛选的户bsmList
choosedList: [],
lpbChVisible:false, //层户右键菜单显隐
lpbChLeft:100,
lpbChTop:100,
//右键层户数据
chData:'',
rightClickFlag:""
};
},
created() {},
......@@ -247,7 +265,7 @@ export default {
},
//清除选中户
clearChoosedH() {
this.$nextTick(() => {
// this.$nextTick(() => {
//将每个选中的户的选中状态清除
this.$refs.hBsm.forEach((item) => {
if (item.className == "tdSelect") {
......@@ -256,8 +274,43 @@ export default {
});
// 清空hbsmList
this.hbsmList = [];
});
// });
},
//户右键点击事件
openMenu(e,item,type){
console.log(e,'e');
this.lpbChLeft = e.pageX;
this.lpbChTop = e.pageY;
this.chData = item;
this.rightClickFlag = type;
this.lpbChVisible = true;
},
//关闭右键菜单
closeMenu(){
this.lpbChVisible = false
},
//户右键菜单 start
handleAddH(){
},
handleMoveH(){
},
handleDeleteH(){
},
handleSyczh(){
},
//end
// 层右键菜单 start
handleAddC(){
},
handleDeleteC(){
},
//end
},
computed: {
createFlagChange() {
......@@ -298,11 +351,19 @@ export default {
this.$refs.hBsm.forEach((item) => {
this.choosedList.forEach((i) => {
if (item.dataset.bsm == i) {
console.log(item.dataset.bsm+'----分割线-----'+i);
item.className = "tdSelect";
}
});
});
},
lpbChVisible(value) {
if (value) {
document.body.addEventListener("click", this.closeMenu);
} else {
document.body.removeEventListener("click", this.closeMenu);
}
}
},
};
</script>
......@@ -311,7 +372,6 @@ export default {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
.lpbContent {
width: 100%;
height: 100%;
......@@ -438,8 +498,8 @@ export default {
height: 60px;
line-height: 60px;
background-color: darkgoldenrod;
position: absolute;
bottom: 6px;
position: relative;
bottom: 66px;
text-align: center;
transition: 0.5s;
}
......