From f92733e5b6be24ff136b0472f741c01d3d48897f Mon Sep 17 00:00:00 2001 From: hdm Date: Sun, 3 Jul 2022 17:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C=E6=97=A5?= =?UTF-8?q?=E5=8E=86=E6=97=B6=E8=AF=BB=E5=8F=96=E5=B7=A5=E4=BD=9C=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E9=94=99=E8=AF=AF=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/oa/controller/Plan.php | 4 +++- app/oa/controller/Schedule.php | 2 +- app/oa/view/schedule/index.html | 2 +- public/static/assets/gougu/module/oaSchedule.js | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/oa/controller/Plan.php b/app/oa/controller/Plan.php index 791c854..b3658f4 100644 --- a/app/oa/controller/Plan.php +++ b/app/oa/controller/Plan.php @@ -85,7 +85,7 @@ class Plan extends BaseController ->field('id,title,type,remind_type,start_time,end_time') ->select()->toArray(); $events = []; - $color_array=['#393D49','#FF5722','#FFB800','#1E9FFF','#12bb37']; + $color_array=['#393D49','#FF5722','#FFB800','#1E9FFF','#12bb37','#696969']; foreach ($schedule as $k => $v) { $v['backgroundColor'] = $color_array[$v['type']]; $v['borderColor'] = $color_array[$v['type']]; @@ -134,9 +134,11 @@ class Plan extends BaseController if ($param['end_time'] <= $param['start_time']) { return to_assign(1, "结束时间需要大于开始时间"); } + /* if ($param['start_time'] <= time()) { return to_assign(1, "开始时间需要大于当前时间"); } + */ if (isset($param['remind_type'])) { if($param['remind_type']==1){ $param['remind_time'] = $param['start_time']-5*60; diff --git a/app/oa/controller/Schedule.php b/app/oa/controller/Schedule.php index b4da66e..a5e5193 100644 --- a/app/oa/controller/Schedule.php +++ b/app/oa/controller/Schedule.php @@ -45,7 +45,7 @@ class Schedule extends BaseController $where[] = ['a.delete_time', '=', 0]; $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; $schedule = ScheduleList::where($where) - ->field('a.*,u.name,d.title as department,w.title as cate') + ->field('a.*,u.name,d.title as department,w.title as work_cate') ->alias('a') ->join('Admin u', 'a.admin_id = u.id', 'LEFT') ->join('Department d', 'u.did = d.id', 'LEFT') diff --git a/app/oa/view/schedule/index.html b/app/oa/view/schedule/index.html index 01bfa7d..5e77bde 100644 --- a/app/oa/view/schedule/index.html +++ b/app/oa/view/schedule/index.html @@ -104,7 +104,7 @@ } return html; }} - ,{field: 'cate', title: '工作类别', align:'center',width:80} + ,{field: 'work_cate', title: '工作类别', align:'center',width:80} ,{field: 'start_time', title: '工作时间范围', align:'center',width:186,templet:function(d){ var html=d.start_time+'至'+d.end_time; return html; diff --git a/public/static/assets/gougu/module/oaSchedule.js b/public/static/assets/gougu/module/oaSchedule.js index db3bbf0..7f11afb 100644 --- a/public/static/assets/gougu/module/oaSchedule.js +++ b/public/static/assets/gougu/module/oaSchedule.js @@ -66,7 +66,7 @@ layui.define(['tool'], function (exports) { 所在部门 ${detail.department} 工作类别 - ${detail.cate} + ${detail.work_cate} 时间范围 @@ -156,7 +156,7 @@ layui.define(['tool'], function (exports) { 工作类别* - +