diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php
index e15a085..1d6fa7e 100644
--- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php
+++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanModelController.php
@@ -195,9 +195,18 @@ class PlanModelController extends Controller
$userInfo = DB::table('users')->where(['id' => $userid])->first();
if (!isset($userInfo->department_id)) return \Yz::echoError1('该用户未绑定科室');
$department_id = $userInfo->department_id;
+ $type=isset($planInfo['type']) ?$planInfo['type']:0;
+ $resourceInfo=DB::table('s_department_resources')->where(['id' => $planInfo['resources_id']])->first();
+ if($resourceInfo->time_mode==1 and $type==0){
+ return \Yz::echoError1('请选择时令');
+ }
+ if($resourceInfo->time_mode==0 and $type != 0){
+ return \Yz::echoError1('时令配置异常,请刷新页面重试');
+ }
DB::beginTransaction();
$data = [
+ 'type'=>$type,
'department_id' => $department_id,
'weekname' => '',
'resources_id' => $planInfo['resources_id'],
@@ -213,6 +222,7 @@ class PlanModelController extends Controller
'date_type' => $date_type,
];
$param=[
+ 'type'=>$type,
'department_id' => $department_id,
'resources_id' => $planInfo['resources_id'],
'is_del' => 0,
diff --git a/Laravel/app/Services/Admin/YeWu/DepartmentResourceService.php b/Laravel/app/Services/Admin/YeWu/DepartmentResourceService.php
index 1f465de..8a7f543 100644
--- a/Laravel/app/Services/Admin/YeWu/DepartmentResourceService.php
+++ b/Laravel/app/Services/Admin/YeWu/DepartmentResourceService.php
@@ -48,6 +48,7 @@ class DepartmentResourceService
$list=$list->select(['a.*','s_department.department_name'])->skip(($page-1)*$pageSize)
->take($pageSize)->get() ;
foreach ($list as $k=>$v){
+ $list[$k]->time_range=json_decode($v->time_range,true);
$list[$k]->devicesInfo=DB::table('s_department_resources_device')
->join('s_devices', 's_department_resources_device.device_id', '=', 's_devices.id')
->select('s_devices.*')
diff --git a/YiJi-admin/src/components/Yewu/DepartmentResourcesSave.vue b/YiJi-admin/src/components/Yewu/DepartmentResourcesSave.vue
index 37a8fc1..142d77b 100644
--- a/YiJi-admin/src/components/Yewu/DepartmentResourcesSave.vue
+++ b/YiJi-admin/src/components/Yewu/DepartmentResourcesSave.vue
@@ -17,6 +17,47 @@
+
+
+
+
+
+
+
+
+
{{ season.type_name }}
+
+
+
+
+
+
+ 新增{{ season.type_name }}周期
+
+
+
+
+ 注意:调整时令,会影响该资源下全部模板
+
+