diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/AppointmentController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/AppointmentController.php
index 956628d..2040175 100644
--- a/Laravel/app/Http/Controllers/API/Admin/YeWu/AppointmentController.php
+++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/AppointmentController.php
@@ -6,6 +6,8 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\Admin\YeWu\AppointmentService;
use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Storage;
+
class AppointmentController extends Controller
{
//获取预约记录
@@ -100,6 +102,17 @@ class AppointmentController extends Controller
$d=DB::table('appointment_record')->where('id',$id)->update([
'is_del'=>1
]);
+ $list=DB::table('appointment_img')->where(['appointment_record_id'=>$id])->get();
+ if(count($list)>0){
+ foreach ($list as $item){
+ // dd(Storage::disk('public')->exists('H5Upload/20240111/At00DqGsf0qkTXBeV9uhpEgPzhlC0BxI6eAnRudq.png'));
+ $relativePath = ltrim($item->imgurl, '/storage/');
+ if (Storage::disk('public')->exists($relativePath)) {
+ Storage::disk('public')->delete($relativePath);
+ }
+
+ }
+ }
if($d){
return \Yz::Return(true,'操作成功',[]);
}else{
@@ -172,4 +185,11 @@ class AppointmentController extends Controller
->get();
return \Yz::Return(true,'查询成功',['list'=>$list,'dateRange'=>[$searchInfo['start'],$searchInfo['end']]]);
}
+ //查看预约时候的图片列表
+ public function GetPicList()
+ {
+ $yuyue_id=request('yuyue_id');
+ $list=DB::table('appointment_img')->where(['appointment_record_id'=>$yuyue_id])->get();
+ return \Yz::Return(true,'查询完成',['list'=>$list]);
+ }
}
diff --git a/Laravel/routes/api.php b/Laravel/routes/api.php
index 4e12ed8..8c5e40a 100644
--- a/Laravel/routes/api.php
+++ b/Laravel/routes/api.php
@@ -59,6 +59,8 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'v1'],function () {
Route::post('admin/InstitutionGetSetingDetail','App\Http\Controllers\API\Admin\YeWu\InstitutionController@GetSetingDetail');//获取机构设置详情
Route::post('admin/GetConfigs','App\Http\Controllers\API\Admin\YeWu\ConfigsController@GetConfigs');//获取设置
Route::post('admin/SaveConfig','App\Http\Controllers\API\Admin\YeWu\ConfigsController@SaveConfig');//保存设置
+ Route::post('admin/AppointmentGetPicList','App\Http\Controllers\API\Admin\YeWu\AppointmentController@GetPicList'); //获取预约记录图片
+
Route::post('admin/CheckUpCount','App\Http\Controllers\API\Admin\YeWu\HealthCheckupController@CheckUpCount');//体检统计
});
diff --git a/el-admin/src/api/api.js b/el-admin/src/api/api.js
index c9e8100..f5eb89d 100644
--- a/el-admin/src/api/api.js
+++ b/el-admin/src/api/api.js
@@ -167,4 +167,9 @@ export const SaveConfig = (data={}) => {
//体检数量统计
export const CheckUpCount = (data={}) => {
return axios({url:import.meta.env.VITE_APP_API+'v1/admin/CheckUpCount',data:data})
+}
+
+//获取预约记录图片
+export const AppointmentGetPicList = (data={}) => {
+ return axios({url:import.meta.env.VITE_APP_API+'v1/admin/AppointmentGetPicList',data:data})
}
\ No newline at end of file
diff --git a/el-admin/src/views/AppointmentMngr/AppointmentList.vue b/el-admin/src/views/AppointmentMngr/AppointmentList.vue
index d5645b5..70d158a 100644
--- a/el-admin/src/views/AppointmentMngr/AppointmentList.vue
+++ b/el-admin/src/views/AppointmentMngr/AppointmentList.vue
@@ -5,11 +5,12 @@
机构名称
-
+
-
+
时间段
@@ -18,7 +19,7 @@
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-
+
-
+
搜索
-
+
-
+
-
-
-
+
+
+
- {{scope.row.org_name}}
- 暂无
+ {{scope.row.org_name}}
+ 暂无
-
+
-
-
- 健康证
- 老年人
-
+
+
+ 健康证
+ 老年人
+
-
- 免费
- 收费
-
+
+ 免费
+ 收费
+
-
-
- 删除
+
+
+
+ 查看附件
+ 删除
+
+
@@ -75,6 +80,23 @@
:page-sizes="[15, 50, 100, 200]" layout="total,sizes, prev, pager, next" :total="total"
@size-change="PageSizeChange" @current-change="PageCurrentChange" />
+
+
+
+
+
@@ -84,16 +106,21 @@
onMounted
} from 'vue'
import {
- ElMessage,ElMessageBox
+ ElMessage,
+ ElMessageBox
} from 'element-plus'
import {
GetHealthOrganizationEnableList,
- GetAppointmentList,DelAppointment
+ GetAppointmentList,
+ DelAppointment,
+ AppointmentGetPicList
} from '@/api/api.js'
- import { useRoute } from 'vue-router'
+ import {
+ useRoute
+ } from 'vue-router'
const route = useRoute()
- const calendarId = route.query.calendarId //预约的体检日历id
-
+ const calendarId = route.query.calendarId //预约的体检日历id
+ let BaseFileUrl = import.meta.env.VITE_APP_FILE
let loading = ref(false)
let tableData = ref([])
let currentPage = ref(1) //当前页码
@@ -102,9 +129,9 @@
let searchInfo = ref({
dateRange: [],
orgId: '',
- status:'',
- userinfo:'',
- calendarId:calendarId?calendarId:''
+ status: '',
+ userinfo: '',
+ calendarId: calendarId ? calendarId : ''
})
const PageSizeChange = (e) => { // 修改每页数量
pageSize.value = e
@@ -114,23 +141,23 @@
currentPage.value = e
GetList()
}
-
+
//获取列表
- const GetList=()=>{
+ const GetList = () => {
loading.value = true
GetAppointmentList({
- page: currentPage.value,
- pageSize: pageSize.value,
- searchInfo: searchInfo.value,
- }).then(res => {
- loading.value = false
+ page: currentPage.value,
+ pageSize: pageSize.value,
+ searchInfo: searchInfo.value,
+ }).then(res => {
+ loading.value = false
if (res.status) {
- tableData.value = res.data.list
- total = res.data.count
+ tableData.value = res.data.list
+ total = res.data.count
} else {
ElMessage.error(res.msg)
}
-
+
})
}
let org_list = ref([]) //机构列表
@@ -144,10 +171,10 @@
} else {
ElMessage.error(res.msg)
}
-
+
})
}
- const del=(id)=>{
+ const del = (id) => {
ElMessageBox.confirm('确认删除此记录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -155,23 +182,47 @@
})
.then(() => {
loading.value = true
- DelAppointment({id:id}).then(res => {
+ DelAppointment({
+ id: id
+ }).then(res => {
loading.value = false
if (res.status) {
- GetList()
+ GetList()
} else {
ElMessage.error(res.msg)
}
-
+
})
})
-
+
+ }
+ let dialogVisible = ref(false);
+ let pic_list = ref([]);
+ let picSrcList=ref([]);
+ const ShowPic = (row) => {
+ dialogVisible.value = true
+ loading.value = true
+ AppointmentGetPicList({
+ yuyue_id: row.id
+ }).then(res => {
+ loading.value = false
+ if (res.status) {
+ pic_list.value = res.data.list
+ pic_list.value.forEach((v,i)=>{
+ picSrcList.value.push(BaseFileUrl+v.imgurl)
+ })
+
+ } else {
+ ElMessage.error(res.msg)
+ }
+
+ })
}
- let userinfo=ref('');
+ let userinfo = ref('');
onMounted(() => {
getHealthOrganizationEnableList()
GetList()
- userinfo.value=JSON.parse(sessionStorage.getItem('userinfo'))
+ userinfo.value = JSON.parse(sessionStorage.getItem('userinfo'))
console.log(userinfo.value);
})