查看pdf ,调整推送列表按机构搜索

main
yanzai 4 months ago
parent 40dee12149
commit 4a1c196225

@ -21,18 +21,37 @@ class PingTaiPushController extends Controller
]; ];
} }
$list = DB::table('health_certificate_push'); $list = DB::table('health_certificate_push');
if (isset($searchInfo['dateRange'])) { if (isset($searchInfo['dateRange']) && count($searchInfo['dateRange'])==2) {
$list = $list->whereBetween('created_at', $searchInfo['dateRange']); $list = $list->whereBetween('created_at', $searchInfo['dateRange']);
} else { } else {
$list = $list->whereBetween('created_at', [date('Y-m-d'), date('Y-m-d')]); $list = $list->whereBetween('created_at', [date('Y-m-d'), date('Y-m-d')]);
} }
if (isset($searchInfo['orgname'])) { if (isset($searchInfo['orgname'])) {
$list = $list->where('hospitalName', 'like', '%' . $searchInfo['orgname'] . '%'); $list = $list->where('hospitalName', 'like', '%' . $searchInfo['orgname'] . '%');
} }
if (isset($searchInfo['hospitalCode'])) {
$list = $list->where('hospitalCode', $searchInfo['hospitalCode']);
}
$count = $list->count(); $count = $list->count();
$list = $list->orderBy('created_at', 'desc')->skip(($page-1)*$pageSize)->take($pageSize)->get(); $list = $list->orderBy('created_at', 'desc')->skip(($page-1)*$pageSize)->take($pageSize)->get();
foreach ($list as $k => $v) {
$list[$k]->pdf_url=null;
$pdf=DB::table('health_certificate_push_pdf')->where([ 'hospitalCode' => $v->hospitalCode,'healthExaminationId' => $v->healthExaminationId])->first();
if(!!$pdf){
$list[$k]->pdf_url=$pdf->pdf_url;
}
}
return \Yz::Return(true, "查询完成", ['list' => $list,'count'=>$count]); return \Yz::Return(true, "查询完成", ['list' => $list,'count'=>$count]);
} }
public function GetPingTaiOrgList()
{
$list = DB::table('health_certificate_push')->select('hospitalCode','hospitalName')->groupBy('hospitalCode','hospitalName')->get();
return \Yz::Return(true, "查询完成", ['list' => $list]);
}
public function GetDetail() public function GetDetail()
{ {
$id = request('id'); $id = request('id');

@ -68,6 +68,7 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'v1'],function () {
Route::post('admin/PingTaiPushCountByOrg','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@CountByOrg'); Route::post('admin/PingTaiPushCountByOrg','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@CountByOrg');
Route::post('admin/PingTaiPushCountByMonth','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@CountByMonth'); Route::post('admin/PingTaiPushCountByMonth','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@CountByMonth');
Route::post('admin/PingTaiPushGetDetail','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@GetDetail'); Route::post('admin/PingTaiPushGetDetail','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@GetDetail');
Route::post('admin/GetPingTaiOrgList','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@GetPingTaiOrgList');
}); });

@ -1,6 +1,6 @@
ENV = 'production' ENV = 'production'
VITE_APP_API = 'http://192.168.50.123:33583/common/la/public/api/' VITE_APP_API_66666666 = 'http://192.168.50.123:33583/common/la/public/api/'
VITE_APP_FILE = 'http://192.168.50.123:33583/common/la/public' VITE_APP_FILE_66666666 = 'http://192.168.50.123:33583/common/la/public'
VITE_APP_API_66666666 = 'http://172.31.68.39:33583/common/la/public/api/' VITE_APP_API = 'http://172.31.68.39:33583/common/la/public/api/'
VITE_APP_FILE_66666666 = 'http://172.31.68.39:33583/common/la/public' VITE_APP_FILE = 'http://172.31.68.39:33583/common/la/public'

@ -186,4 +186,7 @@ export const PingTaiPushCountByMonth = (data={}) => {
} }
export const PingTaiPushGetDetail = (data={}) => { export const PingTaiPushGetDetail = (data={}) => {
return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PingTaiPushGetDetail',data:data}) return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PingTaiPushGetDetail',data:data})
}
export const GetPingTaiOrgList = (data={}) => {
return axios({url:import.meta.env.VITE_APP_API+'v1/admin/GetPingTaiOrgList',data:data})
} }

@ -2,11 +2,11 @@
<div> <div>
<div class="head"> <div class="head">
<el-row> <el-row>
<el-form-item> <el-form-item v-if="org_list">
<el-tag class="ml-2" type="success" style="margin-right: 20px;">机构名称</el-tag> <el-tag class="ml-2" type="success" style="margin-right: 20px;">机构名称</el-tag>
<el-select filterable v-model="searchInfo.orgId" placeholder="请选择体检机构" clearable> <el-select filterable v-model="searchInfo.hospitalCode" placeholder="请选择体检机构" clearable>
<el-option v-for="(item, index) in org_list" :key="index" :label="item.org_name" <el-option v-for="(item, index) in org_list" :key="index" :label="item.hospitalName"
:value="item.id" /> :value="item.hospitalCode" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -32,14 +32,14 @@
<el-table-column prop="genderName" label="性别" /> <el-table-column prop="genderName" label="性别" />
<el-table-column prop="examTypeName" label="体检类型" /> <el-table-column prop="examTypeName" label="体检类型" />
<el-table-column prop="created_at" label="创建时间" /> <el-table-column prop="created_at" label="创建时间" />
<!-- <el-table-column label="报告" width="100"> <el-table-column label="报告" width="100">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.report_file"> <span v-if="scope.row.pdf_url">
<a target="_blank" :href="BaseFileUrl+scope.row.report_file">查看报告</a> <a target="_blank" :href="scope.row.pdf_url">查看报告</a>
</span> </span>
<span v-else style="color: #ccc;">暂无报告</span> <span v-else style="color: #ccc;">暂无报告</span>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column label="详情" width="100"> <el-table-column label="详情" width="100">
<template #default="scope"> <template #default="scope">
<el-button type="primary" style="margin-left: 20px;" size="small" <el-button type="primary" style="margin-left: 20px;" size="small"
@ -80,7 +80,7 @@
import { import {
GetHealthOrganizationEnableList, GetHealthOrganizationEnableList,
PingTaiPushGetList, PingTaiPushGetList,
PingTaiPushGetDetail PingTaiPushGetDetail,GetPingTaiOrgList
} from '@/api/api.js' } from '@/api/api.js'
let BaseFileUrl = import.meta.env.VITE_APP_FILE let BaseFileUrl = import.meta.env.VITE_APP_FILE
let loading = ref(false) let loading = ref(false)
@ -90,7 +90,7 @@
let total = 0 // let total = 0 //
let searchInfo = ref({ let searchInfo = ref({
dateRange: [], dateRange: [],
orgId: '', hospitalCode: '',
}) })
let Info = ref({}); let Info = ref({});
let detailDialogVisible = ref(false) let detailDialogVisible = ref(false)
@ -138,12 +138,10 @@
} }
let org_list = ref([]) // let org_list = ref([]) //
const getHealthOrganizationEnableList = () => { const getHealthOrganizationEnableList = () => {
GetHealthOrganizationEnableList().then(res => { GetPingTaiOrgList().then(res => {
if (res.status) { if (res.status) {
org_list.value = res.data org_list.value = res.data.list
if (res.data.length == 1) {
searchInfo.value.orgId = res.data[0].id
}
} else { } else {
ElMessage.error(res.msg) ElMessage.error(res.msg)
} }

Loading…
Cancel
Save