diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/AnalysisTypeController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/AnalysisTypeController.php new file mode 100644 index 0000000..49c4728 --- /dev/null +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/AnalysisTypeController.php @@ -0,0 +1,59 @@ +get(); + return \Yz::Return(true,"查询完成",['list'=>$list]); + } + public function GetDetail() + { + $id = request('id'); + $detail = DB::table('analysis_types')->where('id',$id)->first(); + if(!!$detail){ + $detail->range=json_decode($detail->range,true); + if(isset($detail->range['l'])){ + $detail->range['l']=implode(',',$detail->range['l']); + } + if(isset($detail->range['r'])){ + $detail->range['r']=implode(',',$detail->range['r']); + } + } + return \Yz::Return(true,"查询完成",['info'=>$detail]); + } + public function Save(){ + $info = request('Info'); + $range=[ + "s"=>isset($info['range']['s'])?$info['range']['s']:0, + "r"=>isset($info['range']['r'])?explode(',', $info['range']['r']):[], + "l"=>isset($info['range']['l'])?explode(',', $info['range']['l']):[], + ]; + $data=[ + 'name'=>isset($info['name'])?$info['name']:'', + 'range'=>json_encode($range,JSON_UNESCAPED_UNICODE), + 'desc'=>isset($info['desc'])?$info['desc']:'', + 'color'=>isset($info['color'])?$info['color']:'#78A155', + 'mark'=>isset($info['mark'])?$info['mark']:'', + 'content'=>isset($info['content'])?$info['content']:'', + 'type'=>isset($info['type'])?$info['type']:0, + 'status'=>isset($info['status'])?$info['status']:0, + ]; + + if(isset($info['id']) and $info['id']>0){ + $u= DB::table('analysis_types')->where('id',$info['id'])->update($data); + }else{ + $u= DB::table('analysis_types')->insert($data); + } + if($u){ + return \Yz::Return(true,"操作完成",[]); + }else{ + return \Yz::echoError1("操作失败"); + } + } +} diff --git a/Laravel/app/Http/Controllers/API/H5/AnalysisTypeController.php b/Laravel/app/Http/Controllers/API/H5/AnalysisTypeController.php index 3b8f079..f18cbfe 100644 --- a/Laravel/app/Http/Controllers/API/H5/AnalysisTypeController.php +++ b/Laravel/app/Http/Controllers/API/H5/AnalysisTypeController.php @@ -28,4 +28,5 @@ class AnalysisTypeController extends Controller } return \Yz::return(true,"查询完成",['list' => $analysis_list]); } + } diff --git a/Laravel/app/Http/Controllers/API/H5/PlanController.php b/Laravel/app/Http/Controllers/API/H5/PlanController.php index 873400d..dec92b6 100644 --- a/Laravel/app/Http/Controllers/API/H5/PlanController.php +++ b/Laravel/app/Http/Controllers/API/H5/PlanController.php @@ -28,7 +28,7 @@ class PlanController extends Controller $list=DB::table('plans') ->whereBetween('date',[$first_day,$last_day])->whereIn('status',[1]) ->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime]) - ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) + ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [json_encode($checkup_type_id)]) ->where(['hospital_id'=>$hospital_id,'type'=>1]) ->whereIn('use_type',[0,$use_type]); // if($use_type==1){ @@ -96,7 +96,7 @@ class PlanController extends Controller $list=DB::table('plans') ->where('date',$date)->whereIn('status',[1,2]) ->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime]) - ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) + ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")',[$checkup_type_id]) ->where(['hospital_id'=>$hospital_id,'type'=>1]) ->whereIn('use_type',[0,$use_type]); if ($use_type == 1) { diff --git a/Laravel/routes/api.php b/Laravel/routes/api.php index 2375264..8f1bf12 100644 --- a/Laravel/routes/api.php +++ b/Laravel/routes/api.php @@ -115,6 +115,9 @@ Route::group(['middleware' => ['checktoken', 'log'], 'prefix' => 'v1'], function Route::post('admin/ArticleSave', 'App\Http\Controllers\API\Admin\YeWu\ArticleController@Save');//文章保存 Route::post('admin/ArticleGetDetail', 'App\Http\Controllers\API\Admin\YeWu\ArticleController@GetDetail');//文章详情 Route::post('admin/ArticleGetDel', 'App\Http\Controllers\API\Admin\YeWu\ArticleController@Del');//文章详情 + Route::post('admin/AnalysisTypeGetList', 'App\Http\Controllers\API\Admin\YeWu\AnalysisTypeController@GetList');//趋势项目 + Route::post('admin/AnalysisTypeGetDetail', 'App\Http\Controllers\API\Admin\YeWu\AnalysisTypeController@GetDetail');//趋势项目 + Route::post('admin/AnalysisTypeSave', 'App\Http\Controllers\API\Admin\YeWu\AnalysisTypeController@Save');//趋势项目 diff --git a/admin/src/api/api.js b/admin/src/api/api.js index ccaa486..09e745c 100644 --- a/admin/src/api/api.js +++ b/admin/src/api/api.js @@ -360,4 +360,17 @@ export const QuestionListListAction = (data = {}) => { export const QuestionSelectAction = (data = {}) => { return axios({ url: import.meta.env.VITE_APP_API + `v1/admin/question/select`, data: data }) +} + +//趋势项目列表 +export const AnalysisTypeGetList = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + `v1/admin/AnalysisTypeGetList`, data: data }) +} +//趋势项目详情 +export const AnalysisTypeGetDetail = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + `v1/admin/AnalysisTypeGetDetail`, data: data }) +} +//趋势项目保存 +export const AnalysisTypeSave = (data = {}) => { + return axios({ url: import.meta.env.VITE_APP_API + `v1/admin/AnalysisTypeSave`, data: data }) } \ No newline at end of file diff --git a/admin/src/router/index.js b/admin/src/router/index.js index e0a315a..3572194 100644 --- a/admin/src/router/index.js +++ b/admin/src/router/index.js @@ -204,6 +204,13 @@ const router = createRouter({ meta: { title: '套餐适用人群' } + },{ + path: '/h5mngr/analysistypes', + name: 'H5MngrAnalysisTypes', + component: () => import('../views/H5Mngr/AnalysisTypes.vue'), + meta: { + title: '趋势分析项目' + } }] }, diff --git a/admin/src/views/H5Mngr/AnalysisTypes.vue b/admin/src/views/H5Mngr/AnalysisTypes.vue new file mode 100644 index 0000000..7b5c444 --- /dev/null +++ b/admin/src/views/H5Mngr/AnalysisTypes.vue @@ -0,0 +1,203 @@ + + + + + \ No newline at end of file diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 3aa2bf5..70e520d 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -281,7 +281,7 @@ - 10210900 + 10221910 diff --git a/h5/pages/main/tjyy/tjyy.vue b/h5/pages/main/tjyy/tjyy.vue index 9928580..83434e9 100755 --- a/h5/pages/main/tjyy/tjyy.vue +++ b/h5/pages/main/tjyy/tjyy.vue @@ -361,9 +361,13 @@ onShow(() => { } }); -const toRouter = (url, status) => { +const toRouter = (url, status, index) => { if (status) { + console.log(index); + yytjInfo.value.nmrIndex = index; + console.log(yytjInfo.value); uni.setStorageSync("yytjInfoS", yytjInfo.value); + $store.setYytjInfo(yytjInfo.value); } uni.navigateTo({ url: url, @@ -618,13 +622,13 @@ const toRouter = (url, status) => { 更改预约人 - + @@ -638,7 +642,10 @@ const toRouter = (url, status) => { val.time ? "重新预约" : "预约时间" }} - + 体检医生 {{ yytjInfo?.doctor_name || "选择医生" diff --git a/h5/pages/main/yytjsj/yytjsj.vue b/h5/pages/main/yytjsj/yytjsj.vue index a0950f7..ab079e3 100755 --- a/h5/pages/main/yytjsj/yytjsj.vue +++ b/h5/pages/main/yytjsj/yytjsj.vue @@ -58,8 +58,9 @@ const getnmrList = async () => { itemsInfo.value = response.data.items_info; truePrice.value = response.data.true_price; currentDate.value = getToday(); //huo获取今天的日期 - + console.log(yytjInfo.value, "cfvghbjnkmljhbgvfcgvhbjnk"); if (!yytjInfo.value?.nmr_list?.length) { + yytjInfo.value.nmrIndex = 0; yytjInfo.value.nmr_list = response.data.nmr_list.map((val) => { return { ...val, @@ -74,8 +75,9 @@ const getnmrList = async () => { id: "", }); } - console.log(yytjInfo.value.nmr_list[0]); - xmmcClick(yytjInfo.value.nmr_list[0], 0); + nmrIndex.value = yytjInfo.value.nmrIndex; + console.log(yytjInfo.value.nmr_list[nmrIndex.value]); + xmmcClick(yytjInfo.value.nmr_list[nmrIndex.value], nmrIndex.value); uni.hideLoading(); }); }; @@ -508,7 +510,7 @@ onShow(() => { - + { {{ item.time }} + + 体检医生 + + {{ yytjInfo?.doctor_name || "请选择" }} + + +