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
37a9b3f0
authored
2021-01-27 14:00:36 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
历史回溯修改
1 parent
42ae4331
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
239 additions
and
156 deletions
src/components/lshs/index.vue
src/components/lshs/index.vue
View file @
37a9b3f
<
template
>
<
template
>
<div
class=
"main"
>
<div
id=
"mountNode"
ref=
"containerWidth"
>
<div
v-show=
"showhide"
style=
"margin: 20px 0 0 20px;color:red;"
>
暂无变更业务,没有历史回溯数据
</div>
<div
v-show=
"showhide"
style=
"margin: 20px 0 0 20px;color:red;"
>
暂无变更业务,没有历史回溯数据
</div>
</div>
<div
id=
"mountNodeRight"
>
<div><span
class=
"tip-title"
>
基础信息
</span></div
>
<el-
divider></el-divider
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-
tab-pane
label=
"基础信息"
name=
"jcxx"
>
<div
style=
"line-height: 40px"
>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
项目名称
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
xmmc
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
xmmc
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
宗地代码
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zddm
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zddm
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
不动产单元号
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
bdcdyh
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
bdcdyh
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
不动产权证号
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
bdcdyh
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
bdcdyh
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
自然幢号
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zrzh
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zrzh
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
权利人
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
qlr
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
qlr
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
权利性质
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
qlxz
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
qlxz
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
土地用途
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
fwyt
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
fwyt
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
坐落
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zl
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zl
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
宗地面积
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdmj
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdmj
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
宗地四至-北至
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszb
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszb
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
宗地四至-东至
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszd
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszd
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
宗地四至-南至
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszn
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszn
}}
</div></el-col
>
</el-row>
<el-row>
<el-col
:span=
"6"
><div
class=
"grid-left"
>
宗地四至-西至
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszx
}}
</div></el-col>
<el-col
:span=
"18"
><div
class=
"grid-right"
>
{{
result
.
zdszx
}}
</div></el-col
>
</el-row>
</div>
</el-tab-pane>
<el-tab-pane
label=
"登记簿"
name=
"djb"
>
暂无数据
</el-tab-pane>
</el-tabs>
</div>
</div>
</
template
>
<
script
>
import
G6
from
'@antv/g6'
;
import
insertCss
from
'insert-css'
;
import
{
getLshs
}
from
"@api/fwsxbg"
;
import
{
getQjZdjbxxDetailByIdBylshs
}
from
"@api/zd"
;
import
{
getZrzDetailByBsmBylshs
}
from
"@api/zrz"
;
import
{
getDzDetailByBsm
}
from
"@api/dz"
;
import
G6
from
"@antv/g6"
;
import
insertCss
from
"insert-css"
;
import
{
getLshs
}
from
"@api/fwsxbg"
;
import
{
getQjZdjbxxDetailByIdBylshs
}
from
"@api/zd"
;
import
{
getZrzDetailByBsmBylshs
}
from
"@api/zrz"
;
import
{
getDzDetailByBsm
}
from
"@api/dz"
;
export
default
{
name
:
""
,
components
:
{},
props
:
{
name
:
""
,
components
:
{},
props
:
{
bsm
:
{
type
:
String
,
default
:
""
,
...
...
@@ -92,7 +125,7 @@ export default {
default
:
""
,
},
},
data
()
{
data
()
{
insertCss
(
`
.g6-tooltip {
border-radius: 6px;
...
...
@@ -104,113 +137,119 @@ export default {
}
`
);
return
{
showhide
:
false
,
data
:
{},
activeName
:
'first'
,
result
:{},
}
},
created
(){
showhide
:
false
,
data
:
{},
activeName
:
"jcxx"
,
result
:
{},
};
},
mounted
(){
created
()
{},
mounted
()
{
this
.
getLshsData
();
},
methods
:
{
initG6
()
{
const
self
=
this
;
const
self
=
this
;
const
data
=
this
.
data
;
const
eWidth
=
this
.
$refs
.
containerWidth
.
clientWidth
;
const
eHeight
=
this
.
$refs
.
containerWidth
.
clientHeight
;
const
mountNodeRight1
=
document
.
getElementById
(
'mountNodeRight'
);
mountNodeRight1
.
style
.
height
=
eHeight
-
20
+
'px'
;
const
mountNodeRight1
=
document
.
getElementById
(
"mountNodeRight"
);
mountNodeRight1
.
style
.
height
=
eHeight
-
20
+
"px"
;
G6
.
registerNode
(
'sql'
,
"sql"
,
{
drawShape
(
cfg
,
group
)
{
var
dClor
=
'#ffffff'
;
if
(
cfg
.
id
==
self
.
bsm
)
{
dClor
=
'#C6E5FF'
;
var
dClor
=
"#ffffff"
;
if
(
cfg
.
id
==
self
.
bsm
)
{
dClor
=
"#C6E5FF"
;
}
const
rect
=
group
.
addShape
(
'rect'
,
{
const
rect
=
group
.
addShape
(
"rect"
,
{
attrs
:
{
x
:
-
100
,
y
:
-
25
,
width
:
200
,
height
:
50
,
radius
:
10
,
stroke
:
'#5B8FF9'
,
stroke
:
"#5B8FF9"
,
fill
:
dClor
,
lineWidth
:
1
,
},
name
:
'rect-shape'
,
name
:
"rect-shape"
,
});
if
(
cfg
.
name
)
{
group
.
addShape
(
'text'
,
{
group
.
addShape
(
"text"
,
{
attrs
:
{
text
:
cfg
.
name
,
x
:
0
,
y
:
0
,
fill
:
'#00287E'
,
fill
:
"#00287E"
,
fontSize
:
14
,
textAlign
:
'center'
,
textBaseline
:
'middle'
,
fontWeight
:
'bold'
,
textAlign
:
"center"
,
textBaseline
:
"middle"
,
fontWeight
:
"bold"
,
},
name
:
'text-shape'
,
name
:
"text-shape"
,
});
}
return
rect
;
},
},
'single-node'
,
"single-node"
);
G6
.
registerEdge
(
'polyline1'
,
"polyline1"
,
{
afterDraw
(
cfg
,
group
)
{
console
.
log
(
cfg
.
data
+
":cfg"
)
console
.
log
(
group
.
toString
()
+
"group"
)
console
.
log
(
cfg
.
data
+
":cfg"
);
console
.
log
(
group
.
toString
()
+
"group"
);
},
},
'polyline'
,
"polyline"
);
//鼠标移动 弹出界面
const
tooltip
=
new
G6
.
Tooltip
({
offsetX
:
10
,
offsetY
:
10
,
itemTypes
:
[
'node'
,
'edge'
],
itemTypes
:
[
"node"
,
"edge"
],
getContent
:
(
e
)
=>
{
debugger
;
const
outDiv
=
document
.
createElement
(
'div'
)
;
outDiv
.
style
.
width
=
'fit-content'
;
const
outDiv
=
document
.
createElement
(
"div"
)
;
outDiv
.
style
.
width
=
"fit-content"
;
outDiv
.
className
=
"tips"
;
outDiv
.
innerHTML
=
`
<p class="tit">基本信息</p>
<ul>
<li>
${
e
.
item
.
getModel
().
conf
[
0
].
label
}
:
${
e
.
item
.
getModel
().
conf
[
0
].
value
}
</li>
<li>
${
e
.
item
.
getModel
().
conf
[
1
].
label
}
:
${
e
.
item
.
getModel
().
conf
[
1
].
value
}
</li>
<li>
${
e
.
item
.
getModel
().
conf
[
2
].
label
}
:
${
e
.
item
.
getModel
().
conf
[
2
].
value
}
</li>
<li>
${
e
.
item
.
getModel
().
conf
[
3
].
label
}
:
${
e
.
item
.
getModel
().
conf
[
3
].
value
}
</li>
<li>
${
e
.
item
.
getModel
().
conf
[
4
].
label
}
:
${
e
.
item
.
getModel
().
conf
[
4
].
value
}
</li>
</ul>`
;
<li> <span>
${
e
.
item
.
getModel
().
conf
[
0
].
label
}
:</span><span>
${
e
.
item
.
getModel
().
conf
[
0
].
value
}
<
/span></
li
>
<
li
>
<
span
>
$
{
e
.
item
.
getModel
().
conf
[
1
].
label
}
:</span><span>
${
e
.
item
.
getModel
().
conf
[
1
].
value
}
<
/span></
li
>
<
li
>
<
span
>
$
{
e
.
item
.
getModel
().
conf
[
2
].
label
}
:</span><span>
${
e
.
item
.
getModel
().
conf
[
2
].
value
}
<
/span></
li
>
<
li
>
<
span
>
$
{
e
.
item
.
getModel
().
conf
[
3
].
label
}
:</span><span>
${
e
.
item
.
getModel
().
conf
[
3
].
value
}
<
/span></
li
>
<
li
>
<
span
>
$
{
e
.
item
.
getModel
().
conf
[
4
].
label
}
:</span><span>
${
e
.
item
.
getModel
().
conf
[
4
].
value
}
<
/span></
li
>
<
/ul>`
;
return
outDiv
;
},
}
);
const
container
=
document
.
getElementById
(
'mountNode'
);
const container = document.getElementById("mountNode");
// console.log(container)
const graph = new G6.Graph({
container
:
'mountNode'
,
width
:
eWidth
,
height
:
eHeight
,
container: "mountNode"
,
width:
eWidth,
height:
eHeight,
layout: {
type
:
'dagre'
,
type: "dagre"
,
nodesepFunc: (d) => {
return 100;
},
...
...
@@ -218,10 +257,10 @@ export default {
controlPoints: true,
},
defaultNode: {
type
:
'sql'
,
type: "sql"
,
},
defaultEdge: {
type
:
'polyline1'
,
type: "polyline1"
,
style: {
endArrow: true,
radius: 10,
...
...
@@ -229,174 +268,218 @@ export default {
// fontSize:14,
// endArrow: true,
lineWidth: 2, //箭头宽度
stroke
:
'rgba(78,142,230,0.45)'
,
stroke: "rgba(78,142,230,0.45)"
,
},
},
nodeStateStyles: {
selected
:
{
//选中之后样式
stroke
:
'#d9d9d9'
,
fill
:
'#5394ef'
,
selected: {
//选中之后样式
stroke: "#d9d9d9",
fill: "#5394ef",
},
},
plugins: [tooltip],
modes: {
default
:
[
'drag-node'
,
'drag-canvas'
,
'zoom-canvas'
,
'click-select'
,
],
default: ["drag-node", "drag-canvas", "zoom-canvas", "click-select"],
},
fitView: true,
fitViewPadding: 200,
});
graph.data(data);
graph.render();
graph
.
on
(
'node:click'
,
e
=>
{
graph.on("node:click", (e)
=> {
switch (this.type) {
case "zrz":
getZrzDetailByBsmBylshs
(
e
.
item
.
_cfg
.
id
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
getZrzDetailByBsmBylshs(e.item._cfg.id).then((res) =>
{
if (res.code === 200)
{
self.result = res.result;
}
})
});
break;
case "zd":
getQjZdjbxxDetailByIdBylshs
(
e
.
item
.
_cfg
.
id
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
getQjZdjbxxDetailByIdBylshs(e.item._cfg.id).then((res) =>
{
if (res.code === 200)
{
self.result = res.result;
}
})
});
break;
case "dz":
getDzDetailByBsm
(
e
.
item
.
_cfg
.
id
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
getDzDetailByBsm(e.item._cfg.id).then((res) =>
{
if (res.code === 200)
{
self.result = res.result;
}
})
});
break;
default:
break;
}
});
graph
.
on
(
'node:mouseenter'
,
e
=>
{
graph
.
setItemState
(
e
.
item
,
'active'
,
true
)
graph.on("node:mouseenter", (e)
=> {
graph.setItemState(e.item, "active", true);
});
graph
.
on
(
'node:mouseleave'
,
e
=>
{
graph
.
setItemState
(
e
.
item
,
'active'
,
false
)
graph.on("node:mouseleave", (e)
=> {
graph.setItemState(e.item, "active", false);
});
graph
.
on
(
'edge:mouseenter'
,
e
=>
{
graph
.
setItemState
(
e
.
item
,
'active'
,
true
)
graph.on("edge:mouseenter", (e)
=> {
graph.setItemState(e.item, "active", true);
});
graph
.
on
(
'edge:mouseleave'
,
e
=>
{
graph
.
setItemState
(
e
.
item
,
'active'
,
false
)
graph.on("edge:mouseleave", (e)
=> {
graph.setItemState(e.item, "active", false);
});
if
(
typeof
window
!==
'undefined'
)
if (typeof window !== "undefined"
)
window.onresize = () => {
if
(
!
graph
||
graph
.
get
(
'destroyed'
))
return
;
if
(
!
container
||
!
container
.
scrollWidth
||
!
container
.
scrollHeight
)
return
;
if (!graph || graph.get("destroyed")) return;
if (!container || !container.scrollWidth || !container.scrollHeight)
return;
graph.changeSize(container.scrollWidth, container.scrollHeight);
};
},
getLshsData
()
{
getLshsData()
{
let _this = this;
const data = {
"bsm"
:
this
.
bsm
,
"type"
:
this
.
type
bsm
: this.bsm,
type: this.type,
};
getLshs
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
_this
.
data
=
res
.
result
;
getLshs(data).then((res) =>
{
if (res.code === 200)
{
_this.data =
res.result;
//_this.data.nodes.length;// 判断个数
if
(
_this
.
data
.
nodes
.
length
==
0
)
{
if (_this.data.nodes.length == 0)
{
//暂无变更业务,没有历史回溯数据。
this
.
showhide
=
true
;
}
else
{
this.showhide = true;
} else {
_this.data.nodes.forEach(node => {
node.conf.forEach(i => {
i.value = i.value == null || i.value == "" ? '暂无数据':i.value
})
});
this.initG6();
}
}
});
switch (this.type) {
case "zrz":
getZrzDetailByBsmBylshs
(
this
.
bsm
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
getZrzDetailByBsmBylshs(this.bsm).then((res) =>
{
if (res.code === 200)
{
this.result = res.result;
}
})
});
break;
case "zd":
getQjZdjbxxDetailByIdBylshs
(
this
.
bsm
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
getQjZdjbxxDetailByIdBylshs(this.bsm).then((res) =>
{
if (res.code === 200)
{
this.result = res.result;
}
})
});
break;
case "dz":
getDzDetailByBsm
(
this
.
bsm
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
getDzDetailByBsm(this.bsm).then((res) =>
{
if (res.code === 200)
{
this.result = res.result;
}
})
});
break;
default:
break;
}
}
},
},
computed: {},
watch: {},
}
}
;
</
script
>
<
style
scoped
lang=
"less"
>
#mountNode
{
width
:
50%
;
height
:
calc
(
100%
-
140px
);
border
:
1px
solid
#E6E6E6
;
#mountNode
{
width
:
60%
;
height
:
calc
(
100%
-
10px
);
border
:
1px
solid
#e6e6e6
;
background
:
white
;
position
:
absolute
;
position
:
relative
;
float
:
left
;
/*border: 1px solid red;*/
}
}
#mountNodeRight
{
width
:
36%
;
#mountNodeRight
{
width
:
calc
(
40%
-
20px
)
;
float
:
right
;
height
:
calc
(
100%
-
22px
)
;
border
:
1px
solid
#E6E6E
6
;
height
:
calc
(
100%
-
8px
)
!important
;
border
:
1px
solid
#e6e6e
6
;
background
:
white
;
box-sizing
:
border-box
;
padding
:
20px
20px
0
20px
;
}
}
.slot
{
.slot
{
margin-left
:
50px
;
margin-top
:
20px
;
width
:
300px
;
}
}
.tip-title
{
.tip-title
{
font-weight
:
700
;
}
}
.grid-left
{
.grid-left
{
text-align
:
right
;
padding-right
:
5%
;
}
}
.grid-right
{
.grid-right
{
text-align
:
left
;
padding-left
:
5%
;
}
.el-tabs
{
/deep/.el-tabs__header{
position
:
unset
!important
;
}
/
deep
/
.el-tabs__content
{
box-sizing
:
border-box
;
padding-top
:
10px
!important
;
background-color
:
#fff
!important
;
}
}
/
deep
/
.g6-component-tooltip
{
padding
:
0
;
font-size
:
16px
;
.tips
{
border-radius
:
5px
;
border
:
1px
solid
#EAEAEA
;
box-shadow
:
4px
4px
24px
0px
rgba
(
0
,
0
,
0
,
0.12
);
.tit
{
height
:
40px
;
line-height
:
40px
;
color
:
#9B9B9B
;
background-color
:
#fafafa
;
box-sizing
:
border-box
;
padding
:
0
20px
;
border-bottom
:
1px
solid
#E6E6E6
;
}
ul
{
box-sizing
:
border-box
;
padding
:
10px
20px
20px
20px
;
li{
span{
display
:
inline-block
;
height
:
30px
;
line-height
:
30px
;
}
span
:first-child
{
width
:
120px
;
text-align
:
right
;
color
:
#4A4A4A
;
}
span
:last-child
{
color
:
#6D7278
;
}
}
}
}
}
</
style
>
...
...
Please
register
or
sign in
to post a comment