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
Email Patches
Plain Diff
Browse Files
Authored by
wangtao
3 years ago
Commit
6cea700e1775cc09627c88a836d3b7ce261cdcf9
1 parent
b30a8f15
系统配置;第三方授权优化
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
30 deletions
hg-monitor-web-base/src/main/resources/static/vue3/src/views/systemConf/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/systemConf/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/views/thirdSet/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/thirdSet/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/views/systemConf/index.html
View file @
6cea700
...
...
@@ -17,21 +17,19 @@
<div
class=
"search-table"
style=
"margin-top: 6px"
>
<cm-table-page
:columns=
"columns"
:dataList=
"tableDataList"
:height=
"(height - 130)"
:loading=
"false"
:pageSize=
"pageSize"
:showBorder=
"true"
:showIndex=
"true"
:showPage=
"true"
:showSelection=
"true"
:showTools=
"true"
:total=
"count"
@
loaddata=
"loadTableDataList"
>
:showIndex=
"true"
:showPage=
"true"
:showSelection=
"false"
:showTools=
"true"
:total=
"count"
@
loaddata=
"loadTableDataList"
:toolsWith=
"120"
>
<template
#
default=
"{row,prop,column}"
>
<div
v-if=
"prop == 'type'"
>
<div
v-if=
"row.type == 'img'"
>
<el-tag>
图片
</el-tag>
</div>
<div
v-if=
"row.type == 'file'"
>
<el-tag>
文件
</el-tag>
</div>
<el-tag>
{{row.type == 'img' ? '图片' : '文件'}}
</el-tag>
</div>
<div
v-if=
"prop == 'img'"
>
<div
v-if=
"row.type == 'img'"
>
<el-image
style=
"width: 60px; height: 60px;border-radius: 10px;"
:src=
"domainName+row.code"
/>
</div>
<div
v-if=
"prop == 'img' && row.type == 'img'"
>
<el-image
style=
"width: 50%; height: 50%;border-radius: 10px;"
:src=
"domainName+row.code"
:preview-src-list=
"[domainName+row.code]"
:initial-index=
"1"
:z-index=
"99999999999999"
:preview-teleported=
"true"
fit=
"cover"
/>
</div>
</template>
<template
#
tools=
"{scope}"
>
...
...
@@ -53,7 +51,7 @@
</div>
<!--新增编辑弹框-->
<cm-dialog
:showDialogVisible=
"cacheVisible"
:showFooter=
"false"
:title=
"titleName"
@
hidedialog=
"cancelBtn"
<cm-dialog
:showDialogVisible=
"cacheVisible"
:showFooter=
"false"
:title=
"titleName
== 'add' ? '新增配置' : '编辑配置'
"
@
hidedialog=
"cancelBtn"
width=
"500px"
>
<template
v-slot
>
<div
style=
"padding-right: 20px"
>
...
...
@@ -68,7 +66,7 @@
<el-input
:size=
"$global.elementConfig.size.input"
placeholder=
"请输入名称"
clearable
v-model=
"fileFrom.name"
></el-input>
</el-form-item>
<el-form-item
label=
"编码"
prop=
"code"
>
<el-input
:size=
"$global.elementConfig.size.input"
placeholder=
"请输入编码"
clearable
v-model=
"fileFrom.code"
></el-input>
<el-input
:size=
"$global.elementConfig.size.input"
:disabled=
"titleName == 'edit'"
placeholder=
"请输入编码"
clearable
v-model=
"fileFrom.code"
></el-input>
</el-form-item>
<el-form-item
label=
"分组"
prop=
"groupId"
>
<el-input
:size=
"$global.elementConfig.size.input"
placeholder=
"请输入组Id"
clearable
v-model=
"fileFrom.groupId"
></el-input>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/systemConf/index.js
View file @
6cea700
...
...
@@ -41,6 +41,14 @@ export default {
prop
:
'name'
,
label
:
'名称'
,
sortable
:
true
,
width
:
'150'
,
align
:
'center'
},
{
prop
:
'code'
,
label
:
'编码'
,
sortable
:
true
,
width
:
'150'
,
align
:
'center'
},
{
...
...
@@ -48,14 +56,14 @@ export default {
label
:
'类型'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
20
0'
width
:
'
7
0'
},
{
prop
:
'groupId'
,
label
:
'分组'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
20
0'
width
:
'
15
0'
},
{
prop
:
'img'
,
...
...
@@ -69,7 +77,7 @@ export default {
label
:
'创建时间'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
23
0'
width
:
'
17
0'
}
])
let
activeName
=
Vue
.
ref
(
'default'
);
...
...
@@ -91,7 +99,7 @@ export default {
});
//上传完后的图片预览
let
imageUrl
=
Vue
.
ref
(
''
);
let
titleName
=
Vue
.
ref
(
'
新增
'
);
let
titleName
=
Vue
.
ref
(
'
add
'
);
let
tableDataList
=
Vue
.
ref
([]);
let
isAdd
=
Vue
.
ref
(
true
);
let
beforeAvatarUpload
=
(
file
)
=>
{
...
...
@@ -151,7 +159,7 @@ export default {
let
cacheVisible
=
Vue
.
ref
(
false
);
let
openAddFile
=
()
=>
{
titleName
.
value
=
'
新增
'
;
titleName
.
value
=
'
add
'
;
fileFrom
.
value
=
{
id
:
''
,
pid
:
''
,
...
...
@@ -172,7 +180,7 @@ export default {
}
//修改
let
handleUpdate
=
(
row
)
=>
{
titleName
.
value
=
'
修改
'
;
titleName
.
value
=
'
edit
'
;
cacheVisible
.
value
=
true
;
fileFrom
.
value
=
row
;
isAdd
.
value
=
false
;
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/thirdSet/index.html
View file @
6cea700
...
...
@@ -13,16 +13,23 @@
<div
class=
"search-table"
>
<el-table
:data=
"tableData"
style=
"width: 100%;margin: 0px 0px;
font-size:13.5px;
"
style=
"width: 100%;margin: 0px 0px;"
row-key=
"id"
border
:tree-props=
"{ children: 'authorizeList'}"
header-row-class-name=
"tbl-header-class"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"80"
/>
<el-table-column
prop=
"name"
label=
"第三方系统"
sortable=
true
align=
"center"
width=
"350"
/>
<el-table-column
prop=
"detail"
label=
"系统请求地址"
sortable=
true
align=
"center"
width=
"470"
/>
<el-table-column
prop=
"nickName"
label=
"授权用户"
sortable=
true
align=
"center"
width=
"250"
/>
:tree-props=
"{ children: 'children'}"
header-row-class-name=
"tbl-header-class"
>
<el-table-column
prop=
"name"
label=
"第三方系统"
sortable=
true
align=
"center"
width=
"350"
>
<template
#
default=
"scope"
>
<el-tag
effect=
"light"
v-if=
"scope.row.type == 'user'"
>
<i
class=
"iconfont icon-haoyou"
/>
{{scope.row.name}}
</el-tag>
<el-tag
effect=
"light"
v-if=
"scope.row.type == 'role'"
>
<i
class=
"iconfont icon-jiaoseguanli"
/>
{{scope.row.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column
prop=
"detail"
label=
"系统请求地址"
sortable=
true
align=
"center"
/>
<el-table-column
prop=
"sort"
label=
"排序"
sortable=
true
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"createTime"
label=
"创建时间"
sortable=
true
align=
"center"
width=
"300"
/>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"150"
align=
"center"
>
...
...
@@ -41,11 +48,12 @@
</template>
</el-table-column>
</el-table>
</div>
<cm-userright
:isUser=
"false"
:buttonTexts=
"['删除', '添加']"
:showDialogVisible=
"showUserDialogVisible"
:titles=
"['所有用户', '已添加用户']"
:userArr=
"userList"
:selectedArr=
"userFileRight"
@
callback=
"selectUser"
@
hideDialog=
"showUserDialog"
:showOrg=
"false"
:showGroup=
"false"
:selectedArr=
"userFileRight"
@
callback=
"selectUser"
@
hideDialog=
"showUserDialog"
:showOrg=
"false"
:showGroup=
"false"
title=
"选择用户"
></cm-userright>
</div>
</div>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/thirdSet/index.js
View file @
6cea700
...
...
@@ -55,6 +55,23 @@ export default {
tableData
.
value
=
res
.
data
;
tableData
.
value
.
forEach
(
function
(
e
)
{
let
report
=
{}
let
authUser
=
e
.
authorizeList
;
let
authRole
=
e
.
authorizeRoleList
;
let
children
=
[];
if
(
authUser
){
authUser
.
forEach
((
v
)
=>
{
children
.
push
({
id
:
v
.
id
,
type
:
'user'
,
name
:
v
.
nickName
,
code
:
v
.
userName
});
})
}
if
(
authRole
){
authRole
.
forEach
((
v
)
=>
{
children
.
push
({
id
:
v
.
id
,
type
:
'role'
,
name
:
v
.
roleName
,
code
:
v
.
id
});
})
}
e
.
children
=
children
;
report
.
label
=
e
.
name
;
report
.
value
=
e
.
id
;
options
.
value
.
push
(
report
)
...
...
@@ -117,7 +134,7 @@ export default {
proxy
.
$global
.
showMsg
(
'授权成功'
,
'success'
);
getDetailList
();
}
else
{
proxy
.
$global
.
showMsg
(
res
.
msg
,
'warning'
);
proxy
.
$global
.
showMsg
(
res
.
msg
?
res
.
msg
:
'授权失败'
,
'warning'
);
}
})
}
...
...
Please
register
or
login
to post a comment