Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
a12a97ba
Commit
a12a97ba
authored
Nov 15, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1115
parent
33e12f4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
28 deletions
+50
-28
index.jsx
src/pages/device/account/index.jsx
+43
-25
index.jsx
src/pages/device/type/index.jsx
+7
-3
No files found.
src/pages/device/account/index.jsx
View file @
a12a97ba
...
...
@@ -2,16 +2,20 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-1
4 15:52:12
* @Last Modified time: 2022-11-1
5 13:29:58
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
TreeRender
from
'@/components/TreeRender'
;
import
{
Layout
}
from
'antd'
;
const
{
Sider
,
Content
}
=
Layout
;
function
Account
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
...
...
@@ -100,30 +104,44 @@ function Account(props) {
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"设备台账"
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
/>
<
div
className=
"ant-card-head"
>
<
div
className=
"ant-card-head-wrapper"
>
<
div
className=
"ant-card-head-title"
>
<
h3
className=
"page-title"
>
设备台账
</
h3
>
</
div
>
</
div
>
</
div
>
<
Layout
style=
{
{
height
:
'100%'
}
}
>
<
Sider
theme=
"light"
width=
{
300
}
>
<
TreeRender
/>
</
Sider
>
<
Content
>
<
AutoTable
pagetitle=
{
<
h3
style=
{
{
marginBottom
:
0
,
fontWeight
:
400
}
}
>
设备台账
</
h3
>
}
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
/>
</
Content
>
</
Layout
>
<
DrawerPro
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
...
...
src/pages/device/type/index.jsx
View file @
a12a97ba
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-15
09:50:49
* @Last Modified time: 2022-11-15
10:13:24
*/
import
*
as
React
from
'react'
;
...
...
@@ -174,9 +174,13 @@ function Type(props) {
};
const
columns
=
useMemo
(()
=>
{
// console.log(drawer);
// if(drawer?.val == 'edit')
let
defcolumn
=
getcolumns
(
setDrawer
);
console
.
log
(
drawer
);
if
(
drawer
?.
val
==
'add'
||
drawer
?.
val
==
'edit'
)
{
defcolumn
[
1
].
hideInForm
=
true
;
}
else
{
defcolumn
[
1
].
hideInForm
=
false
;
}
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
...
...
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