若依3.2

This commit is contained in:
RuoYi
2019-01-16 14:56:27 +08:00
parent 04f2607398
commit 57fa243747
36 changed files with 1750 additions and 6685 deletions

View File

@@ -100,12 +100,12 @@
sortable: true
},
{
field: 'status',
title: '状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
visible: editFlag == 'hidden' ? false : true,
title: '角色状态',
align: 'center',
formatter: function (value, row, index) {
return statusTools(row);
}
},
{
field: 'createTime',
@@ -127,11 +127,34 @@
$.table.init(options);
});
/*角色管理-分配数据权限*/
/* 角色管理-分配数据权限 */
function rule(roleId) {
var url = prefix + '/rule/' + roleId;
$.modal.open("分配数据权限", url);
}
/* 角色状态显示 */
function statusTools(row) {
if (row.status == 1) {
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.roleId + '\')"></i> ';
} else {
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.roleId + '\')"></i> ';
}
}
/* 角色管理-停用 */
function disable(roleId) {
$.modal.confirm("确认要停用角色吗?", function() {
$.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 1 });
})
}
/* 角色管理启用 */
function enable(roleId) {
$.modal.confirm("确认要启用角色吗?", function() {
$.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 0 });
})
}
</script>
</body>
</html>