Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
王涛
3 years ago
Commit
3468d34a7cd7375e10e746971618640e4779eda0
2 parents
fce662ad
4572d530
Merge branch 'master-V32-XuHaoJie' into 'master'
杭州-乙方运维-资产类型静态变动态 See merge request
!82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
20 deletions
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/user/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/operationMaintenance/user/index.js
View file @
3468d34
...
...
@@ -8,19 +8,23 @@ const assets = (props, {attrs, slots, emit}) => {
});
// 类型 bastion 堡垒机,dam 防水坝,virtual 虚拟桌面
let
icon
=
{
bastion
:
{
name
:
'堡垒机'
,
icon
:
'icon-baoleiji'
},
dam
:
{
name
:
'防水坝'
,
icon
:
'icon-shuiba2'
},
virtual
:
{
name
:
'虚拟桌面'
,
icon
:
'icon-xunizhuomian'
},
let
icon
=
Vue
.
ref
({});
//查询资产类型列表
let
getAssetType
=
()
=>
{
proxy
.
$http
.
post
(
`
/
api
-
web
/
manage
/
ddic
/
findSucDdics
/
OPS_SECOND_PROPERTY
`
,
{},
function
(
res
)
{
if
(
res
&&
res
.
data
.
length
>
0
)
{
icon
.
value
=
{};
res
.
data
.
forEach
(
function
(
item
,
index
,
arr
){
let
code
=
item
.
ddicCode
;
let
obj
=
{};
code
=
code
.
substring
(
code
.
lastIndexOf
(
"_"
)
+
1
,
code
.
length
).
toLowerCase
();
obj
.
name
=
item
.
ddicName
;
obj
.
icon
=
item
.
ddicDesc
;
icon
.
value
[
code
]
=
obj
;
});
}
});
}
// 查询列表
...
...
@@ -166,7 +170,6 @@ const assets = (props, {attrs, slots, emit}) => {
}
return
{
icon
,
getAssets
,
assetsMaps
,
addAssets
,
...
...
@@ -177,7 +180,9 @@ const assets = (props, {attrs, slots, emit}) => {
okFunc
,
btnClick
,
btnType
,
assetsAdd
assetsAdd
,
getAssetType
,
icon
}
}
...
...
@@ -288,7 +293,6 @@ export default {
}
const
{
icon
,
getAssets
,
assetsMaps
,
addAssets
,
...
...
@@ -299,17 +303,21 @@ export default {
okFunc
,
btnClick
,
btnType
,
assetsAdd
assetsAdd
,
getAssetType
,
icon
}
=
assets
(
props
,
{
attrs
,
slots
,
emit
});
// // 挂载完
Vue
.
onMounted
(()
=>
{
getAssetType
();
getPage
();
getAssets
();
})
// 监听编辑状态
Vue
.
watch
(()
=>
props
.
projectId
,
(
newValue
,
oldVlaue
)
=>
{
getAssetType
();
getPage
();
getAssets
();
});
...
...
@@ -320,8 +328,6 @@ export default {
getFile
,
beforeAvatarUpload
,
isAdmin
,
// 资产属性
icon
,
getAssets
,
assetsMaps
,
addAssets
,
...
...
@@ -332,7 +338,10 @@ export default {
okFunc
,
btnClick
,
btnType
,
assetsAdd
assetsAdd
,
getAssetType
,
// 资产属性
icon
,
}
}
}
...
...
Please
register
or
login
to post a comment