01710550 by 焦泽平
2 parents 9f16b523 915e3d02
......@@ -32,3 +32,37 @@ export default {
},
};
</script>
<style lang="less">
.popper-zxx{
padding: 0!important;
/deep/ .el-tabs__header{
margin-bottom: 10px;
}
ul{
margin-bottom: 10px;
li{
cursor: pointer;
padding: 4px 16px;
position: relative;
i{
position: absolute;
right: 20px;
top: 6px;
color: #4EB2FF;
display: none;
}
}
li:hover{
background: #eee;
}
.choosed{
color: #4EB2FF;
background-color: #F0F9FF!important;
i{
display: inline-block;
}
}
}
}
</style>
\ No newline at end of file
......
......@@ -8,9 +8,9 @@
<div class="fgq">
<el-card class="data">
<div slot="header" class="clearfix">
<span>基本信息</span>
<span>宗地基本信息</span>
</div>
<ul>
<ul class="zdjbxx">
<li><span class="label">宗地代码:</span><span class="value">{{zdFgqData.zddm}}</span></li>
<li><span class="label">不动产单元号:</span><span class="value">{{zdFgqData.bdcdyh}}</span></li>
<li><span class="label">项目名称:</span><span class="value">{{zdFgqData.xmmc}}</span></li>
......@@ -18,68 +18,52 @@
<li><span class="label">权利人:</span><span class="value">{{zdFgqData.qlr}}</span></li>
<li><span class="label">坐落:</span><span class="value">{{zdFgqData.zl}}</span></li>
</ul>
</el-card>
<div class="zxx">
<el-card class="dz">
<div slot="header" class="clearfix">
<span>多幢信息({{zdZxx.dzList.length}}个)</span>
<div class="zdmap">
</div>
<ul>
<li v-for="(item,index) in zdZxx.dzList" :key="index"
:class="[{'search':!zdDzList.includes(item)}]"
><span class="label">多幢名称:</span> <span class="value">{{item.displays}}</span>
</li>
</ul>
</el-card>
<div class="zxx">
<el-card class="zrz">
<div slot="header" class="clearfix">
<span>多幢信息({{zdZxx.dzList.length}}个)</span>
<span>自然幢信息({{zdZxx.zrzList.length}}个)</span>
</div>
<ul>
<li v-for="(item,index) in zdZxx.zrzList" :key="index"
<li v-for="(item,index) in zdZxx.dzList" :key="index+item.xmmc"
:class="[{'search':!zdDzList.includes(item)}]"
>{{item.displays}}
</li>
<li v-for="(item,index) in zdZxx.zrzList" :key="index+item.xmmc"
:class="[{'oddborder':((index+1)%2) === 1},{'search':!zdZrzList.includes(item)}]">
{{item.displays}}
</li>
</ul>
<div class="line"></div>
</el-card>
</div>
</div>
<div class="fgh">
<div class="fgh" :style="{'minHeight':tableHeight+'px'}">
<span class="tips">分割后宗地信息</span>
<table border="1">
<tr>
<th class="cz">操作</th>
<th class="cz"><el-button
type="primary"
class="changeBtn outAdd addMinus"
@click="addRow"
>+
</el-button
></th>
<th class="xzq">行政区</th>
<th class="djq">地籍区</th>
<th class="djzq">地籍子区</th>
<th class="syqlx">所有权类型</th>
<th class="tdtzm">土地特征码</th>
<th class="xmmc">项目名称</th>
<th class="xzzxx">幢信息</th>
<!-- <th class="xzzxx">幢信息</th> -->
<!-- <th class="">选择</th> -->
</tr>
<tr>
<td>
<el-button
type="primary"
class="changeBtn outAdd addMinus"
@click="addRow"
>+
</el-button
>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr v-for="(item,index) in zdFghData.newZdlist" :key="index">
<td class="cz">
<template v-for="(item,index) in zdFghData.newZdlist">
<tr :key="item.xzqbsm">
<td class="cz" rowspan="2">
<el-button
type="primary"
class="changeBtn outMinus addMinus"
......@@ -141,8 +125,8 @@
<td class="xmmc">
<input type="text" v-model="item.xmmc" class="formInput"/>
</td>
<td class="xzzxx">
<!-- <span>多幢:</span>
<!-- <td class="xzzxx">
<span>多幢:</span>
<ul>
<li v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex"
@mouseenter="mouseenter($event,index,dzIndex,'dz')"
......@@ -158,13 +142,13 @@
>{{zrzItem.xmmc}}
<span v-if="zrzIndex<item.zrz.length-1">,</span>
</li>
</ul> -->
</ul>
<span class="zxx">自然幢1 <i class="fa fa-times"></i></span>
<span class="zxx">自然幢2 <i class="fa fa-times"></i></span>
<span class="zxx">自然幢3 <i class="fa fa-times"></i></span>
<span class="zxx">多幢1 <i class="fa fa-times"></i></span>
<span class="choose">选择</span>
</td>
</td> -->
<!-- <td class="">
<el-dropdown @command="dzHandleCommand($event,index)">
<span class="el-dropdown-link">
......@@ -190,6 +174,47 @@
</el-dropdown>
</td> -->
</tr>
<tr :key="index">
<td colspan="6">
<div class="fghzxx">
<div class="choosedZxx">
<span v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex+dzItem.xmmc" class="zxx">
{{dzItem.xmmc}} <i class="fa fa-times" @click="delZxx(index,dzIndex,'dz')"></i>
</span>
<span v-for="(zrzItem,zrzIndex) in item.zrz" :key="zrzIndex+zrzItem.xmmc" class="zxx">
{{zrzItem.xmmc}} <i class="fa fa-times" @click="delZxx(index,zrzIndex,'zrz')"></i>
</span>
</div>
<p class="choose">
<el-popover
placement="top-end"
width="300"
popper-class="popper-zxx"
style="padding:0 12px"
trigger="click">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="多幢" name="dz">
<ul>
<li :class="zdFghData.newZdlist[index].dz.indexOf(childItem) > -1 ? 'choosed':''" @click="dzHandleCommand(childItem,childItem.bsm,index)" v-for="(childItem) in zdDzList" :key="childItem.bsm">
{{childItem.xmmc}}<i class="fa fa-check" style="color:'#4EB2FF'"></i>
</li>
</ul>
</el-tab-pane>
<el-tab-pane label="自然幢" name="zrz">
<ul>
<li :class="zdFghData.newZdlist[index].zrz.indexOf(childItem) > -1 ? 'choosed':''" @click="zrzHandleCommand(childItem,childItem.bsm,index)" v-for="(childItem) in zdZrzList" :key="childItem.bsm">
{{childItem.xmmc}} <i class="fa fa-check" style="color:'#4EB2FF'"></i>
</li>
</ul>
</el-tab-pane>
</el-tabs>
<span slot="reference">选择</span>
</el-popover>
</p>
</div>
</td>
</tr>
</template>
</table>
</div>
<zd-query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" :isZdClose="true"
......@@ -556,6 +581,8 @@
newZdlist: []
},
fgBoxWidth: 0,
tableHeight:0,
activeName:'dz'
}
},
created() {
......@@ -565,57 +592,39 @@
this.getzdtzm();
this.$nextTick(() => {
this.fgBoxWidth = this.$refs.fgBox.clientWidth;
this.tableHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 590;
})
},
methods: {
mouseenter(event, index, dzIndex,type) {
let range = document.createRange();
range.selectNodeContents(event.target);
let selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
var self=this;
document.onkeydown = function (e){
let key = e || window.event || arguments.callee.caller.arguments[0];
if (key && (key.keyCode == '8' || key.code == 'Delete')) {
delZxx(index, chilInd,type) {
let dz={};
let len=self.zdFghData.newZdlist[index].fwlist.length-1;
let len=this.zdFghData.newZdlist[index].fwlist.length-1;
switch (type) {
case "dz":
dz = self.zdFghData.newZdlist[index].dz[dzIndex];
dz = this.zdFghData.newZdlist[index].dz[chilInd];
// 删除数据
self.zdFghData.newZdlist[index].dz.splice(dzIndex, 1);
this.zdFghData.newZdlist[index].dz.splice(chilInd, 1);
for (let i=0;i<len;i++){
let fw=self.zdFghData.newZdlist[index].fwlist[i];
let fw=this.zdFghData.newZdlist[index].fwlist[i];
if (fw.ztype=='dz'&& fw.zbsm == dz.bsm){
self.zdFghData.newZdlist[index].fwlist.splice(i, 1);
this.zdFghData.newZdlist[index].fwlist.splice(i, 1);
}
}
// 添加数据
self.zdDzList.push(dz)
return;
break;
case "zrz":
dz = self.zdFghData.newZdlist[index].zrz[dzIndex];
dz = this.zdFghData.newZdlist[index].zrz[chilInd];
// 删除数据
self.zdFghData.newZdlist[index].zrz.splice(dzIndex, 1);
this.zdFghData.newZdlist[index].zrz.splice(chilInd, 1);
for (let i=0;i<len;i++){
let fw=self.zdFghData.newZdlist[index].fwlist[i];
let fw=this.zdFghData.newZdlist[index].fwlist[i];
if (fw.ztype=='zrz' && fw.zbsm == dz.bsm){
self.zdFghData.newZdlist[index].fwlist.splice(i, 1);
this.zdFghData.newZdlist[index].fwlist.splice(i, 1);
}
}
// 添加数据
self.zdZrzList.push(dz)
return;
break;
default:
return;
}
break;
}
};
},
mouseleave(event) {
let selection = window.getSelection();
selection.removeAllRanges();
},
// 重置数据
result() {
......@@ -654,27 +663,32 @@
ztype: 'zrz'
})
},
dzHandleCommand(command, index) {
let item = this.zdDzList.filter(i => i.bsm == command)[0];
dzHandleCommand(obj,bsm, index) {
if(this.zdFghData.newZdlist[index].dz.indexOf(obj) < 0){
this.zdFghData.newZdlist[index].fwlist.push({
zbsm: command,
zbsm: bsm,
ztype: 'dz'
});
this.zdFghData.newZdlist[index].dz.push(item)
this.zdDzList = this.zdDzList.filter(i => i.bsm !== command);
this.zdFghData.newZdlist[index].dz.push(obj)
}else{
this.zdFghData.newZdlist[index].dz = this.zdFghData.newZdlist[index].dz.filter(i => i.bsm !== bsm)
}
},
zrzHandleCommand(command, index) {
let item = this.zdZrzList.filter(i => i.bsm == command)[0];
zrzHandleCommand(obj,bsm, index) {
if(this.zdFghData.newZdlist[index].zrz.indexOf(obj) < 0){
this.zdFghData.newZdlist[index].fwlist.push({
zbsm: command,
zbsm: bsm,
ztype: 'zrz'
})
this.zdFghData.newZdlist[index].zrz.push(item)
this.zdZrzList = this.zdZrzList.filter(i => i.bsm !== command);
this.zdFghData.newZdlist[index].zrz.push(obj)
}else{
this.zdFghData.newZdlist[index].zrz = this.zdFghData.newZdlist[index].zrz.filter(i => i.bsm !== bsm)
}
},
ZdgetDzXx(zdbsm) {
ZdfggetZxx(zdbsm).then(res => {
if (res.success) {
console.log(res.result,'res.result');
this.zdZxx = res.result;
this.zdZrzList = res.result.zrzList
this.zdDzList = res.result.dzList
......@@ -951,6 +965,7 @@
</script>
<style scoped lang="less">
.fg {
.menu {
/deep/ .el-tabs__content {
position: unset;
......@@ -990,6 +1005,14 @@
}
}
}
/deep/ .el-card__header{
padding: 16px 20px;
background-color: #F2F2F2;
border: 1px solid #DBDBDB;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
}
.v-model {
......@@ -1003,7 +1026,7 @@
flex-direction: column;
flex-flow: nowrap;
.data{
width: 36%;
width: 40%;
}
.el-card {
border: 1px solid #E6E6E6;
......@@ -1027,16 +1050,30 @@
display: inline-block;
width: 104px;
text-align: right;
vertical-align: top;
}
.value{
color: #6D7278;
display: inline-block;
padding-left: 10px;
width: calc(100% - 116px);
word-break: break-all;
}
}
}
.zdjbxx{
width: 380px;
height: 200px;
float: left;
}
.zdmap{
width: calc(100% - 380px);
height: 200px;
float: left;
}
}
.zxx {
width: calc(64% - 40px);
width: calc(60% - 40px);
margin-left: 20px;
display: flex;
flex-direction: column;
......@@ -1070,14 +1107,16 @@
}
.zrz {
width: 66%;
margin-left: 20px;
width: 100%;
overflow: auto;
}
ul {
overflow: auto;
width: 100%;
float: left;
margin-left: 10px;
li {
width: 48%;
width: 23%;
padding: 5px;
text-align: left;
line-height: 20px;
......@@ -1096,9 +1135,6 @@
}
}
.oddborder {
border-right: 1px solid #000;
}
.fg-tabs {
height: auto;
......@@ -1129,13 +1165,16 @@
overflow: visible;
text-align: center;
}
tr:nth-of-type(odd) {
background: #FAFAFA;
}
// tr:nth-of-type(odd) {
// background: #FAFAFA;
// }
tr{
th,td{
height: 44px;
}
th{
background: #FAFAFA;
}
}
tr:hover {
......@@ -1162,12 +1201,43 @@
.fgh {
box-sizing: border-box;
/*padding: 0 18px;*/
height: 480px;
overflow: auto;
margin-top: 26px;
table {
margin: 0 20px;
}
.fghzxx{
width: 100%;
height: 100%;
line-height: 44px;
.choosedZxx{
width:calc(100% - 88px);
float: left;
text-align: left;
text-indent: 20px;
.zxx{
padding-right: 10px;
position: relative;
i{
display: none;
position: absolute;
right: 0;
top: -6px;
}
}
.zxx:hover{
i{
display: inline-block;
}
}
}
.choose{
width: 88px;
color: #30A4FD;
cursor: pointer;
float: right;
}
}
.tips {
display: inline-block;
margin-bottom: 14px;
......@@ -1221,10 +1291,6 @@
display: inline;
}
}
.choose{
color: #30A4FD;
cursor: pointer;
}
}
.cz, .xh {
......@@ -1238,4 +1304,7 @@
.search {
color: #BBB !important;
}
/deep/ .el-select{
width: 100%;
}
</style>
......