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
fe9c373d
Commit
fe9c373d
authored
Jun 01, 2021
by
涂茜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/bug' into 'dev'
fix: bug See merge request
!47
parents
68223663
34fb99e6
Pipeline
#28729
passed with stages
in 5 minutes 5 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
24 deletions
+38
-24
Basic.tsx
packages/base-components/DeviceTree/src/demos/Basic.tsx
+4
-4
index.less
packages/base-components/DeviceTree/src/index.less
+14
-0
Basic.tsx
packages/base-components/HistoryInfo/src/demos/Basic.tsx
+6
-6
Basic.tsx
packages/base-components/QuotaSelect/src/demos/Basic.tsx
+1
-1
Basic.tsx
packages/base-components/RealTimeInfo/src/demos/Basic.tsx
+12
-12
index.js
packages/extend-components/EC_QuotaSelect/src/index.js
+1
-1
No files found.
packages/base-components/DeviceTree/src/demos/Basic.tsx
View file @
fe9c373d
...
...
@@ -12,7 +12,7 @@ const Demo = () => {
const
fetchData
=
(
params
=
{})
=>
{
// eslint-disable-next-line no-use-before-define
request
(
`
${
baseUrl
}
/Publish/
Monitor
/Device/DeviceTree`
,
{
request
(
`
${
baseUrl
}
/Publish/
GCK
/Device/DeviceTree`
,
{
method
:
'post'
,
data
:
{
pageIndex
:
1
,
...
...
@@ -29,7 +29,7 @@ const Demo = () => {
// eslint-disable-next-line no-nested-ternary
const
data
=
response
.
data
?
response
.
data
.
list
&&
response
.
data
.
list
.
length
>
0
?
response
.
data
.
list
[
0
].
D
eviceList
?
response
.
data
.
list
[
0
].
d
eviceList
:
[]
:
[];
// eslint-disable-next-line no-use-before-define
...
...
@@ -41,9 +41,9 @@ const Demo = () => {
// eslint-disable-next-line array-callback-return
data
.
map
((
item
)
=>
{
// eslint-disable-next-line no-param-reassign
item
.
title
=
item
.
D
eviceName
;
item
.
title
=
item
.
d
eviceName
;
// eslint-disable-next-line no-param-reassign
item
.
key
=
item
.
S
tationID
;
item
.
key
=
item
.
s
tationID
;
// eslint-disable-next-line no-param-reassign
item
.
children
=
handleData
(
item
.
children
);
});
...
...
packages/base-components/DeviceTree/src/index.less
View file @
fe9c373d
...
...
@@ -20,6 +20,20 @@
white-space: nowrap;
}
.ant-tree-treenode {
width: 100%;
}
.ant-tree-switcher-noop {
width: 14px;
}
.ant-tree-node-content-wrapper {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
&-content {
flex: 1;
overflow-y: scroll;
...
...
packages/base-components/HistoryInfo/src/demos/Basic.tsx
View file @
fe9c373d
...
...
@@ -20,25 +20,25 @@ const Demo = () => {
},
[]);
const
fetchData
=
(
params
=
{})
=>
{
request
(
baseUrl
+
'/P
ublish
/Monitor/Device/SensorsDataForStation'
,
{
request
(
baseUrl
+
'/P
andaCore
/Monitor/Device/SensorsDataForStation'
,
{
method
:
'post'
,
data
:
params
,
}).
then
((
res
)
=>
{
let
resData
=
res
.
data
;
let
columnsData
=
resData
.
map
((
item
,
index
)
=>
{
return
{
title
:
`
${
item
.
E
quipmentName
}
-
${
item
.
sensorName
}${
title
:
`
${
item
.
e
quipmentName
}
-
${
item
.
sensorName
}${
item
.
unit
?
'('
+
item
.
unit
+
')'
:
''
}
`
,
dataIndex
:
`value
${
index
+
1
}
`
,
key
:
`value
${
index
+
1
}
`
,
};
});
let
tableData
=
resData
[
0
].
dataModel
.
map
((
item
,
index
)
=>
({
key
:
index
,
time
:
item
.
PT
}));
let
tableData
=
resData
[
0
].
dataModel
.
map
((
item
,
index
)
=>
({
key
:
index
,
time
:
item
.
pt
}));
tableData
.
forEach
((
item
,
i
)
=>
{
resData
.
forEach
((
child
,
index
)
=>
{
child
.
dataModel
.
forEach
((
value
,
j
)
=>
{
if
(
i
===
j
)
item
[
`value
${
index
+
1
}
`
]
=
value
.
PV
;
if
(
i
===
j
)
item
[
`value
${
index
+
1
}
`
]
=
value
.
pv
;
});
});
});
...
...
@@ -54,10 +54,10 @@ const Demo = () => {
resData
.
forEach
((
item
)
=>
{
let
data
=
[];
item
.
dataModel
.
forEach
((
child
)
=>
{
data
.
push
([
moment
(
child
.
PT
).
valueOf
(),
child
.
PV
]);
data
.
push
([
moment
(
child
.
pt
).
valueOf
(),
child
.
pv
]);
});
let
obj
=
{
name
:
item
.
E
quipmentName
+
item
.
sensorName
,
name
:
item
.
e
quipmentName
+
item
.
sensorName
,
sensorName
:
item
.
sensorName
,
decimalPoint
:
item
.
decimalPoint
,
unit
:
item
.
unit
,
...
...
packages/base-components/QuotaSelect/src/demos/Basic.tsx
View file @
fe9c373d
...
...
@@ -9,7 +9,7 @@ const Demo = () => {
const
[
selectData
,
setSelectData
]
=
useState
([]);
const
fetchData
=
()
=>
{
request
(
baseUrl
+
'/Publish/
Monitor
/Device/GetQuotaList'
,
{
request
(
baseUrl
+
'/Publish/
GCK
/Device/GetQuotaList'
,
{
method
:
'get'
,
params
:
{
accountName
:
'二供泵房'
,
...
...
packages/base-components/RealTimeInfo/src/demos/Basic.tsx
View file @
fe9c373d
...
...
@@ -10,7 +10,7 @@ const Demo = () => {
const
[
updateTime
,
setUpdateTime
]
=
useState
(
''
);
const
GetPointAddressEntry
=
(
params
=
{})
=>
{
return
request
(
baseUrl
+
'/Publish/
Monitor
/PointAddress/GetPointAddressEntry'
,
{
return
request
(
baseUrl
+
'/Publish/
GCK
/PointAddress/GetPointAddressEntry'
,
{
method
:
'get'
,
params
:
{
versionID
:
4
,
...
...
@@ -19,14 +19,14 @@ const Demo = () => {
};
const
GetSensorType
=
(
params
=
{})
=>
{
return
request
(
baseUrl
+
'/Publish/
Monitor/Scada
/GetSensorType'
,
{
return
request
(
baseUrl
+
'/Publish/
GCK/Sensor
/GetSensorType'
,
{
method
:
'get'
,
params
:
{},
});
};
const
GetDeviceRealInfo
=
(
params
=
{})
=>
{
return
request
(
baseUrl
+
'/Publish/
Monitor
/Device/DeviceRealInfo'
,
{
return
request
(
baseUrl
+
'/Publish/
GCK
/Device/DeviceRealInfo'
,
{
method
:
'post'
,
data
:
{
userID
:
'1'
,
...
...
@@ -44,33 +44,33 @@ const Demo = () => {
let
data2
=
await
GetSensorType
();
let
data3
=
await
GetDeviceRealInfo
();
setUpdateTime
(
data3
.
data
.
list
[
0
].
PT
);
setGuid
(
data3
.
data
.
list
[
0
].
Child
[
0
].
GUID
);
setGuid
(
data3
.
data
.
list
[
0
].
child
[
0
].
guid
);
handleData
(
data1
.
data
,
data2
.
data
,
data3
.
data
);
};
const
handleData
=
(
data1
=
[],
data2
=
[],
data3
=
[])
=>
{
let
newData
=
data1
.
map
((
item
,
index
)
=>
{
return
{
id
:
item
.
ID
,
key
:
item
.
ID
,
id
:
item
.
id
,
key
:
item
.
id
,
index
:
index
+
1
,
name
:
item
.
Name
,
value
:
0
,
unit
:
'--'
,
type
:
'--'
,
time
:
data3
.
list
[
0
].
PT
,
time
:
data3
.
list
[
0
].
pt
,
...
item
,
};
});
newData
.
forEach
((
item
)
=>
{
let
curData1
=
data2
.
filter
((
child
)
=>
child
.
ID
==
item
.
S
ensorTypeID
);
let
curData2
=
data3
.
list
[
0
].
DataList
.
filter
((
child
)
=>
child
.
PAID
==
item
.
ID
);
let
curData1
=
data2
.
filter
((
child
)
=>
child
.
id
==
item
.
s
ensorTypeID
);
let
curData2
=
data3
.
list
[
0
].
dataList
.
filter
((
child
)
=>
child
.
paid
==
item
.
id
);
if
(
curData1
.
length
)
{
item
.
unit
=
curData1
[
0
].
U
nit
||
'--'
;
item
.
type
=
curData1
[
0
].
N
ame
||
'--'
;
item
.
unit
=
curData1
[
0
].
u
nit
||
'--'
;
item
.
type
=
curData1
[
0
].
n
ame
||
'--'
;
}
if
(
curData2
.
length
)
{
item
.
value
=
curData2
[
0
].
PV
||
'--'
;
item
.
value
=
curData2
[
0
].
pv
||
'--'
;
}
});
setData
(
newData
);
...
...
packages/extend-components/EC_QuotaSelect/src/index.js
View file @
fe9c373d
...
...
@@ -305,7 +305,7 @@ const QuotaSelect = ({
return
(
<
div
className
=
{
classNames
(
prefixCls
)}
>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-btn-wrap`
)}
>
{
deviceList
.
length
&&
{
!!
deviceList
.
length
&&
deviceList
.
map
((
item
,
index
)
=>
(
<
Button
key
=
{
index
}
...
...
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