Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
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
ReactWeb5
wisdom-components
Commits
9d412483
Commit
9d412483
authored
Apr 03, 2023
by
徐乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改
parent
055e748e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
9 deletions
+116
-9
index.js
packages/base-components/AlarmScrollAssembly/src/index.js
+9
-9
demo.css
packages/table/src/demo.css
+51
-0
demo.js
packages/table/src/demo.js
+56
-0
No files found.
packages/base-components/AlarmScrollAssembly/src/index.js
View file @
9d412483
...
...
@@ -66,14 +66,14 @@ const AlarmScrollAssembly = (props) => {
userAccess
:
true
,
});
const
[
realTimeDataList
,
setRealTimeDataList
]
=
useState
(
null
);
const
getDeviceNumber
=
()
=>
{
return
monitorService
.
getEquipmentInfo
({
deviceTypes
:
props
.
deviceType
,
pageIndex
:
1
,
pageSize
:
1
,
...
constanceRef
.
current
,
});
};
//
const getDeviceNumber = () => {
//
return monitorService.getEquipmentInfo({
//
deviceTypes: props.deviceType,
//
pageIndex: 1,
//
pageSize: 1,
//
...constanceRef.current,
//
});
//
};
const
getRealTimeData
=
(
pagination
)
=>
{
return
monitorService
.
GetAlarmListRealTime
({
deviceType
:
props
.
deviceType
,
...
...
@@ -86,7 +86,7 @@ const AlarmScrollAssembly = (props) => {
});
};
const
getData
=
async
()
=>
{
let
firstRequest
=
await
getDeviceNumber
();
//
let firstRequest = await getDeviceNumber();
let
secondRequest
=
await
getRealTimeData
({
pageIndex
:
1
,
// pageSize: firstRequest.data.totalCount,
...
...
packages/table/src/demo.css
0 → 100644
View file @
9d412483
table
{
width
:
100%
;
}
thead
{
width
:
100%
;
}
thead
tr
{
display
:
table
;
width
:
100%
;
table-layout
:
fixed
;
line-height
:
30px
;
}
tbody
{
width
:
100%
;
display
:
block
;
}
tbody
tr
{
display
:
table
;
width
:
100%
;
table-layout
:
fixed
;
line-height
:
30px
;
}
thead
tr
th
{
text-align
:
center
;
}
tbody
tr
td
{
text-align
:
center
;
}
.addBox
{
display
:
flex
;
justify-content
:
center
;
}
.inputPublic
{
width
:
120px
;
height
:
32px
;
border
:
1px
solid
#ccc
;
border-radius
:
3px
;
padding
:
0
5px
;
margin-right
:
20px
;
outline
:
none
;
}
.addBtn
{
width
:
60px
;
height
:
32px
;
text-align
:
center
;
border
:
1px
solid
#ccc
;
border-radius
:
3px
;
line-height
:
32px
;
cursor
:
pointer
;
}
\ No newline at end of file
packages/table/src/demo.js
0 → 100644
View file @
9d412483
import
React
from
'react'
;
// eslint-disable-next-line no-unused-vars
import
Table
from
'./index'
;
import
'./demo.css'
;
const
head
=
[
'序号'
,
'名字'
,
'性别'
,
'年龄'
];
class
Alphabet
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
data
:
[
{
index
:
1
,
name
:
'张三'
,
sex
:
'男'
,
age
:
'16'
,
},
],
};
this
.
addUser
=
this
.
addUser
.
bind
(
this
);
}
addUser
()
{
const
{
data
}
=
this
.
state
;
data
.
push
({
index
:
this
.
state
.
data
.
length
+
1
,
name
:
this
.
refs
.
inputName
.
value
,
sex
:
this
.
refs
.
inputSex
.
value
,
age
:
this
.
refs
.
inputAge
.
value
,
});
this
.
setState
(()
=>
({
data
,
}));
this
.
refs
.
inputName
.
value
=
''
;
this
.
refs
.
inputSex
.
value
=
''
;
this
.
refs
.
inputAge
.
value
=
''
;
}
render
()
{
return
(
<>
<
div
className
=
"addBox"
>
<
input
className
=
"inputPublic inputName"
ref
=
"inputName"
type
=
"text"
placeholder
=
"姓名"
/>
<
input
className
=
"inputPublic inputSex"
ref
=
"inputSex"
type
=
"text"
placeholder
=
"性别"
/>
<
input
className
=
"inputPublic inputAge"
ref
=
"inputAge"
type
=
"text"
placeholder
=
"年龄"
/>
<
p
className
=
"addBtn"
onClick
=
{
this
.
addUser
}
>
添加
<
/p
>
<
/div
>
<
Table
dataSource
=
{
this
.
state
.
data
}
header
=
{
head
}
/
>
<
/
>
);
}
}
export
default
Alphabet
;
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