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
98a2095b
Commit
98a2095b
authored
Aug 04, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试时空服务iframe
parent
4158cdb2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
833 additions
and
8 deletions
+833
-8
package.json
package.json
+4
-1
src/components/super-flow.vue
src/components/super-flow.vue
+589
-0
src/main.js
src/main.js
+4
-0
src/pages/example/example_com_flow.vue
src/pages/example/example_com_flow.vue
+24
-0
src/pages/workbench/fwzc_fwcs.vue
src/pages/workbench/fwzc_fwcs.vue
+157
-1
src/router/index.js
src/router/index.js
+5
-0
yarn.lock
yarn.lock
+50
-6
No files found.
package.json
View file @
98a2095b
...
@@ -32,18 +32,19 @@
...
@@ -32,18 +32,19 @@
"
vue-i18n
"
:
"
^8.17.7
"
,
"
vue-i18n
"
:
"
^8.17.7
"
,
"
vue-resource
"
:
"
^1.5.1
"
,
"
vue-resource
"
:
"
^1.5.1
"
,
"
vue-router
"
:
"
^3.0.2
"
,
"
vue-router
"
:
"
^3.0.2
"
,
"
vue-super-flow
"
:
"
^1.3.2
"
,
"
vuex
"
:
"
^3.1.0
"
,
"
vuex
"
:
"
^3.1.0
"
,
"
xterm
"
:
"
^4.7.0
"
,
"
xterm
"
:
"
^4.7.0
"
,
"
xterm-addon-fit
"
:
"
^0.4.0
"
,
"
xterm-addon-fit
"
:
"
^0.4.0
"
,
"
yaml2json
"
:
"
^1.0.2
"
"
yaml2json
"
:
"
^1.0.2
"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"
@babel/compat-data
"
:
"
7.9.0
"
,
"
@babel/core
"
:
"
^7.4.0
"
,
"
@babel/core
"
:
"
^7.4.0
"
,
"
@babel/plugin-syntax-jsx
"
:
"
^7.2.0
"
,
"
@babel/plugin-syntax-jsx
"
:
"
^7.2.0
"
,
"
@babel/plugin-transform-runtime
"
:
"
^7.4.0
"
,
"
@babel/plugin-transform-runtime
"
:
"
^7.4.0
"
,
"
@babel/preset-env
"
:
"
^7.4.2
"
,
"
@babel/preset-env
"
:
"
^7.4.2
"
,
"
@babel/runtime
"
:
"
^7.4.2
"
,
"
@babel/runtime
"
:
"
^7.4.2
"
,
"
@babel/compat-data
"
:
"
7.9.0
"
,
"
autoprefixer
"
:
"
^9.5.0
"
,
"
autoprefixer
"
:
"
^9.5.0
"
,
"
babel-loader
"
:
"
^8.0.5
"
,
"
babel-loader
"
:
"
^8.0.5
"
,
"
babel-plugin-syntax-jsx
"
:
"
^6.18.0
"
,
"
babel-plugin-syntax-jsx
"
:
"
^6.18.0
"
,
...
@@ -54,6 +55,8 @@
...
@@ -54,6 +55,8 @@
"
file-loader
"
:
"
^3.0.1
"
,
"
file-loader
"
:
"
^3.0.1
"
,
"
friendly-errors-webpack-plugin
"
:
"
^1.7.0
"
,
"
friendly-errors-webpack-plugin
"
:
"
^1.7.0
"
,
"
html-webpack-plugin
"
:
"
^3.2.0
"
,
"
html-webpack-plugin
"
:
"
^3.2.0
"
,
"
less
"
:
"
^3.12.2
"
,
"
less-loader
"
:
"
^6.2.0
"
,
"
mini-css-extract-plugin
"
:
"
^0.5.0
"
,
"
mini-css-extract-plugin
"
:
"
^0.5.0
"
,
"
node-notifier
"
:
"
^5.4.0
"
,
"
node-notifier
"
:
"
^5.4.0
"
,
"
optimize-css-assets-webpack-plugin
"
:
"
^5.0.1
"
,
"
optimize-css-assets-webpack-plugin
"
:
"
^5.0.1
"
,
...
...
src/components/super-flow.vue
0 → 100644
View file @
98a2095b
<!--
* User: CHT
* Date: 2020/6/28
* Time: 17:48
-->
<
template
>
<div>
<div>
<el-form
class=
"link-base-style-form"
ref=
"linkBaseStyle"
label-width=
"100px"
:model=
"linkBaseStyle"
>
<h4>
linkBaseStyle
</h4>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"color"
>
<el-color-picker
v-model=
"linkBaseStyle.color"
>
</el-color-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"hover"
>
<el-color-picker
v-model=
"linkBaseStyle.hover"
>
</el-color-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"textColor"
>
<el-color-picker
v-model=
"linkBaseStyle.textColor"
>
</el-color-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"textHover"
>
<el-color-picker
v-model=
"linkBaseStyle.textHover"
>
</el-color-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"font"
>
<el-select
size=
"medium"
v-model=
"linkBaseStyle.font"
>
<el-option
v-for=
"item in fontList"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"dotted"
>
<el-switch
v-model=
"linkBaseStyle.dotted"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-switch>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"lineDash"
>
<el-select
size=
"medium"
style=
"width: 80px"
v-model=
"linkBaseStyle.lineDash[0]"
>
<el-option
v-for=
"item in [1,2,3,4,5,6,7,8]"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
<el-select
size=
"medium"
style=
"width: 80px"
v-model=
"linkBaseStyle.lineDash[1]"
>
<el-option
v-for=
"item in [1,2,3,4,5,6,7,8]"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"background"
>
<el-color-picker
v-model=
"linkBaseStyle.background"
>
</el-color-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div
class=
"super-flow-demo1"
>
<div
class=
"node-container"
>
<span
class=
"node-item"
v-for=
"item in nodeItemList"
:key=
"item"
@
mousedown=
"evt => nodeItemMouseDown(evt, item.value)"
>
{{
item
.
label
}}
</span>
</div>
<div
class=
"flow-container"
ref=
"flowContainer"
>
<super-flow
ref=
"superFlow"
:graph-menu=
"graphMenu"
:node-menu=
"nodeMenu"
:link-menu=
"linkMenu"
:link-base-style=
"linkBaseStyle"
:link-style=
"linkStyle"
:link-desc=
"linkDesc"
>
<template
v-slot:node=
"
{meta}">
<div
class=
"flow-node"
>
{{
meta
.
name
}}
</div>
</
template
>
</super-flow>
</div>
</div>
<el-dialog
:title=
"drawerConf.title"
:visible.sync=
"drawerConf.visible"
:close-on-click-modal=
"false"
width=
"500px"
>
<el-form
v-show=
"drawerConf.type === drawerType.node"
ref=
"nodeSetting"
:model=
"nodeSetting"
>
<el-form-item
label=
"节点名称"
prop=
"name"
>
<el-input
v-model=
"nodeSetting.name"
placeholder=
"请输入节点名称"
maxlength=
"30"
>
</el-input>
</el-form-item>
<el-form-item
label=
"节点描述"
prop=
"desc"
>
<el-input
v-model=
"nodeSetting.desc"
placeholder=
"请输入节点描述"
maxlength=
"30"
>
</el-input>
</el-form-item>
</el-form>
<el-form
v-show=
"drawerConf.type === drawerType.link"
ref=
"linkSetting"
:model=
"linkSetting"
>
<el-form-item
label=
"连线描述"
prop=
"desc"
>
<el-input
v-model=
"linkSetting.desc"
placeholder=
"请输入连线描述"
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"drawerConf.cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"settingSubmit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
const
drawerType
=
{
node
:
0
,
link
:
1
}
export
default
{
data
()
{
return
{
drawerType
,
drawerConf
:
{
title
:
''
,
visible
:
false
,
type
:
null
,
info
:
null
,
open
:
(
type
,
info
)
=>
{
const
conf
=
this
.
drawerConf
conf
.
visible
=
true
conf
.
type
=
type
conf
.
info
=
info
if
(
conf
.
type
===
drawerType
.
node
)
{
conf
.
title
=
'
节点
'
if
(
this
.
$refs
.
nodeSetting
)
this
.
$refs
.
nodeSetting
.
resetFields
()
this
.
$set
(
this
.
nodeSetting
,
'
name
'
,
info
.
meta
.
name
)
this
.
$set
(
this
.
nodeSetting
,
'
desc
'
,
info
.
meta
.
desc
)
}
else
{
conf
.
title
=
'
连线
'
if
(
this
.
$refs
.
linkSetting
)
this
.
$refs
.
linkSetting
.
resetFields
()
this
.
$set
(
this
.
linkSetting
,
'
desc
'
,
info
.
meta
?
info
.
meta
.
desc
:
''
)
}
},
cancel
:
()
=>
{
this
.
drawerConf
.
visible
=
false
if
(
this
.
drawerConf
.
type
===
drawerType
.
node
)
{
this
.
$refs
.
nodeSetting
.
clearValidate
()
}
else
{
this
.
$refs
.
linkSetting
.
clearValidate
()
}
}
},
linkSetting
:
{
desc
:
''
},
nodeSetting
:
{
name
:
''
,
desc
:
''
},
dragConf
:
{
isDown
:
false
,
isMove
:
false
,
offsetTop
:
0
,
offsetLeft
:
0
,
clientX
:
0
,
clientY
:
0
,
ele
:
null
,
info
:
null
},
nodeItemList
:
[
{
label
:
'
节点1
'
,
value
:
{
width
:
120
,
height
:
40
,
meta
:
{
label
:
'
1
'
,
name
:
'
1
'
}
}
},
{
label
:
'
节点2
'
,
value
:
{
width
:
120
,
height
:
40
,
meta
:
{
label
:
'
2
'
,
name
:
'
2
'
}
}
},
{
label
:
'
节点3
'
,
value
:
{
width
:
120
,
height
:
40
,
meta
:
{
label
:
'
3
'
,
name
:
'
3
'
}
}
},
{
label
:
'
节点4
'
,
value
:
{
width
:
120
,
height
:
40
,
meta
:
{
label
:
'
4
'
,
name
:
'
4
'
}
}
}
],
graphMenu
:
[
[
{
// 选项 label
label
:
'
节点1
'
,
// 选项是否禁用
disable
(
graph
)
{
return
!!
graph
.
nodeList
.
find
(
node
=>
node
.
meta
.
label
===
'
1
'
)
},
// 选项选中后回调函数
selected
(
graph
,
coordinate
)
{
graph
.
addNode
({
width
:
120
,
height
:
40
,
coordinate
,
meta
:
{
label
:
'
1
'
,
name
:
'
1
'
}
})
}
},
{
label
:
'
节点2
'
,
selected
(
graph
,
coordinate
)
{
graph
.
addNode
({
width
:
120
,
height
:
40
,
coordinate
,
meta
:
{
label
:
'
2
'
,
name
:
'
2
'
}
})
}
},
{
label
:
'
节点3
'
,
selected
(
graph
,
coordinate
)
{
graph
.
addNode
({
width
:
120
,
height
:
40
,
coordinate
,
meta
:
{
label
:
'
3
'
,
name
:
'
3
'
}
})
}
}
],
[
{
label
:
'
节点4
'
,
selected
(
graph
,
coordinate
)
{
graph
.
addNode
({
width
:
120
,
height
:
40
,
coordinate
,
meta
:
{
label
:
'
4
'
,
name
:
'
4
'
}
})
}
}
],
[
{
label
:
'
全选
'
,
selected
:
graph
=>
{
graph
.
selectAll
()
}
}
]
],
nodeMenu
:
[
[
{
label
:
'
删除
'
,
selected
:
node
=>
{
node
.
remove
()
}
},
{
label
:
'
编辑
'
,
selected
:
node
=>
{
this
.
drawerConf
.
open
(
drawerType
.
node
,
node
)
}
}
]
],
linkMenu
:
[
[
{
label
:
'
删除
'
,
selected
:
link
=>
{
link
.
remove
()
}
},
{
label
:
'
编辑
'
,
selected
:
link
=>
{
this
.
drawerConf
.
open
(
drawerType
.
link
,
link
)
}
}
]
],
linkBaseStyle
:
{
color
:
'
#666666
'
,
// line 颜色
hover
:
'
#FF0000
'
,
// line hover 的颜色
textColor
:
'
#666666
'
,
// line 描述文字颜色
textHover
:
'
#FF0000
'
,
// line 描述文字 hover 颜色
font
:
'
14px Arial
'
,
// line 描述文字 字体设置 参考 canvas font
dotted
:
false
,
// 是否是虚线
lineDash
:
[
4
,
4
],
// 虚线时生效
background
:
'
rgba(255,255,255,0.6)
'
// 描述文字背景色
},
fontList
:
[
'
14px Arial
'
,
'
italic small-caps bold 12px arial
'
]
}
},
mounted
()
{
document
.
addEventListener
(
'
mousemove
'
,
this
.
docMousemove
)
document
.
addEventListener
(
'
mouseup
'
,
this
.
docMouseup
)
this
.
$once
(
'
hook:beforeDestroy
'
,
()
=>
{
document
.
removeEventListener
(
'
mousemove
'
,
this
.
docMousemove
)
document
.
removeEventListener
(
'
mouseup
'
,
this
.
docMouseup
)
})
},
methods
:
{
flowNodeClick
(
meta
)
{
console
.
log
(
this
.
$refs
.
superFlow
.
graph
)
},
linkStyle
(
link
)
{
return
{
// hover: '#FF00FF'
}
},
linkDesc
(
link
)
{
return
link
.
meta
?
link
.
meta
.
desc
:
''
},
settingSubmit
()
{
const
conf
=
this
.
drawerConf
if
(
this
.
drawerConf
.
type
===
drawerType
.
node
)
{
if
(
!
conf
.
info
.
meta
)
conf
.
info
.
meta
=
{}
Object
.
keys
(
this
.
nodeSetting
).
forEach
(
key
=>
{
this
.
$set
(
conf
.
info
.
meta
,
key
,
this
.
nodeSetting
[
key
])
})
this
.
$refs
.
nodeSetting
.
resetFields
()
}
else
{
if
(
!
conf
.
info
.
meta
)
conf
.
info
.
meta
=
{}
Object
.
keys
(
this
.
linkSetting
).
forEach
(
key
=>
{
this
.
$set
(
conf
.
info
.
meta
,
key
,
this
.
linkSetting
[
key
])
})
this
.
$refs
.
linkSetting
.
resetFields
()
}
conf
.
visible
=
false
},
docMousemove
({
clientX
,
clientY
})
{
const
conf
=
this
.
dragConf
if
(
conf
.
isMove
)
{
conf
.
ele
.
style
.
top
=
clientY
-
conf
.
offsetTop
+
'
px
'
conf
.
ele
.
style
.
left
=
clientX
-
conf
.
offsetLeft
+
'
px
'
}
else
if
(
conf
.
isDown
)
{
// 鼠标移动量大于 5 时 移动状态生效
conf
.
isMove
=
Math
.
abs
(
clientX
-
conf
.
clientX
)
>
5
||
Math
.
abs
(
clientY
-
conf
.
clientY
)
>
5
}
},
docMouseup
({
clientX
,
clientY
})
{
const
conf
=
this
.
dragConf
conf
.
isDown
=
false
if
(
conf
.
isMove
)
{
const
{
top
,
right
,
bottom
,
left
}
=
this
.
$refs
.
flowContainer
.
getBoundingClientRect
()
// 判断鼠标是否进入 flow container
if
(
clientX
>
left
&&
clientX
<
right
&&
clientY
>
top
&&
clientY
<
bottom
)
{
// 获取拖动元素左上角相对 super flow 区域原点坐标
const
coordinate
=
this
.
$refs
.
superFlow
.
getMouseCoordinate
(
clientX
-
conf
.
offsetLeft
,
clientY
-
conf
.
offsetTop
)
// 添加节点
this
.
$refs
.
superFlow
.
addNode
({
coordinate
,
...
conf
.
info
})
}
conf
.
isMove
=
false
}
if
(
conf
.
ele
)
{
conf
.
ele
.
remove
()
conf
.
ele
=
null
}
},
nodeItemMouseDown
(
evt
,
info
)
{
const
{
clientX
,
clientY
,
currentTarget
}
=
evt
const
{
top
,
left
}
=
evt
.
currentTarget
.
getBoundingClientRect
()
const
conf
=
this
.
dragConf
const
ele
=
currentTarget
.
cloneNode
(
true
)
Object
.
assign
(
this
.
dragConf
,
{
offsetLeft
:
clientX
-
left
,
offsetTop
:
clientY
-
top
,
clientX
:
clientX
,
clientY
:
clientY
,
info
,
ele
,
isDown
:
true
})
ele
.
style
.
position
=
'
fixed
'
ele
.
style
.
margin
=
'
0
'
ele
.
style
.
top
=
clientY
-
conf
.
offsetTop
+
'
px
'
ele
.
style
.
left
=
clientX
-
conf
.
offsetLeft
+
'
px
'
this
.
$el
.
appendChild
(
this
.
dragConf
.
ele
)
}
}
}
</
script
>
<
style
lang=
"less"
>
.link-base-style-form {
.el-form-item {
margin-bottom : 12px;
}
padding-bottom : 20px;
border-bottom : 1px solid #DCDCDC;
}
.super-flow-demo1 {
margin-top : 20px ;
width : 100%;
height : 800px;
background-color : #f5f5f5;
@list-width : 200px;
> .node-container {
width : @list-width;
float : left;
height : 100%;
text-align : center;
background-color : #FFFFFF;
}
> .flow-container {
width : calc(100% - @list-width);
float : left;
height : 100%;
overflow : hidden;
}
.super-flow__node {
.flow-node {
width : 100%;
height : 100%;
line-height : 40px;
padding : 0 6px;
font-size : 12px;
}
}
}
.node-item {
@node-item-height : 30px;
font-size : 14px;
display : inline-block;
height : @node-item-height;
width : 120px;
margin-top : 20px;
background-color : #FFFFFF;
line-height : @node-item-height;
box-shadow : 1px 1px 4px rgba(0, 0, 0, 0.3);
cursor : pointer;
user-select : none;
text-align : center;
z-index : 6;
&:hover {
box-shadow : 1px 1px 8px rgba(0, 0, 0, 0.4);
}
}
</
style
>
\ No newline at end of file
src/main.js
View file @
98a2095b
...
@@ -56,6 +56,10 @@ const i18n = new VueI18n({
...
@@ -56,6 +56,10 @@ const i18n = new VueI18n({
}
}
})
})
import
SuperFlow
from
'
vue-super-flow
'
import
'
vue-super-flow/lib/index.css
'
Vue
.
use
(
SuperFlow
)
import
api
from
'
./request/api
'
import
api
from
'
./request/api
'
Vue
.
prototype
.
$api
=
api
;
Vue
.
prototype
.
$api
=
api
;
...
...
src/pages/example/example_com_flow.vue
0 → 100644
View file @
98a2095b
<
template
>
<div
class=
"com_ex"
>
<SuperFlow
/>
</div>
</
template
>
<
script
>
// @ is an alias to /src
import
SuperFlow
from
"
@/components/super-flow.vue
"
;
export
default
{
components
:
{
SuperFlow
,
},
data
:
()
=>
({}),
mounted
()
{},
methods
:
{},
};
</
script
>
<
style
scoped
>
.com_ex
{
margin-top
:
100px
;
padding
:
20px
;
}
</
style
>
\ No newline at end of file
src/pages/workbench/fwzc_fwcs.vue
View file @
98a2095b
...
@@ -354,6 +354,9 @@
...
@@ -354,6 +354,9 @@
</div>
</div>
</block-radius>
</block-radius>
</div>
</div>
<div>
<iframe
src=
"https://apaasgis.wodcloud.com/portal/apaasplat/viewer/autologin.html"
style=
"width: 1000px;height: 400px"
></iframe>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -530,6 +533,42 @@ export default {
...
@@ -530,6 +533,42 @@ export default {
requestRules
:
0
,
requestRules
:
0
,
responseRules
:
0
,
responseRules
:
0
,
is_map
:
false
,
is_map
:
false
,
param_fields
:
[],
body_fields
:
[],
portalUser
:
{},
dataTree_apaas_config
:
{
"
18
"
:
"
Map Service
"
,
"
19
"
:
"
Feature Service
"
,
"
20
"
:
"
Web Map
"
,
"
31
"
:
"
WFS
"
,
"
32
"
:
"
WMS
"
,
"
Map Service
"
:
"
18
"
,
"
Feature Service
"
:
"
19
"
,
"
Web Map
"
:
"
20
"
,
WFS
:
"
31
"
,
WMS
:
"
32
"
,
},
//数据服务页面中行业分类配置项
industryTree_apaas_Config
:
{
"
1
"
:
"
T001
"
,
"
2
"
:
"
T002
"
,
"
3
"
:
"
T004
"
,
"
4
"
:
"
T005
"
,
"
25
"
:
"
T006
"
,
"
26
"
:
"
T007
"
,
"
27
"
:
"
T008
"
,
"
28
"
:
"
T009
"
,
"
29
"
:
"
T010
"
,
T001
:
"
1
"
,
T002
:
"
2
"
,
T004
:
"
3
"
,
T005
:
"
4
"
,
T006
:
"
25
"
,
T007
:
"
26
"
,
T008
:
"
27
"
,
T009
:
"
28
"
,
T010
:
"
29
"
,
},
};
};
},
},
computed
:
{},
computed
:
{},
...
@@ -667,8 +706,10 @@ export default {
...
@@ -667,8 +706,10 @@ export default {
let
data
=
response
.
data
.
data
;
let
data
=
response
.
data
.
data
;
if
(
data
.
body_fields
&&
data
.
body_fields
.
length
!=
0
)
{
if
(
data
.
body_fields
&&
data
.
body_fields
.
length
!=
0
)
{
this
.
datasQqcs
=
data
.
body_fields
;
this
.
datasQqcs
=
data
.
body_fields
;
this
.
param_fields
=
data
.
param_fields
;
}
else
{
}
else
{
this
.
datasQqcs
=
data
.
param_fields
;
this
.
datasQqcs
=
data
.
param_fields
;
this
.
body_fields
=
[];
}
}
this
.
datasFhcs
=
data
.
response_fields
;
this
.
datasFhcs
=
data
.
response_fields
;
this
.
resSuccess
=
true
;
this
.
resSuccess
=
true
;
...
@@ -782,7 +823,10 @@ export default {
...
@@ -782,7 +823,10 @@ export default {
encode_method
:
this
.
form
.
code
,
encode_method
:
this
.
form
.
code
,
method
:
this
.
select
,
method
:
this
.
select
,
url
:
this
.
serviceUrl
,
url
:
this
.
serviceUrl
,
request_fields
:
this
.
request_fields
,
request_fields
:
this
.
body_fields
.
length
==
0
?
[]
:
this
.
request_fields
,
request_query_fields
:
this
.
param_fields
.
length
==
0
?
[]
:
this
.
request_fields
,
response_fields
:
this
.
response_fields
,
response_fields
:
this
.
response_fields
,
content_type
:
contentType
,
content_type
:
contentType
,
};
};
...
@@ -869,11 +913,123 @@ export default {
...
@@ -869,11 +913,123 @@ export default {
goto
(
path
)
{
goto
(
path
)
{
this
.
$router
.
push
(
path
);
this
.
$router
.
push
(
path
);
},
},
addPortalItem
()
{
//添加服务到portal
var
url
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
portalUser
.
username
+
"
/addItem
"
;
$
.
ajax
({
url
:
url
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
//data: json,
data
:
{
f
:
"
json
"
,
tags
:
industryTree_apaas_Config
[
"
1
"
],
title
:
"
测试添加服务5
"
,
url
:
"
https://apaasgis.wodcloud.com/server/rest/services/GZ_FJXQZTT/FeatureServer
"
,
type
:
dataTree_apaas_config
[
"
19
"
],
token
:
portalUser
.
token
,
},
dataType
:
"
json
"
,
//dataType不能少
success
:
function
(
result
)
{
if
(
result
.
error
!=
null
)
{
alert
(
"
添加专题图到Portal中失败,
"
+
result
.
error
.
message
);
}
else
{
shareItem
(
result
.
id
);
}
},
error
:
function
(
xhr
,
status
,
err
)
{
alert
(
"
添加专题图到Portal中失败,
"
+
xhr
.
responseText
);
},
});
},
shareItem
(
itemid
)
{
var
searchUrl
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
portalUser
.
username
+
"
/shareItems
"
;
$
.
ajax
({
url
:
searchUrl
,
dataType
:
"
json
"
,
method
:
"
POST
"
,
data
:
{
items
:
itemid
,
everyone
:
true
,
token
:
portalUser
.
token
,
f
:
"
json
"
,
groups
:
null
,
},
success
:
function
(
data
)
{},
error
:
function
(
err
)
{
alert
(
err
);
},
});
},
getItemInfo
(
itemid
)
{
console
.
log
(
"
ssss
"
)
var
searchUrl
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
portalUser
.
username
+
"
/items/
"
+
itemid
;
$
.
ajax
({
url
:
searchUrl
,
dataType
:
"
json
"
,
method
:
"
POST
"
,
data
:
{
token
:
portalUser
.
token
,
f
:
"
json
"
,
},
success
:
function
(
data
)
{
var
sectors
=
""
;
$
(
data
.
item
.
tags
).
each
(
function
(
i
,
tag
)
{
if
(
!!
industryTree_apaas_Config
[
tag
])
{
sectors
=
industryTree_apaas_Config
[
tag
];
return
;
}
});
var
item
=
{
url
:
data
.
item
.
url
,
itemid
:
data
.
item
.
id
,
name
:
data
.
item
.
title
,
descript
:
data
.
item
.
description
,
cover
:
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/items/
"
+
data
.
item
.
id
+
"
/info/
"
+
data
.
item
.
thumbnail
+
"
?token=
"
+
portalUser
.
token
,
sectors
:
sectors
,
data_service_type2
:
dataTree_apaas_config
[
data
.
item
.
type
],
};
console
.
log
(
item
);
},
error
:
function
(
err
)
{
alert
(
err
);
},
});
},
},
},
mounted
()
{
mounted
()
{
this
.
judgeMap
();
this
.
judgeMap
();
this
.
getServiceType1
();
this
.
getServiceType1
();
this
.
getArea
();
this
.
getArea
();
window
.
addEventListener
(
"
message
"
,
function
(
event
)
{
if
(
event
.
data
&&
event
.
data
.
cmd
==
"
getPortalUser
"
)
{
portalUser
=
event
.
data
.
params
;
getItemInfo
(
"
86fd0d2e89854cb293d287efd2142acd
"
);
//addPortalItem();
}
},
false
);
},
},
};
};
</
script
>
</
script
>
...
...
src/router/index.js
View file @
98a2095b
...
@@ -503,5 +503,10 @@ export default new Router({
...
@@ -503,5 +503,10 @@ export default new Router({
name
:
"
example_com_list
"
,
name
:
"
example_com_list
"
,
component
:
()
=>
import
(
"
@/pages/example/example_com_list
"
),
component
:
()
=>
import
(
"
@/pages/example/example_com_list
"
),
},
},
{
path
:
"
/example_com_flow
"
,
// 流程图实例
name
:
"
example_com_flow
"
,
component
:
()
=>
import
(
"
@/pages/example/example_com_flow
"
),
},
],
],
});
});
yarn.lock
View file @
98a2095b
...
@@ -2022,7 +2022,7 @@ clone@^1.0.2:
...
@@ -2022,7 +2022,7 @@ clone@^1.0.2:
resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=
integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=
clone@^2.1.1:
clone@^2.1.1
, clone@^2.1.2
:
version "2.1.2"
version "2.1.2"
resolved "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
resolved "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=
integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=
...
@@ -2937,7 +2937,7 @@ entities@^2.0.0:
...
@@ -2937,7 +2937,7 @@ entities@^2.0.0:
resolved "https://registry.npm.taobao.org/entities/download/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
resolved "https://registry.npm.taobao.org/entities/download/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
integrity sha1-XEh+V0Krk8Fau12iJ1m4WQ7AO38=
integrity sha1-XEh+V0Krk8Fau12iJ1m4WQ7AO38=
errno@^0.1.3, errno@~0.1.7:
errno@^0.1.
1, errno@^0.1.
3, errno@~0.1.7:
version "0.1.7"
version "0.1.7"
resolved "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
resolved "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
integrity sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=
integrity sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=
...
@@ -3879,7 +3879,7 @@ ignore@^3.3.5:
...
@@ -3879,7 +3879,7 @@ ignore@^3.3.5:
resolved "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
resolved "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
integrity sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=
integrity sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=
image-size@^0.5.1:
image-size@^0.5.1
, image-size@~0.5.0
:
version "0.5.5"
version "0.5.5"
resolved "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
resolved "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
...
@@ -4405,6 +4405,31 @@ last-call-webpack-plugin@^3.0.0:
...
@@ -4405,6 +4405,31 @@ last-call-webpack-plugin@^3.0.0:
lodash "^4.17.5"
lodash "^4.17.5"
webpack-sources "^1.1.0"
webpack-sources "^1.1.0"
less-loader@^6.2.0:
version "6.2.0"
resolved "https://registry.npm.taobao.org/less-loader/download/less-loader-6.2.0.tgz?cache=0&sync_timestamp=1593788012269&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless-loader%2Fdownload%2Fless-loader-6.2.0.tgz#8b26f621c155b342eefc24f5bd6e9dc40c42a719"
integrity sha1-iyb2IcFVs0Lu/CT1vW6dxAxCpxk=
dependencies:
clone "^2.1.2"
less "^3.11.3"
loader-utils "^2.0.0"
schema-utils "^2.7.0"
less@^3.11.3, less@^3.12.2:
version "3.12.2"
resolved "https://registry.npm.taobao.org/less/download/less-3.12.2.tgz#157e6dd32a68869df8859314ad38e70211af3ab4"
integrity sha1-FX5t0ypohp34hZMUrTjnAhGvOrQ=
dependencies:
tslib "^1.10.0"
optionalDependencies:
errno "^0.1.1"
graceful-fs "^4.1.2"
image-size "~0.5.0"
make-dir "^2.1.0"
mime "^1.4.1"
native-request "^1.0.5"
source-map "~0.6.0"
leven@^3.1.0:
leven@^3.1.0:
version "3.1.0"
version "3.1.0"
resolved "https://registry.npm.taobao.org/leven/download/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
resolved "https://registry.npm.taobao.org/leven/download/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
...
@@ -4441,6 +4466,15 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4
...
@@ -4441,6 +4466,15 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4
emojis-list "^3.0.0"
emojis-list "^3.0.0"
json5 "^1.0.1"
json5 "^1.0.1"
loader-utils@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0"
integrity sha1-5MrOW4FtQloWa18JfhDNErNgZLA=
dependencies:
big.js "^5.2.2"
emojis-list "^3.0.0"
json5 "^2.1.2"
locate-path@^2.0.0:
locate-path@^2.0.0:
version "2.0.0"
version "2.0.0"
resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
...
@@ -4538,7 +4572,7 @@ make-dir@^1.0.0:
...
@@ -4538,7 +4572,7 @@ make-dir@^1.0.0:
dependencies:
dependencies:
pify "^3.0.0"
pify "^3.0.0"
make-dir@^2.0.0:
make-dir@^2.0.0
, make-dir@^2.1.0
:
version "2.1.0"
version "2.1.0"
resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
integrity sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=
integrity sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=
...
@@ -4694,7 +4728,7 @@ mime-types@~2.1.17, mime-types@~2.1.24:
...
@@ -4694,7 +4728,7 @@ mime-types@~2.1.17, mime-types@~2.1.24:
dependencies:
dependencies:
mime-db "1.44.0"
mime-db "1.44.0"
mime@1.6.0:
mime@1.6.0
, mime@^1.4.1
:
version "1.6.0"
version "1.6.0"
resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=
integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=
...
@@ -4889,6 +4923,11 @@ nanomatch@^1.2.1, nanomatch@^1.2.9:
...
@@ -4889,6 +4923,11 @@ nanomatch@^1.2.1, nanomatch@^1.2.9:
snapdragon "^0.8.1"
snapdragon "^0.8.1"
to-regex "^3.0.1"
to-regex "^3.0.1"
native-request@^1.0.5:
version "1.0.7"
resolved "https://registry.npm.taobao.org/native-request/download/native-request-1.0.7.tgz#ff742dc555b4c8f2f1c14b548639ba174e573856"
integrity sha1-/3QtxVW0yPLxwUtUhjm6F05XOFY=
negotiator@0.6.2:
negotiator@0.6.2:
version "0.6.2"
version "0.6.2"
resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
...
@@ -6323,7 +6362,7 @@ schema-utils@^1.0.0:
...
@@ -6323,7 +6362,7 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"
ajv-keywords "^3.1.0"
schema-utils@^2.6.5:
schema-utils@^2.6.5
, schema-utils@^2.7.0
:
version "2.7.0"
version "2.7.0"
resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.0.tgz?cache=0&sync_timestamp=1590761195120&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7"
resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.0.tgz?cache=0&sync_timestamp=1590761195120&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7"
integrity sha1-FxUfdtjq5n+793lgwzxnatn078c=
integrity sha1-FxUfdtjq5n+793lgwzxnatn078c=
...
@@ -7342,6 +7381,11 @@ vue-style-loader@^4.1.0, vue-style-loader@^4.1.2:
...
@@ -7342,6 +7381,11 @@ vue-style-loader@^4.1.0, vue-style-loader@^4.1.2:
hash-sum "^1.0.2"
hash-sum "^1.0.2"
loader-utils "^1.0.2"
loader-utils "^1.0.2"
vue-super-flow@^1.3.2:
version "1.3.2"
resolved "https://registry.npm.taobao.org/vue-super-flow/download/vue-super-flow-1.3.2.tgz#1de9b8c907b0cbcda9dfca6a36ed95ec9b45f35e"
integrity sha1-Hem4yQewy82p38pqNu2V7JtF814=
vue-template-compiler@^2.6.10:
vue-template-compiler@^2.6.10:
version "2.6.11"
version "2.6.11"
resolved "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.11.tgz#c04704ef8f498b153130018993e56309d4698080"
resolved "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.11.tgz#c04704ef8f498b153130018993e56309d4698080"
...
...
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