418dbf08 by renchao@pashanhoo.com

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents 1c763407 3ebd1af9
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-19 09:50:51
* @LastEditTime: 2023-07-21 11:23:22
-->
<template>
<div class="edit">
......@@ -16,14 +16,16 @@
:style="{ height: lpbContentHight + 'px' }"
v-show="bjztFlag">
<!-- 楼盘表主体 -->
<div class="lp-overview" :style="{ width: lpbContentwidth + 'px' }">
<div class="lp-overview" :style="{ width: lpbContentwidth + 'px','margin-right': formData.onlyShow ? '10px' : 0 }">
<lpbContent
ref="lpbContent"
:zrzbsm="formData.bsm"
:onlyShow="formData.onlyShow"
:unitData="formData.unitData"
:key="time"></lpbContent>
</div>
<!-- 右侧图例 -->
<div class="lp-legend">
<div class="lp-legend" v-if="formData.onlyShow">
<div class="handleCol">
<div class="btn" @click="legendToggle">
<i v-show="!legendToggleFlag" class="el-icon-d-arrow-left"></i>
......@@ -182,7 +184,9 @@
props: {
formData: {
type: Object,
default: {},
default: () => {
return {}
}
},
},
components: {
......@@ -404,30 +408,30 @@
}
}
});
getLpbQsxtj(this.formData.bsm).then((res) => {
if (res.code === 200) {
this.qsxList = [
{
name: "坐落",
bsms: res.result.zl.bsms,
color: "#2591FD",
ts: res.result.zl.bsms.length,
},
{
name: "分层分户图",
bsms: res.result.fcfht.bsms,
color: "#2591FD",
ts: res.result.fcfht.bsms.length,
},
{
name: "室号",
bsms: res.result.shbw.bsms,
color: "#2591FD",
ts: res.result.shbw.bsms.length,
},
];
}
});
// getLpbQsxtj(this.formData.bsm).then((res) => {
// if (res.code === 200) {
// this.qsxList = [
// {
// name: "坐落",
// bsms: res.result.zl.bsms,
// color: "#2591FD",
// ts: res.result.zl.bsms.length,
// },
// {
// name: "分层分户图",
// bsms: res.result.fcfht.bsms,
// color: "#2591FD",
// ts: res.result.fcfht.bsms.length,
// },
// {
// name: "室号",
// bsms: res.result.shbw.bsms,
// color: "#2591FD",
// ts: res.result.shbw.bsms.length,
// },
// ];
// }
// });
},
},
computed: {},
......@@ -488,7 +492,6 @@
border: 1px solid rgb(236, 236, 236);
border-top: 0;
border-bottom: 0;
margin-right: 10px;
box-sizing: border-box;
}
......
......@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-02-28 15:47:12
* @LastEditors: yangwei
* @LastEditTime: 2023-06-16 16:14:51
* @LastEditTime: 2023-07-21 14:39:12
* @FilePath: \bdcdj-web\src\views\lpb\lpbContent\ch.vue
* @Description:
*
......@@ -86,7 +86,8 @@ export default {
openMenu:{value:'openMenu',default:null},
selectAll:{value:'selectAll',default:null},
changeChoosedObj:{value:'changeChoosedObj',default:null},
clearChangeChoosedObj:{value:'clearChangeChoosedObj',default:null}
clearChangeChoosedObj:{value:'clearChangeChoosedObj',default:null},
getBsmList:{value:'getBsmList',default:null}
},
props: {
ch: {
......@@ -102,15 +103,31 @@ export default {
hbsmList: [],
//选中层bsm合集
cbsmList: [],
//选中户qszt集合
hqsztList: [],
//区分单双击事件的定时器
time: null,
// 边框颜色
borderColor:'rgb(230, 230, 230)'
borderColor:'rgb(230, 230, 230)',
// 申请单元列表数据
unitIdList:[]
};
},
mounted() {},
mounted() {
// 根据申请单元列表数据处理选中户
if(window.unitData.length){
window.unitData.forEach(e => {
this.unitIdList.push(e.bdcdyid)
})
this.ch.forEach((c) => {
c.hs.forEach((h) => {
if (h.dyhbsm.indexOf(this.unitIdList) > -1) {
h.select = true;
// 使用hbsmList时,需要去重
this.hbsmList.push(h.bsm)
}
});
});
}
},
methods: {
// 层选中事件
/**
......@@ -120,17 +137,24 @@ export default {
* @author: renchao
*/
handleClickC(e, item) {
//判断点击的层是否选中
// if (e.target.className.indexOf("tdSelect") == -1) {
// //未选中→选中
// e.target.className += " tdSelect"; //加边框
// this.cbsmList.push(item.bsm);
// } else {
// //选中→未选中
// e.target.className = "floor";
// this.cbsmList = this.cbsmList.filter((i) => i != item.bsm);
// }
// this.$parent.getCbsm(this.cbsmList);
// 判断点击的层是否选中
if (e.target.className.indexOf("tdSelect") == -1) {
//未选中→选中
item.hs.forEach((h) => {
//加边框
e.target.className += " tdSelect";
h.select = true;
// 使用hbsmList时,需要去重
this.hbsmList.push(h.bsm)
});
} else {
//选中→未选中
item.hs.forEach((h) => {
e.target.className = "floor";
h.select = false;
this.hbsmList = this.hbsmList.filter((i) => i != h.bsm);
});
}
},
//户单击事件
/**
......@@ -141,6 +165,26 @@ export default {
* @author: renchao
*/
handleClickH(e, bsm, hs) {
let self = this;
// 开启延时器,200ms的间隔区分单击和双击,解决双击时执行两次单击事件
clearTimeout(self.time);
self.time = setTimeout(() => {
// this.closeMenu();
//判断点击的户是否选中
if (!hs.select) {
//未选中→选中
//加边框
hs.select = true;
// 将户bsm放进hbsmList
self.hbsmList.push(bsm);
} else {
//选中→未选中
hs.select = false;
self.hbsmList = self.hbsmList.filter((i) => i != bsm);
}
//更新当前选中户数据
this.$forceUpdate();
}, 200);
},
// 户单元状态点击事件
/**
......@@ -151,7 +195,7 @@ export default {
* @author: renchao
*/
hDyztClick(e, bsm, hs) {
// this.handleClickH(e.target.parentNode, bsm, hs);
this.handleClickH(e.target.parentNode, bsm, hs);
},
//户双击事件
/**
......@@ -191,21 +235,51 @@ export default {
// item.style.border = `1px solid ${this.borderColor}`
});
},
//清除选中
clearChoosed(){
//清除选中户
this.zdySelectAll(false)
//清除选中层
this.cbsmList = [];
this.$refs.cBsm && this.$refs.cBsm.forEach((item)=>{
item.className = 'floor'
})
},
},
watch: {
selectAll: {
handler(val) {
this.zdySelectAll(val.selectAll);
val.cancelChoosed && this.clearChoosed()
},
immediate: true,
deep: true,
},
hbsmList(val){
let list = []
val.length && val.forEach((i)=>{
this.ch.forEach((c) => {
c.hs.forEach((h) => {
if (i == h.bsm) {
list.push(
{
bdcdyh:h.bdcdyh,
bsm:h.bsm,
dyhbsm:h.dyhbsm
}
)
}
});
});
})
this.getBsmList(list)
},
changeChoosedObj: {
handler(val) {
//清除选中户
this.borderColor = 'rgb(230, 230, 230)';
this.zdySelectAll(false,true)
if (val.bsms.length) {
//清除选中户
this.zdySelectAll(false,true)
this.$refs.hBsm.forEach((item) => {
val.bsms.forEach((i,ind) => {
if (item.dataset.bsm == i) {
......@@ -214,19 +288,17 @@ export default {
window.lpbContent.$refs.lpbContent.scrollTop = item.offsetTop;
window.lpbContent.$refs.lpbContent.scrollLeft = item.offsetLeft;
}
item.style.border = '1px solid '+ val.color;
// item.style.backgroundColor = val.color;
// item.style.border = '1px solid '+ val.color;
// 背景色高亮
item.style.backgroundColor = val.color;
}
});
});
}else{
this.borderColor = 'rgb(230, 230, 230)'
}
},
immediate: true,
deep: true,
},
}
},
};
</script>
......
<template>
<div class="lpbContent-wrap" ref="lpbContentWrap">
<div class="lpbContent" ref="lpbContent">
<div class="lpbContent" ref="lpbContent" :style="{ 'height': 'calc(100% - '+ lpbContentHeight +'px)'}">
<!-- 纵向倒序排列 逻辑幢位于独立幢单元和独立层户的上方 -->
<div class="ch-zdy-wrap">
<!-- 幢单元 -->
<zdy-cpn v-if="lpbData.zdys.length" :zdys="lpbData.zdys" />
<zdy-cpn v-if="lpbData.zdys.length" :zdys="lpbData.zdys" :onlyShow="onlyShow"/>
<!-- 独立层户 -->
<ch-cpn v-if="lpbData.cs.length" :ch="lpbData.cs" />
</div>
<!-- 逻辑幢 -->
<ljzs-cpn v-if="lpbData.ljzs.length" :ljzs="lpbData.ljzs" />
<ljzs-cpn v-if="lpbData.ljzs.length" :ljzs="lpbData.ljzs" :onlyShow="onlyShow"/>
</div>
<!-- 自然幢名称 -->
<p class="lpb-xmmc">
<!-- <el-checkbox @change="zdySelectAll($event)">{{
<p class="lpb-xmmc" :style="{ 'border-bottom': onlyShow ? 0 : '1px solid #e6e6e6'}">
<el-checkbox @change="zdySelectAll($event)" v-if="!onlyShow">{{
lpbData.xmmc
}}</el-checkbox> -->
{{lpbData.xmmc}}
}}</el-checkbox>
<span v-else>{{lpbData.xmmc}}</span>
</p>
<el-button type="primary" class="save-btn" v-if="!onlyShow" @click="saveLpb">保存</el-button>
<!-- 右键菜单 -->
<ul
v-show="lpbChVisible"
:style="{ left: lpbChLeft + 'px', top: lpbChTop + 'px' }"
:style="{ left: lpbChLeft + 'px', top: lpbChTop + 'px' }"
class="contextmenu"
>
<li @click="menuClick">菜单一</li>
......@@ -40,7 +41,8 @@ export default {
openMenu: this.openMenu,
selectAll: this.selectAllObj,
changeChoosedObj:this.changeChoosedObj,
clearChangeChoosedObj:this.clearChangeChoosedObj
clearChangeChoosedObj:this.clearChangeChoosedObj,
getBsmList:this.getBsmList
};
},
name: "",
......@@ -58,6 +60,10 @@ export default {
type: Boolean,
default: true,
},
onlyShow:{
type: Boolean,
default: true,
}
},
data() {
return {
......@@ -79,7 +85,9 @@ export default {
changeChoosedObj:{
bsms:[],
color:''
}
},
// 选中户bsm合集
bsmList:[]
};
},
mounted() {
......@@ -87,6 +95,24 @@ export default {
window.lpbContent = this;
},
methods: {
/**
* @description: 获取当前楼盘表选中户信息
* @param {Array} bsmList
* @author: renchao
*/
getBsmList(bsmList){
this.bsmList = bsmList;
},
/**
* @description: 保存当前楼盘表
* @author: renchao
*/
saveLpb(){
// todo 调用保存接口 传入参数待定
console.log(this.bsmList,'this.bsmList');
// 保存成功后关闭弹框
this.$popupCacel()
},
// 改变户选中状态
/**
* @description: 改变户选中状态
......@@ -125,8 +151,8 @@ export default {
getLpb(zrzbsm, scyclx, actual) {
getLpb(zrzbsm, scyclx).then((res) => {
if (res.code == 200) {
res.result.ljzs = res.result.ljzs.sort(this.compare("place"));
this.lpbData = res.result == null ? this.lpbData : res.result;
res.result.lpb.ljzs = res.result.lpb.ljzs.sort(this.compare("place"));
this.lpbData = res.result.lpb == null ? this.lpbData : res.result.lpb;
// this.$nextTick(() => {
// //渲染楼盘表
// this.dataChange();
......@@ -182,6 +208,11 @@ export default {
};
},
},
computed:{
lpbContentHeight(){
return this.onlyShow ? 36 : 76
}
},
watch: {
//户右键菜单显示时,监听到鼠标点击时关闭户右键菜单
lpbChVisible(value) {
......@@ -190,7 +221,7 @@ export default {
} else {
document.body.removeEventListener("click", this.closeMenu);
}
},
}
},
};
</script>
......@@ -201,7 +232,6 @@ export default {
overflow: hidden;
.lpbContent {
width: 100%;
height: calc(100% - 36px);
position: relative;
overflow: scroll;
-webkit-user-select: none;
......@@ -221,6 +251,10 @@ export default {
border: 0;
border-top: 1px solid #e6e6e6;
}
.save-btn{
display: block;
margin: 5px auto;
}
// 自定义右键菜单样式
.contextmenu {
margin: 0;
......
......@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-02-28 17:25:45
* @LastEditors: yangwei
* @LastEditTime: 2023-07-11 10:05:55
* @LastEditTime: 2023-07-21 14:59:46
* @FilePath: \bdcdj-web\src\views\lpb\lpbContent\ljzs.vue
* @Description:
*
......@@ -20,11 +20,13 @@
"
>
<!-- 逻辑幢名称 -->
<p class="lpb-xmmc ljz-xmmc">{{ ljz.ljzmc }}</p>
<p class="lpb-xmmc ljz-xmmc">
<span>{{ljz.ljzmc}}</span>
</p>
<!-- 独立层户 -->
<ch-cpn v-if="ljz.cs.length" :ch="ljz.cs" />
<!-- 幢单元 -->
<zdy-cpn v-if="ljz.zdys.length" :zdys="ljz.zdys" />
<zdy-cpn v-if="ljz.zdys.length" :zdys="ljz.zdys" :onlyShow="onlyShow"/>
</div>
</div>
</div>
......@@ -40,7 +42,7 @@
<!-- 独立层户 -->
<ch-cpn v-if="ljzarr[0].cs.length" :ch="ljzarr[0].cs" />
<!-- 幢单元 -->
<zdy-cpn v-if="ljzarr[0].zdys.length" :zdys="ljzarr[0].zdys" />
<zdy-cpn v-if="ljzarr[0].zdys.length" :zdys="ljzarr[0].zdys" :onlyShow="onlyShow"/>
</div>
</div>
</div>
......@@ -59,12 +61,15 @@ export default {
return [];
},
},
onlyShow:{
type: Boolean,
default: true,
}
},
data() {
return {
};
},
mounted() {
console.log(this.ljzsCptd);
},
......
......@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-02-28 16:29:04
* @LastEditors: yangwei
* @LastEditTime: 2023-06-08 13:58:58
* @LastEditTime: 2023-07-21 14:55:30
* @FilePath: \bdcdj-web\src\views\lpb\lpbContent\zdys.vue
* @Description:
*
......@@ -13,10 +13,10 @@
<div v-for="zdy in realZdys" :key="zdy.bsm">
<!-- 幢单元名称 -->
<p class="lpb-xmmc">
<!-- <el-checkbox @change="zdySelectAll($event,zdy.bsm)">{{
<el-checkbox @change="zdySelectAll($event,zdy.bsm)" v-if="!onlyShow">{{
zdy.zdymc
}}</el-checkbox> -->
{{zdy.zdymc}}
}}</el-checkbox>
<span v-else>aaa{{zdy.zdymc}}</span>
</p>
<!-- 每个幢单元下的层户 -->
<ch-cpn :ref="zdy.bsm" :ch="zdy.cs" />
......@@ -36,6 +36,10 @@ export default {
return [];
},
},
onlyShow:{
type: Boolean,
default: true,
}
},
data() {
return {};
......
<!--
* @Description: workFrame左侧菜单列表-普通
* @Autor: renchao
* @LastEditTime: 2023-07-17 16:20:37
* @LastEditTime: 2023-07-21 10:15:11
-->
<template>
<div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
......@@ -92,6 +92,7 @@
leftMenu(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.unitData = res.result;
window.unitData = res.result;
this.currentSelectProps = res.result[0];
this.$emit('getCurrentSelectProps', this.currentSelectProps);
this.judgeBatchShow();
......@@ -176,6 +177,7 @@
* @author: renchao
*/
batchUnitClick () {
debugger
this.currentSelectProps.batchOperation = true;
// this.activeIndex = "-1";
this.$parent.stepForm(0);
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-21 13:43:14
* @LastEditTime: 2023-07-17 14:20:17
*/
import { getPrintTemplateByCode } from "@/api/print";
import { uploadUndo } from "@/api/clxx";
......@@ -155,7 +155,9 @@ export default {
getZrzbsmList(this.bsmSlsq).then((res) => {
if (res.code === 200) {
this.$popupDialog('楼盘表', 'lpb/index', {
bsm: res.result[0]
bsm: res.result[0],
onlyShow:false,
unitData:window.unitData
}, '90%', true)
} else {
this.$message.error(res.message)
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-19 14:00:03
* @LastEditTime: 2023-07-21 11:25:20
-->
<template>
<div class="from-clues">
......@@ -116,13 +116,10 @@
* @author: renchao
*/
openlpbClick (scope) {
this.$popup('楼盘表', 'lpb/index', {
width: '90%',
height: "92%",
formData: {
bsm: scope.row.bsm
}
})
this.$popupDialog('楼盘表', 'lpb/index', {
bsm: scope.row.bsm,
onlyShow:true
}, '90%', true)
}
}
}
......