Commit 753d3931 authored by 涂茜's avatar 涂茜

fix: bug

parent a59b9936
Pipeline #29590 failed with stages
in 15 seconds
...@@ -66,16 +66,16 @@ const getTimeRange = (type) => { ...@@ -66,16 +66,16 @@ const getTimeRange = (type) => {
.endOf('month'); .endOf('month');
break; break;
case 'lastWeek': // 上周 case 'lastWeek': // 上周
start = moment().subtract(14, 'days'); start = moment().startOf('week').subtract(1, 'week');
end = moment().subtract(7, 'days'); end = moment().endOf('week').subtract(1, 'week');
break; break;
case 'thisWeek': // 本周 case 'thisWeek': // 本周
start = moment().subtract(6, 'days'); start = moment().startOf('week');
end = moment(); end = moment().endOf('week');
break; break;
case 'nextWeek': // 下周 case 'nextWeek': // 下周
start = moment().subtract(-1, 'days'); start = moment().startOf('week').subtract(-1, 'week');
end = moment().subtract(-7, 'days'); end = moment().endOf('week').subtract(-1, 'week');
break; break;
case 'lastDay': // 昨天 case 'lastDay': // 昨天
start = moment().subtract(1, 'days'); start = moment().subtract(1, 'days');
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
.ant-tree-checkbox { .ant-tree-checkbox {
margin: 4px 2px 0 0; margin: 7px 2px 0 0;
} }
.ant-tree-title { .ant-tree-title {
...@@ -24,14 +24,26 @@ ...@@ -24,14 +24,26 @@
width: 100%; width: 100%;
} }
.ant-tree-switcher {
line-height: 30px;
}
.ant-tree-switcher-noop { .ant-tree-switcher-noop {
width: 14px; width: 14px;
} }
.ant-tree-node-content-wrapper { .ant-tree-node-content-wrapper {
flex: 1; flex: 1;
min-height: 30px;
overflow: hidden; overflow: hidden;
line-height: 30px;
text-overflow: ellipsis; text-overflow: ellipsis;
border-radius: 3px;
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
color: #1890ff;
background-color: #eaf1fe;
} }
&-content { &-content {
......
...@@ -23,12 +23,12 @@ const Demo = () => { ...@@ -23,12 +23,12 @@ const Demo = () => {
end = moment().format(endFormat); end = moment().format(endFormat);
break; break;
case 'thisWeek': case 'thisWeek':
start = moment().subtract(6, 'days').format(startFormat); start = moment().startOf('week').format(startFormat);
end = moment().format(endFormat); end = moment().endOf('week').format(endFormat);
break; break;
case 'lastWeek': case 'lastWeek':
start = moment().subtract(14, 'days').format(startFormat); start = moment().startOf('week').subtract(1, 'week').format(startFormat);
end = moment().subtract(7, 'days').format(endFormat); end = moment().endOf('week').subtract(1, 'week').format(endFormat);
break; break;
case 'thisMonth': case 'thisMonth':
start = moment().startOf('month').format(startFormat); start = moment().startOf('month').format(startFormat);
...@@ -151,7 +151,7 @@ export default Demo; ...@@ -151,7 +151,7 @@ export default Demo;
const startFormat = 'YYYY-MM-DD 00:00:00'; const startFormat = 'YYYY-MM-DD 00:00:00';
const endFormat = 'YYYY-MM-DD 23:59:59'; 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 = [ const dateList = [
{ {
......
...@@ -325,7 +325,7 @@ const HistoryInfo = (props) => { ...@@ -325,7 +325,7 @@ const HistoryInfo = (props) => {
resData.forEach((child, index) => { resData.forEach((child, index) => {
child.dataModel.forEach((value, j) => { child.dataModel.forEach((value, j) => {
const formatTime = moment(value.pt).format(format); 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 || '--';
}); });
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment