From 317e91ffba072d7cfabb297c3e3ae852d5567e19 Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 26 Mar 2020 20:59:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81table=E8=BD=AC=E5=8D=A1?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/BaseController.php | 1 - view/admin/admin/index.html | 6 +- view/admin/admin_group/index.html | 4 +- view/admin/admin_permission/index.html | 13 ++-- view/admin/common/_require.html | 82 ++++++++++++++++++++++++-- view/admin/file/index.html | 8 +-- view/admin/user/index.html | 6 +- 7 files changed, 95 insertions(+), 25 deletions(-) diff --git a/app/BaseController.php b/app/BaseController.php index 499810c..f0036b1 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -114,7 +114,6 @@ abstract class BaseController $jump_to_url = $jump_to_url; }else{ $jump_to_url = url($jump_to_url); - } } diff --git a/view/admin/admin/index.html b/view/admin/admin/index.html index 6402a47..57d6c83 100644 --- a/view/admin/admin/index.html +++ b/view/admin/admin/index.html @@ -49,7 +49,7 @@ {volist name='$list' id='vo'} - + {$vo.id} {$vo.account} @@ -86,11 +86,11 @@ var item = this; layer.confirm('确定要删除吗?',function(){ $.get('{:url("delete")}',{ - id:$(item).parents('tr').data('id') + id:$(item).parents('.item').data('id') },function(result){ layer.msg('删除成功'); - $(item).parents('tr').remove(); + $(item).parents('.item').remove(); }) }) }) diff --git a/view/admin/admin_group/index.html b/view/admin/admin_group/index.html index 19992b8..2df23a6 100644 --- a/view/admin/admin_group/index.html +++ b/view/admin/admin_group/index.html @@ -45,7 +45,7 @@ {volist name='list' id='vo'} - + {$vo.id} {$vo.name} @@ -77,7 +77,7 @@ layer.confirm('确定要删除吗?',function(){ $.get($(item).data('href'),function(result){ if(result.code == 0){ - $(item).parents('tr').remove(); + $(item).parents('.item').remove(); } layer.msg(result.msg); }) diff --git a/view/admin/admin_permission/index.html b/view/admin/admin_permission/index.html index d5cf0fe..0af88d8 100644 --- a/view/admin/admin_permission/index.html +++ b/view/admin/admin_permission/index.html @@ -93,7 +93,7 @@ value: $(item).data('name') }, function (value, index) { $.post('{:url("AdminPermission/update")}', { - id: $(item).parents('tr').data('id'), + id: $(item).parents('.item').data('id'), name: value }, function (result) { layer.close(index) @@ -107,7 +107,7 @@ value: $(item).data('url') }, function (value, index) { $.post('{:url("AdminPermission/update")}', { - id: $(item).parents('tr').data('id'), + id: $(item).parents('.item').data('id'), url: value }, function (result) { layer.close(index) @@ -120,11 +120,11 @@ var item = this; layer.confirm('确定要删除吗?', function () { $.get('{:url("AdminPermission/delete")}', { - id: $(item).parents('tr').data('id') + id: $(item).parents('.item').data('id') }, function (result) { if (result.code == 0) { layer.msg('删除成功'); - $(item).parents('tr').remove(); + $(item).parents('.item').remove(); } else { layer.msg(result.msg) } @@ -134,14 +134,14 @@ $('.is-log').click(function () { var item = this; - var isLog = $(item).parents('tr').data('is-log') + var isLog = $(item).parents('.item').data('is-log') if (isLog == 0) { isLog = 1 } else { isLog = 0 } $.post('{:url("AdminPermission/update")}', { - id: $(item).parents('tr').data('id'), + id: $(item).parents('.item').data('id'), is_log: isLog }, function () { if (isLog == 1) { @@ -150,6 +150,7 @@ $(item).text('不记录') } + $(item).parents('.item').data('is-log',isLog) }) }) }) diff --git a/view/admin/common/_require.html b/view/admin/common/_require.html index 0b7a432..d534532 100644 --- a/view/admin/common/_require.html +++ b/view/admin/common/_require.html @@ -17,6 +17,31 @@ max-width: 60px; max-height: 60px; } + + .table-card-box{ + + + } + + .table-card-item{ + background-color: #eee; + margin-bottom: 2px; + margin-top: 3px; + } + + .table-card-item img{ + max-width: 60px; + max-height: 60px; + } + + .table-card-item .item-title{ + background-color: #666; + color: #fff; + padding: 5px; + } + .table-card-item .item-value{ + padding: 5px; + } -{:get_system_config('site_tongji')} \ No newline at end of file +{:get_system_config('site_tongji')} + + \ No newline at end of file diff --git a/view/admin/file/index.html b/view/admin/file/index.html index 824bffd..ddeef72 100644 --- a/view/admin/file/index.html +++ b/view/admin/file/index.html @@ -72,7 +72,7 @@ 暂无数据 ';{/php} {volist name="list" id="vo" empty="$empty"} - + {$vo.id} {switch $vo.mime_type} @@ -143,11 +143,11 @@ $('.clear').click(function () { var item = this; - console.log($(item).parents('tr').data('id')); + console.log($(item).parents('.item').data('id')); layer.confirm('确定要清除吗?清除后不能恢复', function () { $.get('{:url("File/clear")}', { - id: $(item).parents('tr').data('id') + id: $(item).parents('.item').data('id') }, function (result) { if (result.code == 0) { layer.msg('删除成功'); @@ -163,7 +163,7 @@ layer.confirm('确定要强制清除吗?该文件有可能正在使用', function () { $.get('{:url("File/clear")}', { - id: $(item).parents('tr').data('id') + id: $(item).parents('.item').data('id') }, function (result) { if (result.code == 0) { layer.msg('删除成功'); diff --git a/view/admin/user/index.html b/view/admin/user/index.html index 037ac1e..cb8645b 100644 --- a/view/admin/user/index.html +++ b/view/admin/user/index.html @@ -50,7 +50,7 @@ {volist name='list' id='vo'} - + {$vo.id} {$vo.account} @@ -90,11 +90,11 @@ var item = this; layer.confirm('确定要删除吗?',function(){ $.get('{:url("delete")}',{ - id:$(item).parents('tr').data('id') + id:$(item).parents('.item').data('id') },function(result){ layer.msg('删除成功'); - $(item).parents('tr').remove(); + $(item).parents('.item').remove(); }) }) })