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);
}
//同步检查项目分类

@ -79,8 +79,6 @@ 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) {
@ -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();

@ -214,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);
}
//最优时间/单天全检 分配
@ -231,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);
}
//获取最近可用的,计划 日期
@ -247,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 = [];
@ -262,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) {
@ -304,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();
@ -318,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) {
@ -394,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]);
@ -738,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不能为空');
@ -806,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([
@ -1216,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('参数错误');
}
@ -1259,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('批量占位失败');

@ -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,8 +23,6 @@ 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])
@ -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)){
@ -225,7 +217,7 @@ public function GetList(Request $request)
->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.*','s_period.period_begin_time','s_period.period_end_time','s_department_resources.department_resources_name')
->where(['s_list.is_del'=>0]);
->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");
@ -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('此医嘱项目无效,请检查项目设置');
}

@ -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;
@ -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')))));
}
}
}
@ -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')))));
}
}
}

@ -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']??'',

@ -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,95 +168,30 @@ 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)
$updated = DB::table('s_check_item')
->whereIn('id', $item_ids)
->where('is_del', 0)
->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) . '条');
}
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);
return \Yz::Return(true, '批量更新成功,共更新' . $updated . '条');
}
$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
);
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, 'id不能为空');
}
}
//同步检查项目分类(全量,复用 HIS 逻辑)
@ -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)
{

@ -24,7 +24,6 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ
$zhanweiCount=0;//勾选的检查项目共计占多少名额
$shareSlotMaxSeats = 0;//共享号源项目的use_seats最大值
$allItemRules = [];//所有检查项目的TIME_RESTRICTION规则
$itemMainData = [];//存储项目主表数据,用于后续按排班科室重算覆盖值
foreach ($entrustids as $key => $entrustid) {
// $info = DB::table('s_list')->where(['reg_num' => $regnum, 'entrust_id' => $entrustid, 'episodeid' => $episodeid, 'is_nullify' => 0])->first();
$info = DB::table('s_list')->where(['entrust_id' => $entrustid, 'is_nullify' => 0])->first();
@ -34,24 +33,9 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ
$allEmergency = false;
}
$itemInfo = DB::table('s_check_item')
->leftJoin('s_dept_check_item', function($j) use ($userDeptId) {
$j->on('s_dept_check_item.check_item_id', '=', 's_check_item.id')
->where('s_dept_check_item.department_id', '=', $userDeptId);
})
->where(['s_check_item.item_name' => $info->entrust, 's_check_item.status' => 1, 's_check_item.is_del' => 0])
->select('s_check_item.*',
DB::raw('COALESCE(s_dept_check_item.reservation_method, s_check_item.reservation_method) as reservation_method'))
->get();
$itemInfo = DB::table('s_check_item')->where(['item_name' => $info->entrust, 'status' => 1, "is_del" => 0])->get();
if (count($itemInfo) == 0) return \Yz::echoError1('没有找到可用的检查项目信息');
$itemInfo = $itemInfo[0];
// 存储项目 ID 和主表值,后续按排班科室重新计算覆盖值
$itemMainData[] = [
'id' => $itemInfo->id,
'use_seats' => $itemInfo->use_seats ?? 1,
'is_share_slot' => $itemInfo->is_share_slot ?? 0,
'item_name' => $itemInfo->item_name,
];
if (!empty($itemInfo->is_share_slot)) {
$shareSlotMaxSeats = max($shareSlotMaxSeats, isset($itemInfo->use_seats) ? $itemInfo->use_seats : 0);
} else {
@ -308,47 +292,6 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ
$plan = array_values($mergedPlan);
}
// 按排班资源关联科室,重算号源占位
$deptZhanweiMap = []; // [department_id => ['zhanweiCount' => int, 'newSharedMax' => int]]
$deptIdsInPlan = [];
foreach ($plan as $p) {
if (!empty($p->id) && !empty($p->resource_department_id)) {
$deptIdsInPlan[$p->resource_department_id] = true;
}
}
if (!empty($deptIdsInPlan) && !empty($itemMainData)) {
$itemIds = array_column($itemMainData, 'id');
foreach (array_keys($deptIdsInPlan) as $deptId) {
// 批量查该科室的覆盖值
$deptOverrides = DB::table('s_dept_check_item')
->whereIn('check_item_id', $itemIds)
->where('department_id', $deptId)
->get()
->keyBy('check_item_id');
$calcZhanwei = 0;
$calcSharedMax = 0;
foreach ($itemMainData as $imd) {
$override = $deptOverrides->get($imd['id']);
$useSeats = $override->use_seats ?? $imd['use_seats'];
$isShareSlot = $override->is_share_slot ?? $imd['is_share_slot'];
if (!empty($isShareSlot)) {
$calcSharedMax = max($calcSharedMax, $useSeats);
} else {
$calcZhanwei += $useSeats;
}
}
if ($calcSharedMax > 0) {
$calcZhanwei += $calcSharedMax;
}
$deptZhanweiMap[$deptId] = [
'zhanweiCount' => $calcZhanwei,
'newSharedMax' => $calcSharedMax,
];
}
}
//遍历列表 把超过当前时间的放在后面
// debug: 查看plan中的resources_id
$debugAllRids = [];
@ -371,15 +314,11 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ
if (!empty($regnum)) {
$existingSharedItems = DB::table('s_list')
->join('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->where('s_list.reg_num', $regnum)
->where('s_list.list_status', 1)
->where('s_list.roster_id', '>', 0)
->where(DB::raw('COALESCE(s_dept_check_item.is_share_slot, s_check_item.is_share_slot, 0)'), 1)
->select('s_list.roster_id', DB::raw('COALESCE(s_dept_check_item.use_seats, s_check_item.use_seats, 1) as use_seats'))
->where('s_check_item.is_share_slot', 1)
->select('s_list.roster_id', 's_check_item.use_seats')
->get();
foreach ($existingSharedItems as $esi) {
$pid = $esi->roster_id;
@ -428,10 +367,7 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ
$time = $p->date . ' ' . $p->end_reservation_time;
$remaining = ($p->count ?? 0) - ($p->used_count ?? 0);
$existingMax = $existingSharedAtPlan[$p->id] ?? 0;
$deptData = $deptZhanweiMap[$p->resource_department_id ?? 0] ?? ['zhanweiCount' => $zhanweiCount, 'newSharedMax' => $newSharedMax];
$planZhanwei = $deptData['zhanweiCount'];
$planSharedMax = $deptData['newSharedMax'];
$needed = $planZhanwei - min($planSharedMax, $existingMax);
$needed = $zhanweiCount - min($newSharedMax, $existingMax);
if ($time > $nowtime && $remaining >= $needed) {
$p->plan_enable=true;
$pl1[] = $p;
@ -622,14 +558,8 @@ public function GetOptimalPlan($type, $regnum, $entrustids, $episodeid, $appoint
if (!empty($entrustIds)) {
$itemData = DB::table('s_list')
->join('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->whereIn('s_list.entrust_id', $entrustIds)
->select('s_list.entrust_id',
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.entrust_id', 's_check_item.use_seats', 's_check_item.is_share_slot')
->get();
foreach ($itemData as $row) {
$useSeatsMap[$row->entrust_id] = $row->use_seats;
@ -673,16 +603,12 @@ public function GetOptimalPlan($type, $regnum, $entrustids, $episodeid, $appoint
$existingSharedAtPlan = [];
$existingSharedItems = DB::table('s_list')
->join('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->where('s_list.reg_num', $regnum)
->where('s_list.list_status', 1)
->where('s_list.is_nullify', 0)
->where('s_list.roster_id', '>', 0)
->where(DB::raw('COALESCE(s_dept_check_item.is_share_slot, s_check_item.is_share_slot, 0)'), 1)
->select('s_list.roster_id', DB::raw('COALESCE(s_dept_check_item.use_seats, s_check_item.use_seats, 1) as use_seats'))
->where('s_check_item.is_share_slot', 1)
->select('s_list.roster_id', 's_check_item.use_seats')
->get();
foreach ($existingSharedItems as $esi) {
$pid = $esi->roster_id;
@ -1143,19 +1069,7 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
//判断互斥暂时根据reg_num判断身份
//查询想要预约的项目 其自身code
$deptId = $planInfo->department_id ?? 0;
$item = 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);
})
->where(['s_check_item.item_code' => $mainInfo->entrust_code, 's_check_item.status' => 1, 's_check_item.is_del' => 0])
->select('s_check_item.*',
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'),
DB::raw('COALESCE(s_dept_check_item.check_begin_time, s_check_item.check_begin_time, 0) as check_begin_time'),
DB::raw('COALESCE(s_dept_check_item.limosis, s_check_item.limosis) as limosis'))
->first();
$item = DB::table('s_check_item')->where(['item_code' => $mainInfo->entrust_code, 'status' => 1, 'is_del' => 0])->first();
if (!$item) return \Yz::echoError1('此检查项目不可用');
// 校验检查项目与排班资源的匹配性(通过设备/服务组交集判断)
$itemDeviceIds = DB::table('s_check_item_device')
@ -1304,63 +1218,6 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
$additionalNeeded = 0;
$zhanweiCount = 0;
// === HIS 回写执行科室(事务前,失败阻断预约)===
$writebackResults = $this->preYuYueWriteback($oldMainInfos, $planInfo);
// 全部回写失败 → 直接返回,不进事务
if (empty($writebackResults['success'])) {
return \Yz::Return(false, 'HIS回写执行科室失败无法完成预约', [
'fail_items' => $writebackResults['fail_items'],
]);
}
// 部分回写失败 → 过滤 mainlistids 及关联数据结构
if (!empty($writebackResults['fail'])) {
$successIds = array_keys($writebackResults['success']);
$failIds = array_keys($writebackResults['fail']);
// 过滤 mainlistids
$mainlistids = array_values(array_intersect($mainlistids, $successIds));
// 过滤 oldMainInfos
$oldMainInfos = array_filter($oldMainInfos, function($info) use ($successIds) {
return in_array($info->id, $successIds);
});
// 过滤 itemSeatsData
$itemSeatsData = array_intersect_key($itemSeatsData, array_flip($successIds));
// 重建 huchiList剔除失败项的互斥关系
$huchiList = [];
foreach ($oldMainInfos as $key1 => $value1) {
$cha_hc = DB::table('s_huchi')->where('is_del', 0)
->where(function ($q) use ($value1) {
$q->where(['code1' => $value1->entrust_code])->orWhere('code2', $value1->entrust_code);
})->get();
foreach ($cha_hc as $hc) {
$huchiList[] = [$hc->code1, $hc->code2];
}
}
// 重建共享号源预计算
$shareSlotIds = [];
$shareSlotMax = 0;
foreach ($itemSeatsData as $id => $data) {
if (!empty($data['is_share_slot'])) {
$shareSlotIds[] = $id;
$shareSlotMax = max($shareSlotMax, $data['use_seats']);
}
}
$maxShareSlotId = null;
$maxShareSeats = 0;
foreach ($itemSeatsData as $id => $data) {
if (!empty($data['is_share_slot']) && $data['use_seats'] > $maxShareSeats) {
$maxShareSeats = $data['use_seats'];
$maxShareSlotId = $id;
}
}
}
DB::beginTransaction();
try {
// 改约时提前记录旧排班 ID在 s_list 更新后校正
@ -1403,15 +1260,11 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
if (!empty($shareSlotIds) && $regNum) {
$existingSharedItems = DB::table('s_list')
->join('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->where('s_list.reg_num', $regNum)
->where('s_list.roster_id', $planid)
->where('s_list.list_status', 1)
->where(DB::raw('COALESCE(s_dept_check_item.is_share_slot, s_check_item.is_share_slot, 0)'), 1)
->select(DB::raw('COALESCE(s_dept_check_item.use_seats, s_check_item.use_seats, 1) as use_seats'))
->where('s_check_item.is_share_slot', 1)
->select('s_check_item.use_seats')
->get();
if ($existingSharedItems->isNotEmpty()) {
$existingSharedMax = $existingSharedItems->max('use_seats');
@ -1635,10 +1488,6 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
// 复用correctUsedCount的分组算法按患者分组共享取max非共享累加
$activeItems = DB::table('s_list')
->leftJoin('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->where('s_list.roster_id', $planid)
->whereIn('s_list.list_status', [1, 2, 3])
->where('s_list.is_nullify', 0)
@ -1647,9 +1496,7 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
->when($do_type == 2, function($q) use ($mainlistids) {
$q->whereNotIn('s_list.id', $mainlistids);
})
->select('s_list.*',
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_check_item.use_seats', 's_check_item.is_share_slot')
->get();
$grouped = [];
foreach ($activeItems as $item) {
@ -1772,12 +1619,6 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
'is_emergency' => $is_emergency
];
// 回写成功项追加执行科室字段
if (isset($writebackResults['success'][$id]) && !empty($writebackResults['success'][$id]['newDeptCode'])) {
$u_data['RISRAcceptDeptCode'] = $writebackResults['success'][$id]['newDeptCode'];
$u_data['implement_department'] = $writebackResults['success'][$id]['newDeptName'];
}
Log::info('[YuYueDebug] 保存预约 detail', [
'id' => $id,
'entrust' => $mainInfo->entrust ?? 'unknown',
@ -1815,15 +1656,7 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
'new_status' => 1,
'create_user' => $do_user,
'note' => $note,
'data' => json_encode(array_merge(
$savedDataMap[$oldMainInfo->id] ?? [],
isset($writebackResults['success'][$oldMainInfo->id]) ? [
'old_RISRAcceptDeptCode' => $writebackResults['success'][$oldMainInfo->id]['oldDeptCode'],
'new_RISRAcceptDeptCode' => $writebackResults['success'][$oldMainInfo->id]['newDeptCode'],
'old_implement_department' => $writebackResults['success'][$oldMainInfo->id]['oldDeptName'],
'new_implement_department' => $writebackResults['success'][$oldMainInfo->id]['newDeptName'],
] : []
), JSON_UNESCAPED_UNICODE)
'data' => json_encode($savedDataMap[$oldMainInfo->id] ?? [])
]);
}
@ -1836,14 +1669,21 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
DB::commit();
if(config('app.globals.预约完成短信通知')==1){
$this->SendMsg($oldMainInfos,$do_type);
}
return \Yz::Return(true, '预约成功', [
// HIS 回写通知
try {
$this->notifyHisAfterYuYue($oldMainInfos, $planInfo);
} catch (\Exception $e) {
Log::error('HIS 回写通知异常', [
'planid' => $planid,
'mainlistids' => $mainlistids,
'fail_items' => $writebackResults['fail_items'] ?? [],
'error' => $e->getMessage()
]);
}
if(config('app.globals.预约完成短信通知')==1){
$this->SendMsg($oldMainInfos,$do_type);
}
return \Yz::Return(true, '预约成功', ['planid' => $planid, 'mainlistids' => $mainlistids]);
@ -1851,22 +1691,12 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme
} catch (\Exception $e) {
DB::rollBack();
// 补偿回写:恢复 HIS 侧执行科室为旧值
try {
$this->rollbackHisWriteback($writebackResults);
} catch (\Exception $e2) {
Log::error('补偿回写整体异常', [
'error' => $e2->getMessage(),
]);
}
return \Yz::echoError1('预约异常' . $e->getMessage());
}
}
public function AutoYuYue($regnum,$entrustids,$episodeid,$appointment_type,$department_id = 0)
public function AutoYuYue($regnum,$entrustids,$episodeid,$appointment_type)
{
$dateRange=config('app.globals.可用号源查询范围');
// $regnum = request('regnum');
@ -1885,7 +1715,7 @@ public function AutoYuYue($regnum,$entrustids,$episodeid,$appointment_type,$depa
$enable_plan=false;
while ($currentDate <= $endDate) {
$nowdate = $currentDate->format('Y-m-d');
$s = $this->GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_type, $nowdate, 'all', $department_id);
$s = $this->GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_type, $nowdate);
if ($s['status']) {
$list = $s['data']['plan_list'];
@ -2116,16 +1946,10 @@ public function correctUsedCount($rosterId)
// 获取该排班上所有活跃项目及其配置
$activeItems = DB::table('s_list')
->leftJoin('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->where('s_list.roster_id', $rosterId)
->whereIn('s_list.list_status', [1, 2, 3])
->where('s_list.is_nullify', 0)
->select('s_list.*',
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_check_item.use_seats', 's_check_item.is_share_slot')
->get();
// 计算总占位:按人隔离,共享取 max非共享累加
@ -2233,16 +2057,10 @@ public function calculateUsedCount($rosterId, $correct = 0)
// 获取该排班上所有活跃项目及其配置
$activeItems = DB::table('s_list')
->leftJoin('s_check_item', 's_list.entrust_code', '=', 's_check_item.item_code')
->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');
})
->where('s_list.roster_id', $rosterId)
->whereIn('s_list.list_status', [1, 2, 3])
->where('s_list.is_nullify', 0)
->select('s_list.*',
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_check_item.use_seats', 's_check_item.is_share_slot')
->get();
// 按患者分组计算占位
@ -2400,81 +2218,20 @@ public function calculateUsedCount($rosterId, $correct = 0)
}
/**
* 预约事务前 HIS 回写执行科室
* 逐条调用回写接口,收集成功/失败结果,不更新 s_list事务内统一写入
* 非正式环境默认全部成功
*
* @param array $oldMainInfos 事务前构建的 s_list 行数组
* @param object $planInfo 排班信息
* @return array {success: [id => info], fail: [id => info], fail_items: [[name, reason], ...]}
* 预约完成后通知 HIS 回写执行科室
* 在事务提交后调用,异常不影响主流程
*/
private function preYuYueWriteback($oldMainInfos, $planInfo)
private function notifyHisAfterYuYue($oldMainInfos, $planInfo)
{
$results = [
'success' => [],
'fail' => [],
'fail_items' => [],
];
// 非正式环境逐条随机模拟回写结果80% 概率失败),用于测试失败链路
// 非正式环境跳过回写,全部视为成功
// 仅内网正式环境192.168.80.76)执行 HIS 回写
if (request()->getHost() !== '192.168.80.76') {
// // [测试逻辑] 开发环境随机模拟 HIS 回写结果80% 失败),已注释
// Log::info('HIS 回写:当前环境非正式环境,启动随机模拟', [
// 'host' => request()->getHost()
// ]);
// foreach ($oldMainInfos as $mainInfo) {
// $rand = mt_rand(1, 100);
// if ($rand <= 80) {
// // 模拟回写失败
// Log::info('HIS 回写模拟失败', [
// 'id' => $mainInfo->id,
// 'rand' => $rand,
// ]);
// $results['fail'][$mainInfo->id] = [
// 'name' => $mainInfo->entrust,
// 'reason' => 'HIS回写执行科室失败无法完成预约',
// ];
// $results['fail_items'][] = [
// 'name' => $mainInfo->entrust,
// 'reason' => 'HIS回写执行科室失败无法完成预约',
// ];
// } else {
// // 模拟回写成功
// Log::info('HIS 回写模拟成功', [
// 'id' => $mainInfo->id,
// 'rand' => $rand,
// ]);
// $results['success'][$mainInfo->id] = [
// 'mainInfo' => $mainInfo,
// 'oldDeptCode' => '',
// 'oldDeptName' => '',
// 'newDeptCode' => '',
// 'newDeptName' => '',
// 'body' => null,
// ];
// }
// }
// return $results;
// [正式逻辑] 非正式环境全部视为成功
Log::info('HIS 回写跳过:当前环境非内网正式环境', [
'host' => request()->getHost()
]);
foreach ($oldMainInfos as $mainInfo) {
$results['success'][$mainInfo->id] = [
'mainInfo' => $mainInfo,
'oldDeptCode' => '',
'oldDeptName' => '',
'newDeptCode' => '',
'newDeptName' => '',
'body' => null,
];
}
return $results;
return;
}
// 1. 获取新执行科室
// 1. 获取 execDeptCode / execDeptName本地数据库
$execDeptCode = '';
$execDeptName = '';
$resource = DB::table('s_department_resources')
@ -2494,24 +2251,13 @@ private function preYuYueWriteback($oldMainInfos, $planInfo)
}
if (empty($execDeptCode)) {
Log::warning('HIS 回写跳过:未找到执行科室信息', [
Log::warning('HIS 回写通知跳过:未找到执行科室信息', [
'resources_id' => $planInfo->resources_id
]);
// 没有执行科室信息,全部视为成功(不回写)
foreach ($oldMainInfos as $mainInfo) {
$results['success'][$mainInfo->id] = [
'mainInfo' => $mainInfo,
'oldDeptCode' => $mainInfo->RISRAcceptDeptCode ?? '',
'oldDeptName' => $mainInfo->implement_department ?? '',
'newDeptCode' => $execDeptCode,
'newDeptName' => $execDeptName,
'body' => null,
];
}
return $results;
return;
}
// 2. 按 app_num 分组
// 2. 按 app_num 分组去重
$grouped = [];
foreach ($oldMainInfos as $mainInfo) {
$appNum = $mainInfo->app_num;
@ -2527,18 +2273,8 @@ private function preYuYueWriteback($oldMainInfos, $planInfo)
}
if (empty($grouped)) {
Log::warning('HIS 回写跳过:没有有效的申请单号');
foreach ($oldMainInfos as $mainInfo) {
$results['fail'][$mainInfo->id] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
$results['fail_items'][] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
}
return $results;
Log::warning('HIS 回写通知跳过:没有有效的申请单号');
return;
}
// 3. 遍历每组,调 GetApplyDetail 获取申请单数据(带缓存)
@ -2550,65 +2286,38 @@ private function preYuYueWriteback($oldMainInfos, $planInfo)
} catch (\Exception $e) {
Log::warning('HIS 查询申请单异常', [
'app_num' => $appNum,
'error' => $e->getMessage(),
'error' => $e->getMessage()
]);
foreach ($group['items'] as $mainInfo) {
$results['fail'][$mainInfo->id] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
$results['fail_items'][] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
}
continue;
}
if ($hisRes['code'] != 200 || empty($hisRes['data'])) {
Log::warning('HIS 查询申请单失败', [
'app_num' => $appNum,
'response' => $hisRes,
'response' => $hisRes
]);
foreach ($group['items'] as $mainInfo) {
$results['fail'][$mainInfo->id] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
$results['fail_items'][] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
}
continue;
}
$hisData = $hisRes['data'][0] ?? null;
if (!$hisData) {
Log::warning('HIS 查询返回数据为空', ['app_num' => $appNum]);
foreach ($group['items'] as $mainInfo) {
$results['fail'][$mainInfo->id] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
$results['fail_items'][] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
}
continue;
}
// 4. 提取申请单级数据
// 4. 提取申请单级数据comboNo 从 HIS 返回数据获取最新)
$comboNo = $hisData['requestNo'] ?? '';
// 5. 遍历每条 s_list匹配 entrust_code
// 5. 遍历每条 s_list匹配 entrust_code 获取项目级数据
foreach ($group['items'] as $mainInfo) {
$inpatientNo = $mainInfo->episodeid;
// 住院取 episodeid门诊取 reg_num
$inpatientNo = $mainInfo->patient_type == 0 ? $mainInfo->episodeid : $mainInfo->episodeid;
$entrustCode = $mainInfo->entrust_code;
$moOrder = '';
$hisOrderNo = '';
// 在 itemList 中匹配 termCode == entrust_code
if (!empty($hisData['itemList']) && is_array($hisData['itemList'])) {
foreach ($hisData['itemList'] as $item) {
if (($item['termCode'] ?? '') == $entrustCode) {
@ -2622,16 +2331,8 @@ private function preYuYueWriteback($oldMainInfos, $planInfo)
if (empty($moOrder)) {
Log::warning('HIS 回写:未匹配到 itemList 中的项目', [
'entrust_code' => $entrustCode,
'app_num' => $appNum,
'app_num' => $appNum
]);
$results['fail'][$mainInfo->id] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
$results['fail_items'][] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
continue;
}
@ -2646,93 +2347,47 @@ private function preYuYueWriteback($oldMainInfos, $planInfo)
'itemCode' => $entrustCode,
];
// 记录旧科室
try {
$hisRes = HisController::Post('/roc/api/v1/qhd/common/yjyy/updateExecDept', $body);
if ($hisRes['code'] == 200) {
// 记录变更前的旧值
$oldDeptCode = $mainInfo->RISRAcceptDeptCode ?? '';
$oldDeptName = $mainInfo->implement_department ?? '';
try {
HisController::Post('/roc/api/v1/qhd/common/yjyy/updateExecDept', $body);
// 回写成功,记录完整信息供事务内写入和补偿使用
$results['success'][$mainInfo->id] = [
'mainInfo' => $mainInfo,
'oldDeptCode' => $oldDeptCode,
'oldDeptName' => $oldDeptName,
'newDeptCode' => $execDeptCode,
'newDeptName' => $execDeptName,
'body' => $body,
'visitSqNo' => $visitSqNo,
'appNum' => $appNum,
'patientType' => $group['patient_type'],
];
DB::table('s_list')
->where('id', $mainInfo->id)
->update([
'RISRAcceptDeptCode' => $execDeptCode,
'implement_department' => $execDeptName,
]);
DB::table('s_list_log')->insert([
'list_id' => $mainInfo->id,
'reg_num' => $mainInfo->reg_num,
'old_status' => $mainInfo->list_status,
'new_status' => $mainInfo->list_status,
'create_user' => 'sys_auto',
'note' => 'HIS回写更新执行科室',
'data' => json_encode([
'old_RISRAcceptDeptCode' => $oldDeptCode,
'new_RISRAcceptDeptCode' => $execDeptCode,
'old_implement_department' => $oldDeptName,
'new_implement_department' => $execDeptName,
], JSON_UNESCAPED_UNICODE),
]);
// 同步更新 ROC 缓存为新科室
// 同步更新 ROC 缓存中对应检查项目的执行科室
HisController::UpdateApplyDetailCache(
$visitSqNo, $appNum, $group['patient_type'], '本地',
$entrustCode, $execDeptCode, $execDeptName
);
}
} catch (\Exception $e) {
Log::error('HIS 回写接口请求异常', [
'body' => $body,
'error' => $e->getMessage(),
'error' => $e->getMessage()
]);
$results['fail'][$mainInfo->id] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
$results['fail_items'][] = [
'name' => $mainInfo->entrust,
'reason' => 'HIS回写执行科室失败无法完成预约',
];
}
}
}
return $results;
}
/**
* 补偿回写:事务回滚后恢复 HIS 侧执行科室为旧值
* 仅处理回写成功且新旧科室不一致的项目
*/
private function rollbackHisWriteback($writebackResults)
{
// 非正式环境跳过补偿
if (request()->getHost() !== '192.168.80.76') {
return;
}
foreach ($writebackResults['success'] as $id => $info) {
if (empty($info['body'])) continue;
// 新旧科室一致,无需补偿
if ($info['newDeptCode'] === $info['oldDeptCode']) {
continue;
}
// 复用 body替换为旧科室
$rollbackBody = $info['body'];
$rollbackBody['execDeptCode'] = $info['oldDeptCode'];
$rollbackBody['execDeptName'] = $info['oldDeptName'];
try {
HisController::Post('/roc/api/v1/qhd/common/yjyy/updateExecDept', $rollbackBody);
// 同步更新 ROC 缓存为旧科室
HisController::UpdateApplyDetailCache(
$info['visitSqNo'],
$info['appNum'],
$info['patientType'],
'本地',
$info['body']['itemCode'],
$info['oldDeptCode'],
$info['oldDeptName']
);
} catch (\Exception $e) {
Log::error('补偿回写HIS失败', [
'id' => $id,
'oldDeptCode' => $info['oldDeptCode'],
'error' => $e->getMessage(),
]);
}
}
}

@ -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, '保存成功', []);
}
}

@ -1 +0,0 @@
import{_ as L,Y as N,o as B,r as d,c as E,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 I,j as S,F as j,K as F,bN as G,I as O,E as U,q,g as n,bO as z}from"./index-abda4c73.js";const K={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){N(()=>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 B(()=>{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=E("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",$,[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)]),I((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-abda4c73.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-abda4c73.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};

@ -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,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-abda4c73.js";import{_ as ae}from"./DepartmentResourcesSave-db1cbd62.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};
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 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-abda4c73.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};
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-2dfab310.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-abda4c73.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-abda4c73.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 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,bD as W,E as k,q as r,x as E,N as X,bE as Z,bF as h}from"./index-abda4c73.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):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)})})},T=()=>{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"),z=d("el-select"),y=d("el-button"),A=d("el-row"),v=d("el-table-column"),U=d("el-tag"),G=d("el-table"),L=d("el-pagination"),$=d("el-form"),j=d("el-dialog"),B=K("loading");return V(),O(Q,null,[D("div",ee,[l(A,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(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(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)]]),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: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(()=>[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:T},{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(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"])),[[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,bP as E,I as F,E as N,q as A,g as u,bO as O}from"./index-abda4c73.js";const S={class:"head"},G={key:0,id:"MonthCount",class:"MonthCount"},K={__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=O(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",S,[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",G)):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(K,[["__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}

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

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

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}

File diff suppressed because one or more lines are too long

@ -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,bQ as P,I as S,E as j,q as E,g as d,bO as N}from"./index-abda4c73.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 G,d as p,e as _,k as r,q as x,h as L,i as u,f as v,w as g,b7 as T,E as m,bG as j,F as b,t as V,j as w,g as R}from"./index-abda4c73.js";const A={style:{display:"flex"}},D={style:{width:"750px","margin-right":"40px"}},F={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,T({}).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,j({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=G("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)),L((p(),_("div",A,[r("div",D,[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",F,[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};
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,aT as S,E as r,f as l,g as h,aU as U}from"./index-abda4c73.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"),w=i("el-empty"),V=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"])),[[V,d(o)]]),!d(o)&&d(m).length===0?(u(),g(w,{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-abda4c73.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-47f49744]{display:flex;flex-direction:column;height:100%}.patientInfo[data-v-47f49744]{display:flex;align-items:center;flex-shrink:0}.patientInfo .item[data-v-47f49744]{margin-right:18px}.patientInfo .name[data-v-47f49744]{font-size:20px;font-weight:700}.patientInfo .value[data-v-47f49744]{font-size:18px;font-weight:700}.entrustList[data-v-47f49744]{flex:1;min-height:0;overflow:auto}.entrustList .errMsg[data-v-47f49744]{color:#f27d7d;font-weight:700;opacity:1!important}.planInfo[data-v-47f49744]{max-height:600px;overflow:auto;flex-shrink:0}.planInfo .planTable[data-v-47f49744]{width:100%;background-color:#fff;text-align:center;border:1px solid #f1f1f1;border-collapse:collapse;color:#333}.planInfo .planTable td[data-v-47f49744]{border:1px solid #f1f1f1;padding:6px}.planInfo .table_plan_row td[data-v-47f49744]:first-child{background-color:#f1f1f1;border-bottom:1px solid #e8e8e8}.planInfo .table_plan_row[data-v-47f49744]>:not(:first-child):hover{background-color:#aeebf0;cursor:pointer;color:#fff}.planInfo .planActive[data-v-47f49744]{background-color:#5bc0de;color:#fff}.planInfo .plandisable[data-v-47f49744]{pointer-events:none;opacity:.4}.planInfo .shuxian[data-v-47f49744]{border-left:1px solid #dfdfdf;margin-left:40px;margin-right:40px}.planInfo .do_button_recommend[data-v-47f49744]{width:180px}.planInfo .do_button[data-v-47f49744]{width:100px}.ZhenShiButton[data-v-47f49744]{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-47f49744]{background-color:#5bc0de;color:#fff}[data-v-47f49744] .el-table .disabled-row{background-color:#f2e3e2;opacity:.6}[data-v-47f49744] .el-table .selected-row{background-color:#9cd0de}.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-abda4c73.js"></script>
<script type="module" crossorigin src="./assets/index-87e3e912.js"></script>
<link rel="stylesheet" href="./assets/index-aa10fd41.css">
</head>
<body>

@ -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');//获取可用科室资源

@ -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 = {}) => {

@ -1598,28 +1598,6 @@ let TanChuangMsgDialogVisible=ref(false)
}
}
}, 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,
@ -1637,7 +1615,6 @@ let TanChuangMsgDialogVisible=ref(false)
})
}
}
})
return
}
@ -1661,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) : '')
@ -1671,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)

@ -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',

@ -287,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>
@ -362,16 +352,6 @@
<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-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-form>
</div>
<template #footer>
@ -1021,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,
@ -1045,7 +1024,6 @@
return
}
initBatchOccupyForm()
batchLockedRemark.value = ''
// planTableData count - used_count
const selectedIds = new Set(selectedPlanArr.value)
const channelRemaining = {} // { [appointment_type_id]: number[] }
@ -1100,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) {
@ -1187,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) {

@ -287,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>
@ -362,16 +352,6 @@
<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-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-form>
</div>
<template #footer>
@ -1036,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,
@ -1060,7 +1039,6 @@
return
}
initBatchOccupyForm()
batchLockedRemark.value = ''
// planTableData count - used_count
const selectedIds = new Set(selectedPlanArr.value)
const channelRemaining = {} // { [appointment_type_id]: number[] }
@ -1116,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) {
@ -1203,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) {

@ -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>
</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