90ccb6e9 by weimo934

Merge remote-tracking branch 'origin/master'

2 parents f15f2776 21c04667
......@@ -37,7 +37,7 @@
table{
border-width: 0;
}
table,td,tr,.el-col,.title{
table,tr,.el-col,.title{
border-color: #E6E6E6 !important;
}
.el-table th{
......
......@@ -537,7 +537,6 @@
if(this.$store.state.gyfsList.length>0){
this.gyfs=this.$store.state.gyfsList[0].bsm;
}
},
};
</script>
......
......@@ -265,7 +265,12 @@ export default {
this.$store.state.zdbsm = res.result;
//todo 跳转到宗地基本信息内容表页面 (预留)
this.close();
this.$router.push("/zd");
this.$router.push({
path: '/zd', query:{
source: 2,
bsm:res.result
}
});
} else {
this.$message.error(res.message);
}
......
<template>
<div class="main">
<div class="formMenu">
<Qlr ref="qlrxxModule" :bsm="$store.state.zdbsm" :qszt="formData.qszt"></Qlr>
<Qlr ref="qlrxxModule" :bsm="curZdbsm" :qszt="formData.qszt"></Qlr>
<!-- <el-button
type="primary"
class="changeBtn"
......@@ -407,12 +407,12 @@ export default {
{ label: "-", value: "-" },
],
formData: {},
dpdm:'', //宗地底盘代码
curZdbsm:'',
};
},
created() {
created() {
this.curZdbsm = this.$route.query.bsm;
},
mounted() {
this.getZdjbxxData(this.$store.state.zdbsm);
......@@ -453,8 +453,44 @@ export default {
"tdzh": ""
})
}
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = res.result.list;
this.$nextTick(()=>{
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = res.result.list;
})
}else{
this.$nextTick(()=>{
//权利性质数据传给子组件
this.$refs.qlxzModule.countList = [
{
id: Math.random(),
isInside: false,
hasNotBorder: false,
bsm: "", //权利性质标识码
glbsm: "", //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM
qlxzdm: "",
zhqlxzlx: "", //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质
list: [
{
pzdjbsm: "",
pzdjmc: "",
pzytdm: "",
pzytmc: "",
pzytmj: 0,
qlxzbsm: "",
sjdjbsm: "",
sjdjmc: "",
sjytdm: "",
sjytmc: "",
sjytmj: 0,
syqx: "",
tdsyjssj: "",
tdsyqssj: "",
tdzh: "",
},
],
},
];
})
}
}
})
......@@ -677,7 +713,8 @@ export default {
this.$store.state.zddm = val;
},
zdbsm:function (val) {
this.getZdjbxxData(val)
this.getZdjbxxData(val)
this.curZdbsm = this.$route.query.bsm;
}
},
};
......
......@@ -138,7 +138,7 @@
v-for="(item, index) in dyztList"
:key="index"
class="cp"
@click="handleChoosedH(item.bsms)"
@click="handleChoosedH(item.bsms,item.color)"
>
<td>
<i class="fa fa-circle" :style="{ color: item.color }"></i
......@@ -165,7 +165,7 @@
v-for="(item, index) in fwxzList"
:key="index"
class="cp"
@click="handleChoosedH(item.bsms)"
@click="handleChoosedH(item.bsms,item.color)"
>
<td>
<i class="fa fa-circle" :style="{ color: item.color }"></i
......@@ -195,7 +195,7 @@
v-for="(item, index) in fwytList"
:key="index"
class="cp"
@click="handleChoosedH(item.bsms)"
@click="handleChoosedH(item.bsms,item.color)"
>
<td>
<i class="fa fa-circle" :style="{ color: item.color }"></i
......@@ -596,14 +596,23 @@ export default {
}
});
},
//选中房屋状态
handleChoosedH(bsms) {
console.log(bsms,'bsms');
//切换房屋状态
handleChoosedH(bsms,color) {
//每次切换房屋状态,将之前高亮的户边框颜色重置为默认
this.$refs.lpbContent.choosedList = [];
this.$refs.lpbContent.$refs.hBsm.forEach((item) => {
item.style.borderColor = '#E6E6E6';
});
// console.log(bsms,'bsms');
// console.log(color,'color');
// Dyzt:{list:[],mj:''}
//清除选中户
this.$refs.lpbContent.clearChoosedH();
//给hBsmList传值
this.$refs.lpbContent.choosedList = bsms;
// this.$refs.lpbContent.clearChoosedH();
this.$nextTick(()=>{
//给hBsmList传值
this.$refs.lpbContent.choosedList = bsms;
this.$refs.lpbContent.borderColor = color;
})
},
//批量添加不动产单元号
addBdcdyh() {
......
<template>
<div class="lpbContent-wrap" ref="lpbContentWrap">
<div :class="lpbData.ljzs.length == 0 ? 'column-reverse lpbContent':'lpbContent'" ref="lpbContent" v-loading='loading'>
<div :class="(lpbData.cs.length == 0 && lpbData.zdys.length == 0) ? 'bottom40 ljz-wrap':'ljz-wrap'" v-show="lpbData.ljzs.length>0">
<div class="lpbContent-wrap" ref="lpbContentWrap">
<div
:class="
lpbData.ljzs.length == 0 ? 'column-reverse lpbContent' : 'lpbContent'
"
ref="lpbContent"
v-loading="loading"
>
<div
:class="
lpbData.cs.length == 0 && lpbData.zdys.length == 0
? 'bottom40 ljz-wrap'
: 'ljz-wrap'
"
v-show="lpbData.ljzs.length > 0"
>
<!-- 循环逻辑幢数据 -->
<div class="ljz" ref="ljz" v-for="(ljzs,ljzIndex) in lpbData.ljzs" :key="ljzIndex">
<div
class="ljz"
ref="ljz"
v-for="(ljzs, ljzIndex) in lpbData.ljzs"
:key="ljzIndex"
>
<!-- <div class="ljz-zdy-wrap" :style="{'min-height':ljzzdyHeight+40+'px'}"> -->
<!-- 循环逻辑幢下的幢单元 -->
<div class="ljz-zdy" :style="{'min-height':ljzzdyHeight+40+'px'}" ref="ljzzdy" v-show="ljzs.zdys.length>0" v-for="(zdys,zdyIndex) in ljzs.zdys" :key="zdyIndex" >
<!-- 循环幢单元下的层户 -->
<!-- <div class="chTable-wrap"> -->
<table class="chTable psr" :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" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
</tr>
</table>
<!-- </div> -->
<!-- 幢单元名称 -->
<div class="zdy-name name">
{{zdys.zdymc}}
</div>
</div>
<!-- 循环逻辑幢下的层户 -->
<div class="ljz-ch" :style="{'height':'auto'}" v-if="ljzs.cs.length>0">
<table class="chTable" :style="{'top':(ljzzdyHeight+40-1-ljzs.cs.length*65)<0? 0:(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" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
</tr>
</table>
<!-- 循环逻辑幢下的幢单元 -->
<div
class="ljz-zdy"
:style="{ 'min-height': ljzzdyHeight + 40 + 'px' }"
ref="ljzzdy"
v-show="ljzs.zdys.length > 0"
v-for="(zdys, zdyIndex) in ljzs.zdys"
:key="zdyIndex"
>
<!-- 循环幢单元下的层户 -->
<!-- <div class="chTable-wrap"> -->
<table
class="chTable psr"
: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"
ref="cBsm"
@contextmenu.prevent="openMenu($event, cs, 'c')"
@click="handleClickC($event, cs)"
>
{{ cs.sjc }}
</td>
<!-- 显示户 -->
<td
v-for="(hs, hsIndex) in cs.hs"
:rowspan="hs.sjcs"
: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> -->
<!-- 幢单元名称 -->
<div class="zdy-name name">
{{ zdys.zdymc }}
</div>
</div>
<!-- 循环逻辑幢下的层户 -->
<div
class="ljz-ch"
:style="{ height: 'auto' }"
v-if="ljzs.cs.length > 0"
>
<table
class="chTable"
:style="{
top:
ljzzdyHeight + 40 - 1 - ljzs.cs.length * 65 < 0
? 0
: 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"
ref="cBsm"
@contextmenu.prevent="openMenu($event, cs, 'c')"
@click="handleClickC($event, cs)"
>
{{ cs.sjc }}
</td>
<!-- 显示户 -->
<td
v-for="(hs, hsIndex) in cs.hs"
:rowspan="hs.sjcs"
: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>
<!-- </div> -->
<!-- 逻辑幢名称 -->
<div class="ljz-name name">
{{ljzs.ljzmc}}
{{ ljzs.ljzmc }}
</div>
</div>
</div>
<div class="zdy-wrap" :style="{'width':zdyWidth+'px'}">
<div class="zdy-wrap" :style="{ width: zdyWidth + 'px' }">
<!-- 循环自然幢下的幢单元 -->
<div class="zdy column-reverse" ref="zdy" v-for="(zdys,zdyIndex) in lpbData.zdys" :key="zdyIndex" :style="{'min-height':zdyHeight+'px'}">
<div
class="zdy column-reverse"
ref="zdy"
v-for="(zdys, zdyIndex) in lpbData.zdys"
:key="zdyIndex"
:style="{ 'min-height': zdyHeight + 'px' }"
>
<!-- 幢单元名称 -->
<div class="zdy-name name">
{{zdys.zdymc}}
{{ zdys.zdymc }}
</div>
<!-- 循环幢单元下的层户 -->
<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">
<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" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<td
class="floor"
ref="cBsm"
@contextmenu.prevent="openMenu($event, cs, 'c')"
@click="handleClickC($event, cs)"
>
{{ 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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
<td
v-for="(hs, hsIndex) in cs.hs"
:rowspan="hs.sjcs"
: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>
<!-- 循环自然幢下的独立层户 -->
<!-- <template > -->
<div class="zdy column-reverse" :style="{'min-height':cHeight+'px'}">
<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">
<div
class="zdy column-reverse"
:style="{ 'min-height': cHeight + 'px' }"
>
<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" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<td
class="floor"
ref="cBsm"
@contextmenu.prevent="openMenu($event, cs, 'c')"
@click="handleClickC($event, cs)"
>
{{ 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)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
<td
v-for="(hs, hsIndex) in cs.hs"
:rowspan="hs.sjcs"
: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>
......@@ -75,10 +221,7 @@
</div>
<!-- <div class="ch-wrap">层户</div> -->
</div>
<div
class="zrz"
:style="{ width: lpbContentWidth + 'px'}"
>
<div class="zrz" :style="{ width: lpbContentWidth + 'px' }">
{{ lpbData.xmmc }}
</div>
<ul
......@@ -86,22 +229,39 @@
: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('up')">向上添加层</li>
<li v-show='rightClickFlag=="c"' @click="handleAddC('down')">向下添加层</li>
<li v-show='rightClickFlag=="c"' @click="handleDeleteC">删除层</li>
<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('up')">
向上添加层
</li>
<li v-show="rightClickFlag == 'c'" @click="handleAddC('down')">
向下添加层
</li>
<li v-show="rightClickFlag == 'c'" @click="handleDeleteC">删除层</li>
</ul>
<!-- 层操作弹框 -->
<el-dialog :title="addCData.title" :visible.sync="addCVisible" width="50%" center>
<el-form :model="addCData">
<el-dialog
:title="addCData.title"
:visible.sync="addCVisible"
width="50%"
center
>
<el-form :model="addCData">
<el-form-item label="层号" :label-width="formLabelWidth">
<el-input disabled v-model="addCData.sjc" autocomplete="off"></el-input>
<el-input
disabled
v-model="addCData.sjc"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="实际层" :label-width="formLabelWidth">
<el-input disabled v-model="addCData.sjc" autocomplete="off"></el-input>
<el-input
disabled
v-model="addCData.sjc"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="添加的户数" :label-width="formLabelWidth">
<el-input v-model="addCData.hcount" autocomplete="off"></el-input>
......@@ -112,19 +272,25 @@
<el-button type="primary" @click="addCVisible = false">取消</el-button>
</div>
</el-dialog>
<move-h :hbsm="chData.bsm" @close="moveHClose" :move-hvisible="moveHvisible" :type="scyclx" @loading="loadingData"></move-h>
<move-h
:hbsm="chData.bsm"
@close="moveHClose"
:move-hvisible="moveHvisible"
:type="scyclx"
@loading="loadingData"
></move-h>
</div>
</template>
<script>
import moveH from "./../../../../../components/moveH/moveH"
import { getLpb,insertUpDownC,deleteCByBsm } from "../../../../../api/lpb";
import moveH from "./../../../../../components/moveH/moveH";
import { getLpb, insertUpDownC, deleteCByBsm } from "../../../../../api/lpb";
export default {
name: "",
components: {moveH},
components: { moveH },
props: {},
data() {
return {
moveHvisible:false,
moveHvisible: false,
lpbData: {
ljzs: [],
cs: [],
......@@ -139,32 +305,33 @@ export default {
ljzzdyHeight: 0, //逻辑幢下幢单元的div高度
loading: true,
hbsmList: [],
cbsmList:[],
cbsmList: [],
time: null, //区分单双击事件的定时器
searchNum: Math.random(),
//接收父组件传入的根据单元状态/房屋性质/房屋用途筛选的户bsmList
choosedList: [],
lpbChVisible:false, //层户右键菜单显隐
lpbChLeft:100,
lpbChTop:100,
borderColor: "#E6E6E6",
lpbChVisible: false, //层户右键菜单显隐
lpbChLeft: 100,
lpbChTop: 100,
//右键层户数据
chData:'',
rightClickFlag:"",
chData: "",
rightClickFlag: "",
//层操作数据
addCVisible:false,
addCData:{
title:"",
cbsm:"",//层标识码
hcount:"",//添加户数
scyclx:"",//实测预测类型
sjc:"", //当前的层的SJC +1
addCVisible: false,
addCData: {
title: "",
cbsm: "", //层标识码
hcount: "", //添加户数
scyclx: "", //实测预测类型
sjc: "", //当前的层的SJC +1
},
formLabelWidth: '120px'
formLabelWidth: "120px",
};
},
created() {},
mounted() {
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
this.getLpb(this.$store.state.zrzbsm, this.$parent.scyclx);
setTimeout(() => {
//tab-content宽度 - 右侧图例宽度 - lp-overview滚动条宽度 - lpbContent的pandingRight
this.lpbContentWidth = this.$store.state.contentWidth - 34 - 20;
......@@ -176,20 +343,22 @@ export default {
}, 200);
},
methods: {
loadingData(){
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
loadingData() {
this.getLpb(this.$store.state.zrzbsm, this.$parent.scyclx);
},
//获取楼盘表数据
getLpb(zrzbsm,scyclx) {
getLpb(zrzbsm,scyclx).then((res) => {
getLpb(zrzbsm, scyclx) {
getLpb(zrzbsm, scyclx).then((res) => {
if (res.code == 200) {
this.loading = false;
res.result.ljzs = res.result.ljzs.sort(this.compare('place')).reverse();
res.result.ljzs = res.result.ljzs
.sort(this.compare("place"))
.reverse();
this.lpbData = res.result == null ? this.lpbData : res.result;
this.$nextTick(()=>{
this.$nextTick(() => {
//渲染楼盘表
this.dataChange();
})
});
} else {
this.$message({
message: res.message,
......@@ -198,12 +367,12 @@ export default {
}
});
},
compare(property){
return function(a,b){
compare(property) {
return function(a, b) {
var value1 = a[property];
var value2 = b[property];
return value1 - value2;
}
};
},
//按照bdcdyh或shbw筛选户
lpbDataMap(sh) {
......@@ -221,7 +390,6 @@ export default {
this.ljzWidth += item.offsetWidth + 20;
});
} else {
}
//计算独立幢单元和独立层户宽度
//考虑this.$refs.zdy的length为0的情况,即自然幢下没有独立幢单元
......@@ -250,7 +418,7 @@ export default {
}
} else {
//有且仅有独立层户
if(this.$refs.hBsm != undefined){
if (this.$refs.hBsm != undefined) {
this.$refs.hBsm.forEach((item) => {
this.zdyWidth += item.offsetWidth + 21;
});
......@@ -274,21 +442,21 @@ export default {
if (this.$refs.ljzch != undefined) {
//计算自然幢下的幢单元高度,如果有比层户高的幢单元,则幢单元高度设为最高的幢单元高度,如果没有,则设为层户高度
higher = highest > this.$refs.ljzch.offsetHeight ? true : false;
this.$nextTick(()=>{
this.ljzzdyHeight = higher ? highest : this.$refs.ljzch.offsetHeight;
this.$nextTick(() => {
this.ljzzdyHeight = higher
? highest
: this.$refs.ljzch.offsetHeight;
highest = 0;
})
});
} else {
this.$nextTick(()=>{
this.$nextTick(() => {
this.ljzzdyHeight = highest;
highest = 0;
})
});
}
} else {
// this.zdyWidth = 124;
}
},
//户单击事件
handleTdClick(e, bsm) {
......@@ -326,19 +494,19 @@ export default {
//清除选中户
clearChoosedH() {
// this.$nextTick(() => {
//将每个选中的户的选中状态清除
this.$refs.hBsm.forEach((item) => {
if (item.className == "tdSelect") {
item.className = "";
}
});
// 清空hbsmList
this.hbsmList = [];
//将每个选中的户的选中状态清除
this.$refs.hBsm.forEach((item) => {
if (item.className == "tdSelect") {
item.className = "";
}
});
// 清空hbsmList
this.hbsmList = [];
// });
},
//户右键点击事件
openMenu(e,item,type){
console.log(e,'e');
openMenu(e, item, type) {
console.log(e, "e");
this.lpbChLeft = e.pageX;
this.lpbChTop = e.pageY;
this.chData = item;
......@@ -346,7 +514,7 @@ export default {
this.lpbChVisible = true;
},
// 层选中事件
handleClickC(e,item){
handleClickC(e, item) {
//判断点击的层是否选中
if (e.target.className.indexOf("tdSelect") == -1) {
//未选中→选中
......@@ -355,84 +523,80 @@ export default {
} else {
//选中→未选中
e.target.className = "floor";
this.deleteArrOption(this.cbsmList,item.bsm);
this.deleteArrOption(this.cbsmList, item.bsm);
}
this.$parent.getCbsm(this.cbsmList);
},
//关闭右键菜单
closeMenu(){
this.lpbChVisible = false
closeMenu() {
this.lpbChVisible = false;
},
//户右键菜单 start
handleAddH(){
handleAddH() {},
handleMoveH() {
// 移动户
console.log(this.chData, "chData");
console.log(this.$parent.scyclx, "实预测类型");
this.moveHvisible = true;
},
handleMoveH(){
// 移动户
console.log(this.chData,"chData")
console.log(this.$parent.scyclx,"实预测类型")
this.moveHvisible=true;
},
moveHClose(){
this.moveHvisible=false;
},
handleDeleteH(){
},
handleSyczh(){
moveHClose() {
this.moveHvisible = false;
},
handleDeleteH() {},
handleSyczh() {},
//end
// 层右键菜单 start
//添加
handleAddC(type){
handleAddC(type) {
this.addCData.title = type == "up" ? "向上添加层" : "向下添加层";
this.addCVisible = true;
this.addCData.sjc = type == "up" ? Number(this.chData.sjc) + 1 : Number(this.chData.sjc) - 1;
this.addCData.sjc =
type == "up"
? Number(this.chData.sjc) + 1
: Number(this.chData.sjc) - 1;
this.addCData.cbsm = this.chData.bsm;
this.addCData.scyclx = this.$parent.scyclx;
},
//删除
handleDeleteC(){
handleDeleteC() {
let params = {
cbsm:this.chData.bsm,
scyclx:this.$parent.scyclx
}
this.$confirm('是否确认删除该层?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteCByBsm(params).then((res) => {
if (res.code == 200) {
this.$message({
message: "删除成功",
type: "success",
});
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
}else{
this.$message({
message: res.message,
type: "warning",
});
}
});
}).catch(() => {
});
cbsm: this.chData.bsm,
scyclx: this.$parent.scyclx,
};
this.$confirm("是否确认删除该层?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteCByBsm(params).then((res) => {
if (res.code == 200) {
this.$message({
message: "删除成功",
type: "success",
});
this.getLpb(this.$store.state.zrzbsm, this.$parent.scyclx);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
});
})
.catch(() => {});
},
//确认添加
saveAddC(){
saveAddC() {
insertUpDownC(this.addCData).then((res) => {
if (res.code == 200) {
this.$message({
message: "添加成功",
type: "success",
});
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
this.getLpb(this.$store.state.zrzbsm, this.$parent.scyclx);
this.addCVisible = false;
}else{
} else {
this.$message({
message: res.message,
type: "warning",
......@@ -449,13 +613,13 @@ export default {
legendToggleFlagChange() {
return this.$parent.legendToggleFlag;
},
scyclx(){
return this.$parent.scyclx
}
scyclx() {
return this.$parent.scyclx;
},
},
watch: {
scyclx(n){
this.getLpb(this.$store.state.zrzbsm,n)
scyclx(n) {
this.getLpb(this.$store.state.zrzbsm, n);
},
createFlagChange: function(val) {
setTimeout(() => {
......@@ -482,13 +646,14 @@ export default {
});
});
},
//父组件中选择单元状态改变choosedList
//父组件中选择单元状态改变选中户的边框颜色
choosedList(n) {
this.$refs.hBsm.forEach((item) => {
this.choosedList.forEach((i) => {
if (item.dataset.bsm == i) {
console.log(item.dataset.bsm+'----分割线-----'+i);
item.className = "tdSelect";
console.log(item.style.borderColor ,'item.style.borderColor ');
console.log(this.borderColor,'this.borderColor');
item.style.borderColor = this.borderColor;
}
});
});
......@@ -499,7 +664,7 @@ export default {
} else {
document.body.removeEventListener("click", this.closeMenu);
}
}
},
},
};
</script>
......@@ -526,37 +691,37 @@ export default {
// position: relative;
// .ljz-zdy-wrap {
// width: auto;
// display: table;
.ljz-zdy {
height: auto;
margin-right: 20px;
float: left;
position: relative;
.zdy-name {
width: 100%;
bottom: 0;
position: absolute;
height: 40px;
background-color: rosybrown;
}
// .chTable-wrap{
// position: absolute;
// bottom: 40px;
// }
}
div:last-child{
margin-right: 0;
}
.ljz-ch {
float: left;
}
.ljz-zdy:last-child {
margin-right: 0;
}
.column-reverse {
display: flex;
flex-direction: column-reverse;
// display: table;
.ljz-zdy {
height: auto;
margin-right: 20px;
float: left;
position: relative;
.zdy-name {
width: 100%;
bottom: 0;
position: absolute;
height: 40px;
background-color: rosybrown;
}
// .chTable-wrap{
// position: absolute;
// bottom: 40px;
// }
}
div:last-child {
margin-right: 0;
}
.ljz-ch {
float: left;
}
.ljz-zdy:last-child {
margin-right: 0;
}
.column-reverse {
display: flex;
flex-direction: column-reverse;
}
// }
.ljz-name {
width: calc(100% - 32px);
......@@ -627,6 +792,10 @@ export default {
background-position: right top;
background-size: 30px;
}
.hasBorder {
border-width: 1px;
border-style: solid;
}
}
}
.name {
......