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
23b8f1eb
Commit
23b8f1eb
authored
Aug 04, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portal
parent
bc44e4e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
34 deletions
+73
-34
src/pages/workbench/fwzc_fwcs.vue
src/pages/workbench/fwzc_fwcs.vue
+58
-34
src/services/helper.js
src/services/helper.js
+15
-0
No files found.
src/pages/workbench/fwzc_fwcs.vue
View file @
23b8f1eb
...
@@ -354,8 +354,8 @@
...
@@ -354,8 +354,8 @@
</div>
</div>
</block-radius>
</block-radius>
</div>
</div>
<div>
<div
style=
"display: none"
>
<iframe
src=
"https://apaasgis.wodcloud.com/portal/apaasplat/viewer/autologin.html"
style=
"width: 1000px;height: 400px"
></iframe>
<iframe
src=
"https://apaasgis.wodcloud.com/portal/apaasplat/viewer/autologin.html"
></iframe>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -365,6 +365,7 @@ import BlockRadius from "@/components/general/block-radius";
...
@@ -365,6 +365,7 @@ import BlockRadius from "@/components/general/block-radius";
import
CesTable
from
"
@/components/table/table-um
"
;
import
CesTable
from
"
@/components/table/table-um
"
;
import
Codes
from
"
@/components/general/codes
"
;
import
Codes
from
"
@/components/general/codes
"
;
import
uploadFile
from
"
@/components/general/upload_file
"
;
import
uploadFile
from
"
@/components/general/upload_file
"
;
import
helper
from
"
@/services/helper
"
;
export
default
{
export
default
{
components
:
{
components
:
{
BlockRadius
,
BlockRadius
,
...
@@ -569,6 +570,8 @@ export default {
...
@@ -569,6 +570,8 @@ export default {
T009
:
"
28
"
,
T009
:
"
28
"
,
T010
:
"
29
"
,
T010
:
"
29
"
,
},
},
portal_status
:
true
,
portal_data_service_type_2
:
""
,
};
};
},
},
computed
:
{},
computed
:
{},
...
@@ -746,6 +749,19 @@ export default {
...
@@ -746,6 +749,19 @@ export default {
}
else
if
(
this
.
responseRules
!=
0
)
{
}
else
if
(
this
.
responseRules
!=
0
)
{
this
.
$message
.
error
(
"
请完善返回参数信息中的字段名称
"
);
this
.
$message
.
error
(
"
请完善返回参数信息中的字段名称
"
);
}
}
}
else
if
(
this
.
activeBtn
==
1
)
{
if
(
this
.
portal_status
)
{
let
value
=
helper
.
getQueryString
(
"
id
"
,
this
.
serviceUrl
);
if
(
value
!=
""
)
{
this
.
getItemInfo
(
value
);
}
else
{
this
.
addPortalItem
();
}
}
this
.
request_fields
=
[];
this
.
response_fields
=
[];
this
.
jcxxtx
=
true
;
this
.
getOrganization
();
}
else
{
}
else
{
this
.
request_fields
=
[];
this
.
request_fields
=
[];
this
.
response_fields
=
[];
this
.
response_fields
=
[];
...
@@ -817,6 +833,8 @@ export default {
...
@@ -817,6 +833,8 @@ export default {
?
12
?
12
:
this
.
activeBtn
==
1
:
this
.
activeBtn
==
1
?
this
.
skfwQqt
?
this
.
skfwQqt
:
this
.
activeBtn
==
2
?
portal_data_service_type_2
:
this
.
activeBtn
==
4
:
this
.
activeBtn
==
4
?
this
.
zhyyVal
?
this
.
zhyyVal
:
0
,
:
0
,
...
@@ -914,10 +932,11 @@ export default {
...
@@ -914,10 +932,11 @@ export default {
this
.
$router
.
push
(
path
);
this
.
$router
.
push
(
path
);
},
},
addPortalItem
()
{
addPortalItem
()
{
console
.
log
(
"
添加portal
"
);
//添加服务到portal
//添加服务到portal
var
url
=
var
url
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
portalUser
.
username
+
this
.
portalUser
.
username
+
"
/addItem
"
;
"
/addItem
"
;
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
...
@@ -926,19 +945,19 @@ export default {
...
@@ -926,19 +945,19 @@ export default {
//data: json,
//data: json,
data
:
{
data
:
{
f
:
"
json
"
,
f
:
"
json
"
,
tags
:
industryTree_apaas_Config
[
"
1
"
],
tags
:
this
.
industryTree_apaas_Config
[
"
1
"
],
title
:
"
测试添加服务5
"
,
title
:
"
测试添加服务5
"
,
url
:
url
:
"
https://apaasgis.wodcloud.com/server/rest/services/GZ_FJXQZTT/FeatureServer
"
,
"
https://apaasgis.wodcloud.com/server/rest/services/GZ_FJXQZTT/FeatureServer
"
,
type
:
dataTree_apaas_config
[
"
19
"
],
type
:
this
.
dataTree_apaas_config
[
"
19
"
],
token
:
portalUser
.
token
,
token
:
this
.
portalUser
.
token
,
},
},
dataType
:
"
json
"
,
//dataType不能少
dataType
:
"
json
"
,
//dataType不能少
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
error
!=
null
)
{
if
(
result
.
error
!=
null
)
{
alert
(
"
添加专题图到Portal中失败,
"
+
result
.
error
.
message
);
alert
(
"
添加专题图到Portal中失败,
"
+
result
.
error
.
message
);
}
else
{
}
else
{
shareItem
(
result
.
id
);
this
.
shareItem
(
result
.
id
);
}
}
},
},
error
:
function
(
xhr
,
status
,
err
)
{
error
:
function
(
xhr
,
status
,
err
)
{
...
@@ -947,9 +966,10 @@ export default {
...
@@ -947,9 +966,10 @@ export default {
});
});
},
},
shareItem
(
itemid
)
{
shareItem
(
itemid
)
{
console
.
log
(
`共享portal
${
itemid
}
`
);
var
searchUrl
=
var
searchUrl
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
portalUser
.
username
+
this
.
portalUser
.
username
+
"
/shareItems
"
;
"
/shareItems
"
;
$
.
ajax
({
$
.
ajax
({
url
:
searchUrl
,
url
:
searchUrl
,
...
@@ -958,7 +978,7 @@ export default {
...
@@ -958,7 +978,7 @@ export default {
data
:
{
data
:
{
items
:
itemid
,
items
:
itemid
,
everyone
:
true
,
everyone
:
true
,
token
:
portalUser
.
token
,
token
:
this
.
portalUser
.
token
,
f
:
"
json
"
,
f
:
"
json
"
,
groups
:
null
,
groups
:
null
,
},
},
...
@@ -969,10 +989,10 @@ export default {
...
@@ -969,10 +989,10 @@ export default {
});
});
},
},
getItemInfo
(
itemid
)
{
getItemInfo
(
itemid
)
{
console
.
log
(
"
ssss
"
)
console
.
log
(
`获取portal参数
${
itemid
}
`
);
var
searchUrl
=
var
searchUrl
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/users/
"
+
portalUser
.
username
+
this
.
portalUser
.
username
+
"
/items/
"
+
"
/items/
"
+
itemid
;
itemid
;
$
.
ajax
({
$
.
ajax
({
...
@@ -980,33 +1000,37 @@ export default {
...
@@ -980,33 +1000,37 @@ export default {
dataType
:
"
json
"
,
dataType
:
"
json
"
,
method
:
"
POST
"
,
method
:
"
POST
"
,
data
:
{
data
:
{
token
:
portalUser
.
token
,
token
:
this
.
portalUser
.
token
,
f
:
"
json
"
,
f
:
"
json
"
,
},
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
sectors
=
""
;
var
sectors
=
""
;
$
(
data
.
item
.
tags
).
each
(
function
(
i
,
tag
)
{
$
(
data
.
item
.
tags
).
each
(
function
(
i
,
tag
)
{
if
(
!!
industryTree_apaas_Config
[
tag
])
{
if
(
!!
this
.
industryTree_apaas_Config
[
tag
])
{
sectors
=
industryTree_apaas_Config
[
tag
];
sectors
=
this
.
industryTree_apaas_Config
[
tag
];
return
;
return
;
}
}
});
});
this
.
form
=
{
var
item
=
{
url
:
data
.
item
.
url
,
itemid
:
data
.
item
.
id
,
name
:
data
.
item
.
title
,
name
:
data
.
item
.
title
,
descript
:
data
.
item
.
description
,
desc
:
data
.
item
.
description
,
cover
:
area
:
sectors
,
origin
:
""
,
code
:
"
自动生成
"
,
resource
:
1
,
};
this
.
cover
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/items/
"
+
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/items/
"
+
data
.
item
.
id
+
data
.
item
.
id
+
"
/info/
"
+
"
/info/
"
+
data
.
item
.
thumbnail
+
data
.
item
.
thumbnail
+
"
?token=
"
+
"
?token=
"
+
portalUser
.
token
,
this
.
portalUser
.
token
;
sectors
:
sectors
,
this
.
iportal_id
=
data
.
item
.
id
;
data_service_type2
:
dataTree_apaas_config
[
data
.
item
.
type
],
this
.
serviceUrl
=
data
.
item
.
url
;
};
this
.
portal_data_service_type_2
=
this
.
dataTree_apaas_config
[
data
.
item
.
type
];
console
.
log
(
item
);
console
.
log
(
item
);
},
},
error
:
function
(
err
)
{
error
:
function
(
err
)
{
...
@@ -1016,20 +1040,20 @@ export default {
...
@@ -1016,20 +1040,20 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
this
.
judgeMap
();
this
.
getServiceType1
();
this
.
getArea
();
window
.
addEventListener
(
window
.
addEventListener
(
"
message
"
,
"
message
"
,
function
(
event
)
{
function
(
event
)
{
console
.
log
(
event
);
if
(
event
.
data
&&
event
.
data
.
cmd
==
"
getPortalUser
"
)
{
if
(
event
.
data
&&
event
.
data
.
cmd
==
"
getPortalUser
"
)
{
portalUser
=
event
.
data
.
params
;
this
.
portalUser
=
event
.
data
.
params
;
getItemInfo
(
"
86fd0d2e89854cb293d287efd2142acd
"
);
this
.
portal_status
=
true
;
//addPortalItem();
}
}
},
},
false
false
);
);
this
.
judgeMap
();
this
.
getServiceType1
();
this
.
getArea
();
},
},
};
};
</
script
>
</
script
>
...
...
src/services/helper.js
View file @
23b8f1eb
...
@@ -85,3 +85,18 @@ module.exports.CreationDateDesc = function (timestamp) {
...
@@ -85,3 +85,18 @@ module.exports.CreationDateDesc = function (timestamp) {
timeZone
:
"
Asia/Shanghai
"
timeZone
:
"
Asia/Shanghai
"
});
});
}
}
module
.
exports
.
getQueryString
=
function
(
name
,
url
)
{
let
search
=
url
.
substr
(
url
.
indexOf
(
"
?
"
));
console
.
log
(
search
)
let
theRequest
=
new
Object
();
if
(
search
.
indexOf
(
"
?
"
)
!=
-
1
)
{
let
str
=
search
.
substr
(
1
);
strs
=
str
.
split
(
"
&
"
);
console
.
log
(
strs
)
for
(
let
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
theRequest
[
strs
[
i
].
split
(
"
=
"
)[
0
]]
=
unescape
(
strs
[
i
].
split
(
"
=
"
)[
1
]);
}
}
return
theRequest
[
name
];
}
\ No newline at end of file
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