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
604fcadd47f9187c2d022158a8500582ee9a9061
1 parent
5391743f
用户管理,资源授权优化
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/userIndex.js
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/user/index.html
hg-monitor-web-base/src/main/resources/static/src/controller/userIndex.js
View file @
604fcad
...
...
@@ -1105,7 +1105,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
type
:
1
,
area
:
[
'90%'
,
'80%'
],
resize
:
false
,
btn
:
[
'
确定'
,
'取消
'
],
btn
:
[
'
关闭
'
],
content
:
laytpl
(
$
(
'#userResourceAuthorization'
).
html
()).
render
(
JSON
.
stringify
({})),
success
:
function
(
index
,
layero
)
{
renderResAuthByUser
(
usernames
[
0
])
...
...
@@ -1121,31 +1121,31 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
})
},
yes
:
function
(
index
,
layero
){
//获取表格中的数据
var
$showTypeSelect
=
$
(
'#res_user_table'
).
next
().
find
(
'.user_showType'
);
var
resIds
=
""
;
$
.
each
(
$showTypeSelect
,
function
(
i
,
v
)
{
var
redis
=
$
(
this
).
attr
(
"data-resId"
);
var
showType
=
$
(
this
).
val
();
var
username
=
$
(
this
).
attr
(
"data-username"
);
resIds
+=
(
username
+
'##'
+
redis
+
'##'
+
showType
+
','
);
});
if
(
resIds
.
length
>
0
){
resIds
[
resIds
.
length
-
1
]
=
resIds
[
resIds
.
length
-
1
].
substring
(
0
,
resIds
[
resIds
.
length
-
1
].
length
-
1
);
}
//保存数据到资源用户表中
admin
.
req
({
url
:
common
.
domainName
+
'/api-web/sysUserToResType/resourceSave'
,
data
:{
ids
:
resIds
}
}).
done
(
function
(
res
)
{
if
(
res
.
success
){
layer
.
msg
(
'保存成功!'
,
{
icon
:
1
,
time
:
3000
});
}
else
{
layer
.
msg
(
'保存失败!'
,
{
icon
:
7
,
time
:
3000
});
}
});
// //获取表格中的数据
// var $showTypeSelect= $('#res_user_table').next().find('.user_showType');
// var resIds="";
// $.each($showTypeSelect,function (i,v) {
// var redis = $(this).attr("data-resId");
// var showType = $(this).val();
// var username = $(this).attr("data-username");
// resIds+=(username+'##'+redis+'##'+showType+',');
// });
// if(resIds.length>0){
// resIds[resIds.length-1]=resIds[resIds.length-1].substring(0,resIds[resIds.length-1].length-1);
// }
// //保存数据到资源用户表中
// admin.req({
// url:common.domainName + '/api-web/sysUserToResType/resourceSave'
// , data:{
// ids:resIds
// }
// }).done(function (res) {
// if(res.success){
// layer.msg('保存成功!', {icon: 1, time: 3000});
// }else{
// layer.msg('保存失败!', {icon: 7, time: 3000});
// }
// });
layer
.
close
(
index
);
//如果设定了yes回调,需进行手工关闭
}
});
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/user/index.html
View file @
604fcad
...
...
@@ -25,7 +25,7 @@
<select
class=
"form-control input-sm"
name=
"enabled"
lay-filter=
"enabled"
>
<option
value=
""
>
=状态=
</option>
<option
value=
"1"
>
正常
</option>
<option
value=
"0"
>
禁用
</option>
<option
value=
"0"
>
冻结
</option>
</select>
</div>
</div>
...
...
Please
register
or
login
to post a comment