Compare commits

..

No commits in common. 'dev' and 'main' have entirely different histories.
dev ... main

@ -38,23 +38,21 @@ public function BindDevice(Request $request)
}
//批量更新检查须知/温馨提示
public function BatchUpdateNotice(Request $request)
public function BatchUpdateNotice()
{
$item_ids = request('item_ids');
$field = request('field');
$value = request('value');
$userid = $request->get('userid');
$service = new DeptCheckItemService();
return $service->BatchUpdateNotice($item_ids, $field, $value, $userid);
return $service->BatchUpdateNotice($item_ids, $field, $value);
}
//保存检查项目信息
public function Save(Request $request)
public function Save()
{
$Info = request('Info');
$userid = $request->get('userid');
$service = new DeptCheckItemService();
return $service->Save($Info, $userid);
return $service->Save($Info);
}
//同步检查项目分类

@ -16,7 +16,7 @@ public function GetList(){
$list=DB::table('s_list')
->leftJoin('s_period','s_list.reservation_time','=','s_period.id')
->leftJoin('s_department_resources','s_list.reservation_sources','=','s_department_resources.id')
->select('s_list.*',DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'),DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'),'s_department_resources.department_resources_name');
->select('s_list.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name');
if ($searchInfo['dateRange']!=null and count($searchInfo['dateRange']) == 2) {
$list = $list->where(function ($q) use($searchInfo) {
$q->whereBetween('s_list.entrust_date', $searchInfo['dateRange'])
@ -79,13 +79,11 @@ public function getMainDetail_duoren()
$entrustids = request('entrustid');
$episodeid = request('episodeid');
$appointment_type=request('appointment_type');
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
if(empty($entrustInfos)) return \Yz::echoError1("entrustInfo不能为空");
$allInfo=[];
foreach ($entrustInfos as $key => $entrustInfo) {
$info = DB::table('s_list as a')->where(['a.reg_num' => $entrustInfo['reg_num'], 'a.episodeid'=>$entrustInfo['episodeid'],'a.is_nullify'=>0])
->select('a.*',DB::raw('COALESCE(a.reservation_begin_time, c.period_begin_time) as period_begin_time'),DB::raw('COALESCE(a.reservation_end_time, c.period_end_time) as period_end_time'))
->select('a.*','c.period_begin_time','c.period_end_time')
->leftJoin('s_period as c','a.reservation_time','=','c.id')
->whereIn('a.entrust_id',$entrustInfo['entrustid'])
->get();
@ -98,12 +96,6 @@ public function getMainDetail_duoren()
foreach ($info as $value){
$ii = DB::table('s_check_item as a')
->leftJoin('s_check_item_device as b','a.id','=','b.item_id')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 'a.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->select('a.*', 'b.device_id',
DB::raw('COALESCE(s_dept_check_item.reservation_method, a.reservation_method) as reservation_method'))
->where(['a.item_code' => $value->entrust_code,'a.status'=>1,"a.is_del"=>0])->first();

@ -175,13 +175,6 @@ public function ChangeInfo(Request $request)
$u1 = DB::table('s_source_roster_detail')->where(['id' => $PlanDetaiInfo['id']])->update([
'status' => $PlanDetaiInfo['status']
]);
// 更新截止时间
$timeUpdated = false;
if (isset($PlanDetaiInfo['end_reservation_time'])) {
$timeUpdated = DB::table('s_source_roster_detail')->where(['id' => $PlanDetaiInfo['id']])->update([
'end_reservation_time' => $PlanDetaiInfo['end_reservation_time']
]) > 0;
}
$i = 0;
foreach ($PlanDetaiInfo['coutsInfo'] as $key => $value) {
$u2 = DB::table('s_source_roster_detail_count')->where(['id' => $value['id']])->update([
@ -190,7 +183,7 @@ public function ChangeInfo(Request $request)
]);
if ($u2) $i++;
}
if ($u1 or $i > 0 or $timeUpdated) {
if ($u1 or $i > 0) {
return \Yz::Return(true, '保存成功', []);
} else {
return \Yz::echoError1('没有数据更新');
@ -221,11 +214,9 @@ public function GetEnablePlan()
$episodeid = request('episodeid');
$appointment_type = request('appointment_type'); //预约类型
$appointment_date = request('date'); //预约日期
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
$service = new PlanListService();
return $service->GetEnablePlan($regnum, $entrustid, $episodeid, $appointment_type, $appointment_date, 'all', $deptId);
return $service->GetEnablePlan($regnum, $entrustid, $episodeid, $appointment_type, $appointment_date);
}
//最优时间/单天全检 分配
@ -238,11 +229,9 @@ public function GetOptimalPlan()
$appointment_type = request('appointment_type');
$items = request('items');
$occupied_plan_ids = request('occupied_plan_ids', []);
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
$service = new PlanListService();
return $service->GetOptimalPlan($type, $regnum, $entrustid, $episodeid, $appointment_type, $items, 'all', $deptId, $occupied_plan_ids);
return $service->GetOptimalPlan($type, $regnum, $entrustid, $episodeid, $appointment_type, $items, 'all', 0, $occupied_plan_ids);
}
//获取最近可用的,计划 日期
@ -254,8 +243,6 @@ public function NearestEnablePlanDate()
$episodeid = request('episodeid');
$appointment_type = request('appointment_type'); //预约类型
$appointment_date = request('date'); //预约日期
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
$service = new PlanListService();
$date_arr = [];
@ -269,7 +256,7 @@ public function NearestEnablePlanDate()
$currentDate = $startDate;
while ($currentDate <= $endDate) {
$nowdate = $currentDate->format('Y-m-d');
$s = $service->GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_type, $nowdate, 'all', $deptId);
$s = $service->GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_type, $nowdate);
if ($s['status']) {
$list = $s['data']['plan_list'];
if (count($list) > 0) {
@ -303,20 +290,6 @@ public function YuYue()
$service = new PlanListService();
return $service->YuYue($planid, $appointment_type, $mainlistid, $do_type,$is_emergency,$do_userid);
}
public function PreCheckYuYue()
{
$do_userid = request('do_user') ?: request()->get('userid');
$is_emergency = request('is_emergency');
$appointment_type = request('appointment_type');
$do_type = request('dotype');
$groups = request('groups');
if (!isset($do_type)) return \Yz::echoError1('参数:操作类型 不能为空');
if (empty($groups) || !is_array($groups)) return \Yz::echoError1('参数groups 不能为空');
$service = new PlanListService();
return $service->PreCheckYuYue($groups, $appointment_type, $do_type, $is_emergency, $do_userid);
}
//自动预约
public function AutoYuYue()
{
@ -325,8 +298,6 @@ public function AutoYuYue()
$entrustids = request('entrustid');
$episodeid = request('episodeid');
$appointment_type = request('appointment_type'); //预约类型
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
$TodayDateTime = date("Y-m-d H:i:s");
$service = new PlanListService();
@ -339,7 +310,7 @@ public function AutoYuYue()
$enable_plan=false;
while ($currentDate <= $endDate) {
$nowdate = $currentDate->format('Y-m-d');
$s = $service->GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_type, $nowdate, 'all', $deptId);
$s = $service->GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_type, $nowdate);
if ($s['status']) {
$list = $s['data']['plan_list'];
if (count($list) > 0) {
@ -415,13 +386,7 @@ public function GetUsedList()
->where('s_check_item.is_del', 0)
->where('s_check_item.status', 1);
})
->leftJoin('s_dept_check_item', function($j) {
$j->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->on('s_dept_check_item.department_id', '=', 's_list.department_id');
})
->select('s_list.*', 's_department_resources.department_resources_name',
DB::raw('COALESCE(s_dept_check_item.use_seats, s_check_item.use_seats, 1) as use_seats'),
DB::raw('COALESCE(s_dept_check_item.is_share_slot, s_check_item.is_share_slot, 0) as is_share_slot'))
->select('s_list.*', 's_department_resources.department_resources_name', 's_check_item.use_seats', 's_check_item.is_share_slot')
->where(['s_list.roster_id' => $planid, 's_list.is_del' => 0, 's_list.is_nullify' => 0])->whereIn('s_list.list_status', [1, 2, 3]);
if (!empty($qudaoid)) {
$list = $list->where(['s_list.appointment_type_id' => $qudaoid]);
@ -759,7 +724,6 @@ public function SaveLockedCount(Request $request)
$userid = $request->get('userid');
$roster_detail_id = request('roster_detail_id');
$locked_counts = request('locked_counts');
$locked_remark = request('locked_remark');
if (empty($roster_detail_id)) {
return \Yz::echoError1('计划明细ID不能为空');
@ -827,11 +791,6 @@ public function SaveLockedCount(Request $request)
}
}
// 更新占位备注(时段级,无条件覆盖)
DB::table('s_source_roster_detail')
->where('id', $roster_detail_id)
->update(['locked_remark' => $locked_remark ?? null]);
// 有变更时记录日志
if (!empty($changes)) {
DB::table('s_source_roster_detail_log')->insert([
@ -902,13 +861,6 @@ public function ChangeInfoAdmin(Request $request)
$u1 = DB::table('s_source_roster_detail')->where(['id' => $PlanDetaiInfo['id']])->update([
'status' => $PlanDetaiInfo['status']
]);
// 更新截止时间
$timeUpdated = false;
if (isset($PlanDetaiInfo['end_reservation_time'])) {
$timeUpdated = DB::table('s_source_roster_detail')->where(['id' => $PlanDetaiInfo['id']])->update([
'end_reservation_time' => $PlanDetaiInfo['end_reservation_time']
]) > 0;
}
$i = 0;
foreach ($PlanDetaiInfo['coutsInfo'] as $key => $value) {
$u2 = DB::table('s_source_roster_detail_count')->where(['id' => $value['id']])->update([
@ -917,7 +869,7 @@ public function ChangeInfoAdmin(Request $request)
]);
if ($u2) $i++;
}
if ($u1 or $i > 0 or $timeUpdated) {
if ($u1 or $i > 0) {
return \Yz::Return(true, '保存成功', []);
} else {
return \Yz::echoError1('没有数据更新');
@ -1207,7 +1159,6 @@ public function BatchChangeCount(Request $request)
$ids = request('ids');
$max_total = request('max_total');
$coutsInfo = request('coutsInfo');
$end_reservation_time = request('end_reservation_time');
if (empty($ids) || empty($coutsInfo)) {
return \Yz::echoError1('参数错误');
}
@ -1226,16 +1177,7 @@ public function BatchChangeCount(Request $request)
WHERE roster_detail_id IN ({$idsStr})
AND appointment_type_id IN ({$atypeIdsStr})";
$u2 = DB::update($sql);
$timeUpdated = false;
// 更新截止时间(同一时间段时传入)
if ($end_reservation_time !== null) {
$timeUpdated = DB::table('s_source_roster_detail')
->whereIn('id', $ids)
->where('department_id', $department_id)
->where('is_del', 0)
->update(['end_reservation_time' => $end_reservation_time]) > 0;
}
if ($u2 > 0 || $timeUpdated) {
if ($u2 > 0) {
return \Yz::Return(true, '批量修改成功', []);
} else {
return \Yz::echoError1('批量修改失败');
@ -1254,7 +1196,6 @@ public function BatchChangeLocked(Request $request)
}
$ids = request('ids');
$coutsInfo = request('coutsInfo');
$locked_remark = request('locked_remark');
if (empty($ids) || empty($coutsInfo)) {
return \Yz::echoError1('参数错误');
}
@ -1297,10 +1238,6 @@ public function BatchChangeLocked(Request $request)
AND appointment_type_id IN ({$atypeIdsStr})";
$u2 = DB::update($sql);
if ($u2 !== false) {
// 更新占位备注(时段级,无条件覆盖)
DB::table('s_source_roster_detail')
->whereIn('id', array_map('intval', $ids))
->update(['locked_remark' => $locked_remark ?? null]);
return \Yz::Return(true, '批量占位成功', []);
} else {
return \Yz::echoError1('批量占位失败');

@ -220,7 +220,7 @@ public function Save(Request $request)
'begin_time' => $planInfo['begin_time'],
'end_time' => $planInfo['end_time'],
'end_reservation_time' => $planInfo['end_reservation_time'],
'time_unit' => $planInfo['time_unit'] ?? 0,
'time_unit' => $planInfo['time_unit'],
'status' => $planInfo['status'],
'adduser' => $userid,
'date_type' => $date_type,
@ -558,7 +558,7 @@ public function BatchEnable(Request $request)
}
}
//批量修改计划模板(渠道数量+病人类型+可选时间字段
//批量修改计划模板(渠道数量+病人类型)
public function BatchChange(Request $request)
{
$userid = $request->get('userid');
@ -566,9 +566,6 @@ public function BatchChange(Request $request)
$max_total = request('max_total');
$coutsInfo = request('coutsInfo');
$patientType = request('patientType');
$begin_time = request('begin_time');
$end_time = request('end_time');
$end_reservation_time = request('end_reservation_time');
if (empty($ids) || !is_array($ids)) {
return \Yz::echoError1('请选择要修改的记录');
@ -588,19 +585,11 @@ public function BatchChange(Request $request)
$patient_type_str = !empty($patientType) ? implode(',', $patientType) : '';
foreach ($ids as $id) {
$rosterData = [];
// 更新病人类型
if ($patient_type_str !== '') {
$rosterData['patient_type'] = $patient_type_str;
}
// 更新时间字段(同一时间段时传入)
if ($begin_time !== null) $rosterData['begin_time'] = $begin_time;
if ($end_time !== null) $rosterData['end_time'] = $end_time;
if ($end_reservation_time !== null) $rosterData['end_reservation_time'] = $end_reservation_time;
if (!empty($rosterData)) {
DB::table('s_source_roster')
->where(['id' => $id, 'department_id' => $department_id, 'is_del' => 0])
->update($rosterData);
->update(['patient_type' => $patient_type_str]);
}
// 更新渠道数量
@ -720,7 +709,7 @@ public function SaveAdmin(Request $request)
'begin_time' => $planInfo['begin_time'],
'end_time' => $planInfo['end_time'],
'end_reservation_time' => $planInfo['end_reservation_time'],
'time_unit' => $planInfo['time_unit'] ?? 0,
'time_unit' => $planInfo['time_unit'],
'status' => $planInfo['status'],
'adduser' => $userid,
'date_type' => $date_type,
@ -923,7 +912,7 @@ public function BatchEnableAdmin(Request $request)
}
}
//管理员批量修改计划模板(渠道数量+病人类型+可选时间字段
//管理员批量修改计划模板(渠道数量+病人类型)
public function BatchChangeAdmin(Request $request)
{
$department_id = request('department_id');
@ -934,9 +923,6 @@ public function BatchChangeAdmin(Request $request)
$max_total = request('max_total');
$coutsInfo = request('coutsInfo');
$patientType = request('patientType');
$begin_time = request('begin_time');
$end_time = request('end_time');
$end_reservation_time = request('end_reservation_time');
if (empty($ids) || !is_array($ids)) {
return \Yz::echoError1('请选择要修改的记录');
@ -950,19 +936,11 @@ public function BatchChangeAdmin(Request $request)
$patient_type_str = !empty($patientType) ? implode(',', $patientType) : '';
foreach ($ids as $id) {
$rosterData = [];
// 更新病人类型
if ($patient_type_str !== '') {
$rosterData['patient_type'] = $patient_type_str;
}
// 更新时间字段(同一时间段时传入)
if ($begin_time !== null) $rosterData['begin_time'] = $begin_time;
if ($end_time !== null) $rosterData['end_time'] = $end_time;
if ($end_reservation_time !== null) $rosterData['end_reservation_time'] = $end_reservation_time;
if (!empty($rosterData)) {
DB::table('s_source_roster')
->where(['id' => $id, 'department_id' => $department_id, 'is_del' => 0])
->update($rosterData);
->update(['patient_type' => $patient_type_str]);
}
// 更新渠道数量

@ -16,7 +16,7 @@ public function SignIn(Request $request)
$MainListIds = request('MainListIds');
if(empty($MainListIds)) return \Yz::echoError1('id参数不能为空');
$mainInfos=DB::table('s_list as a')
->select('a.*',DB::raw('COALESCE(a.reservation_begin_time, b.period_begin_time) as period_begin_time'),DB::raw('COALESCE(a.reservation_end_time, b.period_end_time) as period_end_time'))
->select('a.*','b.period_begin_time','b.period_end_time')
->leftJoin('s_period as b','a.reservation_time','=','b.id')
->whereIn('a.id',$MainListIds)->where(['a.is_del'=>0])->get();
//遍历判断所有要预约的医嘱是否符合条件
@ -145,7 +145,7 @@ public function CancelSign(Request $request)
$MainListIds = request('MainListIds');
if(empty($MainListIds)) return \Yz::echoError1('id参数不能为空');
$mainInfos=DB::table('s_list as a')
->select('a.*',DB::raw('COALESCE(a.reservation_begin_time, b.period_begin_time) as period_begin_time'),DB::raw('COALESCE(a.reservation_end_time, b.period_end_time) as period_end_time'))
->select('a.*','b.period_begin_time','b.period_end_time')
->leftJoin('s_period as b','a.reservation_time','=','b.id')
->whereIn('a.id',$MainListIds)->where(['a.is_del'=>0])->get();
//遍历判断所有要预约的医嘱是否符合条件

@ -1,31 +0,0 @@
<?php
namespace App\Http\Controllers\API\Admin\YeWu;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\Admin\YeWu\SubDepartmentService;
class SubDepartmentController extends Controller
{
/**
* 获取当前用户所在科室的子科室列表
*/
public function GetList(Request $request)
{
$userid = $request->get('userid');
$service = new SubDepartmentService();
return $service->GetList($userid);
}
/**
* 保存子科室配置(状态、预约属性)
*/
public function Save(Request $request)
{
$userid = $request->get('userid');
$info = request('info');
$service = new SubDepartmentService();
return $service->Save($info, $userid);
}
}

@ -23,12 +23,10 @@ public function getMainDetail()
$entrustids = request('entrustid');
$episodeid = request('episodeid');
$appointment_type=request('appointment_type');
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
$arrayEntrustids = explode(",", $entrustids);
$info = DB::table('s_list as a')->where(['a.reg_num' => $regnum, 'a.episodeid'=>$episodeid,'a.is_nullify'=>0])
->select('a.*',DB::raw('COALESCE(a.reservation_begin_time, c.period_begin_time) as period_begin_time'),DB::raw('COALESCE(a.reservation_end_time, c.period_end_time) as period_end_time'))
->select('a.*','c.period_begin_time','c.period_end_time')
->leftJoin('s_period as c','a.reservation_time','=','c.id')
->whereIn('a.entrust_id',$arrayEntrustids)
->get();
@ -41,12 +39,6 @@ public function getMainDetail()
->leftJoin('s_check_item_device as b','a.id','=','b.item_id')
->leftJoin('s_department_resources_device as c','b.device_id','=','c.device_id')
->leftJoin('s_department as d','c.department_id','=','d.id')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 'a.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->select('a.*', 'b.device_id', 'c.department_id as dept_device_dept_id', 'd.department_name',
DB::raw('COALESCE(s_dept_check_item.reservation_method, a.reservation_method) as reservation_method'))
->where(['a.item_name' => $value->entrust,'a.status'=>1,"a.is_del"=>0])->get();
$source=null;
if(!empty($value->reservation_sources)){
@ -224,8 +216,8 @@ public function GetList(Request $request)
$list=DB::table('s_list')
->leftJoin('s_period','s_list.reservation_time','=','s_period.id')
->leftJoin('s_department_resources','s_list.reservation_sources','=','s_department_resources.id')
->select('s_list.*',DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'),DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'),'s_department_resources.department_resources_name')
->where(['s_list.is_del'=>0]);
->select('s_list.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name')
->where(['s_list.is_del'=>0,'s_list.is_nullify'=>0]);
if($userInfo[0]->group==2){
// $list=$list->whereIn('warddesc', explode(",", $userInfo[0]->ward));
$list=$list->where(['wardcode'=> $department->department_number]);
@ -280,15 +272,8 @@ public function GetList(Request $request)
$list = $list->whereBetween('s_list.reservation_date', $searchInfo['dateRange']);
}
}
if (isset($searchInfo['list_status']) && $searchInfo['list_status'] !== '' && $searchInfo['list_status'] !== null) {
if ($searchInfo['list_status'] === 'nullify') {
$list = $list->where('s_list.is_nullify', 1);
} else {
$list = $list->where('s_list.is_nullify', 0)
->where('s_list.list_status', $searchInfo['list_status']);
}
} else {
$list = $list->where('s_list.is_nullify', 0);
if (isset($searchInfo['list_status'])) {
$list = $list->where('s_list.list_status', $searchInfo['list_status']);
}
if (isset($searchInfo['patient_type'])) {
$list = $list->where('s_list.patient_type', $searchInfo['patient_type']);
@ -318,7 +303,7 @@ public function GetList(Request $request)
//动态排序
$orderField = $searchInfo['orderField'] ?? '';
$orderDirection = ($searchInfo['orderDirection'] ?? '') == 'ascending' ? 'asc' : 'desc';
$allowedFields = ['reg_num', 'episodeid', 'user_name', 'user_sex', 'user_brithday', 'entrust', 'is_pay', 'list_status', 'reservation_department', 'user_phone', 'reservation_time', 'reservation_date', 'entrust_date_time'];
$allowedFields = ['reg_num', 'episodeid', 'user_name', 'user_sex', 'user_brithday', 'entrust', 'is_pay', 'list_status', 'reservation_department', 'user_phone', 'reservation_time', 'entrust_date_time'];
if (!empty($orderField) && in_array($orderField, $allowedFields)) {
if ($orderField === 'reservation_time') {
$list = $list->orderByRaw("CONCAT(IFNULL(s_list.reservation_date,''), ' ', IFNULL(s_period.period_begin_time,'')) $orderDirection");
@ -360,7 +345,7 @@ public function GetListByDept(Request $request)
$list = DB::table('s_list')
->leftJoin('s_period', 's_list.reservation_time', '=', 's_period.id')
->leftJoin('s_department_resources', 's_list.reservation_sources', '=', 's_department_resources.id')
->select('s_list.*', DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'), DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'), 's_department_resources.department_resources_name')
->select('s_list.*', 's_period.period_begin_time', 's_period.period_end_time', 's_department_resources.department_resources_name')
->where(['s_list.is_del' => 0, 's_list.is_nullify' => 0]);
// 选中具体科室时,按科室编号过滤
@ -457,8 +442,6 @@ public function CheckEntrstItemGroup()
$items= request('items');
if(!empty($items)){
$FirstItemDevices=[];
$userid = request()->get('userid');
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByUserid($userid);
foreach ($items as $key=>$val){
if($val['first']==1){
//获取点击的检查项目关联的设备id
@ -469,11 +452,6 @@ public function CheckEntrstItemGroup()
->whereNotNull('b.device_id')
->pluck('b.device_id')->toArray();
$FirstItem= DB::table('s_check_item as a')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 'a.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->select('a.*', DB::raw('COALESCE(s_dept_check_item.check_begin_time, a.check_begin_time, 0) as check_begin_time'))
->where(['a.item_name'=>$val['name'],'a.is_del'=>0,'a.status'=>1])->first();
if(!$FirstItem) return \Yz::echoError1('此医嘱项目无效,请检查项目设置');
}
@ -534,7 +512,7 @@ public function CheckIsDaiJian()
$planTime=[$plan->date.' '.$plan->begin_time,$plan->date.' '.$plan->end_time];
$query=DB::table('s_list')->where(['reg_num'=>$reg_num,'list_status'=>1,'is_nullify'=>0])
->select('s_list.*',DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'),DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'),'s_department_resources.department_resources_name')
->select('s_list.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name')
->leftJoin('s_period','s_list.reservation_time','=','s_period.id')
->leftJoin('s_department_resources','s_list.reservation_sources','=','s_department_resources.id')
->get();
@ -572,9 +550,6 @@ public function NoPayCancel()
$u_data = [
'list_status' => 0,
'reservation_date' => null,
'reservation_begin_time' => null,
'reservation_end_time' => null,
'reservation_deadline_time' => null,
'reservation_time' => null,
'reservation_sources' => null,
'services_group' => null,
@ -634,9 +609,6 @@ public function NoPayCancel()
$u_data = [
'list_status' => 0,
'reservation_date' => null,
'reservation_begin_time' => null,
'reservation_end_time' => null,
'reservation_deadline_time' => null,
'reservation_time' => null,
'reservation_sources' => null,
'services_group' => null,
@ -690,7 +662,7 @@ public function GetPersonYuYueList()
$list=DB::table('s_list')
->leftJoin('s_period','s_list.reservation_time','=','s_period.id')
->leftJoin('s_department_resources','s_list.reservation_sources','=','s_department_resources.id')
->select('s_list.*',DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'),DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'),'s_department_resources.department_resources_name')
->select('s_list.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name')
->where(['s_list.is_del'=>0,'s_list.is_nullify'=>0])
->where('s_list.reg_num', $reg_num)
->whereIn('list_status',[1,2,3]);

@ -18,8 +18,8 @@ public function GetList(Request $request)
->leftJoin('s_department_resources', 's_list.reservation_sources', '=', 's_department_resources.id')
->select(
's_list.*',
DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'),
DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'),
's_period.period_begin_time',
's_period.period_end_time',
's_department_resources.department_resources_name'
)
->where(['s_list.is_del' => 0, 's_list.is_nullify' => 0])
@ -45,7 +45,7 @@ public function GetDetail(Request $request)
$id = request('id');
$userid = $request->get('userid');//中间件产生的参数
$info = DB::table('s_list as a')->where(['a.id'=>$id,'a.reg_num' => $userid])
->select('a.*',DB::raw('COALESCE(a.reservation_begin_time, c.period_begin_time) as period_begin_time'),DB::raw('COALESCE(a.reservation_end_time, c.period_end_time) as period_end_time'))
->select('a.*','c.period_begin_time','c.period_end_time')
->leftJoin('s_period as c','a.reservation_time','=','c.id')
->first();
if($info){

@ -100,7 +100,7 @@ public function UpdateCheckItem(){
}
// 快速查找是否已存在该 item_code
if (isset($db_map[$item_code])) {
// 存在则更新check_notice 单独条件更新,不覆盖已有值)
// 存在则更新
DB::table('s_check_item')
->where('item_code', $item_code)
->update([
@ -110,20 +110,11 @@ public function UpdateCheckItem(){
'item_desc' => $item_name,
'is_del' => 0, // 取消删除标记
'hisExecDepts'=>json_encode($department_arr, JSON_UNESCAPED_UNICODE),
'check_notice'=>$item['docmoTip']
]);
// 仅当库中 check_notice 为空且 HIS 有值时才写入
if (!empty($item['docmoTip'])) {
DB::table('s_check_item')
->where('item_code', $item_code)
->where(function ($q) {
$q->whereNull('check_notice')
->orWhere('check_notice', '');
})
->update(['check_notice' => $item['docmoTip']]);
}
} else {
// 不存在则插入新记录
$insertData = [
DB::table('s_check_item')->insert([
'item_class_id'=>$item_class_id,
'sheetType'=>$item['sheetType'],
'item_code' => $item_code,
@ -133,12 +124,8 @@ public function UpdateCheckItem(){
'limosis' =>0,
'check_time' =>0,
'hisExecDepts'=>json_encode($department_arr, JSON_UNESCAPED_UNICODE),
];
// 仅当 HIS 有值时才写入 check_notice
if (!empty($item['docmoTip'])) {
$insertData['check_notice'] = $item['docmoTip'];
}
DB::table('s_check_item')->insert($insertData);
'check_notice'=>$item['docmoTip']
]);
// $this->updateBindDrivers($item_code,$department_arr);自动绑定检查室 ,废弃
}

@ -2,7 +2,6 @@
namespace App\Http\Controllers\API;
use App\Http\Controllers\API\His\HisController;
use App\Http\Controllers\Controller;
use Barryvdh\Snappy\Facades\SnappyPdf;
use Illuminate\Http\Request;
@ -118,8 +117,8 @@ public function GetCheckPdf()
$list = DB::table('s_list as a')
->select(
'a.*',
DB::raw('COALESCE(a.reservation_begin_time, c.period_begin_time) as period_begin_time'),
DB::raw('COALESCE(a.reservation_end_time, c.period_end_time) as period_end_time'),
'c.period_begin_time',
'c.period_end_time',
'b.department_resources_name',
'b.department_resources_addr'
)
@ -131,36 +130,6 @@ public function GetCheckPdf()
->orderByRaw('FIELD(a.entrust_id, ' . implode(',', array_map('intval', $normalIds)) . ')')
->get();
//预查询 ROC 缓存diagnosisName 或 medicalHistory 为空时补充数据
$rocDataMap = [];
$rocKeys = [];
foreach ($list as $item) {
if ((empty($item->diagnosisName) || empty($item->medicalHistory))
&& !empty($item->episodeid) && !empty($item->app_num)) {
$key = $item->episodeid . '|' . $item->app_num;
$rocKeys[$key] = [
'episodeid' => $item->episodeid,
'app_num' => $item->app_num,
'patient_type' => $item->patient_type,
];
}
}
foreach ($rocKeys as $key => $info) {
$res = HisController::GetApplyDetail(
$info['episodeid'],
$info['app_num'],
$info['patient_type'],
'本地'
);
if ($res['code'] == 200 && !empty($res['data'])) {
$rocData = $res['data'][0];
$rocDataMap[$key] = [
'diagnosisName' => $rocData['diagnosisName'] ?? '',
'medicalHistory' => $rocData['medicalHistory'] ?? '',
];
}
}
//三层分组
$groups = [];
foreach ($list as $item) {
@ -202,7 +171,6 @@ public function GetCheckPdf()
];
}
$rocKey = ($item->episodeid ?? '') . '|' . ($item->app_num ?? '');
$groups[$typeKey]['patients'][$patientKey]['rooms'][$roomKey]['items'][] = [
'id' => $item->id,
'entrust_id' => $item->entrust_id,
@ -213,15 +181,6 @@ public function GetCheckPdf()
'reservation_date' => $item->reservation_date,
'period_begin_time' => $item->period_begin_time,
'period_end_time' => $item->period_end_time,
'reservation_sources' => $item->reservation_sources,
'diagnosisName' => !empty($item->diagnosisName)
? $item->diagnosisName
: ($rocDataMap[$rocKey]['diagnosisName'] ?? ''),
'medicalHistory' => !empty($item->medicalHistory)
? $item->medicalHistory
: ($rocDataMap[$rocKey]['medicalHistory'] ?? ''),
'docotr' => $item->docotr ?? '',
'reservation_department' => $item->reservation_department ?? '',
];
}
@ -265,20 +224,10 @@ public function GetCheckPdf()
//检查须知:从该诊室所有检查项目读取 check_notice去重过滤
$itemNames = array_column($room['items'], 'entrust');
$firstItem = $room['items'][0] ?? null;
$deptId = 0;
if ($firstItem && !empty($firstItem['reservation_sources'])) {
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByResourceId($firstItem['reservation_sources']);
}
$notices = DB::table('s_check_item')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->whereIn('item_name', $itemNames)
->where('s_check_item.status', 1)
->where('s_check_item.is_del', 0)
->select(DB::raw('COALESCE(s_dept_check_item.check_notice, s_check_item.check_notice) as check_notice'))
->where('status', 1)
->where('is_del', 0)
->pluck('check_notice')
->filter()
->unique()
@ -288,26 +237,15 @@ public function GetCheckPdf()
//温馨提示:从该诊室所有检查项目读取 warm_tips去重过滤
$tips = DB::table('s_check_item')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->whereIn('item_name', $itemNames)
->where('s_check_item.status', 1)
->where('s_check_item.is_del', 0)
->select(DB::raw('COALESCE(s_dept_check_item.warm_tips, s_check_item.warm_tips) as warm_tips'))
->where('status', 1)
->where('is_del', 0)
->pluck('warm_tips')
->filter()
->unique()
->values()
->toArray();
$room['warm_tips'] = $tips;
//申请医生、申请科室、临床诊断、病史资料:去重,中文逗号分割
$room['doctor'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'docotr')))));
$room['apply_department'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'reservation_department')))));
$room['diagnosis_name'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'diagnosisName')))));
$room['medical_history'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'medicalHistory')))));
}
}
}
@ -431,7 +369,7 @@ public function CreateJianChaShenQingDanPdf()
$successCount=0;
foreach ($OrderNoList as $orderNo) {
$entrustInfo=DB::table('s_list as a')->where(['a.entrust_id'=>$orderNo,'a.list_status'=>1,'a.is_nullify'=>0])
->select('a.*',DB::raw('COALESCE(a.reservation_begin_time, c.period_begin_time) as period_begin_time'),DB::raw('COALESCE(a.reservation_end_time, c.period_end_time) as period_end_time'))
->select('a.*','c.period_begin_time','c.period_end_time')
->leftJoin('s_period as c','a.reservation_time','=','c.id')
->first();
if(!$entrustInfo) continue;
@ -499,8 +437,8 @@ public function GenerateGroupedCheckPdf()
$list = DB::table('s_list as a')
->select(
'a.*',
DB::raw('COALESCE(a.reservation_begin_time, c.period_begin_time) as period_begin_time'),
DB::raw('COALESCE(a.reservation_end_time, c.period_end_time) as period_end_time'),
'c.period_begin_time',
'c.period_end_time',
'b.department_resources_name',
'b.department_resources_addr'
)
@ -519,36 +457,6 @@ public function GenerateGroupedCheckPdf()
$type = request('Type', 'group');
$p_type = config('app.globals.患者类型');
//预查询 ROC 缓存diagnosisName 或 medicalHistory 为空时补充数据
$rocDataMap = [];
$rocKeys = [];
foreach ($list as $item) {
if ((empty($item->diagnosisName) || empty($item->medicalHistory))
&& !empty($item->episodeid) && !empty($item->app_num)) {
$key = $item->episodeid . '|' . $item->app_num;
$rocKeys[$key] = [
'episodeid' => $item->episodeid,
'app_num' => $item->app_num,
'patient_type' => $item->patient_type,
];
}
}
foreach ($rocKeys as $key => $info) {
$res = HisController::GetApplyDetail(
$info['episodeid'],
$info['app_num'],
$info['patient_type'],
'本地'
);
if ($res['code'] == 200 && !empty($res['data'])) {
$rocData = $res['data'][0];
$rocDataMap[$key] = [
'diagnosisName' => $rocData['diagnosisName'] ?? '',
'medicalHistory' => $rocData['medicalHistory'] ?? '',
];
}
}
//三层分组patient_type → 患者标识 → 诊室
$groups = [];
foreach ($list as $item) {
@ -595,7 +503,6 @@ public function GenerateGroupedCheckPdf()
];
}
$rocKey = ($item->episodeid ?? '') . '|' . ($item->app_num ?? '');
$groups[$typeKey]['patients'][$patientKey]['rooms'][$roomKey]['items'][] = [
'id' => $item->id,
'entrust' => $item->entrust,
@ -605,15 +512,6 @@ public function GenerateGroupedCheckPdf()
'reservation_date' => $item->reservation_date,
'period_begin_time' => $item->period_begin_time,
'period_end_time' => $item->period_end_time,
'reservation_sources' => $item->reservation_sources,
'diagnosisName' => !empty($item->diagnosisName)
? $item->diagnosisName
: ($rocDataMap[$rocKey]['diagnosisName'] ?? ''),
'medicalHistory' => !empty($item->medicalHistory)
? $item->medicalHistory
: ($rocDataMap[$rocKey]['medicalHistory'] ?? ''),
'docotr' => $item->docotr ?? '',
'reservation_department' => $item->reservation_department ?? '',
];
}
@ -662,20 +560,10 @@ public function GenerateGroupedCheckPdf()
//检查须知:从该诊室所有检查项目读取 check_notice去重过滤
$itemNames = array_column($room['items'], 'entrust');
$firstItem = $room['items'][0] ?? null;
$deptId = 0;
if ($firstItem && !empty($firstItem['reservation_sources'])) {
$deptId = \App\Services\Admin\YeWu\DeptCheckItemService::getDeptIdByResourceId($firstItem['reservation_sources']);
}
$notices = DB::table('s_check_item')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->whereIn('item_name', $itemNames)
->where('s_check_item.status', 1)
->where('s_check_item.is_del', 0)
->select(DB::raw('COALESCE(s_dept_check_item.check_notice, s_check_item.check_notice) as check_notice'))
->where('status', 1)
->where('is_del', 0)
->pluck('check_notice')
->filter()
->unique()
@ -685,26 +573,15 @@ public function GenerateGroupedCheckPdf()
//温馨提示:从该诊室所有检查项目读取 warm_tips去重过滤
$tips = DB::table('s_check_item')
->leftJoin('s_dept_check_item', function($j) use ($deptId) {
$j->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->where('s_dept_check_item.department_id', '=', $deptId);
})
->whereIn('item_name', $itemNames)
->where('s_check_item.status', 1)
->where('s_check_item.is_del', 0)
->select(DB::raw('COALESCE(s_dept_check_item.warm_tips, s_check_item.warm_tips) as warm_tips'))
->where('status', 1)
->where('is_del', 0)
->pluck('warm_tips')
->filter()
->unique()
->values()
->toArray();
$room['warm_tips'] = $tips;
//申请医生、申请科室、临床诊断、病史资料:去重,中文逗号分割
$room['doctor'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'docotr')))));
$room['apply_department'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'reservation_department')))));
$room['diagnosis_name'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'diagnosisName')))));
$room['medical_history'] = implode('', array_values(array_unique(array_filter(array_column($room['items'], 'medicalHistory')))));
}
}
}
@ -745,7 +622,7 @@ public function PrintMainList()
$list = DB::table('s_list')
->leftJoin('s_period','s_list.reservation_time','=','s_period.id')
->leftJoin('s_department_resources','s_list.reservation_sources','=','s_department_resources.id')
->select('s_list.*',DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as period_begin_time'),DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as period_end_time'),'s_department_resources.department_resources_name','s_department_resources.department_resources_addr')
->select('s_list.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name','s_department_resources.department_resources_addr')
->where(['s_list.is_del'=>0,'s_list.is_nullify'=>0]);
if($userInfo->group==2){

@ -123,7 +123,7 @@ public function PacsSaveApplyInfoTest(Request $request)
'applyinfo' =>
[
'accessionnumber' => $entrust->app_num,
'hisapplytime' => ($dt = \DateTime::createFromFormat('YmdHis', $hisInfo['requestDate'] ?? '')) ? $dt->format('Y-m-d H:i:s') : '',
'hisapplytime' => $hisInfo['requestDate'] ?? '',
'hisapplydeptcode' => $hisInfo['orderDeptCode'] ?? '',
'hisapplydept' => $hisInfo['orderDeptName'] ?? '',
'hisapplydoctorcode' => $hisInfo['orderPersonCode'] ?? '',
@ -259,7 +259,7 @@ public function SaveApply($orderNo)
'applyinfo' =>
[
'accessionnumber' => $entrust->app_num,
'hisapplytime' => ($dt = \DateTime::createFromFormat('YmdHis', $hisInfo['requestDate'] ?? '')) ? $dt->format('Y-m-d H:i:s') : '',
'hisapplytime' => $hisInfo['requestDate']??'',
'hisapplydeptcode'=> $hisInfo['orderDeptCode']??'',
'hisapplydept'=> $hisInfo['orderDeptName']??'',
'hisapplydoctorcode'=> $hisInfo['orderPersonCode']??'',
@ -343,9 +343,6 @@ public function CancelApply ($orderNo)
$clearData = [
'list_status' => 0,
'reservation_date' => null,
'reservation_begin_time' => null,
'reservation_end_time' => null,
'reservation_deadline_time' => null,
'reservation_time' => null,
'reservation_sources' => null,
'services_group' => null,

@ -51,8 +51,8 @@ public function GetEntrustInfo(){
"episodeid",
"RISRAcceptDeptCode",
"reservation_date",
DB::raw('COALESCE(s_list.reservation_begin_time, s_period.period_begin_time) as reservation_time'),
DB::raw('COALESCE(s_list.reservation_end_time, s_period.period_end_time) as reservation_end_time'),
's_period.period_begin_time as reservation_time',
's_period.period_end_time as reservation_end_time',
"canel_time as cancel_time",
"warddesc",
"wardcode",

@ -89,21 +89,8 @@ public function GetItemList($searchInfo,$page,$pageSize,$userid){
}
$count = $list->count();
$list= $list
->leftJoin('s_dept_check_item', function($join) use ($user) {
$join->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->where('s_dept_check_item.department_id', '=', $user->department_id);
})
->select(
's_check_item.*',
DB::raw('COALESCE(s_dept_check_item.reservation_method, s_check_item.reservation_method) as reservation_method'),
DB::raw('COALESCE(s_dept_check_item.limosis, s_check_item.limosis) as limosis'),
DB::raw('COALESCE(s_dept_check_item.check_time, s_check_item.check_time) as check_time'),
DB::raw('COALESCE(s_dept_check_item.check_begin_time, s_check_item.check_begin_time) as check_begin_time'),
DB::raw('COALESCE(s_dept_check_item.check_notice, s_check_item.check_notice) as check_notice'),
DB::raw('COALESCE(s_dept_check_item.use_seats, s_check_item.use_seats, 1) as use_seats'),
DB::raw('COALESCE(s_dept_check_item.warm_tips, s_check_item.warm_tips) as warm_tips'),
DB::raw('COALESCE(s_dept_check_item.is_share_slot, s_check_item.is_share_slot, 0) as is_share_slot')
);
->leftJoin('s_appointment_type', 's_check_item.reservation_method', '=', 's_appointment_type.id')
->select('s_check_item.*','s_appointment_type.name as reservation_method_name');
if (!empty($searchInfo['orderField']) && !empty($searchInfo['orderDirection'])) {
$direction = $searchInfo['orderDirection'] == 'ascending' ? 'asc' : 'desc';
$list->orderBy($searchInfo['orderField'], $direction);
@ -181,94 +168,29 @@ public function BindDevice($item_id,$device_ids,$userid){
return \Yz::Return(false, '绑定失败');
}
}
public function BatchUpdateNotice($item_ids, $field, $value, $userid)
public function BatchUpdateNotice($item_ids, $field, $value)
{
if (empty($item_ids) || !in_array($field, ['check_notice', 'warm_tips'])) {
return \Yz::Return(false, '参数错误');
}
$user = DB::table('users')->where('id', $userid)->first();
if (!$user || !$user->department_id) {
return \Yz::Return(false, '用户科室信息不存在');
}
$deptId = $user->department_id;
foreach ($item_ids as $item_id) {
// 查覆盖表是否已有记录
$existing = DB::table('s_dept_check_item')
->where('check_item_id', $item_id)
->where('department_id', $deptId)
->first();
if ($existing) {
// 已有记录,直接更新目标字段
DB::table('s_dept_check_item')
->where('id', $existing->id)
->update([$field => $value]);
} else {
// 不存在,从主表读取基线数据回填
$base = DB::table('s_check_item')
->where('id', $item_id)
->first();
$data = [
'check_item_id' => $item_id,
'department_id' => $deptId,
'reservation_method' => $base->reservation_method ?? null,
'limosis' => $base->limosis ?? null,
'check_time' => $base->check_time ?? null,
'check_begin_time' => $base->check_begin_time ?? null,
'check_notice' => $base->check_notice ?? null,
'warm_tips' => null,
'use_seats' => $base->use_seats ?? 1,
'is_share_slot' => 0,
];
// 覆盖目标字段
$data[$field] = $value;
DB::table('s_dept_check_item')->insert($data);
}
}
return \Yz::Return(true, '批量更新成功,共更新' . count($item_ids) . '条');
$updated = DB::table('s_check_item')
->whereIn('id', $item_ids)
->where('is_del', 0)
->update([$field => $value]);
return \Yz::Return(true, '批量更新成功,共更新' . $updated . '条');
}
public function Save($Info, $userid){
if(empty($Info['id'])){
return \Yz::Return(false, 'id不能为空');
}
$user = DB::table('users')->where('id', $userid)->first();
if(!$user || !$user->department_id){
return \Yz::Return(false, '用户科室信息不存在');
}
// 预约方式数组转逗号分隔串
$reservationMethod = $Info['reservation_method'];
if(is_array($reservationMethod)){
$reservationMethod = implode(',', $reservationMethod);
}
$data = [
'reservation_method' => $reservationMethod,
'limosis' => $Info['limosis'] ?? null,
'check_time' => $Info['check_time'] ?? null,
'check_begin_time' => $Info['check_begin_time'] ?? null,
'check_notice' => $Info['check_notice'] ?? null,
'warm_tips' => $Info['warm_tips'] ?? null,
'use_seats' => $Info['use_seats'] ?? 1,
'is_share_slot' => $Info['is_share_slot'] ?? 0,
];
$res = DB::table('s_dept_check_item')->updateOrInsert(
['check_item_id' => $Info['id'], 'department_id' => $user->department_id],
$data
);
if($res){
return \Yz::Return(true, '修改成功');
public function Save($Info){
if(!empty($Info['id'])){
$Info['reservation_method']=implode(',', $Info['reservation_method']);
$res=DB::table('s_check_item')->where('id',$Info['id'])->update($Info);
if($res){
return \Yz::Return(true, '修改成功');
}else{
return \Yz::Return(false, '修改失败');
}
}else{
return \Yz::Return(false, '修改失败');
return \Yz::Return(false, 'id不能为空');
}
}
@ -318,38 +240,6 @@ public function SyncCheckItem($userid)
]);
}
// ========== 公共方法department_id 获取 ==========
/**
* 根据 userid 查 users.department_id
*/
public static function getDeptIdByUserid($userid)
{
if (empty($userid)) return 0;
$user = DB::table('users')->where('id', $userid)->first(['department_id']);
return $user->department_id ?? 0;
}
/**
* 根据排班明细 ID 查 s_source_roster_detail.department_id
*/
public static function getDeptIdByRosterId($rosterId)
{
if (empty($rosterId)) return 0;
$roster = DB::table('s_source_roster_detail')->where('id', $rosterId)->first(['department_id']);
return $roster->department_id ?? 0;
}
/**
* 根据预约资源 ID 查 s_department_resources.department_id
*/
public static function getDeptIdByResourceId($resourceId)
{
if (empty($resourceId)) return 0;
$resource = DB::table('s_department_resources')->where('id', $resourceId)->first(['department_id']);
return $resource->department_id ?? 0;
}
//获取当前科室所有符合条件的项目快照code => 字段摘要)
private function getDeptItemSnapshot($userid)
{

File diff suppressed because it is too large Load Diff

@ -1,79 +0,0 @@
<?php
namespace App\Services\Admin\YeWu;
use Illuminate\Support\Facades\DB;
class SubDepartmentService
{
/**
* 获取当前用户所在科室的子科室列表
* @param int $userid 当前登录用户ID
* @return \Illuminate\Http\JsonResponse
*/
public function GetList($userid)
{
$user = DB::table('users')->where('id', $userid)->first();
if (!$user || !$user->department_id) {
return \Yz::Return(false, '当前用户未绑定科室', []);
}
$department_id = $user->department_id;
$list = DB::table('s_department')
->where('pid', $department_id)
->where('is_del', 0)
->select('id', 'department_name', 'department_number', 'department_status', 'appointment_enabled')
->orderBy('id', 'asc')
->get();
return \Yz::Return(true, '查询成功', ['list' => $list]);
}
/**
* 保存子科室配置(仅状态和预约属性)
* @param array $info 包含 id, department_status, appointment_enabled
* @param int $userid 当前登录用户ID用于越权校验
* @return \Illuminate\Http\JsonResponse
*/
public function Save($info, $userid)
{
$id = $info['id'] ?? 0;
if (!$id) {
return \Yz::Return(false, '缺少子科室ID', []);
}
$user = DB::table('users')->where('id', $userid)->first();
if (!$user || !$user->department_id) {
return \Yz::Return(false, '当前用户未绑定科室', []);
}
$department_id = $user->department_id;
// 越权校验:该子科室的 pid 必须是当前用户的科室
$subDept = DB::table('s_department')
->where('id', $id)
->where('is_del', 0)
->first();
if (!$subDept) {
return \Yz::Return(false, '子科室不存在', []);
}
if ($subDept->pid != $department_id) {
return \Yz::Return(false, '无权修改该科室', []);
}
$updateData = [];
if (isset($info['department_status'])) {
$updateData['department_status'] = $info['department_status'];
}
if (isset($info['appointment_enabled'])) {
$updateData['appointment_enabled'] = $info['appointment_enabled'];
}
if (empty($updateData)) {
return \Yz::Return(false, '无更新内容', []);
}
$c = DB::table('s_department')->where('id', $id)->update($updateData);
if ($c === false) {
return \Yz::Return(false, '保存失败', []);
}
return \Yz::Return(true, '保存成功', []);
}
}

@ -150,9 +150,6 @@ public function UpdateStatus($result, $jsonData)
$clearData = [
'list_status' => 0,
'reservation_date' => null,
'reservation_begin_time' => null,
'reservation_end_time' => null,
'reservation_deadline_time' => null,
'reservation_time' => null,
'reservation_sources' => null,
'services_group' => null,

@ -1 +0,0 @@
import{_ as L,Y as B,o as E,r as d,c as I,d as r,e as c,k as a,f as s,w as p,i as l,v as g,x as w,h as N,j as S,F as j,K as F,bO as G,I as O,E as U,q,g as n,bP as z}from"./index-c64ce9a7.js";const K={class:"head"},P={style:{display:"flex"}},$={key:0,style:{"margin-right":"10px"}},H={class:"shuangyue_table",style:{width:"200px"}},J={key:1,id:"MonthCount",class:"MonthCount"},Q={__name:"AppointmentTj",setup(W){B(()=>groupList.value.filter(e=>e.id==2));let m=n(!1),o=n({name:"",dateRange:[]}),f=n([]),h=n(),y=n(0),x=n(0),Y=n("");const D=()=>{F().then(e=>{if(e.status){let t=e.data.datetime.substr(0,10);o.value.dateRange=[t,t],b()}})};let u=n([]),_=n([]);const b=()=>{m.value=!0,G({searchInfo:o.value}).then(e=>{m.value=!1,e.status?(f.value=e.data.list,h.value=e.data.monthList,y.value=e.data.yuYueAllCount,x.value=e.data.shuangYueCount,Y.value=e.data.shuangYueLv,u.value=[],_.value=[],h.value.forEach((t,v)=>{u.value.push(t.month),_.value.push(t.count)}),u.value.length>0&&O(()=>{k()})):U.error(e.msg)})},k=()=>{var e=z(document.getElementById("MonthCount"));e.setOption({title:{text:o.value.dateRange[0]+"~"+o.value.dateRange[1]+"预约量统计(月)"},tooltip:{},xAxis:{data:u.value},yAxis:{},series:[{name:"数量",type:"bar",data:_.value}]})};return E(()=>{D()}),(e,t)=>{const v=d("el-date-picker"),M=d("el-form-item"),V=d("el-button"),A=d("el-row"),C=d("el-table-column"),R=d("el-table"),T=I("loading");return r(),c(j,null,[a("div",K,[s(A,null,{default:p(()=>[s(M,null,{default:p(()=>[s(v,{style:{"margin-left":"8px",width:"150px"},modelValue:l(o).dateRange[0],"onUpdate:modelValue":t[0]||(t[0]=i=>l(o).dateRange[0]=i),type:"date",placeholder:"开始时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),t[3]||(t[3]=a("span",{style:{margin:"0 4px"}},"至",-1)),s(v,{style:{width:"150px"},modelValue:l(o).dateRange[1],"onUpdate:modelValue":t[1]||(t[1]=i=>l(o).dateRange[1]=i),type:"date",placeholder:"结束时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),s(V,{onClick:t[2]||(t[2]=i=>b()),style:{"margin-left":"10px"}},{default:p(()=>[...t[4]||(t[4]=[q("搜索",-1)])]),_:1})]),_:1})]),a("div",P,[l(u).length>0?(r(),c("div",$,[t[8]||(t[8]=a("div",{style:{"font-size":"18px","font-weight":"900",color:"#666"}},"爽约率(时间范围内)",-1)),a("table",H,[a("tr",null,[t[5]||(t[5]=a("td",null,"预约人数",-1)),a("td",null,g(l(y)),1)]),a("tr",null,[t[6]||(t[6]=a("td",null,"爽约人数",-1)),a("td",null,g(l(x)),1)]),a("tr",null,[t[7]||(t[7]=a("td",null,"爽约率",-1)),a("td",null,g(l(Y)),1)])])])):w("",!0),l(u).length>0?(r(),c("div",J)):w("",!0)]),N((r(),S(R,{data:l(f),style:{width:"100%"},"row-key":"id"},{default:p(()=>[s(C,{prop:"name",label:"方式"}),s(C,{prop:"count",label:"数量"})]),_:1},8,["data"])),[[T,l(m)]])],64)}}},Z=L(Q,[["__scopeId","data-v-81c62635"]]);export{Z as default};

@ -0,0 +1 @@
import{_ as L,Y as B,o as E,r as d,c as I,d as r,e as c,k as a,f as s,w as p,i as l,v as g,x as w,h as N,j as S,F as j,K as F,bL as G,I as U,E as q,q as z,g as n,bM as K}from"./index-87e3e912.js";const O={class:"head"},$={style:{display:"flex"}},H={key:0,style:{"margin-right":"10px"}},J={class:"shuangyue_table",style:{width:"200px"}},P={key:1,id:"MonthCount",class:"MonthCount"},Q={__name:"AppointmentTj",setup(W){B(()=>groupList.value.filter(e=>e.id==2));let m=n(!1),o=n({name:"",dateRange:[]}),f=n([]),h=n(),y=n(0),x=n(0),Y=n("");const D=()=>{F().then(e=>{if(e.status){let t=e.data.datetime.substr(0,10);o.value.dateRange=[t,t],b()}})};let u=n([]),_=n([]);const b=()=>{m.value=!0,G({searchInfo:o.value}).then(e=>{m.value=!1,e.status?(f.value=e.data.list,h.value=e.data.monthList,y.value=e.data.yuYueAllCount,x.value=e.data.shuangYueCount,Y.value=e.data.shuangYueLv,u.value=[],_.value=[],h.value.forEach((t,v)=>{u.value.push(t.month),_.value.push(t.count)}),u.value.length>0&&U(()=>{M()})):q.error(e.msg)})},M=()=>{var e=K(document.getElementById("MonthCount"));e.setOption({title:{text:o.value.dateRange[0]+"~"+o.value.dateRange[1]+"预约量统计(月)"},tooltip:{},xAxis:{data:u.value},yAxis:{},series:[{name:"数量",type:"bar",data:_.value}]})};return E(()=>{D()}),(e,t)=>{const v=d("el-date-picker"),k=d("el-form-item"),V=d("el-button"),A=d("el-row"),C=d("el-table-column"),R=d("el-table"),T=I("loading");return r(),c(j,null,[a("div",O,[s(A,null,{default:p(()=>[s(k,null,{default:p(()=>[s(v,{style:{"margin-left":"8px",width:"150px"},modelValue:l(o).dateRange[0],"onUpdate:modelValue":t[0]||(t[0]=i=>l(o).dateRange[0]=i),type:"date",placeholder:"开始时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),t[3]||(t[3]=a("span",{style:{margin:"0 4px"}},"至",-1)),s(v,{style:{width:"150px"},modelValue:l(o).dateRange[1],"onUpdate:modelValue":t[1]||(t[1]=i=>l(o).dateRange[1]=i),type:"date",placeholder:"结束时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),s(V,{onClick:t[2]||(t[2]=i=>b()),style:{"margin-left":"10px"}},{default:p(()=>[...t[4]||(t[4]=[z("搜索",-1)])]),_:1})]),_:1})]),a("div",$,[l(u).length>0?(r(),c("div",H,[t[8]||(t[8]=a("div",{style:{"font-size":"18px","font-weight":"900",color:"#666"}},"爽约率(时间范围内)",-1)),a("table",J,[a("tr",null,[t[5]||(t[5]=a("td",null,"预约人数",-1)),a("td",null,g(l(y)),1)]),a("tr",null,[t[6]||(t[6]=a("td",null,"爽约人数",-1)),a("td",null,g(l(x)),1)]),a("tr",null,[t[7]||(t[7]=a("td",null,"爽约率",-1)),a("td",null,g(l(Y)),1)])])])):w("",!0),l(u).length>0?(r(),c("div",P)):w("",!0)]),N((r(),S(R,{data:l(f),style:{width:"100%"},"row-key":"id"},{default:p(()=>[s(C,{prop:"name",label:"方式"}),s(C,{prop:"count",label:"数量"})]),_:1},8,["data"])),[[T,l(m)]])],64)}}},Z=L(Q,[["__scopeId","data-v-81c62635"]]);export{Z as default};

@ -1 +1 @@
import{_ as D,u as M,a as N,b as U,o as E,r as i,c as T,d as S,e as $,f as o,w as n,g as p,E as b,L as q,h as A,i as u,j as F,k as m,l as x,m as h,n as K,p as P,q as G,s as H}from"./index-c64ce9a7.js";const J={class:"right_top"},O={__name:"AutoLogin",setup(Q){M(),N();const c=U(),j=()=>H(c);let g=p(!1),a=p(""),s=p(""),w=()=>{if(a.value==""||s.value=="")return b.error("用户名和密码不能为空");let l={username:k(a.value),password:k(s.value)};g.value=!0,q(l).then(e=>{if(g.value=!1,e.data.status=="ok"){sessionStorage.setItem("token",e.data.token),sessionStorage.setItem("refreshToken",e.data.refresh_token);var r=sessionStorage.getItem("token");r==e.data.token&&(window.location.href="./#/yewu/mainList")}else b.error(e.data.msg)})};const k=l=>{let e=l;var r={a:"z",b:"y",c:"x",d:"w",e:"v",f:"u",g:"t",h:"s",i:"r",j:"q",k:"p",l:"o",m:"n",n:"m",o:"l",p:"k",q:"j",r:"i",s:"h",t:"g",u:"f",v:"e",w:"d",x:"c",y:"b",z:"a",0:"@",1:"!",2:"#",3:"$",4:"%",5:"^",6:"&",7:"*",8:"(",9:")"},d=e.split("").map(v=>r[v]||v).join(""),f=d.split("").reverse().join(""),_="a5331_"+f+"_a454d",y=btoa(_);return y};let z=p(null),R=p(null);const C=()=>{R.value.focus()};E(()=>{a.value=V("u"),s.value=V("p"),console.log(a.value),console.log(s.value),w()});function V(l,e){e||(e=decodeURIComponent(window.location.href)),l=l.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+l+"(=([^&#]*)|&|#|$)"),d=r.exec(e);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}return(l,e)=>{const r=i("el-col"),d=i("el-switch"),f=i("el-form-item"),_=i("el-input"),y=i("el-button"),v=i("el-form"),I=i("el-row"),L=i("el-container"),B=T("loading");return S(),$("div",null,[o(L,{class:"common-layout"},{default:n(()=>[o(I,{style:{width:"100%",display:"flex","justify-content":"center"}},{default:n(()=>[o(r,{span:9,class:"left"}),A((S(),F(r,{span:15,class:"right"},{default:n(()=>[m("div",J,[m("div",null,[o(d,{modelValue:u(c),"onUpdate:modelValue":e[0]||(e[0]=t=>x(c)?c.value=t:null),"inline-prompt":"","active-color":"var(--el-fill-color-dark)","inactive-color":"var(--el-color-primary)","active-action-icon":"Moon","inactive-action-icon":"Sunny",onChange:j},null,8,["modelValue"])])]),o(v,{style:{width:"400px"},ref:"ruleFormRef","status-icon":"",class:"demo-ruleForm"},{default:n(()=>[o(f,null,{default:n(()=>[...e[6]||(e[6]=[m("span",{style:{"font-size":"22px"}},"登录您的账户",-1)])]),_:1}),o(f,null,{default:n(()=>[o(_,{modelValue:u(a),"onUpdate:modelValue":e[1]||(e[1]=t=>x(a)?a.value=t:a=t),modelModifiers:{number:!0},ref_key:"usernameRef",ref:z,onKeyup:e[2]||(e[2]=h(t=>C(),["enter"])),"prefix-icon":u(K),placeholder:"用户名",size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,null,{default:n(()=>[o(_,{modelValue:u(s),"onUpdate:modelValue":e[3]||(e[3]=t=>x(s)?s.value=t:s=t),type:"password",ref_key:"passwordRef",ref:R,onKeyup:e[4]||(e[4]=h(t=>u(w)(),["enter"])),autocomplete:"off",placeholder:"密码",size:"large","prefix-icon":u(P)},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,null,{default:n(()=>[o(y,{style:{width:"100%"},type:"primary",onClick:e[5]||(e[5]=t=>u(w)(l.ruleFormRef)),size:"large"},{default:n(()=>[...e[7]||(e[7]=[G("登录",-1)])]),_:1})]),_:1}),e[8]||(e[8]=m("div",{style:{height:"160px"}},null,-1))]),_:1},512),e[9]||(e[9]=m("div",{class:"right_bottom"},null,-1))]),_:1})),[[B,u(g)]])]),_:1})]),_:1})])}}},X=D(O,[["__scopeId","data-v-af1c144e"]]);export{X as default};
import{_ as D,u as M,a as N,b as U,o as E,r as i,c as T,d as S,e as $,f as o,w as n,g as p,E as b,L as q,h as A,i as u,j as F,k as m,l as x,m as h,n as K,p as P,q as G,s as H}from"./index-87e3e912.js";const J={class:"right_top"},O={__name:"AutoLogin",setup(Q){M(),N();const c=U(),j=()=>H(c);let g=p(!1),a=p(""),s=p(""),w=()=>{if(a.value==""||s.value=="")return b.error("用户名和密码不能为空");let l={username:k(a.value),password:k(s.value)};g.value=!0,q(l).then(e=>{if(g.value=!1,e.data.status=="ok"){sessionStorage.setItem("token",e.data.token),sessionStorage.setItem("refreshToken",e.data.refresh_token);var r=sessionStorage.getItem("token");r==e.data.token&&(window.location.href="./#/yewu/mainList")}else b.error(e.data.msg)})};const k=l=>{let e=l;var r={a:"z",b:"y",c:"x",d:"w",e:"v",f:"u",g:"t",h:"s",i:"r",j:"q",k:"p",l:"o",m:"n",n:"m",o:"l",p:"k",q:"j",r:"i",s:"h",t:"g",u:"f",v:"e",w:"d",x:"c",y:"b",z:"a",0:"@",1:"!",2:"#",3:"$",4:"%",5:"^",6:"&",7:"*",8:"(",9:")"},d=e.split("").map(v=>r[v]||v).join(""),f=d.split("").reverse().join(""),_="a5331_"+f+"_a454d",y=btoa(_);return y};let z=p(null),R=p(null);const C=()=>{R.value.focus()};E(()=>{a.value=V("u"),s.value=V("p"),console.log(a.value),console.log(s.value),w()});function V(l,e){e||(e=decodeURIComponent(window.location.href)),l=l.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+l+"(=([^&#]*)|&|#|$)"),d=r.exec(e);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}return(l,e)=>{const r=i("el-col"),d=i("el-switch"),f=i("el-form-item"),_=i("el-input"),y=i("el-button"),v=i("el-form"),I=i("el-row"),L=i("el-container"),B=T("loading");return S(),$("div",null,[o(L,{class:"common-layout"},{default:n(()=>[o(I,{style:{width:"100%",display:"flex","justify-content":"center"}},{default:n(()=>[o(r,{span:9,class:"left"}),A((S(),F(r,{span:15,class:"right"},{default:n(()=>[m("div",J,[m("div",null,[o(d,{modelValue:u(c),"onUpdate:modelValue":e[0]||(e[0]=t=>x(c)?c.value=t:null),"inline-prompt":"","active-color":"var(--el-fill-color-dark)","inactive-color":"var(--el-color-primary)","active-action-icon":"Moon","inactive-action-icon":"Sunny",onChange:j},null,8,["modelValue"])])]),o(v,{style:{width:"400px"},ref:"ruleFormRef","status-icon":"",class:"demo-ruleForm"},{default:n(()=>[o(f,null,{default:n(()=>[...e[6]||(e[6]=[m("span",{style:{"font-size":"22px"}},"登录您的账户",-1)])]),_:1}),o(f,null,{default:n(()=>[o(_,{modelValue:u(a),"onUpdate:modelValue":e[1]||(e[1]=t=>x(a)?a.value=t:a=t),modelModifiers:{number:!0},ref_key:"usernameRef",ref:z,onKeyup:e[2]||(e[2]=h(t=>C(),["enter"])),"prefix-icon":u(K),placeholder:"用户名",size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,null,{default:n(()=>[o(_,{modelValue:u(s),"onUpdate:modelValue":e[3]||(e[3]=t=>x(s)?s.value=t:s=t),type:"password",ref_key:"passwordRef",ref:R,onKeyup:e[4]||(e[4]=h(t=>u(w)(),["enter"])),autocomplete:"off",placeholder:"密码",size:"large","prefix-icon":u(P)},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,null,{default:n(()=>[o(y,{style:{width:"100%"},type:"primary",onClick:e[5]||(e[5]=t=>u(w)(l.ruleFormRef)),size:"large"},{default:n(()=>[...e[7]||(e[7]=[G("登录",-1)])]),_:1})]),_:1}),e[8]||(e[8]=m("div",{style:{height:"160px"}},null,-1))]),_:1},512),e[9]||(e[9]=m("div",{class:"right_bottom"},null,-1))]),_:1})),[[B,u(g)]])]),_:1})]),_:1})])}}},X=D(O,[["__scopeId","data-v-af1c144e"]]);export{X as default};

@ -1 +1 @@
import{o as b,r as p,c as x,d as c,e as m,q as _,f as v,w as n,i as f,l as I,g as i,E as k,k as N,h as B,F as L,t as R,j as T,v as U,C as E}from"./index-c64ce9a7.js";const F={style:{"word-break":"break-all"}},j={class:"dialog-footer"},O={__name:"CasLogin",setup(J){let d=i([]),l=i(!1),w=i(!1),a=i(""),s=i("");const h=()=>{if(a.value=="")return k.error("请选择科室"),!1;w.value=!0,E({deptid:a.value}).then(t=>{t.status?(s.value=t.data.token,sessionStorage.setItem("token",s.value),sessionStorage.setItem("refreshToken",t.data.refresh_token),setTimeout(()=>{S()},300)):k.error(t.msg)})},S=()=>{var t=sessionStorage.getItem("token");console.log(t),t!=null&&t==s.value?(sessionStorage.setItem("LoginType","CasLogin"),window.location.href="./#/dashboard"):k.error("登录失败")};b(()=>{s.value=g("access_token");let t=g("refresh_token"),e=g("dept_arr");if(sessionStorage.setItem("token",s.value),sessionStorage.setItem("refreshToken",t),e)try{d.value=JSON.parse(decodeURIComponent(e)),console.log(d.value)}catch{console.error("JSON 解析失败")}d.value.length>1?l.value=!0:S()});function g(t,e){e||(e=decodeURIComponent(window.location.href)),t=t.replace(/[\[\]]/g,"\\$&");var u=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),r=u.exec(e);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null}return(t,e)=>{const u=p("el-radio"),r=p("el-radio-group"),C=p("el-button"),V=p("el-dialog"),y=x("loading");return c(),m("view",null,[e[4]||(e[4]=_(" cas登录 ",-1)),v(V,{modelValue:f(l),"onUpdate:modelValue":e[2]||(e[2]=o=>I(l)?l.value=o:l=o),title:"请选择要登录的科室",width:"40%"},{footer:n(()=>[N("div",j,[v(C,{type:"primary",onClick:e[1]||(e[1]=o=>h())},{default:n(()=>[...e[3]||(e[3]=[_(" 确定 ",-1)])]),_:1})])]),default:n(()=>[B((c(),m("div",F,[v(r,{modelValue:f(a),"onUpdate:modelValue":e[0]||(e[0]=o=>I(a)?a.value=o:a=o)},{default:n(()=>[(c(!0),m(L,null,R(f(d),(o,D)=>(c(),T(u,{key:D,label:o.deptId},{default:n(()=>[_(U(o.deptName),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])),[[y,f(w)]])]),_:1},8,["modelValue"])])}}};export{O as default};
import{o as b,r as p,c as x,d as c,e as m,q as _,f as v,w as n,i as f,l as I,g as i,E as k,k as N,h as B,F as L,t as R,j as T,v as U,C as E}from"./index-87e3e912.js";const F={style:{"word-break":"break-all"}},j={class:"dialog-footer"},O={__name:"CasLogin",setup(J){let d=i([]),l=i(!1),w=i(!1),a=i(""),s=i("");const h=()=>{if(a.value=="")return k.error("请选择科室"),!1;w.value=!0,E({deptid:a.value}).then(t=>{t.status?(s.value=t.data.token,sessionStorage.setItem("token",s.value),sessionStorage.setItem("refreshToken",t.data.refresh_token),setTimeout(()=>{S()},300)):k.error(t.msg)})},S=()=>{var t=sessionStorage.getItem("token");console.log(t),t!=null&&t==s.value?(sessionStorage.setItem("LoginType","CasLogin"),window.location.href="./#/dashboard"):k.error("登录失败")};b(()=>{s.value=g("access_token");let t=g("refresh_token"),e=g("dept_arr");if(sessionStorage.setItem("token",s.value),sessionStorage.setItem("refreshToken",t),e)try{d.value=JSON.parse(decodeURIComponent(e)),console.log(d.value)}catch{console.error("JSON 解析失败")}d.value.length>1?l.value=!0:S()});function g(t,e){e||(e=decodeURIComponent(window.location.href)),t=t.replace(/[\[\]]/g,"\\$&");var u=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),r=u.exec(e);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null}return(t,e)=>{const u=p("el-radio"),r=p("el-radio-group"),C=p("el-button"),V=p("el-dialog"),y=x("loading");return c(),m("view",null,[e[4]||(e[4]=_(" cas登录 ",-1)),v(V,{modelValue:f(l),"onUpdate:modelValue":e[2]||(e[2]=o=>I(l)?l.value=o:l=o),title:"请选择要登录的科室",width:"40%"},{footer:n(()=>[N("div",j,[v(C,{type:"primary",onClick:e[1]||(e[1]=o=>h())},{default:n(()=>[...e[3]||(e[3]=[_(" 确定 ",-1)])]),_:1})])]),default:n(()=>[B((c(),m("div",F,[v(r,{modelValue:f(a),"onUpdate:modelValue":e[0]||(e[0]=o=>I(a)?a.value=o:a=o)},{default:n(()=>[(c(!0),m(L,null,R(f(d),(o,D)=>(c(),T(u,{key:D,label:o.deptId},{default:n(()=>[_(U(o.deptName),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])),[[y,f(w)]])]),_:1},8,["modelValue"])])}}};export{O as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
import{_ as W,g as d,o as X,r,c as Y,d as o,e as u,k as z,f as l,w as a,h as Z,i as s,j as y,l as N,x as p,ay as ee,E as L,q as i,F as h,t as A,v as F,N as te,az as le}from"./index-c64ce9a7.js";import{_ as ae}from"./DepartmentResourcesSave-0c11059b.js";const oe={class:"head"},ne={style:{display:"flex","align-items":"center"}},se={key:2,style:{"font-size":"12px","margin-left":"8px"}},re={key:0,style:{color:"#E6A23C"}},ue={key:1,style:{color:"#409EFF"}},ie={key:0},de={class:"page"},pe={__name:"DeptResourceConfig",setup(me){let v=d(!1),x=d(null),D=null;sessionStorage.getItem("LoginUserInfo")&&(D=JSON.parse(sessionStorage.getItem("LoginUserInfo")),x.value=D.department_id);let w=d({department_id:x.value,status:null,name:""}),I=d({id:null,department_id:null,department_resources_name:"",department_resources_addr:""}),R=d([]),m=d(1),_=d(15),S=0;const f=()=>{v.value=!0,ee({searchInfo:w.value,page:m.value,pageSize:_.value}).then(n=>{v.value=!1,n.status?(R.value=n.data.list,S=n.data.count):L.error(n.msg)})},P=n=>{_.value=n,f()},M=n=>{m.value=n,f()};let k=d(!1);const T=()=>{k.value=!0,I.value={}},G=n=>{k.value=!0,I.value=n},$=()=>{k.value=!1,f()},j=n=>{te.confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{v.value=!0,le({id:n.id}).then(e=>{v.value=!1,e.status?f():L.error(e.msg)})})};return X(()=>{f()}),(n,e)=>{const V=r("el-option"),q=r("el-select"),B=r("el-form-item"),J=r("el-input"),C=r("el-button"),O=r("el-row"),c=r("el-table-column"),b=r("el-tag"),H=r("el-table"),K=r("el-pagination"),Q=Y("loading");return o(),u("div",null,[z("div",oe,[l(O,null,{default:a(()=>[l(B,null,{default:a(()=>[l(q,{filterable:!0,clearable:"",modelValue:s(w).status,"onUpdate:modelValue":e[0]||(e[0]=t=>s(w).status=t),placeholder:"所有状态",style:{"margin-left":"10px"}},{default:a(()=>[l(V,{label:"正常",value:1}),l(V,{label:"不可用",value:0})]),_:1},8,["modelValue"])]),_:1}),l(B,null,{default:a(()=>[l(J,{modelValue:s(w).name,"onUpdate:modelValue":e[1]||(e[1]=t=>s(w).name=t),placeholder:"请输入排班名称",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(C,{style:{"margin-left":"10px"},onClick:f},{default:a(()=>[...e[5]||(e[5]=[i("查询",-1)])]),_:1}),l(C,{type:"primary",style:{"margin-left":"10px"},onClick:e[2]||(e[2]=t=>T())},{default:a(()=>[...e[6]||(e[6]=[i("添加排班",-1)])]),_:1})]),_:1})]),Z((o(),y(H,{data:s(R),style:{width:"100%"},"row-key":"id"},{default:a(()=>[l(c,{prop:"id",label:"Id",width:"100"}),l(c,{prop:"department_resources_name",label:"排班名称"}),l(c,{prop:"department_resources_addr",label:"资源位置"}),l(c,{prop:"department_resources_status",label:"状态",width:"100"},{default:a(t=>[t.row.department_resources_status==0?(o(),y(b,{key:0,class:"ml-2",type:"danger"},{default:a(()=>[...e[7]||(e[7]=[i("禁用",-1)])]),_:1})):p("",!0),t.row.department_resources_status==1?(o(),y(b,{key:1,class:"ml-2",type:"success"},{default:a(()=>[...e[8]||(e[8]=[i("正常",-1)])]),_:1})):p("",!0)]),_:1}),l(c,{prop:"time_mode",label:"时令",width:"280"},{default:a(t=>[z("div",ne,[t.row.time_mode==0?(o(),y(b,{key:0,class:"ml-2",type:"info"},{default:a(()=>[...e[9]||(e[9]=[i("关闭",-1)])]),_:1})):p("",!0),t.row.time_mode==1?(o(),y(b,{key:1,class:"ml-2",type:"warning"},{default:a(()=>[...e[10]||(e[10]=[i("开启",-1)])]),_:1})):p("",!0),t.row.time_mode==1&&t.row.time_range?(o(),u("div",se,[(o(!0),u(h,null,A(t.row.time_range,g=>(o(),u("div",{key:g.type,style:{"margin-bottom":"2px"}},[g.type==="1"?(o(),u("span",re,"夏:")):(o(),u("span",ue,"冬:")),(o(!0),u(h,null,A(g.periods,(E,U)=>(o(),u("span",{key:U},[i(F(E.start)+"~"+F(E.end),1),U<g.periods.length-1?(o(),u("span",ie,"")):p("",!0)]))),128))]))),128))])):p("",!0)])]),_:1}),l(c,{prop:"",label:"操作",width:"180"},{default:a(t=>[l(C,{type:"primary",onClick:g=>G(t.row),size:"small"},{default:a(()=>[...e[11]||(e[11]=[i("修改",-1)])]),_:1},8,["onClick"]),l(C,{type:"danger",onClick:g=>j(t.row),size:"small"},{default:a(()=>[...e[12]||(e[12]=[i("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[Q,s(v)]]),z("div",de,[l(K,{"current-page":s(m),"onUpdate:currentPage":e[3]||(e[3]=t=>N(m)?m.value=t:m=t),"page-size":s(_),"onUpdate:pageSize":e[4]||(e[4]=t=>N(_)?_.value=t:_=t),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:s(S),onSizeChange:P,onCurrentChange:M},null,8,["current-page","page-size","total"])]),s(k)?(o(),y(ae,{key:0,departmentId:s(x),resourceInfo:s(I),onCloseAddResources:$},null,8,["departmentId","resourceInfo"])):p("",!0)])}}},ce=W(pe,[["__scopeId","data-v-0f1c48f6"]]);export{ce as default};
import{_ as W,g as d,o as X,r,c as Y,d as o,e as u,k as z,f as l,w as a,h as Z,i as s,j as y,l as N,x as p,aw as ee,E as L,q as i,F as h,t as A,v as F,N as te,ax as le}from"./index-87e3e912.js";import{_ as ae}from"./DepartmentResourcesSave-0c2a2470.js";const oe={class:"head"},ne={style:{display:"flex","align-items":"center"}},se={key:2,style:{"font-size":"12px","margin-left":"8px"}},re={key:0,style:{color:"#E6A23C"}},ue={key:1,style:{color:"#409EFF"}},ie={key:0},de={class:"page"},pe={__name:"DeptResourceConfig",setup(me){let v=d(!1),b=d(null),D=null;sessionStorage.getItem("LoginUserInfo")&&(D=JSON.parse(sessionStorage.getItem("LoginUserInfo")),b.value=D.department_id);let w=d({department_id:b.value,status:null,name:""}),I=d({id:null,department_id:null,department_resources_name:"",department_resources_addr:""}),R=d([]),m=d(1),_=d(15),S=0;const f=()=>{v.value=!0,ee({searchInfo:w.value,page:m.value,pageSize:_.value}).then(n=>{v.value=!1,n.status?(R.value=n.data.list,S=n.data.count):L.error(n.msg)})},P=n=>{_.value=n,f()},M=n=>{m.value=n,f()};let k=d(!1);const T=()=>{k.value=!0,I.value={}},G=n=>{k.value=!0,I.value=n},$=()=>{k.value=!1,f()},j=n=>{te.confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{v.value=!0,le({id:n.id}).then(e=>{v.value=!1,e.status?f():L.error(e.msg)})})};return X(()=>{f()}),(n,e)=>{const V=r("el-option"),q=r("el-select"),B=r("el-form-item"),J=r("el-input"),C=r("el-button"),O=r("el-row"),c=r("el-table-column"),x=r("el-tag"),H=r("el-table"),K=r("el-pagination"),Q=Y("loading");return o(),u("div",null,[z("div",oe,[l(O,null,{default:a(()=>[l(B,null,{default:a(()=>[l(q,{filterable:!0,clearable:"",modelValue:s(w).status,"onUpdate:modelValue":e[0]||(e[0]=t=>s(w).status=t),placeholder:"所有状态",style:{"margin-left":"10px"}},{default:a(()=>[l(V,{label:"正常",value:1}),l(V,{label:"不可用",value:0})]),_:1},8,["modelValue"])]),_:1}),l(B,null,{default:a(()=>[l(J,{modelValue:s(w).name,"onUpdate:modelValue":e[1]||(e[1]=t=>s(w).name=t),placeholder:"请输入排班名称",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(C,{style:{"margin-left":"10px"},onClick:f},{default:a(()=>[...e[5]||(e[5]=[i("查询",-1)])]),_:1}),l(C,{type:"primary",style:{"margin-left":"10px"},onClick:e[2]||(e[2]=t=>T())},{default:a(()=>[...e[6]||(e[6]=[i("添加排班",-1)])]),_:1})]),_:1})]),Z((o(),y(H,{data:s(R),style:{width:"100%"},"row-key":"id"},{default:a(()=>[l(c,{prop:"id",label:"Id",width:"100"}),l(c,{prop:"department_resources_name",label:"排班名称"}),l(c,{prop:"department_resources_addr",label:"资源位置"}),l(c,{prop:"department_resources_status",label:"状态",width:"100"},{default:a(t=>[t.row.department_resources_status==0?(o(),y(x,{key:0,class:"ml-2",type:"danger"},{default:a(()=>[...e[7]||(e[7]=[i("禁用",-1)])]),_:1})):p("",!0),t.row.department_resources_status==1?(o(),y(x,{key:1,class:"ml-2",type:"success"},{default:a(()=>[...e[8]||(e[8]=[i("正常",-1)])]),_:1})):p("",!0)]),_:1}),l(c,{prop:"time_mode",label:"时令",width:"280"},{default:a(t=>[z("div",ne,[t.row.time_mode==0?(o(),y(x,{key:0,class:"ml-2",type:"info"},{default:a(()=>[...e[9]||(e[9]=[i("关闭",-1)])]),_:1})):p("",!0),t.row.time_mode==1?(o(),y(x,{key:1,class:"ml-2",type:"warning"},{default:a(()=>[...e[10]||(e[10]=[i("开启",-1)])]),_:1})):p("",!0),t.row.time_mode==1&&t.row.time_range?(o(),u("div",se,[(o(!0),u(h,null,A(t.row.time_range,g=>(o(),u("div",{key:g.type,style:{"margin-bottom":"2px"}},[g.type==="1"?(o(),u("span",re,"夏:")):(o(),u("span",ue,"冬:")),(o(!0),u(h,null,A(g.periods,(E,U)=>(o(),u("span",{key:U},[i(F(E.start)+"~"+F(E.end),1),U<g.periods.length-1?(o(),u("span",ie,"")):p("",!0)]))),128))]))),128))])):p("",!0)])]),_:1}),l(c,{prop:"",label:"操作",width:"180"},{default:a(t=>[l(C,{type:"primary",onClick:g=>G(t.row),size:"small"},{default:a(()=>[...e[11]||(e[11]=[i("修改",-1)])]),_:1},8,["onClick"]),l(C,{type:"danger",onClick:g=>j(t.row),size:"small"},{default:a(()=>[...e[12]||(e[12]=[i("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[Q,s(v)]]),z("div",de,[l(K,{"current-page":s(m),"onUpdate:currentPage":e[3]||(e[3]=t=>N(m)?m.value=t:m=t),"page-size":s(_),"onUpdate:pageSize":e[4]||(e[4]=t=>N(_)?_.value=t:_=t),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:s(S),onSizeChange:P,onCurrentChange:M},null,8,["current-page","page-size","total"])]),s(k)?(o(),y(ae,{key:0,departmentId:s(b),resourceInfo:s(I),onCloseAddResources:$},null,8,["departmentId","resourceInfo"])):p("",!0)])}}},ce=W(pe,[["__scopeId","data-v-0f1c48f6"]]);export{ce as default};

@ -1 +1 @@
import{_ as H,o as J,r as s,c as K,d as g,e as O,k as b,f as l,w as n,h as I,i as o,j as C,l as x,F as Q,g as p,aA as W,E as k,q as d,x as U,N as X,aB as Y,aC as Z}from"./index-c64ce9a7.js";const h={class:"head"},ee={class:"page"},te={class:"dialog-footer"},le={__name:"DevicesConfig",setup(ae){let r=p(!1),c=p({name:""}),u=p({id:null,device_name:"",status:1}),i=p(!1),w=p([]),m=p(1),f=p(15),D=0;const v=()=>{r.value=!0,W({searchInfo:c.value,page:m.value,pageSize:f.value}).then(a=>{r.value=!1,a.status?(w.value=a.data.list,D=a.data.count):k.error(a.msg)})},E=a=>{f.value=a,v()},N=a=>{m.value=a,v()},P=()=>{i.value=!0,u.value.id=null,c.value.name=""},A=a=>{u.value={id:a.id,device_name:a.device_name,status:a.status},i.value=!0},L=a=>{X.confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Y({id:a}).then(e=>{r.value=!1,e.status?v():k.error(e.msg)})})},M=()=>{r.value=!0,Z({Info:u.value}).then(a=>{r.value=!1,a.status?(i.value=!1,v()):k.error(a.msg)})};return J(()=>{v()}),(a,e)=>{const z=s("el-input"),V=s("el-form-item"),_=s("el-button"),T=s("el-row"),y=s("el-table-column"),B=s("el-tag"),F=s("el-table"),G=s("el-pagination"),$=s("el-switch"),j=s("el-form"),q=s("el-dialog"),S=K("loading");return g(),O(Q,null,[b("div",h,[l(T,null,{default:n(()=>[l(V,null,{default:n(()=>[l(z,{modelValue:o(c).name,"onUpdate:modelValue":e[0]||(e[0]=t=>o(c).name=t),placeholder:"请输入服务组名称",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(_,{onClick:e[1]||(e[1]=t=>v()),style:{"margin-left":"10px"}},{default:n(()=>[...e[9]||(e[9]=[d("搜索",-1)])]),_:1}),l(_,{type:"primary",onClick:e[2]||(e[2]=t=>P()),style:{"margin-left":"10px"}},{default:n(()=>[...e[10]||(e[10]=[d("添加",-1)])]),_:1})]),_:1})]),I((g(),C(F,{data:o(w),style:{width:"100%"},"row-key":"id"},{default:n(()=>[l(y,{prop:"id",label:"Id",width:"100"}),l(y,{prop:"device_name",label:"服务组名称"}),l(y,{prop:"status",label:"状态"},{default:n(t=>[t.row.status==1?(g(),C(B,{key:0,class:"ml-2",type:"success"},{default:n(()=>[...e[11]||(e[11]=[d("正常",-1)])]),_:1})):U("",!0),t.row.status==0?(g(),C(B,{key:1,class:"ml-2",type:"danger"},{default:n(()=>[...e[12]||(e[12]=[d("关闭",-1)])]),_:1})):U("",!0)]),_:1}),l(y,{prop:"",label:"操作"},{default:n(t=>[l(_,{type:"primary",onClick:R=>A(t.row),size:"small",style:{"margin-left":"10px"}},{default:n(()=>[...e[13]||(e[13]=[d("修改",-1)])]),_:1},8,["onClick"]),l(_,{type:"danger",onClick:R=>L(t.row.id),size:"small",style:{"margin-left":"10px"}},{default:n(()=>[...e[14]||(e[14]=[d("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[S,o(r)]]),b("div",ee,[l(G,{"current-page":o(m),"onUpdate:currentPage":e[3]||(e[3]=t=>x(m)?m.value=t:m=t),"page-size":o(f),"onUpdate:pageSize":e[4]||(e[4]=t=>x(f)?f.value=t:f=t),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:o(D),onSizeChange:E,onCurrentChange:N},null,8,["current-page","page-size","total"])]),l(q,{modelValue:o(i),"onUpdate:modelValue":e[8]||(e[8]=t=>x(i)?i.value=t:i=t),title:"服务组信息",width:"30%"},{footer:n(()=>[b("span",te,[l(_,{onClick:e[7]||(e[7]=t=>x(i)?i.value=!1:i=!1)},{default:n(()=>[...e[15]||(e[15]=[d("取消",-1)])]),_:1}),l(_,{type:"primary",onClick:M},{default:n(()=>[...e[16]||(e[16]=[d(" 确定 ",-1)])]),_:1})])]),default:n(()=>[I((g(),C(j,{model:o(u),"label-width":"100px",style:{"padding-right":"40px"}},{default:n(()=>[l(V,{label:"服务组名称:"},{default:n(()=>[l(z,{modelValue:o(u).device_name,"onUpdate:modelValue":e[5]||(e[5]=t=>o(u).device_name=t)},null,8,["modelValue"])]),_:1}),l(V,{label:"服务组状态:"},{default:n(()=>[l($,{modelValue:o(u).status,"onUpdate:modelValue":e[6]||(e[6]=t=>o(u).status=t),size:"large","active-text":"正常","inactive-text":"关闭","active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[S,o(r)]])]),_:1},8,["modelValue"])],64)}}},oe=H(le,[["__scopeId","data-v-4d24df20"]]);export{oe as default};
import{_ as H,o as J,r as s,c as K,d as g,e as O,k as b,f as l,w as n,h as I,i as o,j as x,l as C,F as Q,g as p,ay as W,E as k,q as d,x as U,N as X,az as Y,aA as Z}from"./index-87e3e912.js";const h={class:"head"},ee={class:"page"},te={class:"dialog-footer"},le={__name:"DevicesConfig",setup(ae){let r=p(!1),c=p({name:""}),u=p({id:null,device_name:"",status:1}),i=p(!1),w=p([]),m=p(1),f=p(15),z=0;const v=()=>{r.value=!0,W({searchInfo:c.value,page:m.value,pageSize:f.value}).then(a=>{r.value=!1,a.status?(w.value=a.data.list,z=a.data.count):k.error(a.msg)})},E=a=>{f.value=a,v()},N=a=>{m.value=a,v()},P=()=>{i.value=!0,u.value.id=null,c.value.name=""},A=a=>{u.value={id:a.id,device_name:a.device_name,status:a.status},i.value=!0},L=a=>{X.confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Y({id:a}).then(e=>{r.value=!1,e.status?v():k.error(e.msg)})})},M=()=>{r.value=!0,Z({Info:u.value}).then(a=>{r.value=!1,a.status?(i.value=!1,v()):k.error(a.msg)})};return J(()=>{v()}),(a,e)=>{const D=s("el-input"),V=s("el-form-item"),_=s("el-button"),T=s("el-row"),y=s("el-table-column"),B=s("el-tag"),F=s("el-table"),G=s("el-pagination"),$=s("el-switch"),j=s("el-form"),q=s("el-dialog"),S=K("loading");return g(),O(Q,null,[b("div",h,[l(T,null,{default:n(()=>[l(V,null,{default:n(()=>[l(D,{modelValue:o(c).name,"onUpdate:modelValue":e[0]||(e[0]=t=>o(c).name=t),placeholder:"请输入服务组名称",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(_,{onClick:e[1]||(e[1]=t=>v()),style:{"margin-left":"10px"}},{default:n(()=>[...e[9]||(e[9]=[d("搜索",-1)])]),_:1}),l(_,{type:"primary",onClick:e[2]||(e[2]=t=>P()),style:{"margin-left":"10px"}},{default:n(()=>[...e[10]||(e[10]=[d("添加",-1)])]),_:1})]),_:1})]),I((g(),x(F,{data:o(w),style:{width:"100%"},"row-key":"id"},{default:n(()=>[l(y,{prop:"id",label:"Id",width:"100"}),l(y,{prop:"device_name",label:"服务组名称"}),l(y,{prop:"status",label:"状态"},{default:n(t=>[t.row.status==1?(g(),x(B,{key:0,class:"ml-2",type:"success"},{default:n(()=>[...e[11]||(e[11]=[d("正常",-1)])]),_:1})):U("",!0),t.row.status==0?(g(),x(B,{key:1,class:"ml-2",type:"danger"},{default:n(()=>[...e[12]||(e[12]=[d("关闭",-1)])]),_:1})):U("",!0)]),_:1}),l(y,{prop:"",label:"操作"},{default:n(t=>[l(_,{type:"primary",onClick:R=>A(t.row),size:"small",style:{"margin-left":"10px"}},{default:n(()=>[...e[13]||(e[13]=[d("修改",-1)])]),_:1},8,["onClick"]),l(_,{type:"danger",onClick:R=>L(t.row.id),size:"small",style:{"margin-left":"10px"}},{default:n(()=>[...e[14]||(e[14]=[d("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[S,o(r)]]),b("div",ee,[l(G,{"current-page":o(m),"onUpdate:currentPage":e[3]||(e[3]=t=>C(m)?m.value=t:m=t),"page-size":o(f),"onUpdate:pageSize":e[4]||(e[4]=t=>C(f)?f.value=t:f=t),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:o(z),onSizeChange:E,onCurrentChange:N},null,8,["current-page","page-size","total"])]),l(q,{modelValue:o(i),"onUpdate:modelValue":e[8]||(e[8]=t=>C(i)?i.value=t:i=t),title:"服务组信息",width:"30%"},{footer:n(()=>[b("span",te,[l(_,{onClick:e[7]||(e[7]=t=>C(i)?i.value=!1:i=!1)},{default:n(()=>[...e[15]||(e[15]=[d("取消",-1)])]),_:1}),l(_,{type:"primary",onClick:M},{default:n(()=>[...e[16]||(e[16]=[d(" 确定 ",-1)])]),_:1})])]),default:n(()=>[I((g(),x(j,{model:o(u),"label-width":"100px",style:{"padding-right":"40px"}},{default:n(()=>[l(V,{label:"服务组名称:"},{default:n(()=>[l(D,{modelValue:o(u).device_name,"onUpdate:modelValue":e[5]||(e[5]=t=>o(u).device_name=t)},null,8,["modelValue"])]),_:1}),l(V,{label:"服务组状态:"},{default:n(()=>[l($,{modelValue:o(u).status,"onUpdate:modelValue":e[6]||(e[6]=t=>o(u).status=t),size:"large","active-text":"正常","inactive-text":"关闭","active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[S,o(r)]])]),_:1},8,["modelValue"])],64)}}},oe=H(le,[["__scopeId","data-v-4d24df20"]]);export{oe as default};

@ -1 +1 @@
import{Y as a}from"./YuYue202506-04e9381b.js";import{_ as d,u as p,a as c,d as l,e as i,f as m,i as e,g as t}from"./index-c64ce9a7.js";const y={class:"DoctorYuYue"},Y={__name:"DoctorYuYue",setup(f){const o=p();c();let u=t(""),s=t([]),n=t(""),_=t(null),r=t(1);return console.log(o.query.regnum),u.value=decodeURIComponent(o.query.regnum),console.log(u.value),s.value=decodeURIComponent(o.query.entrustid),n.value=decodeURIComponent(o.query.episodeid),_.value=1,r.value=1,(v,g)=>(l(),i("div",y,[m(a,{reg_num:e(u),entrust_ids:e(s),episode_id:e(n),appointment_type:e(_),dotype:e(r)},null,8,["reg_num","entrust_ids","episode_id","appointment_type","dotype"])]))}},x=d(Y,[["__scopeId","data-v-180477f8"]]);export{x as default};
import{Y as a}from"./YuYue202506-0920f6d8.js";import{_ as d,u as p,a as c,d as l,e as i,f as m,i as e,g as t}from"./index-87e3e912.js";const y={class:"DoctorYuYue"},Y={__name:"DoctorYuYue",setup(f){const o=p();c();let u=t(""),s=t([]),n=t(""),_=t(null),r=t(1);return console.log(o.query.regnum),u.value=decodeURIComponent(o.query.regnum),console.log(u.value),s.value=decodeURIComponent(o.query.entrustid),n.value=decodeURIComponent(o.query.episodeid),_.value=1,r.value=1,(v,g)=>(l(),i("div",y,[m(a,{reg_num:e(u),entrust_ids:e(s),episode_id:e(n),appointment_type:e(_),dotype:e(r)},null,8,["reg_num","entrust_ids","episode_id","appointment_type","dotype"])]))}},x=d(Y,[["__scopeId","data-v-180477f8"]]);export{x as default};

@ -1 +1 @@
import{_ as p,o as v,r as m,d as c,e as l,i as a,k as n,x as _,f as u,w as k,v as x,H as y,y as h,g}from"./index-c64ce9a7.js";const w={class:"his-login-page"},I={key:0,class:"login-loading"},L={key:1,class:"error-card"},C={class:"error-card-icon"},H={class:"error-card-msg"},S={__name:"HisLogin",setup(B){let t=g(!0),s=g("");const f=()=>{t.value=!0,y({usercode:r("usercode"),deptcode:r("deptcode"),cardno:r("cardno")}).then(o=>{if(o.status){sessionStorage.setItem("token",o.data.access_token),sessionStorage.setItem("refreshToken",o.data.refresh_token),sessionStorage.setItem("default_reg_num",r("cardno"));var e=sessionStorage.getItem("token");e!=null&&e==o.data.access_token?(sessionStorage.setItem("LoginType","HisLogin"),window.location.href="./#/yewu/mainList?type=doctor"):(s.value="登录失败",t.value=!1)}else s.value=o.msg,t.value=!1}).catch(()=>{s.value="网络请求失败,请检查网络连接",t.value=!1})};v(()=>{f()});function r(o,e){e||(e=decodeURIComponent(window.location.href)),o=o.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+o+"(=([^&#]*)|&|#|$)"),d=i.exec(e);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}return(o,e)=>{const i=m("el-icon");return c(),l("div",w,[a(t)&&!a(s)?(c(),l("div",I,[...e[0]||(e[0]=[n("div",{class:"loading-text"},"正在登录...",-1)])])):_("",!0),a(s)?(c(),l("div",L,[n("div",C,[u(i,{size:48,color:"#F56C6C"},{default:k(()=>[u(a(h))]),_:1})]),e[1]||(e[1]=n("div",{class:"error-card-title"},"登录失败",-1)),n("div",H,x(a(s)),1),e[2]||(e[2]=n("div",{class:"error-card-hint"},"请检查 HIS 系统传参配置",-1))])):_("",!0)])}}},R=p(S,[["__scopeId","data-v-84a1486b"]]);export{R as default};
import{_ as p,o as v,r as m,d as c,e as l,i as a,k as n,x as _,f as u,w as k,v as x,H as y,y as h,g}from"./index-87e3e912.js";const w={class:"his-login-page"},I={key:0,class:"login-loading"},L={key:1,class:"error-card"},C={class:"error-card-icon"},H={class:"error-card-msg"},S={__name:"HisLogin",setup(B){let t=g(!0),s=g("");const f=()=>{t.value=!0,y({usercode:r("usercode"),deptcode:r("deptcode"),cardno:r("cardno")}).then(o=>{if(o.status){sessionStorage.setItem("token",o.data.access_token),sessionStorage.setItem("refreshToken",o.data.refresh_token),sessionStorage.setItem("default_reg_num",r("cardno"));var e=sessionStorage.getItem("token");e!=null&&e==o.data.access_token?(sessionStorage.setItem("LoginType","HisLogin"),window.location.href="./#/yewu/mainList?type=doctor"):(s.value="登录失败",t.value=!1)}else s.value=o.msg,t.value=!1}).catch(()=>{s.value="网络请求失败,请检查网络连接",t.value=!1})};v(()=>{f()});function r(o,e){e||(e=decodeURIComponent(window.location.href)),o=o.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+o+"(=([^&#]*)|&|#|$)"),d=i.exec(e);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}return(o,e)=>{const i=m("el-icon");return c(),l("div",w,[a(t)&&!a(s)?(c(),l("div",I,[...e[0]||(e[0]=[n("div",{class:"loading-text"},"正在登录...",-1)])])):_("",!0),a(s)?(c(),l("div",L,[n("div",C,[u(i,{size:48,color:"#F56C6C"},{default:k(()=>[u(a(h))]),_:1})]),e[1]||(e[1]=n("div",{class:"error-card-title"},"登录失败",-1)),n("div",H,x(a(s)),1),e[2]||(e[2]=n("div",{class:"error-card-hint"},"请检查 HIS 系统传参配置",-1))])):_("",!0)])}}},R=p(S,[["__scopeId","data-v-84a1486b"]]);export{R as default};

@ -1 +1 @@
import{_ as R,o as J,r as d,c as K,d as V,e as O,k as M,f as l,w as a,h as S,i as n,j as x,l as w,F as Q,g as p,bE as W,E as k,q as r,x as E,N as X,bF as Z,bG as h}from"./index-c64ce9a7.js";const ee={class:"head"},le={class:"page"},te={class:"dialog-footer"},ae={__name:"HolidayMngr",setup(oe){let m=p(!1),i=p({date_start:"",date_end:"",type:null}),u=p({id:null,date:"",type:2}),s=p(!1),Y=p([]),f=p(1),_=p(15),z=0;const g=()=>{m.value=!0,W({searchInfo:i.value,page:f.value,pageSize:_.value}).then(o=>{m.value=!1,o.status?(Y.value=o.data.list,z=o.data.count):k.error(o.msg)})},H=o=>{_.value=o,g()},I=o=>{f.value=o,g()},N=()=>{s.value=!0,u.value={id:null,date:"",type:2}},P=o=>{u.value={id:o.id,date:o.date,type:o.type},s.value=!0},F=o=>{X.confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Z({id:o}).then(e=>{e.status?g():k.error(e.msg)})})},G=()=>{if(!u.value.date){k.error("请选择日期");return}m.value=!0,h({Info:u.value}).then(o=>{m.value=!1,o.status?(s.value=!1,g()):k.error(o.msg)})};return J(()=>{g()}),(o,e)=>{const C=d("el-date-picker"),b=d("el-form-item"),c=d("el-option"),D=d("el-select"),y=d("el-button"),T=d("el-row"),v=d("el-table-column"),U=d("el-tag"),A=d("el-table"),L=d("el-pagination"),$=d("el-form"),j=d("el-dialog"),B=K("loading");return V(),O(Q,null,[M("div",ee,[l(T,null,{default:a(()=>[l(b,null,{default:a(()=>[l(C,{modelValue:n(i).date_start,"onUpdate:modelValue":e[0]||(e[0]=t=>n(i).date_start=t),type:"date",placeholder:"开始日期","value-format":"YYYY-MM-DD",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(b,null,{default:a(()=>[l(C,{modelValue:n(i).date_end,"onUpdate:modelValue":e[1]||(e[1]=t=>n(i).date_end=t),type:"date",placeholder:"结束日期","value-format":"YYYY-MM-DD",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(b,null,{default:a(()=>[l(D,{modelValue:n(i).type,"onUpdate:modelValue":e[2]||(e[2]=t=>n(i).type=t),placeholder:"类型",clearable:"",style:{"margin-left":"10px",width:"120px"}},{default:a(()=>[l(c,{label:"节假日",value:2}),l(c,{label:"工作日(补班)",value:1})]),_:1},8,["modelValue"])]),_:1}),l(y,{onClick:e[3]||(e[3]=t=>g()),style:{"margin-left":"10px"}},{default:a(()=>[...e[11]||(e[11]=[r("搜索",-1)])]),_:1}),l(y,{type:"primary",onClick:e[4]||(e[4]=t=>N()),style:{"margin-left":"10px"}},{default:a(()=>[...e[12]||(e[12]=[r("添加",-1)])]),_:1})]),_:1})]),S((V(),x(A,{data:n(Y),style:{width:"100%"},"row-key":"id"},{default:a(()=>[l(v,{prop:"id",label:"Id",width:"100"}),l(v,{prop:"date",label:"日期",width:"180"}),l(v,{prop:"year",label:"年份",width:"100"}),l(v,{prop:"type",label:"类型",width:"150"},{default:a(t=>[t.row.type==2?(V(),x(U,{key:0,type:"danger"},{default:a(()=>[...e[13]||(e[13]=[r("节假日",-1)])]),_:1})):E("",!0),t.row.type==1?(V(),x(U,{key:1,type:"success"},{default:a(()=>[...e[14]||(e[14]=[r("工作日(补班)",-1)])]),_:1})):E("",!0)]),_:1}),l(v,{prop:"created_at",label:"创建时间"}),l(v,{prop:"",label:"操作",width:"180"},{default:a(t=>[l(y,{type:"primary",onClick:q=>P(t.row),size:"small",style:{"margin-left":"10px"}},{default:a(()=>[...e[15]||(e[15]=[r("修改",-1)])]),_:1},8,["onClick"]),l(y,{type:"danger",onClick:q=>F(t.row.id),size:"small",style:{"margin-left":"10px"}},{default:a(()=>[...e[16]||(e[16]=[r("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[B,n(m)]]),M("div",le,[l(L,{"current-page":n(f),"onUpdate:currentPage":e[5]||(e[5]=t=>w(f)?f.value=t:f=t),"page-size":n(_),"onUpdate:pageSize":e[6]||(e[6]=t=>w(_)?_.value=t:_=t),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:n(z),onSizeChange:H,onCurrentChange:I},null,8,["current-page","page-size","total"])]),l(j,{modelValue:n(s),"onUpdate:modelValue":e[10]||(e[10]=t=>w(s)?s.value=t:s=t),title:"节假日信息",width:"30%"},{footer:a(()=>[M("span",te,[l(y,{onClick:e[9]||(e[9]=t=>w(s)?s.value=!1:s=!1)},{default:a(()=>[...e[17]||(e[17]=[r("取消",-1)])]),_:1}),l(y,{type:"primary",onClick:G},{default:a(()=>[...e[18]||(e[18]=[r("确定",-1)])]),_:1})])]),default:a(()=>[S((V(),x($,{model:n(u),"label-width":"100px",style:{"padding-right":"40px"}},{default:a(()=>[l(b,{label:"日期:"},{default:a(()=>[l(C,{modelValue:n(u).date,"onUpdate:modelValue":e[7]||(e[7]=t=>n(u).date=t),type:"date",placeholder:"选择日期","value-format":"YYYY-MM-DD",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),l(b,{label:"类型:"},{default:a(()=>[l(D,{modelValue:n(u).type,"onUpdate:modelValue":e[8]||(e[8]=t=>n(u).type=t),style:{width:"100%"}},{default:a(()=>[l(c,{label:"节假日",value:2}),l(c,{label:"工作日(补班)",value:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[B,n(m)]])]),_:1},8,["modelValue"])],64)}}},de=R(ae,[["__scopeId","data-v-6eb2cce3"]]);export{de as default};
import{_ as R,o as J,r as d,c as K,d as V,e as O,k as D,f as l,w as a,h as S,i as n,j as x,l as w,F as Q,g as p,bB as W,E as C,q as r,x as H,N as X,bC as Z,bD as h}from"./index-87e3e912.js";const ee={class:"head"},le={class:"page"},te={class:"dialog-footer"},ae={__name:"HolidayMngr",setup(oe){let m=p(!1),i=p({date_start:"",date_end:"",type:null}),u=p({id:null,date:"",type:2}),s=p(!1),M=p([]),f=p(1),_=p(15),Y=0;const g=()=>{m.value=!0,W({searchInfo:i.value,page:f.value,pageSize:_.value}).then(o=>{m.value=!1,o.status?(M.value=o.data.list,Y=o.data.count):C.error(o.msg)})},I=o=>{_.value=o,g()},E=o=>{f.value=o,g()},N=()=>{s.value=!0,u.value={id:null,date:"",type:2}},P=o=>{u.value={id:o.id,date:o.date,type:o.type},s.value=!0},T=o=>{X.confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Z({id:o}).then(e=>{e.status?g():C.error(e.msg)})})},A=()=>{if(!u.value.date){C.error("请选择日期");return}m.value=!0,h({Info:u.value}).then(o=>{m.value=!1,o.status?(s.value=!1,g()):C.error(o.msg)})};return J(()=>{g()}),(o,e)=>{const k=d("el-date-picker"),b=d("el-form-item"),c=d("el-option"),z=d("el-select"),y=d("el-button"),F=d("el-row"),v=d("el-table-column"),B=d("el-tag"),G=d("el-table"),L=d("el-pagination"),$=d("el-form"),j=d("el-dialog"),U=K("loading");return V(),O(Q,null,[D("div",ee,[l(F,null,{default:a(()=>[l(b,null,{default:a(()=>[l(k,{modelValue:n(i).date_start,"onUpdate:modelValue":e[0]||(e[0]=t=>n(i).date_start=t),type:"date",placeholder:"开始日期","value-format":"YYYY-MM-DD",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(b,null,{default:a(()=>[l(k,{modelValue:n(i).date_end,"onUpdate:modelValue":e[1]||(e[1]=t=>n(i).date_end=t),type:"date",placeholder:"结束日期","value-format":"YYYY-MM-DD",style:{"margin-left":"10px"}},null,8,["modelValue"])]),_:1}),l(b,null,{default:a(()=>[l(z,{modelValue:n(i).type,"onUpdate:modelValue":e[2]||(e[2]=t=>n(i).type=t),placeholder:"类型",clearable:"",style:{"margin-left":"10px",width:"120px"}},{default:a(()=>[l(c,{label:"节假日",value:2}),l(c,{label:"工作日(补班)",value:1})]),_:1},8,["modelValue"])]),_:1}),l(y,{onClick:e[3]||(e[3]=t=>g()),style:{"margin-left":"10px"}},{default:a(()=>[...e[11]||(e[11]=[r("搜索",-1)])]),_:1}),l(y,{type:"primary",onClick:e[4]||(e[4]=t=>N()),style:{"margin-left":"10px"}},{default:a(()=>[...e[12]||(e[12]=[r("添加",-1)])]),_:1})]),_:1})]),S((V(),x(G,{data:n(M),style:{width:"100%"},"row-key":"id"},{default:a(()=>[l(v,{prop:"id",label:"Id",width:"100"}),l(v,{prop:"date",label:"日期",width:"180"}),l(v,{prop:"year",label:"年份",width:"100"}),l(v,{prop:"type",label:"类型",width:"150"},{default:a(t=>[t.row.type==2?(V(),x(B,{key:0,type:"danger"},{default:a(()=>[...e[13]||(e[13]=[r("节假日",-1)])]),_:1})):H("",!0),t.row.type==1?(V(),x(B,{key:1,type:"success"},{default:a(()=>[...e[14]||(e[14]=[r("工作日(补班)",-1)])]),_:1})):H("",!0)]),_:1}),l(v,{prop:"created_at",label:"创建时间"}),l(v,{prop:"",label:"操作",width:"180"},{default:a(t=>[l(y,{type:"primary",onClick:q=>P(t.row),size:"small",style:{"margin-left":"10px"}},{default:a(()=>[...e[15]||(e[15]=[r("修改",-1)])]),_:1},8,["onClick"]),l(y,{type:"danger",onClick:q=>T(t.row.id),size:"small",style:{"margin-left":"10px"}},{default:a(()=>[...e[16]||(e[16]=[r("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[U,n(m)]]),D("div",le,[l(L,{"current-page":n(f),"onUpdate:currentPage":e[5]||(e[5]=t=>w(f)?f.value=t:f=t),"page-size":n(_),"onUpdate:pageSize":e[6]||(e[6]=t=>w(_)?_.value=t:_=t),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:n(Y),onSizeChange:I,onCurrentChange:E},null,8,["current-page","page-size","total"])]),l(j,{modelValue:n(s),"onUpdate:modelValue":e[10]||(e[10]=t=>w(s)?s.value=t:s=t),title:"节假日信息",width:"30%"},{footer:a(()=>[D("span",te,[l(y,{onClick:e[9]||(e[9]=t=>w(s)?s.value=!1:s=!1)},{default:a(()=>[...e[17]||(e[17]=[r("取消",-1)])]),_:1}),l(y,{type:"primary",onClick:A},{default:a(()=>[...e[18]||(e[18]=[r("确定",-1)])]),_:1})])]),default:a(()=>[S((V(),x($,{model:n(u),"label-width":"100px",style:{"padding-right":"40px"}},{default:a(()=>[l(b,{label:"日期:"},{default:a(()=>[l(k,{modelValue:n(u).date,"onUpdate:modelValue":e[7]||(e[7]=t=>n(u).date=t),type:"date",placeholder:"选择日期","value-format":"YYYY-MM-DD",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),l(b,{label:"类型:"},{default:a(()=>[l(z,{modelValue:n(u).type,"onUpdate:modelValue":e[8]||(e[8]=t=>n(u).type=t),style:{width:"100%"}},{default:a(()=>[l(c,{label:"节假日",value:2}),l(c,{label:"工作日(补班)",value:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[U,n(m)]])]),_:1},8,["modelValue"])],64)}}},de=R(ae,[["__scopeId","data-v-6eb2cce3"]]);export{de as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
.iframe{border:0px;width:100%;height:100%;margin-top:-20px}.iframeDialog{margin-top:40px;height:90%;width:90%;overflow:auto}#tablelist .el-checkbox[aria-label=]{display:none}.batch-print-table .el-checkbox[aria-label=]{display:inline-flex}.el-dialog.is-fullscreen{display:flex;flex-direction:column}.el-dialog.is-fullscreen .el-dialog__body{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialogitem[data-v-0da3e27e]{cursor:pointer;display:flex;border-left:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc}.dialogitem[data-v-0da3e27e]:hover{background-color:#008b8b;color:#fff}
.iframe{border:0px;width:100%;height:100%;margin-top:-20px}.iframeDialog{margin-top:40px;height:90%;width:90%;overflow:auto}#tablelist .el-checkbox[aria-label=]{display:none}.batch-print-table .el-checkbox[aria-label=]{display:inline-flex}.el-dialog.is-fullscreen{display:flex;flex-direction:column}.el-dialog.is-fullscreen .el-dialog__body{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialogitem[data-v-4ddf3986]{cursor:pointer;display:flex;border-left:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc}.dialogitem[data-v-4ddf3986]:hover{background-color:#008b8b;color:#fff}

@ -1 +1 @@
import{_ as D,Y as V,o as Y,r as n,c as R,d as p,e as g,k as h,f as l,w as i,i as o,x as L,h as B,j as T,F as I,K as j,bQ as E,I as F,E as N,q as A,g as u,bP as S}from"./index-c64ce9a7.js";const G={class:"head"},K={key:0,id:"MonthCount",class:"MonthCount"},O={__name:"MakeListTj",setup(U){V(()=>groupList.value.filter(e=>e.id==2));let r=u(!1),a=u({name:"",dateRange:[]}),c=u([]);const C=()=>{j().then(e=>{if(e.status){let t=e.data.datetime.substr(0,10);a.value.dateRange=[t,t],_()}})};let m=u(0),s=u(0);const _=()=>{r.value=!0,E({searchInfo:a.value}).then(e=>{r.value=!1,e.status?(c.value=e.data.MonthCountList,s.value=e.data.Count,m.value=e.data.AppointmentCount,s.value>0&&F(()=>{M()})):N.error(e.msg)})},M=()=>{var e=S(document.getElementById("MonthCount"));e.setOption({title:{text:a.value.dateRange[0]+"~"+a.value.dateRange[1]+"开单检查量比",subtext:"开单总量 "+s.value,left:"center"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{name:"Access From",type:"pie",radius:"50%",data:[{value:s.value-m.value,name:"未预约"},{value:m.value,name:"已预约"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})};return Y(()=>{C()}),(e,t)=>{const f=n("el-date-picker"),b=n("el-form-item"),k=n("el-button"),x=n("el-row"),v=n("el-table-column"),y=n("el-table"),w=R("loading");return p(),g(I,null,[h("div",G,[l(x,null,{default:i(()=>[l(b,null,{default:i(()=>[l(f,{style:{"margin-left":"8px",width:"150px"},modelValue:o(a).dateRange[0],"onUpdate:modelValue":t[0]||(t[0]=d=>o(a).dateRange[0]=d),type:"date",placeholder:"开始时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),t[3]||(t[3]=h("span",{style:{margin:"0 4px"}},"至",-1)),l(f,{style:{width:"150px"},modelValue:o(a).dateRange[1],"onUpdate:modelValue":t[1]||(t[1]=d=>o(a).dateRange[1]=d),type:"date",placeholder:"结束时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),l(k,{onClick:t[2]||(t[2]=d=>_()),style:{"margin-left":"10px"}},{default:i(()=>[...t[4]||(t[4]=[A("搜索",-1)])]),_:1})]),_:1})]),o(s)>0?(p(),g("div",K)):L("",!0),B((p(),T(y,{data:o(c),style:{width:"100%"},"row-key":"id"},{default:i(()=>[l(v,{prop:"month",label:"月份"}),l(v,{prop:"count",label:"开单数量"})]),_:1},8,["data"])),[[w,o(r)]])],64)}}},P=D(O,[["__scopeId","data-v-bfec251f"]]);export{P as default};
import{_ as D,Y as V,o as Y,r as n,c as R,d as p,e as g,k as h,f as l,w as i,i as o,x as L,h as B,j as T,F as I,K as N,bN as j,I as E,E as F,q as A,g as u,bM as S}from"./index-87e3e912.js";const G={class:"head"},K={key:0,id:"MonthCount",class:"MonthCount"},O={__name:"MakeListTj",setup(U){V(()=>groupList.value.filter(e=>e.id==2));let r=u(!1),a=u({name:"",dateRange:[]}),c=u([]);const M=()=>{N().then(e=>{if(e.status){let t=e.data.datetime.substr(0,10);a.value.dateRange=[t,t],_()}})};let m=u(0),s=u(0);const _=()=>{r.value=!0,j({searchInfo:a.value}).then(e=>{r.value=!1,e.status?(c.value=e.data.MonthCountList,s.value=e.data.Count,m.value=e.data.AppointmentCount,s.value>0&&E(()=>{C()})):F.error(e.msg)})},C=()=>{var e=S(document.getElementById("MonthCount"));e.setOption({title:{text:a.value.dateRange[0]+"~"+a.value.dateRange[1]+"开单检查量比",subtext:"开单总量 "+s.value,left:"center"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{name:"Access From",type:"pie",radius:"50%",data:[{value:s.value-m.value,name:"未预约"},{value:m.value,name:"已预约"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})};return Y(()=>{M()}),(e,t)=>{const f=n("el-date-picker"),b=n("el-form-item"),k=n("el-button"),x=n("el-row"),v=n("el-table-column"),y=n("el-table"),w=R("loading");return p(),g(I,null,[h("div",G,[l(x,null,{default:i(()=>[l(b,null,{default:i(()=>[l(f,{style:{"margin-left":"8px",width:"150px"},modelValue:o(a).dateRange[0],"onUpdate:modelValue":t[0]||(t[0]=d=>o(a).dateRange[0]=d),type:"date",placeholder:"开始时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),t[3]||(t[3]=h("span",{style:{margin:"0 4px"}},"至",-1)),l(f,{style:{width:"150px"},modelValue:o(a).dateRange[1],"onUpdate:modelValue":t[1]||(t[1]=d=>o(a).dateRange[1]=d),type:"date",placeholder:"结束时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),l(k,{onClick:t[2]||(t[2]=d=>_()),style:{"margin-left":"10px"}},{default:i(()=>[...t[4]||(t[4]=[A("搜索",-1)])]),_:1})]),_:1})]),o(s)>0?(p(),g("div",K)):L("",!0),B((p(),T(y,{data:o(c),style:{width:"100%"},"row-key":"id"},{default:i(()=>[l(v,{prop:"month",label:"月份"}),l(v,{prop:"count",label:"开单数量"})]),_:1},8,["data"])),[[w,o(r)]])],64)}}},X=D(O,[["__scopeId","data-v-bfec251f"]]);export{X as default};

@ -0,0 +1 @@
@charset "UTF-8";.type_count[data-v-cd746d69]{display:flex}.type_count div[data-v-cd746d69]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-cd746d69]{display:flex}.qudao_k_input[data-v-cd746d69]{width:150px}.hongzi[data-v-cd746d69]{color:#b25252}.yiyong[data-v-cd746d69]{font-weight:700;color:#f5a96c;cursor:pointer}.yiyong[data-v-cd746d69]:hover{color:#666}.zhenshiButton[data-v-cd746d69]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-cd746d69]{background-color:#5bc0de;color:#fff}.plan_checkAllbox[data-v-cd746d69]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-cd746d69]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k_disabled[data-v-cd746d69]{background-color:#ffd6d2}.planInfo_k[data-v-cd746d69]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:6px;padding-bottom:10px;padding-right:8px}.planInfo_k .zong_row[data-v-cd746d69]{text-align:right}.planInfo_k .zong_row .qudao_title_zong[data-v-cd746d69]{font-weight:600}.planInfo_k .zong_row .qudao_title_zong span[data-v-cd746d69]{font-weight:500}.planInfo_k .plan_checkbox[data-v-cd746d69]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-cd746d69]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .hoverTools[data-v-cd746d69]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-cd746d69]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-cd746d69]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-cd746d69]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap}.planInfo_k .qudao_count_row[data-v-cd746d69]{display:flex}.planInfo_k .qudao_count_row div[data-v-cd746d69]{margin-left:6px}.planInfo .planTable[data-v-cd746d69]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-cd746d69]{border:1px solid #f1f1f1}.planInfo .planTable td[data-v-cd746d69]:first-child,.planInfo .planTable th[data-v-cd746d69]:first-child{position:sticky;left:0;background-color:#fafafa;z-index:1}.planInfo .table_plan_row td[data-v-cd746d69]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-cd746d69]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-cd746d69]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-cd746d69]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-cd746d69]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-cd746d69]{width:100px}.yellow[data-v-cd746d69]{color:#ffaa7f}.red[data-v-cd746d69]{color:#c81e00}.bold-text[data-v-cd746d69]{font-weight:700}.drag-selection-overlay[data-v-cd746d69]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-cd746d69]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-cd746d69]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
@charset "UTF-8";.type_count[data-v-d6633b3d]{display:flex}.type_count div[data-v-d6633b3d]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-d6633b3d]{display:flex}.qudao_k_input[data-v-d6633b3d]{width:150px}.hongzi[data-v-d6633b3d]{color:#b25252}.yiyong[data-v-d6633b3d]{font-weight:700;color:#f5a96c;cursor:pointer}.yiyong[data-v-d6633b3d]:hover{color:#666}.zhenshiButton[data-v-d6633b3d]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-d6633b3d]{background-color:#5bc0de;color:#fff}.plan_checkAllbox[data-v-d6633b3d]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-d6633b3d]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k_disabled[data-v-d6633b3d]{background-color:#ffd6d2}.planInfo_k[data-v-d6633b3d]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:6px;padding-bottom:10px;padding-right:8px}.planInfo_k .zong_row[data-v-d6633b3d]{text-align:right}.planInfo_k .zong_row .qudao_title_zong[data-v-d6633b3d]{font-weight:600}.planInfo_k .zong_row .qudao_title_zong span[data-v-d6633b3d]{font-weight:500}.planInfo_k .plan_checkbox[data-v-d6633b3d]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-d6633b3d]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .hoverTools[data-v-d6633b3d]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-d6633b3d]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-d6633b3d]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-d6633b3d]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap}.planInfo_k .qudao_count_row[data-v-d6633b3d]{display:flex}.planInfo_k .qudao_count_row div[data-v-d6633b3d]{margin-left:6px}.planInfo_k .qudao_count_row.qudao_count_row_simple[data-v-d6633b3d]{flex-direction:column;align-items:center;gap:4px}.planInfo_k .qudao_count_row.qudao_count_row_simple .card_total[data-v-d6633b3d]{display:block;width:100%;background:#409eff;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px;text-align:center}.planInfo_k .qudao_count_row.qudao_count_row_simple .card_locked[data-v-d6633b3d]{display:inline-block;background:#e6a23c;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo_k .qudao_count_row.qudao_count_row_simple .font_color[data-v-d6633b3d]{display:inline-block;background:#67c23a;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo .planTable[data-v-d6633b3d]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-d6633b3d]{border:1px solid #f1f1f1;padding:8px 6px}.planInfo .planTable td[data-v-d6633b3d]:first-child,.planInfo .planTable th[data-v-d6633b3d]:first-child{position:sticky;left:0;background-color:#fafafa;z-index:1}.planInfo .table_plan_row td[data-v-d6633b3d]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-d6633b3d]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-d6633b3d]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-d6633b3d]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-d6633b3d]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-d6633b3d]{width:100px}.yellow[data-v-d6633b3d]{color:#ffaa7f}.red[data-v-d6633b3d]{color:#c81e00}.bold-text[data-v-d6633b3d]{font-weight:700}.drag-selection-overlay[data-v-d6633b3d]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-d6633b3d]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-d6633b3d]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
@charset "UTF-8";.type_count[data-v-4f6b0b2a]{display:flex}.type_count div[data-v-4f6b0b2a]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-4f6b0b2a]{display:flex}.qudao_k_input[data-v-4f6b0b2a]{width:150px}.hongzi[data-v-4f6b0b2a]{color:#b25252}.yiyong[data-v-4f6b0b2a]{font-weight:700;color:#f5a96c;cursor:pointer}.yiyong[data-v-4f6b0b2a]:hover{color:#666}.zhenshiButton[data-v-4f6b0b2a]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-4f6b0b2a]{background-color:#5bc0de;color:#fff}.plan_checkAllbox[data-v-4f6b0b2a]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-4f6b0b2a]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k_disabled[data-v-4f6b0b2a]{background-color:#ffd6d2}.planInfo_k[data-v-4f6b0b2a]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:6px;padding-bottom:10px;padding-right:8px}.planInfo_k .zong_row[data-v-4f6b0b2a]{text-align:right}.planInfo_k .zong_row .qudao_title_zong[data-v-4f6b0b2a]{font-weight:600}.planInfo_k .zong_row .qudao_title_zong span[data-v-4f6b0b2a]{font-weight:500}.planInfo_k .plan_checkbox[data-v-4f6b0b2a]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-4f6b0b2a]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .hoverTools[data-v-4f6b0b2a]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-4f6b0b2a]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-4f6b0b2a]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-4f6b0b2a]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap;line-height:1.4}.planInfo_k .qudao_count_row[data-v-4f6b0b2a]{display:flex}.planInfo_k .qudao_count_row div[data-v-4f6b0b2a]{margin-left:6px}.planInfo .planTable[data-v-4f6b0b2a]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-4f6b0b2a]{border:1px solid #f1f1f1}.planInfo .planTable td[data-v-4f6b0b2a]:first-child,.planInfo .planTable th[data-v-4f6b0b2a]:first-child{position:sticky;left:0;background-color:#fafafa;z-index:1}.planInfo .table_plan_row td[data-v-4f6b0b2a]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-4f6b0b2a]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-4f6b0b2a]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-4f6b0b2a]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-4f6b0b2a]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-4f6b0b2a]{width:100px}.yellow[data-v-4f6b0b2a]{color:#ffaa7f}.red[data-v-4f6b0b2a]{color:#c81e00}.bold-text[data-v-4f6b0b2a]{font-weight:700}.drag-selection-overlay[data-v-4f6b0b2a]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-4f6b0b2a]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-4f6b0b2a]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

@ -1 +0,0 @@
@charset "UTF-8";.type_count[data-v-199e380a]{display:flex}.type_count div[data-v-199e380a]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-199e380a]{display:flex}.qudao_k_input[data-v-199e380a]{width:150px}.hongzi[data-v-199e380a]{color:#b25252}.yiyong[data-v-199e380a]{font-weight:700;color:#f5a96c;cursor:pointer}.yiyong[data-v-199e380a]:hover{color:#666}.zhenshiButton[data-v-199e380a]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-199e380a]{background-color:#5bc0de;color:#fff}.plan_checkAllbox[data-v-199e380a]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-199e380a]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k_disabled[data-v-199e380a]{background-color:#ffd6d2}.planInfo_k[data-v-199e380a]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:6px;padding-bottom:10px;padding-right:8px}.planInfo_k .zong_row[data-v-199e380a]{text-align:right}.planInfo_k .zong_row .qudao_title_zong[data-v-199e380a]{font-weight:600}.planInfo_k .zong_row .qudao_title_zong span[data-v-199e380a]{font-weight:500}.planInfo_k .plan_checkbox[data-v-199e380a]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-199e380a]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .hoverTools[data-v-199e380a]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-199e380a]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-199e380a]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-199e380a]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap;line-height:1.4}.planInfo_k .qudao_count_row[data-v-199e380a]{display:flex}.planInfo_k .qudao_count_row div[data-v-199e380a]{margin-left:6px}.planInfo_k .qudao_count_row.qudao_count_row_simple[data-v-199e380a]{flex-direction:column;align-items:center;gap:4px}.planInfo_k .qudao_count_row.qudao_count_row_simple .card_total[data-v-199e380a]{display:block;width:100%;background:#409eff;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px;text-align:center}.planInfo_k .qudao_count_row.qudao_count_row_simple .card_locked[data-v-199e380a]{display:inline-block;background:#e6a23c;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo_k .qudao_count_row.qudao_count_row_simple .font_color[data-v-199e380a]{display:inline-block;background:#67c23a;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo .planTable[data-v-199e380a]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-199e380a]{border:1px solid #f1f1f1;padding:8px 6px}.planInfo .planTable td[data-v-199e380a]:first-child,.planInfo .planTable th[data-v-199e380a]:first-child{position:sticky;left:0;background-color:#fafafa;z-index:1}.planInfo .table_plan_row td[data-v-199e380a]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-199e380a]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-199e380a]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-199e380a]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-199e380a]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-199e380a]{width:100px}.yellow[data-v-199e380a]{color:#ffaa7f}.red[data-v-199e380a]{color:#c81e00}.bold-text[data-v-199e380a]{font-weight:700}.drag-selection-overlay[data-v-199e380a]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-199e380a]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-199e380a]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

@ -1 +0,0 @@
@charset "UTF-8";.type_count[data-v-56a0a5b5]{display:flex}.type_count div[data-v-56a0a5b5]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-56a0a5b5]{display:flex}.qudao_k_input[data-v-56a0a5b5]{width:150px}.hongzi[data-v-56a0a5b5]{color:#b25252}.planInfo .planTable[data-v-56a0a5b5]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-56a0a5b5]{border:1px solid #f1f1f1}.planInfo .table_plan_row td[data-v-56a0a5b5]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-56a0a5b5]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-56a0a5b5]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-56a0a5b5]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-56a0a5b5]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-56a0a5b5]{width:100px}.zhenshiButton[data-v-56a0a5b5]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-56a0a5b5]{background-color:#5bc0de;color:#fff}.planInfo_k_disabled[data-v-56a0a5b5]{background-color:#ffd6d2}.planInfo_k[data-v-56a0a5b5]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:18px;padding-bottom:10px}.planInfo_k .plan_checkbox[data-v-56a0a5b5]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-56a0a5b5]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .qudao_count_row[data-v-56a0a5b5]{display:flex}.planInfo_k .qudao_count_row div[data-v-56a0a5b5]{margin-left:6px}.planInfo_k .qudao_count_row .card_total[data-v-56a0a5b5]{display:inline-block;background:#409eff;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo_k .qudao_count_row .card_locked[data-v-56a0a5b5]{display:inline-block;background:#e6a23c;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo_k .qudao_count_row.qudao_count_row_simple[data-v-56a0a5b5]{justify-content:center;gap:12px}.planInfo_k .qudao_count_row .qudao_title_zong[data-v-56a0a5b5],.planInfo_k .qudao_count_row .qudao_title_zong span[data-v-56a0a5b5]{font-weight:700}.planInfo_k .patient_type_row[data-v-56a0a5b5]{display:flex;margin-top:4px;justify-content:center}.planInfo_k .patient_type_row .tps[data-v-56a0a5b5]{background-color:#ebfff4;border:1px solid #9fdebc;color:#83b69a;font-size:12px;padding:1px 2px;border-radius:4px;margin-left:4px}.planInfo_k .locked_count_row[data-v-56a0a5b5]{position:absolute;top:2px;right:4px;color:#ff9800;font-size:12px;font-weight:700}.planInfo_k .hoverTools[data-v-56a0a5b5]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-56a0a5b5]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-56a0a5b5]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-56a0a5b5]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap}.plan_checkAllbox[data-v-56a0a5b5]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-56a0a5b5]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.drag-selection-overlay[data-v-56a0a5b5]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-56a0a5b5]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-56a0a5b5]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

@ -0,0 +1 @@
@charset "UTF-8";.type_count[data-v-577353c5]{display:flex}.type_count div[data-v-577353c5]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-577353c5]{display:flex}.qudao_k_input[data-v-577353c5]{width:150px}.hongzi[data-v-577353c5]{color:#b25252}.planInfo .planTable[data-v-577353c5]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-577353c5]{border:1px solid #f1f1f1}.planInfo .table_plan_row td[data-v-577353c5]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-577353c5]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-577353c5]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-577353c5]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-577353c5]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-577353c5]{width:100px}.zhenshiButton[data-v-577353c5]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-577353c5]{background-color:#5bc0de;color:#fff}.planInfo_k_disabled[data-v-577353c5]{background-color:#ffd6d2}.planInfo_k[data-v-577353c5]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:18px;padding-bottom:10px}.planInfo_k .plan_checkbox[data-v-577353c5]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-577353c5]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .qudao_count_row[data-v-577353c5]{display:flex}.planInfo_k .qudao_count_row div[data-v-577353c5]{margin-left:6px}.planInfo_k .qudao_count_row .qudao_title_zong[data-v-577353c5],.planInfo_k .qudao_count_row .qudao_title_zong span[data-v-577353c5]{font-weight:700}.planInfo_k .patient_type_row[data-v-577353c5]{display:flex;margin-top:4px;justify-content:center}.planInfo_k .patient_type_row .tps[data-v-577353c5]{background-color:#ebfff4;border:1px solid #9fdebc;color:#83b69a;font-size:12px;padding:1px 2px;border-radius:4px;margin-left:4px}.planInfo_k .locked_count_row[data-v-577353c5]{position:absolute;top:2px;right:4px;color:#ff9800;font-size:12px;font-weight:700}.planInfo_k .hoverTools[data-v-577353c5]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-577353c5]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-577353c5]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-577353c5]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap}.plan_checkAllbox[data-v-577353c5]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-577353c5]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.drag-selection-overlay[data-v-577353c5]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-577353c5]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-577353c5]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
@charset "UTF-8";.type_count[data-v-0f412729]{display:flex}.type_count div[data-v-0f412729]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-0f412729]{display:flex}.qudao_k_input[data-v-0f412729]{width:150px}.hongzi[data-v-0f412729]{color:#b25252}.planInfo .planTable[data-v-0f412729]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-0f412729]{border:1px solid #f1f1f1}.planInfo .table_plan_row td[data-v-0f412729]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-0f412729]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-0f412729]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-0f412729]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-0f412729]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-0f412729]{width:100px}.zhenshiButton[data-v-0f412729]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-0f412729]{background-color:#5bc0de;color:#fff}.planInfo_k_disabled[data-v-0f412729]{background-color:#ffd6d2}.planInfo_k[data-v-0f412729]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:18px;padding-bottom:10px}.planInfo_k .plan_checkbox[data-v-0f412729]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-0f412729]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .qudao_count_row[data-v-0f412729]{display:flex}.planInfo_k .qudao_count_row div[data-v-0f412729]{margin-left:6px}.planInfo_k .qudao_count_row .qudao_title_zong[data-v-0f412729],.planInfo_k .qudao_count_row .qudao_title_zong span[data-v-0f412729]{font-weight:700}.planInfo_k .patient_type_row[data-v-0f412729]{display:flex;margin-top:4px;justify-content:center}.planInfo_k .patient_type_row .tps[data-v-0f412729]{background-color:#ebfff4;border:1px solid #9fdebc;color:#83b69a;font-size:12px;padding:1px 2px;border-radius:4px;margin-left:4px}.planInfo_k .locked_count_row[data-v-0f412729]{position:absolute;top:2px;right:4px;color:#ff9800;font-size:12px;font-weight:700}.planInfo_k .hoverTools[data-v-0f412729]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-0f412729]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-0f412729]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-0f412729]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap;line-height:1.4}.plan_checkAllbox[data-v-0f412729]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-0f412729]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.drag-selection-overlay[data-v-0f412729]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-0f412729]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-0f412729]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

@ -1 +0,0 @@
@charset "UTF-8";.type_count[data-v-65505474]{display:flex}.type_count div[data-v-65505474]{white-space:nowrap;margin-right:10px}.qudao_k[data-v-65505474]{display:flex}.qudao_k_input[data-v-65505474]{width:150px}.hongzi[data-v-65505474]{color:#b25252}.planInfo .planTable[data-v-65505474]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333;user-select:none;-webkit-user-select:none}.planInfo .planTable td[data-v-65505474]{border:1px solid #f1f1f1}.planInfo .table_plan_row td[data-v-65505474]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-65505474]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-65505474]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-65505474]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-65505474]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button[data-v-65505474]{width:100px}.zhenshiButton[data-v-65505474]{width:150px;border:1px solid #e8e8e8;text-align:center;margin-top:4px;border-radius:4px;cursor:default;padding:6px}.zhenshiButtonActive[data-v-65505474]{background-color:#5bc0de;color:#fff}.planInfo_k_disabled[data-v-65505474]{background-color:#ffd6d2}.planInfo_k[data-v-65505474]{font-size:14px;color:#333;position:relative;min-height:60px;padding-top:18px;padding-bottom:10px}.planInfo_k .plan_checkbox[data-v-65505474]{position:absolute;top:2px;left:2px;height:16px;width:16px;border:1px solid #98c4cc;border-radius:4px}.planInfo_k .plan_checkbox_active[data-v-65505474]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.planInfo_k .qudao_count_row[data-v-65505474]{display:flex}.planInfo_k .qudao_count_row div[data-v-65505474]{margin-left:6px}.planInfo_k .qudao_count_row .card_total[data-v-65505474]{display:inline-block;background:#409eff;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo_k .qudao_count_row .card_locked[data-v-65505474]{display:inline-block;background:#e6a23c;color:#fff;font-size:16px;font-weight:700;padding:2px 10px;border-radius:4px}.planInfo_k .qudao_count_row.qudao_count_row_simple[data-v-65505474]{justify-content:center;gap:12px}.planInfo_k .qudao_count_row .qudao_title_zong[data-v-65505474],.planInfo_k .qudao_count_row .qudao_title_zong span[data-v-65505474]{font-weight:700}.planInfo_k .patient_type_row[data-v-65505474]{display:flex;margin-top:4px;justify-content:center}.planInfo_k .patient_type_row .tps[data-v-65505474]{background-color:#ebfff4;border:1px solid #9fdebc;color:#83b69a;font-size:12px;padding:1px 2px;border-radius:4px;margin-left:4px}.planInfo_k .locked_count_row[data-v-65505474]{position:absolute;top:2px;right:4px;color:#ff9800;font-size:12px;font-weight:700}.planInfo_k .hoverTools[data-v-65505474]{position:absolute;top:0px;left:0px;height:100%;width:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;border-radius:4px}.planInfo_k .hoverTools .icon_k[data-v-65505474]{display:flex;flex-direction:column;align-items:center;cursor:pointer;margin:0 4px}.planInfo_k .hoverTools .icon_k .el-icon[data-v-65505474]{height:30px;width:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;background-color:#fff}.planInfo_k .hoverTools .icon_text[data-v-65505474]{font-size:11px;color:#409eff;background-color:#fff;padding:1px 4px;border-radius:3px;margin-top:3px;white-space:nowrap;line-height:1.4}.plan_checkAllbox[data-v-65505474]{height:20px;width:20px;border:1px solid #7cccc7;border-radius:4px}.plan_checkAllbox_active[data-v-65505474]{background-color:#409eff;justify-content:center;align-items:center;display:flex}.drag-selection-overlay[data-v-65505474]{position:absolute;top:0;left:0;background:rgba(64,158,255,.12);border:1px solid rgba(64,158,255,.5);pointer-events:none;z-index:10}.planInfo_k_selected[data-v-65505474]{background-color:#e6f7ff;outline:2px solid #409eff;outline-offset:-2px;border-radius:4px}.planInfo_k_disabled_selected[data-v-65505474]{background-color:#f3e8ff;outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}

@ -1 +1 @@
import{_ as D,o as V,r as o,c as R,d as p,e as g,k as b,f as a,w as r,i as n,x as Y,h as T,j as I,K as M,bR as P,I as S,E as j,q as E,g as d,bP as N}from"./index-c64ce9a7.js";const U={class:"head"},A={key:0,id:"Bing",class:"Bing"},G={__name:"PlanTj",setup(O){let m=d(!1),c=d([]),l=d({dateRange:[]}),_=d(0),s=d(0);const x=()=>{M().then(t=>{if(t.status){let e=t.data.datetime.substr(0,10);l.value.dateRange=[e,e],v()}})},v=()=>{m.value=!0,P({SearchInfo:l.value}).then(t=>{m.value=!1,t.status?(c.value=t.data.list,_.value=t.data.allCount,s.value=t.data.allUsedCount,s.value>0&&S(()=>{y()})):j.error(t.msg)})},y=()=>{var t=N(document.getElementById("Bing"));t.setOption({title:{text:l.value.dateRange[0]+"~"+l.value.dateRange[1]+"全院号源使用量占比",subtext:"号源总量 "+_.value,left:"center"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{name:"Access From",type:"pie",radius:"50%",data:[{value:_.value-s.value,name:"未占用"},{value:s.value,name:"已预约"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})};return V(()=>{x()}),(t,e)=>{const f=o("el-date-picker"),w=o("el-form-item"),h=o("el-button"),B=o("el-row"),i=o("el-table-column"),C=o("el-table"),k=R("loading");return p(),g("div",null,[b("div",U,[a(B,null,{default:r(()=>[a(w,null,{default:r(()=>[a(f,{style:{"margin-left":"8px",width:"150px"},modelValue:n(l).dateRange[0],"onUpdate:modelValue":e[0]||(e[0]=u=>n(l).dateRange[0]=u),type:"date",placeholder:"开始时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),e[3]||(e[3]=b("span",{style:{margin:"0 4px"}},"至",-1)),a(f,{style:{width:"150px"},modelValue:n(l).dateRange[1],"onUpdate:modelValue":e[1]||(e[1]=u=>n(l).dateRange[1]=u),type:"date",placeholder:"结束时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),a(h,{onClick:e[2]||(e[2]=u=>v()),style:{"margin-left":"10px"}},{default:r(()=>[...e[4]||(e[4]=[E("搜索",-1)])]),_:1})]),_:1})]),n(s)>0?(p(),g("div",A)):Y("",!0),T((p(),I(C,{data:n(c),style:{width:"100%"},"row-key":"id"},{default:r(()=>[a(i,{prop:"department_name",label:"科室"}),a(i,{prop:"count",label:"号源总数"}),a(i,{prop:"used_count",label:"使用量"}),a(i,{prop:"used_rate",label:"使用量占比"})]),_:1},8,["data"])),[[k,n(m)]])])}}},F=D(G,[["__scopeId","data-v-3ee660ae"]]);export{F as default};
import{_ as D,o as V,r as o,c as R,d as p,e as g,k as b,f as a,w as r,i as n,x as Y,h as M,j as T,K as I,bO as P,I as S,E as j,q as E,g as d,bM as N}from"./index-87e3e912.js";const U={class:"head"},A={key:0,id:"Bing",class:"Bing"},G={__name:"PlanTj",setup(O){let m=d(!1),c=d([]),l=d({dateRange:[]}),_=d(0),s=d(0);const x=()=>{I().then(t=>{if(t.status){let e=t.data.datetime.substr(0,10);l.value.dateRange=[e,e],v()}})},v=()=>{m.value=!0,P({SearchInfo:l.value}).then(t=>{m.value=!1,t.status?(c.value=t.data.list,_.value=t.data.allCount,s.value=t.data.allUsedCount,s.value>0&&S(()=>{y()})):j.error(t.msg)})},y=()=>{var t=N(document.getElementById("Bing"));t.setOption({title:{text:l.value.dateRange[0]+"~"+l.value.dateRange[1]+"全院号源使用量占比",subtext:"号源总量 "+_.value,left:"center"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{name:"Access From",type:"pie",radius:"50%",data:[{value:_.value-s.value,name:"未占用"},{value:s.value,name:"已预约"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})};return V(()=>{x()}),(t,e)=>{const f=o("el-date-picker"),w=o("el-form-item"),h=o("el-button"),B=o("el-row"),i=o("el-table-column"),C=o("el-table"),k=R("loading");return p(),g("div",null,[b("div",U,[a(B,null,{default:r(()=>[a(w,null,{default:r(()=>[a(f,{style:{"margin-left":"8px",width:"150px"},modelValue:n(l).dateRange[0],"onUpdate:modelValue":e[0]||(e[0]=u=>n(l).dateRange[0]=u),type:"date",placeholder:"开始时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),e[3]||(e[3]=b("span",{style:{margin:"0 4px"}},"至",-1)),a(f,{style:{width:"150px"},modelValue:n(l).dateRange[1],"onUpdate:modelValue":e[1]||(e[1]=u=>n(l).dateRange[1]=u),type:"date",placeholder:"结束时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),a(h,{onClick:e[2]||(e[2]=u=>v()),style:{"margin-left":"10px"}},{default:r(()=>[...e[4]||(e[4]=[E("搜索",-1)])]),_:1})]),_:1})]),n(s)>0?(p(),g("div",A)):Y("",!0),M((p(),T(C,{data:n(c),style:{width:"100%"},"row-key":"id"},{default:r(()=>[a(i,{prop:"department_name",label:"科室"}),a(i,{prop:"count",label:"号源总数"}),a(i,{prop:"used_count",label:"使用量"}),a(i,{prop:"used_rate",label:"使用量占比"})]),_:1},8,["data"])),[[k,n(m)]])])}}},F=D(G,[["__scopeId","data-v-3ee660ae"]]);export{F as default};

@ -1 +1 @@
import{o as z,r as d,c as L,d as p,e as _,k as r,q as x,h as T,i as u,f as v,w as g,b8 as j,E as m,bH as A,F as b,t as V,j as w,g as R}from"./index-c64ce9a7.js";const D={style:{display:"flex"}},F={style:{width:"750px","margin-right":"40px"}},G={style:{display:"flex"}},S={style:{display:"flex","justify-content":"center","align-items":"center"}},O={__name:"RatioMngr",setup(q){let t=R([]),c=R(!1);const h=()=>{c.value=!0,j({}).then(o=>{c.value=!1,o.status?t.value=o.data:m.error(o.msg)})},C=()=>{let o=!1,e=0;if(t.value.forEach((l,n)=>{l.ratio>=0&&l.ratio<=100?e=e+Number(l.ratio):m.error("第"+(n+1)+"个渠道数据不正确")}),e==100?o=!0:(o=!1,m.error("各渠道总和应为100当前为"+e)),!o)return!1;c.value=!0,A({ratioInfo:t.value}).then(l=>{c.value=!1,l.status?(m({message:"保存成功",type:"success"}),h()):m.error(l.msg)})},I=o=>t.value.filter(e=>e.id!==o.id),E=(o,e)=>{const l=t.value[o].id;t.value.forEach(n=>{if(n.id===l)return;const s=e.includes(n.id),f=n.link.includes(l);s&&!f?n.link.push(l):!s&&f&&(n.link=n.link.filter(y=>y!==l))})},B=(o,e)=>{const l=t.value[o].id,n=t.value.find(s=>s.id===e);n&&(n.link=n.link.filter(s=>s!==l))};return z(()=>{h()}),(o,e)=>{const l=d("el-input"),n=d("el-option"),s=d("el-select"),f=d("el-form-item"),y=d("el-form"),M=d("el-button"),N=L("loading");return p(),_("div",null,[e[3]||(e[3]=r("div",{style:{margin:"12px",color:"#999"}},[x(" 设置说明: "),r("div",null,"1预约渠道设置默认数量百分比用于为“预约计划”按比例自动分配数量此次设置各个渠道的数值总数应为100如果不想给某个渠道分配可设置为0 "),r("div",null," 2渠道合并合并后的号源池可共用 ")],-1)),T((p(),_("div",D,[r("div",F,[v(y,{model:u(t),"label-width":"auto",style:{"max-width":"600px"}},{default:g(()=>[(p(!0),_(b,null,V(u(t),(k,i)=>(p(),w(f,{key:i,label:k.name},{default:g(()=>[r("div",G,[v(l,{size:"large",type:"number",min:"0",max:"100",modelValue:u(t)[i].ratio,"onUpdate:modelValue":a=>u(t)[i].ratio=a,style:{"margin-left":"10px",width:"250px"}},null,8,["modelValue","onUpdate:modelValue"]),e[0]||(e[0]=r("div",{style:{"margin-left":"10px","margin-right":"40px"}},"%",-1)),e[1]||(e[1]=r("div",{style:{width:"100px",color:"#75b96c"}},"号源池合并",-1)),v(s,{size:"large",modelValue:u(t)[i].link,"onUpdate:modelValue":a=>u(t)[i].link=a,multiple:"",placeholder:"未合并",style:{width:"240px"},onRemoveTag:a=>B(i,a),onChange:a=>E(i,u(t)[i].link)},{default:g(()=>[(p(!0),_(b,null,V(I(k),(a,U)=>(p(),w(n,{key:U,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onRemoveTag","onChange"])])]),_:2},1032,["label"]))),128))]),_:1},8,["model"])]),r("div",S,[v(M,{type:"primary",onClick:C,style:{height:"70px",width:"100px"}},{default:g(()=>[...e[2]||(e[2]=[x(" 确定 ",-1)])]),_:1})])])),[[N,u(c)]])])}}};export{O as default};
import{o as z,r as d,c as L,d as p,e as _,k as r,q as x,h as T,i as u,f as v,w as g,b5 as j,E as m,bE as A,F as b,t as V,j as w,g as R}from"./index-87e3e912.js";const D={style:{display:"flex"}},F={style:{width:"750px","margin-right":"40px"}},G={style:{display:"flex"}},S={style:{display:"flex","justify-content":"center","align-items":"center"}},$={__name:"RatioMngr",setup(q){let t=R([]),c=R(!1);const h=()=>{c.value=!0,j({}).then(o=>{c.value=!1,o.status?t.value=o.data:m.error(o.msg)})},C=()=>{let o=!1,e=0;if(t.value.forEach((l,n)=>{l.ratio>=0&&l.ratio<=100?e=e+Number(l.ratio):m.error("第"+(n+1)+"个渠道数据不正确")}),e==100?o=!0:(o=!1,m.error("各渠道总和应为100当前为"+e)),!o)return!1;c.value=!0,A({ratioInfo:t.value}).then(l=>{c.value=!1,l.status?(m({message:"保存成功",type:"success"}),h()):m.error(l.msg)})},I=o=>t.value.filter(e=>e.id!==o.id),E=(o,e)=>{const l=t.value[o].id;t.value.forEach(n=>{if(n.id===l)return;const s=e.includes(n.id),f=n.link.includes(l);s&&!f?n.link.push(l):!s&&f&&(n.link=n.link.filter(y=>y!==l))})},B=(o,e)=>{const l=t.value[o].id,n=t.value.find(s=>s.id===e);n&&(n.link=n.link.filter(s=>s!==l))};return z(()=>{h()}),(o,e)=>{const l=d("el-input"),n=d("el-option"),s=d("el-select"),f=d("el-form-item"),y=d("el-form"),M=d("el-button"),N=L("loading");return p(),_("div",null,[e[3]||(e[3]=r("div",{style:{margin:"12px",color:"#999"}},[x(" 设置说明: "),r("div",null,"1预约渠道设置默认数量百分比用于为“预约计划”按比例自动分配数量此次设置各个渠道的数值总数应为100如果不想给某个渠道分配可设置为0 "),r("div",null," 2渠道合并合并后的号源池可共用 ")],-1)),T((p(),_("div",D,[r("div",F,[v(y,{model:u(t),"label-width":"auto",style:{"max-width":"600px"}},{default:g(()=>[(p(!0),_(b,null,V(u(t),(k,i)=>(p(),w(f,{key:i,label:k.name},{default:g(()=>[r("div",G,[v(l,{size:"large",type:"number",min:"0",max:"100",modelValue:u(t)[i].ratio,"onUpdate:modelValue":a=>u(t)[i].ratio=a,style:{"margin-left":"10px",width:"250px"}},null,8,["modelValue","onUpdate:modelValue"]),e[0]||(e[0]=r("div",{style:{"margin-left":"10px","margin-right":"40px"}},"%",-1)),e[1]||(e[1]=r("div",{style:{width:"100px",color:"#75b96c"}},"号源池合并",-1)),v(s,{size:"large",modelValue:u(t)[i].link,"onUpdate:modelValue":a=>u(t)[i].link=a,multiple:"",placeholder:"未合并",style:{width:"240px"},onRemoveTag:a=>B(i,a),onChange:a=>E(i,u(t)[i].link)},{default:g(()=>[(p(!0),_(b,null,V(I(k),(a,U)=>(p(),w(n,{key:U,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onRemoveTag","onChange"])])]),_:2},1032,["label"]))),128))]),_:1},8,["model"])]),r("div",S,[v(M,{type:"primary",onClick:C,style:{height:"70px",width:"100px"}},{default:g(()=>[...e[2]||(e[2]=[x(" 确定 ",-1)])]),_:1})])])),[[N,u(c)]])])}}};export{$ as default};

@ -1 +0,0 @@
import{o as x,r as i,c as C,d as u,e as k,h as y,i as d,j as g,w as _,x as D,aV as S,E as r,f as l,g as h,aW as U}from"./index-c64ce9a7.js";const L={__name:"SubDepartmentConfig",setup(B){let o=h(!1),m=h([]);const b=()=>{o.value=!0,S().then(e=>{o.value=!1,e.status?m.value=(e.data.list||[]).map(a=>({...a,_saving:!1})):r.error(e.msg)}).catch(()=>{o.value=!1})},c=(e,a)=>{e._saving=!0,U({info:{id:e.id,department_status:e.department_status,appointment_enabled:e.appointment_enabled}}).then(n=>{e._saving=!1,n.status?r.success("保存成功"):(p(e,a),r.error(n.msg||"保存失败"))}).catch(()=>{e._saving=!1,p(e,a),r.error("网络异常,保存失败")})},p=(e,a)=>{e[a]=e[a]===1?0:1};return x(()=>{b()}),(e,a)=>{const n=i("el-table-column"),v=i("el-switch"),f=i("el-table"),V=i("el-empty"),w=C("loading");return u(),k("div",null,[y((u(),g(f,{data:d(m),style:{width:"100%"},"row-key":"id","row-style":{height:"60px"}},{default:_(()=>[l(n,{prop:"department_name",label:"科室名称"}),l(n,{prop:"department_number",label:"科室编号"}),l(n,{label:"状态",width:"120"},{default:_(t=>[l(v,{modelValue:t.row.department_status,"onUpdate:modelValue":s=>t.row.department_status=s,"active-value":1,"inactive-value":0,"active-text":"正常","inactive-text":"关闭","inline-prompt":"",loading:t.row._saving,onChange:s=>c(t.row,"department_status")},null,8,["modelValue","onUpdate:modelValue","loading","onChange"])]),_:1}),l(n,{label:"参与预约",width:"120"},{default:_(t=>[l(v,{modelValue:t.row.appointment_enabled,"onUpdate:modelValue":s=>t.row.appointment_enabled=s,"active-value":1,"inactive-value":0,"active-text":"是","inactive-text":"否","inline-prompt":"",loading:t.row._saving,onChange:s=>c(t.row,"appointment_enabled")},null,8,["modelValue","onUpdate:modelValue","loading","onChange"])]),_:1})]),_:1},8,["data"])),[[w,d(o)]]),!d(o)&&d(m).length===0?(u(),g(V,{key:0,description:"当前科室下暂无子科室"})):D("",!0)])}}};export{L as default};

@ -1 +1 @@
import{_ as G,o as D,r as n,c as M,h as O,i as a,d as r,e as b,f as t,w as l,G as P,g as m,j as v,q as g,x as C,k,U as T,S as $,E as S}from"./index-c64ce9a7.js";const q=["src"],A={__name:"SystemConfig",setup(F){let d=m(!1),I=T(),U={Authorization:"Bearer "+sessionStorage.getItem("token")},p=m("");const w=s=>{p.value="https://yj.dev.cjy.net.cn/"+s.data,o.value.站点图片=s.data},j=()=>{d.value=!0,P().then(s=>{d.value=!1,s.status&&(o.value.站点名称=s.data.站点名称,o.value.站点图片=s.data.站点图片,p.value="https://yj.dev.cjy.net.cn/"+o.value.站点图片,o.value.门诊缴费超时时间=s.data.门诊缴费超时时间,o.value.门诊缴费轮询间隔=s.data.门诊缴费轮询间隔)})};let o=m({站点名称:"",站点图片:""});const x=s=>{d.value=!0,$({info:s}).then(e=>{d.value=!1,e.status?(S({message:"保存成功",type:"success"}),setTimeout(()=>{location.reload()},500)):S.error(e.msg)})};let c=m(null);return sessionStorage.getItem("LoginUserInfo")&&(c.value=JSON.parse(sessionStorage.getItem("LoginUserInfo"))),D(()=>{j()}),(s,e)=>{const u=n("el-col"),f=n("el-row"),z=n("Plus"),B=n("el-icon"),N=n("el-upload"),_=n("el-form-item"),y=n("el-input"),V=n("el-button"),L=n("el-form"),E=M("loading");return O((r(),b("div",null,[t(L,{"label-width":"180px",style:{border:"1px solid #e9e9e9","border-radius":"5px","margin-top":"8px"}},{default:l(()=>[a(c).group==5?(r(),v(f,{key:0,style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[...e[5]||(e[5]=[g(" 站点信息 ",-1)])]),_:1})]),_:1})):C("",!0),a(c).group==5?(r(),v(f,{key:1,style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[t(_,{label:"Logo"},{default:l(()=>[t(N,{style:{"margin-left":"20px"},class:"avatar-uploader",action:a(I),headers:a(U),"show-file-list":!1,"on-success":w},{default:l(()=>[a(p)?(r(),b("img",{key:0,src:a(p),class:"avatar"},null,8,q)):(r(),v(B,{key:1,class:"avatar-uploader-icon"},{default:l(()=>[t(z)]),_:1}))]),_:1},8,["action","headers"])]),_:1}),t(_,{label:"站点名称"},{default:l(()=>[t(y,{size:"large",modelValue:a(o).站点名称,"onUpdate:modelValue":e[0]||(e[0]=i=>a(o).站点名称=i),placeholder:"名称",style:{margin:"auto 20px"}},null,8,["modelValue"])]),_:1})]),_:1}),t(u,{span:8,style:{display:"flex","align-items":"center"}},{default:l(()=>[t(V,{type:"primary",size:"large",onClick:e[1]||(e[1]=i=>x({站点名称:a(o).站点名称,站点图片:a(o).站点图片}))},{default:l(()=>[...e[6]||(e[6]=[g("保 存",-1)])]),_:1})]),_:1})]),_:1})):C("",!0),t(f,{style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[...e[7]||(e[7]=[g(" 缴费截止时间设置 ",-1)])]),_:1})]),_:1}),t(f,{style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[t(_,{label:"缴费截止时间(单位:小时)"},{default:l(()=>[t(y,{size:"large",modelValue:a(o).门诊缴费超时时间,"onUpdate:modelValue":e[2]||(e[2]=i=>a(o).门诊缴费超时时间=i),placeholder:"名称",style:{margin:"auto 20px"}},null,8,["modelValue"]),e[8]||(e[8]=k("span",{class:"tishi"},"*门诊患者医嘱对应检查项目预约成功后超过设置时间未缴费将被取消预约",-1))]),_:1}),t(_,{label:"缴费截止时间(单位:小时)"},{default:l(()=>[t(y,{size:"large",modelValue:a(o).门诊缴费轮询间隔,"onUpdate:modelValue":e[3]||(e[3]=i=>a(o).门诊缴费轮询间隔=i),placeholder:"名称",style:{margin:"auto 20px"}},null,8,["modelValue"]),e[9]||(e[9]=k("span",{class:"tishi"},"*设置多少分钟进行一次门诊预约是否缴费检查",-1))]),_:1})]),_:1}),t(u,{span:8,style:{display:"flex","align-items":"center"}},{default:l(()=>[t(V,{type:"primary",size:"large",onClick:e[4]||(e[4]=i=>x({门诊缴费超时时间:a(o).门诊缴费超时时间,门诊缴费轮询间隔:a(o).门诊缴费轮询间隔}))},{default:l(()=>[...e[10]||(e[10]=[g("保 存",-1)])]),_:1})]),_:1})]),_:1})]),_:1})])),[[E,a(d)]])}}},H=G(A,[["__scopeId","data-v-175b0430"]]);export{H as default};
import{_ as G,o as D,r as n,c as M,h as O,i as a,d as r,e as b,f as t,w as l,G as P,g as m,j as v,q as g,x as C,k,U as T,S as $,E as S}from"./index-87e3e912.js";const q=["src"],A={__name:"SystemConfig",setup(F){let d=m(!1),I=T(),U={Authorization:"Bearer "+sessionStorage.getItem("token")},p=m("");const w=s=>{p.value="https://yj.dev.cjy.net.cn/"+s.data,o.value.站点图片=s.data},j=()=>{d.value=!0,P().then(s=>{d.value=!1,s.status&&(o.value.站点名称=s.data.站点名称,o.value.站点图片=s.data.站点图片,p.value="https://yj.dev.cjy.net.cn/"+o.value.站点图片,o.value.门诊缴费超时时间=s.data.门诊缴费超时时间,o.value.门诊缴费轮询间隔=s.data.门诊缴费轮询间隔)})};let o=m({站点名称:"",站点图片:""});const x=s=>{d.value=!0,$({info:s}).then(e=>{d.value=!1,e.status?(S({message:"保存成功",type:"success"}),setTimeout(()=>{location.reload()},500)):S.error(e.msg)})};let c=m(null);return sessionStorage.getItem("LoginUserInfo")&&(c.value=JSON.parse(sessionStorage.getItem("LoginUserInfo"))),D(()=>{j()}),(s,e)=>{const u=n("el-col"),f=n("el-row"),z=n("Plus"),B=n("el-icon"),N=n("el-upload"),_=n("el-form-item"),y=n("el-input"),V=n("el-button"),L=n("el-form"),E=M("loading");return O((r(),b("div",null,[t(L,{"label-width":"180px",style:{border:"1px solid #e9e9e9","border-radius":"5px","margin-top":"8px"}},{default:l(()=>[a(c).group==5?(r(),v(f,{key:0,style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[...e[5]||(e[5]=[g(" 站点信息 ",-1)])]),_:1})]),_:1})):C("",!0),a(c).group==5?(r(),v(f,{key:1,style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[t(_,{label:"Logo"},{default:l(()=>[t(N,{style:{"margin-left":"20px"},class:"avatar-uploader",action:a(I),headers:a(U),"show-file-list":!1,"on-success":w},{default:l(()=>[a(p)?(r(),b("img",{key:0,src:a(p),class:"avatar"},null,8,q)):(r(),v(B,{key:1,class:"avatar-uploader-icon"},{default:l(()=>[t(z)]),_:1}))]),_:1},8,["action","headers"])]),_:1}),t(_,{label:"站点名称"},{default:l(()=>[t(y,{size:"large",modelValue:a(o).站点名称,"onUpdate:modelValue":e[0]||(e[0]=i=>a(o).站点名称=i),placeholder:"名称",style:{margin:"auto 20px"}},null,8,["modelValue"])]),_:1})]),_:1}),t(u,{span:8,style:{display:"flex","align-items":"center"}},{default:l(()=>[t(V,{type:"primary",size:"large",onClick:e[1]||(e[1]=i=>x({站点名称:a(o).站点名称,站点图片:a(o).站点图片}))},{default:l(()=>[...e[6]||(e[6]=[g("保 存",-1)])]),_:1})]),_:1})]),_:1})):C("",!0),t(f,{style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[...e[7]||(e[7]=[g(" 缴费截止时间设置 ",-1)])]),_:1})]),_:1}),t(f,{style:{padding:"20px",margin:"10px"}},{default:l(()=>[t(u,{span:16},{default:l(()=>[t(_,{label:"缴费截止时间(单位:小时)"},{default:l(()=>[t(y,{size:"large",modelValue:a(o).门诊缴费超时时间,"onUpdate:modelValue":e[2]||(e[2]=i=>a(o).门诊缴费超时时间=i),placeholder:"名称",style:{margin:"auto 20px"}},null,8,["modelValue"]),e[8]||(e[8]=k("span",{class:"tishi"},"*门诊患者医嘱对应检查项目预约成功后超过设置时间未缴费将被取消预约",-1))]),_:1}),t(_,{label:"缴费截止时间(单位:小时)"},{default:l(()=>[t(y,{size:"large",modelValue:a(o).门诊缴费轮询间隔,"onUpdate:modelValue":e[3]||(e[3]=i=>a(o).门诊缴费轮询间隔=i),placeholder:"名称",style:{margin:"auto 20px"}},null,8,["modelValue"]),e[9]||(e[9]=k("span",{class:"tishi"},"*设置多少分钟进行一次门诊预约是否缴费检查",-1))]),_:1})]),_:1}),t(u,{span:8,style:{display:"flex","align-items":"center"}},{default:l(()=>[t(V,{type:"primary",size:"large",onClick:e[4]||(e[4]=i=>x({门诊缴费超时时间:a(o).门诊缴费超时时间,门诊缴费轮询间隔:a(o).门诊缴费轮询间隔}))},{default:l(()=>[...e[10]||(e[10]=[g("保 存",-1)])]),_:1})]),_:1})]),_:1})]),_:1})])),[[E,a(d)]])}}},H=G(A,[["__scopeId","data-v-175b0430"]]);export{H as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
@charset "UTF-8";.YuYue202506[data-v-3deb4bde]{display:flex;flex-direction:column;height:100%}.patientInfo[data-v-3deb4bde]{display:flex;align-items:center;flex-shrink:0}.patientInfo .item[data-v-3deb4bde]{margin-right:18px}.patientInfo .name[data-v-3deb4bde]{font-size:20px;font-weight:700}.patientInfo .value[data-v-3deb4bde]{font-size:18px;font-weight:700}.entrustList[data-v-3deb4bde]{flex:1;min-height:0;overflow:auto}.entrustList .errMsg[data-v-3deb4bde]{color:#f27d7d;font-weight:700;opacity:1!important}.planInfo[data-v-3deb4bde]{max-height:600px;overflow:auto;flex-shrink:0}.planInfo .planTable[data-v-3deb4bde]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333}.planInfo .planTable td[data-v-3deb4bde]{border:1px solid #f1f1f1;padding:6px}.planInfo .table_plan_row td[data-v-3deb4bde]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-3deb4bde]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-3deb4bde]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-3deb4bde]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-3deb4bde]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button_recommend[data-v-3deb4bde]{width:180px}.planInfo .do_button[data-v-3deb4bde]{width:100px}.ZhenShiButton[data-v-3deb4bde]{text-align:center;font-size:14px;background-color:#fff;border:1px solid #e8e8e8;width:120px;align-self:stretch;cursor:pointer;display:flex;justify-content:center;align-items:center;padding:4px}.zhenshiButton_active[data-v-3deb4bde]{background-color:#5bc0de;color:#fff}[data-v-3deb4bde] .el-table .disabled-row{background-color:#f2e3e2;opacity:.6}[data-v-3deb4bde] .el-table .selected-row{background-color:#9cd0de}.precheck-fail-row[data-v-3deb4bde]{background-color:#fef0f0!important}.tip-pre-line{white-space:pre-line;font-size:16px}

@ -0,0 +1 @@
@charset "UTF-8";.YuYue202506[data-v-d139f6fe]{display:flex;flex-direction:column;height:100%}.patientInfo[data-v-d139f6fe]{display:flex;align-items:center;flex-shrink:0}.patientInfo .item[data-v-d139f6fe]{margin-right:18px}.patientInfo .name[data-v-d139f6fe]{font-size:20px;font-weight:700}.patientInfo .value[data-v-d139f6fe]{font-size:18px;font-weight:700}.entrustList[data-v-d139f6fe]{flex:1;min-height:0;overflow:auto}.entrustList .errMsg[data-v-d139f6fe]{color:#f27d7d;font-weight:700;opacity:1!important}.planInfo[data-v-d139f6fe]{max-height:600px;overflow:auto;flex-shrink:0}.planInfo .planTable[data-v-d139f6fe]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333}.planInfo .planTable td[data-v-d139f6fe]{border:1px solid #f1f1f1;padding:6px}.planInfo .table_plan_row td[data-v-d139f6fe]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-d139f6fe]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-d139f6fe]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-d139f6fe]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-d139f6fe]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button_recommend[data-v-d139f6fe]{width:180px}.planInfo .do_button[data-v-d139f6fe]{width:100px}.ZhenShiButton[data-v-d139f6fe]{text-align:center;font-size:14px;background-color:#fff;border:1px solid #e8e8e8;width:120px;align-self:stretch;cursor:pointer;display:flex;justify-content:center;align-items:center;padding:4px}.zhenshiButton_active[data-v-d139f6fe]{background-color:#5bc0de;color:#fff}[data-v-d139f6fe] .el-table .disabled-row{background-color:#f2e3e2;opacity:.6}[data-v-d139f6fe] .el-table .selected-row{background-color:#9cd0de}.tip-pre-line{white-space:pre-line;font-size:16px}

@ -5,7 +5,7 @@
<link rel="icon" href="./favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>秦皇岛市中医医院-医技预约</title>
<script type="module" crossorigin src="./assets/index-c64ce9a7.js"></script>
<script type="module" crossorigin src="./assets/index-87e3e912.js"></script>
<link rel="stylesheet" href="./assets/index-aa10fd41.css">
</head>
<body>

@ -39,7 +39,7 @@
@foreach ($patient['rooms'] as $roomKey => $room)
<div class="page">
<div class="PrintShenQingDan">
<div style="padding-bottom: 6px; margin-top: 10px; position: relative;">
<div style="padding-bottom: 6px; margin-top: 20px; position: relative;">
<div style="width: 100%; text-align: center; font-size: 26px;">秦皇岛市中医医院</div>
<div style="width: 100%; text-align: center; font-size: 22px; font-weight: bold; margin-top: 5px;">检查预约回执单</div>
<div style="width: 251px; height: 69px; position: absolute; right: 15px; top: 0;">
@ -68,35 +68,26 @@
<td style="border: none; width: 24%; text-align: left;"></td>
@endif
</tr>
<tr style="border: none;">
<td style="border: none; width: 25%; text-align: left;"><span style="display: inline-block; white-space: pre;">申请医生</span>{{ $room['doctor'] }}</td>
<td style="border: none; width: 75%; text-align: left;" colspan="3"><span style="display: inline-block;">申请科室</span>{{ $room['apply_department'] }}</td>
</tr>
</table>
</div>
<div style="border-bottom: 1px solid #333; padding: 5px 4px;">
<table style="border: none;">
<tr style="border: none; vertical-align: top;">
<td style="width: 12%; border: none; font-size: 20px; font-weight: 900; text-align: left; white-space: nowrap;">检查项目:</td>
<td style="border: none; font-size: 20px; text-align: left;">{{ $room['items_str'] }}</td>
<td style="width: 15%; border: none; font-size: 22px; font-weight: 900; text-align: left; white-space: nowrap;">检查项目:</td>
<td style="border: none; font-size: 22px; text-align: left;">{{ $room['items_str'] }}</td>
</tr>
<tr style="border: none; vertical-align: top;">
<td style="width: 12%; border: none; font-size: 20px; font-weight: 900; text-align: left; white-space: nowrap;">预约时间:</td>
<td style="border: none; font-size: 20px; text-align: left; position: relative;">{{ str_replace('-', '/', $room['reservation_date']) }}
<td style="width: 15%; border: none; font-size: 22px; font-weight: 900; text-align: left; white-space: nowrap;">预约时间:</td>
<td style="border: none; font-size: 22px; text-align: left;">{{ str_replace('-', '/', $room['reservation_date']) }}
@if ($room['period_begin'] && $room['period_end'])
{{ $room['period_begin'] }}-{{ $room['period_end'] }}
@endif
{{ $room['weekday_label'] }}
<div style="position: absolute; right: 0px; top: 0; width: 90mm; word-break: break-all; white-space: normal; font-size: 20px;"><span style="font-weight: 900;">临床诊断:</span>{{ $room['diagnosis_name'] }}</div></td>
</tr>
<tr style="border: none; vertical-align: top;">
<td style="width: 12%; border: none; font-size: 20px; font-weight: 900; text-align: left; white-space: nowrap;">检查地点:</td>
<td style="border: none; font-size: 20px; text-align: left;">{{ $room['room_addr'] }}</td>
{{ $room['weekday_label'] }}</td>
</tr>
<tr style="border: none; vertical-align: top;">
<td style="width: 12%; border: none; font-size: 20px; font-weight: 900; text-align: left; white-space: nowrap;">病史资料</td>
<td style="border: none; font-size: 20px; text-align: left; line-height: 1.5;">{{ $room['medical_history'] }}</td>
<td style="width: 15%; border: none; font-size: 22px; font-weight: 900; text-align: left; white-space: nowrap;">检查地点:</td>
<td style="border: none; font-size: 22px; text-align: left;">{{ $room['room_addr'] }}</td>
</tr>
</table>
</div>

@ -92,8 +92,6 @@
Route::post('admin/SaveDepartmentChildren','App\Http\Controllers\API\Admin\YeWu\DepartmentController@SaveChildren');//保存科室关联诊室关系
Route::post('admin/GetHasScheduleTopDepartments','App\Http\Controllers\API\Admin\YeWu\DepartmentController@GetHasScheduleTopDepartments');//获取有排班资源的科室列表
Route::post('admin/DeptSyncDepartment','App\Http\Controllers\API\Admin\YeWu\DepartmentController@SyncDepartment');//从HIS同步科室
Route::post('admin/GetSubDepartmentList','App\Http\Controllers\API\Admin\YeWu\SubDepartmentController@GetList');//获取当前用户科室的子科室列表
Route::post('admin/SaveSubDepartment','App\Http\Controllers\API\Admin\YeWu\SubDepartmentController@Save');//保存子科室配置(状态、预约属性)
Route::post('admin/SaveDepartmentResource','App\Http\Controllers\API\Admin\YeWu\DepartmentResourceController@Save');//保存科室资源信息
Route::post('admin/DepartmentResourceGetList','App\Http\Controllers\API\Admin\YeWu\DepartmentResourceController@GetList');//获取科室资源list
Route::post('admin/DepartmentResourceGetEnableList','App\Http\Controllers\API\Admin\YeWu\DepartmentResourceController@GetEnableList');//获取可用科室资源
@ -181,7 +179,6 @@
Route::post('admin/GetEnablePlan','App\Http\Controllers\API\Admin\YeWu\PlanListController@GetEnablePlan');//获取可用的计划,用于计划占用
Route::post('admin/GetOptimalPlan','App\Http\Controllers\API\Admin\YeWu\PlanListController@GetOptimalPlan');//最优时间/单天全检 分配
Route::post('admin/PlanYuYue','App\Http\Controllers\API\Admin\YeWu\PlanListController@YuYue');//开始预约
Route::post('admin/PreCheckYuYue','App\Http\Controllers\API\Admin\YeWu\PlanListController@PreCheckYuYue');//预约前预检
Route::post('admin/CheckEntrstItemGroup','App\Http\Controllers\API\Admin\YeWu\WorkMainController@CheckEntrstItemGroup');//批量检查医嘱检查项目是否可以同时预约
Route::post('admin/CheckIsDaiJian','App\Http\Controllers\API\Admin\YeWu\WorkMainController@CheckIsDaiJian');//检查当前时段是否有存在已经预约的待检查项目
Route::post('admin/GetPlanUsedList','App\Http\Controllers\API\Admin\YeWu\PlanListController@GetUsedList');//计划占用详情列表

@ -475,14 +475,6 @@ export const GetChildrenDepartments = (data = {}) => {
export const CancelYuYue = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/CancelYuYue', data: data })
}
//获取当前用户科室的子科室列表
export const GetSubDepartmentList = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/GetSubDepartmentList', data: data })
}
//保存子科室配置(状态、预约属性)
export const SaveSubDepartment = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'v1/admin/SaveSubDepartment', data: data })
}
//设置互斥
export const SetHuChi = (data = {}) => {
@ -578,10 +570,6 @@ export const GetEnablePlan = (data = {}) => {
export const GetOptimalPlan = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'admin/GetOptimalPlan', data: data })
}
//预约前预检
export const PreCheckYuYue = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'admin/PreCheckYuYue', data: data })
}
//获取某日可用号源
export const PlanYuYue = (data = {}) => {
return axios({ url: import.meta.env.VITE_APP_API + 'admin/PlanYuYue', data: data })

@ -224,39 +224,6 @@
<el-button type="primary" @click="recommendResultVisible = false">确定</el-button>
</template>
</el-dialog>
<el-dialog v-model="preCheckDialogVisible" title="预约确认" width="800" :close-on-click-modal="false" @keyup.enter="preCheckConfirm">
<el-alert v-if="preCheckHasMismatch" type="warning" :closable="false" show-icon style="margin-bottom: 12px;">
<template #title>医嘱选择的执行科室与预约选择的执行科室不一致请确认</template>
</el-alert>
<el-table :data="preCheckList" style="width: 100%;" max-height="400" :row-class-name="preCheckRowClassName">
<el-table-column prop="item_name" label="项目名称" min-width="140" />
<el-table-column label="执行科室" min-width="180">
<template #default="scope">
<div :style="{ color: scope.row.dept_mismatch ? '#f56c6c' : 'inherit' }">
{{ scope.row.entrust_dept_name }}
<span v-if="scope.row.dept_mismatch" style="color: #f56c6c;"> {{ scope.row.appointment_dept_name }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="检查时间" min-width="160">
<template #default="scope">
<div>{{ scope.row.appointment_date }} {{ scope.row.begin_time?.substring(0, 5) }}-{{ scope.row.end_time?.substring(0, 5) }}</div>
<div v-if="scope.row.check_status === 'fail'" style="color: #f56c6c; font-size: 12px; margin-top: 2px;">{{ scope.row.check_msg }}</div>
</template>
</el-table-column>
<el-table-column label="校验结果" width="80">
<template #default="scope">
<el-tag v-if="scope.row.check_status === 'pass'" type="success"></el-tag>
<el-tag v-else type="danger">失败</el-tag>
</template>
</el-table-column>
</el-table>
<template #footer>
<el-button v-if="!preCheckHasFail" @click="preCheckDialogVisible = false"></el-button>
<el-button v-if="!preCheckHasFail" type="primary" @click="preCheckConfirm"></el-button>
<el-button v-if="preCheckHasFail" type="primary" @click="preCheckDialogVisible = false"></el-button>
</template>
</el-dialog>
</div>
</template>
@ -271,7 +238,6 @@
GetEnablePlan,
CheckIsDaiJian,
PlanYuYue,
PreCheckYuYue,
CheckEntrstItemGroup2,
DoctorCancelYuYue,GetConfigInfo2,GetOptimalPlan,
BatchCancelYuYue
@ -357,20 +323,6 @@ let TanChuangMsgDialogVisible=ref(false)
let resultDialogHtml = ref('')
let recommendResultVisible = ref(false)
let recommendResultHtml = ref('')
let preCheckDialogVisible = ref(false)
let preCheckList = ref([])
let preCheckHasMismatch = ref(false)
let preCheckHasFail = ref(false)
let preCheckDotype = ref(null)
const preCheckConfirm = () => {
preCheckDialogVisible.value = false
startYuYue(preCheckDotype.value)
}
const preCheckRowClassName = ({ row }) => {
if (row.check_status === 'fail') return 'precheck-fail-row'
return ''
}
const getWeekday = (date1) => {
let days = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const date = new Date(date1); // :
@ -1210,8 +1162,6 @@ let TanChuangMsgDialogVisible=ref(false)
// plan_id
highlightedPlanIds.value = res.data.map(v => v.plan_id)
selectedPlanId.value = res.data[0].plan_id
//
GetEnablePlanFunc()
}
} else {
ElMessage.error(res.msg)
@ -1330,7 +1280,6 @@ let TanChuangMsgDialogVisible=ref(false)
activeZhenShi.value = res.data[0].department_resources_name
highlightedPlanIds.value = res.data.map(v => v.plan_id)
selectedPlanId.value = res.data[0].plan_id
GetEnablePlanFunc()
} else {
ElMessageBox.confirm('未找到任何一天可满足所有检查项目的号源', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', showCancelButton: false })
}
@ -1428,7 +1377,6 @@ let TanChuangMsgDialogVisible=ref(false)
//
highlightedPlanIds.value = res.data.map(v => v.plan_id)
selectedPlanId.value = res.data[0].plan_id
GetEnablePlanFunc()
} else {
ElMessageBox.confirm('未找到同一时段号源,无法匹配', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', showCancelButton: false })
}
@ -1503,7 +1451,7 @@ let TanChuangMsgDialogVisible=ref(false)
}
})
}
const YuYueButtonClick = async (type) => {
const YuYueButtonClick = (type) => {
if (selectedEntrustId.length == 0) {
ElMessage.error("请选择检查项目")
return false;
@ -1513,35 +1461,25 @@ let TanChuangMsgDialogVisible=ref(false)
return false;
}
// groups
const groupMap = {}
selectedMianListId.value.forEach(id => {
const row = entrustTableDate.value.find(v => v.id === id)
const planId = row?.temp_plan_id || row?.roster_id
if (!planId) return
if (!groupMap[planId]) groupMap[planId] = []
groupMap[planId].push(id)
})
const groups = Object.entries(groupMap).map(([planid, mainlistid]) => ({ planid: Number(planid), mainlistid }))
//
const res = await PreCheckYuYue({
groups,
appointment_type: props.appointment_type,
dotype: type,
do_user: props.do_user,
is_emergency: type == 111 ? 1 : null
})
if (!res.status) {
ElMessage.error(res.msg)
return
let msg='确定预约此时间吗?'
if(type==2){
msg='确定改约至此时间吗?'
}
ElMessageBox.confirm(
msg,
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
startYuYue(type)
})
.catch(() => {
})
preCheckList.value = res.data.list || []
preCheckHasMismatch.value = res.data.has_mismatch || false
preCheckHasFail.value = res.data.has_fail || false
preCheckDotype.value = type
preCheckDialogVisible.value = true
}
const startYuYue = async (type) => {
planLoading.value = true
@ -1652,55 +1590,31 @@ let TanChuangMsgDialogVisible=ref(false)
GetEnablePlanFunc()
}
if (auto_print.value.length > 0) {
const bookedEntrustIds = ids
.map(id => entrustTableDate.value.find(v => v.id === id))
.filter(Boolean)
const bookedIds = selectedRows.value
.filter(v => v.list_status === 1)
.map(v => v.entrust_id)
if (bookedEntrustIds.length > 0) {
print_shenqingdan(bookedEntrustIds)
if (bookedIds.length > 0) {
print_shenqingdan(bookedIds)
}
}
}, true)
// HIS
if (res.data?.fail_items?.length > 0) {
let html = '<table style="width:100%;border-collapse:collapse;font-size:14px;">'
html += '<tr style="background:#f5f5f5;"><td style="padding:4px 8px;border:1px solid #ddd;font-weight:700;">序号</td><td style="padding:4px 8px;border:1px solid #ddd;font-weight:700;">项目名称</td><td style="padding:4px 8px;border:1px solid #ddd;font-weight:700;">结果</td></tr>'
res.data.fail_items.forEach((f, i) => {
html += '<tr><td style="padding:4px 8px;border:1px solid #ddd;">' + (i + 1) + '</td><td style="padding:4px 8px;border:1px solid #ddd;">' + f.name + '</td><td style="padding:4px 8px;border:1px solid #ddd;color:red;">' + f.reason + '</td></tr>'
})
html += '</table>'
resultDialogHtml.value = html
resultDialogVisible.value = true
}
} else {
//
if (res.data?.fail_items?.length > 0) {
let html = '<table style="width:100%;border-collapse:collapse;font-size:14px;">'
html += '<tr style="background:#f5f5f5;"><td style="padding:4px 8px;border:1px solid #ddd;font-weight:700;">序号</td><td style="padding:4px 8px;border:1px solid #ddd;font-weight:700;">项目名称</td><td style="padding:4px 8px;border:1px solid #ddd;font-weight:700;">结果</td></tr>'
res.data.fail_items.forEach((f, i) => {
html += '<tr><td style="padding:4px 8px;border:1px solid #ddd;">' + (i + 1) + '</td><td style="padding:4px 8px;border:1px solid #ddd;">' + f.name + '</td><td style="padding:4px 8px;border:1px solid #ddd;color:red;">' + f.reason + '</td></tr>'
})
html += '</table>'
resultDialogHtml.value = html
resultDialogVisible.value = true
} else {
ElMessageBox.confirm(
res.msg,
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
showCancelButton: false
}
)
.then(() => {
} else {
ElMessageBox.confirm(
res.msg,
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
showCancelButton: false
}
)
.then(() => {
})
.catch(() => {
})
.catch(() => {
})
}
}
})
}
})
return
}
@ -1724,9 +1638,7 @@ let TanChuangMsgDialogVisible=ref(false)
is_emergency: type == 111 ? 1 : null
})
if (res.status) {
// successItems
const bookedIds = res.data?.mainlistids || ids
bookedIds.forEach(id => {
ids.forEach(id => {
const row = entrustTableDate.value.find(v => v.id === id)
if (row) {
const timeStr = (row.period_begin_time ? row.period_begin_time.substring(0, 5) : '') + '-' + (row.period_end_time ? row.period_end_time.substring(0, 5) : '')
@ -1734,12 +1646,6 @@ let TanChuangMsgDialogVisible=ref(false)
successEntrustIds.push(row.entrust_id)
}
})
// HIS
if (res.data?.fail_items?.length > 0) {
res.data.fail_items.forEach(f => {
failItems.push({ name: f.name, msg: f.reason })
})
}
} else {
ids.forEach(id => {
const row = entrustTableDate.value.find(v => v.id === id)
@ -2193,10 +2099,6 @@ let TanChuangMsgDialogVisible=ref(false)
background-color: #9cd0de;
}
/** 预检弹窗失败行标红 */
.precheck-fail-row {
background-color: #fef0f0 !important;
}
</style>
<style>

@ -180,13 +180,6 @@ const router = createRouter({
meta: {
title: '排班项目管理'
}
},{
path: '/yewu/subDepartmentConfig',
name: 'YewuSubDepartmentConfig',
component: () => import('../views/YeWu/SubDepartmentConfig.vue'),
meta: {
title: '子科室配置'
}
},{
path: '/appointmentmngr/timeperiodmngr',
name: 'AppointmentMngrTimePeriodMngr',

@ -73,7 +73,7 @@
</div>
</div>
</td>
<td style="min-width: 150px;font-size: 14px;" v-for="(item,index) in date_list">{{item.substring(5,10)}} {{getWeekday(item)}}</td>
<td style="min-width: 120px;font-size: 14px;" v-for="(item,index) in date_list">{{item.substring(5,10)}} {{getWeekday(item)}}</td>
</tr>
<tr v-for="(item,index) in planTableData" :key="index">
<td v-for="(item2,index2) in item" :key="index2"
@ -110,29 +110,14 @@
@click="checkBoxCheckFunc(item2.id)">
<el-icon v-if="isSelected(item2.id)" color="#ffffff"><Select /></el-icon>
</div>
<!-- 模式A只有医生渠道有数量 -->
<template v-if="false && !hasOtherChannelCount(item2.countsInfo)">
<div class="qudao_count_row qudao_count_row_simple">
<div style="display: flex; gap: 12px; justify-content: center;">
<span class="card_locked"> {{getTotalLocked(item2.countsInfo)}}</span>
<span class="font_color"> {{getTotalUsed(item2.countsInfo)}}</span>
<div class="zong_row"><div class="qudao_title_zong"><span>总数:</span>{{item2.countsInfo[0].max_total}}</div></div>
<div class="qudao_count_row">
<template v-for="(item3,index3) in item2.countsInfo" :key="index3">
<div v-if="item3 && !(item3.count===0 && item3.used_count===0)">
<span> {{item3.jiancheng}}</span><span><span :class="{'yellow bold-text': item3.locked_count > 0}">{{ item3.locked_count != null ? item3.locked_count : 0 }}</span><span>/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
</div>
<div style="display: flex; justify-content: center; width: 100%; margin-top: 4px;">
<span class="card_total"> {{item2.countsInfo[0].max_total}}</span>
</div>
</div>
</template>
<!-- 模式B多渠道有数量 -->
<template v-else>
<div class="zong_row"><div class="qudao_title_zong"><span>总数:</span>{{item2.countsInfo[0].max_total}}</div></div>
<div class="qudao_count_row">
<template v-for="(item3,index3) in item2.countsInfo" :key="index3">
<div v-if="item3 && !(item3.count===0 && item3.used_count===0 && item3.locked_count===0)">
<span> {{item3.jiancheng}}</span><span><span :class="{'yellow bold-text': item3.locked_count > 0}">{{ item3.locked_count != null ? item3.locked_count : 0 }}</span><span>/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
</div>
</template>
</div>
</template>
</template>
</div>
<div class="patient_type_row">
<div class="tps" v-for="(item3,index3) in item2.patient_type_label">
{{item3}}
@ -185,20 +170,25 @@
}} </span> 结束时间<span
style="font-weight: 700;display: inline-block;margin-right: 8px">{{ PlanDetaiInfo.end_time }}
</span>
停止预约时间<el-input v-model="PlanDetaiInfo.end_reservation_time" placeholder="停止预约时间" style="width: 120px; display: inline-block;" />
停止预约时间<span style="font-weight: 700">{{ PlanDetaiInfo.end_reservation_time }}</span>
</el-form-item>
<el-form-item label="号源数量:" v-if="PlanDetaiInfo.coutsInfo">
<el-form-item label="渠道名额:" v-if="PlanDetaiInfo.coutsInfo">
<div style="margin-right: 16px">
<div>当日总量</div>
<div class="qudao_k_input">
<el-input @input="MaxCountChange" type="number" v-model="PlanDetaiInfo.max_total"
:min="1" placeholder="0" oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
<div style="font-size: 12px;color: #999">设置渠道比例可自动分配</div>
</div>
<div>
<template v-for="(item,index) in PlanDetaiInfo.coutsInfo" :key="index">
<div class="qudao_k"
v-if="visibleChannelIds.has(item.appointment_type_id || item.id)">
<div v-if="visibleChannelIds.size > 1" style="width: 50px">{{ item.name }}</div>
<div class="qudao_k_input">
<el-input type="number" v-model="PlanDetaiInfo.coutsInfo[index].count" :min="1"
placeholder="0" oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
<div class="qudao_k" v-for="(item,index) in PlanDetaiInfo.coutsInfo" :key="index">
<div style="width: 50px">{{ item.name }}</div>
<div class="qudao_k_input">
<el-input type="number" v-model="PlanDetaiInfo.coutsInfo[index].count" :min="1"
placeholder="0" oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
</template>
</div>
</div>
</el-form-item>
<el-form-item label="状态:">
@ -279,9 +269,9 @@
<div style="display: flex; flex-direction: column; gap: 10px; width: 100%;">
<template v-if="ZhanWeiInfo.coutsInfo && ZhanWeiInfo.coutsInfo.length > 0">
<template v-for="(item,index) in ZhanWeiInfo.coutsInfo" :key="index">
<div v-if="item && !(item.count===0 && item.used_count===0 && item.locked_count===0)"
<div v-if="item && !(item.count===0 && item.used_count===0)"
style="display: flex; align-items: center; gap: 10px;">
<div v-if="visibleZhanWeiChannelIds.size > 1" style="width: 80px;">{{ item.name }}</div>
<div style="width: 80px;">{{ item.name }}</div>
<div style="flex: 1;">
<el-input type="number" v-model="ZhanWeiInfo.coutsInfo[index].locked_count" placeholder="占位数量" min="0"
oninput="value=value.replace(/[^0-9]/g,'')" />
@ -297,16 +287,6 @@
</div>
</div>
</el-form-item>
<el-form-item label="占位备注:">
<el-input
type="textarea"
v-model="ZhanWeiInfo.locked_remark"
:rows="3"
placeholder="选填,填写占位原因"
maxlength="200"
show-word-limit
/>
</el-form-item>
</el-form>
</div>
<template #footer>
@ -323,27 +303,22 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源数量:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchChannels" :key="ci">
<div v-if="ch.id === 1 || visibleBatchChannelIds.has(ch.id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')" />
</div>
</template>
</div>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">数量</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">数量: {{ batchTotalCount }}</el-col>
</el-row>
</el-form>
<div v-if="batchSameTimeSlot" style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee;">
<div style="margin-bottom: 8px; font-weight: 600; color: #333; font-size: 13px;">时间段设置</div>
<div style="display: flex; gap: 12px; flex-wrap: wrap;">
<div style="display: flex; align-items: center;">
<div style="width: 90px">停止预约时间:</div>
<el-input v-model="batchTimeInfo.end_reservation_time" placeholder="停止预约时间" style="width: 120px;" />
</div>
</div>
</div>
</div>
<template #footer>
<el-button @click="BatchModifyDialogVisible = false" :disabled="batchModifyRunning">取消</el-button>
@ -355,31 +330,28 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源占位:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchChannels" :key="ci">
<div v-if="visibleBatchOccupyChannelIds.has(ch.id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchOccupyChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
<span style="color: #999; font-size: 12px;">
最大可占: {{ batchOccupyLimits[ch.id]?.maxValue }}
</span>
</div>
</template>
</div>
</el-form-item>
<el-form-item label="占位备注:" style="margin-top: 10px;">
<el-input
type="textarea"
v-model="batchLockedRemark"
:rows="3"
placeholder="选填,填写占位原因"
maxlength="200"
show-word-limit
/>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">占用数量</el-col>
<el-col :span="8">提示</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
</el-col>
<el-col :span="8" style="line-height: 32px; font-size: 12px; color: #999;">
<template v-if="batchOccupyLimits[ch.id]?.maxValue !== null">
最大可占: {{ batchOccupyLimits[ch.id].maxValue }}
</template>
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchOccupyTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
<template #footer>
@ -461,7 +433,6 @@
dateRange: []
})
let PlanDetailDialogVisible = ref(false)
let visibleChannelIds = ref(new Set())
const GetList = () => {
searchInfo.value.resources_id = ResourceActive.value
date_list.value = getAllDatesBetweenDates(searchInfo.value.dateRange)
@ -510,10 +481,8 @@
patient_type_label: matchingPlan.patient_type_label,
status: matchingPlan.status,
id: matchingPlan.id,
resources_id: matchingPlan.resources_id,
begin_time: matchingPlan.begin_time,
end_time: matchingPlan.end_time,
end_reservation_time: matchingPlan.end_reservation_time
resources_id: matchingPlan.resources_id
};
}else{
row[date] = {
@ -761,12 +730,6 @@
loading.value = false
if (res.status) {
PlanDetaiInfo.value = res.data
// id=1 count>0 locked_count>0
visibleChannelIds.value = new Set(
PlanDetaiInfo.value.coutsInfo
.filter(item => item.appointment_type_id === 1 || item.id === 1 || Number(item.count) > 0 || Number(item.locked_count) > 0)
.map(item => item.appointment_type_id || item.id)
)
} else {
ElMessage.error(res.msg)
}
@ -803,7 +766,10 @@
PlanDetaiInfo.value.coutsInfo.forEach((item) => {
tempCount = tempCount + Number(item.count)
})
PlanDetaiInfo.value.max_total = tempCount
if (tempCount !== Number(PlanDetaiInfo.value.max_total)) {
ElMessage.error('各个渠道数量之和与当日总量不符')
return false
}
loading.value = true
PlanDetailChangeInfo({
PlanDetaiInfo: PlanDetaiInfo.value
@ -811,7 +777,6 @@
loading.value = false
if (res.status) {
PlanDetailDialogVisible.value = false
ElMessage.success('保存成功')
GetList()
} else {
ElMessage.error(res.msg)
@ -926,10 +891,6 @@
{ name: '自助机', id: 3 }
]
let batchForm = ref([])
let batchSameTimeSlot = ref(false)
let batchTimeInfo = ref({ begin_time: '', end_time: '', end_reservation_time: '' })
let visibleBatchChannelIds = ref(new Set())
let visibleBatchOccupyChannelIds = ref(new Set())
const initBatchForm = () => {
batchForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
@ -946,27 +907,22 @@
return
}
initBatchForm()
// planTableData count locked_count
// planTableData count
const selectedIds = new Set(selectedPlanArr.value)
const channelValues = {}
batchChannels.forEach(ch => {
channelValues[ch.id] = { count: [], locked_count: [] }
channelValues[ch.id] = { count: [] }
})
const selectedCells = []
planTableData.value.forEach(row => {
for (const key in row) {
if (key === 'time_range') continue
const cell = row[key]
if (cell && cell.id && selectedIds.has(cell.id)) {
selectedCells.push(cell)
if (cell.countsInfo) {
cell.countsInfo.forEach(ci => {
if (channelValues[ci.appointment_type_id]) {
channelValues[ci.appointment_type_id].count.push(ci.count)
channelValues[ci.appointment_type_id].locked_count.push(Number(ci.locked_count) || 0)
}
})
}
if (cell && cell.id && selectedIds.has(cell.id) && cell.countsInfo) {
cell.countsInfo.forEach(ci => {
if (channelValues[ci.appointment_type_id]) {
channelValues[ci.appointment_type_id].count.push(ci.count)
}
})
}
}
})
@ -979,53 +935,6 @@
count: vals.count.length > 0 && allSame(vals.count) ? vals.count[0] : ''
}
})
// count>0 locked_count>0
visibleBatchChannelIds.value = new Set(
batchChannels
.filter(ch => {
if (ch.id === 1) return true
const vals = channelValues[ch.id]
if (vals.count.some(v => v > 0)) return true
if (vals.locked_count.some(v => v > 0)) return true
return false
})
.map(ch => ch.id)
)
//
if (selectedCells.length > 0) {
const firstBegin = selectedCells[0].begin_time
const firstEnd = selectedCells[0].end_time
const allSameTime = selectedCells.every(c => c.begin_time === firstBegin && c.end_time === firstEnd)
batchSameTimeSlot.value = allSameTime
if (allSameTime) {
//
const deadlineCount = {}
selectedCells.forEach(c => {
const v = c.end_reservation_time
if (v !== null && v !== undefined) {
deadlineCount[v] = (deadlineCount[v] || 0) + 1
}
})
let bestDeadline = selectedCells[0].end_reservation_time
let maxFreq = 0
for (const [v, freq] of Object.entries(deadlineCount)) {
if (freq > maxFreq) {
maxFreq = freq
bestDeadline = v
}
}
batchTimeInfo.value = {
begin_time: firstBegin,
end_time: firstEnd,
end_reservation_time: bestDeadline
}
} else {
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
} else {
batchSameTimeSlot.value = false
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
batchProgress.value = 0
batchCurrent.value = 0
batchTotal.value = selectedPlanArr.value.length
@ -1067,16 +976,12 @@
appointment_type_id: item.appointment_type_id,
count: Number(item.count) || 0
}))
const batchParams = {
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo
}
if (batchSameTimeSlot.value) {
batchParams.end_reservation_time = batchTimeInfo.value.end_reservation_time
}
try {
const res = await PlanListBatchChangeCount(batchParams)
const res = await PlanListBatchChangeCount({
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo
})
batchModifyRunning.value = false
if (res && res.status) {
BatchModifyDialogVisible.value = false
@ -1096,7 +1001,6 @@
let batchOccupyRunning = ref(false)
let batchOccupyForm = ref([])
let batchOccupyLimits = ref({}) // { [appointment_type_id]: { limited: bool, maxValue: number } }
let batchLockedRemark = ref('')
const initBatchOccupyForm = () => {
batchOccupyForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
@ -1120,14 +1024,11 @@
return
}
initBatchOccupyForm()
batchLockedRemark.value = ''
// planTableData count - used_count
const selectedIds = new Set(selectedPlanArr.value)
const channelRemaining = {} // { [appointment_type_id]: number[] }
const channelLocked = {} // { [appointment_type_id]: number[] }
batchChannels.forEach(ch => {
channelRemaining[ch.id] = []
channelLocked[ch.id] = []
})
planTableData.value.forEach(row => {
for (const key in row) {
@ -1137,7 +1038,6 @@
cell.countsInfo.forEach(ci => {
if (channelRemaining[ci.appointment_type_id]) {
channelRemaining[ci.appointment_type_id].push(ci.count - ci.used_count)
channelLocked[ci.appointment_type_id].push(Number(ci.locked_count) || 0)
}
})
}
@ -1158,19 +1058,6 @@
}
})
batchOccupyLimits.value = limits
// maxValue>0
visibleBatchOccupyChannelIds.value = new Set(
batchChannels
.filter(ch => {
if (ch.id === 1) return true
if (limits[ch.id]?.maxValue > 0) return true
//
const maxLocked = Math.max(...(channelLocked[ch.id] || [0]))
if (maxLocked > 0) return true
return false
})
.map(ch => ch.id)
)
batchOccupyRunning.value = false
BatchOccupyDialogVisible.value = true
}
@ -1191,8 +1078,7 @@
try {
const res = await PlanListBatchChangeLocked({
ids: ids,
coutsInfo: coutsInfo,
locked_remark: batchLockedRemark.value
coutsInfo: coutsInfo
})
batchOccupyRunning.value = false
if (res && res.status) {
@ -1233,7 +1119,6 @@
}
//
let ZhanWeiDialogVisible = ref(false)
let visibleZhanWeiChannelIds = ref(new Set())
let ZhanWeiInfo = ref(null)
const OpenZhanWeiDialog = (row) => {
ZhanWeiDialogVisible.value = true
@ -1249,12 +1134,6 @@
item.locked_count = 0
}
})
// id=1 count>0 locked_count>0
visibleZhanWeiChannelIds.value = new Set(
ZhanWeiInfo.value.coutsInfo
.filter(item => item.appointment_type_id === 1 || item.id === 1 || Number(item.count) > 0 || Number(item.locked_count) > 0)
.map(item => item.appointment_type_id || item.id)
)
} else {
ElMessage.error(res.msg)
}
@ -1285,8 +1164,7 @@
loading.value = true
SaveLockedCount({
roster_detail_id: ZhanWeiInfo.value.id,
locked_counts: locked_counts,
locked_remark: ZhanWeiInfo.value.locked_remark || ''
locked_counts: locked_counts
}).then(res => {
loading.value = false
if (res.status) {
@ -1304,17 +1182,6 @@
return total + (Number(item.locked_count) || 0)
}, 0)
}
const getTotalUsed = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return 0
return countsInfo.reduce((total, item) => {
return total + (Number(item.used_count) || 0)
}, 0)
}
//
const hasOtherChannelCount = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return false
return countsInfo.some(ci => ci.appointment_type_id !== 1 && (Number(ci.count) > 0 || Number(ci.locked_count) > 0))
}
function formatDateLocal(date) {
const year = date.getFullYear();
@ -1527,43 +1394,7 @@
margin-left: 6px;
}
&.qudao_count_row_simple {
flex-direction: column;
align-items: center;
gap: 4px;
.card_total {
display: block;
width: 100%;
background: #409eff;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
text-align: center;
}
.card_locked {
display: inline-block;
background: #e6a23c;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
.font_color {
display: inline-block;
background: #67c23a;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
}
}
}
.planInfo {
@ -1580,7 +1411,7 @@
td {
border: 1px solid #f1f1f1;
padding: 8px 6px;
// padding: 6px;
}
td:first-child,
th:first-child {

@ -73,7 +73,7 @@
</div>
</div>
</td>
<td style="min-width: 150px;font-size: 14px;" v-for="(item,index) in date_list">{{item.substring(5,10)}} {{getWeekday(item)}}</td>
<td style="min-width: 120px;font-size: 14px;" v-for="(item,index) in date_list">{{item.substring(5,10)}} {{getWeekday(item)}}</td>
</tr>
<tr v-for="(item,index) in planTableData" :key="index">
<td v-for="(item2,index2) in item" :key="index2"
@ -110,29 +110,14 @@
@click="checkBoxCheckFunc(item2.id)">
<el-icon v-if="isSelected(item2.id)" color="#ffffff"><Select /></el-icon>
</div>
<!-- 模式A只有医生渠道有数量 -->
<template v-if="false && !hasOtherChannelCount(item2.countsInfo)">
<div class="qudao_count_row qudao_count_row_simple">
<div style="display: flex; gap: 12px; justify-content: center;">
<span class="card_locked"> {{getTotalLocked(item2.countsInfo)}}</span>
<span class="font_color"> {{getTotalUsed(item2.countsInfo)}}</span>
<div class="zong_row"><div class="qudao_title_zong"><span>总数:</span>{{item2.countsInfo[0].max_total}}</div></div>
<div class="qudao_count_row">
<template v-for="(item3,index3) in item2.countsInfo" :key="index3">
<div v-if="item3 && !(item3.count===0 && item3.used_count===0)">
<span> {{item3.jiancheng}}</span><span><span :class="{'yellow bold-text': item3.locked_count > 0}">{{ item3.locked_count != null ? item3.locked_count : 0 }}</span><span>/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
</div>
<div style="display: flex; justify-content: center; width: 100%; margin-top: 4px;">
<span class="card_total"> {{item2.countsInfo[0].max_total}}</span>
</div>
</div>
</template>
<!-- 模式B多渠道有数量 -->
<template v-else>
<div class="zong_row"><div class="qudao_title_zong"><span>总数:</span>{{item2.countsInfo[0].max_total}}</div></div>
<div class="qudao_count_row">
<template v-for="(item3,index3) in item2.countsInfo" :key="index3">
<div v-if="item3 && !(item3.count===0 && item3.used_count===0 && item3.locked_count===0)">
<span> {{item3.jiancheng}}</span><span><span :class="{'yellow bold-text': item3.locked_count > 0}">{{ item3.locked_count != null ? item3.locked_count : 0 }}</span><span>/</span><span class="font_color">{{item3.used_count}}</span>/{{item3.count}} </span>
</div>
</template>
</div>
</template>
</template>
</div>
<div class="patient_type_row">
<div class="tps" v-for="(item3,index3) in item2.patient_type_label">
{{item3}}
@ -185,20 +170,25 @@
}} </span> 结束时间<span
style="font-weight: 700;display: inline-block;margin-right: 8px">{{ PlanDetaiInfo.end_time }}
</span>
停止预约时间<el-input v-model="PlanDetaiInfo.end_reservation_time" placeholder="停止预约时间" style="width: 120px; display: inline-block;" />
停止预约时间<span style="font-weight: 700">{{ PlanDetaiInfo.end_reservation_time }}</span>
</el-form-item>
<el-form-item label="号源数量:" v-if="PlanDetaiInfo.coutsInfo">
<el-form-item label="渠道名额:" v-if="PlanDetaiInfo.coutsInfo">
<div style="margin-right: 16px">
<div>当日总量</div>
<div class="qudao_k_input">
<el-input @input="MaxCountChange" type="number" v-model="PlanDetaiInfo.max_total"
:min="1" placeholder="0" oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
<div style="font-size: 12px;color: #999">设置渠道比例可自动分配</div>
</div>
<div>
<template v-for="(item,index) in PlanDetaiInfo.coutsInfo" :key="index">
<div class="qudao_k"
v-if="visibleChannelIds.has(item.appointment_type_id || item.id)">
<div v-if="visibleChannelIds.size > 1" style="width: 50px">{{ item.name }}</div>
<div class="qudao_k_input">
<el-input type="number" v-model="PlanDetaiInfo.coutsInfo[index].count" :min="1"
placeholder="0" oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
<div class="qudao_k" v-for="(item,index) in PlanDetaiInfo.coutsInfo" :key="index">
<div style="width: 50px">{{ item.name }}</div>
<div class="qudao_k_input">
<el-input type="number" v-model="PlanDetaiInfo.coutsInfo[index].count" :min="1"
placeholder="0" oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
</template>
</div>
</div>
</el-form-item>
<el-form-item label="状态:">
@ -279,9 +269,9 @@
<div style="display: flex; flex-direction: column; gap: 10px; width: 100%;">
<template v-if="ZhanWeiInfo.coutsInfo && ZhanWeiInfo.coutsInfo.length > 0">
<template v-for="(item,index) in ZhanWeiInfo.coutsInfo" :key="index">
<div v-if="item && !(item.count===0 && item.used_count===0 && item.locked_count===0)"
<div v-if="item && !(item.count===0 && item.used_count===0)"
style="display: flex; align-items: center; gap: 10px;">
<div v-if="visibleZhanWeiChannelIds.size > 1" style="width: 80px;">{{ item.name }}</div>
<div style="width: 80px;">{{ item.name }}</div>
<div style="flex: 1;">
<el-input type="number" v-model="ZhanWeiInfo.coutsInfo[index].locked_count" placeholder="占位数量" min="0"
oninput="value=value.replace(/[^0-9]/g,'')" />
@ -297,16 +287,6 @@
</div>
</div>
</el-form-item>
<el-form-item label="占位备注:">
<el-input
type="textarea"
v-model="ZhanWeiInfo.locked_remark"
:rows="3"
placeholder="选填,填写占位原因"
maxlength="200"
show-word-limit
/>
</el-form-item>
</el-form>
</div>
<template #footer>
@ -323,27 +303,22 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源数量:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchChannels" :key="ci">
<div v-if="ch.id === 1 || visibleBatchChannelIds.has(ch.id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')" />
</div>
</template>
</div>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">数量</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">数量: {{ batchTotalCount }}</el-col>
</el-row>
</el-form>
<div v-if="batchSameTimeSlot" style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee;">
<div style="margin-bottom: 8px; font-weight: 600; color: #333; font-size: 13px;">时间段设置</div>
<div style="display: flex; gap: 12px; flex-wrap: wrap;">
<div style="display: flex; align-items: center;">
<div style="width: 90px">停止预约时间:</div>
<el-input v-model="batchTimeInfo.end_reservation_time" placeholder="停止预约时间" style="width: 120px;" />
</div>
</div>
</div>
</div>
<template #footer>
<el-button @click="BatchModifyDialogVisible = false" :disabled="batchModifyRunning">取消</el-button>
@ -355,31 +330,28 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源占位:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchChannels" :key="ci">
<div v-if="visibleBatchOccupyChannelIds.has(ch.id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchOccupyChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
<span style="color: #999; font-size: 12px;">
最大可占: {{ batchOccupyLimits[ch.id]?.maxValue }}
</span>
</div>
</template>
</div>
</el-form-item>
<el-form-item label="占位备注:" style="margin-top: 10px;">
<el-input
type="textarea"
v-model="batchLockedRemark"
:rows="3"
placeholder="选填,填写占位原因"
maxlength="200"
show-word-limit
/>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">占用数量</el-col>
<el-col :span="8">提示</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
</el-col>
<el-col :span="8" style="line-height: 32px; font-size: 12px; color: #999;">
<template v-if="batchOccupyLimits[ch.id]?.maxValue !== null">
最大可占: {{ batchOccupyLimits[ch.id].maxValue }}
</template>
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchOccupyTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
<template #footer>
@ -461,7 +433,6 @@
dateRange: []
})
let PlanDetailDialogVisible = ref(false)
let visibleChannelIds = ref(new Set())
const GetList = () => {
searchInfo.value.resources_id = ResourceActive.value
date_list.value = getAllDatesBetweenDates(searchInfo.value.dateRange)
@ -510,10 +481,8 @@
patient_type_label: matchingPlan.patient_type_label,
status: matchingPlan.status,
id: matchingPlan.id,
resources_id: matchingPlan.resources_id,
begin_time: matchingPlan.begin_time,
end_time: matchingPlan.end_time,
end_reservation_time: matchingPlan.end_reservation_time
resources_id: matchingPlan.resources_id
};
}else{
row[date] = {
@ -771,12 +740,6 @@
loading.value = false
if (res.status) {
PlanDetaiInfo.value = res.data
// id=1 count>0 locked_count>0
visibleChannelIds.value = new Set(
PlanDetaiInfo.value.coutsInfo
.filter(item => item.appointment_type_id === 1 || item.id === 1 || Number(item.count) > 0 || Number(item.locked_count) > 0)
.map(item => item.appointment_type_id || item.id)
)
} else {
ElMessage.error(res.msg)
}
@ -813,7 +776,10 @@
PlanDetaiInfo.value.coutsInfo.forEach((item) => {
tempCount = tempCount + Number(item.count)
})
PlanDetaiInfo.value.max_total = tempCount
if (tempCount !== Number(PlanDetaiInfo.value.max_total)) {
ElMessage.error('各个渠道数量之和与当日总量不符')
return false
}
loading.value = true
PlanDetailChangeInfoAdmin({
PlanDetaiInfo: PlanDetaiInfo.value,
@ -822,7 +788,6 @@
loading.value = false
if (res.status) {
PlanDetailDialogVisible.value = false
ElMessage.success('保存成功')
GetList()
} else {
ElMessage.error(res.msg)
@ -940,10 +905,6 @@
{ name: '自助机', id: 3 }
]
let batchForm = ref([])
let batchSameTimeSlot = ref(false)
let batchTimeInfo = ref({ begin_time: '', end_time: '', end_reservation_time: '' })
let visibleBatchChannelIds = ref(new Set())
let visibleBatchOccupyChannelIds = ref(new Set())
const initBatchForm = () => {
batchForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
@ -960,27 +921,22 @@
return
}
initBatchForm()
// planTableData count locked_count
// planTableData count
const selectedIds = new Set(selectedPlanArr.value)
const channelValues = {}
batchChannels.forEach(ch => {
channelValues[ch.id] = { count: [], locked_count: [] }
channelValues[ch.id] = { count: [] }
})
const selectedCells = []
planTableData.value.forEach(row => {
for (const key in row) {
if (key === 'time_range') continue
const cell = row[key]
if (cell && cell.id && selectedIds.has(cell.id)) {
selectedCells.push(cell)
if (cell.countsInfo) {
cell.countsInfo.forEach(ci => {
if (channelValues[ci.appointment_type_id]) {
channelValues[ci.appointment_type_id].count.push(ci.count)
channelValues[ci.appointment_type_id].locked_count.push(Number(ci.locked_count) || 0)
}
})
}
if (cell && cell.id && selectedIds.has(cell.id) && cell.countsInfo) {
cell.countsInfo.forEach(ci => {
if (channelValues[ci.appointment_type_id]) {
channelValues[ci.appointment_type_id].count.push(ci.count)
}
})
}
}
})
@ -993,53 +949,6 @@
count: vals.count.length > 0 && allSame(vals.count) ? vals.count[0] : ''
}
})
// count>0 locked_count>0
visibleBatchChannelIds.value = new Set(
batchChannels
.filter(ch => {
if (ch.id === 1) return true
const vals = channelValues[ch.id]
if (vals.count.some(v => v > 0)) return true
if (vals.locked_count.some(v => v > 0)) return true
return false
})
.map(ch => ch.id)
)
//
if (selectedCells.length > 0) {
const firstBegin = selectedCells[0].begin_time
const firstEnd = selectedCells[0].end_time
const allSameTime = selectedCells.every(c => c.begin_time === firstBegin && c.end_time === firstEnd)
batchSameTimeSlot.value = allSameTime
if (allSameTime) {
//
const deadlineCount = {}
selectedCells.forEach(c => {
const v = c.end_reservation_time
if (v !== null && v !== undefined) {
deadlineCount[v] = (deadlineCount[v] || 0) + 1
}
})
let bestDeadline = selectedCells[0].end_reservation_time
let maxFreq = 0
for (const [v, freq] of Object.entries(deadlineCount)) {
if (freq > maxFreq) {
maxFreq = freq
bestDeadline = v
}
}
batchTimeInfo.value = {
begin_time: firstBegin,
end_time: firstEnd,
end_reservation_time: bestDeadline
}
} else {
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
} else {
batchSameTimeSlot.value = false
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
batchProgress.value = 0
batchCurrent.value = 0
batchTotal.value = selectedPlanArr.value.length
@ -1081,17 +990,13 @@
appointment_type_id: item.appointment_type_id,
count: Number(item.count) || 0
}))
const batchParams = {
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
department_id: searchInfo.value.department_id
}
if (batchSameTimeSlot.value) {
batchParams.end_reservation_time = batchTimeInfo.value.end_reservation_time
}
try {
const res = await PlanListBatchChangeCount(batchParams)
const res = await PlanListBatchChangeCount({
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
department_id: searchInfo.value.department_id
})
batchModifyRunning.value = false
if (res && res.status) {
BatchModifyDialogVisible.value = false
@ -1111,7 +1016,6 @@
let batchOccupyRunning = ref(false)
let batchOccupyForm = ref([])
let batchOccupyLimits = ref({}) // { [appointment_type_id]: { limited: bool, maxValue: number } }
let batchLockedRemark = ref('')
const initBatchOccupyForm = () => {
batchOccupyForm.value = batchChannels.map(ch => ({
appointment_type_id: ch.id,
@ -1135,14 +1039,11 @@
return
}
initBatchOccupyForm()
batchLockedRemark.value = ''
// planTableData count - used_count
const selectedIds = new Set(selectedPlanArr.value)
const channelRemaining = {} // { [appointment_type_id]: number[] }
const channelLocked = {} // { [appointment_type_id]: number[] }
batchChannels.forEach(ch => {
channelRemaining[ch.id] = []
channelLocked[ch.id] = []
})
planTableData.value.forEach(row => {
for (const key in row) {
@ -1152,7 +1053,6 @@
cell.countsInfo.forEach(ci => {
if (channelRemaining[ci.appointment_type_id]) {
channelRemaining[ci.appointment_type_id].push(ci.count - ci.used_count)
channelLocked[ci.appointment_type_id].push(Number(ci.locked_count) || 0)
}
})
}
@ -1173,19 +1073,6 @@
}
})
batchOccupyLimits.value = limits
// maxValue>0
visibleBatchOccupyChannelIds.value = new Set(
batchChannels
.filter(ch => {
if (ch.id === 1) return true
if (limits[ch.id]?.maxValue > 0) return true
//
const maxLocked = Math.max(...(channelLocked[ch.id] || [0]))
if (maxLocked > 0) return true
return false
})
.map(ch => ch.id)
)
batchOccupyRunning.value = false
BatchOccupyDialogVisible.value = true
}
@ -1207,8 +1094,7 @@
const res = await PlanListBatchChangeLocked({
ids: ids,
coutsInfo: coutsInfo,
department_id: searchInfo.value.department_id,
locked_remark: batchLockedRemark.value
department_id: searchInfo.value.department_id
})
batchOccupyRunning.value = false
if (res && res.status) {
@ -1249,7 +1135,6 @@
}
//
let ZhanWeiDialogVisible = ref(false)
let visibleZhanWeiChannelIds = ref(new Set())
let ZhanWeiInfo = ref(null)
const OpenZhanWeiDialog = (row) => {
ZhanWeiDialogVisible.value = true
@ -1265,12 +1150,6 @@
item.locked_count = 0
}
})
// id=1 count>0 locked_count>0
visibleZhanWeiChannelIds.value = new Set(
ZhanWeiInfo.value.coutsInfo
.filter(item => item.appointment_type_id === 1 || item.id === 1 || Number(item.count) > 0 || Number(item.locked_count) > 0)
.map(item => item.appointment_type_id || item.id)
)
} else {
ElMessage.error(res.msg)
}
@ -1301,8 +1180,7 @@
loading.value = true
SaveLockedCount({
roster_detail_id: ZhanWeiInfo.value.id,
locked_counts: locked_counts,
locked_remark: ZhanWeiInfo.value.locked_remark || ''
locked_counts: locked_counts
}).then(res => {
loading.value = false
if (res.status) {
@ -1320,17 +1198,6 @@
return total + (Number(item.locked_count) || 0)
}, 0)
}
const getTotalUsed = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return 0
return countsInfo.reduce((total, item) => {
return total + (Number(item.used_count) || 0)
}, 0)
}
//
const hasOtherChannelCount = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return false
return countsInfo.some(ci => ci.appointment_type_id !== 1 && (Number(ci.count) > 0 || Number(ci.locked_count) > 0))
}
function formatDateLocal(date) {
const year = date.getFullYear();
@ -1543,43 +1410,7 @@
margin-left: 6px;
}
&.qudao_count_row_simple {
flex-direction: column;
align-items: center;
gap: 4px;
.card_total {
display: block;
width: 100%;
background: #409eff;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
text-align: center;
}
.card_locked {
display: inline-block;
background: #e6a23c;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
.font_color {
display: inline-block;
background: #67c23a;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
}
}
}
.planInfo {
@ -1596,7 +1427,7 @@
td {
border: 1px solid #f1f1f1;
padding: 8px 6px;
// padding: 6px;
}
td:first-child,
th:first-child {

@ -105,31 +105,21 @@
<el-icon v-if="isSelected(item2.id)" color="#ffffff"><Select /></el-icon>
</div>
<!-- 模式A只有医生渠道有数量 -->
<template v-if="false && !hasOtherChannelCount(item2.countsInfo)">
<div class="qudao_count_row qudao_count_row_simple">
<span class="card_total"> {{item2.countsInfo[0].max_total}}</span>
<span v-if="getTotalLocked(item2.countsInfo) > 0" class="card_locked"> {{getTotalLocked(item2.countsInfo)}}</span>
<div class="qudao_count_row">
<div class="qudao_title_zong"><span></span>{{item2.countsInfo[0].max_total}}
</div>
</template>
<!-- 模式B多渠道有数量 -->
<template v-else>
<div class="qudao_count_row">
<div class="qudao_title_zong"><span></span>{{item2.countsInfo[0].max_total}}
</div>
<div v-for="(item3,index3) in item2.countsInfo" :key="index3">
<span> {{item3.jiancheng}}</span><span>{{item3.count}} </span>
</div>
<div v-for="(item3,index3) in item2.countsInfo" :key="index3">
<span> {{item3.jiancheng}}</span><span>{{item3.count}} </span>
</div>
<div v-if="getTotalLocked(item2.countsInfo) > 0" class="locked_count_row">
:{{getTotalLocked(item2.countsInfo)}}
</div>
</template>
</div>
<div class="patient_type_row">
<div class="tps" v-for="(item3,index3) in item2.patient_type_label">
{{item3}}
</div>
</div>
<div v-if="getTotalLocked(item2.countsInfo) > 0" class="locked_count_row">
:{{getTotalLocked(item2.countsInfo)}}
</div>
</div>
</td>
</tr>
@ -197,18 +187,32 @@
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="号源数量">
<el-form-item label="渠道名额">
<div style="margin-right: 26px">
<div>
<template v-for="(item,index) in PlanInfo.qudao_total" :key="index">
<div class="qudao_k" v-if="visibleChannelIds.has(item.id || item.appointment_type_id)">
<div v-if="visibleChannelIds.size > 1" style="width: 60px">{{ item.name }}</div>
<div class="qudao_k_input" style="display: flex;">
<el-input type="number" v-model="PlanInfo.qudao_total[index].count" :min="0"
placeholder="0" oninput="value=value.replace(/[^0-9]/g, '')" />
</div>
</div>
</template>
<el-radio-group v-model="CountType" @change="CountTypeChange">
<el-radio label="1">根据总量</el-radio>
<el-radio style="margin-left: -10px;" label="2">根据时长(分钟)</el-radio>
</el-radio-group>
</div>
<div class="qudao_k_input">
<el-input v-if="CountType==1" style="width: 220px;" @input="MaxCountChange" type="number"
v-model="PlanInfo.max_total" :min="0" placeholder="0"
oninput="value=value.replace(/[^0-9]/g, '')" />
<el-input v-if="CountType==2" style="width: 220px;" @input="TimeLongChange" type="number"
v-model="PlanInfo.time_long" :min="1" placeholder="0"
oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
<div style="font-size: 12px;color: #999">设置渠道比例可自动分配</div>
</div>
<div>
<div class="qudao_k" v-for="(item,index) in PlanInfo.qudao_total" :key="index">
<div style="width: 50px">{{ item.name }}</div>
<div class="qudao_k_input" style="display: flex;">
<el-input type="number" v-model="PlanInfo.qudao_total[index].count" :min="0"
placeholder="0" oninput="value=value.replace(/[^0-9]/g, '')" />
<div style="margin-left: 4px; color: #ccc;">{{item.ratio}}%</div>
</div>
</div>
</div>
</el-form-item>
@ -224,13 +228,13 @@
<div style="display:flex;">
<div style="width: 70px">开始时间:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.begin_time" placeholder="开始时间" />
<el-input v-model="PlanInfo.begin_time" placeholder="开始时间" disabled />
</div>
</div>
<div style="display:flex;">
<div style="width: 70px">结束时间:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.end_time" placeholder="结束时间" />
<el-input v-model="PlanInfo.end_time" placeholder="结束时间" disabled />
</div>
</div>
</div>
@ -238,7 +242,13 @@
<div style="display:flex;">
<div style="width: 90px">停止预约时间:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.end_reservation_time" placeholder="停止预约时间" />
<el-input v-model="PlanInfo.end_reservation_time" placeholder="停止预约时间" disabled />
</div>
</div>
<div style="display:flex;">
<div style="width: 90px">可用时间长度:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.time_unit" placeholder="可用时间长度" disabled />
</div>
</div>
</div>
@ -346,16 +356,17 @@
<el-form-item label="星期:">
{{ ZhanWeiInfo.weekname }}
</el-form-item>
<el-form-item label="号源占位:">
<el-form-item label="渠道占位:">
<div style="display: flex; flex-direction: column; gap: 10px; width: 100%;">
<template v-if="ZhanWeiInfo.qudao_total && ZhanWeiInfo.qudao_total.length > 0">
<template v-for="(item,index) in ZhanWeiInfo.qudao_total" :key="index">
<div v-if="visibleZhanWeiChannelIds.has(item.appointment_type_id || item.id)"
<div v-if="item && !(item.count===0)"
style="display: flex; align-items: center; gap: 10px;">
<div v-if="visibleZhanWeiChannelIds.size > 1" style="width: 80px;">{{ item.name }}</div>
<el-input type="number" v-model="ZhanWeiInfo.qudao_total[index].locked_count" placeholder="占位数量" min="0"
style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')" />
<div style="width: 80px;">{{ item.name }}</div>
<div style="flex: 1;">
<el-input type="number" v-model="ZhanWeiInfo.qudao_total[index].locked_count" placeholder="占位数量" min="0"
oninput="value=value.replace(/[^0-9]/g,'')" />
</div>
<div style="color: #999; font-size: 12px;">
可用: {{ item.count }}
</div>
@ -383,35 +394,22 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源数量:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchChannels" :key="ci">
<div v-if="visibleBatchChannelIds.has(ch.id || ch.appointment_type_id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')" />
</div>
</template>
</div>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">数量</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">数量: {{ batchTotalCount }}</el-col>
</el-row>
</el-form>
<div v-if="batchSameTimeSlot" style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee;">
<div style="margin-bottom: 8px; font-weight: 600; color: #333; font-size: 13px;">时间段设置</div>
<div style="display: flex; gap: 12px; flex-wrap: wrap;">
<div style="display: flex; align-items: center;">
<div style="width: 70px">开始时间:</div>
<el-input v-model="batchTimeInfo.begin_time" placeholder="开始时间" style="width: 120px;" />
</div>
<div style="display: flex; align-items: center;">
<div style="width: 70px">结束时间:</div>
<el-input v-model="batchTimeInfo.end_time" placeholder="结束时间" style="width: 120px;" />
</div>
<div style="display: flex; align-items: center;">
<div style="width: 90px">停止预约时间:</div>
<el-input v-model="batchTimeInfo.end_reservation_time" placeholder="停止预约时间" style="width: 120px;" />
</div>
</div>
</div>
<div style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee;">
<div style="margin-bottom: 8px; font-weight: 600; color: #333; font-size: 13px;">病人类型</div>
<el-checkbox-group v-model="batchPatientType">
@ -432,21 +430,28 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源占位:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchOccupyChannels" :key="ci">
<div v-if="visibleBatchOccupyChannelIds.has(ch.id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchOccupyChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
<span style="color: #999; font-size: 12px;">
最大可占: {{ batchOccupyLimits[ch.id]?.maxValue }}
</span>
</div>
</template>
</div>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">占用数量</el-col>
<el-col :span="8">提示</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchOccupyChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
</el-col>
<el-col :span="8" style="line-height: 32px; font-size: 12px; color: #999;">
<template v-if="batchOccupyLimits[ch.id]?.maxValue !== null">
最大可占: {{ batchOccupyLimits[ch.id].maxValue }}
</template>
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchOccupyTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
<template #footer>
@ -489,6 +494,7 @@
ElMessageBox
} from 'element-plus'
let CountType = ref("1"); //
let loading = ref(false)
let currentPage = ref(1) //
let pageSize = ref(15) //
@ -660,12 +666,10 @@
let batchModifyRunning = ref(false)
let batchChannels = ref([])
let batchForm = ref([])
let visibleBatchChannelIds = ref(new Set())
let visibleZhanWeiChannelIds = ref(new Set())
let visibleBatchOccupyChannelIds = ref(new Set())
let batchSameTimeSlot = ref(false)
let batchTimeInfo = ref({ begin_time: '', end_time: '', end_reservation_time: '' })
let batchPatientType = ref([])
const batchTotalCount = computed(() => {
return batchForm.value.reduce((s, item) => s + (Number(item.count) || 0), 0)
})
//
let BatchOccupyDialogVisible = ref(false)
let batchOccupyRunning = ref(false)
@ -769,16 +773,14 @@
channelMap.set(ci.appointment_type_id, {
name: ci.name,
jiancheng: ci.jiancheng,
counts: [],
locked_counts: []
counts: []
})
}
channelMap.get(ci.appointment_type_id).counts.push(ci.count)
channelMap.get(ci.appointment_type_id).locked_counts.push(Number(ci.locked_count) || 0)
})
//
if (cell.patient_type) {
patientTypeSets.push(new Set(cell.patient_type.split(',').filter(v => v !== '')))
patientTypeSets.push(new Set(cell.patient_type))
}
}
}
@ -794,19 +796,6 @@
count: allSame ? info.counts[0] : ''
})
}
// id=1 count>0
visibleBatchChannelIds.value = new Set(
batchForm.value
.filter((item, ci) => {
const ch = batchChannels.value[ci]
const chId = ch.id || ch.appointment_type_id
return chId === 1 || Number(item.count) > 0 || channelMap.get(chId)?.locked_counts?.some(v => v > 0)
})
.map((item, ci) => {
const ch = batchChannels.value[ci]
return ch.id || ch.appointment_type_id
})
)
//
if (patientTypeSets.length > 0) {
const commonTypes = patientTypeSets.reduce((acc, set) => {
@ -822,51 +811,6 @@
}
batchModifyRunning.value = false
BatchModifyDialogVisible.value = true
// selectedIds
const selectedCells = []
planTableData.value.forEach(row => {
for (const key in row) {
if (key === 'time_range') continue
const cell = row[key]
if (cell && cell.id && selectedIds.has(cell.id)) {
selectedCells.push(cell)
}
}
})
if (selectedCells.length > 0) {
const firstBegin = selectedCells[0].begin_time
const firstEnd = selectedCells[0].end_time
const allSameTime = selectedCells.every(c => c.begin_time === firstBegin && c.end_time === firstEnd)
batchSameTimeSlot.value = allSameTime
if (allSameTime) {
//
const deadlineCount = {}
selectedCells.forEach(c => {
const v = c.end_reservation_time
if (v !== null && v !== undefined) {
deadlineCount[v] = (deadlineCount[v] || 0) + 1
}
})
let bestDeadline = selectedCells[0].end_reservation_time
let maxFreq = 0
for (const [v, freq] of Object.entries(deadlineCount)) {
if (freq > maxFreq) {
maxFreq = freq
bestDeadline = v
}
}
batchTimeInfo.value = {
begin_time: firstBegin,
end_time: firstEnd,
end_reservation_time: bestDeadline
}
} else {
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
} else {
batchSameTimeSlot.value = false
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
}
const execBatchModify = async () => {
//
@ -876,26 +820,20 @@
return
}
}
const maxTotal = batchForm.value.reduce((s, item) => s + (Number(item.count) || 0), 0)
const maxTotal = batchTotalCount.value
batchModifyRunning.value = true
const ids = [...selectedPlanArr.value]
const coutsInfo = batchForm.value.map(item => ({
appointment_type_id: item.appointment_type_id,
count: Number(item.count) || 0
}))
const batchParams = {
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
patientType: batchPatientType.value
}
if (batchSameTimeSlot.value) {
batchParams.begin_time = batchTimeInfo.value.begin_time
batchParams.end_time = batchTimeInfo.value.end_time
batchParams.end_reservation_time = batchTimeInfo.value.end_reservation_time
}
try {
const res = await PlanModelBatchChange(batchParams)
const res = await PlanModelBatchChange({
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
patientType: batchPatientType.value
})
batchModifyRunning.value = false
if (res && res.status) {
BatchModifyDialogVisible.value = false
@ -1009,13 +947,9 @@
row[xingqi.label] = {
countsInfo: matchingPlan.countsInfo,
patient_type_label: matchingPlan.patient_type_label,
patient_type: matchingPlan.patient_type,
status: matchingPlan.status,
id: matchingPlan.id,
resources_id: matchingPlan.resources_id,
begin_time: matchingPlan.begin_time,
end_time: matchingPlan.end_time,
end_reservation_time: matchingPlan.end_reservation_time
resources_id:matchingPlan.resources_id
};
}else{
@ -1074,6 +1008,7 @@
begin_time: '',
end_time: '',
end_reservation_time: '',
time_unit: 0, //
resources_id: null,
devices: [],
patientType: [],
@ -1081,7 +1016,6 @@
}
}
let PlanInfo = ref(DataDefault())
let visibleChannelIds = ref(new Set())
let selectedResourceTimeMode = ref(0) // 0-1-
const Add = (row = null) => {
@ -1127,12 +1061,15 @@
GetList()
}
const Save = () => {
// max_total count
//
let tempCount = 0
PlanInfo.value.qudao_total.forEach((item) => {
tempCount = tempCount + Number(item.count)
})
PlanInfo.value.max_total = tempCount
if (tempCount !== Number(PlanInfo.value.max_total)) {
ElMessage.error('各个渠道数量之和与当日总量不符')
return false
}
ElMessageBox.confirm(
'确定保存吗?',
@ -1222,12 +1159,10 @@
if (!channelMap.has(ci.appointment_type_id)) {
channelMap.set(ci.appointment_type_id, {
name: ci.name,
counts: [],
locked_counts: []
counts: []
})
}
channelMap.get(ci.appointment_type_id).counts.push(ci.count)
channelMap.get(ci.appointment_type_id).locked_counts.push(Number(ci.locked_count) || 0)
})
}
}
@ -1242,22 +1177,6 @@
}
batchOccupyLimits.value = limits
initBatchOccupyForm()
// id=1 maxValue>0
visibleBatchOccupyChannelIds.value = new Set(
batchOccupyChannels.value
.filter(ch => {
if (ch.id === 1) return true
if (batchOccupyLimits.value[ch.id]?.maxValue > 0) return true
//
const ci = batchOccupyChannels.value.findIndex(c => c.id === ch.id)
if (ci >= 0) {
const maxLocked = Math.max(...channelMap.get(ch.id)?.locked_counts || [0])
if (maxLocked > 0) return true
}
return false
})
.map(ch => ch.id)
)
batchOccupyRunning.value = false
BatchOccupyDialogVisible.value = true
}
@ -1330,12 +1249,7 @@
PlanInfo.value.qudao_total.forEach((v, i) => {
PlanInfo.value.qudao_total[i].count = 0
})
//
visibleChannelIds.value = new Set(
PlanInfo.value.qudao_total
.filter(item => item.id === 1 || item.appointment_type_id === 1)
.map(item => item.id || item.appointment_type_id)
)
// console.log(PlanInfo.value)
} else {
ElMessage.error(res.msg)
}
@ -1440,12 +1354,6 @@
PlanInfo.value.max_total = res.data.qudao_total[0].max_total
PlanInfo.value.xingqi = [res.data.weekname]
PlanInfo.value.devices = res.data.devices
// id=1 count>0
visibleChannelIds.value = new Set(
PlanInfo.value.qudao_total
.filter(item => item.id === 1 || item.appointment_type_id === 1 || Number(item.count) > 0)
.map(item => item.id || item.appointment_type_id)
)
//
const selectedResource = enableResourceList.value.find(r => r.id === PlanInfo.value.resources_id);
selectedResourceTimeMode.value = selectedResource ? (selectedResource.time_mode || 0) : 0;
@ -1550,6 +1458,15 @@
}
}
//
const CountTypeChange = (e) => {
CountType.value = e
MaxCountChange(0)
TimeLongChange(0)
if (e == 2) {
}
}
const handleSelectionChange = (e) => {
selectedPlanArr.value=[]
e.forEach((v,i)=>{
@ -1559,6 +1476,42 @@
console.log(selectedPlanArr.value)
}
//
const TimeLongChange = (timelong) => {
if (CountType.value == 2) { //
if (PlanInfo.value.begin_time == '' || PlanInfo.value.end_time == '') {
ElMessage.error("请先设置时段")
PlanInfo.value.max_total = 0
return false
}
ComPuteCountByTime(timelong)
}
}
//
const ComPuteCountByTime = (timelong) => {
let count = calculateTimeSegments(PlanInfo.value.begin_time, PlanInfo.value.end_time, timelong)
PlanInfo.value.max_total = count
MaxCountChange(count)
}
//
function calculateTimeSegments(startTime, endTime, span) {
//
function timeToMinutes(timeStr) {
const [hours, minutes] = timeStr.split(':').map(Number);
return hours * 60 + minutes;
}
const startMinutes = timeToMinutes(startTime);
const endMinutes = timeToMinutes(endTime);
//
const totalMinutes = endMinutes - startMinutes;
//
const segments = Math.floor(totalMinutes / span);
return segments;
}
//
const getTotalLocked = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return 0
@ -1566,11 +1519,6 @@
return total + (Number(item.locked_count) || 0)
}, 0)
}
//
const hasOtherChannelCount = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return false
return countsInfo.some(ci => ci.appointment_type_id !== 1 && (Number(ci.count) > 0 || Number(ci.locked_count) > 0))
}
// -
const OpenZhanWeiDialog = (row) => {
ZhanWeiDialogVisible.value = true
@ -1594,12 +1542,6 @@
item.locked_count = 0
}
})
// id=1 count>0
visibleZhanWeiChannelIds.value = new Set(
ZhanWeiInfo.value.qudao_total
.filter(item => item.appointment_type_id === 1 || item.id === 1 || Number(item.count) > 0 || Number(item.locked_count) > 0)
.map(item => item.appointment_type_id || item.id)
)
}
} else {
ElMessage.error(res.msg)
@ -1784,31 +1726,6 @@
margin-left: 6px;
}
.card_total {
display: inline-block;
background: #409eff;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
.card_locked {
display: inline-block;
background: #e6a23c;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
&.qudao_count_row_simple {
justify-content: center;
gap: 12px;
}
.qudao_title_zong {
font-weight: 700;

@ -105,31 +105,21 @@
<el-icon v-if="isSelected(item2.id)" color="#ffffff"><Select /></el-icon>
</div>
<!-- 模式A只有医生渠道有数量 -->
<template v-if="false && !hasOtherChannelCount(item2.countsInfo)">
<div class="qudao_count_row qudao_count_row_simple">
<span class="card_total"> {{item2.countsInfo[0].max_total}}</span>
<span v-if="getTotalLocked(item2.countsInfo) > 0" class="card_locked"> {{getTotalLocked(item2.countsInfo)}}</span>
<div class="qudao_count_row">
<div class="qudao_title_zong"><span></span>{{item2.countsInfo[0].max_total}}
</div>
</template>
<!-- 模式B多渠道有数量 -->
<template v-else>
<div class="qudao_count_row">
<div class="qudao_title_zong"><span></span>{{item2.countsInfo[0].max_total}}
</div>
<div v-for="(item3,index3) in item2.countsInfo" :key="index3">
<span> {{item3.jiancheng}}</span><span>{{item3.count}} </span>
</div>
<div v-for="(item3,index3) in item2.countsInfo" :key="index3">
<span> {{item3.jiancheng}}</span><span>{{item3.count}} </span>
</div>
<div v-if="getTotalLocked(item2.countsInfo) > 0" class="locked_count_row">
:{{getTotalLocked(item2.countsInfo)}}
</div>
</template>
</div>
<div class="patient_type_row">
<div class="tps" v-for="(item3,index3) in item2.patient_type_label">
{{item3}}
</div>
</div>
<div v-if="getTotalLocked(item2.countsInfo) > 0" class="locked_count_row">
:{{getTotalLocked(item2.countsInfo)}}
</div>
</div>
</td>
</tr>
@ -197,18 +187,32 @@
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="号源数量">
<el-form-item label="渠道名额">
<div style="margin-right: 26px">
<div>
<template v-for="(item,index) in PlanInfo.qudao_total" :key="index">
<div class="qudao_k" v-if="visibleChannelIds.has(item.id || item.appointment_type_id)">
<div v-if="visibleChannelIds.size > 1" style="width: 60px">{{ item.name }}</div>
<div class="qudao_k_input" style="display: flex;">
<el-input type="number" v-model="PlanInfo.qudao_total[index].count" :min="0"
placeholder="0" oninput="value=value.replace(/[^0-9]/g, '')" />
</div>
</div>
</template>
<el-radio-group v-model="CountType" @change="CountTypeChange">
<el-radio label="1">根据总量</el-radio>
<el-radio style="margin-left: -10px;" label="2">根据时长(分钟)</el-radio>
</el-radio-group>
</div>
<div class="qudao_k_input">
<el-input v-if="CountType==1" style="width: 220px;" @input="MaxCountChange" type="number"
v-model="PlanInfo.max_total" :min="0" placeholder="0"
oninput="value=value.replace(/[^0-9]/g, '')" />
<el-input v-if="CountType==2" style="width: 220px;" @input="TimeLongChange" type="number"
v-model="PlanInfo.time_long" :min="1" placeholder="0"
oninput="value=value.replace(/^0|[^0-9]/g, '')" />
</div>
<div style="font-size: 12px;color: #999">设置渠道比例可自动分配</div>
</div>
<div>
<div class="qudao_k" v-for="(item,index) in PlanInfo.qudao_total" :key="index">
<div style="width: 50px">{{ item.name }}</div>
<div class="qudao_k_input" style="display: flex;">
<el-input type="number" v-model="PlanInfo.qudao_total[index].count" :min="0"
placeholder="0" oninput="value=value.replace(/[^0-9]/g, '')" />
<div style="margin-left: 4px; color: #ccc;">{{item.ratio}}%</div>
</div>
</div>
</div>
</el-form-item>
@ -224,21 +228,27 @@
<div style="display:flex;">
<div style="width: 70px">开始时间:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.begin_time" placeholder="开始时间" />
<el-input v-model="PlanInfo.begin_time" placeholder="开始时间" disabled />
</div>
</div>
<div style="display:flex;">
<div style="width: 70px">结束时间:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.end_time" placeholder="结束时间" />
<el-input v-model="PlanInfo.end_time" placeholder="结束时间" disabled />
</div>
</div>
</div>
<div style="margin-left: 8px">
<div style="margin-left: 8px">
<div style="display:flex;">
<div style="width: 90px">停止预约时间:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.end_reservation_time" placeholder="停止预约时间" />
<el-input v-model="PlanInfo.end_reservation_time" placeholder="停止预约时间" disabled />
</div>
</div>
<div style="display:flex;">
<div style="width: 90px">可用时间长度:</div>
<div class="qudao_k_input">
<el-input v-model="PlanInfo.time_unit" placeholder="可用时间长度" disabled />
</div>
</div>
</div>
@ -346,16 +356,17 @@
<el-form-item label="星期:">
{{ ZhanWeiInfo.weekname }}
</el-form-item>
<el-form-item label="号源占位:">
<el-form-item label="渠道占位:">
<div style="display: flex; flex-direction: column; gap: 10px; width: 100%;">
<template v-if="ZhanWeiInfo.qudao_total && ZhanWeiInfo.qudao_total.length > 0">
<template v-for="(item,index) in ZhanWeiInfo.qudao_total" :key="index">
<div v-if="visibleZhanWeiChannelIds.has(item.appointment_type_id || item.id)"
<div v-if="item && !(item.count===0)"
style="display: flex; align-items: center; gap: 10px;">
<div v-if="visibleZhanWeiChannelIds.size > 1" style="width: 80px;">{{ item.name }}</div>
<el-input type="number" v-model="ZhanWeiInfo.qudao_total[index].locked_count" placeholder="占位数量" min="0"
style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')" />
<div style="width: 80px;">{{ item.name }}</div>
<div style="flex: 1;">
<el-input type="number" v-model="ZhanWeiInfo.qudao_total[index].locked_count" placeholder="占位数量" min="0"
oninput="value=value.replace(/[^0-9]/g,'')" />
</div>
<div style="color: #999; font-size: 12px;">
可用: {{ item.count }}
</div>
@ -383,35 +394,22 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源数量:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchChannels" :key="ci">
<div v-if="visibleBatchChannelIds.has(ch.id || ch.appointment_type_id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')" />
</div>
</template>
</div>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">数量</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchForm[ci].count" placeholder="数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')" />
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">数量: {{ batchTotalCount }}</el-col>
</el-row>
</el-form>
<div v-if="batchSameTimeSlot" style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee;">
<div style="margin-bottom: 8px; font-weight: 600; color: #333; font-size: 13px;">时间段设置</div>
<div style="display: flex; gap: 12px; flex-wrap: wrap;">
<div style="display: flex; align-items: center;">
<div style="width: 70px">开始时间:</div>
<el-input v-model="batchTimeInfo.begin_time" placeholder="开始时间" style="width: 120px;" />
</div>
<div style="display: flex; align-items: center;">
<div style="width: 70px">结束时间:</div>
<el-input v-model="batchTimeInfo.end_time" placeholder="结束时间" style="width: 120px;" />
</div>
<div style="display: flex; align-items: center;">
<div style="width: 90px">停止预约时间:</div>
<el-input v-model="batchTimeInfo.end_reservation_time" placeholder="停止预约时间" style="width: 120px;" />
</div>
</div>
</div>
<div style="margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee;">
<div style="margin-bottom: 8px; font-weight: 600; color: #333; font-size: 13px;">病人类型</div>
<el-checkbox-group v-model="batchPatientType">
@ -432,21 +430,28 @@
<div>
<div style="margin-bottom: 16px; color: #666;">已选 {{ selectedPlanArr.length }} 条号源明细</div>
<el-form label-width="100px">
<el-form-item label="号源占位:">
<div style="display: flex; flex-direction: column; gap: 10px;">
<template v-for="(ch, ci) in batchOccupyChannels" :key="ci">
<div v-if="visibleBatchOccupyChannelIds.has(ch.id)" style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
<span v-if="visibleBatchOccupyChannelIds.size > 1" style="width: 60px; color: #666;">{{ ch.name }}</span>
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default" style="width: 220px;"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
<span style="color: #999; font-size: 12px;">
最大可占: {{ batchOccupyLimits[ch.id]?.maxValue }}
</span>
</div>
</template>
</div>
</el-form-item>
<el-row :gutter="10" style="margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px;">
<el-col :span="6">渠道名称</el-col>
<el-col :span="8">占用数量</el-col>
<el-col :span="8">提示</el-col>
</el-row>
<el-row v-for="(ch, ci) in batchOccupyChannels" :key="ci" :gutter="10" style="margin-bottom: 10px;">
<el-col :span="6" style="line-height: 32px;">{{ ch.name }}</el-col>
<el-col :span="8">
<el-input v-model.number="batchOccupyForm[ci].locked_count" placeholder="占用数量" size="default"
oninput="value=value.replace(/[^0-9]/g,'')"
@input="onOccupyInput(ci, $event)" />
</el-col>
<el-col :span="8" style="line-height: 32px; font-size: 12px; color: #999;">
<template v-if="batchOccupyLimits[ch.id]?.maxValue !== null">
最大可占: {{ batchOccupyLimits[ch.id].maxValue }}
</template>
</el-col>
</el-row>
<el-row :gutter="10" style="border-top: 1px solid #eee; padding-top: 10px;">
<el-col :span="6" style="line-height: 32px; font-weight: 600;">合计</el-col>
<el-col :span="8" style="line-height: 32px; font-weight: 600;">占用: {{ batchOccupyTotalLocked }}</el-col>
</el-row>
</el-form>
</div>
<template #footer>
@ -489,6 +494,7 @@
ElMessageBox
} from 'element-plus'
let CountType = ref("1"); //
let loading = ref(false)
let currentPage = ref(1) //
let pageSize = ref(15) //
@ -660,12 +666,10 @@
let batchModifyRunning = ref(false)
let batchChannels = ref([])
let batchForm = ref([])
let visibleBatchChannelIds = ref(new Set())
let visibleZhanWeiChannelIds = ref(new Set())
let visibleBatchOccupyChannelIds = ref(new Set())
let batchSameTimeSlot = ref(false)
let batchTimeInfo = ref({ begin_time: '', end_time: '', end_reservation_time: '' })
let batchPatientType = ref([])
const batchTotalCount = computed(() => {
return batchForm.value.reduce((s, item) => s + (Number(item.count) || 0), 0)
})
//
let BatchOccupyDialogVisible = ref(false)
let batchOccupyRunning = ref(false)
@ -773,11 +777,10 @@
})
}
channelMap.get(ci.appointment_type_id).counts.push(ci.count)
channelMap.get(ci.appointment_type_id).locked_counts.push(Number(ci.locked_count) || 0)
})
//
if (cell.patient_type) {
patientTypeSets.push(new Set(cell.patient_type.split(',').filter(v => v !== '')))
patientTypeSets.push(new Set(cell.patient_type))
}
}
}
@ -793,19 +796,6 @@
count: allSame ? info.counts[0] : ''
})
}
// id=1 count>0
visibleBatchChannelIds.value = new Set(
batchForm.value
.filter((item, ci) => {
const ch = batchChannels.value[ci]
const chId = ch.id || ch.appointment_type_id
return chId === 1 || Number(item.count) > 0
})
.map((item, ci) => {
const ch = batchChannels.value[ci]
return ch.id || ch.appointment_type_id
})
)
//
if (patientTypeSets.length > 0) {
const commonTypes = patientTypeSets.reduce((acc, set) => {
@ -821,51 +811,6 @@
}
batchModifyRunning.value = false
BatchModifyDialogVisible.value = true
//
const selectedCells = []
planTableData.value.forEach(row => {
for (const key in row) {
if (key === 'time_range') continue
const cell = row[key]
if (cell && cell.id && selectedIds.has(cell.id)) {
selectedCells.push(cell)
}
}
})
if (selectedCells.length > 0) {
const firstBegin = selectedCells[0].begin_time
const firstEnd = selectedCells[0].end_time
const allSameTime = selectedCells.every(c => c.begin_time === firstBegin && c.end_time === firstEnd)
batchSameTimeSlot.value = allSameTime
if (allSameTime) {
//
const deadlineCount = {}
selectedCells.forEach(c => {
const v = c.end_reservation_time
if (v !== null && v !== undefined) {
deadlineCount[v] = (deadlineCount[v] || 0) + 1
}
})
let bestDeadline = firstBegin ? selectedCells[0].end_reservation_time : ''
let maxFreq = 0
for (const [v, freq] of Object.entries(deadlineCount)) {
if (freq > maxFreq) {
maxFreq = freq
bestDeadline = v
}
}
batchTimeInfo.value = {
begin_time: firstBegin,
end_time: firstEnd,
end_reservation_time: bestDeadline
}
} else {
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
} else {
batchSameTimeSlot.value = false
batchTimeInfo.value = { begin_time: '', end_time: '', end_reservation_time: '' }
}
}
const execBatchModify = async () => {
//
@ -875,26 +820,20 @@
return
}
}
const maxTotal = batchForm.value.reduce((s, item) => s + (Number(item.count) || 0), 0)
const maxTotal = batchTotalCount.value
batchModifyRunning.value = true
const ids = [...selectedPlanArr.value]
const coutsInfo = batchForm.value.map(item => ({
appointment_type_id: item.appointment_type_id,
count: Number(item.count) || 0
}))
const batchParams = {
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
patientType: batchPatientType.value
}
if (batchSameTimeSlot.value) {
batchParams.begin_time = batchTimeInfo.value.begin_time
batchParams.end_time = batchTimeInfo.value.end_time
batchParams.end_reservation_time = batchTimeInfo.value.end_reservation_time
}
try {
const res = await PlanModelBatchChangeAdmin(batchParams)
const res = await PlanModelBatchChangeAdmin({
ids: ids,
max_total: maxTotal,
coutsInfo: coutsInfo,
patientType: batchPatientType.value
})
batchModifyRunning.value = false
if (res && res.status) {
BatchModifyDialogVisible.value = false
@ -1009,13 +948,9 @@
row[xingqi.label] = {
countsInfo: matchingPlan.countsInfo,
patient_type_label: matchingPlan.patient_type_label,
patient_type: matchingPlan.patient_type,
status: matchingPlan.status,
id: matchingPlan.id,
resources_id: matchingPlan.resources_id,
begin_time: matchingPlan.begin_time,
end_time: matchingPlan.end_time,
end_reservation_time: matchingPlan.end_reservation_time
resources_id:matchingPlan.resources_id
};
}else{
@ -1074,6 +1009,7 @@
begin_time: '',
end_time: '',
end_reservation_time: '',
time_unit: 0, //
resources_id: null,
devices: [],
patientType: [],
@ -1081,7 +1017,6 @@
}
}
let PlanInfo = ref(DataDefault())
let visibleChannelIds = ref(new Set())
let selectedResourceTimeMode = ref(0) // 0-1-
const Add = (row = null) => {
@ -1127,12 +1062,15 @@
GetList()
}
const Save = () => {
// max_total count
//
let tempCount = 0
PlanInfo.value.qudao_total.forEach((item) => {
tempCount = tempCount + Number(item.count)
})
PlanInfo.value.max_total = tempCount
if (tempCount !== Number(PlanInfo.value.max_total)) {
ElMessage.error('各个渠道数量之和与当日总量不符')
return false
}
ElMessageBox.confirm(
'确定保存吗?',
@ -1224,12 +1162,10 @@
if (!channelMap.has(ci.appointment_type_id)) {
channelMap.set(ci.appointment_type_id, {
name: ci.name,
counts: [],
locked_counts: []
counts: []
})
}
channelMap.get(ci.appointment_type_id).counts.push(ci.count)
channelMap.get(ci.appointment_type_id).locked_counts.push(Number(ci.locked_count) || 0)
})
}
}
@ -1244,22 +1180,6 @@
}
batchOccupyLimits.value = limits
initBatchOccupyForm()
// id=1 maxValue>0
visibleBatchOccupyChannelIds.value = new Set(
batchOccupyChannels.value
.filter(ch => {
if (ch.id === 1) return true
if (batchOccupyLimits.value[ch.id]?.maxValue > 0) return true
//
const ci = batchOccupyChannels.value.findIndex(c => c.id === ch.id)
if (ci >= 0) {
const maxLocked = Math.max(...channelMap.get(ch.id)?.locked_counts || [0])
if (maxLocked > 0) return true
}
return false
})
.map(ch => ch.id)
)
batchOccupyRunning.value = false
BatchOccupyDialogVisible.value = true
}
@ -1342,12 +1262,7 @@
PlanInfo.value.qudao_total.forEach((v, i) => {
PlanInfo.value.qudao_total[i].count = 0
})
//
visibleChannelIds.value = new Set(
PlanInfo.value.qudao_total
.filter(item => item.id === 1 || item.appointment_type_id === 1)
.map(item => item.id || item.appointment_type_id)
)
// console.log(PlanInfo.value)
} else {
ElMessage.error(res.msg)
}
@ -1453,12 +1368,6 @@
PlanInfo.value.max_total = res.data.qudao_total[0].max_total
PlanInfo.value.xingqi = [res.data.weekname]
PlanInfo.value.devices = res.data.devices
// id=1 count>0
visibleChannelIds.value = new Set(
PlanInfo.value.qudao_total
.filter(item => item.id === 1 || item.appointment_type_id === 1 || Number(item.count) > 0)
.map(item => item.id || item.appointment_type_id)
)
//
const selectedResource = enableResourceList.value.find(r => r.id === PlanInfo.value.resources_id);
selectedResourceTimeMode.value = selectedResource ? (selectedResource.time_mode || 0) : 0;
@ -1564,6 +1473,15 @@
}
}
//
const CountTypeChange = (e) => {
CountType.value = e
MaxCountChange(0)
TimeLongChange(0)
if (e == 2) {
}
}
const handleSelectionChange = (e) => {
selectedPlanArr.value=[]
e.forEach((v,i)=>{
@ -1573,6 +1491,42 @@
console.log(selectedPlanArr.value)
}
//
const TimeLongChange = (timelong) => {
if (CountType.value == 2) { //
if (PlanInfo.value.begin_time == '' || PlanInfo.value.end_time == '') {
ElMessage.error("请先设置时段")
PlanInfo.value.max_total = 0
return false
}
ComPuteCountByTime(timelong)
}
}
//
const ComPuteCountByTime = (timelong) => {
let count = calculateTimeSegments(PlanInfo.value.begin_time, PlanInfo.value.end_time, timelong)
PlanInfo.value.max_total = count
MaxCountChange(count)
}
//
function calculateTimeSegments(startTime, endTime, span) {
//
function timeToMinutes(timeStr) {
const [hours, minutes] = timeStr.split(':').map(Number);
return hours * 60 + minutes;
}
const startMinutes = timeToMinutes(startTime);
const endMinutes = timeToMinutes(endTime);
//
const totalMinutes = endMinutes - startMinutes;
//
const segments = Math.floor(totalMinutes / span);
return segments;
}
//
const getTotalLocked = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return 0
@ -1580,11 +1534,6 @@
return total + (Number(item.locked_count) || 0)
}, 0)
}
//
const hasOtherChannelCount = (countsInfo) => {
if (!countsInfo || !Array.isArray(countsInfo)) return false
return countsInfo.some(ci => ci.appointment_type_id !== 1 && Number(ci.count) > 0)
}
// -
const OpenZhanWeiDialog = (row) => {
ZhanWeiDialogVisible.value = true
@ -1608,12 +1557,6 @@
item.locked_count = 0
}
})
// id=1 count>0
visibleZhanWeiChannelIds.value = new Set(
ZhanWeiInfo.value.qudao_total
.filter(item => item.appointment_type_id === 1 || item.id === 1 || Number(item.count) > 0)
.map(item => item.appointment_type_id || item.id)
)
}
} else {
ElMessage.error(res.msg)
@ -1797,31 +1740,6 @@
margin-left: 6px;
}
.card_total {
display: inline-block;
background: #409eff;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
.card_locked {
display: inline-block;
background: #e6a23c;
color: #fff;
font-size: 16px;
font-weight: 700;
padding: 2px 10px;
border-radius: 4px;
}
&.qudao_count_row_simple {
justify-content: center;
gap: 12px;
}
.qudao_title_zong {
font-weight: 700;

@ -30,7 +30,6 @@
<el-option label="已预约" value="1" />
<el-option label="已报道" value="2" />
<el-option label="已结束" value="3" />
<el-option label="医嘱作废" value="nullify" />
</el-select>
</el-form-item>
@ -103,28 +102,25 @@
</div>
<el-table :data="tableData" id="tablelist" style="width: 100%;" row-key="id" v-loading="loading" ref="tableref"
@select="handleSelect" @sort-change="onSortChange">
<el-table-column type="selection" width="50" fixed="left" :selectable="checkSelectable">
<el-table-column type="selection" width="50" fixed="left">
<template #header><span></span></template>
</el-table-column>
<el-table-column prop="list_status" label="状态" width="80" sortable="custom">
<template #default="scope">
<el-tag v-if="scope.row.is_nullify===1" class="ml-2" type="danger"></el-tag>
<template v-else>
<el-tag v-if="scope.row.list_status===0" class="ml-2" type="info"></el-tag>
<el-tag v-if="scope.row.list_status===1" class="ml-2" type="success"></el-tag>
<el-tag v-if="scope.row.list_status===2" class="ml-2"></el-tag>
<el-tag v-if="scope.row.list_status===3" class="ml-2" type="warning"></el-tag>
</template>
<el-tag v-if="scope.row.list_status===0" class="ml-2" type="info"></el-tag>
<el-tag v-if="scope.row.list_status===1" class="ml-2" type="success"></el-tag>
<el-tag v-if="scope.row.list_status===2" class="ml-2"></el-tag>
<el-tag v-if="scope.row.list_status===3" class="ml-2" type="warning"></el-tag>
</template>
</el-table-column>
<el-table-column prop="reg_num" label="门诊号" width="120" sortable="custom">
<template #default="scope">
{{ Number(scope.row.patient_type) !== 0 ? scope.row.reg_num : '' }}
<span v-if="scope.row.patient_type != 0">{{ scope.row.reg_num }}</span>
</template>
</el-table-column>
<el-table-column prop="episodeid" label="住院号" width="120" sortable="custom">
<template #default="scope">
{{ Number(scope.row.patient_type) === 0 ? scope.row.episodeid?.slice(-10) : '' }}
<span v-if="scope.row.patient_type == 0">{{ scope.row.episodeid?.slice(-10) }}</span>
</template>
</el-table-column>
<el-table-column prop="user_name" label="姓名" width="100" sortable="custom" />
@ -150,12 +146,12 @@
<span v-if="scope.row.is_pay==0"></span>
</template>
</el-table-column>
<el-table-column prop="reservation_date" label="预约日期" width="120" sortable="custom">
<el-table-column prop="reservation_time" label="预约日期" width="120" sortable="custom">
<template #default="scope">
{{ scope.row.reservation_date }}
</template>
</el-table-column>
<el-table-column prop="reservation_time" label="预约时间" width="120" sortable="custom">
<el-table-column prop="check_begin_time" label="预约时间" width="120">
<template #default="scope">
<span
v-if="scope.row.period_begin_time && scope.row.period_end_time ">{{scope.row.period_begin_time.substring(0, 5)}}~{{scope.row.period_end_time.substring(0, 5)}}</span>
@ -171,10 +167,10 @@
<el-table-column prop="docotr" label="申请医生" width="80" />
<el-table-column prop="patient_type" label="病人类型" width="80">
<template #default="scope">
<span v-if="Number(scope.row.patient_type)===0"></span>
<span v-if="Number(scope.row.patient_type)===1"></span>
<span v-if="Number(scope.row.patient_type)===2"></span>
<span v-if="Number(scope.row.patient_type)===3"></span>
<span v-if="scope.row.patient_type==0"></span>
<span v-if="scope.row.patient_type==1"></span>
<span v-if="scope.row.patient_type==2"></span>
<span v-if="scope.row.patient_type==3"></span>
</template>
</el-table-column>
<el-table-column prop="user_phone" label="电话" width="120" sortable="custom" />
@ -269,12 +265,12 @@
</el-table-column>
<el-table-column label="门诊号" width="120">
<template #default="scope">
{{ Number(scope.row.patient_type) !== 0 ? scope.row.reg_num : '' }}
<span v-if="scope.row.patient_type != 0">{{ scope.row.reg_num }}</span>
</template>
</el-table-column>
<el-table-column label="住院号" width="120">
<template #default="scope">
{{ Number(scope.row.patient_type) === 0 ? scope.row.episodeid?.slice(-10) : '' }}
<span v-if="scope.row.patient_type == 0">{{ scope.row.episodeid?.slice(-10) }}</span>
</template>
</el-table-column>
<el-table-column prop="user_name" label="姓名" />
@ -312,10 +308,10 @@
<el-table-column prop="docotr" label="申请医生" width="80" />
<el-table-column prop="patient_type" label="病人类型" width="80">
<template #default="scope">
<span v-if="Number(scope.row.patient_type)===0"></span>
<span v-if="Number(scope.row.patient_type)===1"></span>
<span v-if="Number(scope.row.patient_type)===2"></span>
<span v-if="Number(scope.row.patient_type)===3"></span>
<span v-if="scope.row.patient_type==0"></span>
<span v-if="scope.row.patient_type==1"></span>
<span v-if="scope.row.patient_type==2"></span>
<span v-if="scope.row.patient_type==3"></span>
</template>
</el-table-column>
<el-table-column prop="user_phone" label="电话" width="120" />
@ -419,14 +415,6 @@
const onSortChange = ({ prop, order }) => {
searchInfo.value.orderField = prop || ''
searchInfo.value.orderDirection = order || ''
// /
if (order) {
if (prop === 'reg_num') {
searchInfo.value.patient_type = "1"
} else if (prop === 'episodeid') {
searchInfo.value.patient_type = "0"
}
}
GetList()
}
const printTable = () => {
@ -471,9 +459,6 @@
GetList()
}
let tableSelected = ref([])
const checkSelectable = (row) => {
return row.is_nullify !== 1
}
const handleSelect = (e) => {
if (e.length > 1) {
const firstStatus = e[0].list_status;

@ -1,91 +0,0 @@
<template>
<div>
<el-table :data="tableData" style="width: 100%;" row-key="id" :row-style="{ 'height': '60px' }"
v-loading="loading">
<el-table-column prop="department_name" label="科室名称" />
<el-table-column prop="department_number" label="科室编号" />
<el-table-column label="状态" width="120">
<template #default="scope">
<el-switch v-model="scope.row.department_status" :active-value="1" :inactive-value="0"
active-text="正常" inactive-text="关闭" inline-prompt
:loading="scope.row._saving"
@change="handleSave(scope.row, 'department_status')" />
</template>
</el-table-column>
<el-table-column label="参与预约" width="120">
<template #default="scope">
<el-switch v-model="scope.row.appointment_enabled" :active-value="1" :inactive-value="0"
active-text="是" inactive-text="否" inline-prompt
:loading="scope.row._saving"
@change="handleSave(scope.row, 'appointment_enabled')" />
</template>
</el-table-column>
</el-table>
<el-empty v-if="!loading && tableData.length === 0" description="当前科室下暂无子科室" />
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import { GetSubDepartmentList, SaveSubDepartment } from '@/api/api.js'
let loading = ref(false)
let tableData = ref([])
//
const getList = () => {
loading.value = true
GetSubDepartmentList().then(res => {
loading.value = false
if (res.status) {
tableData.value = (res.data.list || []).map(item => ({
...item,
_saving: false
}))
} else {
ElMessage.error(res.msg)
}
}).catch(() => {
loading.value = false
})
}
// switch
// field
const handleSave = (row, field) => {
row._saving = true
SaveSubDepartment({
info: {
id: row.id,
department_status: row.department_status,
appointment_enabled: row.appointment_enabled
}
}).then(res => {
row._saving = false
if (res.status) {
ElMessage.success('保存成功')
} else {
//
rollback(row, field)
ElMessage.error(res.msg || '保存失败')
}
}).catch(() => {
row._saving = false
rollback(row, field)
ElMessage.error('网络异常,保存失败')
})
}
//
const rollback = (row, field) => {
row[field] = row[field] === 1 ? 0 : 1
}
onMounted(() => {
getList()
})
</script>
<style scoped>
</style>
Loading…
Cancel
Save