修改管理员删除修改日历

main
鹿和sa0ChunLuyu 2 years ago
parent 473921b438
commit c7413a48ad

@ -202,7 +202,11 @@ class AppointmentController extends Controller
if (count($appointments_to_delete)) {
return Yo::error_echo(200023);
}
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['del' => 1]);
if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['del' => 1]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['del' => 1]);
}
return Yo::delete_echo($ids);
}
@ -211,7 +215,11 @@ class AppointmentController extends Controller
Login::admin([], [15, 27]);
$ids = $request->post('ids');
$status = $request->post('status');
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['status' => $status]);
if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['status' => $status]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['status' => $status]);
}
return Yo::update_echo($ids);
}
@ -220,7 +228,11 @@ class AppointmentController extends Controller
Login::admin([], [15, 27]);
$ids = $request->post('ids');
$count = $request->post('count');
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['max_count' => $count]);
if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['max_count' => $count]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['max_count' => $count]);
}
return Yo::update_echo($ids);
}

@ -67,7 +67,7 @@
<view class="top_line_wrapper"></view>
<view class="posts_wrapper">
<view @click="postClick(i)" class="post_item_wrapper" v-for="(i,k) in post_list">
<view class="post_title_wrapper">{{ i.title }}{{ i.title }}{{ i.title }}{{ i.title }}{{ i.title }}{{ i.title }}
<view class="post_title_wrapper">{{ i.title }}
</view>
<view v-if="Number($props.type) === 1" class="post_content_wrapper">
<view class="post_cover_wrapper">

Loading…
Cancel
Save