首页展示模块化管理
This commit is contained in:
parent
7e9e419961
commit
e88e5a031c
@ -133,8 +133,12 @@ class api extends BaseController
|
||||
$data_first = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_first,$end_first")->select();
|
||||
$data_second = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_second,$end_second")->select();
|
||||
$data_three = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_three,$end_first")->select();
|
||||
|
||||
//获取员工活跃数据
|
||||
return to_assign(0, '', ['data_first' => hour_document($data_first), 'data_second' => hour_document($data_second), 'data_three' => date_document($data_three)]);
|
||||
}
|
||||
|
||||
//获取员工活跃数据
|
||||
public function get_view_log()
|
||||
{
|
||||
$times = strtotime("-30 day");
|
||||
$where = [];
|
||||
$where[] = ['uid','<>',1];
|
||||
@ -154,7 +158,7 @@ class api extends BaseController
|
||||
array_multisort($counts, SORT_DESC, $logs);
|
||||
//攫取前10
|
||||
$data_logs = array_slice($logs, 0, 10);
|
||||
return to_assign(0, '', ['data_first' => hour_document($data_first), 'data_second' => hour_document($data_second), 'data_three' => date_document($data_three),'data_logs' => $data_logs]);
|
||||
return to_assign(0, '', ['data_logs' => $data_logs]);
|
||||
}
|
||||
|
||||
//修改个人信息
|
||||
|
@ -91,14 +91,8 @@ class Index extends BaseController
|
||||
\think\facade\Cache::tag('adminMenu')->set('menu' . $admin['id'], $list);
|
||||
}
|
||||
View::assign('menu', $list);
|
||||
//View::assign('theme', get_system_config('other','theme'));
|
||||
$user = Db::name('Admin')->where('id',$this->uid)->find();
|
||||
if(isset($user['theme'])){
|
||||
View::assign('theme',$user['theme']);
|
||||
}
|
||||
else{
|
||||
View::assign('theme', 'black');
|
||||
}
|
||||
View::assign('theme',$user['theme']);
|
||||
return View();
|
||||
}
|
||||
}
|
||||
@ -234,6 +228,23 @@ class Index extends BaseController
|
||||
'num' => $articleCount,
|
||||
);
|
||||
}
|
||||
|
||||
$admin = get_login_admin();
|
||||
$adminGroup = Db::name('PositionGroup')->where(['pid' => $admin['position_id']])->column('group_id');
|
||||
$adminLayout = Db::name('AdminGroup')->where('id', 'in', $adminGroup)->column('layouts');
|
||||
$adminLayouts = [];
|
||||
foreach ($adminLayout as $k => $v) {
|
||||
$v = explode(',', $v);
|
||||
$adminLayouts = array_merge($adminLayouts, $v);
|
||||
}
|
||||
$layouts = get_config('layout');
|
||||
$layout_selected = [];
|
||||
foreach ($layouts as $key =>$vo) {
|
||||
if (!empty($adminLayouts) and in_array($vo['id'], $adminLayouts)) {
|
||||
$layout_selected[] = $vo;
|
||||
}
|
||||
}
|
||||
View::assign('layout_selected',$layout_selected);
|
||||
View::assign('total', $total);
|
||||
View::assign('handle', $handle);
|
||||
View::assign('install', $install);
|
||||
|
@ -39,7 +39,9 @@ class Role extends BaseController
|
||||
$param = get_params();
|
||||
if (request()->isAjax()) {
|
||||
$ruleData = isset($param['rule']) ? $param['rule'] : 0;
|
||||
$layoutData = isset($param['layout']) ? $param['layout'] : 0;
|
||||
$param['rules'] = implode(',', $ruleData);
|
||||
$param['layouts'] = implode(',', $layoutData);
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
try {
|
||||
validate(GroupCheck::class)->scene('edit')->check($param);
|
||||
@ -69,15 +71,29 @@ class Role extends BaseController
|
||||
} else {
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
$rule = admin_rule();
|
||||
$layouts = get_config('layout');
|
||||
if ($id > 0) {
|
||||
$rules = admin_group_info($id);
|
||||
$role_rule = create_tree_list(0, $rule, $rules);
|
||||
$role = Db::name('AdminGroup')->where(['id' => $id])->find();
|
||||
$role = Db::name('AdminGroup')->where(['id' => $id])->find();
|
||||
|
||||
$layout_selected = explode(',', $role['layouts']);
|
||||
foreach ($layouts as $key =>&$vo) {
|
||||
if (!empty($layout_selected) and in_array($vo['id'], $layout_selected)) {
|
||||
$vo['checked'] = true;
|
||||
} else {
|
||||
$vo['checked'] = false;
|
||||
}
|
||||
}
|
||||
View::assign('role', $role);
|
||||
} else {
|
||||
$role_rule = create_tree_list(0, $rule, []);
|
||||
foreach ($layouts as $key =>&$vo) {
|
||||
$vo['checked'] = false;
|
||||
}
|
||||
}
|
||||
View::assign('role_rule', $role_rule);
|
||||
View::assign('role_rule', $role_rule);
|
||||
View::assign('layout', $layouts);
|
||||
View::assign('id', $id);
|
||||
return view();
|
||||
}
|
||||
|
33
app/home/view/index/layout_action.html
Normal file
33
app/home/view/index/layout_action.html
Normal file
@ -0,0 +1,33 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>员工动态</h3><a data-title="员工动态" data-href="/home/api/log_list" class="pull-right tab-a">更多</a></div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="layui-timeline" id="logs"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//动态
|
||||
function layoutAction() {
|
||||
$.ajax({
|
||||
url: "/home/api/log_list",
|
||||
type: 'get',
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var html = '';
|
||||
$.each(e.data, function (key, value) {
|
||||
html += '<li class="layui-timeline-item">\
|
||||
<i class="layui-icon layui-timeline-axis"></i>\
|
||||
<div class="layui-timeline-content layui-text">\
|
||||
<div class="layui-timeline-title"><span title="'+ value.id + '">' + value.times + '</span>,' + value.content + '</div>\
|
||||
</div>\
|
||||
</li>';
|
||||
});
|
||||
$('#logs').html(html);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
26
app/home/view/index/layout_article.html
Normal file
26
app/home/view/index/layout_article.html
Normal file
@ -0,0 +1,26 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">知识列表</div>
|
||||
<div style="padding: 12px;">
|
||||
<table id="Article" lay-filter="Article" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//公告
|
||||
function layoutArticle(table){
|
||||
//文章知识
|
||||
table.render({
|
||||
elem: '#Article'
|
||||
, url: "/home/api/get_article_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'cate_title', title: '知识分类', align: 'center','width': 90 },
|
||||
{ field: 'title', title: '知识标题',templet: '<div><a data-href="/article/index/view/id/{{d.id}}.html" class="side-a">{{d.title}}</a></div>'},
|
||||
{ field: 'create_time', title: '发布时间', align: 'center','width': 150}
|
||||
]]
|
||||
});
|
||||
}
|
||||
</script>
|
122
app/home/view/index/layout_chartview.html
Normal file
122
app/home/view/index/layout_chartview.html
Normal file
@ -0,0 +1,122 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div id="chartView" style="width: 100%;height:300px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var chartView;
|
||||
function layoutChartView() {
|
||||
chartView = echarts.init(document.getElementById('chartView'));
|
||||
$.ajax({
|
||||
url: "/home/api/get_view_data",
|
||||
type: 'get',
|
||||
data: {},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var data_first = e.data.data_first;
|
||||
var data_second = e.data.data_second;
|
||||
var myDate = new Date();
|
||||
var nowHour = myDate.getHours(); //获取当前小时数(0-23)
|
||||
var xData = [];
|
||||
var yData1 = [];
|
||||
var yData2 = [];
|
||||
$.each(data_first, function (key, value) {
|
||||
if (key <= nowHour) {
|
||||
yData1.push(value);
|
||||
}
|
||||
});
|
||||
$.each(data_second, function (key, value) {
|
||||
xData.push(setHour(key));
|
||||
yData2.push(value);
|
||||
});
|
||||
var ops = {
|
||||
title: {
|
||||
top: '12px',
|
||||
text: '今日与昨日员工活跃度',
|
||||
left: '6px',
|
||||
textStyle: {
|
||||
fontSize: '18',
|
||||
color: '#333',
|
||||
}
|
||||
},
|
||||
color: ["#1AAD19", "#1890FF"],
|
||||
grid: {
|
||||
left: '16px',
|
||||
right: '30px',
|
||||
bottom: '12px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
show: true,
|
||||
},
|
||||
legend: {
|
||||
data: ["今日", "昨日"],
|
||||
top: '16px',
|
||||
},
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: xData,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
width: 1,
|
||||
}
|
||||
},
|
||||
}],
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
width: 1,
|
||||
}
|
||||
},
|
||||
}],
|
||||
series: [{
|
||||
name: "今日",
|
||||
type: "line",
|
||||
smooth: !0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default",
|
||||
opacity: 0.2
|
||||
}
|
||||
}
|
||||
},
|
||||
data: yData1
|
||||
}, {
|
||||
name: "昨日",
|
||||
type: "line",
|
||||
smooth: !0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default",
|
||||
opacity: 0.2
|
||||
}
|
||||
}
|
||||
},
|
||||
data: yData2
|
||||
}]
|
||||
}
|
||||
chartView.setOption(ops);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
84
app/home/view/index/layout_chartyear.html
Normal file
84
app/home/view/index/layout_chartyear.html
Normal file
@ -0,0 +1,84 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div id="chartYear" style="width: 100%;height:240px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var myChart;
|
||||
function layoutChartYear() {
|
||||
myChart = echarts.init(document.getElementById('chartYear'));
|
||||
$.ajax({
|
||||
url: "/home/api/get_view_data",
|
||||
type: 'get',
|
||||
data: {},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var archiveCalendar = e.data.data_three;
|
||||
let option = {
|
||||
title: {
|
||||
top: '12px',
|
||||
text: '近一年员工活跃度',
|
||||
left: '8px',
|
||||
textStyle: {
|
||||
fontSize: '18',
|
||||
color: '#333',
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
padding: 6,
|
||||
formatter: function (obj) {
|
||||
var value = obj.value;
|
||||
return '<div style="font-size: 12px;">' + value[0] + '员工活跃度:' + value[1] + '</div>';
|
||||
}
|
||||
},
|
||||
visualMap: {
|
||||
min: 0,
|
||||
max: 300,
|
||||
show: false,
|
||||
inRange: {
|
||||
color: ['#fafafa', '#1AAD19']
|
||||
}
|
||||
},
|
||||
calendar: {
|
||||
top: 75,
|
||||
left: 52,
|
||||
right: 20,
|
||||
range: getRange(),
|
||||
cellSize: ['auto', 21],
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#aaa',
|
||||
type: 'dashed'
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
borderWidth: 0.5
|
||||
},
|
||||
yearLabel: { show: false },
|
||||
monthLabel: {
|
||||
nameMap: 'cn',
|
||||
fontSize: 12
|
||||
},
|
||||
dayLabel: {
|
||||
show: true,
|
||||
formatter: '{start} 1st',
|
||||
fontWeight: 'lighter',
|
||||
nameMap: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
type: 'heatmap',
|
||||
coordinateSystem: 'calendar',
|
||||
calendarIndex: 0,
|
||||
data: getDay(archiveCalendar)
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
16
app/home/view/index/layout_count.html
Normal file
16
app/home/view/index/layout_count.html
Normal file
@ -0,0 +1,16 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card panel-num">
|
||||
<table>
|
||||
<tr>
|
||||
{volist name="$total" id="vo"}
|
||||
<td>
|
||||
<div class="num-title">{$vo.name}</div>
|
||||
<div class="blue">{$vo.num}</div>
|
||||
</td>
|
||||
{/volist}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
104
app/home/view/index/layout_event.html
Normal file
104
app/home/view/index/layout_event.html
Normal file
@ -0,0 +1,104 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>快捷申请</h3><a href="javascript:;" data-href="/oa/approve/index" data-title="快捷申请" class="tab-a pull-right blue">更多</a></div>
|
||||
<div class="layui-card-body layui-short-menu p-3">
|
||||
<ul class="layui-row layui-col-space12">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=1" class="side-a">
|
||||
<i class="iconfont icon-kechengziyuanguanli"></i>
|
||||
<cite>请假申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=2" class="side-a">
|
||||
<i class="iconfont icon-jiaoshiguanli"></i>
|
||||
<cite>出差申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=3" class="side-a">
|
||||
<i class="iconfont icon-tuiguangguanli"></i>
|
||||
<cite>外出申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=4" class="side-a">
|
||||
<i class="iconfont icon-xueshengchengji"></i>
|
||||
<cite>加班申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=14" class="side-a">
|
||||
<i class="iconfont icon-shoufeiguanli"></i>
|
||||
<cite>采购申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=7" class="side-a">
|
||||
<i class="iconfont icon-chuangjianxitong"></i>
|
||||
<cite>物品维修</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=8" class="side-a">
|
||||
<i class="iconfont icon-shenpishezhi"></i>
|
||||
<cite>用章申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=9" class="side-a">
|
||||
<i class="iconfont icon-dongtaiguanli"></i>
|
||||
<cite>用车申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>待办事项</h3></div>
|
||||
<div class="layui-card-body layui-matter-item p-3">
|
||||
<ul class="layui-row layui-col-space12">
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/oa/approve/list" class="tab-a" data-title="待审审批">
|
||||
<p>待审审批</p>
|
||||
<p class="pt-3"><cite>0</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/finance/expense/list" class="tab-a" data-title="待审报销">
|
||||
<p>待审报销</p>
|
||||
<p class="pt-3"><cite>0</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/finance/invoice/list" class="tab-a" data-title="待审发票">
|
||||
<p>待审发票</p>
|
||||
<p class="pt-3"><cite>0</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/finance/income/index" class="tab-a" data-title="待回款">
|
||||
<p>待回款</p>
|
||||
<p class="pt-3"><cite>1</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/contract/index/index" class="tab-a" data-title="待审合同">
|
||||
<p>待审合同</p>
|
||||
<p class="pt-3"><cite>1</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/project/task/index" class="tab-a" data-title="待完成任务">
|
||||
<p>待完成任务</p>
|
||||
<p class="pt-3"><cite>2</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
70
app/home/view/index/layout_fastentry.html
Normal file
70
app/home/view/index/layout_fastentry.html
Normal file
@ -0,0 +1,70 @@
|
||||
<div class="layui-card layui-right-bar">
|
||||
<div class="layui-row pt-3 px-3 py-2">
|
||||
<ul class="layui-col-space12">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/home/index/mail_list" class="tab-a" data-title="通讯录">
|
||||
<i class="iconfont icon-huamingce"></i>
|
||||
<cite>通讯录</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/plan/calendar" class="tab-a" data-title="日程安排">
|
||||
<i class="iconfont icon-kaoshijihua"></i>
|
||||
<cite>日程安排</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" class="report-add">
|
||||
<i class="iconfont icon-fuwuliebiao"></i>
|
||||
<cite>+工作汇报</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" class="work-add">
|
||||
<i class="iconfont icon-paikeshezhi"></i>
|
||||
<cite>+工作记录</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function layoutFastentry(work,table){
|
||||
$('.work-add').on('click',function(){
|
||||
work.add(0,{'id':0});
|
||||
})
|
||||
$('.report-add').on('click',function(){
|
||||
var type=[{'id':1,'title':'日报'},{'id':2,'title':'周报'},{'id':3,'title':'月报'}];
|
||||
var tablereport;
|
||||
layer.open({
|
||||
title:'选择汇报类型',
|
||||
type:1,
|
||||
area:['360px','300px'],
|
||||
content:'<div style="width:325px; padding:15px 15px 0"><div id="selectType"></div></div>',
|
||||
success:function(){
|
||||
tablereport=table.render({
|
||||
elem: '#selectType',
|
||||
cols: [[ //标题栏
|
||||
{type:'radio',title: '选择'},
|
||||
{field: 'title', title: '汇报类型'}
|
||||
]],
|
||||
data: type
|
||||
});
|
||||
},
|
||||
btn:['确定'],
|
||||
yes: function(idx){
|
||||
var checkStatus = table.checkStatus(tablereport.config.id);
|
||||
var data = checkStatus.data;
|
||||
if(data.length>0){
|
||||
tool.side('/oa/work/add?type='+data[0].id);
|
||||
layer.close(idx);
|
||||
}
|
||||
else{
|
||||
layer.msg('请选择汇报类型');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>
|
25
app/home/view/index/layout_note.html
Normal file
25
app/home/view/index/layout_note.html
Normal file
@ -0,0 +1,25 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">公告列表</div>
|
||||
<div style="padding: 12px;">
|
||||
<table id="Note" lay-filter="Note" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//公告
|
||||
function layoutNote(table){
|
||||
table.render({
|
||||
elem: '#Note'
|
||||
, url: "/home/api/get_note_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'cate_title', title: '公告分类', align: 'center','width': 90},
|
||||
{ field: 'title', title: '公告标题',templet: '<div><a data-href="/note/index/view/id/{{d.id}}.html" class="side-a">{{d.title}}</a></div>'},
|
||||
{ field: 'create_time', title: '发布时间', align: 'center','width': 150}
|
||||
]]
|
||||
});
|
||||
}
|
||||
</script>
|
34
app/home/view/index/layout_project.html
Normal file
34
app/home/view/index/layout_project.html
Normal file
@ -0,0 +1,34 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">项目列表</div>
|
||||
<div style="padding: 12px;">
|
||||
<table id="Project" lay-filter="Project" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//项目
|
||||
function layoutProject(table){
|
||||
table.render({
|
||||
elem: '#Project'
|
||||
, url: "/home/api/get_project_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'id', title: '项目编号', align: 'center','width': 90, templet: function (d) {
|
||||
return 'P' + d.id;
|
||||
}
|
||||
},
|
||||
{field: 'status', title: '状态', align: 'center', width: 80, templet: function (d) {
|
||||
var html = '<span class="layui-btn layui-btn-xs layui-bg-' + d.status + '">' + d.status_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{ field: 'title', title: '项目名称',templet: '<div><a data-href="/project/index/view/id/{{d.id}}.html" class="side-a">{{d.name}}</a></div>'},
|
||||
{ field: 'director_name', title: '负责人', align: 'center', width: 80},
|
||||
{ field: 'plan_time', title: '项目周期', align: 'center', width: 190},
|
||||
]]
|
||||
});
|
||||
}
|
||||
</script>
|
58
app/home/view/index/layout_ranking.html
Normal file
58
app/home/view/index/layout_ranking.html
Normal file
@ -0,0 +1,58 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>最活跃员工<span style="color:#999; font-size:14px; font-weight:400; margin-left:5px">最近30天前十的活跃度</span></h3></div>
|
||||
<div class="layui-card-body">
|
||||
<div id="logChart" style="width: 100%; height:268px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//动态
|
||||
var logChart;
|
||||
function layoutRaking() {
|
||||
logChart = echarts.init(document.getElementById('logChart'));
|
||||
$.ajax({
|
||||
url: "/home/api/get_view_log",
|
||||
type: 'get',
|
||||
data: {},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var data_logs = e.data.data_logs;
|
||||
var logItem = [];
|
||||
$.each(data_logs, function (key, value) {
|
||||
let item = {
|
||||
value: value.count,
|
||||
name: value.name
|
||||
};
|
||||
logItem.push(item);
|
||||
});
|
||||
let optC = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} :{d}%'
|
||||
},
|
||||
legend: {
|
||||
top: '1%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '活跃度',
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
center: ['50%', '60%'],
|
||||
data: logItem,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
logChart.setOption(optC);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
67
app/home/view/index/layout_system.html
Normal file
67
app/home/view/index/layout_system.html
Normal file
@ -0,0 +1,67 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">系统信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" lay-skin="" lay-size="sm">
|
||||
{if condition="($install == true)"}
|
||||
<tr>
|
||||
<td colspan="4" style="color: #E94335; background-color:#f8f8f8">提醒:发现app目录下的install文件夹没删除,为了系统的安全,请手动去删除。</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="info-td">服务器系统</td>
|
||||
<td>{:get_system_info('os')}</td>
|
||||
<td class="info-td">PHP版本</td>
|
||||
<td>{:get_system_info('php')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">上传附件限制</td>
|
||||
<td>{:get_system_info('upload_max_filesize')}</td>
|
||||
<td class="info-td">执行时间限制</td>
|
||||
<td>{:get_system_info('max_execution_time')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">勾股OA</td>
|
||||
<td colspan="3">{:CMS_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px"
|
||||
href="https://blog.gougucms.com/home/book/detail/bid/3.html" target="_blank">勾股OA文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">ThinkPHP版本</td>
|
||||
<td colspan="3">{$TP_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://www.kancloud.cn/manual/thinkphp6_0" target="_blank">TP6文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">Layui版本</td>
|
||||
<td colspan="3">{:LAYUI_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://layui.gitee.io/v2/docs/" target="_blank">Layui文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">合作联系</td>
|
||||
<td colspan="3"><i class="iconfont icon-weixin green"></i>微信号:hdm588,业务合作、功能定制请备注</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">QQ交流群</td>
|
||||
<td colspan="3">搜Q群:24641076(满),46924914<br>或点击 <a href="https://jq.qq.com/?_wv=1027&k=aCESqWHQ" target="_blank" rel="nofollow"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="gougucms交流群" title="点击链接加入群聊【勾股开源交流群】" style="vertical-align:middle"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">同系列开源软件</td>
|
||||
<td colspan="3"><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/gougucms" target="_blank">勾股CMS</a><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/blog" target="_blank">勾股BLOG</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/dev" target="_blank" style="margin-right:8px">勾股DEV</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/guoguadmin" target="_blank">勾股ADMIN</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">🍗🍗<br/>给作者加鸡腿<br/>🍗🍗</td>
|
||||
<td colspan="3">
|
||||
<img src="https://www.gougucms.com/static/home/images/zfb.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center /><img src="https://www.gougucms.com/static/home/images/wx.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function layoutSystem(){
|
||||
$('body').on('click','[data-event="pay"]',function(){
|
||||
var src=$(this).attr('src');
|
||||
layer.open({
|
||||
type:1,
|
||||
title:'感谢您给作者加鸡腿🍗🍗',
|
||||
content:'<img src="'+src+'" style="width:100%" align=center />',
|
||||
});
|
||||
})
|
||||
}
|
||||
</script>
|
34
app/home/view/index/layout_task.html
Normal file
34
app/home/view/index/layout_task.html
Normal file
@ -0,0 +1,34 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">任务列表</div>
|
||||
<div style="padding: 12px;">
|
||||
<table id="Task" lay-filter="Task" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//任务
|
||||
function layoutTask(table){
|
||||
table.render({
|
||||
elem: '#Task'
|
||||
, url: "/home/api/get_task_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'id', title: '任务编号', align: 'center','width': 90, templet: function (d) {
|
||||
return 'T' + d.id;
|
||||
}
|
||||
},
|
||||
{field: 'flow_status', title: '状态', align: 'center', width: 80, templet: function (d) {
|
||||
var html = '<span class="layui-btn layui-btn-xs layui-bg-' + d.flow_status + '">' + d.flow_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{ field: 'title', title: '任务主题',templet: '<div><a data-href="/project/task/view/id/{{d.id}}.html" class="side-a">{{d.title}}</a></div>'},
|
||||
{ field: 'director_name', title: '负责人', align: 'center', width: 80},
|
||||
{ field: 'end_time', title: '计划完成日期', align: 'center', width: 190},
|
||||
]]
|
||||
});
|
||||
}
|
||||
</script>
|
@ -34,271 +34,65 @@
|
||||
<div class="p-3">
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md8">
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card panel-num">
|
||||
<table>
|
||||
<tr>
|
||||
{volist name="$total" id="vo"}
|
||||
<td>
|
||||
<div class="num-title">{$vo.name}</div>
|
||||
<div class="blue">{$vo.num}</div>
|
||||
</td>
|
||||
{/volist}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>快捷申请</h3><a href="javascript:;" data-href="/oa/approve/index" data-title="快捷申请" class="tab-a pull-right blue">更多</a></div>
|
||||
<div class="layui-card-body layui-short-menu p-3">
|
||||
<ul class="layui-row layui-col-space12">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=1" class="side-a">
|
||||
<i class="iconfont icon-kechengziyuanguanli"></i>
|
||||
<cite>请假申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=2" class="side-a">
|
||||
<i class="iconfont icon-jiaoshiguanli"></i>
|
||||
<cite>出差申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=3" class="side-a">
|
||||
<i class="iconfont icon-tuiguangguanli"></i>
|
||||
<cite>外出申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=4" class="side-a">
|
||||
<i class="iconfont icon-xueshengchengji"></i>
|
||||
<cite>加班申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=14" class="side-a">
|
||||
<i class="iconfont icon-shoufeiguanli"></i>
|
||||
<cite>采购申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=7" class="side-a">
|
||||
<i class="iconfont icon-chuangjianxitong"></i>
|
||||
<cite>物品维修</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=8" class="side-a">
|
||||
<i class="iconfont icon-shenpishezhi"></i>
|
||||
<cite>用章申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/approve/add?type=9" class="side-a">
|
||||
<i class="iconfont icon-dongtaiguanli"></i>
|
||||
<cite>用车申请</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>待办事项</h3></div>
|
||||
<div class="layui-card-body layui-matter-item p-3">
|
||||
<ul class="layui-row layui-col-space12">
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/oa/approve/list" class="tab-a" data-title="待审审批">
|
||||
<p>待审审批</p>
|
||||
<p class="pt-3"><cite>{$handle.approve}</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/finance/expense/list" class="tab-a" data-title="待审报销">
|
||||
<p>待审报销</p>
|
||||
<p class="pt-3"><cite>{$handle.expenses}</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/finance/invoice/list" class="tab-a" data-title="待审发票">
|
||||
<p>待审发票</p>
|
||||
<p class="pt-3"><cite>{$handle.invoice}</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/finance/income/index" class="tab-a" data-title="待回款">
|
||||
<p>待回款</p>
|
||||
<p class="pt-3"><cite>{$handle.income}</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/contract/index/index" class="tab-a" data-title="待审合同">
|
||||
<p>待审合同</p>
|
||||
<p class="pt-3"><cite>{$handle.contract}</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs4">
|
||||
<a href="javascript:;" data-href="/project/task/index" class="tab-a" data-title="待完成任务">
|
||||
<p>待完成任务</p>
|
||||
<p class="pt-3"><cite>{$handle.task}</cite></p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{volist name="$layout_selected" id="layout"}
|
||||
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-tab layui-tab-brief layadmin-latestData">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this"><h3>企业公告</h3></li>
|
||||
<li><h3>知识列表</h3></li>
|
||||
</ul>
|
||||
<div class="layui-tab-content p-3">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table id="Note" lay-filter="Note" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<table id="Article" lay-filter="Article" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
{gt name=":isModule('project')" value="0"}
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">项目列表</div>
|
||||
<div style="padding: 12px;">
|
||||
<table id="Project" lay-filter="Project" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">任务列表</div>
|
||||
<div style="padding: 12px;">
|
||||
<table id="Task" lay-filter="Task" class="layui-hide" style="margin-top:0"></table>
|
||||
</div>
|
||||
</div>
|
||||
{/gt}
|
||||
<div class="layui-card">
|
||||
<div id="chartView" style="width: 100%;height:300px;"></div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div id="chartYear" style="width: 100%;height:240px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'count') }
|
||||
{include file="/index/layout_count" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'event') }
|
||||
{include file="/index/layout_event" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'note') }
|
||||
{include file="/index/layout_note" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'article') }
|
||||
{include file="/index/layout_article" /}
|
||||
{/if}
|
||||
|
||||
{gt name=":isModule('project')" value="0"}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'project') }
|
||||
{include file="/index/layout_project" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'task') }
|
||||
{include file="/index/layout_task" /}
|
||||
{/if}
|
||||
|
||||
{/gt}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'chartview') }
|
||||
{include file="/index/layout_chartview" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 1) AND ( $layout.name == 'chartyear') }
|
||||
{include file="/index/layout_chartyear" /}
|
||||
{/if}
|
||||
|
||||
{/volist}
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-card layui-right-bar">
|
||||
<div class="layui-row pt-3 px-3 py-2">
|
||||
<ul class="layui-col-space12">
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/home/index/mail_list" class="tab-a" data-title="通讯录">
|
||||
<i class="iconfont icon-huamingce"></i>
|
||||
<cite>通讯录</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" data-href="/oa/plan/calendar" class="tab-a" data-title="日程安排">
|
||||
<i class="iconfont icon-kaoshijihua"></i>
|
||||
<cite>日程安排</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" class="report-add">
|
||||
<i class="iconfont icon-fuwuliebiao"></i>
|
||||
<cite>+工作汇报</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs3">
|
||||
<a href="javascript:;" class="work-add">
|
||||
<i class="iconfont icon-paikeshezhi"></i>
|
||||
<cite>+工作记录</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-title">系统信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" lay-skin="" lay-size="sm">
|
||||
{if condition="($install == true)"}
|
||||
<tr>
|
||||
<td colspan="4" style="color: #E94335; background-color:#f8f8f8">提醒:发现app目录下的install文件夹没删除,为了系统的安全,请手动去删除。</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="info-td">服务器系统</td>
|
||||
<td>{:get_system_info('os')}</td>
|
||||
<td class="info-td">PHP版本</td>
|
||||
<td>{:get_system_info('php')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">上传附件限制</td>
|
||||
<td>{:get_system_info('upload_max_filesize')}</td>
|
||||
<td class="info-td">执行时间限制</td>
|
||||
<td>{:get_system_info('max_execution_time')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">勾股OA</td>
|
||||
<td colspan="3">{:CMS_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px"
|
||||
href="https://blog.gougucms.com/home/book/detail/bid/3.html" target="_blank">勾股OA文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">ThinkPHP版本</td>
|
||||
<td colspan="3">{$TP_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://www.kancloud.cn/manual/thinkphp6_0" target="_blank">TP6文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">Layui版本</td>
|
||||
<td colspan="3">{:LAYUI_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://layui.gitee.io/v2/docs/" target="_blank">Layui文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">合作联系</td>
|
||||
<td colspan="3"><i class="iconfont icon-weixin green"></i>微信号:hdm588,业务合作、功能定制请备注</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">QQ交流群</td>
|
||||
<td colspan="3">搜Q群:24641076(满),46924914<br>或点击 <a href="https://jq.qq.com/?_wv=1027&k=aCESqWHQ" target="_blank" rel="nofollow"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="gougucms交流群" title="点击链接加入群聊【勾股开源交流群】" style="vertical-align:middle"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">同系列开源软件</td>
|
||||
<td colspan="3"><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/gougucms" target="_blank">勾股CMS</a><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/blog" target="_blank">勾股BLOG</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/dev" target="_blank" style="margin-right:8px">勾股DEV</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/guoguadmin" target="_blank">勾股ADMIN</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">🍗🍗<br/>给作者加鸡腿<br/>🍗🍗</td>
|
||||
<td colspan="3">
|
||||
<img src="https://www.gougucms.com/static/home/images/zfb.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center /><img src="https://www.gougucms.com/static/home/images/wx.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>最活跃员工<span style="color:#999; font-size:14px; font-weight:400; margin-left:5px">最近30天前十的活跃度</span></h3></div>
|
||||
<div class="layui-card-body">
|
||||
<div id="logChart" style="width: 100%; height:268px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h3>员工动态</h3><a data-title="员工动态" data-href="/home/api/log_list" class="pull-right tab-a">更多</a></div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="layui-timeline" id="logs"></ul>
|
||||
</div>
|
||||
</div>
|
||||
{volist name="$layout_selected" id="layout"}
|
||||
|
||||
{if ( $layout.row == 2) AND ( $layout.name == 'fastentry') }
|
||||
{include file="/index/layout_fastentry" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 2) AND ( $layout.name == 'system') }
|
||||
{include file="/index/layout_system" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 2) AND ( $layout.name == 'ranking') }
|
||||
{include file="/index/layout_ranking" /}
|
||||
{/if}
|
||||
|
||||
{if ( $layout.row == 2) AND ( $layout.name == 'action') }
|
||||
{include file="/index/layout_action" /}
|
||||
{/if}
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -309,149 +103,53 @@
|
||||
{block name="script"}
|
||||
<script src="{__GOUGU__}/third_party/echart/echarts.min.js"></script>
|
||||
<script>
|
||||
const moduleInit = ['tool','oaSchedule'];
|
||||
function gouguInit() {
|
||||
var tool = layui.tool,table = layui.table,work = layui.oaSchedule;
|
||||
|
||||
$('.work-add').on('click',function(){
|
||||
work.add(0,{'id':0});
|
||||
})
|
||||
$('.report-add').on('click',function(){
|
||||
var type=[{'id':1,'title':'日报'},{'id':2,'title':'周报'},{'id':3,'title':'月报'}];
|
||||
var tablereport;
|
||||
layer.open({
|
||||
title:'选择汇报类型',
|
||||
type:1,
|
||||
area:['360px','300px'],
|
||||
content:'<div style="width:325px; padding:15px 15px 0"><div id="selectType"></div></div>',
|
||||
success:function(){
|
||||
tablereport=table.render({
|
||||
elem: '#selectType',
|
||||
cols: [[ //标题栏
|
||||
{type:'radio',title: '选择'},
|
||||
{field: 'title', title: '汇报类型'}
|
||||
]],
|
||||
data: type
|
||||
});
|
||||
},
|
||||
btn:['确定'],
|
||||
yes: function(idx){
|
||||
var checkStatus = table.checkStatus(tablereport.config.id);
|
||||
var data = checkStatus.data;
|
||||
if(data.length>0){
|
||||
tool.side('/oa/work/add?type='+data[0].id);
|
||||
layer.close(idx);
|
||||
}
|
||||
else{
|
||||
layer.msg('请选择汇报类型');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
//公告
|
||||
table.render({
|
||||
elem: '#Note'
|
||||
, url: "/home/api/get_note_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'cate_title', title: '公告分类', align: 'center','width': 90},
|
||||
{ field: 'title', title: '公告标题',templet: '<div><a data-href="/note/index/view/id/{{d.id}}.html" class="side-a"">{{d.title}}</a></div>'},
|
||||
{ field: 'create_time', title: '发布时间', align: 'center','width': 150}
|
||||
]]
|
||||
});
|
||||
//文章
|
||||
table.render({
|
||||
elem: '#Article'
|
||||
, url: "/home/api/get_article_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'cate_title', title: '知识分类', align: 'center','width': 90 },
|
||||
{ field: 'title', title: '知识标题',templet: '<div><a data-href="/article/index/view/id/{{d.id}}.html" class="side-a">{{d.title}}</a></div>'},
|
||||
{ field: 'create_time', title: '发布时间', align: 'center','width': 150}
|
||||
]]
|
||||
});
|
||||
//项目
|
||||
table.render({
|
||||
elem: '#Project'
|
||||
, url: "/home/api/get_project_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'id', title: '项目编号', align: 'center','width': 90, templet: function (d) {
|
||||
return 'P' + d.id;
|
||||
}
|
||||
},
|
||||
{field: 'status', title: '状态', align: 'center', width: 80, templet: function (d) {
|
||||
var html = '<span class="layui-btn layui-btn-xs layui-bg-' + d.status + '">' + d.status_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{ field: 'title', title: '项目名称',templet: '<div><a data-href="/project/index/view/id/{{d.id}}.html" class="side-a">{{d.name}}</a></div>'},
|
||||
{ field: 'director_name', title: '负责人', align: 'center', width: 80},
|
||||
{ field: 'plan_time', title: '项目周期', align: 'center', width: 190},
|
||||
]]
|
||||
});
|
||||
|
||||
//任务
|
||||
table.render({
|
||||
elem: '#Task'
|
||||
, url: "/home/api/get_task_list" //数据接口
|
||||
, page: false //开启分页
|
||||
, cols: [[ //表头
|
||||
{ field: 'id', title: '任务编号', align: 'center','width': 90, templet: function (d) {
|
||||
return 'T' + d.id;
|
||||
}
|
||||
},
|
||||
{field: 'flow_status', title: '状态', align: 'center', width: 80, templet: function (d) {
|
||||
var html = '<span class="layui-btn layui-btn-xs layui-bg-' + d.flow_status + '">' + d.flow_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{ field: 'title', title: '任务主题',templet: '<div><a data-href="/project/task/view/id/{{d.id}}.html" class="side-a">{{d.title}}</a></div>'},
|
||||
{ field: 'director_name', title: '负责人', align: 'center', width: 80},
|
||||
{ field: 'end_time', title: '计划完成日期', align: 'center', width: 190},
|
||||
]]
|
||||
});
|
||||
$('body').on('click','[data-event="pay"]',function(){
|
||||
var src=$(this).attr('src');
|
||||
layer.open({
|
||||
type:1,
|
||||
title:'感谢您给作者加鸡腿🍗🍗',
|
||||
content:'<img src="'+src+'" style="width:100%" align=center />',
|
||||
});
|
||||
})
|
||||
|
||||
get_logs();
|
||||
get_view_data();
|
||||
function getRange() {
|
||||
let today = new Date();
|
||||
let tYear = today.getFullYear();
|
||||
let tMonth = today.getMonth() + 1;
|
||||
let tDate = today.getDate();
|
||||
let dateFirst = tYear + "-" + tMonth + "-" + tDate;
|
||||
let datelast = (tYear - 1) + "-" + tMonth + "-" + tDate;
|
||||
let dataRange = [];
|
||||
dataRange.push(dateFirst);
|
||||
dataRange.push(datelast);
|
||||
return dataRange;
|
||||
}
|
||||
|
||||
|
||||
function get_logs() {
|
||||
$.ajax({
|
||||
url: "/home/api/log_list",
|
||||
type: 'get',
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var html = '';
|
||||
$.each(e.data, function (key, value) {
|
||||
html += '<li class="layui-timeline-item">\
|
||||
<i class="layui-icon layui-timeline-axis"></i>\
|
||||
<div class="layui-timeline-content layui-text">\
|
||||
<div class="layui-timeline-title"><span title="'+ value.id + '">' + value.times + '</span>,' + value.content + '</div>\
|
||||
</div>\
|
||||
</li>';
|
||||
});
|
||||
$('#logs').html(html);
|
||||
}
|
||||
}
|
||||
})
|
||||
function getDay(archiveCalendar) {
|
||||
var today = new Date();
|
||||
var dayArray = [];
|
||||
for (var i = 0; i < 366; i++) {
|
||||
var targetday_milliseconds = today.getTime() - 1000 * 60 * 60 * 24 * i;
|
||||
var date = new Date(targetday_milliseconds);
|
||||
dayArray.push(retunDay(date,archiveCalendar));
|
||||
}
|
||||
return dayArray;
|
||||
}
|
||||
|
||||
|
||||
function retunDay(day,archiveCalendar) {
|
||||
var tYear = day.getFullYear();
|
||||
var tMonth = day.getMonth();
|
||||
var tDate = day.getDate();
|
||||
tMonth = tMonth + 1;
|
||||
if (tMonth.toString().length == 1) {
|
||||
tMonth = "0" + tMonth;
|
||||
}
|
||||
if (tDate.toString().length == 1) {
|
||||
tDate = "0" + tDate;
|
||||
}
|
||||
var dateStr = tYear + "-" + tMonth + "-" + tDate;
|
||||
var dateArray = [];
|
||||
dateArray.push(dateStr);
|
||||
if (archiveCalendar[dateStr]) {
|
||||
dateArray.push(archiveCalendar[dateStr]);
|
||||
}
|
||||
else {
|
||||
dateArray.push(0);
|
||||
}
|
||||
return dateArray;
|
||||
}
|
||||
|
||||
function setHour(num) {
|
||||
var str = num + ':00';
|
||||
if (num < 10) {
|
||||
@ -459,281 +157,69 @@
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
const moduleInit = ['tool','oaSchedule'];
|
||||
function gouguInit() {
|
||||
var tool = layui.tool,table = layui.table,work = layui.oaSchedule;
|
||||
|
||||
if(typeof layoutNote ==='function'){
|
||||
layoutNote(table);
|
||||
}
|
||||
|
||||
if(typeof layoutArticle ==='function'){
|
||||
layoutArticle(table);
|
||||
}
|
||||
|
||||
if(typeof layoutArticle ==='function'){
|
||||
layoutArticle(table);
|
||||
}
|
||||
|
||||
if(typeof layoutProject ==='function'){
|
||||
layoutProject(table);
|
||||
}
|
||||
|
||||
if(typeof layoutTask ==='function'){
|
||||
layoutTask(table);
|
||||
}
|
||||
|
||||
if(typeof layoutChartView ==='function'){
|
||||
layoutChartView();
|
||||
}
|
||||
|
||||
if(typeof layoutChartYear ==='function'){
|
||||
layoutChartYear();
|
||||
}
|
||||
|
||||
if(typeof layoutFastentry ==='function'){
|
||||
layoutFastentry(work,table)
|
||||
}
|
||||
|
||||
if(typeof layoutSystem ==='function'){
|
||||
layoutSystem()
|
||||
}
|
||||
|
||||
if(typeof layoutRaking ==='function'){
|
||||
layoutRaking()
|
||||
}
|
||||
|
||||
if(typeof layoutAction ==='function'){
|
||||
layoutAction()
|
||||
}
|
||||
}
|
||||
|
||||
function get_view_data() {
|
||||
$.ajax({
|
||||
url: "/home/api/get_view_data",
|
||||
type: 'get',
|
||||
data: {},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var data_first = e.data.data_first;
|
||||
var data_second = e.data.data_second;
|
||||
archiveCalendar = e.data.data_three;
|
||||
var data_logs = e.data.data_logs;
|
||||
var myDate = new Date();
|
||||
var nowHour = myDate.getHours(); //获取当前小时数(0-23)
|
||||
var xData = [];
|
||||
var yData1 = [];
|
||||
var yData2 = [];
|
||||
var logItem = [];
|
||||
$.each(data_first, function (key, value) {
|
||||
if (key <= nowHour) {
|
||||
yData1.push(value);
|
||||
}
|
||||
});
|
||||
$.each(data_second, function (key, value) {
|
||||
xData.push(setHour(key));
|
||||
yData2.push(value);
|
||||
});
|
||||
$.each(data_logs, function (key, value) {
|
||||
let item = {
|
||||
value: value.count,
|
||||
name: value.name
|
||||
};
|
||||
logItem.push(item);
|
||||
});
|
||||
|
||||
var chartView = echarts.init(document.getElementById('chartView'));
|
||||
var ops = {
|
||||
title: {
|
||||
top: '12px',
|
||||
text: '今日与昨日员工活跃度',
|
||||
left: '6px',
|
||||
textStyle: {
|
||||
fontSize: '18',
|
||||
color: '#333',
|
||||
}
|
||||
},
|
||||
color: ["#1AAD19", "#1890FF"],
|
||||
grid: {
|
||||
left: '16px',
|
||||
right: '30px',
|
||||
bottom: '12px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
show: true,
|
||||
},
|
||||
legend: {
|
||||
data: ["今日", "昨日"],
|
||||
top: '16px',
|
||||
},
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: xData,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
width: 1,
|
||||
}
|
||||
},
|
||||
}],
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
width: 1,
|
||||
}
|
||||
},
|
||||
}],
|
||||
series: [{
|
||||
name: "今日",
|
||||
type: "line",
|
||||
smooth: !0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default",
|
||||
opacity: 0.2
|
||||
}
|
||||
}
|
||||
},
|
||||
data: yData1
|
||||
}, {
|
||||
name: "昨日",
|
||||
type: "line",
|
||||
smooth: !0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default",
|
||||
opacity: 0.2
|
||||
}
|
||||
}
|
||||
},
|
||||
data: yData2
|
||||
}]
|
||||
}
|
||||
chartView.setOption(ops);
|
||||
|
||||
|
||||
let myChart = echarts.init(document.getElementById('chartYear'));
|
||||
let option = {
|
||||
title: {
|
||||
top: '12px',
|
||||
text: '近一年员工活跃度',
|
||||
left: '8px',
|
||||
textStyle: {
|
||||
fontSize: '18',
|
||||
color: '#333',
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
padding: 6,
|
||||
formatter: function (obj) {
|
||||
var value = obj.value;
|
||||
return '<div style="font-size: 12px;">' + value[0] + '员工活跃度:' + value[1] + '</div>';
|
||||
}
|
||||
},
|
||||
visualMap: {
|
||||
min: 0,
|
||||
max: 300,
|
||||
show: false,
|
||||
inRange: {
|
||||
color: ['#fafafa', '#1AAD19']
|
||||
}
|
||||
},
|
||||
calendar: {
|
||||
top: 75,
|
||||
left: 52,
|
||||
right: 20,
|
||||
range: getRange(),
|
||||
cellSize: ['auto', 21],
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#aaa',
|
||||
type: 'dashed'
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
borderWidth: 0.5
|
||||
},
|
||||
yearLabel: { show: false },
|
||||
monthLabel: {
|
||||
nameMap: 'cn',
|
||||
fontSize: 12
|
||||
},
|
||||
dayLabel: {
|
||||
show: true,
|
||||
formatter: '{start} 1st',
|
||||
fontWeight: 'lighter',
|
||||
nameMap: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
type: 'heatmap',
|
||||
coordinateSystem: 'calendar',
|
||||
calendarIndex: 0,
|
||||
data: getDay()
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
|
||||
var logChart = echarts.init(document.getElementById('logChart'));
|
||||
let optC = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} :{d}%'
|
||||
},
|
||||
legend: {
|
||||
top: '1%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '活跃度',
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
center: ['50%', '60%'],
|
||||
data: logItem,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
logChart.setOption(optC);
|
||||
|
||||
setTimeout(function () {
|
||||
window.onresize = function () {
|
||||
chartView.resize();
|
||||
myChart.resize();
|
||||
logChart.resize();
|
||||
}
|
||||
})
|
||||
console.log(e.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var archiveCalendar = {};
|
||||
function getRange() {
|
||||
let today = new Date();
|
||||
let tYear = today.getFullYear();
|
||||
let tMonth = today.getMonth() + 1;
|
||||
let tDate = today.getDate();
|
||||
let dateFirst = tYear + "-" + tMonth + "-" + tDate;
|
||||
let datelast = (tYear - 1) + "-" + tMonth + "-" + tDate;
|
||||
let dataRange = [];
|
||||
dataRange.push(dateFirst);
|
||||
dataRange.push(datelast);
|
||||
return dataRange;
|
||||
setTimeout(function () {
|
||||
window.onresize = function () {
|
||||
if(logChart){
|
||||
chartView.resize();
|
||||
}
|
||||
|
||||
function getDay() {
|
||||
var today = new Date();
|
||||
var dayArray = [];
|
||||
for (var i = 0; i < 366; i++) {
|
||||
var targetday_milliseconds = today.getTime() - 1000 * 60 * 60 * 24 * i;
|
||||
var date = new Date(targetday_milliseconds);
|
||||
dayArray.push(retunDay(date));
|
||||
}
|
||||
return dayArray;
|
||||
if(myChart){
|
||||
myChart.resize();
|
||||
}
|
||||
|
||||
function retunDay(day) {
|
||||
var tYear = day.getFullYear();
|
||||
var tMonth = day.getMonth();
|
||||
var tDate = day.getDate();
|
||||
tMonth = tMonth + 1;
|
||||
if (tMonth.toString().length == 1) {
|
||||
tMonth = "0" + tMonth;
|
||||
}
|
||||
if (tDate.toString().length == 1) {
|
||||
tDate = "0" + tDate;
|
||||
}
|
||||
var dateStr = tYear + "-" + tMonth + "-" + tDate;
|
||||
var dateArray = [];
|
||||
dateArray.push(dateStr);
|
||||
if (archiveCalendar[dateStr]) {
|
||||
dateArray.push(archiveCalendar[dateStr]);
|
||||
}
|
||||
else {
|
||||
dateArray.push(0);
|
||||
}
|
||||
return dateArray;
|
||||
if(logChart){
|
||||
logChart.resize();
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -77,6 +77,16 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align: top;">首页展示模块</td>
|
||||
<td colspan="3">
|
||||
{volist name="layout" id="vo"}
|
||||
<div class="layui-input-inline" style="margin-right:10px;">
|
||||
<input type="checkbox" data-rule="{$vo.id}" name="layout[]" value="{$vo.id}" lay-skin="primary" title="{$vo.title}" {eq name="$vo.checked" value="true" }checked{/eq}>
|
||||
</div>
|
||||
{/volist}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align: top;">备注内容</td>
|
||||
<td colspan="3">
|
||||
|
@ -390,6 +390,7 @@ CREATE TABLE `oa_admin_group` (
|
||||
`title` varchar(255) NOT NULL DEFAULT '',
|
||||
`status` int(1) NOT NULL DEFAULT 1,
|
||||
`rules` text NULL COMMENT '用户组拥有的规则id',
|
||||
`layouts` text NULL COMMENT '首页展示模块',
|
||||
`desc` text NULL COMMENT '备注',
|
||||
`create_time` int(11) NOT NULL DEFAULT 0,
|
||||
`update_time` int(11) NOT NULL DEFAULT 0,
|
||||
@ -400,9 +401,9 @@ CREATE TABLE `oa_admin_group` (
|
||||
-- ----------------------------
|
||||
-- Records of cms_admin_group
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197', '超级员工权限,拥有系统的最高权限,不可修改。', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (2, '总经理权限', 1, '2,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,3,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,4,77,78,79,80,81,82,83,84,85,5,86,87,88,89,90,91,92,6,93,96,97,7,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,8,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197', '总经理的管理权限,可根据公司的具体需求调整。', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (3, '普通员工权限', 1, '5,89,90,91,92,6,93,96,97,7,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,8,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,137,138,139,140,141,142,143,144,145,146,147,149,150,151,152,153,154,155,156,157,158,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,189,190,191,192,193,194,195,196,197', '普通员工管理权限,可根据公司的具体需求调整。', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197', '1,2,3,4,5,6,7,8,9,10,11,12','超级员工权限,拥有系统的最高权限,不可修改。', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (2, '总经理权限', 1, '2,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,3,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,4,77,78,79,80,81,82,83,84,85,5,86,87,88,89,90,91,92,6,93,96,97,7,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,8,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197','1,2,3,4,5,6,7,8,9,10,11,12', '总经理的管理权限,可根据公司的具体需求调整。', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (3, '普通员工权限', 1, '5,89,90,91,92,6,93,96,97,7,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,8,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,137,138,139,140,141,142,143,144,145,146,147,149,150,151,152,153,154,155,156,157,158,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,189,190,191,192,193,194,195,196,197','1,2,3,4,5,6,7,8,9,10,11,12', '普通员工管理权限,可根据公司的具体需求调整。', 0, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_data_auth
|
||||
@ -1303,54 +1304,6 @@ CREATE TABLE `oa_work_record` (
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '汇报工作发送记录表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_customer_grade
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `oa_customer_grade`;
|
||||
CREATE TABLE `oa_customer_grade` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '客户等级名称',
|
||||
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '客户等级';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of oa_customer_grade
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_customer_grade` VALUES (1, '普通客户', 1, 1637987189, 0);
|
||||
INSERT INTO `oa_customer_grade` VALUES (2, 'VIP客户', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_grade` VALUES (3, '白银客户', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_grade` VALUES (4, '黄金客户', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_grade` VALUES (5, '钻石客户', 1, 1637987199, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_customer_source
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `oa_customer_source`;
|
||||
CREATE TABLE `oa_customer_source` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '客户渠道名称',
|
||||
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '客户来源';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of oa_customer_source
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_customer_source` VALUES (1, '独立开发', 1, 1637987189, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (2, '微信公众号', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (3, '今日头条', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (4, '百度搜索', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (5, '销售活动', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (6, '电话来访', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (7, '客户介绍', 1, 1637987199, 0);
|
||||
INSERT INTO `oa_customer_source` VALUES (8, '其他来源', 1, 1637987199, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_customer_grade
|
||||
-- ----------------------------
|
||||
|
76
config/layout.php
Normal file
76
config/layout.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
'id' => 1,
|
||||
'row' => 1,
|
||||
'name' => 'count',
|
||||
'title' => '模块统计',
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'row' => 1,
|
||||
'name' => 'event',
|
||||
'title' => '待办事项',
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'row' => 1,
|
||||
'name' => 'note',
|
||||
'title' => '企业公告',
|
||||
],
|
||||
[
|
||||
'id' => 4,
|
||||
'row' => 1,
|
||||
'name' => 'article',
|
||||
'title' => '知识列表',
|
||||
],
|
||||
[
|
||||
'id' => 5,
|
||||
'row' => 1,
|
||||
'name' => 'project',
|
||||
'title' => '项目列表',
|
||||
],
|
||||
[
|
||||
'id' => 6,
|
||||
'row' => 1,
|
||||
'name' => 'task',
|
||||
'title' => '任务列表',
|
||||
],
|
||||
[
|
||||
'id' => 7,
|
||||
'row' => 1,
|
||||
'name' => 'chartview',
|
||||
'title' => '今日员工活跃度',
|
||||
],
|
||||
[
|
||||
'id' => 8,
|
||||
'row' => 1,
|
||||
'name' => 'chartyear',
|
||||
'title' => '年度员工活跃度',
|
||||
],
|
||||
[
|
||||
'id' => 9,
|
||||
'row' => 2,
|
||||
'name' => 'fastentry',
|
||||
'title' => '快捷入口',
|
||||
],
|
||||
[
|
||||
'id' => 10,
|
||||
'row' => 2,
|
||||
'name' => 'system',
|
||||
'title' => '系统信息',
|
||||
],
|
||||
[
|
||||
'id' => 11,
|
||||
'row' => 2,
|
||||
'name' => 'ranking',
|
||||
'title' => '活跃员工',
|
||||
],
|
||||
[
|
||||
'id' => 12,
|
||||
'row' => 2,
|
||||
'name' => 'action',
|
||||
'title' => '员工动态',
|
||||
]
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user