build:client
parent
423f00b97e
commit
775d9327c2
|
|
@ -66,7 +66,7 @@ class PatientController extends AdminController
|
|||
{
|
||||
return $this->baseForm()->body([
|
||||
amisMake()->SelectControl()->options($this->getTypeOptions())->name('type_id')->label(__('patient.type_id'))->required(),
|
||||
amisMake()->SelectControl()->source(admin_url('/api/user/list'))->labelField('phone')->valueField('id')->name('user_id')->label(__('patient.user_id'))->clearable()->onEvent([
|
||||
amisMake()->SelectControl()->source(admin_url('/api/user/list'))->name('user_id')->label(__('patient.user_id'))->clearable()->onEvent([
|
||||
'change' => [
|
||||
'actions' => [
|
||||
['actionType' => 'setValue', 'componentId' => 'patient_name', 'args' => ['value' => '${event.data.selectedItems.name}']],
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class UserController extends AdminController
|
|||
|
||||
public function getList(Request $request)
|
||||
{
|
||||
$list = $this->service->listQuery()->get();
|
||||
$list = $this->service->listQuery()->get()->map(fn($item) => ['value' => $item->id, 'label' => $item->name . '-' . $item->phone]);
|
||||
|
||||
return $this->response()->success($list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class PatientService extends BaseService
|
|||
'user_id' => ['nullable', $userRule->where('type_id', data_get($data, 'type_id'))],
|
||||
];
|
||||
$updateRule = [
|
||||
'user_id' => ['nullable', $userRule->where('type_id', data_get($data, 'type_id', $model?->type_id))]
|
||||
'user_id' => ['nullable', $userRule->where('type_id', data_get($data, 'type_id', $model?->type_id))->ignore($model->id)]
|
||||
];
|
||||
$validator = Validator::make($data, $model ? $updateRule : $createRule, [
|
||||
'type_id.required' => __('patient.type_id') . '必填',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class PatientController extends Controller
|
|||
public function show($id)
|
||||
{
|
||||
$user = auth('api')->user();
|
||||
$patient = $user->patients()->with(['type'])->findOrFail($id);
|
||||
$patient = $user->patients()->with(['type', 'doctor'])->findOrFail($id);
|
||||
return $this->response()->success($patient);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class WechatController extends Controller
|
|||
return redirect(url('/client/pages/login/index') . '?' . http_build_query(['openid' => $openid, 'open_type' => SocialiteType::WxOfficial->value]));
|
||||
}
|
||||
|
||||
$token = $user->createToken('client')->plainTextToken;
|
||||
$token = $user->createToken('client')->plainTextToken;
|
||||
|
||||
return redirect(url('/client/pages/index/welcome') . '?token=' . $token);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>宝芝堂</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/client/static/index.5841170f.css"/><script defer="defer" src="/client/static/js/chunk-vendors.40c214d6.js"></script><script defer="defer" src="/client/static/js/index.3273abba.js"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/client/static/index.5841170f.css"/><script defer="defer" src="/client/static/js/chunk-vendors.40c214d6.js"></script><script defer="defer" src="/client/static/js/index.f0c2aaef.js"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[810],{38:function(t,a,e){var n=e(2631);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.id,n,""]]),n.locals&&(t.exports=n.locals);var i=e(5472).Z;i("45d80b48",n,!0,{sourceMap:!1,shadowMode:!1})},8178:function(t,a,e){"use strict";e.r(a),e.d(a,{default:function(){return c}});var n,i={uCellGroup:e(156).Z,uCell:e(7981).Z,uAlbum:e(3093).Z,uButton:e(7344).Z},u=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{staticClass:"page"},[e("u-cell-group",{attrs:{border:!1}},[e("u-cell",{attrs:{title:"类别",value:t.info.type?t.info.type.name:""}}),e("u-cell",{attrs:{title:"初诊时间",value:t._f("date")(t.info.treat_at,"yyyy-MM-dd")}}),e("u-cell",{attrs:{title:"初诊医生",value:t.info.doctor?t.info.doctor.name:""}}),e("u-cell",{attrs:{title:"病情描述"}},[e("v-uni-view",{attrs:{slot:"value"},slot:"value"},[e("v-uni-text",[t._v(t._s(t.info.illness))])],1)],1),e("u-cell",{attrs:{title:"图片资料"}},[e("v-uni-view",{attrs:{slot:"value"},slot:"value"},[e("u-album",{attrs:{urls:t.info.images}})],1)],1)],1),e("v-uni-view",{staticClass:"btn"},[e("u-button",{attrs:{text:"病历记录",type:"success"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.record.apply(void 0,arguments)}}})],1)],1)},o=[],l=(e(9299),{data:function(){return{id:"",info:{images:[],doctor_id:"",doctor:{}}}},onLoad:function(t){this.id=t.id,this.loadData()},onPullDownRefresh:function(){this.loadData()},methods:{loadData:function(){var t=this;this.id&&(uni.showLoading(),this.$ajax.get("/api/client/patient/".concat(this.id)).then((function(a){uni.stopPullDownRefresh(),0==a.status&&(t.info=a.data,a.data.images&&t.$refs["images"].setList(a.data.images.map((function(t){return{url:t}}))),uni.setNavigationBarTitle({title:t.info.name}))})).catch((function(t){uni.stopPullDownRefresh()})))},record:function(){uni.navigateTo({url:"/pages/record/index?patient=".concat(this.id)})}}}),s=l,r=(e(38),e(1503)),d=(0,r.Z)(s,u,o,!1,null,"360de132",null,!1,i,n),c=d.exports},2631:function(t,a,e){"use strict";e.r(a);var n=e(2916),i=e.n(n),u=e(3282),o=e.n(u),l=o()(i());l.push([t.id,".page[data-v-360de132]{padding:20px;background:#fff}.u-cell-group[data-v-360de132]{background:#fff}.btn[data-v-360de132]{padding:0 10px}.btn .u-button[data-v-360de132]{margin-top:20px}.page[data-v-360de132] .u-upload__wrap{justify-content:flex-end}.text-gray[data-v-360de132]{color:gray}",""]),a["default"]=l}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue