Commit 8e490143 by 胡悦

添加角色tips

1 parent 84e3c03d
...@@ -28,6 +28,17 @@ ...@@ -28,6 +28,17 @@
.show { .show {
display: inline-block; display: inline-block;
} }
.role-tips {
display: inline-flex;
align-items: center;
}
.role-tips i {
margin-left: 4px;
font-size: 16px;
color: #5850FF;
}
</style> </style>
<body> <body>
...@@ -108,7 +119,7 @@ ...@@ -108,7 +119,7 @@
var cols = [ var cols = [
//表头 //表头
{ field: '', title: '序号', type: 'numbers', width: 60 }, { field: '', title: '序号', type: 'numbers', width: 60 },
{ field: 'roleName', title: '角色名称', align: 'center' }, { field: 'roleName', title: '角色名称', align: 'center', templet: '#roleTpl' },
{ field: 'roleCode', title: '角色号', align: 'center' }, { field: 'roleCode', title: '角色号', align: 'center' },
{ field: 'merchantName', title: '所属商户名', align: 'center' }, { field: 'merchantName', title: '所属商户名', align: 'center' },
{ field: 'statusName', title: '状态', align: 'center', width: 100 }, { field: 'statusName', title: '状态', align: 'center', width: 100 },
...@@ -117,7 +128,7 @@ ...@@ -117,7 +128,7 @@
] ]
var colums = [ var colums = [
{ field: '', title: '序号', type: 'numbers', width: 60 }, { field: '', title: '序号', type: 'numbers', width: 60 },
{ field: 'roleName', title: '角色名称', align: 'center' }, { field: 'roleName', title: '角色名称', align: 'center', templet: '#roleTpl' },
{ field: 'roleCode', title: '角色号', align: 'center' }, { field: 'roleCode', title: '角色号', align: 'center' },
{ field: 'statusName', title: '状态', align: 'center' }, { field: 'statusName', title: '状态', align: 'center' },
{ field: 'createdTime', title: '创建时间', align: 'center' }, { field: 'createdTime', title: '创建时间', align: 'center' },
...@@ -129,7 +140,37 @@ ...@@ -129,7 +140,37 @@
elem: '#roleTable', elem: '#roleTable',
skin: 'nob', skin: 'nob',
height: 'full-300', height: 'full-300',
cols: accountInfo && accountInfo.merchantAccountLevel == 4 ? [colums] : [cols] cols: accountInfo && accountInfo.merchantAccountLevel == 4 ? [colums] : [cols],
done: function (res, curr, count) {
$('#roleDj').hover(function (e) {
layer.tips(
'<span style="color:#333333;font-size: 14px;font-weight: 400;">此角色拥有嘀加智享车生活和精品升级的管理员权限。</span>',
this,
{
tips: [4, '#fff'],
time: 0,
}
)
},
function () {
// 鼠标移出
layer.closeAll()
})
$('#roleGl').hover(function (e) {
layer.tips(
'<span style="color:#333333;font-size: 14px;font-weight: 400;">此角色拥有账户中心所有产品的管理员权限。</span>',
this,
{
tips: [4, '#fff'],
time: 0,
}
)
},
function () {
// 鼠标移出
layer.closeAll()
})
}
}) })
...@@ -259,6 +300,7 @@ ...@@ -259,6 +300,7 @@
getTabelList(roleTable) getTabelList(roleTable)
return false return false
}) })
}) })
</script> </script>
<script type="text/html" id="roleBar"> <script type="text/html" id="roleBar">
...@@ -270,6 +312,16 @@ ...@@ -270,6 +312,16 @@
<a class="layui-btn-xs" lay-event="del">删除</a> <a class="layui-btn-xs" lay-event="del">删除</a>
{{# } }} {{# } }}
</script> </script>
<script type="text/html" id="roleTpl">
<span class="role-tips">{{d.roleName}}
{{# if(d.roleName == 'D+智享管理员') { }}
<i class="layui-icon layui-icon-about" id="roleDj"></i>
{{# } }}
{{# if(d.roleName == '广联总管理员') { }}
<i class="layui-icon layui-icon-about" id="roleGl"></i>
{{# } }}
</span>
</script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!