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
94014492
authored
Nov 22, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch
parent
ee4f4313
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
app/Admin/Controllers/DoctorCorrectionController.php
+18
-1
app/Admin/Controllers/PharmacyCorrectionController.php
+20
-3
No files found.
app/Admin/Controllers/DoctorCorrectionController.php
View file @
94014492
...
...
@@ -4,6 +4,7 @@
use
App\Admin\Repositories\DoctorCorrectionRepository
;
use
App\Models\DoctorCorrectionModel
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Http\Controllers\AdminController
;
...
...
@@ -25,7 +26,7 @@ protected function grid()
// $grid->column('doctor_id');
$grid
->
column
(
'doctor_name'
);
$grid
->
column
(
'content'
);
//
$grid->column('created_at');
$grid
->
column
(
'created_at'
);
// $grid->column('updated_at')->sortable();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
...
...
@@ -44,4 +45,20 @@ protected function grid()
$grid
->
disableBatchActions
();
// 禁用批量操作
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected
function
form
()
{
return
Form
::
make
(
new
DoctorCorrectionRepository
(),
function
(
Form
$form
)
{
$form
->
switch
(
'is_handle'
)
->
width
(
4
);
// 右上角按钮控制
$form
->
disableDeleteButton
();
// 去掉删除按钮
$form
->
disableViewButton
();
// 去掉跳转详情页按钮
});
}
}
app/Admin/Controllers/PharmacyCorrectionController.php
View file @
94014492
...
...
@@ -4,6 +4,7 @@
use
App\Admin\Repositories\PharmacyCorrectionRepository
;
use
App\Models\PharmacyCorrectionModel
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Http\Controllers\AdminController
;
...
...
@@ -20,12 +21,12 @@ protected function grid()
return
Grid
::
make
(
new
PharmacyCorrectionRepository
(),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
column
(
'id'
)
->
sortable
()
;
$grid
->
column
(
'id'
);
// $grid->column('pharmacy_id');
$grid
->
column
(
'is_handle'
)
->
switch
();
$grid
->
column
(
'pharmacy_name'
);
$grid
->
column
(
'is_handle'
);
$grid
->
column
(
'content'
);
//
$grid->column('created_at');
$grid
->
column
(
'created_at'
);
// $grid->column('updated_at')->sortable();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
...
...
@@ -44,4 +45,20 @@ protected function grid()
$grid
->
disableBatchActions
();
// 禁用批量操作
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected
function
form
()
{
return
Form
::
make
(
new
PharmacyCorrectionRepository
(),
function
(
Form
$form
)
{
$form
->
switch
(
'is_handle'
)
->
width
(
4
);
// 右上角按钮控制
$form
->
disableDeleteButton
();
// 去掉删除按钮
$form
->
disableViewButton
();
// 去掉跳转详情页按钮
});
}
}
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