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
753d3931
Commit
753d3931
authored
Jun 10, 2021
by
涂茜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bug
parent
a59b9936
Pipeline
#29590
failed with stages
in 15 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
13 deletions
+25
-13
index.js
packages/base-components/BasicTools/src/index.js
+6
-6
index.less
packages/base-components/DeviceTree/src/index.less
+13
-1
Basic.tsx
packages/base-components/TimeRangePicker/src/demos/Basic.tsx
+5
-5
index.js
packages/extend-components/EC_HistoryInfo/src/index.js
+1
-1
No files found.
packages/base-components/BasicTools/src/index.js
View file @
753d3931
...
...
@@ -66,16 +66,16 @@ const getTimeRange = (type) => {
.
endOf
(
'month'
);
break
;
case
'lastWeek'
:
// 上周
start
=
moment
().
s
ubtract
(
14
,
'days
'
);
end
=
moment
().
subtract
(
7
,
'days
'
);
start
=
moment
().
s
tartOf
(
'week'
).
subtract
(
1
,
'week
'
);
end
=
moment
().
endOf
(
'week'
).
subtract
(
1
,
'week
'
);
break
;
case
'thisWeek'
:
// 本周
start
=
moment
().
s
ubtract
(
6
,
'days
'
);
end
=
moment
();
start
=
moment
().
s
tartOf
(
'week
'
);
end
=
moment
()
.
endOf
(
'week'
)
;
break
;
case
'nextWeek'
:
// 下周
start
=
moment
().
s
ubtract
(
-
1
,
'days
'
);
end
=
moment
().
subtract
(
-
7
,
'days
'
);
start
=
moment
().
s
tartOf
(
'week'
).
subtract
(
-
1
,
'week
'
);
end
=
moment
().
endOf
(
'week'
).
subtract
(
-
1
,
'week
'
);
break
;
case
'lastDay'
:
// 昨天
start
=
moment
().
subtract
(
1
,
'days'
);
...
...
packages/base-components/DeviceTree/src/index.less
View file @
753d3931
...
...
@@ -13,7 +13,7 @@
}
.ant-tree-checkbox {
margin:
4
px 2px 0 0;
margin:
7
px 2px 0 0;
}
.ant-tree-title {
...
...
@@ -24,14 +24,26 @@
width: 100%;
}
.ant-tree-switcher {
line-height: 30px;
}
.ant-tree-switcher-noop {
width: 14px;
}
.ant-tree-node-content-wrapper {
flex: 1;
min-height: 30px;
overflow: hidden;
line-height: 30px;
text-overflow: ellipsis;
border-radius: 3px;
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
color: #1890ff;
background-color: #eaf1fe;
}
&-content {
...
...
packages/base-components/TimeRangePicker/src/demos/Basic.tsx
View file @
753d3931
...
...
@@ -23,12 +23,12 @@ const Demo = () => {
end
=
moment
().
format
(
endFormat
);
break
;
case
'thisWeek'
:
start
=
moment
().
s
ubtract
(
6
,
'days
'
).
format
(
startFormat
);
end
=
moment
().
format
(
endFormat
);
start
=
moment
().
s
tartOf
(
'week
'
).
format
(
startFormat
);
end
=
moment
().
endOf
(
'week'
).
format
(
endFormat
);
break
;
case
'lastWeek'
:
start
=
moment
().
s
ubtract
(
14
,
'days
'
).
format
(
startFormat
);
end
=
moment
().
subtract
(
7
,
'days
'
).
format
(
endFormat
);
start
=
moment
().
s
tartOf
(
'week'
).
subtract
(
1
,
'week
'
).
format
(
startFormat
);
end
=
moment
().
endOf
(
'week'
).
subtract
(
1
,
'week
'
).
format
(
endFormat
);
break
;
case
'thisMonth'
:
start
=
moment
().
startOf
(
'month'
).
format
(
startFormat
);
...
...
@@ -151,7 +151,7 @@ export default Demo;
const
startFormat
=
'YYYY-MM-DD 00:00:00'
;
const
endFormat
=
'YYYY-MM-DD 23:59:59'
;
const
timeFormat
=
'YYYY-MM-DD
kk
:mm:ss'
;
const
timeFormat
=
'YYYY-MM-DD
hh
:mm:ss'
;
const
dateList
=
[
{
...
...
packages/extend-components/EC_HistoryInfo/src/index.js
View file @
753d3931
...
...
@@ -325,7 +325,7 @@ const HistoryInfo = (props) => {
resData
.
forEach
((
child
,
index
)
=>
{
child
.
dataModel
.
forEach
((
value
,
j
)
=>
{
const
formatTime
=
moment
(
value
.
pt
).
format
(
format
);
if
(
timeData
[
i
]
===
formatTime
)
item
[
`value
${
index
+
1
}
`
]
=
value
.
pv
;
if
(
timeData
[
i
]
===
formatTime
)
item
[
`value
${
index
+
1
}
`
]
=
value
.
pv
||
'--'
;
});
});
});
...
...
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