Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
09418df3
Commit
09418df3
authored
Jul 30, 2020
by
张豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能制图通过vuex存参数
parent
9122e1b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
src/pages/workbench/intelligent_drawing.vue
src/pages/workbench/intelligent_drawing.vue
+31
-2
src/store/index.js
src/store/index.js
+8
-0
No files found.
src/pages/workbench/intelligent_drawing.vue
View file @
09418df3
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</div>
</div>
<div
class=
"main-container"
>
<div
class=
"main-container"
>
<iframe
ref=
"intelligent_drawing_iframe"
width=
"100%"
height=
"100%"
scrolling=
"no"
:src=
"
u
rl"
frameborder=
"0"
></iframe>
<iframe
ref=
"intelligent_drawing_iframe"
width=
"100%"
height=
"100%"
scrolling=
"no"
:src=
"
znztU
rl"
frameborder=
"0"
></iframe>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -17,20 +17,49 @@
...
@@ -17,20 +17,49 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
url
:
'
https://
apaasgis.wodcloud.com/portal/apaasplat/viewer/mapViewer.html
'
url
:
'
https://
zhangh.wodcloud.com/portal/apaasplat/viewer/mapViewer.html
'
,
};
};
},
},
computed
:{
getZnztParams
()
{
return
this
.
$store
.
state
.
znztParams
;
},
getAppBuilderParams
()
{
return
this
.
$store
.
state
.
appBuilderParams
;
},
znztUrl
(){
return
this
.
url
+
this
.
urlParams
},
urlParams
(){
if
(
this
.
$store
.
state
.
znztParams
){
return
`?webmap=
${
this
.
$store
.
state
.
znztParams
.
id
}
`
;
}
else
{
return
''
}
},
},
watch
:
{
getZnztParams
(
newVal
)
{
this
.
urlParams
=
`?webmap=
${
newVal
.
id
}
`
console
.
log
(
'
智能制图参数
'
+
newVal
)
},
getAppBuilderParams
(
newVal
)
{
console
.
log
(
'
智能制图应用程序参数
'
+
newVal
)
},
},
mounted
()
{
mounted
()
{
window
.
addEventListener
(
'
message
'
,
event
=>
{
window
.
addEventListener
(
'
message
'
,
event
=>
{
let
data
=
event
.
data
;
let
data
=
event
.
data
;
// 智能制图发布服务
// 智能制图发布服务
if
(
data
.
cmd
==
'
mapviewmsg
'
){
if
(
data
.
cmd
==
'
mapviewmsg
'
){
console
.
log
(
data
);
console
.
log
(
data
);
this
.
$store
.
commit
(
"
setZnztParams
"
,
data
.
params
);
this
.
$router
.
push
(
`/fwzc/fwcs`
);
this
.
$router
.
push
(
`/fwzc/fwcs`
);
}
}
// App Builder发布服务
// App Builder发布服务
if
(
data
.
cmd
==
'
appbuildermsg
'
){
if
(
data
.
cmd
==
'
appbuildermsg
'
){
console
.
log
(
data
);
console
.
log
(
data
);
this
.
$store
.
commit
(
"
setAppBuilderParams
"
,
data
.
params
);
this
.
$router
.
push
(
`/fwzc/fwcs`
);
this
.
$router
.
push
(
`/fwzc/fwcs`
);
}
}
})
})
...
...
src/store/index.js
View file @
09418df3
...
@@ -19,6 +19,8 @@ const store = new Vuex.Store({
...
@@ -19,6 +19,8 @@ const store = new Vuex.Store({
],
// 应用管理列表,onlyRead
],
// 应用管理列表,onlyRead
shoppingCart
:
[],
//购物车
shoppingCart
:
[],
//购物车
menuCartState
:
0
,
//购物车操作都要修改这个值,menu监听这个值的变化实时获取购物车列表
menuCartState
:
0
,
//购物车操作都要修改这个值,menu监听这个值的变化实时获取购物车列表
znztParams
:
null
,
//智能制图传入过来的数据
appBuilderParams
:
null
,
//应用程序传入过来的数据
},
},
getters
:
{
getters
:
{
// 1:超管 2:组织管理员 3:普通用户 4:开发者
// 1:超管 2:组织管理员 3:普通用户 4:开发者
...
@@ -52,6 +54,12 @@ const store = new Vuex.Store({
...
@@ -52,6 +54,12 @@ const store = new Vuex.Store({
setMenuCartState
(
state
)
{
setMenuCartState
(
state
)
{
state
.
menuCartState
++
;
state
.
menuCartState
++
;
},
},
setZnztParams
(
state
,
newValue
)
{
state
.
znztParams
=
newValue
;
},
setAppBuilderParams
(
state
,
newValue
)
{
state
.
appBuilderParams
=
newValue
;
},
},
},
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment