更新医生列表

main
yanzai 1 year ago
parent a043cef78c
commit de9e50171a

@ -5,6 +5,7 @@ namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\API\AspNetZhuanController; use App\Http\Controllers\API\AspNetZhuanController;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class DoctorController extends Controller class DoctorController extends Controller
{ {
@ -15,6 +16,9 @@ class DoctorController extends Controller
$hospital = request('hospital'); $hospital = request('hospital');
$month = request('month'); $month = request('month');
$doctor_id = request('doctor_id'); $doctor_id = request('doctor_id');
$person_id = request('person_id');
if(!isset($person_id)) return \Yz::echoError1("用户id缺失");
$personInfo=DB::table('web_user_person')->where('id',$person_id)->first();
$hospital_map = [ $hospital_map = [
'h1' => '6', 'h1' => '6',
@ -51,29 +55,42 @@ class DoctorController extends Controller
"data" => $datesArray, "data" => $datesArray,
"action" => "1" "action" => "1"
]); ]);
// return \Yz::Return(true,"",$res); // return \Yz::Return(true,"",['data'=>$res]);
$list = []; $list = [];
$keshi=[ $keshi=[
'A0030090'=>'内科', 'A0030090'=>'内科',
'A0030091'=>'妇科', 'A0030091'=>'妇科',
'A0030102'=>'外科' 'A0030102'=>'外科'
]; ];
$keshi_sex_list=[
'A0030116'=>'2',
'A0030106'=>'1'
];
if ($res['code'] == '200' && count($res['yisheng']) != 0) { if ($res['code'] == '200' && count($res['yisheng']) != 0) {
foreach ($res['yisheng'] as $key => $value) { foreach ($res['yisheng'] as $key => $value) {
$keshiname=''; $keshiname='';
$keshi_sex='';
if(isset($keshi[$value['KSID']])){ if(isset($keshi[$value['KSID']])){
$keshiname=$keshi[$value['KSID']]; $keshiname=$keshi[$value['KSID']];
} }
$list[] = [ if(isset($keshi_sex_list[$value['KSID']])){
'head_img' => 'data:image/jpeg;base64,' . $value['U_IMG'], $keshi_sex=$keshi_sex_list[$value['KSID']];
'name' => $value['U_NAME'], }
'id' => $value['U_ID'], if($keshi_sex==$personInfo->sex){
'level' => $value['ZC_NAME'], $list[] = [
'hospital' => '', 'head_img' => 'data:image/jpeg;base64,' . $value['U_IMG'],
'time' => $value['U_GDPB'], 'name' => $value['U_NAME'],
'desc' => $value['U_JIANJIE'], 'id' => $value['U_ID'],
'keshiname'=>$keshiname 'level' => $value['ZC_NAME'],
]; 'hospital' => '',
'time' => $value['U_GDPB'],
'desc' => $value['U_JIANJIE'],
'keshiname'=>$keshiname,
'keshi_id'=>$value['KSID'],
'keshi_sex'=>$keshi_sex,
];
}
} }
} }
$paiban=[]; $paiban=[];

@ -12,6 +12,7 @@ import { useStore } from "@/store";
const $store = useStore(); const $store = useStore();
let dqDate = ref(""); let dqDate = ref("");
let yytjInfo = ref({}); // let yytjInfo = ref({}); //
let buy_info=ref({});
const $props = defineProps({ const $props = defineProps({
date: { date: {
type: String, type: String,
@ -28,6 +29,7 @@ const mountedAction = () => {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
buy_info.value= $store.getBuyInfo();
yytjInfo.value = $store.getYytjInfo(); yytjInfo.value = $store.getYytjInfo();
yytjInfo.value = { yytjInfo.value = {
doctor_date: "", doctor_date: "",
@ -46,9 +48,10 @@ const doctor_list = ref(false);
const getdoctorList = async () => { const getdoctorList = async () => {
// //
let obj = { let obj = {
hospital: $store.save.hospital, hospital: $store.save.hospital,
date: dqDate.value, date: dqDate.value,
month:$props.month month:$props.month,
person_id:buy_info.value.person_id
}; };
const response = await $api("DoctorGetList", obj); const response = await $api("DoctorGetList", obj);
$response(response, () => { $response(response, () => {

@ -123,7 +123,7 @@
yytjInfo.value.doctor_date = e.fulldate; yytjInfo.value.doctor_date = e.fulldate;
$store.setYytjInfo(yytjInfo.value); $store.setYytjInfo(yytjInfo.value);
uni.navigateTo({ uni.navigateTo({
url: '/pages/main/combo/combo?keshi_name='+DoctorInfo.value.keshiname url: '/pages/main/combo/combo?keshi_name='+DoctorInfo.value.keshiname+'&keshi_sex='+DoctorInfo.value.keshi_sex
}) })
} }
const changerl = (e) => { const changerl = (e) => {
@ -164,7 +164,8 @@
let obj = { let obj = {
hospital: $store.save.hospital, hospital: $store.save.hospital,
month:month, month:month,
doctor_id:yytjInfo.value.doctor_id?yytjInfo.value.doctor_id:null doctor_id:yytjInfo.value.doctor_id?yytjInfo.value.doctor_id:null,
person_id:buyInfo.value.person_id
}; };
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",

Loading…
Cancel
Save