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
438df8cd
authored
2020-10-19 19:39:05 +0800
by
zhaoqian
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/api/zd.js
2 parents
b463e8f8
189127cc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
286 additions
and
82 deletions
src/api/zd.js
src/components/lineTree/lineItem.vue
src/components/lineTree/lineTree.vue
src/views/Home.vue
src/views/systemZD/jzd/index.vue
src/api/zd.js
View file @
438df8c
import
request
from
'@/plugin/axios'
import
request
from
"@/plugin/axios"
;
/**
* 保存面积分摊表
...
...
@@ -7,21 +7,20 @@ import request from '@/plugin/axios'
*/
export
function
savemjft
(
data
)
{
return
request
({
url
:
'/zd/qjGygyzdmjft/insertQjGygyzdmjft'
,
method
:
'post'
,
url
:
"/zd/qjGygyzdmjft/insertQjGygyzdmjft"
,
method
:
"post"
,
data
:
data
,
})
});
}
/**
* 新增宗地基本信息
*/
export
function
insertQjZdjbxx
(
data
)
{
export
function
insertQjZdjbxx
(
data
)
{
return
request
({
url
:
'zd/qjZdjbxx/insertQjZdjbxx'
,
method
:
'post'
,
url
:
"zd/qjZdjbxx/insertQjZdjbxx"
,
method
:
"post"
,
data
:
data
,
})
});
}
/**
...
...
@@ -37,3 +36,15 @@ export function getBdcdyh (dpdm,dptype) {
}
})
}
/**
* 查询界址点
*/
export
function
queryjzd
(
glBsm
)
{
return
request
({
url
:
"/zd/qjJzd/getQjJzdListByGlBsm"
,
method
:
"get"
,
params
:
{
glBsm
,
},
});
}
...
...
src/components/lineTree/lineItem.vue
View file @
438df8c
...
...
@@ -2,45 +2,51 @@
<div
class=
"tree_item_box"
>
<div
class=
"column-start-start linkLine_default"
v-for=
"(item,
s_index) in list"
v-for=
"(item,
s_index) in list"
:key=
"s_index"
:class=
"
{
'linkLine_first': s_index===0
&
list.length>1
,
'linkLine_half_top': s_index===0
&&
list.length===
1,
'linkLine_last': (s_index===(list.length-1)
&&
s_index!==0)
,
'third_layer':
!item.children,
'second_layer':item.children
linkLine_first: (s_index === 0)
&
(list.length > 1)
,
linkLine_half_top: s_index === 0
&&
list.length ===
1,
linkLine_last: s_index === list.length - 1
&&
s_index !== 0
,
third_layer:
!item.children,
second_layer: item.children,
}"
>
<div
class=
"row-flex-start basic_banner"
@
click=
"itemClick(item)"
:class=
"
{
'active_color': item.expand
active_color: item.expand,
}"
>
<div
v-if=
"item.children"
class=
"reTree_icon"
:style=
"
{height: (size||14*1.2) +'px',width: (size||14*1.2) +'px'}"
:style=
"
{
height: (size || 14 * 1.2) + 'px',
width: (size || 14 * 1.2) + 'px',
}"
:class="{
'reTree_default_icon': item.children.length===
0,
'reTree_collapse_icon': item.expand
&&
item.children.length>
0,
'reTree_expand_icon': !item.expand
&&
item.children.length>
0,
reTree_default_icon: item.children.length ===
0,
reTree_collapse_icon: item.expand
&&
item.children.length >
0,
reTree_expand_icon: !item.expand
&&
item.children.length >
0,
}"
>
</div>
<div
class=
"layer_text nowrap"
@
contextmenu
.
prevent=
"openMenu($event, item)"
:class=
"
{
'active_color': item.expand
active_color: item.expand,
}"
>
{{
item
.
label
}}
</div>
>
{{
item
.
label
}}
</div>
</div>
<line-item
:list=
"item.children"
v-on=
"$listeners"
:size=
"size"
v-if=
"item.expand&&item.children&&item.children.length>
0"
v-if=
"item.expand && item.children && item.children.length >
0"
></line-item>
</div>
</div>
...
...
@@ -53,12 +59,16 @@ export default {
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
},
size
:
{
type
:
Number
,
default
:
14
}
default
:
14
,
},
visible
:
{
type
:
Boolean
,
default
:
false
,
},
},
methods
:
{
itemClick
(
item
)
{
...
...
@@ -67,11 +77,37 @@ export default {
if
(
!
item
.
children
)
{
this
.
$emit
(
"valClick"
,
item
);
}
},
openMenu
(
e
,
item
)
{
if
(
item
.
isZD
!=
undefined
)
{
var
x
=
e
.
pageX
;
var
y
=
e
.
pageY
;
this
.
$emit
(
"changeIsZD"
,
item
.
isZD
);
this
.
$emit
(
"changeTop"
,
y
);
this
.
$emit
(
"changeLeft"
,
x
);
this
.
$emit
(
"changeVisible"
,
true
);
}
// this.top = y;
// this.left = x;
// this.visible = true;
},
closeMenu
()
{
this
.
$emit
(
"changeVisible"
,
false
);
// this.visible = false;
},
},
watch
:
{
visible
(
value
)
{
if
(
value
)
{
document
.
body
.
addEventListener
(
"click"
,
this
.
closeMenu
);
}
else
{
document
.
body
.
removeEventListener
(
"click"
,
this
.
closeMenu
);
}
},
},
};
</
script
>
<
style
lang=
'less'
>
<
style
lang=
"less"
>
.content
{
height
:
100%
;
width
:
100%
;
...
...
@@ -115,7 +151,7 @@ export default {
.basic_layer
{
width
:
100%
;
position
:
relative
;
color
:
#FFFFFF
;
color
:
#ffffff
;
cursor
:
pointer
;
.layer_text
{
flex
:
1
;
...
...
@@ -145,7 +181,7 @@ export default {
//
padding-bottom
:
15px
;
width
:
100%
;
padding-left
:
40px
;
color
:
#FFFFFF
;
color
:
#ffffff
;
}
.second_layer
::before
{
...
...
@@ -206,22 +242,26 @@ export default {
background
:
#c3c5c8
;
}
.reTree_collapse_icon
{
background
:
url("../../assets/images/reTree_collapse_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_collapse_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
.reTree_default_icon
{
background
:
url("../../assets/images/reTree_default_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_default_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
.reTree_expand_icon
{
background
:
url("../../assets/images/reTree_expand_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_expand_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
.reTree_focus_icon
{
background
:
url("../../assets/images/reTree_focus_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_focus_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
</
style
>
...
...
src/components/lineTree/lineTree.vue
View file @
438df8c
<
template
>
<div
class=
"content column-start-center reTree_box"
:style=
"
{fontSize: (size||14) +'px',lineHeight:(size||14) +'px'
}"
:style=
"
{ fontSize: (size || 14) + 'px', lineHeight: (size || 14) + 'px'
}"
style="width:347px"
>
<div
class=
"column-start-center basic_layer"
v-for=
"(item,index) in formatData"
:key=
"index"
>
<div
class=
"column-start-center basic_layer"
v-for=
"(item, index) in formatData"
:key=
"index"
>
<div
class=
"row-flex-start basic_banner"
:class=
"
{
'active_color': item.expand
&&
item.children.length>0,
active_color: item.expand
&&
item.children.length > 0,
}"
@click="itemClick(item)"
>
<div
class=
"reTree_icon"
:style=
"
{height: (size||14*1.2 )+'px',width: (size||14*1.2) +'px'}"
:style=
"
{
height: (size || 14 * 1.2) + 'px',
width: (size || 14 * 1.2) + 'px',
}"
:class="{
'reTree_default_icon': item.children.length===
0,
'reTree_collapse_icon': item.expand
&&
item.children.length>
0,
'reTree_expand_icon': !item.expand
&&
item.children.length>
0,
reTree_default_icon: item.children.length ===
0,
reTree_collapse_icon: item.expand
&&
item.children.length >
0,
reTree_expand_icon: !item.expand
&&
item.children.length >
0,
}"
>
</div>
<div
class=
"layer_text nowrap"
>
{{
item
.
label
}}
</div>
<div
class=
"layer_text nowrap"
>
{{
item
.
label
}}
</div>
</div>
<lineItem
v-if=
"item.expand&&item.children.length>0"
v-on=
"$listeners"
:list=
"item.children"
:size=
"size"
></lineItem>
<lineItem
v-if=
"item.expand && item.children.length > 0"
v-on=
"$listeners"
@
changeTop=
"changeTop"
@
changeLeft=
"changeLeft"
@
changeVisible=
"changeVisible"
@
changeIsZD=
"changeIsZD"
:list=
"item.children"
:visible=
"visible"
:size=
"size"
></lineItem>
</div>
<ul
v-show=
"visible"
:style=
"
{ left: left + 'px', top: top + 'px' }"
class="contextmenu"
>
<li>
定位
</li>
<li>
导入图形
</li>
<li>
导出图形
</li>
<li
v-show=
"isZD"
>
导入属性
</li>
<li
v-show=
"!isZD"
>
导入楼盘
</li>
<li>
重叠分析
</li>
<li
v-show=
"isZD"
>
添加定着物
</li>
</ul>
</div>
</
template
>
<
script
>
...
...
@@ -37,22 +67,26 @@ export default {
pd
:
{},
size
:
{
type
:
Number
,
default
:
14
}
default
:
14
,
},
},
components
:
{
lineItem
},
data
()
{
return
{
selectedDetail
:
{},
timer
:
{},
formatData
:
[]
formatData
:
[],
visible
:
false
,
top
:
0
,
left
:
0
,
isZD
:
true
};
},
watch
:
{
pd
(
n
,
o
)
{
this
.
formatData
=
this
.
preDealData
(
n
);
console
.
log
(
this
.
formatData
);
}
},
},
created
()
{
console
.
log
(
"lineTree create"
);
...
...
@@ -60,8 +94,21 @@ export default {
},
methods
:
{
// 改变菜单数据
changeVisible
(
data
)
{
this
.
visible
=
data
;
},
changeTop
(
data
)
{
this
.
top
=
data
;
},
changeLeft
(
data
)
{
this
.
left
=
data
;
},
changeIsZD
(
data
)
{
this
.
isZD
=
data
;
},
preDealData
(
list
)
{
list
.
forEach
(
x
=>
{
list
.
forEach
((
x
)
=>
{
if
(
!
x
.
expand
)
this
.
$set
(
x
,
"expand"
,
false
);
if
(
x
.
children
&&
x
.
children
.
length
>
0
)
this
.
preDealData
(
x
.
children
);
});
...
...
@@ -71,7 +118,7 @@ export default {
expandTreeItemById
(
idList
)
{
let
_this
=
this
;
function
loopTree
(
list
)
{
list
.
forEach
(
x
=>
{
list
.
forEach
((
x
)
=>
{
if
(
idList
.
includes
(
x
.
id
))
{
_this
.
$set
(
x
,
"expand"
,
true
);
}
else
{
...
...
@@ -83,9 +130,9 @@ export default {
}
this
.
formatData
=
loopTree
(
this
.
pd
);
},
itemClick
(
item
)
{
item
.
expand
=!
item
.
expand
this
.
$emit
(
'itemClick'
,
item
)
itemClick
(
item
)
{
item
.
expand
=
!
item
.
expand
;
this
.
$emit
(
"itemClick"
,
item
);
},
// 详情点击
detailClick
(
data
)
{
...
...
@@ -99,11 +146,36 @@ export default {
clearTimeout
(
this
.
timer
);
this
.
selectedDetail
=
data
;
this
.
$emit
(
"detailDoubleClick"
,
data
);
}
}
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
//
自定义右键菜单样式
start
.contextmenu
{
margin
:
0
;
background
:
#fff
;
z-index
:
3000
;
position
:
absolute
;
list-style-type
:
none
;
padding
:
5px
0
;
border-radius
:
4px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#333
;
box-shadow
:
2px
2px
3px
0
rgba
(
0
,
0
,
0
,
0.3
);
}
.contextmenu
li
{
margin
:
0
;
padding
:
7px
16px
;
cursor
:
pointer
;
}
.contextmenu
li
:hover
{
background
:
#eee
;
}
//
end
.content
{
height
:
100%
;
width
:
100%
;
...
...
@@ -127,8 +199,8 @@ export default {
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.active_color
{
color
:
#FFFFFF
;
.active_color
{
color
:
#ffffff
;
}
.reTree_box
{
//
overflow-y
:
auto
;
...
...
@@ -142,7 +214,7 @@ export default {
.basic_layer
{
width
:
100%
;
position
:
relative
;
color
:
#FFFFFF
;
color
:
#ffffff
;
cursor
:
pointer
;
.layer_text
{
flex
:
1
;
...
...
@@ -233,22 +305,26 @@ export default {
background
:
#c3c5c8
;
}
.reTree_collapse_icon
{
background
:
url("../../assets/images/reTree_collapse_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_collapse_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
.reTree_default_icon
{
background
:
url("../../assets/images/reTree_default_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_default_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
.reTree_expand_icon
{
background
:
url("../../assets/images/reTree_expand_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_expand_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
.reTree_focus_icon
{
background
:
url("../../assets/images/reTree_focus_.svg")
no-repeat
center
center
;
background
:
url("../../assets/images/reTree_focus_.svg")
no-repeat
center
center
;
background-size
:
contain
;
}
</
style
>
...
...
src/views/Home.vue
View file @
438df8c
...
...
@@ -144,20 +144,11 @@ export default {
children
:
[
{
label
:
"宗地代码1933"
,
children
:
[
{
id
:
'011'
,
label
:
"自然幢号1256"
,
},
],
isZD
:
true
},
{
label
:
"宗地代码2100"
,
children
:
[
{
label
:
"自然幢号1543"
,
},
],
label
:
"自然幢2100"
,
isZD
:
false
},
],
}
...
...
src/views/systemZD/jzd/index.vue
View file @
438df8c
...
...
@@ -2,13 +2,13 @@
<div
class=
"main"
>
<div
class=
"button"
>
<el-button
type=
"primary"
@
click=
"oneExit"
>
编辑
</el-button>
<el-button
type=
"primary"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"save"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"batchExit"
>
批量修改
</el-button>
</div>
<div
class=
"table"
>
<table
border=
"1"
>
<tr>
<td><input
type=
"checkbox"
@
click=
"allcheck"
/></td>
<td><input
type=
"checkbox"
@
click=
"allcheck"
v-model=
"isCheckAll"
/></td>
<td>
界址点号
</td>
<td>
顺序号
</td>
<td>
X坐标值
</td>
...
...
@@ -17,11 +17,13 @@
<td>
界址点类型
</td>
</tr>
<tr
v-for=
"(item,index) in jzdlist"
:key=
"index"
>
<td><input
type=
"checkbox"
v-model=
"item.isCheck"
/></td>
<td><input
type=
"checkbox"
v-model=
"item.isCheck"
@
change=
"changeAll"
/></td>
<td><input
type=
"text"
class=
"formInput"
v-model=
"item.jzdh"
readonly=
"readonly"
/></td>
<td><input
type=
"text"
class=
"formInput"
v-model=
"item.sxh"
readonly=
"readonly"
/></td>
<td><input
type=
"text"
class=
"formInput"
v-model=
"item.xzbz"
:readonly=
"item.iszb"
/></td>
<td><input
tepe=
"text"
class=
"formInput"
v-model=
"item.yzbz"
:readonly=
"item.iszb"
/></td>
<td><input
type=
"text"
class=
"formInput"
v-model=
"item.xzbz"
:readonly=
"item.iszb"
@
keydown=
"oninput"
/></td>
<td><input
tepe=
"text"
class=
"formInput"
v-model=
"item.yzbz"
:readonly=
"item.iszb"
@
keydown=
"oninput"
/></td>
<td>
<el-select
v-model=
"item.jblx"
:disabled=
"item.jbisdisabled"
>
<el-option
...
...
@@ -45,16 +47,57 @@
</tr>
</table>
</div>
<div>
<el-dialog
title=
"批量修改"
:visible
.
sync=
"centerDialogVisible"
width=
"30%"
center
>
<div
class=
"plxg"
>
<div>
<span
class=
""
>
界标类型:
</span>
<el-select>
<el-option
v-for=
"i in jblx"
:key=
"i.key"
:label=
"i.label"
:value=
"i.value"
></el-option>
</el-select>
</div>
<div>
<span>
界址点类型:
</span>
<el-select>
<el-option
v-for=
"i in jzdlx"
:key=
"i.key"
:label=
"i.label"
:value=
"i.value"
></el-option>
</el-select>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"centerDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"centerDialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</div>
</
template
>
<
script
>
import
{
queryjzd
}
from
'../../../api/zd'
export
default
{
name
:
""
,
components
:
{},
props
:
{},
data
()
{
return
{
isCheckAll
:
false
,
centerDialogVisible
:
false
,
jblx
:
[
{
key
:
'1'
,
...
...
@@ -145,21 +188,56 @@
}
},
created
()
{
},
mounted
()
{
// 该标识码继承过来
let
bsm
=
'401044005bad0557d5e3787239d8e18e'
;
queryjzd
(
bsm
).
then
(
res
=>
{
for
(
let
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
res
.
result
[
i
][
'isCheck'
]
=
false
;
res
.
result
[
i
][
'iszb'
]
=
'readonly'
;
res
.
result
[
i
][
'jbisdisabled'
]
=
true
;
res
.
result
[
i
][
'jzdisdisabled'
]
=
true
;
}
this
.
jzdlist
=
res
.
result
;
})
},
methods
:
{
save
()
{
console
.
log
(
"保存...."
);
for
(
let
item
of
this
.
jzdlist
)
{
if
(
item
.
isCheck
)
{
item
.
iszb
=
'readonly'
;
item
.
jbisdisabled
=
true
;
item
.
jzdisdisabled
=
true
;
}
}
},
oninput
(
e
)
{
e
.
target
.
value
=
(
e
.
target
.
value
.
match
(
/^
\d
*
(\.?\d{0,0})
/g
)[
0
])
||
null
},
changeAll
(
e
)
{
if
(
!
e
.
target
.
checked
)
{
console
.
log
(
"11111"
)
this
.
isCheckAll
=
false
;
return
}
for
(
let
item
of
this
.
jzdlist
)
{
if
(
!
item
.
isCheck
)
{
this
.
isCheckAll
=
false
;
return
}
}
this
.
isCheckAll
=
true
;
},
allcheck
(
value
)
{
console
.
log
(
value
.
target
.
checked
)
console
.
log
(
"全选"
);
for
(
let
item
of
this
.
jzdlist
)
{
item
.
isCheck
=
value
.
target
.
checked
;
}
},
oneExit
()
{
console
.
log
(
"单一修改"
);
for
(
let
item
of
this
.
jzdlist
)
{
console
.
log
(
item
)
if
(
item
.
isCheck
)
{
item
.
iszb
=
false
;
item
.
jbisdisabled
=
false
;
...
...
@@ -170,6 +248,7 @@
},
batchExit
()
{
console
.
log
(
"批量修改"
)
this
.
centerDialogVisible
=
true
;
}
},
computed
:
{},
...
...
@@ -177,6 +256,9 @@
}
</
script
>
<
style
scoped
lang=
"less"
>
/
deep
/
.el-input.is-disabled
.el-input__inner
{
color
:
#606764
;
}
.main
{
box-sizing
:
border-box
;
padding
:
18px
;
...
...
@@ -206,4 +288,8 @@
text-align
:
center
;
cursor
:
text
;
}
.plxg
span
{
width
:
300px
;
}
</
style
>
...
...
Please
register
or
sign in
to post a comment