Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Imagedx
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
VideoAIService
Imagedx
Commits
e8e0764e
Commit
e8e0764e
authored
May 25, 2021
by
yzm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改为跟胡taskno 去执行服务
parent
5da17e6b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
src/main/resources/static/js/sjcx/sjcx.js
src/main/resources/static/js/sjcx/sjcx.js
+3
-3
src/main/resources/static/js/util/httputil.js
src/main/resources/static/js/util/httputil.js
+11
-1
No files found.
src/main/resources/static/js/sjcx/sjcx.js
View file @
e8e0764e
...
@@ -896,8 +896,8 @@ $('[data-gallery=manual]').click(function (e) {
...
@@ -896,8 +896,8 @@ $('[data-gallery=manual]').click(function (e) {
new
PhotoViewer
(
items
,
options
);
new
PhotoViewer
(
items
,
options
);
});
});
let
d
=
new
Date
().
getTime
();
let
d
=
new
Date
().
getTime
();
//
let web_ip = "ws:/172.16.24.29:8089/websocket/" + d;
let
web_ip
=
"
ws:/172.16.24.29:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/localhost:8089/websocket/
"
+
d
;
//
let web_ip = "ws:/localhost:8089/websocket/" + d;
let
wss
=
new
WebSocket
(
web_ip
);
let
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
console
.
log
(
"
连接成功
"
);
...
@@ -932,7 +932,7 @@ wss.onmessage = function (evt) {
...
@@ -932,7 +932,7 @@ wss.onmessage = function (evt) {
//事件id
//事件id
let
sjid
=
data
.
id
;
let
sjid
=
data
.
id
;
//报警时间
//报警时间
let
sj
=
new
Dat
e
(
data
.
createtime
);
let
sj
=
timestampToTim
e
(
data
.
createtime
);
//事件类型
//事件类型
let
bjlx
=
''
;
let
bjlx
=
''
;
//事件等级
//事件等级
...
...
src/main/resources/static/js/util/httputil.js
View file @
e8e0764e
...
@@ -145,3 +145,13 @@ $.ajaxSetup({
...
@@ -145,3 +145,13 @@ $.ajaxSetup({
}
}
}
}
});
});
function
timestampToTime
(
timestamp
)
{
//转化成YYYYMMDDhhmmss格式的时间戳
var
date
=
new
Date
(
timestamp
),
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
Y
=
date
.
getFullYear
()
+
'
-
'
,
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
,
D
=
date
.
getDate
()
+
'
-
'
,
h
=
date
.
getHours
()
+
'
:
'
,
m
=
date
.
getMinutes
()
+
'
:
'
,
s
=
date
.
getSeconds
();
return
Y
+
M
+
D
+
h
+
m
+
s
;
}
\ No newline at end of file
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