Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
589c0f08
authored
Nov 13, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医师代码调整
parent
7fcde24f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
app/Admin/Controllers/DoctorController.php
+16
-11
lang/zh_CN/doctor.php
+1
-0
No files found.
app/Admin/Controllers/DoctorController.php
View file @
589c0f08
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Admin\Controllers
;
namespace
App\Admin\Controllers
;
use
App\Admin\Repositories\DoctorRepository
;
use
App\Admin\Repositories\DoctorRepository
;
use
App\Models\User
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Http\Controllers\AdminController
;
...
@@ -18,26 +19,29 @@ class DoctorController extends AdminController
...
@@ -18,26 +19,29 @@ class DoctorController extends AdminController
*/
*/
protected
function
grid
()
protected
function
grid
()
{
{
return
Grid
::
make
(
new
DoctorRepository
(),
function
(
Grid
$grid
)
{
return
Grid
::
make
(
new
DoctorRepository
(
'user'
),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'name'
);
$grid
->
column
(
'name'
);
$grid
->
column
(
'mobile'
);
$grid
->
column
(
'id_card'
);
$grid
->
column
(
'id_card'
);
$grid
->
column
(
'mobile'
);
$grid
->
column
(
'license_no'
);
$grid
->
column
(
'license_no'
);
$grid
->
column
(
'license_no_pic'
)
->
image
(
''
,
50
,
50
);
//
$grid->column('license_no_pic')->image('', 50, 50);
$grid
->
column
(
'license_no_period'
);
//
$grid->column('license_no_period');
$grid
->
column
(
'physician_license'
)
->
image
(
''
,
50
,
50
);
//
$grid->column('physician_license')->image('', 50, 50);
$grid
->
column
(
'id_card_front_pic'
)
->
image
(
''
,
50
,
50
);
//
$grid->column('id_card_front_pic')->image('', 50, 50);
$grid
->
column
(
'id_card_back_pic'
)
->
image
(
''
,
50
,
50
);
//
$grid->column('id_card_back_pic')->image('', 50, 50);
$grid
->
column
(
'online_hospital_name'
);
$grid
->
column
(
'online_hospital_name'
);
$grid
->
column
(
'department'
);
$grid
->
column
(
'department'
);
$grid
->
column
(
'doctor_title'
);
//
$grid->column('doctor_title');
$grid
->
column
(
'be_good_at'
);
//
$grid->column('be_good_at');
$grid
->
column
(
'introduction'
);
//
$grid->column('introduction');
$grid
->
column
(
'signed_pic'
)
->
image
(
''
,
50
,
50
);
$grid
->
column
(
'signed_pic'
)
->
image
(
''
,
50
,
50
);
$grid
->
column
(
'status'
);
$grid
->
column
(
'status'
)
->
switch
();
$grid
->
column
(
'user.openid'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
// 快捷搜索
// 快捷搜索
$grid
->
quickSearch
([
'name'
,
'mobile'
,
'id_card'
])
->
placeholder
(
'请输入[姓名|手机号|身份证号码]'
)
->
width
(
25
);
$grid
->
quickSearch
([
'name'
,
'mobile'
,
'id_card'
])
->
placeholder
(
'请输入[姓名|手机号|身份证号码]'
)
->
width
(
25
);
...
@@ -113,6 +117,7 @@ protected function form()
...
@@ -113,6 +117,7 @@ protected function form()
$form
->
textarea
(
'be_good_at'
)
->
width
(
4
);
$form
->
textarea
(
'be_good_at'
)
->
width
(
4
);
$form
->
textarea
(
'introduction'
)
->
width
(
4
);
$form
->
textarea
(
'introduction'
)
->
width
(
4
);
$form
->
image
(
'signed_pic'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
);
$form
->
image
(
'signed_pic'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
);
$form
->
select
(
'user_id'
)
->
options
(
User
::
all
()
->
pluck
(
'openid'
,
'id'
))
->
width
(
4
);
$form
->
switch
(
'status'
)
->
width
(
4
);
$form
->
switch
(
'status'
)
->
width
(
4
);
$form
->
display
(
'created_at'
)
->
width
(
4
);
$form
->
display
(
'created_at'
)
->
width
(
4
);
...
...
lang/zh_CN/doctor.php
View file @
589c0f08
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
'signed_pic'
=>
'签名照'
,
'signed_pic'
=>
'签名照'
,
'status'
=>
'启用'
,
'status'
=>
'启用'
,
'mobile'
=>
'手机号'
,
'mobile'
=>
'手机号'
,
'user_id'
=>
'用户'
,
],
],
'options'
=>
[
'options'
=>
[
],
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment