From 6c920885a9bc407f2f05e204ae9769631c4c80e7 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 22 Dec 2021 15:02:56 +0800
Subject: [PATCH] 20211216

---
 src/main/resources/templates/febs/views/video/video/video-source-list.html |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/main/resources/templates/febs/views/video/video/video-source-list.html b/src/main/resources/templates/febs/views/video/video/video-source-list.html
index 0d4d2bd..f66029b 100644
--- a/src/main/resources/templates/febs/views/video/video/video-source-list.html
+++ b/src/main/resources/templates/febs/views/video/video/video-source-list.html
@@ -35,6 +35,14 @@
         </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> 无权限
@@ -113,7 +121,7 @@
                 layEvent = obj.event;
             if (layEvent === 'del') {
                 febs.modal.confirm('删除资源', '确定删除该资源?', function () {
-                    deleteUsers(data.userId);
+                    deleteUsers(data.id);
                 });
             }
             if (layEvent === 'edit') {
@@ -163,6 +171,7 @@
                 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}
                 ]]
@@ -176,13 +185,8 @@
             };
         }
 
-        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();
             });

--
Gitblit v1.9.1