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
9efd7f9f
Commit
9efd7f9f
authored
Aug 05, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portal
parent
d8175be0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
src/pages/workbench/fwzc_fwcs.vue
src/pages/workbench/fwzc_fwcs.vue
+31
-29
src/services/helper.js
src/services/helper.js
+0
-2
No files found.
src/pages/workbench/fwzc_fwcs.vue
View file @
9efd7f9f
...
...
@@ -570,7 +570,6 @@ export default {
T009
:
"
28
"
,
T010
:
"
29
"
,
},
portal_status
:
true
,
portal_data_service_type_2
:
""
,
};
},
...
...
@@ -750,9 +749,9 @@ export default {
this
.
$message
.
error
(
"
请完善返回参数信息中的字段名称
"
);
}
}
else
if
(
this
.
activeBtn
==
1
)
{
if
(
this
.
portal
_status
)
{
if
(
this
.
portal
User
.
username
&&
this
.
portalUser
.
username
!=
""
)
{
let
value
=
helper
.
getQueryString
(
"
id
"
,
this
.
serviceUrl
);
if
(
value
!=
""
)
{
if
(
value
&&
value
!=
""
)
{
this
.
getItemInfo
(
value
);
}
else
{
this
.
addPortalItem
();
...
...
@@ -933,27 +932,28 @@ export default {
},
addPortalItem
()
{
console
.
log
(
"
添加portal
"
);
let
self
=
this
;
//添加服务到portal
let
url
=
"
https://apaasgis.wodcloud.com/portal//portal/sharing/rest/content/users/
"
+
this
.
portalUser
.
username
+
self
.
portalUser
.
username
+
"
/addItem
"
;
let
data
=
{
f
:
"
json
"
,
tags
:
this
.
industryTree_apaas_Config
[
"
1
"
],
tags
:
self
.
industryTree_apaas_Config
[
"
1
"
],
title
:
"
测试添加服务5
"
,
url
:
"
https://apaasgis.wodcloud.com/server/rest/services/GZ_FJXQZTT/FeatureServer
"
,
type
:
this
.
dataTree_apaas_config
[
"
19
"
],
token
:
this
.
portalUser
.
token
,
type
:
self
.
dataTree_apaas_config
[
"
19
"
],
token
:
self
.
portalUser
.
token
,
};
this
.
$http
.
post
(
url
,
data
)
self
.
$http
.
post
(
url
,
data
,
{
emulateJSON
:
true
}
)
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
shareItem
(
response
.
data
.
id
);
self
.
shareItem
(
response
.
data
.
id
);
}
else
{
this
.
$message
({
self
.
$message
({
message
:
`删除失败`
,
type
:
"
warning
"
,
});
...
...
@@ -961,7 +961,7 @@ export default {
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
this
.
$message
({
self
.
$message
({
message
:
`添加专题图到Portal中失败,
${
error
}
`
,
type
:
"
warning
"
,
});
...
...
@@ -969,19 +969,20 @@ export default {
},
shareItem
(
itemid
)
{
console
.
log
(
`共享portal
${
itemid
}
`
);
let
self
=
this
;
let
searchUrl
=
"
https://apaasgis.wodcloud.com/portal//portal/sharing/rest/content/users/
"
+
this
.
portalUser
.
username
+
self
.
portalUser
.
username
+
"
/shareItems
"
;
let
data
=
{
items
:
itemid
,
everyone
:
true
,
token
:
this
.
portalUser
.
token
,
token
:
self
.
portalUser
.
token
,
f
:
"
json
"
,
groups
:
null
,
};
this
.
$http
.
post
(
searchUrl
,
data
)
self
.
$http
.
post
(
searchUrl
,
data
,
{
emulateJSON
:
true
}
)
.
then
((
response
)
=>
{
console
.
log
(
response
);
})
...
...
@@ -991,28 +992,30 @@ export default {
},
getItemInfo
(
itemid
)
{
console
.
log
(
`获取portal参数
${
itemid
}
`
);
let
self
=
this
;
console
.
log
(
self
.
portalUser
)
let
searchUrl
=
"
https://apaasgis.wodcloud.com/portal//portal/sharing/rest/content/users/
"
+
this
.
portalUser
.
username
+
self
.
portalUser
.
username
+
"
/items/
"
+
itemid
;
let
data
=
{
token
:
this
.
portalUser
.
token
,
token
:
self
.
portalUser
.
token
,
f
:
"
json
"
,
};
this
.
$http
.
post
(
searchUrl
,
data
)
self
.
$http
.
post
(
searchUrl
,
data
,
{
emulateJSON
:
true
}
)
.
then
((
response
)
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
success
==
1
)
{
var
sectors
=
""
;
$
(
data
.
item
.
tags
).
each
(
function
(
i
,
tag
)
{
if
(
!!
this
.
industryTree_apaas_Config
[
tag
])
{
sectors
=
this
.
industryTree_apaas_Config
[
tag
];
if
(
!!
self
.
industryTree_apaas_Config
[
tag
])
{
sectors
=
self
.
industryTree_apaas_Config
[
tag
];
return
;
}
});
this
.
form
=
{
self
.
form
=
{
name
:
data
.
item
.
title
,
desc
:
data
.
item
.
description
,
area
:
sectors
,
...
...
@@ -1020,16 +1023,16 @@ export default {
code
:
"
自动生成
"
,
resource
:
1
,
};
this
.
cover
=
self
.
cover
=
"
https://apaasgis.wodcloud.com/portal/sharing/rest/content/items/
"
+
data
.
item
.
id
+
"
/info/
"
+
data
.
item
.
thumbnail
+
"
?token=
"
+
this
.
portalUser
.
token
;
this
.
iportal_id
=
data
.
item
.
id
;
this
.
serviceUrl
=
data
.
item
.
url
;
this
.
portal_data_service_type_2
=
this
.
dataTree_apaas_config
[
self
.
portalUser
.
token
;
self
.
iportal_id
=
data
.
item
.
id
;
self
.
serviceUrl
=
data
.
item
.
url
;
self
.
portal_data_service_type_2
=
self
.
dataTree_apaas_config
[
data
.
item
.
type
];
}
...
...
@@ -1047,7 +1050,6 @@ export default {
if
(
event
.
data
&&
event
.
data
.
cmd
==
"
getPortalUser
"
)
{
this
.
portalUser
=
event
.
data
.
params
;
console
.
log
(
this
.
portalUser
);
this
.
portal_status
=
true
;
}
},
false
...
...
src/services/helper.js
View file @
9efd7f9f
...
...
@@ -88,12 +88,10 @@ module.exports.CreationDateDesc = function (timestamp) {
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
]);
}
...
...
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