From ff7c1eb579c6db6ee9c573d429f88a8946de7ed1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B2=A9=E4=BB=9488?= <>
Date: Thu, 12 Mar 2026 15:42:51 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E4=BB=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../API/Admin/YeWu/PlanModelController.php | 10 +
.../Admin/YeWu/DepartmentResourceService.php | 1 +
.../Yewu/DepartmentResourcesSave.vue | 144 +++++++++++-
.../src/views/AppointmentMngr/PlanModel.vue | 214 ++----------------
.../src/views/YeWu/DepartmentResources.vue | 17 ++
5 files changed, 188 insertions(+), 198 deletions(-)
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 }}周期
+
+
+
+
+ 注意:调整时令,会影响该资源下全部模板
+
+