| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .layui-table-cell { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | <script type="text/html" id="thumbFormat"> |
| | | <img src="{{d.thumb}}" /> |
| | | </script> |
| | | <script type="text/html" id="source-option"> |
| | | <span shiro:lacksPermission="source:update,source:delete"> |
| | | <span class="layui-badge-dot febs-bg-orange"></span> 无权限 |
| | |
| | | layEvent = obj.event; |
| | | if (layEvent === 'del') { |
| | | febs.modal.confirm('删除资源', '确定删除该资源?', function () { |
| | | deleteUsers(data.userId); |
| | | deleteUsers(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'edit') { |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'name', title: '视频名称', minWidth: 100}, |
| | | {templet: '#thumbFormat', title: '缩略图', minWidth: 100}, |
| | | {field: 'createdTime', title: '创建时间', minWidth: 180, sort: true}, |
| | | {title: '操作', toolbar: '#source-option', minWidth: 140} |
| | | ]] |
| | |
| | | }; |
| | | } |
| | | |
| | | function deleteUsers(userIds) { |
| | | var currentUserId = currentUser.userId + ''; |
| | | if (('' + userIds).split(',').indexOf(currentUserId) !== -1) { |
| | | febs.alert.warn('所选资源包含当前登录资源,无法删除'); |
| | | return; |
| | | } |
| | | febs.get(ctx + 'user/delete/' + userIds, null, function () { |
| | | function deleteUsers(ids) { |
| | | febs.get(ctx + 'video/source/delete/' + ids, null, function () { |
| | | febs.alert.success('删除资源成功'); |
| | | $query.click(); |
| | | }); |