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
d078f4cd
authored
2020-12-15 14:06:47 +0800
by
weimo934
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(fxdr):属性导入
1 parent
aa47701f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
4 deletions
src/api/common.js
src/components/lineTree/lineTree.vue
src/components/sxdr/sxdr.vue
src/store/index.js
src/views/zd/zddcb/index.vue
src/api/common.js
View file @
d078f4c
...
...
@@ -208,3 +208,4 @@ export function registerCall(data) {
data
:
data
})
}
...
...
src/components/lineTree/lineTree.vue
View file @
d078f4c
...
...
@@ -67,7 +67,7 @@
<li
@
click=
"exportToShp"
>
ESRI Shape
</li>
</ul>
</li>
<li
v-show=
"isZD"
>
导入属性
</li>
<li
v-show=
"isZD"
@
click=
"drsx"
>
导入属性
</li>
<li
v-show=
"!isZD"
>
导入楼盘
</li>
<li>
重叠分析
</li>
<li
v-show=
"isZD && (zdQszt == '1' || zdQszt == '2')"
@
click=
"openCreateDialog"
>
添加定着物
</li>
...
...
@@ -108,6 +108,7 @@
<el-dialog
title=
"新建"
:visible
.
sync=
"dialogVisible"
width=
"48%"
>
<Create
@
closeDialog=
"closeDialog"
:auth=
"true"
></Create>
</el-dialog>
<sxdr
:sxdr-visible=
"sxdrVisible"
@
close=
"sxdrClose"
:dylx=
"zdData.type"
:bsm=
"zdData.bsm"
></sxdr>
</div>
</
template
>
<
script
>
...
...
@@ -119,6 +120,7 @@ import geoUtils from "@components/lineTree/tx/js/geoUtils";
import
featureUpdate
from
"@libs/map/featureUpdate"
;
import
{
deleteLjz
,
deleteZdy
}
from
"./../../api/lpb"
import
exportTemJson
from
'@/assets/json/exportTemplate.json'
import
sxdr
from
'./../../components/sxdr/sxdr'
export
default
{
inheritAttrs
:
false
,
props
:
{
...
...
@@ -132,10 +134,11 @@ export default {
default
:
false
,
}
},
components
:
{
lineItem
,
Create
,
ImportGeo
},
components
:
{
lineItem
,
Create
,
ImportGeo
,
sxdr
},
mixins
:[
geoUtils
,
featureUpdate
],
data
()
{
return
{
sxdrVisible
:
false
,
selectedDetail
:
{},
timer
:
{},
formatData
:
[],
...
...
@@ -195,6 +198,12 @@ export default {
},
methods
:
{
drsx
(){
this
.
sxdrVisible
=
true
;
},
sxdrClose
(){
this
.
sxdrVisible
=
false
;
},
loading
(){
this
.
$emit
(
"loading"
)
},
...
...
src/components/sxdr/sxdr.vue
0 → 100644
View file @
d078f4c
<
template
>
<div>
<el-dialog
title=
"属性导入"
:visible
.
sync=
"isVisible"
width=
"30%"
:before-close=
"close"
>
<div
class=
"main-button"
>
<el-upload
class=
"upload-demo"
:action=
"uploadUrl"
:data=
"sxdrData"
:on-success=
"uploadSuccess"
:show-file-list=
"false"
multiple
>
<el-button
type=
"primary"
>
上传
</el-button>
<el-button
type=
"primary"
@
click=
"downloadTemplate"
>
下载模板
</el-button>
</el-upload>
</div>
<ul>
<li
v-for=
"(item,index) in errorData"
:key=
"index"
>
{{
item
}}
</li>
</ul>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
"sxdr"
,
props
:
{
sxdrVisible
:
{
type
:
Boolean
,
default
:
false
},
dylx
:
{
type
:
String
,
},
bsm
:
{
type
:
String
}
},
data
()
{
return
{
uploadUrl
:
''
,
isVisible
:
false
,
sxdrData
:
{
bsm
:
''
},
errorData
:[]
}
},
mounted
(){
this
.
$store
.
state
.
sxdrType
=
''
;
},
methods
:
{
loading
(){
debugger
switch
(
this
.
dylx
)
{
case
"zd"
:
this
.
$store
.
state
.
sxdrType
=
'zd'
;
break
;
case
"dz"
:
this
.
$store
.
state
.
sxdrType
=
'dz'
;
break
;
case
"zrz"
:
this
.
$store
.
state
.
sxdrType
=
'zrz'
;
break
;
case
"h"
:
this
.
$store
.
state
.
sxdrType
=
"h"
;
break
;
default
:
break
;
}
},
reset
(){
this
.
errorData
=
[];
this
.
uploadUrl
=
''
;
this
.
sxdrData
=
{
bsm
:
''
};
this
.
$store
.
state
.
sxdrType
=
''
;
},
close
()
{
this
.
$emit
(
'close'
)
this
.
reset
();
},
downloadTemplate
()
{
window
.
open
(
`/api/tx/excelGeo/zdTemplate?type=`
+
this
.
dylx
);
},
uploadSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
"上传成功"
)
this
.
loading
();
this
.
close
()
}
else
{
this
.
$message
.
error
(
"上传失败"
)
this
.
errorData
=
res
.
result
}
}
},
watch
:
{
sxdrVisible
(
val
)
{
this
.
isVisible
=
val
;
},
dylx
(
val
)
{
switch
(
val
)
{
case
"zd"
:
this
.
uploadUrl
=
"/api/tx/excelGeo/Zdimport"
;
break
;
default
:
break
;
}
},
bsm
(
val
)
{
this
.
sxdrData
.
bsm
=
val
;
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.main-button
{
display
:
-webkit-flex
;
display
:
flex
;
flex-direction
:
column-reverse
;
flex-wrap
:
nowrap
;
}
ul
{
margin-top
:
20px
;
li{
line-height
:
15px
;
color
:
red
;
}
}
</
style
>
src/store/index.js
View file @
d078f4c
...
...
@@ -15,6 +15,7 @@ const store = new Vuex.Store({
zdmj
:
''
,
// 宗地面积
zdzl
:
''
,
// 宗地坐落
rightClickZdbsm
:
''
,
//右键菜单传入的zdbsm
sxdrType
:
''
,
// zd/zrz/dz/h 导入属性刷新数据
tdytList
:[],
tddjList
:[],
qlxzList
:[],
...
...
src/views/zd/zddcb/index.vue
View file @
d078f4c
...
...
@@ -766,7 +766,7 @@ export default {
});
}
})
}
...
...
@@ -885,7 +885,14 @@ export default {
zdbsm
:
function
(
val
)
{
this
.
getZdjbxxData
(
val
)
this
.
curZdbsm
=
val
;
}
},
"$store.state.sxdrType"
:
function
(
val
)
{
debugger
this
.
$message
.
success
(
val
);
if
(
val
===
'zd'
){
this
.
getZdjbxxData
(
this
.
$store
.
state
.
zdbsm
)
}
},
},
};
</
script
>
...
...
Please
register
or
sign in
to post a comment