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 85e7f91d
authored
Jun 06, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v1.7.1版本需求
1 parent
27598af6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
12 deletions
src/views/alarmCenter/offline.vue
src/views/alarmCenter/offline.vue
View file @
85e7f91
...
@@ -118,20 +118,43 @@ export default {
...
@@ -118,20 +118,43 @@ export default {
};
};
},
},
created
()
{
created
()
{
let
end
=
moment
().
format
(
"YYYY-MM-DD"
)
+
" 23:59:59"
;
let
query
=
this
.
$route
.
query
;
let
start
=
let
end
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
moment
()
let
start
=
moment
()
.
day
(
moment
().
day
()
-
3
)
.
day
(
moment
().
day
()
-
3
)
.
format
(
"YYYY-MM-DD"
)
+
" 00:00:00"
;
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
console
.
log
(
start
+
"--"
+
end
);
this
.
$set
(
this
.
searchForm
,
"offDate"
,
[
start
,
end
]);
if
(
query
.
startTime
)
{
this
.
$set
(
this
.
searchForm
,
"offDate"
,
[
query
.
startTime
,
query
.
endTime
]);
}
else
{
this
.
$set
(
this
.
searchForm
,
"offDate"
,
[
start
,
end
]);
}
// 动态设置禁用日期
let
disabledDate
=
function
(
e
)
{
let
n
=
moment
(
e
).
format
(
"x"
);
let
max
=
moment
().
format
(
"x"
);
if
(
query
.
endTime
)
{
max
=
moment
(
query
.
endTime
).
format
(
"x"
);
}
if
(
n
<
max
)
{
return
false
;
}
else
{
return
true
;
}
};
this
.
$set
(
this
.
offPickerOptions
,
"disabledDate"
,
disabledDate
);
this
.
getList
();
this
.
getList
();
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
// 重置
// 重置
rest
()
{
rest
()
{
this
.
searchForm
=
{
deviceTypeAndSource
:
""
};
let
end
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
let
start
=
moment
()
.
day
(
moment
().
day
()
-
3
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
searchForm
=
{
deviceTypeAndSource
:
""
,
offDate
:
[
start
,
end
]
};
this
.
getList
();
this
.
getList
();
},
},
...
@@ -223,10 +246,9 @@ export default {
...
@@ -223,10 +246,9 @@ export default {
//history.pushState(oParams, "报警位置点", path);
//history.pushState(oParams, "报警位置点", path);
},
},
onChangeDate
(
e
){
onChangeDate
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
);
}
},
},
},
};
};
</
script
>
</
script
>
...
...
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