diff --git a/app/home/BaseController.php b/app/home/BaseController.php index 17c2853..48764ac 100644 --- a/app/home/BaseController.php +++ b/app/home/BaseController.php @@ -11,10 +11,10 @@ namespace app\home; use think\App; use think\exception\HttpResponseException; -use think\facade\Request; use think\facade\Cache; -use think\facade\Session; use think\facade\Db; +use think\facade\Request; +use think\facade\Session; use think\facade\View; /** @@ -53,12 +53,12 @@ abstract class BaseController */ public function __construct(App $app) { - $this->module = strtolower(app('http')->getName()); + $this->module = strtolower(app('http')->getName()); $this->app = $app; $this->request = $this->app->request; - $this->controller = strtolower($this->request->controller()); - $this->action = strtolower($this->request->action()); - $this->uid=0; + $this->controller = strtolower($this->request->controller()); + $this->action = strtolower($this->request->action()); + $this->uid = 0; // 控制器初始化 $this->initialize(); } @@ -69,40 +69,38 @@ abstract class BaseController $this->checkLogin(); $this->param = $this->request->param(); } - - /** - *验证用户登录 - */ + + /** + *验证用户登录 + */ protected function checkLogin() { - if ($this->controller !== 'login' && $this->controller !=='captcha' ) { + if ($this->controller !== 'login' && $this->controller !== 'captcha') { $session_admin = get_config('app.session_admin'); if (!Session::has($session_admin)) { if ($this->request->isAjax()) { return to_assign(404, '请先登录'); } else { - redirect('/home/login/index.html')->send(); + redirect('/home/login/index.html')->send(); exit; } + } else { + $this->uid = Session::get($session_admin)['id']; + View::assign('login_user', $this->uid); + // 验证用户访问权限 + if ($this->controller !== 'index' && $this->controller !== 'api') { + if (!$this->checkAuth()) { + if ($this->request->isAjax()) { + return to_assign(202, '你没有权限,请联系管理员或者人事部'); + } else { + echo '
你没有权限,请联系管理员或者人事部
';exit; + } + } + } } - else{ - $this->uid = Session::get($session_admin)['id']; - View::assign('login_user',$this->uid); - // 验证用户访问权限 - if ($this->controller !== 'index' && $this->controller !== 'api') { - if (!$this->checkAuth()) { - if ($this->request->isAjax()) { - return to_assign(202, '你没有权限,请联系管理员或者人事部'); - } else { - echo '
你没有权限,请联系管理员或者人事部
';exit; - } - } - } - } } - } - - + } + /** * 验证用户访问权限 * @DateTime 2020-12-21 @@ -113,20 +111,20 @@ abstract class BaseController protected function checkAuth() { //Cache::delete('RulesSrc' . $uid); - $uid = $this->uid; + $uid = $this->uid; if (!Cache::get('RulesSrc' . $uid) || !Cache::get('RulesSrc0')) { //用户所在权限组及所拥有的权限 // 执行查询 - $groups = []; - $position_id=Db::name('Admin')->where('id',$uid)->value('position_id'); - $groups = Db::name('PositionGroup') - ->alias('a') - ->join("AdminGroup g", "a.group_id=g.id", 'LEFT') - ->where([['a.pid','=',$position_id],['g.status','=',1]]) - ->select() - ->toArray(); - //保存用户所属用户组设置的所有权限规则id - $ids = []; + $groups = []; + $position_id = Db::name('Admin')->where('id', $uid)->value('position_id'); + $groups = Db::name('PositionGroup') + ->alias('a') + ->join("AdminGroup g", "a.group_id=g.id", 'LEFT') + ->where([['a.pid', '=', $position_id], ['g.status', '=', 1]]) + ->select() + ->toArray(); + //保存用户所属用户组设置的所有权限规则id + $ids = []; foreach ($groups as $g) { $ids = array_merge($ids, explode(',', trim($g['rules'], ','))); } @@ -151,14 +149,14 @@ abstract class BaseController $auth_list_all = Cache::get('RulesSrc0'); $auth_list = Cache::get('RulesSrc' . $uid); } - $pathUrl = $this->module. '/' .$this->controller . '/' . $this->action; + $pathUrl = $this->module . '/' . $this->controller . '/' . $this->action; if (!in_array($pathUrl, $auth_list)) { return false; } else { return true; } } - + // // 以下为新增,为了使用旧版的 success error redirect 跳转 start // diff --git a/app/home/controller/Article.php b/app/home/controller/Article.php index 181b4c8..bc5d3f2 100644 --- a/app/home/controller/Article.php +++ b/app/home/controller/Article.php @@ -66,8 +66,7 @@ class Article extends BaseController } return to_assign(); } - } - else{ + } else { $pid = isset($param['pid']) ? $param['pid'] : 0; View::assign('pid', $pid); return view(); @@ -100,17 +99,46 @@ class Article extends BaseController $param = get_params(); $where = array(); if (!empty($param['keywords'])) { - $where[] = ['a.id|a.title|a.keywords|a.desc|a.content|w.title', 'like', '%' . $param['keywords'] . '%']; + $where[] = ['a.id|a.title|a.keywords|a.desc|a.content|c.title', 'like', '%' . $param['keywords'] . '%']; } if (!empty($param['article_cate_id'])) { $where[] = ['a.article_cate_id', '=', $param['article_cate_id']]; } $where[] = ['a.status', '>=', 0]; + $where[] = ['a.is_share', '=', 1]; $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; $content = ArticleList::where($where) - ->field('a.*,w.id as cate_id,a.id as id,w.title as cate_title,a.title as title') + ->field('a.*,c.id as cate_id,a.id as id,c.title as cate_title,a.title as title,d.title as department,u.name as user') ->alias('a') - ->join('article_cate w', 'a.article_cate_id = w.id') + ->join('article_cate c', 'a.article_cate_id = c.id') + ->join('admin u', 'a.uid = u.id','LEFT') + ->join('department d', 'a.did = d.id','LEFT') + ->order('a.create_time desc') + ->paginate($rows, false, ['query' => $param]); + return table_assign(0, '', $content); + } else { + return view(); + } + } + + public function list() + { + if (request()->isAjax()) { + $param = get_params(); + $where = array(); + if (!empty($param['keywords'])) { + $where[] = ['a.id|a.title|a.keywords|a.desc|a.content|c.title', 'like', '%' . $param['keywords'] . '%']; + } + if (!empty($param['article_cate_id'])) { + $where[] = ['a.article_cate_id', '=', $param['article_cate_id']]; + } + $where[] = ['a.status', '>=', 0]; + $where[] = ['a.uid', '=', $this->uid]; + $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; + $content = ArticleList::where($where) + ->field('a.*,c.id as cate_id,a.id as id,c.title as cate_title,a.title as title') + ->alias('a') + ->join('article_cate c', 'a.article_cate_id = c.id') ->order('a.create_time desc') ->paginate($rows, false, ['query' => $param]); return table_assign(0, '', $content); @@ -165,6 +193,8 @@ class Article extends BaseController return to_assign(1, $e->getError()); } $param['create_time'] = time(); + $param['uid'] = $this->uid; + $param['did'] = get_login_admin('did'); Db::startTrans(); try { if (empty($param['desc'])) { @@ -196,8 +226,7 @@ class Article extends BaseController } else { return to_assign(1, '操作失败'); } - } - else{ + } else { $id = isset($param['id']) ? $param['id'] : 0; View::assign('id', $id); if ($id > 0) { @@ -209,6 +238,16 @@ class Article extends BaseController } } + //查看文章 + public function view() + { + $id = get_params("id"); + $detail = (new ArticleList())->detail($id); + // read 字段加 1 + Db::name('article')->where('id', $id)->inc('read')->update(); + View::assign('detail', $detail); + return view(); + } //删除文章 public function delete() { diff --git a/app/home/model/Article.php b/app/home/model/Article.php index 176ce99..cb860ca 100644 --- a/app/home/model/Article.php +++ b/app/home/model/Article.php @@ -22,13 +22,15 @@ class Article extends Model $keywrod_array = \think\facade\Db::name('ArticleKeywords') ->field('i.aid,i.keywords_id,k.title') ->alias('i') - ->join('keywords k', 'k.id = i.keywords_id', 'LEFT') + ->join('Keywords k', 'k.id = i.keywords_id', 'LEFT') ->order('i.create_time asc') ->where(array('i.aid' => $id, 'k.status' => 1)) ->select()->toArray(); $article['keyword_ids'] = implode(",", array_column($keywrod_array, 'keywords_id')); $article['keyword_names'] = implode(',', array_column($keywrod_array, 'title')); + $article['user'] = \think\facade\Db::name('Admin')->where(['id' => $article['uid']])->value('name'); + $article['department'] = \think\facade\Db::name('Department')->where(['id' => $article['did']])->value('title'); return $article; } diff --git a/app/home/view/article/add.html b/app/home/view/article/add.html index 0bd9a57..f4f81f2 100644 --- a/app/home/view/article/add.html +++ b/app/home/view/article/add.html @@ -2,14 +2,13 @@ {block name="body"}
+

新增文章

- - + - - - + - - + + + - - - - - - - - - + - + - + - + - + - + - +
文章标题 *文章标题 *
文章分类*文章分类* 关键字* +
关键字* 状态* - - -
排序 - - 是否共享 - - - 属性属性
是否原创是否共享 - - + + 作者/来源状态 - + + 来源链接排序 - +
文章摘要文章摘要 缩略图缩略图
- +
@@ -82,7 +68,7 @@
文章内容*文章内容* @@ -92,7 +78,6 @@
-
{/block} @@ -140,7 +125,7 @@ function init(layui) { success: function (e) { if (e.code == 0) { layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - window.location.href="{:url('home/article/index')}"; + parent.location.reload(); }); } else { layer.msg(e.msg); @@ -149,16 +134,11 @@ function init(layui) { }) return false; }); - //监听返回 - $('.body-content').on('click', '[lay-event="back"]', function () { - history.back(-1); - return false; - }); } {include file="common/layui" base="base" extend="['tagpicker']" callback="init" /} -{include file="common/ueditor" id="container" name="content" width="776" height="500" toolbar="[]" /} +{include file="common/ueditor" id="container" name="content" width="750" height="500" toolbar="[]" /} {/block} \ No newline at end of file diff --git a/app/home/view/article/edit.html b/app/home/view/article/edit.html index 0a093b6..4f696b8 100644 --- a/app/home/view/article/edit.html +++ b/app/home/view/article/edit.html @@ -2,15 +2,13 @@ {block name="body"}
-
+

编辑文章

- - + - - - + - - + + + + - - - - - - - - - + - + - + - + - + - + - +
文章标题 * 文章标题 *
文章分类*文章分类* - 关键字* +
关键字* 状态* - - -
排序 - - 是否共享 - - - 属性属性
是否原创是否共享* - - + + 作者/来源状态 - + + 来源链接排序 - +
摘要文章摘要 缩略图缩略图
- +
@@ -86,7 +68,7 @@
文章内容*文章内容* @@ -94,12 +76,10 @@
- - - - + + +
-
{/block} @@ -146,7 +126,7 @@ success: function (e) { if (e.code == 0) { layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - window.location.href="{:url('home/article/index')}"; + parent.location.reload(); }); } else { layer.msg(e.msg); @@ -155,16 +135,11 @@ }) return false; }); - //监听返回 - $('.body-content').on('click', '[lay-event="back"]', function () { - history.back(-1); - return false; - }); } {include file="common/layui" base='base' extend="['tagpicker']" callback="init" /} -{include file="common/ueditor" id="container" name="content" width="776" height="500" toolbar="[]" /} +{include file="common/ueditor" id="container" name="content" width="750" height="500" toolbar="[]" /} {/block} \ No newline at end of file diff --git a/app/home/view/article/index.html b/app/home/view/article/index.html index ea8c38c..72ba83d 100644 --- a/app/home/view/article/index.html +++ b/app/home/view/article/index.html @@ -19,19 +19,13 @@
- - {/block} @@ -42,6 +36,7 @@ function init(layui) { var TAB = parent.layui.tab, table = layui.table, + rightpage = layui.rightpage, form = layui.form; var tableIns = table.render({ @@ -62,60 +57,54 @@ field: 'sort', title: '排序', align: 'center', - width: 80 + width: 66 }, { field: 'cate_title', title: '分类', - width: 200 + align: 'center', + width: 120 }, { field: 'title', - title: '文章标题', - templet: '' - }, { - field: 'status', - title: '状态', - toolbar: '#status', + title: '文章标题' + },{ + field: 'read', + title: '阅读量', align: 'center', - width: 66 + width: 80 }, { - field: 'is_home', - title: '首页共享', - toolbar: '#is_share', + field: 'user', + title: '发布人', align: 'center', - width: 90 + width: 80 + }, { + field: 'department', + title: '部门', + align: 'center', + width: 100 }, { field: 'right', title: '操作', toolbar: '#barDemo', - width: 100, + width: 60, align: 'center' } ] ] }); - + + //表头工具栏事件 + table.on('toolbar(test)', function(obj){ + if (obj.event === 'add') { + rightpage.open("{:url('home/article/add')}"); + return; + } + }); //监听行工具事件 table.on('tool(test)', function(obj) { var data = obj.data; - if (obj.event === 'del') { - layer.confirm('确定要删除吗?', { - icon: 3, - title: '提示' - }, function(index) { - $.ajax({ - url: "{:url('home/article/delete')}", - data: { - id: data.id - }, - success: function(e) { - layer.msg(e.msg); - if (e.code == 0) { - obj.del(); - } - } - }) - layer.close(index); - }); + if(obj.event === 'view'){ + rightpage.open('/home/article/view?id='+data.id); + return; } }); @@ -134,6 +123,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} diff --git a/app/home/view/article/list.html b/app/home/view/article/list.html new file mode 100644 index 0000000..dbcf5c4 --- /dev/null +++ b/app/home/view/article/list.html @@ -0,0 +1,160 @@ +{extend name="common/base"/} + +{block name="body"} +
+
+
+ +
+
+ +
+ +
+
+
+ + + + + +{/block} + + + +{block name="script"} + +{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{/block} + diff --git a/app/home/view/article/view.html b/app/home/view/article/view.html new file mode 100644 index 0000000..049c6ea --- /dev/null +++ b/app/home/view/article/view.html @@ -0,0 +1,56 @@ +{extend name="common/base"/} + +{block name="body"} +
+

文章详情

+ + + + + + + + + + + + + + + + + + + + + + {notempty name="$detail.origin_url"} + + + + + {/notempty} + + + + +
文章标题{$detail.title}文章分类 + {volist name=":set_recursion(get_article_cate())" id="v"} + {eq name="$detail.article_cate_id" value="$v.id" }{$v.title}{/eq} + {/volist} +
关键字{$detail.keyword_names}阅读量{$detail.read}
发布时间{$detail.create_time | date='Y-m-d H:i:s'}发布人{$detail.user}部门{$detail.department}
来源链接{$detail.origin_url}
文章内容{$detail.content|raw}
+
+{/block} + + + +{block name="script"} + +{include file="common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/mail/add.html b/app/home/view/mail/add.html index 78a300b..27a5654 100644 --- a/app/home/view/mail/add.html +++ b/app/home/view/mail/add.html @@ -6,7 +6,7 @@ {block name="body"}
-

发送消息

+

发送消息

{if condition="$id eq 0"} diff --git a/app/home/view/mail/inbox.html b/app/home/view/mail/inbox.html index 69591cc..c798bd3 100644 --- a/app/home/view/mail/inbox.html +++ b/app/home/view/mail/inbox.html @@ -126,6 +126,7 @@ return; } }); + //表头工具栏事件 table.on('toolbar(test)', function(obj){ var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态 diff --git a/app/home/view/rule/add.html b/app/home/view/rule/add.html index e235afc..0f367fc 100644 --- a/app/home/view/rule/add.html +++ b/app/home/view/rule/add.html @@ -52,7 +52,7 @@ //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "{:url('home/rule/post_submit')}", + url: "{:url('home/rule/add')}", type: 'post', data: data.field, success: function (e) { diff --git a/app/install/data/gouguoa.sql b/app/install/data/gouguoa.sql index 692c9df..bd7ce24 100644 --- a/app/install/data/gouguoa.sql +++ b/app/install/data/gouguoa.sql @@ -67,7 +67,7 @@ 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', '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', '超级员工权限,拥有系统的最高权限,不可修改', '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', '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', '超级员工权限,拥有系统的最高权限,不可修改', '0', '0'); -- ---------------------------- -- Table structure for oa_admin_log @@ -293,39 +293,41 @@ INSERT INTO `oa_admin_rule` VALUES (84, 6, 'home/article/cate', '知识分类',' INSERT INTO `oa_admin_rule` VALUES (85, 84, 'home/article/cate_add', '添加/修改知识分类','知识分类', 0, 0); INSERT INTO `oa_admin_rule` VALUES (86, 84, 'home/article/cate_delete', '删除知识分类','知识分类', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (87, 6, 'home/article/index', '知识列表','知识文章', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (87, 6, 'home/article/index', '共享知识','知识文章', 0, 0); INSERT INTO `oa_admin_rule` VALUES (88, 87, 'home/article/add', '添加/修改知识文章','知识文章', 0, 0); INSERT INTO `oa_admin_rule` VALUES (89, 87, 'home/article/delete', '删除知识文章','知识文章', 0, 0); INSERT INTO `oa_admin_rule` VALUES (90, 87, 'home/article/view', '查看知识文章','知识文章', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (91, 7, 'home/plan/index', '工作计划','工作计划', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (92, 91, 'home/plan/calendar', '工作计划日历','工作计划', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (93, 91, 'home/plan/add', '添加/编辑工作计划','工作计划', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (94, 91, 'home/plan/delete', '删除工作计划','工作计划', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (95, 91, 'home/plan/detail', '查看工作计划','工作计划', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (91, 6, 'home/article/list', '个人知识','知识文章', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (96, 7, 'home/schedule/index', '工作记录','工作记录', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (97, 96, 'home/schedule/calendar', '工作记录日历','工作日历', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (98, 96, 'home/schedule/add', '添加/编辑工作记录','工作记录', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (99, 96, 'home/schedule/delete', '删除工作记录','工作记录', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (100, 96, 'home/schedule/detail', '查看工作记录','工作记录', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (101, 96, 'home/schedule/update_labor_time', '更改工时','工时', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (92, 7, 'home/plan/index', '工作计划','工作计划', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (93, 92, 'home/plan/calendar', '工作计划日历','工作计划', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (94, 92, 'home/plan/add', '添加/编辑工作计划','工作计划', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (95, 92, 'home/plan/delete', '删除工作计划','工作计划', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (96, 92, 'home/plan/detail', '查看工作计划','工作计划', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (102, 8, 'home/expense/index', '报销管理','报销', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (103, 102, 'home/expense/add', '新增/编辑报销','报销', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (104, 102, 'home/expense/delete', '删除报销','报销', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (105, 102, 'home/expense/view', '查看报销信息','报销', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (106, 102, 'home/expense/check', '设置报销状态','报销状态', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (97, 7, 'home/schedule/index', '工作记录','工作记录', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (98, 97, 'home/schedule/calendar', '工作记录日历','工作日历', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (99, 97, 'home/schedule/add', '添加/编辑工作记录','工作记录', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (100, 97, 'home/schedule/delete', '删除工作记录','工作记录', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (101, 97, 'home/schedule/detail', '查看工作记录','工作记录', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (102, 97, 'home/schedule/update_labor_time', '更改工时','工时', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (107, 8, 'home/invoice/index', '发票管理','发票', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (108, 107, 'home/invoice/add', '新增/编辑发票','发票', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (109, 107, 'home/invoice/delete', '删除发票','发票', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (110, 107, 'home/invoice/view', '查看发票信息','发票', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (111, 107, 'home/invoice/check', '设置发票状态','发票状态', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (103, 8, 'home/expense/index', '报销管理','报销', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (104, 103, 'home/expense/add', '新增/编辑报销','报销', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (105, 103, 'home/expense/delete', '删除报销','报销', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (106, 103, 'home/expense/view', '查看报销信息','报销', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (107, 103, 'home/expense/check', '设置报销状态','报销状态', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (112, 8, 'home/income/index', '到账管理','到账', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (113, 112, 'home/income/add', '新增到账','到账', 0, 0); -INSERT INTO `oa_admin_rule` VALUES (114, 112, 'home/income/check', '设置到账状态','到账状态', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (108, 8, 'home/invoice/index', '发票管理','发票', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (109, 108, 'home/invoice/add', '新增/编辑发票','发票', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (110, 108, 'home/invoice/delete', '删除发票','发票', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (111, 108, 'home/invoice/view', '查看发票信息','发票', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (112, 108, 'home/invoice/check', '设置发票状态','发票状态', 0, 0); + +INSERT INTO `oa_admin_rule` VALUES (113, 8, 'home/income/index', '到账管理','到账', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (114, 113, 'home/income/add', '新增到账','到账', 0, 0); +INSERT INTO `oa_admin_rule` VALUES (115, 113, 'home/income/check', '设置到账状态','到账状态', 0, 0); -- ---------------------------- -- Table structure for oa_article @@ -334,19 +336,19 @@ DROP TABLE IF EXISTS `oa_article`; CREATE TABLE `oa_article` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '' COMMENT '知识文章标题', + `article_cate_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联分类id', `keywords` varchar(255) NULL DEFAULT '' COMMENT '关键字', `desc` varchar(1000) NULL DEFAULT '' COMMENT '摘要', - `status` int(1) NOT NULL DEFAULT 1 COMMENT '状态:1正常-1下架', `thumb` int(11) NOT NULL DEFAULT 0 COMMENT '缩略图id', - `original` int(1) NOT NULL DEFAULT 0 COMMENT '是否原创,1原创', - `origin` varchar(255) NOT NULL DEFAULT '' COMMENT '来源或作者', + `uid` int(11) NOT NULL DEFAULT 0 COMMENT '作者', + `did` int(11) NOT NULL DEFAULT 0 COMMENT '部门', `origin_url` varchar(255) NOT NULL DEFAULT '' COMMENT '来源地址', - `content` text NOT NULL, + `content` text NOT NULL COMMENT '文章内容', `read` int(11) NOT NULL DEFAULT 0 COMMENT '阅读量', `type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '属性:1精华 2热门 3推荐', `is_share` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否分享,0否,1是', + `status` int(1) NOT NULL DEFAULT 1 COMMENT '状态:1正常-1下架', `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序', - `article_cate_id` int(11) NOT NULL DEFAULT 0, `create_time` int(11) NOT NULL DEFAULT 0, `update_time` int(11) NOT NULL DEFAULT 0, `delete_time` int(11) NOT NULL DEFAULT 0, diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css index aaac580..ef39e27 100644 --- a/public/static/home/css/common.css +++ b/public/static/home/css/common.css @@ -102,4 +102,5 @@ .layui-anim-rl.layui-layer-iframe{ overflow:inherit!important; } -.right-popup-close{position: absolute;width:50px;height:44px;line-height:44px;text-align:center; left: -50px;right:0; top: 50px;background-color:#FF5722;color:#fff;border-radius:4px 0 0 4px; cursor:pointer} \ No newline at end of file +.right-popup-close{position: absolute;width:50px;height:44px;line-height:44px;text-align:center; left: -52px;right:0; top: 50px;background-color:#FF5722;color:#fff;border-radius:6px 0 0 6px; cursor:pointer; border:2px solid #fff;} +.h3-title{font-size:18px; height:36px; font-weight:800} \ No newline at end of file