Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
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
赵啸非
smart_gov_platform
Commits
fe722845
Commit
fe722845
authored
Dec 18, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 站点模块添加admin右键查看跳转信息
parent
9bc51810
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
13 deletions
+107
-13
portal-manager-ui/admin/src/main.js
portal-manager-ui/admin/src/main.js
+0
-2
portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue
...al-manager-ui/admin/src/views/siteArrange/siteArrange.vue
+99
-10
portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue
...tformIsSet/components/permissionsModel/userManagement.vue
+8
-1
No files found.
portal-manager-ui/admin/src/main.js
View file @
fe722845
...
...
@@ -19,8 +19,6 @@ Vue.use(GlobalComponents);
import
common
from
"
./utils/commin
"
;
Vue
.
use
(
common
);
import
VScaleScreen
from
"
v-scale-screen
"
;
Vue
.
use
(
VScaleScreen
);
// 公共样式
import
"
@/assets/css/normalize.css
"
;
import
"
@/assets/css/reset.css
"
;
...
...
portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue
View file @
fe722845
...
...
@@ -45,7 +45,11 @@
v-for=
"(v, i) in collectList"
:key=
"'' + v.id + i"
>
<div
class=
"item-logo cursor-pointer"
@
click=
"openWindow(v)"
>
<div
class=
"item-logo cursor-pointer"
@
click=
"openWindow($event, v, 'click')"
@
contextmenu=
"openWindow($event, v)"
>
<img
class=
"w-full h-full object-contain"
:src=
"api + v.modelIcon"
...
...
@@ -91,7 +95,11 @@
v-for=
"item in v.list"
:key=
"item.id"
>
<div
class=
"item-logo cursor-pointer"
@
click=
"openWindow(item)"
>
<div
class=
"item-logo cursor-pointer"
@
click=
"openWindow(($event, item, 'click'))"
@
contextmenu=
"openWindow($event, item)"
>
<img
class=
"w-full h-full object-contain"
:src=
"api + item.modelIcon"
...
...
@@ -157,7 +165,8 @@ export default {
this
.
siteModelList
=
data
;
}
},
openWindow
(
row
)
{
async
openWindow
(
event
,
row
,
type
)
{
let
_this
=
this
;
let
siteid
=
Storage
.
get
(
2
,
"
siteId
"
)
||
0
;
let
siteName
=
Storage
.
get
(
2
,
"
siteName
"
)
||
""
;
let
userInfo
=
JSON
.
stringify
({
...
...
@@ -167,12 +176,42 @@ export default {
let
{
modelUrl
,
modelName
,
modelIcon
}
=
row
;
let
path
=
this
.
$route
.
path
;
modelName
=
encodeURI
(
modelName
);
window
.
open
(
`
${
modelUrl
}
?token=
${
this
.
token
}
&siteid=
${
siteid
}
&siteName=
${
encodeURI
(
siteName
)}
&userInfo=
${
userInfo
}
&sysName=
${
modelName
}
&sysLogo=
${
modelIcon
}
&path=
${
path
}
`
,
"
_blank
"
);
let
params
=
`?token=
${
this
.
token
}
&siteid=
${
siteid
}
&siteName=
${
encodeURI
(
siteName
)}
&userInfo=
${
userInfo
}
&sysName=
${
modelName
}
&sysLogo=
${
modelIcon
}
&path=
${
path
}
`
;
if
(
type
===
"
click
"
)
{
window
.
open
(
`
${
modelUrl
}${
params
}
`
,
"
_blank
"
);
return
;
}
if
(
this
.
userData
.
admin
||
this
.
userData
.
id
==
1
)
{
event
.
preventDefault
();
let
redirectUrl
=
""
;
let
redirect
=
await
this
.
getFinalRedirect
(
modelUrl
);
if
(
redirect
)
{
redirectUrl
=
redirect
;
}
else
{
redirectUrl
=
modelUrl
;
}
this
.
$notification
.
open
({
message
:
"
跳转链接
"
,
key
:
1
,
duration
:
null
,
description
:
(
<
div
>
<
div
class
=
"
notif-name
"
>
完整链接:
<
/div
>
<
div
id
=
"
FullUrl
"
>
{
redirectUrl
+
params
}
<
/div
>
<
div
class
=
"
notif-name
"
>
链接参数:
<
/div
>
<
div
id
=
"
Params
"
>
{
params
}
<
/div
>
<
/div
>
),
style
:
{
"
word-break
"
:
"
break-all
"
,
},
onClick
:
_this
.
copyContent
,
icon
:
<
a
-
icon
type
=
"
smile
"
style
=
"
color: #108ee9
"
/>
,
});
}
},
handleJoin
()
{
...
...
@@ -230,15 +269,65 @@ export default {
}
return
false
;
},
// 复制链接内容
copyContent
(
dom
)
{
let
target
=
dom
.
target
.
id
;
if
(
target
===
"
FullUrl
"
)
{
this
.
copy
(
"
FullUrl
"
);
}
else
if
(
target
===
"
Params
"
)
{
this
.
copy
(
"
Params
"
);
}
},
copy
(
element
)
{
let
_this
=
this
;
let
dom
=
document
.
getElementById
(
element
);
let
textToCopy
=
dom
.
innerText
;
// let range = document.createRange();
// range.selectNodeContents(dom);
// let selection = window.getSelection();
// selection.removeAllRanges();
// selection.addRange(range);
navigator
.
clipboard
.
writeText
(
textToCopy
)
.
then
(
function
()
{
_this
.
$message
.
success
(
"
复制成功
"
);
})
.
catch
(
function
(
err
)
{
_this
.
$message
.
error
(
"
复制失败
"
);
});
},
// 获取重定向地址
getFinalRedirect
(
url
)
{
return
fetch
(
url
,
{
method
:
"
GET
"
,
redirect
:
"
follow
"
})
.
then
((
response
)
=>
{
if
(
!
response
.
ok
)
{
throw
new
Error
(
"
Network response was not ok
"
);
}
return
response
.
url
;
})
.
catch
((
error
)
=>
{
console
.
error
(
"
Error:
"
,
error
);
return
null
;
});
},
},
};
</
script
>
<
style
>
.notif-name
{
font-size
:
14px
;
font-weight
:
600
;
}
</
style
>
<
style
lang=
"less"
scoped
>
.station {
background: url("@/assets/images/siteArrange/bg_2.png") no-repeat;
background-size: 100% 100%;
overflow: hidden;
.del-box {
width: 100%;
height: 150px;
...
...
portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue
View file @
fe722845
...
...
@@ -21,6 +21,7 @@
v-model=
"userform.searchVal"
style=
"width: 250px"
placeholder=
"请输入关键字搜索"
@
pressEnter=
"handleSearch"
>
<a-icon
slot=
"prefix"
type=
"search"
/>
</a-input>
...
...
@@ -36,7 +37,7 @@
>
{{
v
}}
</a-select-option
>
</a-select>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"
getUserList
"
<a-button
type=
"primary"
class=
"addclass"
@
click=
"
handleSearch
"
>
搜索
</a-button
>
<a-button
@
click=
"resetList"
>
重置
</a-button>
...
...
@@ -202,6 +203,12 @@ export default {
this
.
getUserList
();
},
// 搜索
handleSearch
()
{
this
.
tablePagination
.
current
=
1
;
this
.
getUserList
();
},
// 获取用户列表
async
getUserList
()
{
this
.
tableLoading
=
true
;
...
...
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