Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6cf56b2d
authored
Jun 07, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改时间控件
1 parent
85e7f91d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
src/common/index.js
src/styles/hadoop.scss
src/views/alarmCenter/offline.vue
src/common/index.js
View file @
6cf56b2
...
@@ -131,11 +131,10 @@ let currentWeek = {
...
@@ -131,11 +131,10 @@ let currentWeek = {
let
latelyOneDay
=
{
let
latelyOneDay
=
{
text
:
"近1天不在线"
,
text
:
"近1天不在线"
,
onClick
(
picker
)
{
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
const
start
=
moment
()
const
start
=
moment
()
.
day
(
moment
().
day
()
-
1
)
.
day
(
moment
().
day
()
-
1
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]
);
picker
.
$emit
(
"pick"
,
start
);
},
},
}
}
...
@@ -143,11 +142,10 @@ let latelyOneDay = {
...
@@ -143,11 +142,10 @@ let latelyOneDay = {
let
latelyThreeDay
=
{
let
latelyThreeDay
=
{
text
:
"近3天不在线"
,
text
:
"近3天不在线"
,
onClick
(
picker
)
{
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
const
start
=
moment
()
const
start
=
moment
()
.
day
(
moment
().
day
()
-
3
)
.
day
(
moment
().
day
()
-
3
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]
);
picker
.
$emit
(
"pick"
,
start
);
},
},
}
}
...
@@ -155,11 +153,10 @@ let latelyThreeDay = {
...
@@ -155,11 +153,10 @@ let latelyThreeDay = {
let
latelySevenDay
=
{
let
latelySevenDay
=
{
text
:
"近7天不在线"
,
text
:
"近7天不在线"
,
onClick
(
picker
)
{
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
const
start
=
moment
()
const
start
=
moment
()
.
day
(
moment
().
day
()
-
7
)
.
day
(
moment
().
day
()
-
7
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]
);
picker
.
$emit
(
"pick"
,
start
);
},
},
}
}
...
...
src/styles/hadoop.scss
View file @
6cf56b2
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
.datatime_picker
{
.datatime_picker
{
width
:
360px
;
width
:
360px
;
}
}
.sort_picker
{
width
:
190px
;
}
.mr5
{
.mr5
{
margin-right
:
5px
;
margin-right
:
5px
;
}
}
...
...
src/views/alarmCenter/offline.vue
View file @
6cf56b2
...
@@ -10,7 +10,12 @@
...
@@ -10,7 +10,12 @@
<div
class=
"search_box"
>
<div
class=
"search_box"
>
<el-form
:inline=
"true"
size=
"small"
>
<el-form
:inline=
"true"
size=
"small"
>
<el-form-item
label=
"离线时间:"
>
<el-form-item
label=
"离线时间:"
>
<el-date-picker
v-model=
"searchForm.offDate"
type=
"datetimerange"
class=
"datatime_picker"
unlink-panels
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"offPickerOptions"
@
change=
"onChangeDate"
>
<!--
<el-date-picker
v-model=
"searchForm.offDate"
type=
"datetimerange"
class=
"datatime_picker"
unlink-panels
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"offPickerOptions"
@
change=
"onChangeDate"
>
</el-date-picker>
-->
<el-date-picker
v-model=
"searchForm.offlineStartTime"
class=
"sort_picker"
type=
"datetime"
unlink-panels
placeholder=
"选择日期时间"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"offPickerOptions"
>
</el-date-picker>
<span>
~
</span>
<el-date-picker
v-model=
"searchForm.offlineEndTime"
class=
"sort_picker"
type=
"datetime"
placeholder=
"选择日期时间"
value-format=
"yyyy-MM-dd HH:mm:ss"
disabled
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"激活区间:"
>
<el-form-item
label=
"激活区间:"
>
...
@@ -125,9 +130,11 @@ export default {
...
@@ -125,9 +130,11 @@ export default {
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
if
(
query
.
startTime
)
{
if
(
query
.
startTime
)
{
this
.
$set
(
this
.
searchForm
,
"offDate"
,
[
query
.
startTime
,
query
.
endTime
]);
this
.
$set
(
this
.
searchForm
,
"offlineStartTime"
,
query
.
startTime
);
this
.
$set
(
this
.
searchForm
,
"offlineEndTime"
,
query
.
endTime
);
}
else
{
}
else
{
this
.
$set
(
this
.
searchForm
,
"offDate"
,
[
start
,
end
]);
this
.
$set
(
this
.
searchForm
,
"offlineStartTime"
,
start
);
this
.
$set
(
this
.
searchForm
,
"offlineEndTime"
,
end
);
}
}
// 动态设置禁用日期
// 动态设置禁用日期
...
@@ -154,7 +161,7 @@ export default {
...
@@ -154,7 +161,7 @@ export default {
let
start
=
moment
()
let
start
=
moment
()
.
day
(
moment
().
day
()
-
3
)
.
day
(
moment
().
day
()
-
3
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
searchForm
=
{
deviceTypeAndSource
:
""
,
off
Date
:
[
start
,
end
]
};
this
.
searchForm
=
{
deviceTypeAndSource
:
""
,
off
lineStartTime
:
start
,
offlineEndTime
:
end
};
this
.
getList
();
this
.
getList
();
},
},
...
@@ -168,10 +175,10 @@ export default {
...
@@ -168,10 +175,10 @@ export default {
oParams
.
activeEndTime
=
m
[
1
];
oParams
.
activeEndTime
=
m
[
1
];
}
}
if
(
n
&&
n
.
length
>
0
)
{
//
if (n && n.length > 0) {
oParams
.
offlineStartTime
=
n
[
0
];
//
oParams.offlineStartTime = n[0];
oParams
.
offlineEndTime
=
n
[
1
];
//
oParams.offlineEndTime = n[1];
}
//
}
delete
oParams
.
offDate
;
delete
oParams
.
offDate
;
delete
oParams
.
orgName
;
delete
oParams
.
orgName
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment