Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
17b8b07a
authored
Dec 06, 2022
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
样式修改
parent
1e7721a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
app/Admin/Controllers/OrderController.php
app/Admin/bootstrap.php
app/Admin/Controllers/OrderController.php
View file @
17b8b07a
...
@@ -50,11 +50,25 @@ class OrderController extends AdminController
...
@@ -50,11 +50,25 @@ class OrderController extends AdminController
*/
*/
protected
function
grid
()
protected
function
grid
()
{
{
\Admin
::
style
(
<<<CSS
.table-fixed {
position: absolute;
top: 0;
z-index: 10;
overflow: inherit;
}
CSS
);
$user
=
request
()
->
user
;
$user
=
request
()
->
user
;
// dump(PermService::getUserPerms());
// dump(PermService::getUserPerms());
return
Grid
::
make
(
new
Order
(),
function
(
Grid
$grid
)
{
return
Grid
::
make
(
new
Order
(),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
rule
(
Order
::
$ruleViewList
)
->
with
(
"scmUser"
)
->
with
(
"order_price"
)
->
orderBy
(
'order_id'
,
'desc'
);
$grid
->
model
()
->
rule
(
Order
::
$ruleViewList
)
->
with
(
"scmUser"
)
->
with
(
"order_price"
)
->
orderBy
(
'order_id'
,
'desc'
);
$grid
->
fixColumns
(
1
,
2
);
//固定列
//
$grid->fixColumns(1,2);//固定列
// $grid->showColumnSelector();//开启字段选择器功能
// $grid->showColumnSelector();//开启字段选择器功能
// 在 display 回调中使用
// 在 display 回调中使用
$grid
->
column
(
'序号'
,
admin_trans
(
'order.labels.序号'
))
->
display
(
function
()
{
$grid
->
column
(
'序号'
,
admin_trans
(
'order.labels.序号'
))
->
display
(
function
()
{
...
@@ -103,7 +117,7 @@ class OrderController extends AdminController
...
@@ -103,7 +117,7 @@ class OrderController extends AdminController
});
});
$grid
->
fixColumns
(
1
,
-
1
);
//
$grid->fixColumns(1,-1);
$grid
->
showFilter
();
$grid
->
showFilter
();
...
...
app/Admin/bootstrap.php
View file @
17b8b07a
...
@@ -158,6 +158,8 @@ body:not(.dark-mode) .table-fixed table.custom-data-table thead tr th {
...
@@ -158,6 +158,8 @@ body:not(.dark-mode) .table-fixed table.custom-data-table thead tr th {
.table .default-table td{
.table .default-table td{
height: 30px;!important;
height: 30px;!important;
}
}
CSS
CSS
);
);
...
...
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