From 423f00b97e52ba6ff3df9cdd5abf132ebc4ec6d4 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Mon, 16 Oct 2023 13:13:03 +0800 Subject: [PATCH] build --- .../Controllers/TotalPatientController.php | 2 +- .../Controllers/TotalProfitController.php | 2 +- app/Admin/Services/PatientService.php | 12 +++++-- app/Admin/Services/TotalProfitService.php | 3 +- app/Admin/Services/UserService.php | 3 +- .../Controllers/Client/AuthController.php | 36 +++++++++++-------- app/ModelFilters/UserFilter.php | 4 +-- public/client/index.html | 2 +- .../js/{102.ee78d02a.js => 102.03435c48.js} | 0 .../{index.9ce0c3de.js => index.3273abba.js} | 2 +- .../static/js/pages-index-index.5cbb5eef.js | 1 - .../static/js/pages-index-index.f1895627.js | 1 + .../static/js/pages-login-index.06e936eb.js | 1 - .../static/js/pages-login-index.238b6ee6.js | 1 + ...87.js => pages-register-index.2344e4b7.js} | 2 +- ...f25ac1.js => pages-user-index.bb975446.js} | 4 +-- public/h5/index.html | 2 +- .../{index.1964f9fd.js => index.b5e1a8df.js} | 2 +- .../js/pages-patient-detail.629daa3d.js | 1 - .../js/pages-patient-detail.b5d4203a.js | 1 + .../static/js/pages-patient-form.21848ee2.js | 1 - .../static/js/pages-patient-form.2cd57f81.js | 1 + .../static/js/pages-record-detail.08dae0de.js | 1 + .../static/js/pages-record-detail.9947387c.js | 1 - ...20e82.js => pages-record-form.b05fe531.js} | 2 +- ...2444.js => pages-record-index.11521a89.js} | 4 +-- tests/Feature/ExampleTest.php | 14 ++------ 27 files changed, 57 insertions(+), 49 deletions(-) rename public/client/static/js/{102.ee78d02a.js => 102.03435c48.js} (100%) rename public/client/static/js/{index.9ce0c3de.js => index.3273abba.js} (52%) delete mode 100644 public/client/static/js/pages-index-index.5cbb5eef.js create mode 100644 public/client/static/js/pages-index-index.f1895627.js delete mode 100644 public/client/static/js/pages-login-index.06e936eb.js create mode 100644 public/client/static/js/pages-login-index.238b6ee6.js rename public/client/static/js/{pages-register-index.d2270187.js => pages-register-index.2344e4b7.js} (53%) rename public/client/static/js/{pages-user-index.32f25ac1.js => pages-user-index.bb975446.js} (61%) rename public/h5/static/js/{index.1964f9fd.js => index.b5e1a8df.js} (96%) delete mode 100644 public/h5/static/js/pages-patient-detail.629daa3d.js create mode 100644 public/h5/static/js/pages-patient-detail.b5d4203a.js delete mode 100644 public/h5/static/js/pages-patient-form.21848ee2.js create mode 100644 public/h5/static/js/pages-patient-form.2cd57f81.js create mode 100644 public/h5/static/js/pages-record-detail.08dae0de.js delete mode 100644 public/h5/static/js/pages-record-detail.9947387c.js rename public/h5/static/js/{pages-record-form.ac620e82.js => pages-record-form.b05fe531.js} (50%) rename public/h5/static/js/{pages-record-index.1c8c2444.js => pages-record-index.11521a89.js} (71%) diff --git a/app/Admin/Controllers/TotalPatientController.php b/app/Admin/Controllers/TotalPatientController.php index 966f90b..1f129ee 100644 --- a/app/Admin/Controllers/TotalPatientController.php +++ b/app/Admin/Controllers/TotalPatientController.php @@ -29,7 +29,7 @@ class TotalPatientController extends AdminController $this->exportAction(), ]) ->filter($this->baseFilter()->actions()->body([ - amisMake()->SelectControl()->options($this->getPatientOptions())->searchable()->name('id')->label(__('total-record.name'))->size('md')->clearable(), + amisMake()->SelectControl()->options($this->getPatientOptions())->searchable()->name('id')->label(__('total-record.name'))->size('md')->multiple()->clearable(), amisMake()->SelectControl()->options($this->getTypeOptions())->name('type_id')->label(__('patient-record.type_id'))->size('md')->clearable(), amisMake()->DateRangeControl()->name('treat_range')->label(__('total-record.treat_at'))->clearable()->size('md'), // amisMake()->Button()->label(__('admin.reset'))->actionType('clear-and-submit'), diff --git a/app/Admin/Controllers/TotalProfitController.php b/app/Admin/Controllers/TotalProfitController.php index 2dfec34..3b9861f 100644 --- a/app/Admin/Controllers/TotalProfitController.php +++ b/app/Admin/Controllers/TotalProfitController.php @@ -29,7 +29,7 @@ class TotalProfitController extends AdminController $this->exportAction(), ]) ->filter($this->baseFilter()->actions()->body([ - amisMake()->SelectControl()->options($this->getAdminUserOptions())->searchable()->name('id')->label(__('total-profit.id'))->clearable()->size('md'), + amisMake()->SelectControl()->options($this->getAdminUserOptions())->searchable()->name('id')->label(__('total-profit.id'))->multiple()->clearable()->size('md'), amisMake()->SelectControl()->options($this->getTypeOptions())->name('type_id')->label(__('total-profit.type_id'))->size('md')->clearable(), amisMake()->DateRangeControl()->name('treat_range')->label(__('total-record.treat_at'))->clearable()->size('md'), // amisMake()->Button()->label(__('admin.reset'))->actionType('clear-and-submit'), diff --git a/app/Admin/Services/PatientService.php b/app/Admin/Services/PatientService.php index 118d13e..01cee43 100644 --- a/app/Admin/Services/PatientService.php +++ b/app/Admin/Services/PatientService.php @@ -2,6 +2,7 @@ namespace App\Admin\Services; +use App\Enums\Gender; use App\ModelFilters\PatientFilter; use Illuminate\Validation\Rule; use App\Models\{Patient, PatientRecord}; @@ -42,6 +43,11 @@ class PatientService extends BaseService if ($images = data_get($data, 'images')) { $data['images'] = is_array($images) ? $images : explode(',', $images); } + if (!$model) { + if (!data_get($data, 'sex')) { + $data['sex'] = Gender::None; + } + } return $data; } @@ -58,15 +64,15 @@ class PatientService extends BaseService $createRule = [ 'type_id' => 'required', 'name' => 'required', - 'user_id' => $userRule->where('type_id', data_get($data, 'type_id')) + 'user_id' => ['nullable', $userRule->where('type_id', data_get($data, 'type_id'))], ]; $updateRule = [ - 'user_id' => $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))] ]; $validator = Validator::make($data, $model ? $updateRule : $createRule, [ 'type_id.required' => __('patient.type_id') . '必填', 'name.required' => __('patient.name') . '必填', - 'user_id.unique' => __('patient.user_id') . '已经存在', + 'user_id.unique' => __('patient.user_id') . '已经绑定过', ]); if ($validator->fails()) { return $validator->errors()->first(); diff --git a/app/Admin/Services/TotalProfitService.php b/app/Admin/Services/TotalProfitService.php index a2f3fc9..4ec33a5 100644 --- a/app/Admin/Services/TotalProfitService.php +++ b/app/Admin/Services/TotalProfitService.php @@ -26,7 +26,8 @@ class TotalProfitService extends BaseService } $request = request(); if ($request->filled('id')) { - $query->where('id', $request->input('id')); + $id = $request->input('id'); + $query->whereIn('id', is_array($id) ? $id : explode(',', $id)); } $subQuery = fn ($q) => $q->filter(request()->except(['id'])); $query->select(['id', 'name'])->with([ diff --git a/app/Admin/Services/UserService.php b/app/Admin/Services/UserService.php index 532223a..980df44 100644 --- a/app/Admin/Services/UserService.php +++ b/app/Admin/Services/UserService.php @@ -27,6 +27,7 @@ class UserService extends BaseService } if ($filter) { + logger('request', request()->input()); $query->filter(request()->input(), $filter); } @@ -44,7 +45,7 @@ class UserService extends BaseService ], [ 'phone.required' => __('user.phone') . '必填', 'phone.phone' => __('user.phone') . ' 不是合法手机号', - 'phone.unique' => __('user.phone') . '已经存在', + 'phone.unique' => __('user.phone') . '已经注册', ]); if ($validator->fails()) { return $validator->errors()->first(); diff --git a/app/Http/Controllers/Client/AuthController.php b/app/Http/Controllers/Client/AuthController.php index 28f2c86..be20108 100644 --- a/app/Http/Controllers/Client/AuthController.php +++ b/app/Http/Controllers/Client/AuthController.php @@ -9,6 +9,7 @@ use App\Http\Controllers\Controller; use App\Models\User; use App\Models\UserSocialite; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; class AuthController extends Controller @@ -41,20 +42,27 @@ class AuthController extends Controller public function register(Request $request) { - $service = UserService::make(); - if (!$service->store($request->all())) { - throw new BaseException($service->getError()); + try { + DB::beginTransaction(); + $service = UserService::make(); + if (!$service->store($request->all())) { + throw new BaseException($service->getError()); + } + $user = User::where('phone', $request->input('phone'))->first(); + // 更新第三方账户 + $openid = $request->input('openid'); + $open_type = $request->input('open_type'); + if ($openid && $open_type) { + UserSocialite::where(['openid' => $openid, 'type' => SocialiteType::from($open_type), 'user_type' => $user->getMorphClass()])->update([ + 'user_id' => $user->id, + ]); + } + DB::commit(); + $token = $user->createToken('client')->plainTextToken; + return $this->response()->success(['token' => $token, 'user' => $user]); + } catch (\Exception $e) { + DB::rollBack(); + return $this->response()->fail($e->getMessage()); } - $user = User::where('phone', $request->input('phone'))->first(); - // 更新第三方账户 - $openid = $request->input('openid'); - $open_type = $request->input('open_type'); - if ($openid && $open_type) { - UserSocialite::where(['openid' => $openid, 'type' => SocialiteType::from($open_type), 'user_type' => $user->getMorphClass()])->update([ - 'user_id' => $user->id, - ]); - } - $token = $user->createToken('client')->plainTextToken; - return $this->response()->success(['token' => $token, 'user' => $user]); } } diff --git a/app/ModelFilters/UserFilter.php b/app/ModelFilters/UserFilter.php index 8150a35..79e1cc8 100644 --- a/app/ModelFilters/UserFilter.php +++ b/app/ModelFilters/UserFilter.php @@ -30,8 +30,8 @@ class UserFilter extends ModelFilter $this->where(fn ($q) => $q->where('phone', 'like', $str)->orWhere('name', 'like', $str)); } - public function ignoreType($key) + public function treatType($key) { - $this->whereDoesntHave('patients', fn ($q) => $q->where('type_id', $key)); + $this->whereHas('patients', fn ($q) => $q->where('type_id', '!=', $key)); } } diff --git a/public/client/index.html b/public/client/index.html index 5a1f608..8900696 100644 --- a/public/client/index.html +++ b/public/client/index.html @@ -1,2 +1,2 @@ 宝芝堂
\ No newline at end of file + document.write('')
\ No newline at end of file diff --git a/public/client/static/js/102.ee78d02a.js b/public/client/static/js/102.03435c48.js similarity index 100% rename from public/client/static/js/102.ee78d02a.js rename to public/client/static/js/102.03435c48.js diff --git a/public/client/static/js/index.9ce0c3de.js b/public/client/static/js/index.3273abba.js similarity index 52% rename from public/client/static/js/index.9ce0c3de.js rename to public/client/static/js/index.3273abba.js index b446f20..bae2a09 100644 --- a/public/client/static/js/index.9ce0c3de.js +++ b/public/client/static/js/index.3273abba.js @@ -1 +1 @@ -(function(){var n={1398:function(n,e,o){var t=o(8703);t.__esModule&&(t=t.default),"string"===typeof t&&(t=[[n.id,t,""]]),t.locals&&(n.exports=t.locals);var i=o(5472).Z;i("99d79208",t,!0,{sourceMap:!1,shadowMode:!1})},4427:function(n,e,o){"use strict";var t=o(159),i=(o(7966),o(4554),o(3167),o(3482),o(206),o(5827),o(498),o(930),o(423),o(262),o(6075)),r={keys:function(){return[]}};o.g["____828F200____"]=!0,delete o.g["____828F200____"],o.g.__uniConfig={globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"宝芝堂",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8",navigationStyle:"custom"},easycom:{"^u-(.*)":"uview-ui/components/u-$1/u-$1.vue","^unicloud-db$":"@dcloudio/uni-cli-shared/components/unicloud-db.vue","^uniad$":"@dcloudio/uni-cli-shared/components/uniad.vue","^ad-rewarded-video$":"@dcloudio/uni-cli-shared/components/ad-rewarded-video.vue","^ad-fullscreen-video$":"@dcloudio/uni-cli-shared/components/ad-fullscreen-video.vue","^ad-interstitial$":"@dcloudio/uni-cli-shared/components/ad-interstitial.vue","^ad-interactive$":"@dcloudio/uni-cli-shared/components/ad-interactive.vue","^page-meta$":"@dcloudio/uni-cli-shared/components/page-meta.vue","^navigation-bar$":"@dcloudio/uni-cli-shared/components/navigation-bar.vue","^uni-match-media$":"@dcloudio/uni-cli-shared/components/uni-match-media.vue"}},o.g.__uniConfig.compilerVersion="3.6.14",o.g.__uniConfig.darkmode=!1,o.g.__uniConfig.themeConfig={},o.g.__uniConfig.uniPlatform="h5",o.g.__uniConfig.appId="__UNI__828F200",o.g.__uniConfig.appName="宝芝堂",o.g.__uniConfig.appVersion="1.0.0",o.g.__uniConfig.appVersionCode="100",o.g.__uniConfig.router={mode:"history",base:"/client/"},o.g.__uniConfig.publicPath="/client/",o.g.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4},o.g.__uniConfig.debug=!1,o.g.__uniConfig.networkTimeout={request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},o.g.__uniConfig.sdkConfigs={},o.g.__uniConfig.qqMapKey=void 0,o.g.__uniConfig.googleMapKey=void 0,o.g.__uniConfig.aMapKey=void 0,o.g.__uniConfig.aMapSecurityJsCode=void 0,o.g.__uniConfig.aMapServiceHost=void 0,o.g.__uniConfig.locale="",o.g.__uniConfig.fallbackLocale=void 0,o.g.__uniConfig.locales=r.keys().reduce((function(n,e){var o=e.replace(/\.\/(uni-app.)?(.*).json/,"$2"),t=r(e);return Object.assign(n[o]||(n[o]={}),t.common||t),n}),{}),o.g.__uniConfig.nvue={"flex-direction":"column"},o.g.__uniConfig.__webpack_chunk_load__=o.e,i["default"].component("pages-index-index",(function(n){var e={component:Promise.all([o.e(297),o.e(202),o.e(981),o.e(787),o.e(344),o.e(125),o.e(58)]).then(function(){return n(o(5294))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-index-welcome",(function(n){var e={component:o.e(545).then(function(){return n(o(3233))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-login-index",(function(n){var e={component:Promise.all([o.e(297),o.e(202),o.e(241),o.e(344),o.e(102),o.e(607)]).then(function(){return n(o(3729))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-register-index",(function(n){var e={component:Promise.all([o.e(297),o.e(202),o.e(241),o.e(344),o.e(56),o.e(102),o.e(913)]).then(function(){return n(o(8935))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-user-index",(function(n){var e={component:Promise.all([o.e(297),o.e(202),o.e(981),o.e(241),o.e(787),o.e(56),o.e(125),o.e(905)]).then(function(){return n(o(4010))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-record-index",(function(n){var e={component:Promise.all([o.e(297),o.e(981),o.e(492)]).then(function(){return n(o(6851))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-record-detail",(function(n){var e={component:Promise.all([o.e(297),o.e(981),o.e(787),o.e(487)]).then(function(){return n(o(4480))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),o.g.__uniRoutes=[{path:"/",alias:"/pages/index/index",component:{render:function(n){return n("Page",{props:Object.assign({isQuit:!0,isEntry:!0},__uniConfig.globalStyle,{navigationBarTitleText:"宝芝堂"})},[n("pages-index-index",{slot:"page"})])}},meta:{id:1,name:"pages-index-index",isNVue:!1,maxWidth:0,pagePath:"pages/index/index",isQuit:!0,isEntry:!0,windowTop:0}},{path:"/pages/index/welcome",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"宝芝堂"})},[n("pages-index-welcome",{slot:"page"})])}},meta:{name:"pages-index-welcome",isNVue:!1,maxWidth:0,pagePath:"pages/index/welcome",windowTop:0}},{path:"/pages/login/index",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"登录"})},[n("pages-login-index",{slot:"page"})])}},meta:{name:"pages-login-index",isNVue:!1,maxWidth:0,pagePath:"pages/login/index",windowTop:0}},{path:"/pages/register/index",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"注册"})},[n("pages-register-index",{slot:"page"})])}},meta:{name:"pages-register-index",isNVue:!1,maxWidth:0,pagePath:"pages/register/index",windowTop:0}},{path:"/pages/user/index",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"账户信息"})},[n("pages-user-index",{slot:"page"})])}},meta:{name:"pages-user-index",isNVue:!1,maxWidth:0,pagePath:"pages/user/index",windowTop:0}},{path:"/pages/record/index",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病历记录",enablePullDownRefresh:!0})},[n("pages-record-index",{slot:"page"})])}},meta:{name:"pages-record-index",isNVue:!1,maxWidth:0,pagePath:"pages/record/index",windowTop:0}},{path:"/pages/record/detail",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病历详细",enablePullDownRefresh:!0})},[n("pages-record-detail",{slot:"page"})])}},meta:{name:"pages-record-detail",isNVue:!1,maxWidth:0,pagePath:"pages/record/detail",windowTop:0}},{path:"/choose-location",component:{render:function(n){return n("Page",{props:{navigationStyle:"custom"}},[n("system-choose-location",{slot:"page"})])}},meta:{name:"choose-location",pagePath:"/choose-location"}},{path:"/open-location",component:{render:function(n){return n("Page",{props:{navigationStyle:"custom"}},[n("system-open-location",{slot:"page"})])}},meta:{name:"open-location",pagePath:"/open-location"}}],o.g.UniApp&&new o.g.UniApp;o(1026);var a,u,c=function(){var n=this,e=n.$createElement,o=n._self._c||e;return o("App",{attrs:{keepAliveInclude:n.keepAliveInclude}})},d=[],l={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}},s=l,g=(o(1398),o(1503)),p=(0,g.Z)(s,c,d,!1,null,null,null,!1,a,u),f=p.exports,m=(o(7846),o(3124)),b=o(5682);o(8996),o(7480),o(5329),o(4302),o(5621),o(1199),o(9289),o(9312);function _(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss";if(!e)return"";n=e?/^\d{10}$/.test(e.toString().trim())?new Date(1e3*e):"string"===typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):new Date("string"===typeof e?e.replace(/-/g,"/"):e):new Date;var t={y:n.getFullYear().toString(),M:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),H:n.getHours().toString().padStart(2,"0"),m:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(var i in t){var r=new RegExp("".concat(i,"+")).exec(o)||[],a=(0,b.Z)(r,1),u=a[0];if(u){var c="y"===i&&2===u.length?2:0;o=o.replace(u,t[i].slice(c))}}return o}i["default"].config.productionTip=!1,i["default"].use(m.Z),i["default"].filter("date",(function(n,e){return e||(e="yyyy-MM-dd HH:mm:ss"),_(n,e)})),i["default"].config.productionTip=!1,f.mpType="app";var y=new i["default"]((0,t.Z)({},f));o(926)(),i["default"].prototype.$ajax=uni.$u.http,y.$mount()},7846:function(n,e,o){var t=o(3087)["default"];o(5827),uni.addInterceptor({returnValue:function(n){return!n||"object"!==t(n)&&"function"!==typeof n||"function"!==typeof n.then?n:new Promise((function(e,o){n.then((function(n){return n[0]?o(n[0]):e(n[1])}))}))}})},926:function(n,e,o){o(5827),n.exports=function(){uni.$u.http.setConfig((function(n){return n.baseURL="http://local.medical-record.host",n.custom={toast:!0,loading:!1},n})),uni.$u.http.interceptors.request.use((function(n){var e=uni.getStorageSync("medical_record_client_auth_token");return e&&(n.header["Authorization"]="Bearer ".concat(e)),n.header["Accept"]="application/json",n.custom.loading&&uni.showLoading(),n}),(function(n){return Promise.reject(n)})),uni.$u.http.interceptors.response.use((function(n){uni.hideLoading();var e=n.data;return n.config.custom.toast&&0!=e.status&&1!=e.doNotDisplayToast&&uni.showModal({title:e.msg,showCancel:!1}),401==e.status&&uni.reLaunch({url:"/pages/login/index"}),e}),(function(n){return uni.hideLoading(),Promise.reject(n)}))}},8703:function(n,e,o){"use strict";o.r(e);var t=o(2916),i=o.n(t),r=o(3282),a=o.n(r),u=a()(i());u.push([n.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */.u-line-1{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:1;-webkit-box-orient:vertical!important\n}.u-line-2{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:2;-webkit-box-orient:vertical!important\n}.u-line-3{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:3;-webkit-box-orient:vertical!important\n}.u-line-4{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:4;-webkit-box-orient:vertical!important\n}.u-line-5{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:5;-webkit-box-orient:vertical!important\n}.u-border{border-width:.5px!important;border-color:#dadbde!important;border-style:solid}.u-border-top{border-top-width:.5px!important;border-color:#dadbde!important;border-top-style:solid}.u-border-left{border-left-width:.5px!important;border-color:#dadbde!important;border-left-style:solid}.u-border-right{border-right-width:.5px!important;border-color:#dadbde!important;border-right-style:solid}.u-border-bottom{border-bottom-width:.5px!important;border-color:#dadbde!important;border-bottom-style:solid}.u-border-top-bottom{border-top-width:.5px!important;border-bottom-width:.5px!important;border-color:#dadbde!important;border-top-style:solid;border-bottom-style:solid}.u-reset-button{padding:0;background-color:initial;\nfont-size:inherit;line-height:inherit;color:inherit;\n}\n.u-reset-button::after{border:none}\n.u-hover-class{opacity:.7}.u-primary-light{color:#ecf5ff}.u-warning-light{color:#fdf6ec}.u-success-light{color:#f5fff0}.u-error-light{color:#fef0f0}.u-info-light{color:#f4f4f5}.u-primary-light-bg{background-color:#ecf5ff}.u-warning-light-bg{background-color:#fdf6ec}.u-success-light-bg{background-color:#f5fff0}.u-error-light-bg{background-color:#fef0f0}.u-info-light-bg{background-color:#f4f4f5}.u-primary-dark{color:#398ade}.u-warning-dark{color:#f1a532}.u-success-dark{color:#53c21d}.u-error-dark{color:#e45656}.u-info-dark{color:#767a82}.u-primary-dark-bg{background-color:#398ade}.u-warning-dark-bg{background-color:#f1a532}.u-success-dark-bg{background-color:#53c21d}.u-error-dark-bg{background-color:#e45656}.u-info-dark-bg{background-color:#767a82}.u-primary-disabled{color:#9acafc}.u-warning-disabled{color:#f9d39b}.u-success-disabled{color:#a9e08f}.u-error-disabled{color:#f7b2b2}.u-info-disabled{color:#c4c6c9}.u-primary{color:#3c9cff}.u-warning{color:#f9ae3d}.u-success{color:#5ac725}.u-error{color:#f56c6c}.u-info{color:#909399}.u-primary-bg{background-color:#3c9cff}.u-warning-bg{background-color:#f9ae3d}.u-success-bg{background-color:#5ac725}.u-error-bg{background-color:#f56c6c}.u-info-bg{background-color:#909399}.u-main-color{color:#303133}.u-content-color{color:#606266}.u-tips-color{color:#909193}.u-light-color{color:#c0c4cc}.u-safe-area-inset-top{padding-top:0;padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.u-safe-area-inset-right{padding-right:0;padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.u-safe-area-inset-bottom{padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.u-safe-area-inset-left{padding-left:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left)}\nuni-toast{z-index:10090}uni-toast .uni-toast{z-index:10090}\n::-webkit-scrollbar{display:none;width:0!important;height:0!important;-webkit-appearance:none;background:transparent}body{background-color:#f3f4f6}',""]),e["default"]=u}},e={};function o(t){var i=e[t];if(void 0!==i)return i.exports;var r=e[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=n,function(){o.amdD=function(){throw new Error("define cannot be used indirect")}}(),function(){var n=[];o.O=function(e,t,i,r){if(!t){var a=1/0;for(l=0;l=r)&&Object.keys(o.O).every((function(n){return o.O[n](t[c])}))?t.splice(c--,1):(u=!1,r0&&n[l-1][2]>r;l--)n[l]=n[l-1];n[l]=[t,i,r]}}(),function(){o.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return o.d(e,{a:e}),e}}(),function(){o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})}}(),function(){o.f={},o.e=function(n){return Promise.all(Object.keys(o.f).reduce((function(e,t){return o.f[t](n,e),e}),[]))}}(),function(){o.u=function(n){return"static/js/"+({58:"pages-index-index",487:"pages-record-detail",492:"pages-record-index",545:"pages-index-welcome",607:"pages-login-index",905:"pages-user-index",913:"pages-register-index"}[n]||n)+"."+{56:"8a0d84b8",58:"5cbb5eef",102:"ee78d02a",125:"0b6c7a32",202:"7e8e9e5c",241:"ca33bc23",297:"0381efa6",344:"bc29a90f",487:"34f2eb53",492:"d892d2f8",545:"2b4587f4",607:"06e936eb",787:"ef344ac6",905:"32f25ac1",913:"d2270187",981:"925b79b6"}[n]+".js"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}()}(),function(){o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)}}(),function(){var n={},e="uniapp:";o.l=function(t,i,r,a){if(n[t])n[t].push(i);else{var u,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss";if(!e)return"";n=e?/^\d{10}$/.test(e.toString().trim())?new Date(1e3*e):"string"===typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):new Date("string"===typeof e?e.replace(/-/g,"/"):e):new Date;var t={y:n.getFullYear().toString(),M:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),H:n.getHours().toString().padStart(2,"0"),m:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(var i in t){var r=new RegExp("".concat(i,"+")).exec(o)||[],a=(0,b.Z)(r,1),u=a[0];if(u){var c="y"===i&&2===u.length?2:0;o=o.replace(u,t[i].slice(c))}}return o}i["default"].config.productionTip=!1,i["default"].use(m.Z),i["default"].filter("date",(function(n,e){return e||(e="yyyy-MM-dd HH:mm:ss"),_(n,e)})),i["default"].config.productionTip=!1,f.mpType="app";var y=new i["default"]((0,t.Z)({},f));o(926)(),i["default"].prototype.$ajax=uni.$u.http,y.$mount()},7846:function(n,e,o){var t=o(3087)["default"];o(5827),uni.addInterceptor({returnValue:function(n){return!n||"object"!==t(n)&&"function"!==typeof n||"function"!==typeof n.then?n:new Promise((function(e,o){n.then((function(n){return n[0]?o(n[0]):e(n[1])}))}))}})},926:function(n,e,o){o(5827),n.exports=function(){uni.$u.http.setConfig((function(n){return n.baseURL="http://www.xbzt.cc",n.custom={toast:!0,loading:!1},n})),uni.$u.http.interceptors.request.use((function(n){var e=uni.getStorageSync("medical_record_client_auth_token");return e&&(n.header["Authorization"]="Bearer ".concat(e)),n.header["Accept"]="application/json",n.custom.loading&&uni.showLoading(),n}),(function(n){return Promise.reject(n)})),uni.$u.http.interceptors.response.use((function(n){uni.hideLoading();var e=n.data;return n.config.custom.toast&&0!=e.status&&1!=e.doNotDisplayToast&&uni.showModal({title:e.msg,showCancel:!1}),401==e.status&&uni.reLaunch({url:"/pages/login/index"}),e}),(function(n){return uni.hideLoading(),Promise.reject(n)}))}},8703:function(n,e,o){"use strict";o.r(e);var t=o(2916),i=o.n(t),r=o(3282),a=o.n(r),u=a()(i());u.push([n.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */.u-line-1{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:1;-webkit-box-orient:vertical!important\n}.u-line-2{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:2;-webkit-box-orient:vertical!important\n}.u-line-3{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:3;-webkit-box-orient:vertical!important\n}.u-line-4{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:4;-webkit-box-orient:vertical!important\n}.u-line-5{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:5;-webkit-box-orient:vertical!important\n}.u-border{border-width:.5px!important;border-color:#dadbde!important;border-style:solid}.u-border-top{border-top-width:.5px!important;border-color:#dadbde!important;border-top-style:solid}.u-border-left{border-left-width:.5px!important;border-color:#dadbde!important;border-left-style:solid}.u-border-right{border-right-width:.5px!important;border-color:#dadbde!important;border-right-style:solid}.u-border-bottom{border-bottom-width:.5px!important;border-color:#dadbde!important;border-bottom-style:solid}.u-border-top-bottom{border-top-width:.5px!important;border-bottom-width:.5px!important;border-color:#dadbde!important;border-top-style:solid;border-bottom-style:solid}.u-reset-button{padding:0;background-color:initial;\nfont-size:inherit;line-height:inherit;color:inherit;\n}\n.u-reset-button::after{border:none}\n.u-hover-class{opacity:.7}.u-primary-light{color:#ecf5ff}.u-warning-light{color:#fdf6ec}.u-success-light{color:#f5fff0}.u-error-light{color:#fef0f0}.u-info-light{color:#f4f4f5}.u-primary-light-bg{background-color:#ecf5ff}.u-warning-light-bg{background-color:#fdf6ec}.u-success-light-bg{background-color:#f5fff0}.u-error-light-bg{background-color:#fef0f0}.u-info-light-bg{background-color:#f4f4f5}.u-primary-dark{color:#398ade}.u-warning-dark{color:#f1a532}.u-success-dark{color:#53c21d}.u-error-dark{color:#e45656}.u-info-dark{color:#767a82}.u-primary-dark-bg{background-color:#398ade}.u-warning-dark-bg{background-color:#f1a532}.u-success-dark-bg{background-color:#53c21d}.u-error-dark-bg{background-color:#e45656}.u-info-dark-bg{background-color:#767a82}.u-primary-disabled{color:#9acafc}.u-warning-disabled{color:#f9d39b}.u-success-disabled{color:#a9e08f}.u-error-disabled{color:#f7b2b2}.u-info-disabled{color:#c4c6c9}.u-primary{color:#3c9cff}.u-warning{color:#f9ae3d}.u-success{color:#5ac725}.u-error{color:#f56c6c}.u-info{color:#909399}.u-primary-bg{background-color:#3c9cff}.u-warning-bg{background-color:#f9ae3d}.u-success-bg{background-color:#5ac725}.u-error-bg{background-color:#f56c6c}.u-info-bg{background-color:#909399}.u-main-color{color:#303133}.u-content-color{color:#606266}.u-tips-color{color:#909193}.u-light-color{color:#c0c4cc}.u-safe-area-inset-top{padding-top:0;padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.u-safe-area-inset-right{padding-right:0;padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.u-safe-area-inset-bottom{padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.u-safe-area-inset-left{padding-left:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left)}\nuni-toast{z-index:10090}uni-toast .uni-toast{z-index:10090}\n::-webkit-scrollbar{display:none;width:0!important;height:0!important;-webkit-appearance:none;background:transparent}body{background-color:#f3f4f6}',""]),e["default"]=u}},e={};function o(t){var i=e[t];if(void 0!==i)return i.exports;var r=e[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=n,function(){o.amdD=function(){throw new Error("define cannot be used indirect")}}(),function(){var n=[];o.O=function(e,t,i,r){if(!t){var a=1/0;for(l=0;l=r)&&Object.keys(o.O).every((function(n){return o.O[n](t[c])}))?t.splice(c--,1):(u=!1,r0&&n[l-1][2]>r;l--)n[l]=n[l-1];n[l]=[t,i,r]}}(),function(){o.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return o.d(e,{a:e}),e}}(),function(){o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})}}(),function(){o.f={},o.e=function(n){return Promise.all(Object.keys(o.f).reduce((function(e,t){return o.f[t](n,e),e}),[]))}}(),function(){o.u=function(n){return"static/js/"+({58:"pages-index-index",487:"pages-record-detail",492:"pages-record-index",545:"pages-index-welcome",607:"pages-login-index",905:"pages-user-index",913:"pages-register-index"}[n]||n)+"."+{56:"8a0d84b8",58:"f1895627",102:"03435c48",125:"0b6c7a32",202:"7e8e9e5c",241:"ca33bc23",297:"0381efa6",344:"bc29a90f",487:"34f2eb53",492:"d892d2f8",545:"2b4587f4",607:"238b6ee6",787:"ef344ac6",905:"bb975446",913:"2344e4b7",981:"925b79b6"}[n]+".js"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}()}(),function(){o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)}}(),function(){var n={},e="uniapp:";o.l=function(t,i,r,a){if(n[t])n[t].push(i);else{var u,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l=0}}},l=r,c=(n(4186),n(1503)),p=(0,c.Z)(l,o,u,!1,null,"4025ac66",null,!1,a,i),d=p.exports},5294:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var i,a={uCellGroup:n(156).Z,uCell:n(7981).Z,uAvatar:n(8125).Z,uEmpty:n(4555).Z,uButton:n(7344).Z},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"info"},[n("u-cell-group",[n("u-cell",{attrs:{title:t.info.name,url:"/pages/user/index",isLink:!0}},[n("v-uni-view",{attrs:{slot:"icon"},slot:"icon"},[n("u-avatar",{attrs:{src:t.info.avatar}})],1)],1)],1)],1),n("v-uni-view",{staticClass:"btns"},[0==t.list.length?n("u-empty",{attrs:{mode:"list",text:"暂无分类"}}):t._e(),t._l(t.list,(function(e){return n("v-uni-view",{key:e.id,staticClass:"btn"},[n("u-button",{attrs:{icon:e.image,text:e.name,size:"large"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.itemClick(e.patient_id)}}})],1)}))],2),n("v-uni-view",{staticClass:"footer"},[n("u-button",{attrs:{text:"退出登录",type:"error"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.logout.apply(void 0,arguments)}}})],1)],1)},u=[],s=(n(9299),{data:function(){return{info:{},list:[]}},onLoad:function(){this.init()},methods:{init:function(){var t=this;this.$ajax.get("/api/client/user/profile").then((function(e){0==e.status&&(t.info=e.data)})),this.$ajax.get("/api/client/patient").then((function(e){0==e.status&&(t.list=e.data.map((function(t){var e=t.type;return e.patient_id=t.id,e})))}))},itemClick:function(t){uni.navigateTo({url:"/pages/record/index?type_id=".concat(t)})},logout:function(){var t=this;uni.showModal({title:"退出登录",content:"是否确定?",success:function(e){e.confirm&&t.$ajax.get("/api/client/logout").then((function(t){0==t.status&&(uni.removeStorageSync("medical_record_client_auth_token"),uni.reLaunch({url:"/pages/login/index"}))}))}})}}}),r=s,l=(n(6675),n(1503)),c=(0,l.Z)(r,o,u,!1,null,"049ef548",null,!1,a,i),p=c.exports},3052:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),u=n.n(o),s=u()(a());s.push([t.id,".page[data-v-049ef548]{padding:20px 10px;box-sizing:border-box}.info[data-v-049ef548]{background:#fff}.btns[data-v-049ef548]{margin-top:%?300?%;display:flex;flex-direction:column;align-items:center}.btns .btn[data-v-049ef548]{width:100%;margin-top:20px}.footer[data-v-049ef548]{margin-top:%?100?%}",""]),e["default"]=s},1910:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),u=n.n(o),s=u()(a());s.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-4025ac66], uni-scroll-view[data-v-4025ac66], uni-swiper-item[data-v-4025ac66]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-empty[data-v-4025ac66]{\ndisplay:flex;\nflex-direction:row;flex-direction:column;justify-content:center;align-items:center}.u-empty__text[data-v-4025ac66]{\ndisplay:flex;\nflex-direction:row;justify-content:center;align-items:center;margin-top:%?20?%}.u-slot-wrap[data-v-4025ac66]{\ndisplay:flex;\nflex-direction:row;justify-content:center;align-items:center;margin-top:%?20?%}',""]),e["default"]=s}}]); \ No newline at end of file diff --git a/public/client/static/js/pages-index-index.f1895627.js b/public/client/static/js/pages-index-index.f1895627.js new file mode 100644 index 0000000..4b42b26 --- /dev/null +++ b/public/client/static/js/pages-index-index.f1895627.js @@ -0,0 +1 @@ +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[58],{1045:function(t,e,n){var i=n(9525);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var a=n(5472).Z;a("138331d2",i,!0,{sourceMap:!1,shadowMode:!1})},4186:function(t,e,n){var i=n(1910);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var a=n(5472).Z;a("f31422a4",i,!0,{sourceMap:!1,shadowMode:!1})},4555:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var i,a={uIcon:n(5862).Z},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("v-uni-view",{staticClass:"u-empty",style:[t.emptyStyle]},[t.isSrc?n("v-uni-image",{style:{width:t.$u.addUnit(t.width),height:t.$u.addUnit(t.height)},attrs:{src:t.icon,mode:"widthFix"}}):n("u-icon",{attrs:{name:"message"===t.mode?"chat":"empty-"+t.mode,size:t.iconSize,color:t.iconColor,"margin-top":"14"}}),n("v-uni-text",{staticClass:"u-empty__text",style:[t.textStyle]},[t._v(t._s(t.text?t.text:t.icons[t.mode]))]),t.$slots.default||t.$slots.$default?n("v-uni-view",{staticClass:"u-empty__wrap"},[t._t("default")],2):t._e()],1):t._e()},u=[],s={props:{icon:{type:String,default:uni.$u.props.empty.icon},text:{type:String,default:uni.$u.props.empty.text},textColor:{type:String,default:uni.$u.props.empty.textColor},textSize:{type:[String,Number],default:uni.$u.props.empty.textSize},iconColor:{type:String,default:uni.$u.props.empty.iconColor},iconSize:{type:[String,Number],default:uni.$u.props.empty.iconSize},mode:{type:String,default:uni.$u.props.empty.mode},width:{type:[String,Number],default:uni.$u.props.empty.width},height:{type:[String,Number],default:uni.$u.props.empty.height},show:{type:Boolean,default:uni.$u.props.empty.show},marginTop:{type:[String,Number],default:uni.$u.props.empty.marginTop}}},r={name:"u-empty",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],data(){return{icons:{car:"购物车为空",page:"页面不存在",search:"没有搜索结果",address:"没有收货地址",wifi:"没有WiFi",order:"订单为空",coupon:"没有优惠券",favor:"暂无收藏",permission:"无权限",history:"无历史记录",news:"无新闻列表",message:"消息列表为空",list:"列表为空",data:"数据为空",comment:"暂无评论"}}},computed:{emptyStyle(){const t={};return t.marginTop=uni.$u.addUnit(this.marginTop),uni.$u.deepMerge(uni.$u.addStyle(this.customStyle),t)},textStyle(){const t={};return t.color=this.textColor,t.fontSize=uni.$u.addUnit(this.textSize),t},isSrc(){return this.icon.indexOf("/")>=0}}},l=r,c=(n(4186),n(1503)),p=(0,c.Z)(l,o,u,!1,null,"4025ac66",null,!1,a,i),d=p.exports},5477:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var i,a={uCellGroup:n(156).Z,uCell:n(7981).Z,uAvatar:n(8125).Z,uEmpty:n(4555).Z,uButton:n(7344).Z},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"info"},[n("u-cell-group",[n("u-cell",{attrs:{title:t.info.name,url:"/pages/user/index",isLink:!0}},[n("v-uni-view",{attrs:{slot:"icon"},slot:"icon"},[n("u-avatar",{attrs:{src:t.info.avatar}})],1)],1)],1)],1),n("v-uni-view",{staticClass:"btns"},[0==t.list.length?n("u-empty",{attrs:{mode:"list",text:"暂无就诊记录"}}):t._e(),t._l(t.list,(function(e){return n("v-uni-view",{key:e.id,staticClass:"btn"},[n("u-button",{attrs:{icon:e.image,text:e.name,size:"large"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.itemClick(e.patient_id)}}})],1)}))],2),n("v-uni-view",{staticClass:"footer"},[n("u-button",{attrs:{text:"退出登录",type:"error"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.logout.apply(void 0,arguments)}}})],1)],1)},u=[],s=(n(9299),{data:function(){return{info:{},list:[]}},onLoad:function(){this.init()},methods:{init:function(){var t=this;this.$ajax.get("/api/client/user/profile").then((function(e){0==e.status&&(t.info=e.data)})),this.$ajax.get("/api/client/patient").then((function(e){0==e.status&&(t.list=e.data.map((function(t){var e=t.type;return e.patient_id=t.id,e})))}))},itemClick:function(t){uni.navigateTo({url:"/pages/record/index?type_id=".concat(t)})},logout:function(){var t=this;uni.showModal({title:"退出登录",content:"是否确定?",success:function(e){e.confirm&&t.$ajax.get("/api/client/logout").then((function(t){0==t.status&&(uni.removeStorageSync("medical_record_client_auth_token"),uni.reLaunch({url:"/pages/login/index"}))}))}})}}}),r=s,l=(n(1045),n(1503)),c=(0,l.Z)(r,o,u,!1,null,"263b481e",null,!1,a,i),p=c.exports},9525:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),u=n.n(o),s=u()(a());s.push([t.id,".page[data-v-263b481e]{padding:20px 10px;box-sizing:border-box}.info[data-v-263b481e]{background:#fff}.btns[data-v-263b481e]{margin-top:%?300?%;display:flex;flex-direction:column;align-items:center}.btns .btn[data-v-263b481e]{width:100%;margin-top:20px}.footer[data-v-263b481e]{margin-top:%?100?%}",""]),e["default"]=s},1910:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),u=n.n(o),s=u()(a());s.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-4025ac66], uni-scroll-view[data-v-4025ac66], uni-swiper-item[data-v-4025ac66]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-empty[data-v-4025ac66]{\ndisplay:flex;\nflex-direction:row;flex-direction:column;justify-content:center;align-items:center}.u-empty__text[data-v-4025ac66]{\ndisplay:flex;\nflex-direction:row;justify-content:center;align-items:center;margin-top:%?20?%}.u-slot-wrap[data-v-4025ac66]{\ndisplay:flex;\nflex-direction:row;justify-content:center;align-items:center;margin-top:%?20?%}',""]),e["default"]=s}}]); \ No newline at end of file diff --git a/public/client/static/js/pages-login-index.06e936eb.js b/public/client/static/js/pages-login-index.06e936eb.js deleted file mode 100644 index 3987c06..0000000 --- a/public/client/static/js/pages-login-index.06e936eb.js +++ /dev/null @@ -1 +0,0 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[607],{1643:function(t,e,n){var s=n(5463);s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.id,s,""]]),s.locals&&(t.exports=s.locals);var a=n(5472).Z;a("fd703bc0",s,!0,{sourceMap:!1,shadowMode:!1})},3729:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d}});var s,a={uRow:n(7711).Z,uCol:n(4533).Z,"u-Image":n(5392).Z,"u-Form":n(2975).Z,uFormItem:n(3751).Z,"u-Input":n(469).Z,uButton:n(7344).Z},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"form"},[n("v-uni-view",{staticClass:"title"},[n("u-row",{attrs:{justify:"space-between"}},[n("u-col",{attrs:{span:"6"}},[n("u--image",{attrs:{src:t.logo,width:"40",height:"40"}})],1),n("u-col",{attrs:{span:"6",textAlign:"right"}},[n("v-uni-text",{staticClass:"app-name"},[t._v(t._s(t.appName))])],1)],1)],1),n("u--form",{ref:"form",attrs:{model:t.user,labelWidth:"70"}},[n("u-form-item",{ref:"username",attrs:{label:"手机号",prop:"username",required:!0}},[n("u--input",{attrs:{focus:!0,border:"bottom",placeholder:"请填写手机号"},model:{value:t.user.username,callback:function(e){t.$set(t.user,"username",e)},expression:"user.username"}})],1),n("u-form-item",{ref:"password",attrs:{label:"密码",prop:"password",required:!0}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写密码",password:!0},model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}})],1)],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"登录",type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"注册",type:"error"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.register.apply(void 0,arguments)}}})],1)],1),n("v-uni-view",{staticClass:"icp"},[n("v-uni-text",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleIcp.apply(void 0,arguments)}}},[t._v(t._s(t.setting.web_icp))])],1)],1)},o=[],r=(n(6228),{data:function(){return{user:{username:"",password:"",openid:"",open_type:""},rules:{username:{required:!0,message:"手机号必填",trigger:["blur","change"]},password:{required:!0,message:"密码必填",trigger:["blur","change"]}},setting:{},logo:"",appName:"",openid:"",open_type:""}},onLoad:function(t){this.user.openid=t.openid,this.user.open_type=t.open_type,console.log(this.user)},onReady:function(){var t=this;this.$refs["form"].setRules(this.rules),this.$ajax.get("/admin-api/_settings").then((function(e){0==e.status&&(t.setting=e.data,t.logo=t.setting.logo,t.appName=t.setting.app_name)}))},methods:{submit:function(){var t=this;this.$refs["form"].validate().then((function(e){uni.showLoading(),t.$ajax.post("/api/client/login",t.user).then((function(t){uni.hideLoading(),0==t.status&&(uni.showToast({title:"登录成功",icon:"success"}),uni.setStorageSync("medical_record_client_auth_token",t.data.token),uni.redirectTo({url:"/pages/index/index"}))}))})).catch((function(t){}))},handleIcp:function(){window.open("https://beian.miit.gov.cn","_blank")},register:function(){uni.navigateTo({url:"/pages/register/index?openid=".concat(this.user.openid,"&open_type=").concat(this.user.open_type)})}}}),u=r,p=(n(1643),n(1503)),c=(0,p.Z)(u,i,o,!1,null,"d8cd7692",null,!1,a,s),d=c.exports},5463:function(t,e,n){"use strict";n.r(e);var s=n(2916),a=n.n(s),i=n(3282),o=n.n(i),r=o()(a());r.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.page[data-v-d8cd7692]{background:linear-gradient(200deg,#c6e1ff,#4080ff);height:100vh;display:flex;flex-direction:column;justify-content:center}.buttom-image[data-v-d8cd7692]{position:absolute;width:100%;height:200px;bottom:0;top:80%}.form[data-v-d8cd7692]{padding:10px 20px;background-color:#fff;margin:0 10px;border-radius:10px}.title[data-v-d8cd7692]{margin:10px 0}.button[data-v-d8cd7692]{margin-top:10px}.app-name[data-v-d8cd7692]{font-size:20px}.icp[data-v-d8cd7692]{margin-top:50px;text-align:center;color:#fff}',""]),e["default"]=r}}]); \ No newline at end of file diff --git a/public/client/static/js/pages-login-index.238b6ee6.js b/public/client/static/js/pages-login-index.238b6ee6.js new file mode 100644 index 0000000..d4d61e8 --- /dev/null +++ b/public/client/static/js/pages-login-index.238b6ee6.js @@ -0,0 +1 @@ +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[607],{3767:function(t,e,n){var s=n(5276);s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.id,s,""]]),s.locals&&(t.exports=s.locals);var a=n(5472).Z;a("0f7d524d",s,!0,{sourceMap:!1,shadowMode:!1})},7354:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d}});var s,a={uRow:n(7711).Z,uCol:n(4533).Z,"u-Image":n(5392).Z,"u-Form":n(2975).Z,uFormItem:n(3751).Z,"u-Input":n(469).Z,uButton:n(7344).Z},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"form"},[n("v-uni-view",{staticClass:"title"},[n("u-row",{attrs:{justify:"space-between"}},[n("u-col",{attrs:{span:"6"}},[n("u--image",{attrs:{src:t.logo,width:"40",height:"40"}})],1),n("u-col",{attrs:{span:"6",textAlign:"right"}},[n("v-uni-text",{staticClass:"app-name"},[t._v(t._s(t.appName))])],1)],1)],1),n("u--form",{ref:"form",attrs:{model:t.user,labelWidth:"70"}},[n("u-form-item",{ref:"username",attrs:{label:"手机号",prop:"username",required:!0}},[n("u--input",{attrs:{focus:!0,border:"bottom",placeholder:"请填写手机号"},model:{value:t.user.username,callback:function(e){t.$set(t.user,"username",e)},expression:"user.username"}})],1),n("u-form-item",{ref:"password",attrs:{label:"密码",prop:"password",required:!0}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写密码",password:!0},model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}})],1)],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"登录",type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"注册",type:"error"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.register.apply(void 0,arguments)}}})],1)],1),n("v-uni-view",{staticClass:"icp"},[n("v-uni-text",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleIcp.apply(void 0,arguments)}}},[t._v(t._s(t.setting.web_icp))])],1)],1)},o=[],r=(n(6228),{data:function(){return{user:{username:"",password:"",openid:"",open_type:""},rules:{username:{required:!0,message:"手机号必填",trigger:["blur","change"]},password:{required:!0,message:"密码必填",trigger:["blur","change"]}},setting:{},logo:"",appName:"",openid:"",open_type:""}},onLoad:function(t){t.openid&&t.open_type&&(this.user.openid=t.openid,this.user.open_type=t.open_type)},onReady:function(){var t=this;this.$refs["form"].setRules(this.rules),this.$ajax.get("/admin-api/_settings").then((function(e){0==e.status&&(t.setting=e.data,t.logo=t.setting.logo,t.appName=t.setting.app_name)}))},methods:{submit:function(){var t=this;this.$refs["form"].validate().then((function(e){uni.showLoading(),t.$ajax.post("/api/client/login",t.user).then((function(t){uni.hideLoading(),0==t.status&&(uni.showToast({title:"登录成功",icon:"success"}),uni.setStorageSync("medical_record_client_auth_token",t.data.token),uni.redirectTo({url:"/pages/index/index"}))}))})).catch((function(t){}))},handleIcp:function(){window.open("https://beian.miit.gov.cn","_blank")},register:function(){var t="/pages/register/index";this.user.openid&&this.user.open_type&&(t+="?openid=".concat(this.user.openid,"&open_type=").concat(this.user.open_type)),uni.navigateTo({url:t})}}}),u=r,p=(n(3767),n(1503)),c=(0,p.Z)(u,i,o,!1,null,"3cb04204",null,!1,a,s),d=c.exports},5276:function(t,e,n){"use strict";n.r(e);var s=n(2916),a=n.n(s),i=n(3282),o=n.n(i),r=o()(a());r.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.page[data-v-3cb04204]{background:linear-gradient(200deg,#c6e1ff,#4080ff);height:100vh;display:flex;flex-direction:column;justify-content:center}.buttom-image[data-v-3cb04204]{position:absolute;width:100%;height:200px;bottom:0;top:80%}.form[data-v-3cb04204]{padding:10px 20px;background-color:#fff;margin:0 10px;border-radius:10px}.title[data-v-3cb04204]{margin:10px 0}.button[data-v-3cb04204]{margin-top:10px}.app-name[data-v-3cb04204]{font-size:20px}.icp[data-v-3cb04204]{margin-top:50px;text-align:center;color:#fff}',""]),e["default"]=r}}]); \ No newline at end of file diff --git a/public/client/static/js/pages-register-index.d2270187.js b/public/client/static/js/pages-register-index.2344e4b7.js similarity index 53% rename from public/client/static/js/pages-register-index.d2270187.js rename to public/client/static/js/pages-register-index.2344e4b7.js index 1eab61e..53eb9d4 100644 --- a/public/client/static/js/pages-register-index.d2270187.js +++ b/public/client/static/js/pages-register-index.2344e4b7.js @@ -1 +1 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[913],{6609:function(e,t,n){var a=n(7308);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var i=n(5472).Z;i("27319f71",a,!0,{sourceMap:!1,shadowMode:!1})},8935:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var a,i={uRow:n(7711).Z,uCol:n(4533).Z,"u-Image":n(5392).Z,"u-Form":n(2975).Z,uFormItem:n(3751).Z,"u-Input":n(469).Z,uIcon:n(5862).Z,uButton:n(7344).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(3220).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"form"},[n("v-uni-view",{staticClass:"title"},[n("u-row",{attrs:{justify:"space-between"}},[n("u-col",{attrs:{span:"6"}},[n("u--image",{attrs:{src:e.logo,width:"40",height:"40"}})],1),n("u-col",{attrs:{span:"6",textAlign:"right"}},[n("v-uni-text",{staticClass:"app-name"},[e._v(e._s(e.appName))])],1)],1)],1),n("u--form",{ref:"form",attrs:{model:e.user,labelWidth:"70"}},[n("u-form-item",{attrs:{label:"手机号",prop:"phone",required:!0}},[n("u--input",{attrs:{focus:!0,border:"bottom",placeholder:"请填写手机号"},model:{value:e.user.phone,callback:function(t){e.$set(e.user,"phone",t)},expression:"user.phone"}})],1),n("u-form-item",{attrs:{label:"密码",prop:"password",required:!0}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写密码",password:!0},model:{value:e.user.password,callback:function(t){e.$set(e.user,"password",t)},expression:"user.password"}})],1),n("u-form-item",{attrs:{label:"姓名",prop:"name"}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写姓名"},model:{value:e.user.name,callback:function(t){e.$set(e.user,"name",t)},expression:"user.name"}})],1),n("u-form-item",{attrs:{label:"性别",prop:"sex"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openGender.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input-text"},[n("v-uni-text",[e._v(e._s(e.gender.text))]),n("u-icon",{attrs:{name:"arrow-right"}})],1)],1),n("u-form-item",{attrs:{label:"生日",prop:"birthday"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openBirthday.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input-text"},[n("v-uni-text",{class:{"input-placeholder":!e.user.birthday}},[e._v(e._s(e.birthday.text))]),n("u-icon",{attrs:{name:"arrow-right"}})],1)],1),n("u-form-item",{attrs:{label:"住址",prop:"address"}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写地址"},model:{value:e.user.address,callback:function(t){e.$set(e.user,"address",t)},expression:"user.address"}})],1)],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"注册",type:"error"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}})],1),n("u-action-sheet",{attrs:{show:e.gender.show,actions:e.gender.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeGender.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:e.birthday.show,closeOnClickOverlay:!0,minDate:e.birthday.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.openBirthday.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeBirthday.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectBirthday.apply(void 0,arguments)}},model:{value:e.birthday.value,callback:function(t){e.$set(e.birthday,"value",t)},expression:"birthday.value"}})],1),n("v-uni-view",{staticClass:"icp"},[n("v-uni-text",{on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleIcp.apply(void 0,arguments)}}},[e._v(e._s(e.setting.web_icp))])],1)],1)},s=[],r=n(8059),u={data:function(){return{user:{phone:"",password:"",openid:"",open_type:"",name:"",sex:r.Z.none.value,address:""},rules:{phone:{required:!0,message:"手机号必填",trigger:["blur","change"]},password:{required:!0,message:"密码必填",trigger:["blur","change"]}},setting:{},logo:"",appName:"",openid:"",open_type:"",gender:{show:!1,text:r.Z.none.text,options:r.Z.options},birthday:{show:!1,text:"请选择生日",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()}}},onLoad:function(e){this.user.openid=e.openid,this.user.open_type=e.open_type,console.log(this.user)},onReady:function(){var e=this;this.$refs["form"].setRules(this.rules),this.$ajax.get("/admin-api/_settings").then((function(t){0==t.status&&(e.setting=t.data,e.logo=e.setting.logo,e.appName=e.setting.app_name)}))},methods:{submit:function(){var e=this;this.$refs["form"].validate().then((function(t){uni.showLoading(),e.$ajax.post("/api/client/register",e.user).then((function(e){uni.hideLoading(),0==e.status&&(uni.showToast({title:"注册成功",icon:"success"}),setTimeout((function(){uni.setStorageSync("medical_record_client_auth_token",e.data.token),uni.redirectTo({url:"/pages/index/index"})}),800))}))})).catch((function(e){}))},handleIcp:function(){window.open("https://beian.miit.gov.cn","_blank")},openGender:function(){this.gender.show=!0},closeGender:function(){this.gender.show=!1},selectGender:function(e){this.gender.text=e.name,this.user.sex=e.value},openBirthday:function(){this.birthday.show=!0},closeBirthday:function(){this.birthday.show=!1},selectBirthday:function(e){this.user.birthday=this.birthday.text=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),this.closeBirthday()}}},d=u,c=(n(6609),n(1503)),l=(0,c.Z)(d,o,s,!1,null,"d048ec5c",null,!1,i,a),p=l.exports},7308:function(e,t,n){"use strict";n.r(t);var a=n(2916),i=n.n(a),o=n(3282),s=n.n(o),r=s()(i());r.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.page[data-v-d048ec5c]{background:linear-gradient(200deg,#c6e1ff,#4080ff);height:100vh;display:flex;flex-direction:column;justify-content:center}.buttom-image[data-v-d048ec5c]{position:absolute;width:100%;height:200px;bottom:0;top:80%}.form[data-v-d048ec5c]{padding:10px 20px;background-color:#fff;margin:0 10px;border-radius:10px}.title[data-v-d048ec5c]{margin:10px 0}.button[data-v-d048ec5c]{margin-top:10px}.app-name[data-v-d048ec5c]{font-size:20px}.icp[data-v-d048ec5c]{margin-top:50px;text-align:center;color:#fff}.input-text[data-v-d048ec5c]{color:#303133;font-size:15px;padding:6px 9px;border-bottom:1px solid #dadbde;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-d048ec5c]{color:silver}',""]),t["default"]=r}}]); \ No newline at end of file +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[913],{8348:function(e,t,n){var a=n(2403);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var i=n(5472).Z;i("49b92e26",a,!0,{sourceMap:!1,shadowMode:!1})},8773:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return c}});var a,i={uRow:n(7711).Z,uCol:n(4533).Z,"u-Image":n(5392).Z,"u-Form":n(2975).Z,uFormItem:n(3751).Z,"u-Input":n(469).Z,uIcon:n(5862).Z,uButton:n(7344).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(3220).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"form"},[n("v-uni-view",{staticClass:"title"},[n("u-row",{attrs:{justify:"space-between"}},[n("u-col",{attrs:{span:"6"}},[n("u--image",{attrs:{src:e.logo,width:"40",height:"40"}})],1),n("u-col",{attrs:{span:"6",textAlign:"right"}},[n("v-uni-text",{staticClass:"app-name"},[e._v(e._s(e.appName))])],1)],1)],1),n("u--form",{ref:"form",attrs:{model:e.user,labelWidth:"70"}},[n("u-form-item",{attrs:{label:"手机号",prop:"phone",required:!0}},[n("u--input",{attrs:{focus:!0,border:"bottom",placeholder:"请填写手机号"},model:{value:e.user.phone,callback:function(t){e.$set(e.user,"phone",t)},expression:"user.phone"}})],1),n("u-form-item",{attrs:{label:"密码",prop:"password",required:!0}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写密码",password:!0},model:{value:e.user.password,callback:function(t){e.$set(e.user,"password",t)},expression:"user.password"}})],1),n("u-form-item",{attrs:{label:"姓名",prop:"name"}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写姓名"},model:{value:e.user.name,callback:function(t){e.$set(e.user,"name",t)},expression:"user.name"}})],1),n("u-form-item",{attrs:{label:"性别",prop:"sex"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openGender.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input-text"},[n("v-uni-text",[e._v(e._s(e.gender.text))]),n("u-icon",{attrs:{name:"arrow-right"}})],1)],1),n("u-form-item",{attrs:{label:"生日",prop:"birthday"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openBirthday.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input-text"},[n("v-uni-text",{class:{"input-placeholder":!e.user.birthday}},[e._v(e._s(e.birthday.text))]),n("u-icon",{attrs:{name:"arrow-right"}})],1)],1),n("u-form-item",{attrs:{label:"住址",prop:"address"}},[n("u--input",{attrs:{border:"bottom",placeholder:"请填写地址"},model:{value:e.user.address,callback:function(t){e.$set(e.user,"address",t)},expression:"user.address"}})],1)],1),n("v-uni-view",{staticClass:"button"},[n("u-button",{attrs:{text:"注册",type:"error"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}})],1),n("u-action-sheet",{attrs:{show:e.gender.show,actions:e.gender.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeGender.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:e.birthday.show,closeOnClickOverlay:!0,minDate:e.birthday.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.openBirthday.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeBirthday.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectBirthday.apply(void 0,arguments)}},model:{value:e.birthday.value,callback:function(t){e.$set(e.birthday,"value",t)},expression:"birthday.value"}})],1),n("v-uni-view",{staticClass:"icp"},[n("v-uni-text",{on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleIcp.apply(void 0,arguments)}}},[e._v(e._s(e.setting.web_icp))])],1)],1)},s=[],r=n(8059),u={data:function(){return{user:{phone:"",password:"",openid:"",open_type:"",name:"",sex:r.Z.none.value,address:""},rules:{phone:{required:!0,message:"手机号必填",trigger:["blur","change"]},password:{required:!0,message:"密码必填",trigger:["blur","change"]}},setting:{},logo:"",appName:"",openid:"",open_type:"",gender:{show:!1,text:r.Z.none.text,options:r.Z.options},birthday:{show:!1,text:"请选择生日",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()}}},onLoad:function(e){e.openid&&e.open_type&&(this.user.openid=e.openid,this.user.open_type=e.open_type)},onReady:function(){var e=this;this.$refs["form"].setRules(this.rules),this.$ajax.get("/admin-api/_settings").then((function(t){0==t.status&&(e.setting=t.data,e.logo=e.setting.logo,e.appName=e.setting.app_name)}))},methods:{submit:function(){var e=this;this.$refs["form"].validate().then((function(t){uni.showLoading(),e.$ajax.post("/api/client/register",e.user).then((function(e){uni.hideLoading(),0==e.status&&(uni.showToast({title:"注册成功",icon:"success"}),setTimeout((function(){uni.setStorageSync("medical_record_client_auth_token",e.data.token),uni.redirectTo({url:"/pages/index/index"})}),800))}))})).catch((function(e){}))},handleIcp:function(){window.open("https://beian.miit.gov.cn","_blank")},openGender:function(){this.gender.show=!0},closeGender:function(){this.gender.show=!1},selectGender:function(e){this.gender.text=e.name,this.user.sex=e.value},openBirthday:function(){this.birthday.show=!0},closeBirthday:function(){this.birthday.show=!1},selectBirthday:function(e){this.user.birthday=this.birthday.text=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),this.closeBirthday()}}},d=u,p=(n(8348),n(1503)),l=(0,p.Z)(d,o,s,!1,null,"19088fb5",null,!1,i,a),c=l.exports},2403:function(e,t,n){"use strict";n.r(t);var a=n(2916),i=n.n(a),o=n(3282),s=n.n(o),r=s()(i());r.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.page[data-v-19088fb5]{background:linear-gradient(200deg,#c6e1ff,#4080ff);height:100vh;display:flex;flex-direction:column;justify-content:center}.buttom-image[data-v-19088fb5]{position:absolute;width:100%;height:200px;bottom:0;top:80%}.form[data-v-19088fb5]{padding:10px 20px;background-color:#fff;margin:0 10px;border-radius:10px}.title[data-v-19088fb5]{margin:10px 0}.button[data-v-19088fb5]{margin-top:10px}.app-name[data-v-19088fb5]{font-size:20px}.icp[data-v-19088fb5]{margin-top:50px;text-align:center;color:#fff}.input-text[data-v-19088fb5]{color:#303133;font-size:15px;padding:6px 9px;border-bottom:1px solid #dadbde;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-19088fb5]{color:silver}',""]),t["default"]=r}}]); \ No newline at end of file diff --git a/public/client/static/js/pages-user-index.32f25ac1.js b/public/client/static/js/pages-user-index.bb975446.js similarity index 61% rename from public/client/static/js/pages-user-index.32f25ac1.js rename to public/client/static/js/pages-user-index.bb975446.js index 586e71f..c708ef0 100644 --- a/public/client/static/js/pages-user-index.32f25ac1.js +++ b/public/client/static/js/pages-user-index.bb975446.js @@ -1,3 +1,3 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[905],{2036:function(t,e,n){var o=n(9018);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);var r=n(5472).Z;r("31aa6336",o,!0,{sourceMap:!1,shadowMode:!1})},7337:function(t,e,n){var o=n(2462);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);var r=n(5472).Z;r("276d4995",o,!0,{sourceMap:!1,shadowMode:!1})},5912:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var o,r={uPopup:n(2061).Z,uLine:n(4060).Z,uLoadingIcon:n(8264).Z},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("u-popup",{attrs:{mode:"center",zoom:t.zoom,show:t.show,customStyle:{borderRadius:"6px",overflow:"hidden",marginTop:"-"+t.$u.addUnit(t.negativeTop)},closeOnClickOverlay:t.closeOnClickOverlay,safeAreaInsetBottom:!1,duration:400},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clickHandler.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"u-modal",style:{width:t.$u.addUnit(t.width)}},[t.title?n("v-uni-text",{staticClass:"u-modal__title"},[t._v(t._s(t.title))]):t._e(),n("v-uni-view",{staticClass:"u-modal__content",style:{paddingTop:(t.title?12:25)+"px"}},[t._t("default",[n("v-uni-text",{staticClass:"u-modal__content__text"},[t._v(t._s(t.content))])])],2),t.$slots.confirmButton?n("v-uni-view",{staticClass:"u-modal__button-group--confirm-button"},[t._t("confirmButton")],2):[n("u-line"),n("v-uni-view",{staticClass:"u-modal__button-group",style:{flexDirection:t.buttonReverse?"row-reverse":"row"}},[t.showCancelButton?n("v-uni-view",{staticClass:"u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel",class:[t.showCancelButton&&!t.showConfirmButton&&"u-modal__button-group__wrapper--only-cancel"],attrs:{"hover-stay-time":150,"hover-class":"u-modal__button-group__wrapper--hover"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.cancelHandler.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"u-modal__button-group__wrapper__text",style:{color:t.cancelColor}},[t._v(t._s(t.cancelText))])],1):t._e(),t.showConfirmButton&&t.showCancelButton?n("u-line",{attrs:{direction:"column"}}):t._e(),t.showConfirmButton?n("v-uni-view",{staticClass:"u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm",class:[!t.showCancelButton&&t.showConfirmButton&&"u-modal__button-group__wrapper--only-confirm"],attrs:{"hover-stay-time":150,"hover-class":"u-modal__button-group__wrapper--hover"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmHandler.apply(void 0,arguments)}}},[t.loading?n("u-loading-icon"):n("v-uni-text",{staticClass:"u-modal__button-group__wrapper__text",style:{color:t.confirmColor}},[t._v(t._s(t.confirmText))])],1):t._e()],1)]],2)],1)},i=[],l={props:{show:{type:Boolean,default:uni.$u.props.modal.show},title:{type:[String],default:uni.$u.props.modal.title},content:{type:String,default:uni.$u.props.modal.content},confirmText:{type:String,default:uni.$u.props.modal.confirmText},cancelText:{type:String,default:uni.$u.props.modal.cancelText},showConfirmButton:{type:Boolean,default:uni.$u.props.modal.showConfirmButton},showCancelButton:{type:Boolean,default:uni.$u.props.modal.showCancelButton},confirmColor:{type:String,default:uni.$u.props.modal.confirmColor},cancelColor:{type:String,default:uni.$u.props.modal.cancelColor},buttonReverse:{type:Boolean,default:uni.$u.props.modal.buttonReverse},zoom:{type:Boolean,default:uni.$u.props.modal.zoom},asyncClose:{type:Boolean,default:uni.$u.props.modal.asyncClose},closeOnClickOverlay:{type:Boolean,default:uni.$u.props.modal.closeOnClickOverlay},negativeTop:{type:[String,Number],default:uni.$u.props.modal.negativeTop},width:{type:[String,Number],default:uni.$u.props.modal.width},confirmButtonShape:{type:String,default:uni.$u.props.modal.confirmButtonShape}}},u={name:"u-modal",mixins:[uni.$u.mpMixin,uni.$u.mixin,l],data(){return{loading:!1}},watch:{show(t){t&&this.loading&&(this.loading=!1)}},methods:{confirmHandler(){this.asyncClose&&(this.loading=!0),this.$emit("confirm")},cancelHandler(){this.$emit("cancel")},clickHandler(){this.closeOnClickOverlay&&this.$emit("close")}}},c=u,s=(n(7337),n(1503)),d=(0,s.Z)(c,a,i,!1,null,"2ec05739",null,!1,r,o),p=d.exports},4010:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var o,r={uCellGroup:n(156).Z,uCell:n(7981).Z,uAvatar:n(8125).Z,uModal:n(5912).Z,"u-Input":n(469).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(3220).Z},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("u-cell-group",[n("u-cell",{attrs:{title:"手机号",value:t.info.phone}}),n("u-cell",{attrs:{title:"头像",isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleAvatar.apply(void 0,arguments)}}},[n("u-avatar",{attrs:{slot:"value",src:t.info.avatar},slot:"value"})],1),n("u-cell",{attrs:{title:"姓名",value:t.info.name,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("姓名","name")}}}),n("u-cell",{attrs:{title:"性别",value:t.info.sex_text,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openGender.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"生日",value:t.info.birthday_format,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openBirthday.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"住址",value:t.info.address,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("住址","address")}}})],1),n("u-modal",{attrs:{show:t.modal.show,title:t.modal.title,showCancelButton:!0,closeOnClickOverlay:!0,asyncClose:!0},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmModal.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)},close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)}}},[n("u--input",{attrs:{border:"surround"},model:{value:t.modal.value,callback:function(e){t.$set(t.modal,"value",e)},expression:"modal.value"}})],1),n("u-action-sheet",{attrs:{show:t.gender.show,actions:t.gender.options,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeGender.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:t.birthday.show,closeOnClickOverlay:!0,minDate:t.birthday.minDate},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.openBirthday.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeBirthday.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.selectBirthday.apply(void 0,arguments)}},model:{value:t.birthday.value,callback:function(e){t.$set(t.birthday,"value",e)},expression:"birthday.value"}})],1)},i=[],l=n(3762),u=n(3062),c=n(8059),s={data:function(){return{info:{},modal:{show:!1,title:"",key:"",value:""},gender:{show:!1,options:c.Z.options},birthday:{show:!1,value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()}}},onLoad:function(){this.init()},methods:{init:function(){var t=this;this.$ajax.get("/api/client/user/profile").then((function(e){0==e.status&&(t.info=e.data)}))},handleAvatar:function(){var t=this;uni.chooseImage({count:1,success:function(){var e=(0,u.Z)((0,l.Z)().mark((function e(n){var o,r;return(0,l.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$ajax.upload("/api/web/upload",{filePath:n.tempFilePaths[0],custom:{toast:!1,loading:!1},name:"file"});case 2:if(o=e.sent,uni.showLoading(),0!=o.status){e.next=9;break}return e.next=7,t.update({avatar:o.data.file});case 7:r=e.sent,0==r.status&&(t.info.avatar=o.data.file);case 9:case"end":return e.stop()}}),e)})));function n(t){return e.apply(this,arguments)}return n}()})},openModal:function(t,e){this.modal.title=t,this.modal.key=e,this.modal.show=!0,this.modal.value=this.info[e]},confirmModal:function(){var t=this,e=this.modal.key,n=this.modal.value,o={};o[e]=n,this.update(o).then((function(o){t.modal.show=!1,0==o.status&&(t.info[e]=n)}))},closeModal:function(){this.modal.show=!1},openGender:function(){this.gender.show=!0},closeGender:function(){this.gender.show=!1},selectGender:function(t){var e=this;this.update({sex:t.value}).then((function(n){0==n.status&&(e.info.sex_text=t.name,e.info.sex=t.value)}))},openBirthday:function(){this.birthday.show=!0},closeBirthday:function(){this.birthday.show=!1},selectBirthday:function(t){var e=this,n=uni.$u.timeFormat(t.value,"yyyy-mm-dd");this.update({birthday:n}).then((function(t){0==t.status&&(e.info.birthday=e.info.birthday_format=n,e.closeBirthday())}))},update:function(t){return this.$ajax.post("/api/client/user/profile",t,{custom:{loading:!0}})}}},d=s,p=(n(2036),n(1503)),f=(0,p.Z)(d,a,i,!1,null,"6141b56a",null,!1,r,o),h=f.exports},6916:function(t,e,n){var o=n(555);o("asyncIterator")},9018:function(t,e,n){"use strict";n.r(e);var o=n(2916),r=n.n(o),a=n(3282),i=n.n(a),l=i()(r());l.push([t.id,".page[data-v-6141b56a]{padding:20px 0;box-sizing:border-box}.page[data-v-6141b56a] .u-cell-group{background:#fff}",""]),e["default"]=l},2462:function(t,e,n){"use strict";n.r(e);var o=n(2916),r=n.n(o),a=n(3282),i=n.n(a),l=i()(r());l.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-2ec05739], uni-scroll-view[data-v-2ec05739], uni-swiper-item[data-v-2ec05739]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-modal[data-v-2ec05739]{width:%?650?%;border-radius:6px;overflow:hidden}.u-modal__title[data-v-2ec05739]{font-size:16px;font-weight:700;color:#606266;text-align:center;padding-top:25px}.u-modal__content[data-v-2ec05739]{padding:12px 25px 25px 25px;\ndisplay:flex;\nflex-direction:row;justify-content:center}.u-modal__content__text[data-v-2ec05739]{font-size:15px;color:#606266;flex:1}.u-modal__button-group[data-v-2ec05739]{\ndisplay:flex;\nflex-direction:row}.u-modal__button-group--confirm-button[data-v-2ec05739]{flex-direction:column;padding:0 25px 15px 25px}.u-modal__button-group__wrapper[data-v-2ec05739]{flex:1;\ndisplay:flex;\nflex-direction:row;justify-content:center;align-items:center;height:48px}.u-modal__button-group__wrapper--confirm[data-v-2ec05739], .u-modal__button-group__wrapper--only-cancel[data-v-2ec05739]{border-bottom-right-radius:6px}.u-modal__button-group__wrapper--cancel[data-v-2ec05739], .u-modal__button-group__wrapper--only-confirm[data-v-2ec05739]{border-bottom-left-radius:6px}.u-modal__button-group__wrapper--hover[data-v-2ec05739]{background-color:#f3f4f6}.u-modal__button-group__wrapper__text[data-v-2ec05739]{color:#606266;font-size:16px;text-align:center}',""]),e["default"]=l},3062:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(5827);function o(t,e,n,o,r,a,i){try{var l=t[a](i),u=l.value}catch(c){return void n(c)}l.done?e(u):Promise.resolve(u).then(o,r)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function l(t){o(i,r,a,l,u,"next",t)}function u(t){o(i,r,a,l,u,"throw",t)}l(void 0)}))}}},3762:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(5231),n(1260),n(3575),n(5827),n(485),n(8023),n(930),n(6916),n(1229),n(7611),n(8283),n(2883),n(6007),n(7143),n(1136),n(9312);var o=n(9684);function r(){ +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[905],{7495:function(t,e,n){var o=n(2340);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);var r=n(5472).Z;r("60035cd4",o,!0,{sourceMap:!1,shadowMode:!1})},7337:function(t,e,n){var o=n(2462);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);var r=n(5472).Z;r("276d4995",o,!0,{sourceMap:!1,shadowMode:!1})},5912:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var o,r={uPopup:n(2061).Z,uLine:n(4060).Z,uLoadingIcon:n(8264).Z},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("u-popup",{attrs:{mode:"center",zoom:t.zoom,show:t.show,customStyle:{borderRadius:"6px",overflow:"hidden",marginTop:"-"+t.$u.addUnit(t.negativeTop)},closeOnClickOverlay:t.closeOnClickOverlay,safeAreaInsetBottom:!1,duration:400},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clickHandler.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"u-modal",style:{width:t.$u.addUnit(t.width)}},[t.title?n("v-uni-text",{staticClass:"u-modal__title"},[t._v(t._s(t.title))]):t._e(),n("v-uni-view",{staticClass:"u-modal__content",style:{paddingTop:(t.title?12:25)+"px"}},[t._t("default",[n("v-uni-text",{staticClass:"u-modal__content__text"},[t._v(t._s(t.content))])])],2),t.$slots.confirmButton?n("v-uni-view",{staticClass:"u-modal__button-group--confirm-button"},[t._t("confirmButton")],2):[n("u-line"),n("v-uni-view",{staticClass:"u-modal__button-group",style:{flexDirection:t.buttonReverse?"row-reverse":"row"}},[t.showCancelButton?n("v-uni-view",{staticClass:"u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel",class:[t.showCancelButton&&!t.showConfirmButton&&"u-modal__button-group__wrapper--only-cancel"],attrs:{"hover-stay-time":150,"hover-class":"u-modal__button-group__wrapper--hover"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.cancelHandler.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"u-modal__button-group__wrapper__text",style:{color:t.cancelColor}},[t._v(t._s(t.cancelText))])],1):t._e(),t.showConfirmButton&&t.showCancelButton?n("u-line",{attrs:{direction:"column"}}):t._e(),t.showConfirmButton?n("v-uni-view",{staticClass:"u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm",class:[!t.showCancelButton&&t.showConfirmButton&&"u-modal__button-group__wrapper--only-confirm"],attrs:{"hover-stay-time":150,"hover-class":"u-modal__button-group__wrapper--hover"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmHandler.apply(void 0,arguments)}}},[t.loading?n("u-loading-icon"):n("v-uni-text",{staticClass:"u-modal__button-group__wrapper__text",style:{color:t.confirmColor}},[t._v(t._s(t.confirmText))])],1):t._e()],1)]],2)],1)},i=[],l={props:{show:{type:Boolean,default:uni.$u.props.modal.show},title:{type:[String],default:uni.$u.props.modal.title},content:{type:String,default:uni.$u.props.modal.content},confirmText:{type:String,default:uni.$u.props.modal.confirmText},cancelText:{type:String,default:uni.$u.props.modal.cancelText},showConfirmButton:{type:Boolean,default:uni.$u.props.modal.showConfirmButton},showCancelButton:{type:Boolean,default:uni.$u.props.modal.showCancelButton},confirmColor:{type:String,default:uni.$u.props.modal.confirmColor},cancelColor:{type:String,default:uni.$u.props.modal.cancelColor},buttonReverse:{type:Boolean,default:uni.$u.props.modal.buttonReverse},zoom:{type:Boolean,default:uni.$u.props.modal.zoom},asyncClose:{type:Boolean,default:uni.$u.props.modal.asyncClose},closeOnClickOverlay:{type:Boolean,default:uni.$u.props.modal.closeOnClickOverlay},negativeTop:{type:[String,Number],default:uni.$u.props.modal.negativeTop},width:{type:[String,Number],default:uni.$u.props.modal.width},confirmButtonShape:{type:String,default:uni.$u.props.modal.confirmButtonShape}}},u={name:"u-modal",mixins:[uni.$u.mpMixin,uni.$u.mixin,l],data(){return{loading:!1}},watch:{show(t){t&&this.loading&&(this.loading=!1)}},methods:{confirmHandler(){this.asyncClose&&(this.loading=!0),this.$emit("confirm")},cancelHandler(){this.$emit("cancel")},clickHandler(){this.closeOnClickOverlay&&this.$emit("close")}}},c=u,s=(n(7337),n(1503)),d=(0,s.Z)(c,a,i,!1,null,"2ec05739",null,!1,r,o),p=d.exports},7650:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var o,r={uCellGroup:n(156).Z,uCell:n(7981).Z,uAvatar:n(8125).Z,uModal:n(5912).Z,"u-Input":n(469).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(3220).Z},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("u-cell-group",[n("u-cell",{attrs:{title:"手机号",value:t.info.phone}}),n("u-cell",{attrs:{title:"头像",isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleAvatar.apply(void 0,arguments)}}},[n("u-avatar",{attrs:{slot:"value",src:t.info.avatar},slot:"value"})],1),n("u-cell",{attrs:{title:"姓名",value:t.info.name,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("姓名","name")}}}),n("u-cell",{attrs:{title:"性别",value:t.info.sex_text,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openGender.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"生日",value:t.info.birthday_format,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openBirthday.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"住址",value:t.info.address,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("住址","address")}}})],1),n("u-modal",{attrs:{show:t.modal.show,title:t.modal.title,showCancelButton:!0,closeOnClickOverlay:!0,asyncClose:!0},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmModal.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)},close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)}}},[n("u--input",{attrs:{border:"surround"},model:{value:t.modal.value,callback:function(e){t.$set(t.modal,"value",e)},expression:"modal.value"}})],1),n("u-action-sheet",{attrs:{show:t.gender.show,actions:t.gender.options,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeGender.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:t.birthday.show,closeOnClickOverlay:!0,minDate:t.birthday.minDate},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.openBirthday.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeBirthday.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.selectBirthday.apply(void 0,arguments)}},model:{value:t.birthday.value,callback:function(e){t.$set(t.birthday,"value",e)},expression:"birthday.value"}})],1)},i=[],l=n(3762),u=n(3062),c=(n(423),n(262),n(8770),n(8059)),s={data:function(){return{info:{},modal:{show:!1,title:"",key:"",value:""},gender:{show:!1,options:c.Z.options},birthday:{show:!1,value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()}}},onLoad:function(){this.init()},methods:{init:function(){var t=this;this.$ajax.get("/api/client/user/profile").then((function(e){0==e.status&&(t.info=e.data)}))},handleAvatar:function(){var t=this;uni.chooseImage({count:1,success:function(){var e=(0,u.Z)((0,l.Z)().mark((function e(n){var o,r;return(0,l.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$ajax.upload("/api/web/upload",{filePath:n.tempFilePaths[0],custom:{toast:!1,loading:!1},name:"file"});case 2:if(o=e.sent,uni.showLoading(),0!=o.status){e.next=9;break}return e.next=7,t.update({avatar:o.data.file});case 7:r=e.sent,0==r.status&&(t.info.avatar=o.data.file);case 9:case"end":return e.stop()}}),e)})));function n(t){return e.apply(this,arguments)}return n}()})},openModal:function(t,e){this.modal.title=t,this.modal.key=e,this.modal.show=!0,this.modal.value=this.info[e]},confirmModal:function(){var t=this,e=this.modal.key,n=this.modal.value,o={};o[e]=n,this.update(o).then((function(o){t.modal.show=!1,0==o.status&&(t.info[e]=n)}))},closeModal:function(){this.modal.show=!1},openGender:function(){this.gender.show=!0},closeGender:function(){this.gender.show=!1},selectGender:function(t){var e=this;this.update({sex:t.value}).then((function(n){0==n.status&&(e.info.sex_text=t.name,e.info.sex=t.value)}))},openBirthday:function(){this.info.birthday&&(this.birthday.value=new Date(this.info.birthday.replaceAll("-","/")).getTime()),this.birthday.show=!0},closeBirthday:function(){this.birthday.show=!1},selectBirthday:function(t){var e=this,n=uni.$u.timeFormat(t.value,"yyyy-mm-dd");this.update({birthday:n}).then((function(t){0==t.status&&(e.info.birthday=e.info.birthday_format=n,e.closeBirthday())}))},update:function(t){return this.$ajax.post("/api/client/user/profile",t,{custom:{loading:!0}})}}},d=s,p=(n(7495),n(1503)),f=(0,p.Z)(d,a,i,!1,null,"e0f4d3b0",null,!1,r,o),h=f.exports},8770:function(t,e,n){"use strict";var o=n(2135),r=n(3383),a=n(3684),i=n(6347),l=n(1518),u=n(8903),c=n(178),s=u("replace"),d=RegExp.prototype,p=Math.max,f=function(t,e,n){return n>t.length?-1:""===e?n:t.indexOf(e,n)};o({target:"String",proto:!0},{replaceAll:function(t,e){var n,o,u,h,v,m,y,g,_,w=r(this),x=0,b=0,$="";if(null!=t){if(n=a(t),n&&(o=String(r("flags"in d?t.flags:i.call(t))),!~o.indexOf("g")))throw TypeError("`.replaceAll` does not allow non-global regexes");if(u=t[s],void 0!==u)return u.call(t,w,e);if(c&&n)return String(w).replace(t,e)}h=String(w),v=String(t),m="function"===typeof e,m||(e=String(e)),y=v.length,g=p(1,y),x=f(h,v,0);while(-1!==x)_=m?String(e(v,x,h)):l(v,h,x,[],void 0,e),$+=h.slice(b,x)+_,b=x+y,x=f(h,v,x+g);return b=0;--r){var i=this.tryEntries[r],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,o){return this.delegate={iterator:j(e),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),_}},e}}}]); \ No newline at end of file +r=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function p(t,e,n,o){var r=e&&e.prototype instanceof _?e:_,a=Object.create(r.prototype),l=new T(o||[]);return i(a,"_invoke",{value:B(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function _(){}function w(){}function x(){}var b={};d(b,u,(function(){return this}));var $=Object.getPrototypeOf,k=$&&$($(j([])));k&&k!==n&&a.call(k,u)&&(b=k);var C=x.prototype=_.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(r,i,l,u){var c=f(t[r],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==(0,o.Z)(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,l,u)}),(function(t){n("throw",t,l,u)})):e.resolve(d).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,u)}))}u(c.arg)}var r;i(this,"_invoke",{value:function(t,o){function a(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(a,a):a()}})}function B(e,n,o){var r=h;return function(a,i){if(r===m)throw new Error("Generator is already running");if(r===y){if("throw"===a)throw i;return{value:t,done:!0}}for(o.method=a,o.arg=i;;){var l=o.delegate;if(l){var u=O(l,o);if(u){if(u===g)continue;return u}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===h)throw r=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=m;var c=f(e,n,o);if("normal"===c.type){if(r=o.done?y:v,c.arg===g)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=y,o.method="throw",o.arg=c.arg)}}}function O(e,n){var o=n.method,r=e.iterator[o];if(r===t)return n.delegate=null,"throw"===o&&e.iterator["return"]&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),g;var a=f(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function j(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r=0;--r){var i=this.tryEntries[r],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),Z(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;Z(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,o){return this.delegate={iterator:j(e),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),g}},e}}}]); \ No newline at end of file diff --git a/public/h5/index.html b/public/h5/index.html index c987df3..6b70860 100644 --- a/public/h5/index.html +++ b/public/h5/index.html @@ -1,2 +1,2 @@ 宝芝堂
\ No newline at end of file + document.write('')
\ No newline at end of file diff --git a/public/h5/static/js/index.1964f9fd.js b/public/h5/static/js/index.b5e1a8df.js similarity index 96% rename from public/h5/static/js/index.1964f9fd.js rename to public/h5/static/js/index.b5e1a8df.js index 8f513a2..4e889cf 100644 --- a/public/h5/static/js/index.1964f9fd.js +++ b/public/h5/static/js/index.b5e1a8df.js @@ -1 +1 @@ -(function(){var n={1398:function(n,e,o){var t=o(8703);t.__esModule&&(t=t.default),"string"===typeof t&&(t=[[n.id,t,""]]),t.locals&&(n.exports=t.locals);var i=o(5472).Z;i("99d79208",t,!0,{sourceMap:!1,shadowMode:!1})},4427:function(n,e,o){"use strict";var t=o(159),i=(o(7966),o(4554),o(3167),o(3482),o(206),o(5827),o(498),o(930),o(423),o(262),o(6075)),r={keys:function(){return[]}};o.g["____828F200____"]=!0,delete o.g["____828F200____"],o.g.__uniConfig={globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"宝芝堂",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8",navigationStyle:"custom"},easycom:{"^u-(.*)":"uview-ui/components/u-$1/u-$1.vue","^unicloud-db$":"@dcloudio/uni-cli-shared/components/unicloud-db.vue","^uniad$":"@dcloudio/uni-cli-shared/components/uniad.vue","^ad-rewarded-video$":"@dcloudio/uni-cli-shared/components/ad-rewarded-video.vue","^ad-fullscreen-video$":"@dcloudio/uni-cli-shared/components/ad-fullscreen-video.vue","^ad-interstitial$":"@dcloudio/uni-cli-shared/components/ad-interstitial.vue","^ad-interactive$":"@dcloudio/uni-cli-shared/components/ad-interactive.vue","^page-meta$":"@dcloudio/uni-cli-shared/components/page-meta.vue","^navigation-bar$":"@dcloudio/uni-cli-shared/components/navigation-bar.vue","^uni-match-media$":"@dcloudio/uni-cli-shared/components/uni-match-media.vue"}},o.g.__uniConfig.compilerVersion="3.6.14",o.g.__uniConfig.darkmode=!1,o.g.__uniConfig.themeConfig={},o.g.__uniConfig.uniPlatform="h5",o.g.__uniConfig.appId="__UNI__828F200",o.g.__uniConfig.appName="宝芝堂",o.g.__uniConfig.appVersion="1.0.0",o.g.__uniConfig.appVersionCode="100",o.g.__uniConfig.router={mode:"history",base:"/h5/"},o.g.__uniConfig.publicPath="/h5/",o.g.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4},o.g.__uniConfig.debug=!1,o.g.__uniConfig.networkTimeout={request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},o.g.__uniConfig.sdkConfigs={},o.g.__uniConfig.qqMapKey=void 0,o.g.__uniConfig.googleMapKey=void 0,o.g.__uniConfig.aMapKey=void 0,o.g.__uniConfig.aMapSecurityJsCode=void 0,o.g.__uniConfig.aMapServiceHost=void 0,o.g.__uniConfig.locale="",o.g.__uniConfig.fallbackLocale=void 0,o.g.__uniConfig.locales=r.keys().reduce((function(n,e){var o=e.replace(/\.\/(uni-app.)?(.*).json/,"$2"),t=r(e);return Object.assign(n[o]||(n[o]={}),t.common||t),n}),{}),o.g.__uniConfig.nvue={"flex-direction":"column"},o.g.__uniConfig.__webpack_chunk_load__=o.e,i["default"].component("pages-index-index",(function(n){var e={component:Promise.all([o.e(432),o.e(981),o.e(58)]).then(function(){return n(o(6175))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-index-welcome",(function(n){var e={component:o.e(545).then(function(){return n(o(8289))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-login-login",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(159),o.e(696),o.e(449)]).then(function(){return n(o(814))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-patient-index",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(981),o.e(695),o.e(30),o.e(35),o.e(268),o.e(225)]).then(function(){return n(o(1221))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-patient-detail",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(981),o.e(695),o.e(30),o.e(35),o.e(356),o.e(159),o.e(810)]).then(function(){return n(o(9156))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-patient-form",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(981),o.e(695),o.e(30),o.e(35),o.e(356),o.e(159),o.e(696),o.e(611)]).then(function(){return n(o(8414))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-record-form",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(981),o.e(695),o.e(35),o.e(356),o.e(696),o.e(37),o.e(668)]).then(function(){return n(o(6749))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-record-index",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(981),o.e(695),o.e(30),o.e(268),o.e(492)]).then(function(){return n(o(8182))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),i["default"].component("pages-record-detail",(function(n){var e={component:Promise.all([o.e(432),o.e(885),o.e(981),o.e(695),o.e(30),o.e(35),o.e(356),o.e(159),o.e(37),o.e(487)]).then(function(){return n(o(1695))}.bind(null,o))["catch"](o.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(e.loading={name:"SystemAsyncLoading",render:function(n){return n(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(e.error={name:"SystemAsyncError",render:function(n){return n(__uniConfig["async"]["error"])}}),e})),o.g.__uniRoutes=[{path:"/",alias:"/pages/index/index",component:{render:function(n){return n("Page",{props:Object.assign({isQuit:!0,isEntry:!0},__uniConfig.globalStyle,{navigationBarTitleText:"宝芝堂"})},[n("pages-index-index",{slot:"page"})])}},meta:{id:1,name:"pages-index-index",isNVue:!1,maxWidth:0,pagePath:"pages/index/index",isQuit:!0,isEntry:!0,windowTop:0}},{path:"/pages/index/welcome",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"宝芝堂"})},[n("pages-index-welcome",{slot:"page"})])}},meta:{name:"pages-index-welcome",isNVue:!1,maxWidth:0,pagePath:"pages/index/welcome",windowTop:0}},{path:"/pages/login/login",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"登录"})},[n("pages-login-login",{slot:"page"})])}},meta:{name:"pages-login-login",isNVue:!1,maxWidth:0,pagePath:"pages/login/login",windowTop:0}},{path:"/pages/patient/index",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病人管理",enablePullDownRefresh:!0})},[n("pages-patient-index",{slot:"page"})])}},meta:{name:"pages-patient-index",isNVue:!1,maxWidth:0,pagePath:"pages/patient/index",windowTop:0}},{path:"/pages/patient/detail",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病人详细",enablePullDownRefresh:!0})},[n("pages-patient-detail",{slot:"page"})])}},meta:{name:"pages-patient-detail",isNVue:!1,maxWidth:0,pagePath:"pages/patient/detail",windowTop:0}},{path:"/pages/patient/form",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病人表单"})},[n("pages-patient-form",{slot:"page"})])}},meta:{name:"pages-patient-form",isNVue:!1,maxWidth:0,pagePath:"pages/patient/form",windowTop:0}},{path:"/pages/record/form",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病历表单"})},[n("pages-record-form",{slot:"page"})])}},meta:{name:"pages-record-form",isNVue:!1,maxWidth:0,pagePath:"pages/record/form",windowTop:0}},{path:"/pages/record/index",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病历记录",enablePullDownRefresh:!0})},[n("pages-record-index",{slot:"page"})])}},meta:{name:"pages-record-index",isNVue:!1,maxWidth:0,pagePath:"pages/record/index",windowTop:0}},{path:"/pages/record/detail",component:{render:function(n){return n("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"病历详细",enablePullDownRefresh:!0})},[n("pages-record-detail",{slot:"page"})])}},meta:{name:"pages-record-detail",isNVue:!1,maxWidth:0,pagePath:"pages/record/detail",windowTop:0}},{path:"/choose-location",component:{render:function(n){return n("Page",{props:{navigationStyle:"custom"}},[n("system-choose-location",{slot:"page"})])}},meta:{name:"choose-location",pagePath:"/choose-location"}},{path:"/open-location",component:{render:function(n){return n("Page",{props:{navigationStyle:"custom"}},[n("system-open-location",{slot:"page"})])}},meta:{name:"open-location",pagePath:"/open-location"}}],o.g.UniApp&&new o.g.UniApp;o(1026);var a,u,c=function(){var n=this,e=n.$createElement,o=n._self._c||e;return o("App",{attrs:{keepAliveInclude:n.keepAliveInclude}})},d=[],l={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}},s=l,g=(o(1398),o(1503)),p=(0,g.Z)(s,c,d,!1,null,null,null,!1,a,u),f=p.exports,m=(o(7846),o(3124)),_=o(5682);o(8996),o(7480),o(5329),o(4302),o(5621),o(1199),o(9289),o(9312);function b(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss";if(!e)return"";n=e?/^\d{10}$/.test(e.toString().trim())?new Date(1e3*e):"string"===typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):new Date("string"===typeof e?e.replace(/-/g,"/"):e):new Date;var t={y:n.getFullYear().toString(),M:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),H:n.getHours().toString().padStart(2,"0"),m:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(var i in t){var r=new RegExp("".concat(i,"+")).exec(o)||[],a=(0,_.Z)(r,1),u=a[0];if(u){var c="y"===i&&2===u.length?2:0;o=o.replace(u,t[i].slice(c))}}return o}i["default"].config.productionTip=!1,i["default"].use(m.Z),i["default"].filter("date",(function(n,e){return e||(e="yyyy-MM-dd HH:mm:ss"),b(n,e)})),i["default"].config.productionTip=!1,f.mpType="app";var y=new i["default"]((0,t.Z)({},f));o(926)(),i["default"].prototype.$ajax=uni.$u.http,y.$mount()},7846:function(n,e,o){var t=o(3087)["default"];o(5827),uni.addInterceptor({returnValue:function(n){return!n||"object"!==t(n)&&"function"!==typeof n||"function"!==typeof n.then?n:new Promise((function(e,o){n.then((function(n){return n[0]?o(n[0]):e(n[1])}))}))}})},926:function(n,e,o){o(5827),n.exports=function(){uni.$u.http.setConfig((function(n){return n.baseURL="http://www.xbzt.cc",n.custom={toast:!0,loading:!1},n})),uni.$u.http.interceptors.request.use((function(n){var e=uni.getStorageSync("medical_record_auth_token");return e&&(n.header["Authorization"]="Bearer ".concat(e)),n.header["Accept"]="application/json",n.custom.loading&&uni.showLoading(),n}),(function(n){return Promise.reject(n)})),uni.$u.http.interceptors.response.use((function(n){uni.hideLoading();var e=n.data;return n.config.custom.toast&&0!=e.status&&1!=e.doNotDisplayToast&&uni.showModal({title:e.msg,showCancel:!1}),401==e.code&&uni.reLaunch({url:"/pages/login/login"}),e}),(function(n){return uni.hideLoading(),Promise.reject(n)}))}},8703:function(n,e,o){"use strict";o.r(e);var t=o(2916),i=o.n(t),r=o(3282),a=o.n(r),u=a()(i());u.push([n.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */.u-line-1{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:1;-webkit-box-orient:vertical!important\n}.u-line-2{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:2;-webkit-box-orient:vertical!important\n}.u-line-3{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:3;-webkit-box-orient:vertical!important\n}.u-line-4{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:4;-webkit-box-orient:vertical!important\n}.u-line-5{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:5;-webkit-box-orient:vertical!important\n}.u-border{border-width:.5px!important;border-color:#dadbde!important;border-style:solid}.u-border-top{border-top-width:.5px!important;border-color:#dadbde!important;border-top-style:solid}.u-border-left{border-left-width:.5px!important;border-color:#dadbde!important;border-left-style:solid}.u-border-right{border-right-width:.5px!important;border-color:#dadbde!important;border-right-style:solid}.u-border-bottom{border-bottom-width:.5px!important;border-color:#dadbde!important;border-bottom-style:solid}.u-border-top-bottom{border-top-width:.5px!important;border-bottom-width:.5px!important;border-color:#dadbde!important;border-top-style:solid;border-bottom-style:solid}.u-reset-button{padding:0;background-color:initial;\nfont-size:inherit;line-height:inherit;color:inherit;\n}\n.u-reset-button::after{border:none}\n.u-hover-class{opacity:.7}.u-primary-light{color:#ecf5ff}.u-warning-light{color:#fdf6ec}.u-success-light{color:#f5fff0}.u-error-light{color:#fef0f0}.u-info-light{color:#f4f4f5}.u-primary-light-bg{background-color:#ecf5ff}.u-warning-light-bg{background-color:#fdf6ec}.u-success-light-bg{background-color:#f5fff0}.u-error-light-bg{background-color:#fef0f0}.u-info-light-bg{background-color:#f4f4f5}.u-primary-dark{color:#398ade}.u-warning-dark{color:#f1a532}.u-success-dark{color:#53c21d}.u-error-dark{color:#e45656}.u-info-dark{color:#767a82}.u-primary-dark-bg{background-color:#398ade}.u-warning-dark-bg{background-color:#f1a532}.u-success-dark-bg{background-color:#53c21d}.u-error-dark-bg{background-color:#e45656}.u-info-dark-bg{background-color:#767a82}.u-primary-disabled{color:#9acafc}.u-warning-disabled{color:#f9d39b}.u-success-disabled{color:#a9e08f}.u-error-disabled{color:#f7b2b2}.u-info-disabled{color:#c4c6c9}.u-primary{color:#3c9cff}.u-warning{color:#f9ae3d}.u-success{color:#5ac725}.u-error{color:#f56c6c}.u-info{color:#909399}.u-primary-bg{background-color:#3c9cff}.u-warning-bg{background-color:#f9ae3d}.u-success-bg{background-color:#5ac725}.u-error-bg{background-color:#f56c6c}.u-info-bg{background-color:#909399}.u-main-color{color:#303133}.u-content-color{color:#606266}.u-tips-color{color:#909193}.u-light-color{color:#c0c4cc}.u-safe-area-inset-top{padding-top:0;padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.u-safe-area-inset-right{padding-right:0;padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.u-safe-area-inset-bottom{padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.u-safe-area-inset-left{padding-left:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left)}\nuni-toast{z-index:10090}uni-toast .uni-toast{z-index:10090}\n::-webkit-scrollbar{display:none;width:0!important;height:0!important;-webkit-appearance:none;background:transparent}body{background-color:#f3f4f6}',""]),e["default"]=u}},e={};function o(t){var i=e[t];if(void 0!==i)return i.exports;var r=e[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=n,function(){o.amdD=function(){throw new Error("define cannot be used indirect")}}(),function(){var n=[];o.O=function(e,t,i,r){if(!t){var a=1/0;for(l=0;l=r)&&Object.keys(o.O).every((function(n){return o.O[n](t[c])}))?t.splice(c--,1):(u=!1,r0&&n[l-1][2]>r;l--)n[l]=n[l-1];n[l]=[t,i,r]}}(),function(){o.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return o.d(e,{a:e}),e}}(),function(){o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})}}(),function(){o.f={},o.e=function(n){return Promise.all(Object.keys(o.f).reduce((function(e,t){return o.f[t](n,e),e}),[]))}}(),function(){o.u=function(n){return"static/js/"+({58:"pages-index-index",225:"pages-patient-index",449:"pages-login-login",487:"pages-record-detail",492:"pages-record-index",545:"pages-index-welcome",611:"pages-patient-form",668:"pages-record-form",810:"pages-patient-detail"}[n]||n)+"."+{30:"7b4523bf",35:"aa39851c",37:"9026f80e",58:"c3e7c321",159:"672f40f9",225:"e1090ae7",268:"22e1db63",356:"4b9acf26",432:"318d7fe6",449:"37904698",487:"9947387c",492:"1c8c2444",545:"9d00bff3",611:"21848ee2",668:"ac620e82",695:"9e93b8ed",696:"af72a6ec",810:"629daa3d",885:"deb7a36f",981:"925b79b6"}[n]+".js"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}()}(),function(){o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)}}(),function(){var n={},e="uniapp:";o.l=function(t,i,r,a){if(n[t])n[t].push(i);else{var u,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss";if(!e)return"";n=e?/^\d{10}$/.test(e.toString().trim())?new Date(1e3*e):"string"===typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):new Date("string"===typeof e?e.replace(/-/g,"/"):e):new Date;var t={y:n.getFullYear().toString(),M:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),H:n.getHours().toString().padStart(2,"0"),m:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(var i in t){var r=new RegExp("".concat(i,"+")).exec(o)||[],a=(0,b.Z)(r,1),u=a[0];if(u){var c="y"===i&&2===u.length?2:0;o=o.replace(u,t[i].slice(c))}}return o}i["default"].config.productionTip=!1,i["default"].use(m.Z),i["default"].filter("date",(function(n,e){return e||(e="yyyy-MM-dd HH:mm:ss"),_(n,e)})),i["default"].config.productionTip=!1,f.mpType="app";var y=new i["default"]((0,t.Z)({},f));o(926)(),i["default"].prototype.$ajax=uni.$u.http,y.$mount()},7846:function(n,e,o){var t=o(3087)["default"];o(5827),uni.addInterceptor({returnValue:function(n){return!n||"object"!==t(n)&&"function"!==typeof n||"function"!==typeof n.then?n:new Promise((function(e,o){n.then((function(n){return n[0]?o(n[0]):e(n[1])}))}))}})},926:function(n,e,o){o(5827),n.exports=function(){uni.$u.http.setConfig((function(n){return n.baseURL="http://www.xbzt.cc",n.custom={toast:!0,loading:!1},n})),uni.$u.http.interceptors.request.use((function(n){var e=uni.getStorageSync("medical_record_auth_token");return e&&(n.header["Authorization"]="Bearer ".concat(e)),n.header["Accept"]="application/json",n.custom.loading&&uni.showLoading(),n}),(function(n){return Promise.reject(n)})),uni.$u.http.interceptors.response.use((function(n){uni.hideLoading();var e=n.data;return n.config.custom.toast&&0!=e.status&&1!=e.doNotDisplayToast&&uni.showModal({title:e.msg,showCancel:!1}),401==e.code&&uni.reLaunch({url:"/pages/login/login"}),e}),(function(n){return uni.hideLoading(),Promise.reject(n)}))}},8703:function(n,e,o){"use strict";o.r(e);var t=o(2916),i=o.n(t),r=o(3282),a=o.n(r),u=a()(i());u.push([n.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */.u-line-1{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:1;-webkit-box-orient:vertical!important\n}.u-line-2{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:2;-webkit-box-orient:vertical!important\n}.u-line-3{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:3;-webkit-box-orient:vertical!important\n}.u-line-4{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:4;-webkit-box-orient:vertical!important\n}.u-line-5{\n\n\ndisplay:-webkit-box!important;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:5;-webkit-box-orient:vertical!important\n}.u-border{border-width:.5px!important;border-color:#dadbde!important;border-style:solid}.u-border-top{border-top-width:.5px!important;border-color:#dadbde!important;border-top-style:solid}.u-border-left{border-left-width:.5px!important;border-color:#dadbde!important;border-left-style:solid}.u-border-right{border-right-width:.5px!important;border-color:#dadbde!important;border-right-style:solid}.u-border-bottom{border-bottom-width:.5px!important;border-color:#dadbde!important;border-bottom-style:solid}.u-border-top-bottom{border-top-width:.5px!important;border-bottom-width:.5px!important;border-color:#dadbde!important;border-top-style:solid;border-bottom-style:solid}.u-reset-button{padding:0;background-color:initial;\nfont-size:inherit;line-height:inherit;color:inherit;\n}\n.u-reset-button::after{border:none}\n.u-hover-class{opacity:.7}.u-primary-light{color:#ecf5ff}.u-warning-light{color:#fdf6ec}.u-success-light{color:#f5fff0}.u-error-light{color:#fef0f0}.u-info-light{color:#f4f4f5}.u-primary-light-bg{background-color:#ecf5ff}.u-warning-light-bg{background-color:#fdf6ec}.u-success-light-bg{background-color:#f5fff0}.u-error-light-bg{background-color:#fef0f0}.u-info-light-bg{background-color:#f4f4f5}.u-primary-dark{color:#398ade}.u-warning-dark{color:#f1a532}.u-success-dark{color:#53c21d}.u-error-dark{color:#e45656}.u-info-dark{color:#767a82}.u-primary-dark-bg{background-color:#398ade}.u-warning-dark-bg{background-color:#f1a532}.u-success-dark-bg{background-color:#53c21d}.u-error-dark-bg{background-color:#e45656}.u-info-dark-bg{background-color:#767a82}.u-primary-disabled{color:#9acafc}.u-warning-disabled{color:#f9d39b}.u-success-disabled{color:#a9e08f}.u-error-disabled{color:#f7b2b2}.u-info-disabled{color:#c4c6c9}.u-primary{color:#3c9cff}.u-warning{color:#f9ae3d}.u-success{color:#5ac725}.u-error{color:#f56c6c}.u-info{color:#909399}.u-primary-bg{background-color:#3c9cff}.u-warning-bg{background-color:#f9ae3d}.u-success-bg{background-color:#5ac725}.u-error-bg{background-color:#f56c6c}.u-info-bg{background-color:#909399}.u-main-color{color:#303133}.u-content-color{color:#606266}.u-tips-color{color:#909193}.u-light-color{color:#c0c4cc}.u-safe-area-inset-top{padding-top:0;padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.u-safe-area-inset-right{padding-right:0;padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.u-safe-area-inset-bottom{padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.u-safe-area-inset-left{padding-left:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left)}\nuni-toast{z-index:10090}uni-toast .uni-toast{z-index:10090}\n::-webkit-scrollbar{display:none;width:0!important;height:0!important;-webkit-appearance:none;background:transparent}body{background-color:#f3f4f6}',""]),e["default"]=u}},e={};function o(t){var i=e[t];if(void 0!==i)return i.exports;var r=e[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=n,function(){o.amdD=function(){throw new Error("define cannot be used indirect")}}(),function(){var n=[];o.O=function(e,t,i,r){if(!t){var a=1/0;for(l=0;l=r)&&Object.keys(o.O).every((function(n){return o.O[n](t[c])}))?t.splice(c--,1):(u=!1,r0&&n[l-1][2]>r;l--)n[l]=n[l-1];n[l]=[t,i,r]}}(),function(){o.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return o.d(e,{a:e}),e}}(),function(){o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})}}(),function(){o.f={},o.e=function(n){return Promise.all(Object.keys(o.f).reduce((function(e,t){return o.f[t](n,e),e}),[]))}}(),function(){o.u=function(n){return"static/js/"+({58:"pages-index-index",225:"pages-patient-index",449:"pages-login-login",487:"pages-record-detail",492:"pages-record-index",545:"pages-index-welcome",611:"pages-patient-form",668:"pages-record-form",810:"pages-patient-detail"}[n]||n)+"."+{30:"7b4523bf",35:"aa39851c",37:"9026f80e",58:"c3e7c321",159:"672f40f9",225:"e1090ae7",268:"22e1db63",356:"4b9acf26",432:"318d7fe6",449:"37904698",487:"08dae0de",492:"11521a89",545:"9d00bff3",611:"2cd57f81",668:"b05fe531",695:"9e93b8ed",696:"af72a6ec",810:"b5d4203a",885:"deb7a36f",981:"925b79b6"}[n]+".js"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}()}(),function(){o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)}}(),function(){var n={},e="uniapp:";o.l=function(t,i,r,a){if(n[t])n[t].push(i);else{var u,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l=t.data.total&&(e.status="nomore"))})).catch((function(t){e.loading=!1,e.status="nomore"}))}},reachBottom:function(){this.page++,this.load()},changeSearch:function(t){t||this.load(!0)}}}),c=s,u=(n(8314),n(1503)),r=(0,u.Z)(c,o,l,!1,null,"29937191",null,!1,a,i),d=r.exports},2613:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i,a={uCellGroup:n(156).Z,uCell:n(7981).Z,uIcon:n(5862).Z,uButton:n(7344).Z,uModal:n(5912).Z,"u-Input":n(4159).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(2632).Z},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("u-cell-group",{attrs:{border:!1}},[n("u-cell",{attrs:{title:"类别",value:t.info.type?t.info.type.name:""}}),n("u-cell",{attrs:{title:"客户",value:t.info.user?t.info.user.name+"("+t.info.user.phone+")":"",isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openUser.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:"姓名",value:t.info.name,isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("姓名","name")}}}),n("u-cell",{attrs:{title:"性别",value:t.info.sex_text,isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleGender.apply(void 0,arguments)}}}),n("u-cell",{attrs:{isLink:!0}},[n("v-uni-view",{attrs:{slot:"icon"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleCall(t.info.phone)}},slot:"icon"},[n("u-icon",{attrs:{name:"phone"}})],1),n("v-uni-view",{attrs:{slot:"title"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("联系方式","phone")}},slot:"title"},[t._v("联系方式")]),n("v-uni-view",{attrs:{slot:"value"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("联系方式","phone")}},slot:"value"},[t._v(t._s(t.info.phone))]),n("v-uni-view",{attrs:{slot:"right-icon"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("联系方式","phone")}},slot:"right-icon"},[n("u-icon",{attrs:{name:"edit-pen"}})],1)],1),n("u-cell",{attrs:{title:"地址",value:t.info.address,clickable:!0,isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openModal("地址","address")}}}),n("u-cell",{attrs:{title:"出生年月",value:t._f("date")(t.info.birthday,"yyyy-MM-dd"),isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday("birthday")}}}),n("u-cell",{attrs:{title:"初诊时间",value:t._f("date")(t.info.treat_at,"yyyy-MM-dd"),isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday("treat_at")}}}),n("u-cell",{attrs:{title:"初诊医生",value:t.info.doctor?t.info.doctor.name:"",isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("doctor")}}}),n("u-cell",{attrs:{title:"邀请人",value:t.info.inviter?t.info.inviter.name:"",isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("inviter")}}}),n("u-cell",{attrs:{title:"业务员",value:t.info.saler?t.info.saler.name:"",isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("saler")}}}),n("u-cell",{attrs:{title:"病情描述",isLink:!0,rightIcon:"edit-pen"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openEditor.apply(void 0,arguments)}}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("v-uni-text",[t._v(t._s(t.info.illness))])],1)],1),n("u-cell",{attrs:{title:"图片资料"}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("cu-image",{ref:"images",on:{update:function(e){arguments[0]=e=t.$handleEvent(e),t.updateImages.apply(void 0,arguments)}}})],1)],1),n("u-cell",{attrs:{title:"录入时间",value:t.info.created_at}})],1),n("div",{staticClass:"btn"},[n("u-button",{attrs:{text:"添加病历",type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.addRecord.apply(void 0,arguments)}}}),n("u-button",{attrs:{text:"病历记录",type:"success"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.listRecord.apply(void 0,arguments)}}}),n("u-button",{attrs:{text:"删除病人",type:"error"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.deletePatient.apply(void 0,arguments)}}})],1),n("u-modal",{attrs:{show:t.modal.show,title:t.modal.title,showCancelButton:!0,closeOnClickOverlay:!0,asyncClose:!0},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmModal.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)},close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeModal.apply(void 0,arguments)}}},[n("u--input",{attrs:{border:"surround"},model:{value:t.modal.value,callback:function(e){t.$set(t.modal,"value",e)},expression:"modal.value"}})],1),n("u-action-sheet",{attrs:{show:t.genderSheet.show,actions:t.gender.options,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleGender.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectGender.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:"date",show:t.datePicker.show,closeOnClickOverlay:!0,minDate:t.datePicker.minDate},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.selectBirthday.apply(void 0,arguments)}},model:{value:t.datePicker.value,callback:function(e){t.$set(t.datePicker,"value",e)},expression:"datePicker.value"}}),n("select-admin-user",{ref:"select-admin-user",on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectDoctor.apply(void 0,arguments)}}}),n("cu-editor",{ref:"editor",on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmEditor.apply(void 0,arguments)}}}),n("select-user",{ref:"select-user",on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectUser.apply(void 0,arguments)}}})],1)},l=[],s=n(159),c=(n(423),n(262),n(8770),n(9299),n(8059)),u=n(8272),r=n(7744),d=n(7679),h=n(4193),p={components:{SelectAdminUser:u.Z,CuEditor:r.Z,CuImage:d.Z,SelectUser:h.Z},data:function(){return{id:"",info:{images:[],doctor_id:"",doctor:{}},modal:{type:"text",show:!1,title:"",key:"",value:""},gender:c.Z,genderSheet:{show:!1},datePicker:{show:!1,name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},adminUser:{key:""}}},onLoad:function(t){this.id=t.id,this.loadData()},onPullDownRefresh:function(){this.loadData()},methods:{loadData:function(){var t=this;if(this.id){uni.showLoading();var e={_action:"getData"};this.$ajax.get("/admin-api/patient/".concat(this.id),{params:e}).then((function(e){uni.stopPullDownRefresh(),0==e.status&&(t.info=(0,s.Z)((0,s.Z)({},e.data),{},{birthday:e.data.birthday?e.data.birthday.replaceAll("-","/"):"",treat_at:e.data.treat_at?e.data.treat_at.replaceAll("-","/"):""}),e.data.images&&t.$refs["images"].setList(e.data.images.map((function(t){return{url:t}}))),uni.setNavigationBarTitle({title:t.info.name}))})).catch((function(t){uni.stopPullDownRefresh()}))}},openModal:function(t,e){this.modal.title=t,this.modal.key=e,this.modal.show=!0,this.modal.value=this.info[e]},confirmModal:function(){var t=this,e=this.modal.key,n=this.modal.value,i={};i[e]=n,this.update(i).then((function(i){t.modal.show=!1,0==i.status&&(t.info[e]=n)}))},closeModal:function(){this.modal.show=!1},openEditor:function(){this.$refs["editor"].open(this.info.illness)},confirmEditor:function(t){var e=this;this.update({illness:t}).then((function(n){0==n.status&&(e.info.illness=t)}))},toggleGender:function(){this.genderSheet.show=!this.genderSheet.show},selectGender:function(t){var e=this;this.update({sex:t.value}).then((function(n){0==n.status&&(e.info.sex=t.value,e.info.sex_text=t.name)}))},toggleBirthday:function(t){t&&(this.datePicker.name=t,this.datePicker.value=new Date(this.info[t]).getTime()),this.datePicker.show=!this.datePicker.show},selectBirthday:function(t){var e=this,n=Math.floor(t.value/1e3),i=this.datePicker.name,a={};a[i]=n,this.update(a).then((function(n){0==n.status&&(e.info[i]=t.value,e.toggleBirthday())}))},opendDoctor:function(t){this.adminUser.key=t,this.$refs["select-admin-user"].open()},closeDoctor:function(){this.$refs["select-admin-user"].close()},selectDoctor:function(t){var e=this,n=this.adminUser.key,i={};i["".concat(n,"_id")]=t.id,this.update(i).then((function(i){0==i.status&&(e.info["".concat(n,"_id")]=t.id,e.info[n]={id:t.id,name:t.name})})),this.closeDoctor()},updateImages:function(t){var e=t.map((function(t){return t.url}));this.update({images:e}).then((function(t){0==t.status&&console.log(t)}))},openUser:function(){this.$refs["select-user"].open()},closeUser:function(){this.$refs["select-user"].close()},selectUser:function(t){var e=this;this.closeUser(),this.update({user_id:t.id}).then((function(n){0==n.status&&(e.info.user_id=t.id,e.info.user=t)}))},addRecord:function(){return uni.navigateTo({url:"/pages/record/form?patient=".concat(this.id)})},listRecord:function(){return uni.navigateTo({url:"/pages/record/index?patient=".concat(this.id)})},deletePatient:function(){var t=this;uni.showModal({title:"删除病人档案信息",content:"同时会删除相关联的病历记录!",success:function(e){e.confirm&&t.delete(t.info.id)}})},update:function(t){var e=Object.assign({id:this.id},t);return this.$ajax.put("/admin-api/patient/".concat(this.id),e,{custom:{loading:!0}})},delete:function(t){uni.showLoading(),this.$ajax.delete("/admin-api/patient/".concat(t)).then((function(t){0==t.status&&(uni.showToast({title:"删除成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1e3))}))},handleCall:function(t){t?window.open("tel:".concat(t),"_blank"):this.openModal("联系方式","phone")}}},f=p,v=(n(2229),n(1503)),m=(0,v.Z)(f,o,l,!1,null,"7c55ecc7",null,!1,a,i),g=m.exports},8059:function(t,e,n){"use strict";n(5827),n(6007),n(444);var i={none:{value:0,text:"未知"},male:{value:1,text:"男"},female:{value:2,text:"女"},options:[],map:{}};Object.keys(i).forEach((function(t){void 0!==i[t]&&void 0!==i[t].value&&(i.options.push({name:i[t].text,value:i[t].value}),i.map[i[t].value]=i[t].text)})),e.Z=i},3089:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([t.id,".loading[data-v-29937191]{position:fixed;bottom:0;background-color:#fff;width:300px}",""]),e["default"]=s},3240:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([t.id,".page[data-v-7c55ecc7]{padding:20px;background:#fff}.u-cell-group[data-v-7c55ecc7]{background:#fff}.btn[data-v-7c55ecc7]{padding:0 10px}.btn .u-button[data-v-7c55ecc7]{margin-top:20px}.page[data-v-7c55ecc7] .u-upload__wrap{justify-content:flex-end}.text-gray[data-v-7c55ecc7]{color:gray}",""]),e["default"]=s},2727:function(t,e,n){"use strict";n.r(e);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([t.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-38668d34], uni-scroll-view[data-v-38668d34], uni-swiper-item[data-v-38668d34]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-cell-group[data-v-38668d34]{flex:1}.u-cell-group__title[data-v-38668d34]{padding:16px 16px 8px}.u-cell-group__title__text[data-v-38668d34]{font-size:15px;line-height:16px;color:#303133}.u-cell-group__wrapper[data-v-38668d34]{position:relative}',""]),e["default"]=s}}]); \ No newline at end of file diff --git a/public/h5/static/js/pages-patient-form.21848ee2.js b/public/h5/static/js/pages-patient-form.21848ee2.js deleted file mode 100644 index 3f911e5..0000000 --- a/public/h5/static/js/pages-patient-form.21848ee2.js +++ /dev/null @@ -1 +0,0 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[611],{8793:function(t,e,a){var i=a(4941);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var n=a(5472).Z;n("51ccb955",i,!0,{sourceMap:!1,shadowMode:!1})},8414:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return h}});var i,n={"u-Form":a(2975).Z,uFormItem:a(3751).Z,"u-Input":a(4159).Z,uIcon:a(5862).Z,uButton:a(7344).Z,uDatetimePicker:a(2632).Z,uActionSheet:a(7030).Z},o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"page"},[a("u--form",{ref:"form",attrs:{model:t.form,labelWidth:"70"}},[a("u-form-item",{attrs:{prop:"name",label:"姓名",required:!0}},[a("u--input",{attrs:{border:"bottom",placeholder:"请输入姓名"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),a("u-form-item",{attrs:{prop:"sex",label:"性别"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleGender.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"input-text"},[a("v-uni-text",[t._v(t._s(t.genderSelect))]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"phone",label:"联系方式"}},[a("u--input",{attrs:{border:"bottom",placeholder:"请输入联系方式"},model:{value:t.form.phone,callback:function(e){t.$set(t.form,"phone",e)},expression:"form.phone"}})],1),a("u-form-item",{attrs:{prop:"address",label:"地址"}},[a("u--input",{attrs:{border:"bottom",placeholder:"请输入地址"},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1),a("u-form-item",{attrs:{prop:"birthday",label:"出生年月"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday("birthday")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.birthday?a("v-uni-text",[t._v(t._s(t._f("date")(t.form.birthday,"yyyy-MM-dd")))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择出生日期")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"treat_at",label:"初诊日期"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday("treat_at")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.treat_at?a("v-uni-text",[t._v(t._s(t._f("date")(t.form.treat_at,"yyyy-MM-dd")))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择初诊日期")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"doctor_id",label:"坐诊医生"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("doctor")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.doctor_id?a("v-uni-text",[t._v(t._s(t.adminUser.doctor.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择坐诊医生")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"inviter_id",label:"推荐人"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("inviter")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.inviter_id?a("v-uni-text",[t._v(t._s(t.adminUser.inviter.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择推荐人")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"saler_id",label:"业务员"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("saler")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.saler_id?a("v-uni-text",[t._v(t._s(t.adminUser.saler.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择业务员")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{label:"病情描述",prop:"illness"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openEditor.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.illness?a("v-uni-text",[t._v(t._s(t.form.illness))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("点击修改")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{label:"图片资料",prop:"images",borderBottom:!0}},[a("cu-image",{ref:"images"})],1),a("v-uni-view",{staticClass:"button"},[a("u-button",{attrs:{text:"提交",type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}})],1)],1),a("u-datetime-picker",{attrs:{mode:"date",show:t.datePicker.show,closeOnClickOverlay:!0,minDate:t.datePicker.minDate},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.selectBirthday.apply(void 0,arguments)}},model:{value:t.datePicker.value,callback:function(e){t.$set(t.datePicker,"value",e)},expression:"datePicker.value"}}),a("select-admin-user",{ref:"select-admin-user",on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectDoctor.apply(void 0,arguments)}}}),a("u-action-sheet",{attrs:{show:t.genderShow,actions:t.gender.options,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleGender.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectGender.apply(void 0,arguments)}}}),a("cu-editor",{ref:"editor",on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmEditor.apply(void 0,arguments)}}})],1)},r=[],s=(a(423),a(262),a(8770),a(9299),a(8059)),d=a(8272),l=a(7744),c=a(7679),u={components:{SelectAdminUser:d.Z,CuEditor:l.Z,CuImage:c.Z},data:function(){return{id:"",form:{type_id:"",name:"",sex:s.Z.none.value,phone:"",birthday:"",address:"",treat_at:"",doctor_id:"",inviter_id:"",saler_id:"",illness:"",images:[]},rules:{name:{required:!0,message:"姓名必填",trigger:["blur","change"]}},gender:s.Z,genderShow:!1,genderSelect:s.Z.none.text,datePicker:{show:!1,name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},adminUser:{key:"",doctor:{text:"",value:""},inviter:{text:"",value:""},saler:{text:"",value:""}}}},onLoad:function(t){var e=this;if(this.form.type_id=uni.getStorageSync("medical_record_treat_type_id"),t.id){this.id=t.id,uni.showLoading();var a={_action:"getData"};this.$ajax.get("/admin-api/patient/".concat(t.id),{params:a}).then((function(t){0==t.status&&(e.form={id:t.data.id,name:t.data.name,sex:t.data.sex,phone:t.data.phone,birthday:t.data.birthday?t.data.birthday.replaceAll("-","/"):"",address:t.data.address,treat_at:t.data.treat_at?t.data.treat_at.replaceAll("-","/"):"",doctor_id:t.data.doctor_id,illness:t.data.illness},e.genderSelect=t.data.sex_text,t.data.doctor&&(e.doctor={text:t.data.doctor.name,value:t.data.doctor.id}),uni.setNavigationBarTitle({title:e.form.name}))}))}else uni.setNavigationBarTitle({title:"添加病人"})},onReady:function(){this.$refs["form"].setRules(this.rules)},methods:{toggleGender:function(){this.genderShow=!this.genderShow},toggleBirthday:function(t){t&&(this.datePicker.name=t,this.datePicker.value=this.form[t]?Math.floor(1e3*this.form[t]):(new Date).getTime()),this.datePicker.show=!this.datePicker.show},selectGender:function(t){this.genderSelect=t.name,this.form.sex=t.value},selectBirthday:function(t){this.form[this.datePicker.name]=uni.$u.timeFormat(t.value,"yyyy-mm-dd"),this.toggleBirthday()},opendDoctor:function(t){this.adminUser.key=t,this.$refs["select-admin-user"].open()},closeDoctor:function(){this.$refs["select-admin-user"].close()},selectDoctor:function(t){var e=this.adminUser.key;this.form["".concat(e,"_id")]=t.id,this.adminUser[e]={value:t.id,text:t.name},this.closeDoctor()},openEditor:function(){this.$refs["editor"].open(this.form.illness)},confirmEditor:function(t){this.form.illness=t},submit:function(){var t=this;this.form.images=this.$refs["images"].getList().map((function(t){return t.url})),this.$refs["form"].validate().then((function(e){uni.showLoading(),t.id?t.update():t.create()})).catch((function(t){}))},update:function(){this.$ajax.put("/admin-api/patient/".concat(this.id),this.form).then((function(t){0==t.status&&(uni.showToast({title:"保存成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))},create:function(){this.$ajax.post("/admin-api/patient",this.form).then((function(t){0==t.status&&(uni.showToast({title:"提交成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))}}},m=u,p=(a(8793),a(1503)),f=(0,p.Z)(m,o,r,!1,null,"5323efe4",null,!1,n,i),h=f.exports},8059:function(t,e,a){"use strict";a(5827),a(6007),a(444);var i={none:{value:0,text:"未知"},male:{value:1,text:"男"},female:{value:2,text:"女"},options:[],map:{}};Object.keys(i).forEach((function(t){void 0!==i[t]&&void 0!==i[t].value&&(i.options.push({name:i[t].text,value:i[t].value}),i.map[i[t].value]=i[t].text)})),e.Z=i},4941:function(t,e,a){"use strict";a.r(e);var i=a(2916),n=a.n(i),o=a(3282),r=a.n(o),s=r()(n());s.push([t.id,".page[data-v-5323efe4]{padding:20px;background:#fff}.input-text[data-v-5323efe4]{color:#303133;font-size:15px;padding:6px 9px;border-bottom:1px solid #dadbde;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-5323efe4]{color:silver}.button[data-v-5323efe4]{width:100%;margin:20px 0}",""]),e["default"]=s}}]); \ No newline at end of file diff --git a/public/h5/static/js/pages-patient-form.2cd57f81.js b/public/h5/static/js/pages-patient-form.2cd57f81.js new file mode 100644 index 0000000..293a271 --- /dev/null +++ b/public/h5/static/js/pages-patient-form.2cd57f81.js @@ -0,0 +1 @@ +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[611],{8314:function(t,e,a){var i=a(3089);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var n=a(5472).Z;n("581f5200",i,!0,{sourceMap:!1,shadowMode:!1})},7176:function(t,e,a){var i=a(3207);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var n=a(5472).Z;n("2d1ee20b",i,!0,{sourceMap:!1,shadowMode:!1})},4193:function(t,e,a){"use strict";a.d(e,{Z:function(){return u}});var i,n={uPopup:a(2061).Z,uSearch:a(8035).Z,uList:a(4307).Z,uListItem:a(8556).Z,uCell:a(7981).Z,uLoadmore:a(9829).Z},o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("u-popup",{attrs:{show:t.show,mode:"right",safeAreaInsetTop:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)},open:function(e){arguments[0]=e=t.$handleEvent(e),t.open.apply(void 0,arguments)}}},[a("u-search",{attrs:{placeholder:"输入 姓名/手机号 搜索",clearabled:!0,showAction:!1,margin:"10px 0"},on:{search:function(e){arguments[0]=e=t.$handleEvent(e),t.load(!0)},change:function(e){arguments[0]=e=t.$handleEvent(e),t.changeSearch.apply(void 0,arguments)}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),a("u-list",{attrs:{width:300,height:t.listHeight},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.reachBottom.apply(void 0,arguments)}}},t._l(t.list,(function(e,i){return a("u-list-item",{key:e.id},[a("u-cell",{attrs:{title:e.name,name:i,value:e.phone,clickable:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click.apply(void 0,arguments)}}})],1)})),1),t.loading?a("v-uni-view",{staticClass:"loading"},[a("u-loadmore",{attrs:{status:t.status}})],1):t._e()],1)},s=[],r=(a(423),a(101),a(6228),{name:"SelectAdminUser",props:["type"],data:function(){return{search:"",show:!1,list:[],page:1,perPage:20,loading:!0,status:"loadmore",listHeight:0}},created:function(){var t=this;this.load(!0),uni.getSystemInfo({success:function(e){t.listHeight=e.safeArea.height-54}})},methods:{open:function(){this.show=!0},close:function(){this.show=!1},click:function(t){this.$emit("select",this.list[t.name])},load:function(t){var e=this;if(t&&(this.page=1,this.list=[],this.status="loadmore"),"nomore"!=this.status){this.loading=!0,this.status="loading";var a={_action:"getData",page:this.page,perPage:this.perPage,keyword:this.search,treat_type_id:this.type?this.type:uni.getStorageSync("medical_record_treat_type_id")};this.$ajax.get("/admin-api/user",{params:a}).then((function(t){e.loading=!1,0==t.status&&(e.list=e.list.concat(t.data.items),e.list.length>=t.data.total&&(e.status="nomore"))})).catch((function(t){e.loading=!1,e.status="nomore"}))}},reachBottom:function(){this.page++,this.load()},changeSearch:function(t){t||this.load(!0)}}}),l=r,c=(a(8314),a(1503)),d=(0,c.Z)(l,o,s,!1,null,"29937191",null,!1,n,i),u=d.exports},6704:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return v}});var i,n={"u-Form":a(2975).Z,uFormItem:a(3751).Z,uIcon:a(5862).Z,"u-Input":a(4159).Z,uButton:a(7344).Z,uDatetimePicker:a(2632).Z,uActionSheet:a(7030).Z},o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"page"},[a("u--form",{ref:"form",attrs:{model:t.form,labelWidth:"70"}},[a("u-form-item",{attrs:{prop:"user_id",label:"客户"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openUser.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.user_id?a("v-uni-text",[t._v(t._s(t.user.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择客户")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"name",label:"姓名",required:!0}},[a("u--input",{attrs:{border:"bottom",placeholder:"请输入姓名"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),a("u-form-item",{attrs:{prop:"sex",label:"性别"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleGender.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"input-text"},[a("v-uni-text",[t._v(t._s(t.genderSelect))]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"phone",label:"联系方式"}},[a("u--input",{attrs:{border:"bottom",placeholder:"请输入联系方式"},model:{value:t.form.phone,callback:function(e){t.$set(t.form,"phone",e)},expression:"form.phone"}})],1),a("u-form-item",{attrs:{prop:"address",label:"地址"}},[a("u--input",{attrs:{border:"bottom",placeholder:"请输入地址"},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1),a("u-form-item",{attrs:{prop:"birthday",label:"出生年月"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday("birthday")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.birthday?a("v-uni-text",[t._v(t._s(t._f("date")(t.form.birthday,"yyyy-MM-dd")))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择出生日期")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"treat_at",label:"初诊日期"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday("treat_at")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.treat_at?a("v-uni-text",[t._v(t._s(t._f("date")(t.form.treat_at,"yyyy-MM-dd")))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择初诊日期")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"doctor_id",label:"坐诊医生"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("doctor")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.doctor_id?a("v-uni-text",[t._v(t._s(t.adminUser.doctor.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择坐诊医生")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"inviter_id",label:"推荐人"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("inviter")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.inviter_id?a("v-uni-text",[t._v(t._s(t.adminUser.inviter.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择推荐人")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{prop:"saler_id",label:"业务员"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.opendDoctor("saler")}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.saler_id?a("v-uni-text",[t._v(t._s(t.adminUser.saler.text))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("请选择业务员")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{label:"病情描述",prop:"illness"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openEditor.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"input-text"},[t.form.illness?a("v-uni-text",[t._v(t._s(t.form.illness))]):a("v-uni-text",{staticClass:"input-placeholder"},[t._v("点击修改")]),a("u-icon",{attrs:{name:"arrow-right"}})],1)],1),a("u-form-item",{attrs:{label:"图片资料",prop:"images",borderBottom:!0}},[a("cu-image",{ref:"images"})],1),a("v-uni-view",{staticClass:"button"},[a("u-button",{attrs:{text:"提交",type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}})],1)],1),a("u-datetime-picker",{attrs:{mode:"date",show:t.datePicker.show,closeOnClickOverlay:!0,minDate:t.datePicker.minDate},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday.apply(void 0,arguments)},cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleBirthday.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.selectBirthday.apply(void 0,arguments)}},model:{value:t.datePicker.value,callback:function(e){t.$set(t.datePicker,"value",e)},expression:"datePicker.value"}}),a("select-admin-user",{ref:"select-admin-user",on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectDoctor.apply(void 0,arguments)}}}),a("u-action-sheet",{attrs:{show:t.genderShow,actions:t.gender.options,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleGender.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectGender.apply(void 0,arguments)}}}),a("cu-editor",{ref:"editor",on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmEditor.apply(void 0,arguments)}}}),a("select-user",{ref:"select-user",on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectUser.apply(void 0,arguments)}}})],1)},s=[],r=(a(423),a(262),a(8770),a(9299),a(8059)),l=a(8272),c=a(7744),d=a(7679),u=a(4193),h={components:{SelectAdminUser:l.Z,CuEditor:c.Z,CuImage:d.Z,SelectUser:u.Z},data:function(){return{id:"",form:{type_id:"",user_id:"",name:"",sex:r.Z.none.value,phone:"",birthday:"",address:"",treat_at:"",doctor_id:"",inviter_id:"",saler_id:"",illness:"",images:[]},rules:{name:{required:!0,message:"姓名必填",trigger:["blur","change"]}},gender:r.Z,genderShow:!1,genderSelect:r.Z.none.text,datePicker:{show:!1,name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},adminUser:{key:"",doctor:{text:"",value:""},inviter:{text:"",value:""},saler:{text:"",value:""}},user:{value:"",text:""}}},onLoad:function(t){var e=this;if(this.form.type_id=uni.getStorageSync("medical_record_treat_type_id"),t.id){this.id=t.id,uni.showLoading();var a={_action:"getData"};this.$ajax.get("/admin-api/patient/".concat(t.id),{params:a}).then((function(t){0==t.status&&(e.form={id:t.data.id,name:t.data.name,sex:t.data.sex,phone:t.data.phone,birthday:t.data.birthday?t.data.birthday.replaceAll("-","/"):"",address:t.data.address,treat_at:t.data.treat_at?t.data.treat_at.replaceAll("-","/"):"",doctor_id:t.data.doctor_id,illness:t.data.illness},e.genderSelect=t.data.sex_text,t.data.doctor&&(e.doctor={text:t.data.doctor.name,value:t.data.doctor.id}),uni.setNavigationBarTitle({title:e.form.name}))}))}else uni.setNavigationBarTitle({title:"添加病人"})},onReady:function(){this.$refs["form"].setRules(this.rules)},methods:{toggleGender:function(){this.genderShow=!this.genderShow},toggleBirthday:function(t){t&&(this.datePicker.name=t,this.datePicker.value=this.form[t]?Math.floor(1e3*this.form[t]):(new Date).getTime()),this.datePicker.show=!this.datePicker.show},selectGender:function(t){this.genderSelect=t.name,this.form.sex=t.value},selectBirthday:function(t){this.form[this.datePicker.name]=uni.$u.timeFormat(t.value,"yyyy-mm-dd"),this.toggleBirthday()},opendDoctor:function(t){this.adminUser.key=t,this.$refs["select-admin-user"].open()},closeDoctor:function(){this.$refs["select-admin-user"].close()},selectDoctor:function(t){var e=this.adminUser.key;this.form["".concat(e,"_id")]=t.id,this.adminUser[e]={value:t.id,text:t.name},this.closeDoctor()},openEditor:function(){this.$refs["editor"].open(this.form.illness)},confirmEditor:function(t){this.form.illness=t},openUser:function(){this.$refs["select-user"].open()},closeUser:function(){this.$refs["select-user"].close()},selectUser:function(t){this.user={value:t.id,text:t.phone},this.form.user_id=t.id,this.form.name=t.name,this.form.phone=t.phone,this.form.address=t.address,this.selectGender({name:t.sex_text,value:t.sex}),this.form.birthday=t.birthday_format,this.closeUser()},submit:function(){this.form.images=this.$refs["images"].getList().map((function(t){return t.url})),uni.showLoading(),this.id?this.update():this.create()},update:function(){this.$ajax.put("/admin-api/patient/".concat(this.id),this.form).then((function(t){0==t.status&&(uni.showToast({title:"保存成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))},create:function(){this.$ajax.post("/admin-api/patient",this.form).then((function(t){0==t.status&&(uni.showToast({title:"提交成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))}}},p=h,m=(a(7176),a(1503)),f=(0,m.Z)(p,o,s,!1,null,"b694843a",null,!1,n,i),v=f.exports},8059:function(t,e,a){"use strict";a(5827),a(6007),a(444);var i={none:{value:0,text:"未知"},male:{value:1,text:"男"},female:{value:2,text:"女"},options:[],map:{}};Object.keys(i).forEach((function(t){void 0!==i[t]&&void 0!==i[t].value&&(i.options.push({name:i[t].text,value:i[t].value}),i.map[i[t].value]=i[t].text)})),e.Z=i},3089:function(t,e,a){"use strict";a.r(e);var i=a(2916),n=a.n(i),o=a(3282),s=a.n(o),r=s()(n());r.push([t.id,".loading[data-v-29937191]{position:fixed;bottom:0;background-color:#fff;width:300px}",""]),e["default"]=r},3207:function(t,e,a){"use strict";a.r(e);var i=a(2916),n=a.n(i),o=a(3282),s=a.n(o),r=s()(n());r.push([t.id,".page[data-v-b694843a]{padding:20px;background:#fff}.input-text[data-v-b694843a]{color:#303133;font-size:15px;padding:6px 9px;border-bottom:1px solid #dadbde;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-b694843a]{color:silver}.button[data-v-b694843a]{width:100%;margin:20px 0}",""]),e["default"]=r}}]); \ No newline at end of file diff --git a/public/h5/static/js/pages-record-detail.08dae0de.js b/public/h5/static/js/pages-record-detail.08dae0de.js new file mode 100644 index 0000000..4374d21 --- /dev/null +++ b/public/h5/static/js/pages-record-detail.08dae0de.js @@ -0,0 +1 @@ +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[487],{9011:function(e,t,n){var i=n(4776);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(5472).Z;a("7b88b1d2",i,!0,{sourceMap:!1,shadowMode:!1})},7304:function(e,t,n){var i=n(2727);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(5472).Z;a("6e323258",i,!0,{sourceMap:!1,shadowMode:!1})},9287:function(e,t,n){var i=n(8233);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(5472).Z;a("e9666474",i,!0,{sourceMap:!1,shadowMode:!1})},3625:function(e,t,n){"use strict";var i;n.d(t,{Z:function(){return _}});var a,o,l,s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("uvTextarea",{attrs:{value:e.value,placeholder:e.placeholder,height:e.height,confirmType:e.confirmType,disabled:e.disabled,count:e.count,focus:e.focus,autoHeight:e.autoHeight,fixed:e.fixed,cursorSpacing:e.cursorSpacing,cursor:e.cursor,showConfirmBar:e.showConfirmBar,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd,adjustPosition:e.adjustPosition,disableDefaultPadding:e.disableDefaultPadding,holdKeyboard:e.holdKeyboard,maxlength:e.maxlength,border:e.border,customStyle:e.customStyle,formatter:e.formatter,ignoreCompositionEvent:e.ignoreCompositionEvent},on:{focus:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("focus")}.apply(void 0,arguments)},blur:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("blur")}.apply(void 0,arguments)},linechange:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("linechange",t)}.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("confirm")}.apply(void 0,arguments)},input:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("input",t)}.apply(void 0,arguments)},keyboardheightchange:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("keyboardheightchange")}.apply(void 0,arguments)}}})},r=[],u=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-textarea",class:e.textareaClass,style:[e.textareaStyle]},[n("v-uni-textarea",{staticClass:"u-textarea__field",style:{height:e.$u.addUnit(e.height)},attrs:{value:e.innerValue,placeholder:e.placeholder,"placeholder-style":e.$u.addStyle(e.placeholderStyle,"string"),"placeholder-class":e.placeholderClass,disabled:e.disabled,focus:e.focus,autoHeight:e.autoHeight,fixed:e.fixed,cursorSpacing:e.cursorSpacing,cursor:e.cursor,showConfirmBar:e.showConfirmBar,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd,adjustPosition:e.adjustPosition,disableDefaultPadding:e.disableDefaultPadding,holdKeyboard:e.holdKeyboard,maxlength:e.maxlength,confirmType:e.confirmType,ignoreCompositionEvent:e.ignoreCompositionEvent},on:{focus:function(t){arguments[0]=t=e.$handleEvent(t),e.onFocus.apply(void 0,arguments)},blur:function(t){arguments[0]=t=e.$handleEvent(t),e.onBlur.apply(void 0,arguments)},linechange:function(t){arguments[0]=t=e.$handleEvent(t),e.onLinechange.apply(void 0,arguments)},input:function(t){arguments[0]=t=e.$handleEvent(t),e.onInput.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.onConfirm.apply(void 0,arguments)},keyboardheightchange:function(t){arguments[0]=t=e.$handleEvent(t),e.onKeyboardheightchange.apply(void 0,arguments)}}}),e.count?n("v-uni-text",{staticClass:"u-textarea__count",style:{"background-color":e.disabled?"transparent":"#fff"}},[e._v(e._s(e.innerValue.length)+"/"+e._s(e.maxlength))]):e._e()],1)},c=[],d={props:{value:{type:[String,Number],default:uni.$u.props.textarea.value},placeholder:{type:[String,Number],default:uni.$u.props.textarea.placeholder},placeholderClass:{type:String,default:uni.$u.props.input.placeholderClass},placeholderStyle:{type:[String,Object],default:uni.$u.props.input.placeholderStyle},height:{type:[String,Number],default:uni.$u.props.textarea.height},confirmType:{type:String,default:uni.$u.props.textarea.confirmType},disabled:{type:Boolean,default:uni.$u.props.textarea.disabled},count:{type:Boolean,default:uni.$u.props.textarea.count},focus:{type:Boolean,default:uni.$u.props.textarea.focus},autoHeight:{type:Boolean,default:uni.$u.props.textarea.autoHeight},fixed:{type:Boolean,default:uni.$u.props.textarea.fixed},cursorSpacing:{type:Number,default:uni.$u.props.textarea.cursorSpacing},cursor:{type:[String,Number],default:uni.$u.props.textarea.cursor},showConfirmBar:{type:Boolean,default:uni.$u.props.textarea.showConfirmBar},selectionStart:{type:Number,default:uni.$u.props.textarea.selectionStart},selectionEnd:{type:Number,default:uni.$u.props.textarea.selectionEnd},adjustPosition:{type:Boolean,default:uni.$u.props.textarea.adjustPosition},disableDefaultPadding:{type:Boolean,default:uni.$u.props.textarea.disableDefaultPadding},holdKeyboard:{type:Boolean,default:uni.$u.props.textarea.holdKeyboard},maxlength:{type:[String,Number],default:uni.$u.props.textarea.maxlength},border:{type:String,default:uni.$u.props.textarea.border},formatter:{type:[Function,null],default:uni.$u.props.textarea.formatter},ignoreCompositionEvent:{type:Boolean,default:!0}}},p={name:"u-textarea",mixins:[uni.$u.mpMixin,uni.$u.mixin,d],data(){return{innerValue:"",focused:!1,firstChange:!0,changeFromInner:!1,innerFormatter:e=>e}},watch:{value:{immediate:!0,handler(e,t){this.innerValue=e,!1===this.firstChange&&!1===this.changeFromInner&&this.valueChange(),this.firstChange=!1,this.changeFromInner=!1}}},computed:{textareaClass(){let e=[],{border:t,disabled:n,shape:i}=this;return"surround"===t&&(e=e.concat(["u-border","u-textarea--radius"])),"bottom"===t&&(e=e.concat(["u-border-bottom","u-textarea--no-radius"])),n&&e.push("u-textarea--disabled"),e.join(" ")},textareaStyle(){const e={};return uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}},methods:{setFormatter(e){this.innerFormatter=e},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e),uni.$u.formValidate(this,"blur")},onLinechange(e){this.$emit("linechange",e)},onInput(e){let{value:t=""}=e.detail||{};const n=this.formatter||this.innerFormatter,i=n(t);this.innerValue=t,this.$nextTick((()=>{this.innerValue=i,this.valueChange()}))},valueChange(){const e=this.innerValue;this.$nextTick((()=>{this.$emit("input",e),this.changeFromInner=!0,this.$emit("change",e),uni.$u.formValidate(this,"change")}))},onConfirm(e){this.$emit("confirm",e)},onKeyboardheightchange(e){this.$emit("keyboardheightchange",e)}}},f=p,h=(n(9287),n(1503)),v=(0,h.Z)(f,u,c,!1,null,"2cb119ec",null,!1,a,o),m=v.exports,y={name:"u--textarea",mixins:[uni.$u.mpMixin,d,uni.$u.mixin],components:{uvTextarea:m}},g=y,x=(0,h.Z)(g,s,r,!1,null,null,null,!1,i,l),_=x.exports},156:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i,a={uLine:n(4060).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-cell-group",class:[e.customClass],style:[e.$u.addStyle(e.customStyle)]},[e.title?n("v-uni-view",{staticClass:"u-cell-group__title"},[e._t("title",[n("v-uni-text",{staticClass:"u-cell-group__title__text"},[e._v(e._s(e.title))])])],2):e._e(),n("v-uni-view",{staticClass:"u-cell-group__wrapper"},[e.border?n("u-line"):e._e(),e._t("default")],2)],1)},l=[],s={props:{title:{type:String,default:uni.$u.props.cellGroup.title},border:{type:Boolean,default:uni.$u.props.cellGroup.border}}},r={name:"u-cell-group",mixins:[uni.$u.mpMixin,uni.$u.mixin,s]},u=r,c=(n(7304),n(1503)),d=(0,c.Z)(u,o,l,!1,null,"38668d34",null,!1,a,i),p=d.exports},6188:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return g}});var i,a={uCellGroup:n(156).Z,uCell:n(7981).Z,uSwitch:n(3094).Z,uButton:n(7344).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(2632).Z,uModal:n(5912).Z,"u-Input":n(4159).Z,"u-Textarea":n(3625).Z,uPicker:n(2206).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"page"},[n("u-cell-group",{attrs:{border:!1}},[n("u-cell",{attrs:{title:"姓名",value:this.info.patient?this.info.patient.name:""}}),n("u-cell",{attrs:{title:"类别",value:e.type.text}}),n("u-cell",{attrs:{title:"病种",value:e.illnessType.label,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openIllnessType.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:e.type.text+"时间",value:e._f("date")(e.info.treat_at),isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("treat_at")}}}),n("u-cell",{attrs:{title:"划线价",value:e.info.origin_price,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openModal("划线价","origin_price","number")}}}),n("u-cell",{attrs:{title:"实收价",value:e.info.sell_price,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openModal("实收价","sell_price","number")}}}),n("u-cell",{attrs:{title:"收费情况",value:e.orderStatus.text,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleOrderStatus.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:e.type.text+"医师",value:e.adminUser.doctor_name,label:"提成金额: "+e.info.doctor_money,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("doctor")}}}),n("u-cell",{attrs:{title:"邀请人",value:e.info.inviter?e.info.inviter.name:"",label:"提成金额: "+e.info.inviter_money}}),n("u-cell",{attrs:{title:"业务员",value:e.info.saler?e.info.saler.name:"",label:"提成金额: "+e.info.saler_money}}),n("u-cell",{attrs:{title:e.type.text+"情况",isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openEditor.apply(void 0,arguments)}}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("v-uni-text",[e._v(e._s(e.info.content))])],1)],1),n("u-cell",{attrs:{title:"图片资料"}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("cu-image",{ref:"images",on:{update:function(t){arguments[0]=t=e.$handleEvent(t),e.updateImages.apply(void 0,arguments)}}})],1)],1),n("u-cell",{attrs:{title:"下次就诊时间",value:e._f("date")(e.info.next_treat_at),isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("next_treat_at","datetime")}}}),n("u-cell",{attrs:{title:"开启通知"}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("u-switch",{attrs:{activeValue:0,inactiveValue:1,asyncChange:!0},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.updateSwitch.apply(void 0,arguments)}},model:{value:e.info.is_notified,callback:function(t){e.$set(e.info,"is_notified",t)},expression:"info.is_notified"}})],1)],1),0==e.info.is_notified?n("u-cell",{attrs:{title:"通知医师",value:e.adminUser.notify_user_name,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("notify_user")}}}):e._e(),0==e.info.is_notified?n("u-cell",{attrs:{title:"通知时间",value:e._f("date")(e.info.notify_at,"yyyy-MM-dd"),isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("notify_at","date")}}}):e._e(),n("u-cell",{attrs:{title:"录入时间",value:e.info.created_at}})],1),n("div",{staticClass:"btn"},[n("u-button",{attrs:{text:"病人信息",type:"primary"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.patientDetail.apply(void 0,arguments)}}}),n("u-button",{attrs:{text:"删除病历",type:"error"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.deleteRecord.apply(void 0,arguments)}}})],1),n("select-admin-user",{ref:"select-admin-user",on:{select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectAdminUser.apply(void 0,arguments)}}}),n("u-action-sheet",{attrs:{title:e.type.title,show:e.type.show,actions:e.type.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleType.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectType.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:e.datePicker.mode,show:e.datePicker.show,closeOnClickOverlay:!0,minDate:e.datePicker.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectDatePicker.apply(void 0,arguments)}},model:{value:e.datePicker.value,callback:function(t){e.$set(e.datePicker,"value",t)},expression:"datePicker.value"}}),n("u-modal",{attrs:{show:e.modal.show,title:e.modal.title,showCancelButton:!0,closeOnClickOverlay:!0,asyncClose:!1},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmModal.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeModal.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeModal.apply(void 0,arguments)}}},["text"==e.modal.type?n("u--input",{attrs:{border:"surround"},model:{value:e.modal.value,callback:function(t){e.$set(e.modal,"value",t)},expression:"modal.value"}}):e._e(),"number"==e.modal.type?n("u--input",{attrs:{type:"number",border:"surround"},model:{value:e.modal.value,callback:function(t){e.$set(e.modal,"value",t)},expression:"modal.value"}}):e._e(),"textarea"==e.modal.type?n("u--textarea",{attrs:{showConfirmBar:!1},model:{value:e.modal.value,callback:function(t){e.$set(e.modal,"value",t)},expression:"modal.value"}}):e._e()],1),n("u-action-sheet",{attrs:{title:e.orderStatus.title,show:e.orderStatus.show,actions:e.orderStatus.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleOrderStatus.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectOrderStatus.apply(void 0,arguments)}}}),n("cu-editor",{ref:"editor",on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmEditor.apply(void 0,arguments)}}}),n("u-picker",{attrs:{show:e.illnessType.show,columns:e.illnessType.list,keyName:"label",closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmIllnessType.apply(void 0,arguments)}}})],1)},l=[],s=n(159),r=n(3762),u=n(3062),c=(n(423),n(262),n(8770),n(9299),n(7744)),d=n(8272),p=n(7438),f=n(7679),h={components:{SelectAdminUser:d.Z,CuEditor:c.Z,CuImage:f.Z},data:function(){return{id:"",info:{patient_id:"",type_id:"",origin_price:"",sell_price:"",notify_remarks:"",is_notified:0},adminUser:{key:"",doctor_name:"",notify_user_name:""},type:{text:"",title:"类别",show:!1,options:[]},datePicker:{show:!1,mode:"datetime",name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},modal:{type:"text",show:!1,title:"",key:"",value:""},orderStatus:{title:"收费情况",show:!1,text:"",options:p.Z.options},illnessType:{show:!1,value:"",label:"",list:[]}}},onLoad:function(e){this.id=e.id,this.init()},onPullDownRefresh:function(){this.loadData()},methods:{init:function(){var e=this;return(0,u.Z)((0,r.Z)().mark((function t(){var n,i;return(0,r.Z)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.loadData();case 2:return t.next=4,e.$ajax.get("/admin-api/api/keywords/list",{params:{type_key:"illness_type",value:null===(n=e.info)||void 0===n||null===(n=n.type)||void 0===n?void 0:n.key}});case 4:i=t.sent,0==i.status&&(e.illnessType.list=[i.data]);case 6:case"end":return t.stop()}}),t)})))()},loadData:function(){var e=this;return(0,u.Z)((0,r.Z)().mark((function t(){var n,i,a;return(0,r.Z)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.id){t.next=2;break}return t.abrupt("return");case 2:return uni.showLoading(),n={_action:"getData"},t.next=6,e.$ajax.get("/admin-api/record/".concat(e.id),{params:n});case 6:i=t.sent,uni.stopPullDownRefresh(),0==i.status&&(e.info=(0,s.Z)((0,s.Z)({},i.data),{},{treat_at:i.data.treat_at?i.data.treat_at.replaceAll("-","/"):"",next_treat_at:i.data.next_treat_at?i.data.next_treat_at.replaceAll("-","/"):"",notify_at:i.data.notify_at?i.data.notify_at.replaceAll("-","/"):""}),i.data.images&&e.$refs["images"].setList(i.data.images.map((function(e){return{url:e}}))),e.type.text=e.info.type?e.info.type.name:"",e.adminUser.doctor_name=e.info.doctor?e.info.doctor.name:"",e.orderStatus.text=p.Z.map[e.info.order_status],e.adminUser.notify_user_name=e.info.notify_user?e.info.notify_user.name:"",i.data.illness_type&&(a=i.data.illness_type,e.illnessType.label=a.name,e.illnessType.value=a.id));case 9:case"end":return t.stop()}}),t)})))()},update:function(e,t){var n={id:this.id};return n[e]=t,this.$ajax.put("/admin-api/record/".concat(this.id),n,{custom:{loading:!0}})},opendAdminUser:function(e){this.adminUser.key=e,this.$refs["select-admin-user"].open()},closeAdminUser:function(){this.adminUser.key="",this.$refs["select-admin-user"].close()},selectAdminUser:function(e){var t=this,n=this.adminUser.key,i=e.id;this.update("".concat(n,"_id"),i).then((function(a){t.closeAdminUser(),0==a.status&&(t.info["".concat(n,"_id")]=i,t.adminUser["".concat(n,"_name")]=e.name)}))},toggleType:function(){this.type.show=!this.type.show},selectType:function(e){var t=this;this.update("type_id",e.id).then((function(n){0==n.status&&(t.type.text=e.name,t.info.type_id=e.id)}))},toggleDatePicker:function(e,t){if(e){this.datePicker.name=e;var n=this.info[e];n&&(this.datePicker.value=new Date(n).getTime())}t&&(this.datePicker.mode=t),this.datePicker.show=!this.datePicker.show},selectDatePicker:function(e){var t=this,n=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM"),i=this.datePicker.name;this.update(i,n).then((function(e){0==e.status&&(t.info[i]=n,t.toggleDatePicker())}))},openModal:function(e,t,n){this.modal.type=n||"text",this.modal.title=e,this.modal.key=t,this.modal.show=!0,this.modal.value=this.info[t]},confirmModal:function(){var e=this,t=this.modal.key,n=this.modal.value;this.update(t,n).then((function(i){e.closeModal(),0==i.status&&(e.info[t]=n)}))},closeModal:function(){this.modal.show=!1},toggleOrderStatus:function(){this.orderStatus.show=!this.orderStatus.show},selectOrderStatus:function(e){var t=this,n="order_status",i=e.value,a=e.name;this.update(n,i).then((function(e){0==e.status&&(t.orderStatus.text=a,t.info[n]=i)}))},openEditor:function(){this.$refs["editor"].open(this.info.content)},confirmEditor:function(e){var t=this,n=e,i="content";this.update(i,n).then((function(e){0==e.status&&(t.info[i]=n)}))},updateImages:function(e){var t=e.map((function(e){return e.url}));this.update("images",t).then((function(e){0==e.status&&console.log(e)}))},updateSwitch:function(e){var t=this;this.update("is_notified",e).then((function(n){0==n.status&&(t.info.is_notified=e)}))},deleteRecord:function(){var e=this;uni.showModal({title:"删除病历记录",content:"是否确定?",success:function(t){t.confirm&&e.handleDelete(e.id)}})},handleDelete:function(e){uni.showLoading(),this.$ajax.delete("/admin-api/record/".concat(e)).then((function(e){0==e.status&&(uni.showToast({title:"删除成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1e3))}))},patientDetail:function(){return uni.navigateTo({url:"/pages/patient/detail?id=".concat(this.info.patient_id)})},openIllnessType:function(){this.illnessType.show=!0},closeIllnessType:function(){this.illnessType.show=!1},confirmIllnessType:function(e){var t=this,n=e.value[0];n&&(this.closeIllnessType(),this.update("illness_type_id",n.value).then((function(e){0==e.status&&(t.info.illness_type_id=n.value,t.illnessType.value=n.value,t.illnessType.label=n.label)})))}}},v=h,m=(n(9011),n(1503)),y=(0,m.Z)(v,o,l,!1,null,"384b4249",null,!1,a,i),g=y.exports},4776:function(e,t,n){"use strict";n.r(t);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([e.id,".page[data-v-384b4249]{padding:20px;background:#fff}.btn[data-v-384b4249]{padding:0 10px}.btn .u-button[data-v-384b4249]{margin-top:20px}.text-gray[data-v-384b4249]{color:gray}",""]),t["default"]=s},2727:function(e,t,n){"use strict";n.r(t);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-38668d34], uni-scroll-view[data-v-38668d34], uni-swiper-item[data-v-38668d34]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-cell-group[data-v-38668d34]{flex:1}.u-cell-group__title[data-v-38668d34]{padding:16px 16px 8px}.u-cell-group__title__text[data-v-38668d34]{font-size:15px;line-height:16px;color:#303133}.u-cell-group__wrapper[data-v-38668d34]{position:relative}',""]),t["default"]=s},8233:function(e,t,n){"use strict";n.r(t);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-2cb119ec], uni-scroll-view[data-v-2cb119ec], uni-swiper-item[data-v-2cb119ec]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-textarea[data-v-2cb119ec]{border-radius:4px;background-color:#fff;position:relative;\ndisplay:flex;\nflex-direction:row;flex:1;padding:9px}.u-textarea--radius[data-v-2cb119ec]{border-radius:4px}.u-textarea--no-radius[data-v-2cb119ec]{border-radius:0}.u-textarea--disabled[data-v-2cb119ec]{background-color:#f5f7fa}.u-textarea__field[data-v-2cb119ec]{flex:1;font-size:15px;color:#606266;width:100%}.u-textarea__count[data-v-2cb119ec]{position:absolute;right:5px;bottom:2px;font-size:12px;color:#909193;background-color:#fff;padding:1px 4px}',""]),t["default"]=s}}]); \ No newline at end of file diff --git a/public/h5/static/js/pages-record-detail.9947387c.js b/public/h5/static/js/pages-record-detail.9947387c.js deleted file mode 100644 index cb69fc2..0000000 --- a/public/h5/static/js/pages-record-detail.9947387c.js +++ /dev/null @@ -1 +0,0 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[487],{1242:function(e,t,n){var i=n(5975);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(5472).Z;a("285b9c8e",i,!0,{sourceMap:!1,shadowMode:!1})},7304:function(e,t,n){var i=n(2727);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(5472).Z;a("6e323258",i,!0,{sourceMap:!1,shadowMode:!1})},9287:function(e,t,n){var i=n(8233);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var a=n(5472).Z;a("e9666474",i,!0,{sourceMap:!1,shadowMode:!1})},3625:function(e,t,n){"use strict";var i;n.d(t,{Z:function(){return _}});var a,o,l,s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("uvTextarea",{attrs:{value:e.value,placeholder:e.placeholder,height:e.height,confirmType:e.confirmType,disabled:e.disabled,count:e.count,focus:e.focus,autoHeight:e.autoHeight,fixed:e.fixed,cursorSpacing:e.cursorSpacing,cursor:e.cursor,showConfirmBar:e.showConfirmBar,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd,adjustPosition:e.adjustPosition,disableDefaultPadding:e.disableDefaultPadding,holdKeyboard:e.holdKeyboard,maxlength:e.maxlength,border:e.border,customStyle:e.customStyle,formatter:e.formatter,ignoreCompositionEvent:e.ignoreCompositionEvent},on:{focus:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("focus")}.apply(void 0,arguments)},blur:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("blur")}.apply(void 0,arguments)},linechange:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("linechange",t)}.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("confirm")}.apply(void 0,arguments)},input:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("input",t)}.apply(void 0,arguments)},keyboardheightchange:function(t){arguments[0]=t=e.$handleEvent(t),function(t){return e.$emit("keyboardheightchange")}.apply(void 0,arguments)}}})},r=[],u=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-textarea",class:e.textareaClass,style:[e.textareaStyle]},[n("v-uni-textarea",{staticClass:"u-textarea__field",style:{height:e.$u.addUnit(e.height)},attrs:{value:e.innerValue,placeholder:e.placeholder,"placeholder-style":e.$u.addStyle(e.placeholderStyle,"string"),"placeholder-class":e.placeholderClass,disabled:e.disabled,focus:e.focus,autoHeight:e.autoHeight,fixed:e.fixed,cursorSpacing:e.cursorSpacing,cursor:e.cursor,showConfirmBar:e.showConfirmBar,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd,adjustPosition:e.adjustPosition,disableDefaultPadding:e.disableDefaultPadding,holdKeyboard:e.holdKeyboard,maxlength:e.maxlength,confirmType:e.confirmType,ignoreCompositionEvent:e.ignoreCompositionEvent},on:{focus:function(t){arguments[0]=t=e.$handleEvent(t),e.onFocus.apply(void 0,arguments)},blur:function(t){arguments[0]=t=e.$handleEvent(t),e.onBlur.apply(void 0,arguments)},linechange:function(t){arguments[0]=t=e.$handleEvent(t),e.onLinechange.apply(void 0,arguments)},input:function(t){arguments[0]=t=e.$handleEvent(t),e.onInput.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.onConfirm.apply(void 0,arguments)},keyboardheightchange:function(t){arguments[0]=t=e.$handleEvent(t),e.onKeyboardheightchange.apply(void 0,arguments)}}}),e.count?n("v-uni-text",{staticClass:"u-textarea__count",style:{"background-color":e.disabled?"transparent":"#fff"}},[e._v(e._s(e.innerValue.length)+"/"+e._s(e.maxlength))]):e._e()],1)},c=[],d={props:{value:{type:[String,Number],default:uni.$u.props.textarea.value},placeholder:{type:[String,Number],default:uni.$u.props.textarea.placeholder},placeholderClass:{type:String,default:uni.$u.props.input.placeholderClass},placeholderStyle:{type:[String,Object],default:uni.$u.props.input.placeholderStyle},height:{type:[String,Number],default:uni.$u.props.textarea.height},confirmType:{type:String,default:uni.$u.props.textarea.confirmType},disabled:{type:Boolean,default:uni.$u.props.textarea.disabled},count:{type:Boolean,default:uni.$u.props.textarea.count},focus:{type:Boolean,default:uni.$u.props.textarea.focus},autoHeight:{type:Boolean,default:uni.$u.props.textarea.autoHeight},fixed:{type:Boolean,default:uni.$u.props.textarea.fixed},cursorSpacing:{type:Number,default:uni.$u.props.textarea.cursorSpacing},cursor:{type:[String,Number],default:uni.$u.props.textarea.cursor},showConfirmBar:{type:Boolean,default:uni.$u.props.textarea.showConfirmBar},selectionStart:{type:Number,default:uni.$u.props.textarea.selectionStart},selectionEnd:{type:Number,default:uni.$u.props.textarea.selectionEnd},adjustPosition:{type:Boolean,default:uni.$u.props.textarea.adjustPosition},disableDefaultPadding:{type:Boolean,default:uni.$u.props.textarea.disableDefaultPadding},holdKeyboard:{type:Boolean,default:uni.$u.props.textarea.holdKeyboard},maxlength:{type:[String,Number],default:uni.$u.props.textarea.maxlength},border:{type:String,default:uni.$u.props.textarea.border},formatter:{type:[Function,null],default:uni.$u.props.textarea.formatter},ignoreCompositionEvent:{type:Boolean,default:!0}}},p={name:"u-textarea",mixins:[uni.$u.mpMixin,uni.$u.mixin,d],data(){return{innerValue:"",focused:!1,firstChange:!0,changeFromInner:!1,innerFormatter:e=>e}},watch:{value:{immediate:!0,handler(e,t){this.innerValue=e,!1===this.firstChange&&!1===this.changeFromInner&&this.valueChange(),this.firstChange=!1,this.changeFromInner=!1}}},computed:{textareaClass(){let e=[],{border:t,disabled:n,shape:i}=this;return"surround"===t&&(e=e.concat(["u-border","u-textarea--radius"])),"bottom"===t&&(e=e.concat(["u-border-bottom","u-textarea--no-radius"])),n&&e.push("u-textarea--disabled"),e.join(" ")},textareaStyle(){const e={};return uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}},methods:{setFormatter(e){this.innerFormatter=e},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e),uni.$u.formValidate(this,"blur")},onLinechange(e){this.$emit("linechange",e)},onInput(e){let{value:t=""}=e.detail||{};const n=this.formatter||this.innerFormatter,i=n(t);this.innerValue=t,this.$nextTick((()=>{this.innerValue=i,this.valueChange()}))},valueChange(){const e=this.innerValue;this.$nextTick((()=>{this.$emit("input",e),this.changeFromInner=!0,this.$emit("change",e),uni.$u.formValidate(this,"change")}))},onConfirm(e){this.$emit("confirm",e)},onKeyboardheightchange(e){this.$emit("keyboardheightchange",e)}}},f=p,h=(n(9287),n(1503)),v=(0,h.Z)(f,u,c,!1,null,"2cb119ec",null,!1,a,o),m=v.exports,y={name:"u--textarea",mixins:[uni.$u.mpMixin,d,uni.$u.mixin],components:{uvTextarea:m}},g=y,x=(0,h.Z)(g,s,r,!1,null,null,null,!1,i,l),_=x.exports},156:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i,a={uLine:n(4060).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"u-cell-group",class:[e.customClass],style:[e.$u.addStyle(e.customStyle)]},[e.title?n("v-uni-view",{staticClass:"u-cell-group__title"},[e._t("title",[n("v-uni-text",{staticClass:"u-cell-group__title__text"},[e._v(e._s(e.title))])])],2):e._e(),n("v-uni-view",{staticClass:"u-cell-group__wrapper"},[e.border?n("u-line"):e._e(),e._t("default")],2)],1)},l=[],s={props:{title:{type:String,default:uni.$u.props.cellGroup.title},border:{type:Boolean,default:uni.$u.props.cellGroup.border}}},r={name:"u-cell-group",mixins:[uni.$u.mpMixin,uni.$u.mixin,s]},u=r,c=(n(7304),n(1503)),d=(0,c.Z)(u,o,l,!1,null,"38668d34",null,!1,a,i),p=d.exports},1695:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return g}});var i,a={uCellGroup:n(156).Z,uCell:n(7981).Z,uSwitch:n(3094).Z,uButton:n(7344).Z,uActionSheet:n(7030).Z,uDatetimePicker:n(2632).Z,uModal:n(5912).Z,"u-Input":n(4159).Z,"u-Textarea":n(3625).Z,uPicker:n(2206).Z},o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"page"},[n("u-cell-group",{attrs:{border:!1}},[n("u-cell",{attrs:{title:"姓名",value:this.info.patient?this.info.patient.name:""}}),n("u-cell",{attrs:{title:"类别",value:e.type.text}}),n("u-cell",{attrs:{title:"病种",value:e.illnessType.label,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openIllnessType.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:e.type.text+"时间",value:e._f("date")(e.info.treat_at),isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("treat_at")}}}),n("u-cell",{attrs:{title:"划线价",value:e.info.origin_price,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openModal("划线价","origin_price","number")}}}),n("u-cell",{attrs:{title:"实收价",value:e.info.sell_price,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openModal("实收价","sell_price","number")}}}),n("u-cell",{attrs:{title:"收费情况",value:e.orderStatus.text,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleOrderStatus.apply(void 0,arguments)}}}),n("u-cell",{attrs:{title:e.type.text+"医师",value:e.adminUser.doctor_name,label:"提成金额: "+e.info.doctor_money,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("doctor")}}}),n("u-cell",{attrs:{title:"邀请人",value:e.info.inviter?e.info.inviter.name:"",label:"提成金额: "+e.info.inviter_money}}),n("u-cell",{attrs:{title:"业务员",value:e.info.saler?e.info.saler.name:"",label:"提成金额: "+e.info.saler_money}}),n("u-cell",{attrs:{title:e.type.text+"情况",isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openEditor.apply(void 0,arguments)}}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("v-uni-text",[e._v(e._s(e.info.content))])],1)],1),n("u-cell",{attrs:{title:"图片资料"}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("cu-image",{ref:"images",on:{update:function(t){arguments[0]=t=e.$handleEvent(t),e.updateImages.apply(void 0,arguments)}}})],1)],1),n("u-cell",{attrs:{title:"下次就诊时间",value:e._f("date")(e.info.next_treat_at),isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("next_treat_at","datetime")}}}),n("u-cell",{attrs:{title:"开启通知"}},[n("v-uni-view",{attrs:{slot:"value"},slot:"value"},[n("u-switch",{attrs:{activeValue:0,inactiveValue:1,asyncChange:!0},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.updateSwitch.apply(void 0,arguments)}},model:{value:e.info.is_notified,callback:function(t){e.$set(e.info,"is_notified",t)},expression:"info.is_notified"}})],1)],1),0==e.info.is_notified?n("u-cell",{attrs:{title:"通知人",value:e.adminUser.notify_user_name,isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("notify_user")}}}):e._e(),0==e.info.is_notified?n("u-cell",{attrs:{title:"通知时间",value:e._f("date")(e.info.notify_at,"yyyy-MM-dd"),isLink:!0,rightIcon:"edit-pen"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("notify_at","date")}}}):e._e(),n("u-cell",{attrs:{title:"录入时间",value:e.info.created_at}})],1),n("div",{staticClass:"btn"},[n("u-button",{attrs:{text:"病人信息",type:"primary"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.patientDetail.apply(void 0,arguments)}}}),n("u-button",{attrs:{text:"删除病历",type:"error"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.deleteRecord.apply(void 0,arguments)}}})],1),n("select-admin-user",{ref:"select-admin-user",on:{select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectAdminUser.apply(void 0,arguments)}}}),n("u-action-sheet",{attrs:{title:e.type.title,show:e.type.show,actions:e.type.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleType.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectType.apply(void 0,arguments)}}}),n("u-datetime-picker",{attrs:{mode:e.datePicker.mode,show:e.datePicker.show,closeOnClickOverlay:!0,minDate:e.datePicker.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectDatePicker.apply(void 0,arguments)}},model:{value:e.datePicker.value,callback:function(t){e.$set(e.datePicker,"value",t)},expression:"datePicker.value"}}),n("u-modal",{attrs:{show:e.modal.show,title:e.modal.title,showCancelButton:!0,closeOnClickOverlay:!0,asyncClose:!1},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmModal.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeModal.apply(void 0,arguments)},close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeModal.apply(void 0,arguments)}}},["text"==e.modal.type?n("u--input",{attrs:{border:"surround"},model:{value:e.modal.value,callback:function(t){e.$set(e.modal,"value",t)},expression:"modal.value"}}):e._e(),"number"==e.modal.type?n("u--input",{attrs:{type:"number",border:"surround"},model:{value:e.modal.value,callback:function(t){e.$set(e.modal,"value",t)},expression:"modal.value"}}):e._e(),"textarea"==e.modal.type?n("u--textarea",{attrs:{showConfirmBar:!1},model:{value:e.modal.value,callback:function(t){e.$set(e.modal,"value",t)},expression:"modal.value"}}):e._e()],1),n("u-action-sheet",{attrs:{title:e.orderStatus.title,show:e.orderStatus.show,actions:e.orderStatus.options,closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleOrderStatus.apply(void 0,arguments)},select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectOrderStatus.apply(void 0,arguments)}}}),n("cu-editor",{ref:"editor",on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmEditor.apply(void 0,arguments)}}}),n("u-picker",{attrs:{show:e.illnessType.show,columns:e.illnessType.list,keyName:"label",closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmIllnessType.apply(void 0,arguments)}}})],1)},l=[],s=n(159),r=n(3762),u=n(3062),c=(n(423),n(262),n(8770),n(9299),n(7744)),d=n(8272),p=n(7438),f=n(7679),h={components:{SelectAdminUser:d.Z,CuEditor:c.Z,CuImage:f.Z},data:function(){return{id:"",info:{patient_id:"",type_id:"",origin_price:"",sell_price:"",notify_remarks:"",is_notified:0},adminUser:{key:"",doctor_name:"",notify_user_name:""},type:{text:"",title:"类别",show:!1,options:[]},datePicker:{show:!1,mode:"datetime",name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},modal:{type:"text",show:!1,title:"",key:"",value:""},orderStatus:{title:"收费情况",show:!1,text:"",options:p.Z.options},illnessType:{show:!1,value:"",label:"",list:[]}}},onLoad:function(e){this.id=e.id,this.init()},onPullDownRefresh:function(){this.loadData()},methods:{init:function(){var e=this;return(0,u.Z)((0,r.Z)().mark((function t(){var n,i;return(0,r.Z)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.loadData();case 2:return t.next=4,e.$ajax.get("/admin-api/api/keywords/list",{params:{type_key:"illness_type",value:null===(n=e.info)||void 0===n||null===(n=n.type)||void 0===n?void 0:n.key}});case 4:i=t.sent,0==i.status&&(e.illnessType.list=[i.data]);case 6:case"end":return t.stop()}}),t)})))()},loadData:function(){var e=this;return(0,u.Z)((0,r.Z)().mark((function t(){var n,i,a;return(0,r.Z)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.id){t.next=2;break}return t.abrupt("return");case 2:return uni.showLoading(),n={_action:"getData"},t.next=6,e.$ajax.get("/admin-api/record/".concat(e.id),{params:n});case 6:i=t.sent,uni.stopPullDownRefresh(),0==i.status&&(e.info=(0,s.Z)((0,s.Z)({},i.data),{},{treat_at:i.data.treat_at?i.data.treat_at.replaceAll("-","/"):"",next_treat_at:i.data.next_treat_at?i.data.next_treat_at.replaceAll("-","/"):"",notify_at:i.data.notify_at?i.data.notify_at.replaceAll("-","/"):""}),i.data.images&&e.$refs["images"].setList(i.data.images.map((function(e){return{url:e}}))),e.type.text=e.info.type?e.info.type.name:"",e.adminUser.doctor_name=e.info.doctor?e.info.doctor.name:"",e.orderStatus.text=p.Z.map[e.info.order_status],e.adminUser.notify_user_name=e.info.notify_user?e.info.notify_user.name:"",i.data.illness_type&&(a=i.data.illness_type,e.illnessType.label=a.name,e.illnessType.value=a.id));case 9:case"end":return t.stop()}}),t)})))()},update:function(e,t){var n={id:this.id};return n[e]=t,this.$ajax.put("/admin-api/record/".concat(this.id),n,{custom:{loading:!0}})},opendAdminUser:function(e){this.adminUser.key=e,this.$refs["select-admin-user"].open()},closeAdminUser:function(){this.adminUser.key="",this.$refs["select-admin-user"].close()},selectAdminUser:function(e){var t=this,n=this.adminUser.key,i=e.id;this.update("".concat(n,"_id"),i).then((function(a){t.closeAdminUser(),0==a.status&&(t.info["".concat(n,"_id")]=i,t.adminUser["".concat(n,"_name")]=e.name)}))},toggleType:function(){this.type.show=!this.type.show},selectType:function(e){var t=this;this.update("type_id",e.id).then((function(n){0==n.status&&(t.type.text=e.name,t.info.type_id=e.id)}))},toggleDatePicker:function(e,t){if(e){this.datePicker.name=e;var n=this.info[e];n&&(this.datePicker.value=new Date(n).getTime())}t&&(this.datePicker.mode=t),this.datePicker.show=!this.datePicker.show},selectDatePicker:function(e){var t=this,n=Math.floor(e.value/1e3),i=this.datePicker.name;this.update(i,n).then((function(e){0==e.status&&(t.info[i]=n,t.toggleDatePicker())}))},openModal:function(e,t,n){this.modal.type=n||"text",this.modal.title=e,this.modal.key=t,this.modal.show=!0,this.modal.value=this.info[t]},confirmModal:function(){var e=this,t=this.modal.key,n=this.modal.value;this.update(t,n).then((function(i){e.closeModal(),0==i.status&&(e.info[t]=n)}))},closeModal:function(){this.modal.show=!1},toggleOrderStatus:function(){this.orderStatus.show=!this.orderStatus.show},selectOrderStatus:function(e){var t=this,n="order_status",i=e.value,a=e.name;this.update(n,i).then((function(e){0==e.status&&(t.orderStatus.text=a,t.info[n]=i)}))},openEditor:function(){this.$refs["editor"].open(this.info.content)},confirmEditor:function(e){var t=this,n=e,i="content";this.update(i,n).then((function(e){0==e.status&&(t.info[i]=n)}))},updateImages:function(e){var t=e.map((function(e){return e.url}));this.update("images",t).then((function(e){0==e.status&&console.log(e)}))},updateSwitch:function(e){var t=this;this.update("is_notified",e).then((function(n){0==n.status&&(t.info.is_notified=e)}))},deleteRecord:function(){var e=this;uni.showModal({title:"删除病历记录",content:"是否确定?",success:function(t){t.confirm&&e.handleDelete(e.id)}})},handleDelete:function(e){uni.showLoading(),this.$ajax.delete("/admin-api/record/".concat(e)).then((function(e){0==e.status&&(uni.showToast({title:"删除成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1e3))}))},patientDetail:function(){return uni.navigateTo({url:"/pages/patient/detail?id=".concat(this.info.patient_id)})},openIllnessType:function(){this.illnessType.show=!0},closeIllnessType:function(){this.illnessType.show=!1},confirmIllnessType:function(e){var t=this,n=e.value[0];n&&(this.closeIllnessType(),this.update("illness_type_id",n.value).then((function(e){0==e.status&&(t.info.illness_type_id=n.value,t.illnessType.value=n.value,t.illnessType.label=n.label)})))}}},v=h,m=(n(1242),n(1503)),y=(0,m.Z)(v,o,l,!1,null,"183917ed",null,!1,a,i),g=y.exports},5975:function(e,t,n){"use strict";n.r(t);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([e.id,".page[data-v-183917ed]{padding:20px;background:#fff}.btn[data-v-183917ed]{padding:0 10px}.btn .u-button[data-v-183917ed]{margin-top:20px}.text-gray[data-v-183917ed]{color:gray}",""]),t["default"]=s},2727:function(e,t,n){"use strict";n.r(t);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-38668d34], uni-scroll-view[data-v-38668d34], uni-swiper-item[data-v-38668d34]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-cell-group[data-v-38668d34]{flex:1}.u-cell-group__title[data-v-38668d34]{padding:16px 16px 8px}.u-cell-group__title__text[data-v-38668d34]{font-size:15px;line-height:16px;color:#303133}.u-cell-group__wrapper[data-v-38668d34]{position:relative}',""]),t["default"]=s},8233:function(e,t,n){"use strict";n.r(t);var i=n(2916),a=n.n(i),o=n(3282),l=n.n(o),s=l()(a());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-2cb119ec], uni-scroll-view[data-v-2cb119ec], uni-swiper-item[data-v-2cb119ec]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-textarea[data-v-2cb119ec]{border-radius:4px;background-color:#fff;position:relative;\ndisplay:flex;\nflex-direction:row;flex:1;padding:9px}.u-textarea--radius[data-v-2cb119ec]{border-radius:4px}.u-textarea--no-radius[data-v-2cb119ec]{border-radius:0}.u-textarea--disabled[data-v-2cb119ec]{background-color:#f5f7fa}.u-textarea__field[data-v-2cb119ec]{flex:1;font-size:15px;color:#606266;width:100%}.u-textarea__count[data-v-2cb119ec]{position:absolute;right:5px;bottom:2px;font-size:12px;color:#909193;background-color:#fff;padding:1px 4px}',""]),t["default"]=s}}]); \ No newline at end of file diff --git a/public/h5/static/js/pages-record-form.ac620e82.js b/public/h5/static/js/pages-record-form.b05fe531.js similarity index 50% rename from public/h5/static/js/pages-record-form.ac620e82.js rename to public/h5/static/js/pages-record-form.b05fe531.js index 8083430..ded9ff9 100644 --- a/public/h5/static/js/pages-record-form.ac620e82.js +++ b/public/h5/static/js/pages-record-form.b05fe531.js @@ -1 +1 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[668],{1038:function(e,t,i){var a=i(1062);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(5472).Z;n("0227951f",a,!0,{sourceMap:!1,shadowMode:!1})},33:function(e,t,i){var a=i(8934);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(5472).Z;n("4cf72039",a,!0,{sourceMap:!1,shadowMode:!1})},9454:function(e,t,i){var a=i(8546);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(5472).Z;n("9d39b5d8",a,!0,{sourceMap:!1,shadowMode:!1})},7388:function(e,t,i){"use strict";var a;i.d(t,{Z:function(){return p}});var n,r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-radio-group",class:e.bemClass},[e._t("default")],2)},o=[],s={props:{value:{type:[String,Number,Boolean],default:uni.$u.props.radioGroup.value},disabled:{type:Boolean,default:uni.$u.props.radioGroup.disabled},shape:{type:String,default:uni.$u.props.radioGroup.shape},activeColor:{type:String,default:uni.$u.props.radioGroup.activeColor},inactiveColor:{type:String,default:uni.$u.props.radioGroup.inactiveColor},name:{type:String,default:uni.$u.props.radioGroup.name},size:{type:[String,Number],default:uni.$u.props.radioGroup.size},placement:{type:String,default:uni.$u.props.radioGroup.placement},label:{type:[String],default:uni.$u.props.radioGroup.label},labelColor:{type:[String],default:uni.$u.props.radioGroup.labelColor},labelSize:{type:[String,Number],default:uni.$u.props.radioGroup.labelSize},labelDisabled:{type:Boolean,default:uni.$u.props.radioGroup.labelDisabled},iconColor:{type:String,default:uni.$u.props.radioGroup.iconColor},iconSize:{type:[String,Number],default:uni.$u.props.radioGroup.iconSize},borderBottom:{type:Boolean,default:uni.$u.props.radioGroup.borderBottom},iconPlacement:{type:String,default:uni.$u.props.radio.iconPlacement}}},l={name:"u-radio-group",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],computed:{parentData(){return[this.value,this.disabled,this.inactiveColor,this.activeColor,this.size,this.labelDisabled,this.shape,this.iconSize,this.borderBottom,this.placement]},bemClass(){return this.bem("radio-group",["placement"])}},watch:{parentData(){this.children.length&&this.children.map((e=>{"function"===typeof e.init&&e.init()}))}},data(){return{}},created(){this.children=[]},methods:{unCheckedOther(e){this.children.map((t=>{e!==t&&(t.checked=!1)}));const{name:t}=e;this.$emit("input",t),this.$emit("change",t)}}},c=l,d=(i(33),i(1503)),u=(0,d.Z)(c,r,o,!1,null,"8fe1bc2c",null,!1,a,n),p=u.exports},5976:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var a,n={uIcon:i(5862).Z},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-radio",class:["u-radio-label--"+e.parentData.iconPlacement,e.parentData.borderBottom&&"column"===e.parentData.placement&&"u-border-bottom"],style:[e.radioStyle],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.wrapperClickHandler.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"u-radio__icon-wrap",class:e.iconClasses,style:[e.iconWrapStyle],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.iconClickHandler.apply(void 0,arguments)}}},[e._t("icon",[i("u-icon",{staticClass:"u-radio__icon-wrap__icon",attrs:{name:"checkbox-mark",size:e.elIconSize,color:e.elIconColor}})])],2),e._t("default",[i("v-uni-text",{staticClass:"u-radio__text",style:{color:e.elDisabled?e.elInactiveColor:e.elLabelColor,fontSize:e.elLabelSize,lineHeight:e.elLabelSize},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.labelClickHandler.apply(void 0,arguments)}}},[e._v(e._s(e.label))])])],2)},o=[],s={props:{name:{type:[String,Number,Boolean],default:uni.$u.props.radio.name},shape:{type:String,default:uni.$u.props.radio.shape},disabled:{type:[String,Boolean],default:uni.$u.props.radio.disabled},labelDisabled:{type:[String,Boolean],default:uni.$u.props.radio.labelDisabled},activeColor:{type:String,default:uni.$u.props.radio.activeColor},inactiveColor:{type:String,default:uni.$u.props.radio.inactiveColor},iconSize:{type:[String,Number],default:uni.$u.props.radio.iconSize},labelSize:{type:[String,Number],default:uni.$u.props.radio.labelSize},label:{type:[String,Number],default:uni.$u.props.radio.label},size:{type:[String,Number],default:uni.$u.props.radio.size},color:{type:String,default:uni.$u.props.radio.color},labelColor:{type:String,default:uni.$u.props.radio.labelColor}}},l={name:"u-radio",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],data(){return{checked:!1,parentData:{iconSize:12,labelDisabled:null,disabled:null,shape:null,activeColor:null,inactiveColor:null,size:18,value:null,iconColor:null,placement:"row",borderBottom:!1,iconPlacement:"left"}}},computed:{elDisabled(){return""!==this.disabled?this.disabled:null!==this.parentData.disabled&&this.parentData.disabled},elLabelDisabled(){return""!==this.labelDisabled?this.labelDisabled:null!==this.parentData.labelDisabled&&this.parentData.labelDisabled},elSize(){return this.size?this.size:this.parentData.size?this.parentData.size:21},elIconSize(){return this.iconSize?this.iconSize:this.parentData.iconSize?this.parentData.iconSize:12},elActiveColor(){return this.activeColor?this.activeColor:this.parentData.activeColor?this.parentData.activeColor:"#2979ff"},elInactiveColor(){return this.inactiveColor?this.inactiveColor:this.parentData.inactiveColor?this.parentData.inactiveColor:"#c8c9cc"},elLabelColor(){return this.labelColor?this.labelColor:this.parentData.labelColor?this.parentData.labelColor:"#606266"},elShape(){return this.shape?this.shape:this.parentData.shape?this.parentData.shape:"circle"},elLabelSize(){return uni.$u.addUnit(this.labelSize?this.labelSize:this.parentData.labelSize?this.parentData.labelSize:"15")},elIconColor(){const e=this.iconColor?this.iconColor:this.parentData.iconColor?this.parentData.iconColor:"#ffffff";return this.elDisabled?this.checked?this.elInactiveColor:"transparent":this.checked?e:"transparent"},iconClasses(){let e=[];return e.push("u-radio__icon-wrap--"+this.elShape),this.elDisabled&&e.push("u-radio__icon-wrap--disabled"),this.checked&&this.elDisabled&&e.push("u-radio__icon-wrap--disabled--checked"),e},iconWrapStyle(){const e={};return e.backgroundColor=this.checked&&!this.elDisabled?this.elActiveColor:"#ffffff",e.borderColor=this.checked&&!this.elDisabled?this.elActiveColor:this.elInactiveColor,e.width=uni.$u.addUnit(this.elSize),e.height=uni.$u.addUnit(this.elSize),"right"===this.parentData.iconPlacement&&(e.marginRight=0),e},radioStyle(){const e={};return this.parentData.borderBottom&&"row"===this.parentData.placement&&uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效"),this.parentData.borderBottom&&"column"===this.parentData.placement&&(e.paddingBottom="ios"===uni.$u.os()?"12px":"8px"),uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}},mounted(){this.init()},methods:{init(){this.updateParentData(),this.parent||uni.$u.error("u-radio必须搭配u-radio-group组件使用"),this.checked=this.name===this.parentData.value},updateParentData(){this.getParentData("u-radio-group")},iconClickHandler(e){this.preventEvent(e),this.elDisabled||this.setRadioCheckedStatus()},wrapperClickHandler(e){"right"===this.parentData.iconPlacement&&this.iconClickHandler(e)},labelClickHandler(e){this.preventEvent(e),this.elLabelDisabled||this.elDisabled||this.setRadioCheckedStatus()},emitEvent(){this.checked||(this.$emit("change",this.name),this.$nextTick((()=>{uni.$u.formValidate(this,"change")})))},setRadioCheckedStatus(){this.emitEvent(),this.checked=!0,"function"===typeof this.parent.unCheckedOther&&this.parent.unCheckedOther(this)}}},c=l,d=(i(9454),i(1503)),u=(0,d.Z)(c,r,o,!1,null,"759d4cde",null,!1,n,a),p=u.exports},6749:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var a,n={"u-Form":i(2975).Z,uFormItem:i(3751).Z,uIcon:i(5862).Z,uRadioGroup:i(7388).Z,uRadio:i(5976).Z,uSwitch:i(3094).Z,uButton:i(7344).Z,uDatetimePicker:i(2632).Z,uPicker:i(2206).Z},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"page"},[i("u--form",{ref:"form",attrs:{model:e.form,labelWidth:"80",borderBottom:!1}},[i("u-form-item",{attrs:{prop:"patient_id",label:"姓名",borderBottom:!0}},[i("v-uni-view",{staticClass:"input-text"},[i("v-uni-text",[e._v(e._s(e.patient.name))])],1)],1),i("u-form-item",{attrs:{prop:"form.illness_type_id",label:"病种",required:!0,borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openIllnessType.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.illness_type_id?i("v-uni-text",[e._v(e._s(e.illnessType.label))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择病种")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{prop:"form.treat_at",label:e.typeName+"时间",required:!0,borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("treat_at","datetime")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.treat_at?i("v-uni-text",[e._v(e._s(e._f("date")(e.form.treat_at)))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择"+e._s(e.typeName)+"时间")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{prop:"form.doctor_id",label:e.typeName+"医师",required:!0,borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("doctor")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.doctor_id?i("v-uni-text",[e._v(e._s(e.adminUser.doctor_name))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择"+e._s(e.typeName)+"医生")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{prop:"form.origin_price",label:"划线价",required:!0,borderBottom:!0}},[i("v-uni-input",{attrs:{type:"number",placeholder:"输入划线价"},model:{value:e.form.origin_price,callback:function(t){e.$set(e.form,"origin_price",t)},expression:"form.origin_price"}})],1),i("u-form-item",{attrs:{prop:"form.sell_price",label:"实收价",required:!0,borderBottom:!0}},[i("v-uni-input",{attrs:{type:"number",placeholder:"输入实收价"},model:{value:e.form.sell_price,callback:function(t){e.$set(e.form,"sell_price",t)},expression:"form.sell_price"}})],1),i("u-form-item",{attrs:{prop:"order_status",label:"收费情况",required:!0,borderBottom:!0}},[i("u-radio-group",{model:{value:e.form.order_status,callback:function(t){e.$set(e.form,"order_status",t)},expression:"form.order_status"}},e._l(e.orderStatus.options,(function(e){return i("u-radio",{key:e.value,attrs:{label:e.name,name:e.value}})})),1)],1),i("u-form-item",{attrs:{label:e.typeName+"情况",prop:"content",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openEditor.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.content?i("v-uni-text",[e._v(e._s(e.form.content))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("点击修改")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{label:"图片资料",prop:"images",borderBottom:!0}},[i("cu-image",{ref:"images"})],1),i("u-form-item",{attrs:{prop:"next_treat_at",label:"下次就诊时间",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("next_treat_at","datetime")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.next_treat_at?i("v-uni-text",[e._v(e._s(e._f("date")(e.form.next_treat_at)))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择下次就诊时间")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{label:"开启通知",prop:"is_notified",borderBottom:!0}},[i("u-switch",{attrs:{activeValue:0,inactiveValue:1,asyncChange:!0},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.updateSwitch.apply(void 0,arguments)}},model:{value:e.form.is_notified,callback:function(t){e.$set(e.form,"is_notified",t)},expression:"form.is_notified"}})],1),0==e.form.is_notified?i("u-form-item",{attrs:{prop:"notify_user_id",label:"通知人",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("notify_user")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.notify_user_id?i("v-uni-text",[e._v(e._s(e.adminUser.notify_user_name))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择通知人")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1):e._e(),0==e.form.is_notified?i("u-form-item",{attrs:{prop:"notify_at",label:"通知时间",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("notify_at","date")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.notify_at?i("v-uni-text",[e._v(e._s(e._f("date")(e.form.notify_at,"yyyy-MM-dd")))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择通知时间")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1):e._e(),i("u-form-item",{attrs:{label:"操作人",borderBottom:!0}},[i("v-uni-view",{staticClass:"input-text"},[e._v(e._s(e.currentUser.name))])],1),i("v-uni-view",{staticClass:"button"},[i("u-button",{attrs:{text:"提交",type:"primary"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}})],1)],1),i("u-datetime-picker",{attrs:{mode:e.datePicker.mode,show:e.datePicker.show,closeOnClickOverlay:!0,minDate:e.datePicker.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectDatePicker.apply(void 0,arguments)}},model:{value:e.datePicker.value,callback:function(t){e.$set(e.datePicker,"value",t)},expression:"datePicker.value"}}),i("select-admin-user",{ref:"select-admin-user",on:{select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectAdminUser.apply(void 0,arguments)}}}),i("cu-editor",{ref:"editor",on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmEditor.apply(void 0,arguments)}}}),i("u-picker",{attrs:{show:e.illnessType.show,columns:e.illnessType.list,keyName:"label",closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmIllnessType.apply(void 0,arguments)}}})],1)},o=[],s=i(3762),l=i(3062),c=(i(423),i(262),i(8770),i(9299),i(7744)),d=i(8272),u=i(7438),p=i(7679),f={components:{SelectAdminUser:d.Z,CuEditor:c.Z,CuImage:p.Z},data:function(){return{id:"",info:{},form:{patient_id:"",doctor_id:"",treat_at:Math.floor((new Date).getTime()/1e3),origin_price:"",sell_price:"",order_status:u.Z.success.value,content:"",next_treat_at:"",notify_user_id:"",notify_at:"",notify_remarks:"",is_notified:1,illness_type_id:""},typeList:[],patient:{},datePicker:{mode:"datetime",show:!1,name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},adminUser:{key:""},orderStatus:u.Z,currentUser:{},illnessType:{show:!1,value:"",label:"",list:[]},typeName:""}},onLoad:function(e){this.id=e.id,this.form.patient_id=e.patient,this.init()},methods:{init:function(){var e=this;return(0,l.Z)((0,s.Z)().mark((function t(){var i,a,n;return(0,s.Z)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.get("/admin-api/current-user");case 2:if(a=t.sent,0==a.status&&(e.currentUser=a.data,e.form.doctor_id=e.currentUser.id,e.adminUser.doctor_name=e.currentUser.name,e.form.notify_user_id=e.currentUser.id,e.adminUser.notify_user_name=e.currentUser.name),!e.id){t.next=12;break}return uni.setNavigationBarTitle({title:"修改病历"}),t.next=8,e.$ajax.get("/admin-api/record/".concat(e.id),{params:{_action:"getData"}});case 8:a=t.sent,0==a.status&&(e.info=a.data,e.patient=a.data.patient,e.form={patient_id:e.info.patient_id,type_id:e.info.type_id,doctor_id:e.info.doctor_id,treat_at:e.info.treat_at?e.info.treat_at.replaceAll("-","/"):"",origin_price:e.info.origin_price,sell_price:e.info.sell_price,order_status:e.info.order_status,content:e.info.content,next_treat_at:e.info.next_treat_at?e.info.next_treat_at.replaceAll("-","/"):"",notify_user_id:e.info.notify_user_id,notify_at:e.info.notify_at?e.info.notify_at.replaceAll("-","/"):"",notify_remarks:e.info.notify_remarks}),t.next=20;break;case 12:if(uni.setNavigationBarTitle({title:"添加病历"}),e.form.patient_id){t.next=15;break}return t.abrupt("return",uni.showModal({title:"请选择病人",showCancel:!1,success:function(){uni.navigateBack()}}));case 15:return n={_action:"getData"},t.next=18,e.$ajax.get("/admin-api/patient/".concat(e.form.patient_id),{params:n});case 18:a=t.sent,0==a.status&&(e.patient=a.data,e.form.content=e.patient.type.content,e.typeName=e.patient.type.name);case 20:return t.next=22,e.$ajax.get("/admin-api/api/keywords/list",{params:{type_key:"illness_type",value:null===(i=e.patient)||void 0===i||null===(i=i.type)||void 0===i?void 0:i.key}});case 22:a=t.sent,0==a.status&&(e.illnessType.list=[a.data]);case 24:case"end":return t.stop()}}),t)})))()},submit:function(){this.form.images=this.$refs["images"].getList().map((function(e){return e.url})),uni.showLoading(),this.id?this.update():this.create()},update:function(){this.form.id=this.id,this.$ajax.put("/admin-api/record/".concat(this.id),this.form).then((function(e){0==e.status&&(uni.showToast({title:"保存成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))},create:function(){this.$ajax.post("/admin-api/record",this.form).then((function(e){0==e.status&&(uni.showToast({title:"提交成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))},toggleDatePicker:function(e,t){e&&(this.datePicker.name=e,this.datePicker.value=this.form[e]?Math.floor(1e3*this.form[e]):(new Date).getTime()),t&&(this.datePicker.mode=t),this.datePicker.show=!this.datePicker.show},selectDatePicker:function(e){this.form[this.datePicker.name]=Math.floor(e.value/1e3),this.toggleDatePicker()},opendAdminUser:function(e){this.adminUser.key=e,this.$refs["select-admin-user"].open()},closeAdminUser:function(){this.adminUser.key="",this.$refs["select-admin-user"].close()},selectAdminUser:function(e){var t=this.adminUser.key;this.form["".concat(t,"_id")]=e.id,this.adminUser["".concat(t,"_name")]=e.name,this.closeAdminUser()},openEditor:function(){this.$refs["editor"].open(this.form.content)},confirmEditor:function(e){this.form.content=e},updateSwitch:function(e){this.form.is_notified=e},openIllnessType:function(){this.illnessType.show=!0},closeIllnessType:function(){this.illnessType.show=!1},confirmIllnessType:function(e){var t=e.value[0];t&&(this.illnessType.value=t.value,this.illnessType.label=t.label,this.form.illness_type_id=t.value,this.closeIllnessType())}}},m=f,h=(i(1038),i(1503)),v=(0,h.Z)(m,r,o,!1,null,"c6c9f4d0",null,!1,n,a),_=v.exports},1062:function(e,t,i){"use strict";i.r(t);var a=i(2916),n=i.n(a),r=i(3282),o=i.n(r),s=o()(n());s.push([e.id,".page[data-v-c6c9f4d0]{padding:20px;background:#fff}.input-text[data-v-c6c9f4d0]{color:#303133;font-size:15px;padding:6px 0;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-c6c9f4d0]{color:silver}.button[data-v-c6c9f4d0]{width:100%;margin-top:20px}.page[data-v-c6c9f4d0] .u-radio-group .u-radio:nth-child(even){margin-left:10px}",""]),t["default"]=s},8934:function(e,t,i){"use strict";i.r(t);var a=i(2916),n=i.n(a),r=i(3282),o=i.n(r),s=o()(n());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-8fe1bc2c], uni-scroll-view[data-v-8fe1bc2c], uni-swiper-item[data-v-8fe1bc2c]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-radio-group[data-v-8fe1bc2c]{flex:1}.u-radio-group--row[data-v-8fe1bc2c]{\ndisplay:flex;\nflex-direction:row}.u-radio-group--column[data-v-8fe1bc2c]{\ndisplay:flex;\nflex-direction:column}',""]),t["default"]=s},8546:function(e,t,i){"use strict";i.r(t);var a=i(2916),n=i.n(a),r=i(3282),o=i.n(r),s=o()(n());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-759d4cde], uni-scroll-view[data-v-759d4cde], uni-swiper-item[data-v-759d4cde]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-radio[data-v-759d4cde]{\ndisplay:flex;\nflex-direction:row;overflow:hidden;flex-direction:row;align-items:center}.u-radio-label--left[data-v-759d4cde]{flex-direction:row}.u-radio-label--right[data-v-759d4cde]{flex-direction:row-reverse;justify-content:space-between}.u-radio__icon-wrap[data-v-759d4cde]{box-sizing:border-box;transition-property:border-color,background-color,color;transition-duration:.2s;color:#606266;\ndisplay:flex;\nflex-direction:row;align-items:center;justify-content:center;color:transparent;text-align:center;margin-right:6px;font-size:20px;border-width:1px;border-color:#c8c9cc;border-style:solid}.u-radio__icon-wrap--circle[data-v-759d4cde]{border-radius:100%}.u-radio__icon-wrap--square[data-v-759d4cde]{border-radius:3px}.u-radio__icon-wrap--checked[data-v-759d4cde]{color:#fff;background-color:red;border-color:#2979ff}.u-radio__icon-wrap--disabled[data-v-759d4cde]{background-color:#ebedf0!important}.u-radio__icon-wrap--disabled--checked[data-v-759d4cde]{color:#c8c9cc!important}.u-radio__label[data-v-759d4cde]{word-wrap:break-word;margin-left:5px;margin-right:12px;color:#606266;font-size:15px}.u-radio__label--disabled[data-v-759d4cde]{color:#c8c9cc}',""]),t["default"]=s}}]); \ No newline at end of file +(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[668],{8787:function(e,t,i){var a=i(3819);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(5472).Z;n("1eb03b5a",a,!0,{sourceMap:!1,shadowMode:!1})},33:function(e,t,i){var a=i(8934);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(5472).Z;n("4cf72039",a,!0,{sourceMap:!1,shadowMode:!1})},9454:function(e,t,i){var a=i(8546);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(5472).Z;n("9d39b5d8",a,!0,{sourceMap:!1,shadowMode:!1})},7388:function(e,t,i){"use strict";var a;i.d(t,{Z:function(){return p}});var n,r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-radio-group",class:e.bemClass},[e._t("default")],2)},o=[],s={props:{value:{type:[String,Number,Boolean],default:uni.$u.props.radioGroup.value},disabled:{type:Boolean,default:uni.$u.props.radioGroup.disabled},shape:{type:String,default:uni.$u.props.radioGroup.shape},activeColor:{type:String,default:uni.$u.props.radioGroup.activeColor},inactiveColor:{type:String,default:uni.$u.props.radioGroup.inactiveColor},name:{type:String,default:uni.$u.props.radioGroup.name},size:{type:[String,Number],default:uni.$u.props.radioGroup.size},placement:{type:String,default:uni.$u.props.radioGroup.placement},label:{type:[String],default:uni.$u.props.radioGroup.label},labelColor:{type:[String],default:uni.$u.props.radioGroup.labelColor},labelSize:{type:[String,Number],default:uni.$u.props.radioGroup.labelSize},labelDisabled:{type:Boolean,default:uni.$u.props.radioGroup.labelDisabled},iconColor:{type:String,default:uni.$u.props.radioGroup.iconColor},iconSize:{type:[String,Number],default:uni.$u.props.radioGroup.iconSize},borderBottom:{type:Boolean,default:uni.$u.props.radioGroup.borderBottom},iconPlacement:{type:String,default:uni.$u.props.radio.iconPlacement}}},l={name:"u-radio-group",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],computed:{parentData(){return[this.value,this.disabled,this.inactiveColor,this.activeColor,this.size,this.labelDisabled,this.shape,this.iconSize,this.borderBottom,this.placement]},bemClass(){return this.bem("radio-group",["placement"])}},watch:{parentData(){this.children.length&&this.children.map((e=>{"function"===typeof e.init&&e.init()}))}},data(){return{}},created(){this.children=[]},methods:{unCheckedOther(e){this.children.map((t=>{e!==t&&(t.checked=!1)}));const{name:t}=e;this.$emit("input",t),this.$emit("change",t)}}},c=l,d=(i(33),i(1503)),u=(0,d.Z)(c,r,o,!1,null,"8fe1bc2c",null,!1,a,n),p=u.exports},5976:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var a,n={uIcon:i(5862).Z},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-radio",class:["u-radio-label--"+e.parentData.iconPlacement,e.parentData.borderBottom&&"column"===e.parentData.placement&&"u-border-bottom"],style:[e.radioStyle],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.wrapperClickHandler.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"u-radio__icon-wrap",class:e.iconClasses,style:[e.iconWrapStyle],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.iconClickHandler.apply(void 0,arguments)}}},[e._t("icon",[i("u-icon",{staticClass:"u-radio__icon-wrap__icon",attrs:{name:"checkbox-mark",size:e.elIconSize,color:e.elIconColor}})])],2),e._t("default",[i("v-uni-text",{staticClass:"u-radio__text",style:{color:e.elDisabled?e.elInactiveColor:e.elLabelColor,fontSize:e.elLabelSize,lineHeight:e.elLabelSize},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.labelClickHandler.apply(void 0,arguments)}}},[e._v(e._s(e.label))])])],2)},o=[],s={props:{name:{type:[String,Number,Boolean],default:uni.$u.props.radio.name},shape:{type:String,default:uni.$u.props.radio.shape},disabled:{type:[String,Boolean],default:uni.$u.props.radio.disabled},labelDisabled:{type:[String,Boolean],default:uni.$u.props.radio.labelDisabled},activeColor:{type:String,default:uni.$u.props.radio.activeColor},inactiveColor:{type:String,default:uni.$u.props.radio.inactiveColor},iconSize:{type:[String,Number],default:uni.$u.props.radio.iconSize},labelSize:{type:[String,Number],default:uni.$u.props.radio.labelSize},label:{type:[String,Number],default:uni.$u.props.radio.label},size:{type:[String,Number],default:uni.$u.props.radio.size},color:{type:String,default:uni.$u.props.radio.color},labelColor:{type:String,default:uni.$u.props.radio.labelColor}}},l={name:"u-radio",mixins:[uni.$u.mpMixin,uni.$u.mixin,s],data(){return{checked:!1,parentData:{iconSize:12,labelDisabled:null,disabled:null,shape:null,activeColor:null,inactiveColor:null,size:18,value:null,iconColor:null,placement:"row",borderBottom:!1,iconPlacement:"left"}}},computed:{elDisabled(){return""!==this.disabled?this.disabled:null!==this.parentData.disabled&&this.parentData.disabled},elLabelDisabled(){return""!==this.labelDisabled?this.labelDisabled:null!==this.parentData.labelDisabled&&this.parentData.labelDisabled},elSize(){return this.size?this.size:this.parentData.size?this.parentData.size:21},elIconSize(){return this.iconSize?this.iconSize:this.parentData.iconSize?this.parentData.iconSize:12},elActiveColor(){return this.activeColor?this.activeColor:this.parentData.activeColor?this.parentData.activeColor:"#2979ff"},elInactiveColor(){return this.inactiveColor?this.inactiveColor:this.parentData.inactiveColor?this.parentData.inactiveColor:"#c8c9cc"},elLabelColor(){return this.labelColor?this.labelColor:this.parentData.labelColor?this.parentData.labelColor:"#606266"},elShape(){return this.shape?this.shape:this.parentData.shape?this.parentData.shape:"circle"},elLabelSize(){return uni.$u.addUnit(this.labelSize?this.labelSize:this.parentData.labelSize?this.parentData.labelSize:"15")},elIconColor(){const e=this.iconColor?this.iconColor:this.parentData.iconColor?this.parentData.iconColor:"#ffffff";return this.elDisabled?this.checked?this.elInactiveColor:"transparent":this.checked?e:"transparent"},iconClasses(){let e=[];return e.push("u-radio__icon-wrap--"+this.elShape),this.elDisabled&&e.push("u-radio__icon-wrap--disabled"),this.checked&&this.elDisabled&&e.push("u-radio__icon-wrap--disabled--checked"),e},iconWrapStyle(){const e={};return e.backgroundColor=this.checked&&!this.elDisabled?this.elActiveColor:"#ffffff",e.borderColor=this.checked&&!this.elDisabled?this.elActiveColor:this.elInactiveColor,e.width=uni.$u.addUnit(this.elSize),e.height=uni.$u.addUnit(this.elSize),"right"===this.parentData.iconPlacement&&(e.marginRight=0),e},radioStyle(){const e={};return this.parentData.borderBottom&&"row"===this.parentData.placement&&uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效"),this.parentData.borderBottom&&"column"===this.parentData.placement&&(e.paddingBottom="ios"===uni.$u.os()?"12px":"8px"),uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}},mounted(){this.init()},methods:{init(){this.updateParentData(),this.parent||uni.$u.error("u-radio必须搭配u-radio-group组件使用"),this.checked=this.name===this.parentData.value},updateParentData(){this.getParentData("u-radio-group")},iconClickHandler(e){this.preventEvent(e),this.elDisabled||this.setRadioCheckedStatus()},wrapperClickHandler(e){"right"===this.parentData.iconPlacement&&this.iconClickHandler(e)},labelClickHandler(e){this.preventEvent(e),this.elLabelDisabled||this.elDisabled||this.setRadioCheckedStatus()},emitEvent(){this.checked||(this.$emit("change",this.name),this.$nextTick((()=>{uni.$u.formValidate(this,"change")})))},setRadioCheckedStatus(){this.emitEvent(),this.checked=!0,"function"===typeof this.parent.unCheckedOther&&this.parent.unCheckedOther(this)}}},c=l,d=(i(9454),i(1503)),u=(0,d.Z)(c,r,o,!1,null,"759d4cde",null,!1,n,a),p=u.exports},8149:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return b}});var a,n={"u-Form":i(2975).Z,uFormItem:i(3751).Z,uIcon:i(5862).Z,uRadioGroup:i(7388).Z,uRadio:i(5976).Z,uSwitch:i(3094).Z,uButton:i(7344).Z,uDatetimePicker:i(2632).Z,uPicker:i(2206).Z},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"page"},[i("u--form",{ref:"form",attrs:{model:e.form,labelWidth:"80",borderBottom:!1}},[i("u-form-item",{attrs:{prop:"patient_id",label:"姓名",borderBottom:!0}},[i("v-uni-view",{staticClass:"input-text"},[i("v-uni-text",[e._v(e._s(e.patient.name))])],1)],1),i("u-form-item",{attrs:{prop:"form.illness_type_id",label:"病种",required:!0,borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openIllnessType.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.illness_type_id?i("v-uni-text",[e._v(e._s(e.illnessType.label))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择病种")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{prop:"form.treat_at",label:e.typeName+"时间",required:!0,borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("treat_at","datetime")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.treat_at?i("v-uni-text",[e._v(e._s(e._f("date")(e.form.treat_at)))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择"+e._s(e.typeName)+"时间")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{prop:"form.doctor_id",label:e.typeName+"医师",required:!0,borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("doctor")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.doctor_id?i("v-uni-text",[e._v(e._s(e.adminUser.doctor_name))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择"+e._s(e.typeName)+"医生")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{prop:"form.origin_price",label:"划线价",required:!0,borderBottom:!0}},[i("v-uni-input",{attrs:{type:"number",placeholder:"输入划线价"},model:{value:e.form.origin_price,callback:function(t){e.$set(e.form,"origin_price",t)},expression:"form.origin_price"}})],1),i("u-form-item",{attrs:{prop:"form.sell_price",label:"实收价",required:!0,borderBottom:!0}},[i("v-uni-input",{attrs:{type:"number",placeholder:"输入实收价"},model:{value:e.form.sell_price,callback:function(t){e.$set(e.form,"sell_price",t)},expression:"form.sell_price"}})],1),i("u-form-item",{attrs:{prop:"order_status",label:"收费情况",required:!0,borderBottom:!0}},[i("u-radio-group",{model:{value:e.form.order_status,callback:function(t){e.$set(e.form,"order_status",t)},expression:"form.order_status"}},e._l(e.orderStatus.options,(function(e){return i("u-radio",{key:e.value,attrs:{label:e.name,name:e.value}})})),1)],1),i("u-form-item",{attrs:{label:e.typeName+"情况",prop:"content",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openEditor.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.content?i("v-uni-text",[e._v(e._s(e.form.content))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("点击修改")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{label:"图片资料",prop:"images",borderBottom:!0}},[i("cu-image",{ref:"images"})],1),i("u-form-item",{attrs:{prop:"next_treat_at",label:"下次就诊时间",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("next_treat_at","datetime")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.next_treat_at?i("v-uni-text",[e._v(e._s(e._f("date")(e.form.next_treat_at)))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择下次就诊时间")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1),i("u-form-item",{attrs:{label:"开启通知",prop:"is_notified",borderBottom:!0}},[i("u-switch",{attrs:{activeValue:0,inactiveValue:1,asyncChange:!0},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.updateSwitch.apply(void 0,arguments)}},model:{value:e.form.is_notified,callback:function(t){e.$set(e.form,"is_notified",t)},expression:"form.is_notified"}})],1),0==e.form.is_notified?i("u-form-item",{attrs:{prop:"notify_user_id",label:"通知医师",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opendAdminUser("notify_user")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.notify_user_id?i("v-uni-text",[e._v(e._s(e.adminUser.notify_user_name))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择通知人")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1):e._e(),0==e.form.is_notified?i("u-form-item",{attrs:{prop:"notify_at",label:"通知时间",borderBottom:!0},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker("notify_at","date")}}},[i("v-uni-view",{staticClass:"input-text"},[e.form.notify_at?i("v-uni-text",[e._v(e._s(e._f("date")(e.form.notify_at,"yyyy-MM-dd")))]):i("v-uni-text",{staticClass:"input-placeholder"},[e._v("请选择通知时间")]),i("u-icon",{attrs:{name:"arrow-right"}})],1)],1):e._e(),i("u-form-item",{attrs:{label:"操作人",borderBottom:!0}},[i("v-uni-view",{staticClass:"input-text"},[e._v(e._s(e.currentUser.name))])],1),i("v-uni-view",{staticClass:"button"},[i("u-button",{attrs:{text:"提交",type:"primary"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}})],1)],1),i("u-datetime-picker",{attrs:{mode:e.datePicker.mode,show:e.datePicker.show,closeOnClickOverlay:!0,minDate:e.datePicker.minDate},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleDatePicker.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.selectDatePicker.apply(void 0,arguments)}},model:{value:e.datePicker.value,callback:function(t){e.$set(e.datePicker,"value",t)},expression:"datePicker.value"}}),i("select-admin-user",{ref:"select-admin-user",on:{select:function(t){arguments[0]=t=e.$handleEvent(t),e.selectAdminUser.apply(void 0,arguments)}}}),i("cu-editor",{ref:"editor",on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmEditor.apply(void 0,arguments)}}}),i("u-picker",{attrs:{show:e.illnessType.show,columns:e.illnessType.list,keyName:"label",closeOnClickOverlay:!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.closeIllnessType.apply(void 0,arguments)},confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirmIllnessType.apply(void 0,arguments)}}})],1)},o=[],s=i(3762),l=i(3062),c=(i(423),i(262),i(8770),i(9299),i(7744)),d=i(8272),u=i(7438),p=i(7679),f={components:{SelectAdminUser:d.Z,CuEditor:c.Z,CuImage:p.Z},data:function(){return{id:"",info:{},form:{patient_id:"",doctor_id:"",treat_at:Math.floor((new Date).getTime()/1e3),origin_price:"",sell_price:"",order_status:u.Z.success.value,content:"",next_treat_at:"",notify_user_id:"",notify_at:"",notify_remarks:"",is_notified:1,illness_type_id:""},typeList:[],patient:{},datePicker:{mode:"datetime",show:!1,name:"",value:(new Date).getTime(),minDate:new Date("1900/1/1").getTime()},adminUser:{key:""},orderStatus:u.Z,currentUser:{},illnessType:{show:!1,value:"",label:"",list:[]},typeName:""}},onLoad:function(e){this.id=e.id,this.form.patient_id=e.patient,this.init()},methods:{init:function(){var e=this;return(0,l.Z)((0,s.Z)().mark((function t(){var i,a,n;return(0,s.Z)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.get("/admin-api/current-user");case 2:if(a=t.sent,0==a.status&&(e.currentUser=a.data,e.form.doctor_id=e.currentUser.id,e.adminUser.doctor_name=e.currentUser.name,e.form.notify_user_id=e.currentUser.id,e.adminUser.notify_user_name=e.currentUser.name),!e.id){t.next=12;break}return uni.setNavigationBarTitle({title:"修改病历"}),t.next=8,e.$ajax.get("/admin-api/record/".concat(e.id),{params:{_action:"getData"}});case 8:a=t.sent,0==a.status&&(e.info=a.data,e.patient=a.data.patient,e.form={patient_id:e.info.patient_id,type_id:e.info.type_id,doctor_id:e.info.doctor_id,treat_at:e.info.treat_at?e.info.treat_at.replaceAll("-","/"):"",origin_price:e.info.origin_price,sell_price:e.info.sell_price,order_status:e.info.order_status,content:e.info.content,next_treat_at:e.info.next_treat_at?e.info.next_treat_at.replaceAll("-","/"):"",notify_user_id:e.info.notify_user_id,notify_at:e.info.notify_at?e.info.notify_at.replaceAll("-","/"):"",notify_remarks:e.info.notify_remarks}),t.next=20;break;case 12:if(uni.setNavigationBarTitle({title:"添加病历"}),e.form.patient_id){t.next=15;break}return t.abrupt("return",uni.showModal({title:"请选择病人",showCancel:!1,success:function(){uni.navigateBack()}}));case 15:return n={_action:"getData"},t.next=18,e.$ajax.get("/admin-api/patient/".concat(e.form.patient_id),{params:n});case 18:a=t.sent,0==a.status&&(e.patient=a.data,e.form.content=e.patient.type.content,e.typeName=e.patient.type.name);case 20:return t.next=22,e.$ajax.get("/admin-api/api/keywords/list",{params:{type_key:"illness_type",value:null===(i=e.patient)||void 0===i||null===(i=i.type)||void 0===i?void 0:i.key}});case 22:a=t.sent,0==a.status&&(e.illnessType.list=[a.data]);case 24:case"end":return t.stop()}}),t)})))()},submit:function(){this.form.images=this.$refs["images"].getList().map((function(e){return e.url})),uni.showLoading(),this.id?this.update():this.create()},update:function(){this.form.id=this.id,this.$ajax.put("/admin-api/record/".concat(this.id),this.form).then((function(e){0==e.status&&(uni.showToast({title:"保存成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))},create:function(){this.$ajax.post("/admin-api/record",this.form).then((function(e){0==e.status&&(uni.showToast({title:"提交成功",icon:"success"}),setTimeout((function(){uni.navigateBack()}),1500))}))},toggleDatePicker:function(e,t){e&&(this.datePicker.name=e,this.datePicker.value=this.form[e]?Math.floor(1e3*this.form[e]):(new Date).getTime()),t&&(this.datePicker.mode=t),this.datePicker.show=!this.datePicker.show},selectDatePicker:function(e){this.form[this.datePicker.name]=Math.floor(e.value/1e3),this.toggleDatePicker()},opendAdminUser:function(e){this.adminUser.key=e,this.$refs["select-admin-user"].open()},closeAdminUser:function(){this.adminUser.key="",this.$refs["select-admin-user"].close()},selectAdminUser:function(e){var t=this.adminUser.key;this.form["".concat(t,"_id")]=e.id,this.adminUser["".concat(t,"_name")]=e.name,this.closeAdminUser()},openEditor:function(){this.$refs["editor"].open(this.form.content)},confirmEditor:function(e){this.form.content=e},updateSwitch:function(e){this.form.is_notified=e},openIllnessType:function(){this.illnessType.show=!0},closeIllnessType:function(){this.illnessType.show=!1},confirmIllnessType:function(e){var t=e.value[0];t&&(this.illnessType.value=t.value,this.illnessType.label=t.label,this.form.illness_type_id=t.value,this.closeIllnessType())}}},m=f,h=(i(8787),i(1503)),v=(0,h.Z)(m,r,o,!1,null,"68706d4b",null,!1,n,a),b=v.exports},3819:function(e,t,i){"use strict";i.r(t);var a=i(2916),n=i.n(a),r=i(3282),o=i.n(r),s=o()(n());s.push([e.id,".page[data-v-68706d4b]{padding:20px;background:#fff}.input-text[data-v-68706d4b]{color:#303133;font-size:15px;padding:6px 0;width:100%;display:flex;justify-content:space-between}.input-placeholder[data-v-68706d4b]{color:silver}.button[data-v-68706d4b]{width:100%;margin-top:20px}.page[data-v-68706d4b] .u-radio-group .u-radio:nth-child(even){margin-left:10px}",""]),t["default"]=s},8934:function(e,t,i){"use strict";i.r(t);var a=i(2916),n=i.n(a),r=i(3282),o=i.n(r),s=o()(n());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-8fe1bc2c], uni-scroll-view[data-v-8fe1bc2c], uni-swiper-item[data-v-8fe1bc2c]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-radio-group[data-v-8fe1bc2c]{flex:1}.u-radio-group--row[data-v-8fe1bc2c]{\ndisplay:flex;\nflex-direction:row}.u-radio-group--column[data-v-8fe1bc2c]{\ndisplay:flex;\nflex-direction:column}',""]),t["default"]=s},8546:function(e,t,i){"use strict";i.r(t);var a=i(2916),n=i.n(a),r=i(3282),o=i.n(r),s=o()(n());s.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-view[data-v-759d4cde], uni-scroll-view[data-v-759d4cde], uni-swiper-item[data-v-759d4cde]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-radio[data-v-759d4cde]{\ndisplay:flex;\nflex-direction:row;overflow:hidden;flex-direction:row;align-items:center}.u-radio-label--left[data-v-759d4cde]{flex-direction:row}.u-radio-label--right[data-v-759d4cde]{flex-direction:row-reverse;justify-content:space-between}.u-radio__icon-wrap[data-v-759d4cde]{box-sizing:border-box;transition-property:border-color,background-color,color;transition-duration:.2s;color:#606266;\ndisplay:flex;\nflex-direction:row;align-items:center;justify-content:center;color:transparent;text-align:center;margin-right:6px;font-size:20px;border-width:1px;border-color:#c8c9cc;border-style:solid}.u-radio__icon-wrap--circle[data-v-759d4cde]{border-radius:100%}.u-radio__icon-wrap--square[data-v-759d4cde]{border-radius:3px}.u-radio__icon-wrap--checked[data-v-759d4cde]{color:#fff;background-color:red;border-color:#2979ff}.u-radio__icon-wrap--disabled[data-v-759d4cde]{background-color:#ebedf0!important}.u-radio__icon-wrap--disabled--checked[data-v-759d4cde]{color:#c8c9cc!important}.u-radio__label[data-v-759d4cde]{word-wrap:break-word;margin-left:5px;margin-right:12px;color:#606266;font-size:15px}.u-radio__label--disabled[data-v-759d4cde]{color:#c8c9cc}',""]),t["default"]=s}}]); \ No newline at end of file diff --git a/public/h5/static/js/pages-record-index.1c8c2444.js b/public/h5/static/js/pages-record-index.11521a89.js similarity index 71% rename from public/h5/static/js/pages-record-index.1c8c2444.js rename to public/h5/static/js/pages-record-index.11521a89.js index 8cdb288..75fcb30 100644 --- a/public/h5/static/js/pages-record-index.1c8c2444.js +++ b/public/h5/static/js/pages-record-index.11521a89.js @@ -1,3 +1,3 @@ -(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[492],{1321:function(t,e,n){var i=n(8068);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(5472).Z;r("dc65258e",i,!0,{sourceMap:!1,shadowMode:!1})},8182:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var i,r={uButton:n(7344).Z,uList:n(4307).Z,uSwipeAction:n(3309).Z,uListItem:n(8556).Z,uSwipeActionItem:n(8268).Z,uCell:n(7981).Z,uIcon:n(5862).Z,uActionSheet:n(7030).Z},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("v-uni-view",{staticClass:"add-button"},[n("u-button",{attrs:{type:"primary",icon:"plus",shape:"circle",size:"large"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.add.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"list"},[n("u-list",{attrs:{height:t.listHeight},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.reachBottom.apply(void 0,arguments)}}},[n("u-swipe-action",t._l(t.list,(function(e){return n("u-list-item",{key:e.id},[n("u-swipe-action-item",{attrs:{options:t.swipeOption,name:e.id},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.swipeClick.apply(void 0,arguments)}}},[n("u-cell",{attrs:{size:"large",url:"/pages/record/detail?id="+e.id}},[n("v-uni-view",{staticClass:"title",attrs:{slot:"title"},slot:"title"},[n("v-uni-view",{staticClass:"list-item-title"},[t._v("医师: "+t._s(e.doctor?e.doctor.name:""))]),n("v-uni-view",{staticClass:"list-item-price"},[n("v-uni-text",{staticStyle:{color:"#dd524d","font-size":"19px"}},[n("u-icon",{attrs:{name:"rmb",color:"#dd524d",size:"19px"}}),t._v(t._s(e.sell_price))],1),n("v-uni-text",{staticStyle:{color:"#c0c0c0","text-decoration":"line-through"}},[t._v(t._s(e.origin_price))])],1)],1),n("v-uni-view",{staticClass:"label",attrs:{slot:"label"},slot:"label"},[t._v("时间: "+t._s(e.treat_at))])],1)],1)],1)})),1)],1)],1),n("u-action-sheet",{attrs:{actions:t.option.list,title:t.option.title,show:t.option.show,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeOption.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.chooseOption.apply(void 0,arguments)}}})],1)},a=[],c=n(3762),s=n(3062),u=(n(6228),{data:function(){return{patient_id:"",patient:{},typeIndex:0,perPage:20,typeList:[],list:[],option:{id:"",show:!1,list:[{name:"详细",color:"#4cd964",action:"detail"},{name:"修改",color:"#007aff",action:"edit"},{name:"删除",color:"#dd524d",action:"delete"}],title:""},swipeOption:[{text:"删除",style:{backgroundColor:"#dd524d"}}],listHeight:0}},onLoad:function(t){var e=this;this.patient_id=t.patient,uni.getSystemInfo({success:function(t){e.listHeight=t.safeArea.height-20}}),this.init()},onPullDownRefresh:function(){this.loadData(!0)},methods:{init:function(){var t=this;return(0,s.Z)((0,c.Z)().mark((function e(){var n;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$ajax.get("/admin-api/patient/".concat(t.patient_id),{params:{_action:"getData"}});case 2:n=e.sent,0==n.status&&(t.patient=n.data,uni.setNavigationBarTitle({title:"".concat(t.patient.name,"-病历记录")})),t.loadData(!0);case 5:case"end":return e.stop()}}),e)})))()},changeType:function(t){this.typeIndex=t,this.loadData(!0)},loadData:function(t){var e=this;t&&(this.list=[],this.page=1),uni.showLoading();var n={_action:"getData",page:this.page,perPage:this.perPage,patient_id:this.patient_id};this.$ajax.get("/admin-api/record?",{params:n}).then((function(t){uni.stopPullDownRefresh(),0==t.status&&(e.list=e.list.concat(t.data.items),e.total=t.data.total)})).catch((function(t){uni.stopPullDownRefresh()}))},reachBottom:function(){this.list.length=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:S(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),m}},e}}}]); \ No newline at end of file +r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof w?e:w,o=Object.create(r.prototype),c=new T(i||[]);return a(o,"_invoke",{value:Z(t,n,c)}),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function x(){}var _={};h(_,s,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(S([])));E&&E!==n&&o.call(E,s)&&(_=E);var O=x.prototype=w.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(r,a,c,s){var u=p(t[r],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==(0,i.Z)(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,s)}))}s(u.arg)}var r;a(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(o,o):o()}})}function Z(e,n,i){var r=d;return function(o,a){if(r===y)throw new Error("Generator is already running");if(r===g){if("throw"===o)throw a;return{value:t,done:!0}}for(i.method=o,i.arg=a;;){var c=i.delegate;if(c){var s=P(c,i);if(s){if(s===m)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===d)throw r=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=y;var u=p(e,n,i);if("normal"===u.type){if(r=i.done?g:v,u.arg===m)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(r=g,i.method="throw",i.arg=u.arg)}}}function P(e,n){var i=n.method,r=e.iterator[i];if(r===t)return n.delegate=null,"throw"===i&&e.iterator["return"]&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),m;var o=p(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:S(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),m}},e}}}]); \ No newline at end of file diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 4aa5755..dce0ac2 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -3,6 +3,7 @@ namespace Tests\Feature; // use Illuminate\Foundation\Testing\RefreshDatabase; +use App\Admin\Services\UserService; use Overtrue\EasySms\EasySms; use Tests\TestCase; @@ -13,17 +14,8 @@ class ExampleTest extends TestCase */ public function test_the_application_returns_a_successful_response(): void { - $now = now(); - dump($now->day, $now->month); - // try { - // $easySms = new EasySms(config('easysms')); - // $result = $easySms->send('18983405554', [ - // 'template' => 'SMS_463637721', - // ]); - // dump($result); - // } catch (\Exception $e) { - // dump($e->getException('aliyun')->raw); - // } + $filters = ['ignore_type_id' => 2]; + dump((new UserService())->list()); $this->assertTrue(true); } }