Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fdd8cf9e
authored
2020-12-16 11:46:27 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
户合并完善
1 parent
696fafe3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
17 deletions
src/api/h.js
src/views/panel/change/hfghb/index.vue
src/views/zrz/lpb/bjlp/lpbContent/index.vue
src/api/h.js
View file @
fdd8cf9
...
...
@@ -59,3 +59,14 @@ export function getHZdxx(bsm) {
})
}
/**
* 户合并
*/
export
function
hhb
(
data
)
{
return
request
({
url
:
'/bg/hSplitMerge/hHb'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
...
...
src/views/panel/change/hfghb/index.vue
View file @
fdd8cf9
...
...
@@ -313,7 +313,7 @@ export default {
xmmc
:
'测试自然幢'
,
bdcqzh
:
'A12111111111111111'
,
dylx
:
'zrz'
,
zrzbsm
:
'
18cea8b4438ebf838ac86f4ceff90a
6b'
zrzbsm
:
'
b7162d97848b0d31d301f8d4a5b459
6b'
}
]
},
...
...
@@ -349,7 +349,26 @@ export default {
},
//实预测转换
scyclxChange
(){
//清空已选中层户
// this.bsms = [];
this
.
$refs
.
lpbContent
.
hbsmList
=
[];
this
.
$nextTick
(()
=>
{
//户
this
.
$refs
.
lpbContent
.
$refs
.
hBsm
.
forEach
(
item
=>
{
item
.
style
.
borderColor
=
'rgb(230, 230, 230)'
;
if
(
item
.
className
==
"tdSelect"
)
{
item
.
className
=
""
;
}
});
//层
this
.
$refs
.
lpbContent
.
$refs
.
cBsm
.
forEach
(
item
=>
{
console
.
log
(
item
.
className
,
'item.className'
);
item
.
className
=
"floor"
;
});
})
//获取图例数据
this
.
getDyztBsmList
();
this
.
getLpbFwytAndQlxz
();
},
inputChange
()
{
if
(
this
.
bdcdyh
!=
""
)
{
...
...
src/views/zrz/lpb/bjlp/lpbContent/index.vue
View file @
fdd8cf9
...
...
@@ -62,7 +62,7 @@
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
@
click=
"handleTdClick($event, hs.bsm)"
@
click=
"handleTdClick($event, hs.bsm
,hs
)"
@
dblclick=
"dbclick(hs.bsm)"
@
contextmenu
.
prevent=
"openMenu($event, hs, 'h')"
>
...
...
@@ -117,7 +117,7 @@
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
@
click=
"handleTdClick($event, hs.bsm)"
@
click=
"handleTdClick($event, hs.bsm
,hs
)"
@
dblclick=
"dbclick(hs.bsm)"
@
contextmenu
.
prevent=
"openMenu($event, hs, 'h')"
>
...
...
@@ -179,7 +179,7 @@
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
@
click=
"handleTdClick($event, hs.bsm)"
@
click=
"handleTdClick($event, hs.bsm
,hs
)"
@
dblclick=
"dbclick(hs.bsm)"
@
contextmenu
.
prevent=
"openMenu($event, hs, 'h')"
>
...
...
@@ -224,7 +224,7 @@
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
@
click=
"handleTdClick($event, hs.bsm)"
@
click=
"handleTdClick($event, hs.bsm
,hs
)"
@
dblclick=
"dbclick(hs.bsm)"
@
contextmenu
.
prevent=
"openMenu($event, hs, 'h')"
>
...
...
@@ -259,6 +259,10 @@
向下添加层
</li>
<li
v-show=
"rightClickFlag == 'c'"
@
click=
"handleDeleteC"
>
删除层
</li>
<!-- 合并 -->
<li
v-show=
"rightClickFlag == 'hb'"
:class=
"canHb!='zyhb'? 'cantHb':''"
@
click=
"handleHb('zyhb')"
>
左右合并
</li>
<li
v-show=
"rightClickFlag == 'hb'"
:class=
"canHb!='sxhb'? 'cantHb':''"
@
click=
"handleHb('sxhb')"
>
上下合并
</li>
</ul>
<!-- 层操作弹框 -->
<el-dialog
...
...
@@ -301,7 +305,8 @@
</template>
<
script
>
import
moveH
from
"./../../../../../components/moveH/moveH"
;
import
{
getLpb
,
insertUpDownC
,
deleteCByBsm
}
from
"../../../../../api/lpb"
;
import
{
getLpb
,
insertUpDownC
,
deleteCByBsm
}
from
"@api/lpb"
;
import
{
hhb
}
from
"@api/h"
;
export
default
{
name
:
""
,
components
:
{
moveH
},
...
...
@@ -356,6 +361,8 @@ export default {
formLabelWidth
:
"120px"
,
yclpbData
:{},
sclpbData
:{},
fghbChoosedList
:[],
canHb
:
''
//判断合并类型
};
},
created
()
{},
...
...
@@ -500,7 +507,7 @@ export default {
}
},
//户单击事件
handleTdClick
(
e
,
bsm
)
{
handleTdClick
(
e
,
bsm
,
hs
)
{
let
self
=
this
;
// 开启延时器,200ms的间隔区分单击和双击,解决双击时执行两次单击事件
clearTimeout
(
self
.
time
);
...
...
@@ -509,13 +516,27 @@ export default {
if
(
e
.
target
.
className
.
indexOf
(
"tdSelect"
)
==
-
1
)
{
//未选中→选中
e
.
target
.
className
=
"tdSelect"
;
//加边框
if
(
this
.
isHbfg
){
this
.
fghbChoosedList
.
push
(
hs
);
this
.
hbsmList
.
push
(
bsm
);
// 将户bsm放进hbsmList
}
else
{
this
.
hbsmList
.
push
(
bsm
);
// 将户bsm放进hbsmList
}
}
else
{
//选中→未选中
e
.
target
.
className
=
""
;
if
(
this
.
isHbfg
){
this
.
deleteArrOption
(
this
.
fghbChoosedList
,
hs
)
this
.
deleteArrOption
(
this
.
hbsmList
,
bsm
);
}
else
{
this
.
deleteArrOption
(
this
.
hbsmList
,
bsm
);
}
}
if
(
this
.
isHbfg
){
}
else
{
this
.
$parent
.
getHbsm
(
this
.
hbsmList
,
false
);
}
},
200
);
},
//户双击事件
...
...
@@ -551,13 +572,32 @@ export default {
},
//户右键点击事件
openMenu
(
e
,
item
,
type
)
{
this
.
lpbChLeft
=
e
.
pageX
;
this
.
lpbChTop
=
e
.
pageY
;
if
(
this
.
isHbfg
)
{
this
.
rightClickFlag
=
'hb'
;
console
.
log
(
this
.
fghbChoosedList
,
'this.fghbChoosedList '
);
if
(
this
.
fghbChoosedList
.
length
>
1
)
{
this
.
lpbChVisible
=
true
;
//判断选中户可以执行的合并类型
let
chIsSame
=
this
.
fghbChoosedList
.
every
((
item
)
=>
{
return
item
.
ch
==
this
.
fghbChoosedList
[
0
].
ch
;
});
let
hhIsSame
=
this
.
fghbChoosedList
.
every
((
item
)
=>
{
return
item
.
hh
==
this
.
fghbChoosedList
[
0
].
hh
;
});
this
.
$nextTick
(()
=>
{
if
(
chIsSame
){
this
.
canHb
=
'zyhb'
}
else
if
(
hhIsSame
){
this
.
canHb
=
'sxhb'
}
else
{
this
.
canHb
=
''
}
})
}
}
else
{
console
.
log
(
e
,
"e"
);
this
.
lpbChLeft
=
e
.
pageX
;
this
.
lpbChTop
=
e
.
pageY
;
this
.
chData
=
item
;
this
.
rightClickFlag
=
type
;
this
.
lpbChVisible
=
true
;
...
...
@@ -662,6 +702,40 @@ export default {
qsztClick
(){
},
//户合并
handleHb
(
type
){
let
olbBsms
=
''
;
this
.
hbsmList
.
forEach
((
item
,
index
)
=>
{
olbBsms
+=
index
<
this
.
hbsmList
.
length
-
1
?
item
+
','
:
item
})
if
(
type
==
this
.
canHb
)
{
this
.
$confirm
(
"是否确认合并选中户?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
//确定合并 调用合并接口 this.hbsmList为选中户bsm数组 TO DO
let
params
=
{
"ljzbsm"
:
""
,
"newuserbsm"
:
""
,
"oldBsms"
:
olbBsms
,
"scyclx"
:
""
,
"zdybsm"
:
""
,
"zrzbsm"
:
""
}
console
.
log
(
params
,
'params'
);
// hhb(params).then(() => {
//合并成功后更新楼盘表
// })
// .catch(() => {});
})
.
catch
(()
=>
{});
}
else
{
}
}
},
computed
:
{
createFlagChange
()
{
...
...
@@ -711,12 +785,8 @@ export default {
//父组件中选择单元状态改变选中户的边框颜色
choosedList
(
n
)
{
this
.
$refs
.
hBsm
.
forEach
((
item
)
=>
{
// console.log(item.dataset.bsm,'item.dataset.bsm');
// console.log(this.choosedList,'this.choosedList');
this
.
choosedList
.
forEach
((
i
)
=>
{
if
(
item
.
dataset
.
bsm
==
i
)
{
// console.log(item.style.border,'item.style.border');
// console.log(this.borderColor,'this.borderColor');
item
.
style
.
border
=
'1px solid '
+
this
.
borderColor
;
}
});
...
...
@@ -915,7 +985,10 @@ export default {
text-align
:
center
;
transition
:
0.5s
;
}
.cantHb
{
opacity
:
.5
;
cursor
:
not-allowed
;
}
.btnGroup
{
margin
:
20px
auto
0
;
width
:
150px
;
...
...
Please
register
or
sign in
to post a comment