首页添加公告统计

This commit is contained in:
hdm 2022-08-04 00:05:48 +08:00
parent 419d3eba9a
commit 8122ebd7f5
2 changed files with 6 additions and 5 deletions

View File

@ -105,11 +105,16 @@ class Index extends BaseController
$total = [];
$adminCount = Db::name('Admin')->where('status', '1')->count();
$approveCount = Db::name('Approve')->count();
$noteCount = Db::name('Note')->where('status', '1')->count();
$expenseCount = Db::name('Expense')->where('delete_time', '0')->count();
$invoiceCount = Db::name('Invoice')->where('delete_time', '0')->count();
$total[] = array(
'name' => '员工',
'num' => $adminCount,
);
$total[] = array(
'name' => '公告',
'num' => $noteCount,
);
$total[] = array(
'name' => '审批',

View File

@ -97,11 +97,7 @@
}
}
, { field: 'cate_name', title: '工作类型', width: 90, align: 'center' }
, { field: 'type_name', title: '任务类型', width: 90, align: 'center',templet:function(d){
var html = '<span class="layui-color-'+d.type+'">'+d.type_name+'</span>';
return html;
}}
, {
,{
field: 'title', title: '任务主题', rowspan: 2, templet: function (d) {
var html = '<span class="layui-badge layui-bg-' + d.priority + '">' + d.priority_name + '</span> <a class="side-a" data-href="/project/task/view/id/' + d.id + '">' + d.title + '</a>';
return html;