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
09a3c2fb
Commit
09a3c2fb
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1114
parent
522e0a76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
9 deletions
+59
-9
index.jsx
src/pages/device/supplier/index.jsx
+1
-1
columns.js
src/pages/device/type/columns.js
+8
-6
index.jsx
src/pages/device/type/index.jsx
+50
-2
No files found.
src/pages/device/supplier/index.jsx
View file @
09a3c2fb
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-14 10:
00:16
* @Last Modified time: 2022-11-14 10:
39:38
*/
import
*
as
React
from
'react'
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/device/type/columns.js
View file @
09a3c2fb
...
...
@@ -4,13 +4,15 @@ function getcolumns(setdrawer) {
title
:
'设备类型'
,
dataIndex
:
'title'
,
key
:
'title'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'备注'
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/device/type/index.jsx
View file @
09a3c2fb
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-1
1 11:15:50
* @Last Modified time: 2022-11-1
4 13:31:02
*/
import
*
as
React
from
'react'
;
...
...
@@ -92,6 +92,47 @@ function Type(props) {
);
};
const
addChild
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
detailpath
:
null
,
// params:
{
id
:
drawer
?.
item
?.
id
},
title
:
'新增子级'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
let
params
=
{
...
vals
,
id
:
row
.
id
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'编辑成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
}
}
>
新增子级
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
...
...
@@ -127,7 +168,11 @@ function Type(props) {
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
)],
render
:
(
text
,
row
,
_
,
action
)
=>
[
addChild
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
});
},
[]);
...
...
@@ -155,6 +200,8 @@ function Type(props) {
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
parentId
:
0
,
equipmentTypeName
:
vals
.
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
...
...
@@ -173,6 +220,7 @@ function Type(props) {
},
},
}
}
pagination=
{
false
}
/>
<
DrawerPro
...
...
This diff is collapsed.
Click to expand it.
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