Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
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
冯超鹏
laravelzh
Commits
56128736
Commit
56128736
authored
Dec 22, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/h5
parents
18537c76
fdfc0bb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
5 deletions
+42
-5
ZehongTcpController.php
app/Http/Controllers/Auth/ZehongTcpController.php
+5
-4
index.vue
resources/js/views/map/index.vue
+37
-1
No files found.
app/Http/Controllers/Auth/ZehongTcpController.php
View file @
56128736
...
@@ -91,9 +91,9 @@ class ZehongTcpController extends Controller
...
@@ -91,9 +91,9 @@ class ZehongTcpController extends Controller
{
{
if
(
$data
!=
[])
{
if
(
$data
!=
[])
{
// 报警提醒
// 报警提醒
//
$meTcp = new SwooleCommandMeTcpController();
$meTcp
=
new
SwooleCommandMeTcpController
();
//
$alarmData = $data['id'] . '/' . $data['status'] . '/' . $data['np'];
$alarmData
=
$data
[
'id'
]
.
'/'
.
$data
[
'status'
]
.
'/'
.
$data
[
'np'
];
//
$meTcp->swooletcplist($alarmData);
$meTcp
->
swooletcplist
(
$alarmData
);
$this
->
smsphone
(
$data
);
$this
->
smsphone
(
$data
);
$datainfo
=
DB
::
table
(
'device'
)
$datainfo
=
DB
::
table
(
'device'
)
->
where
(
'devicenum'
,
'='
,
$data
[
'id'
])
->
where
(
'devicenum'
,
'='
,
$data
[
'id'
])
...
@@ -115,7 +115,7 @@ class ZehongTcpController extends Controller
...
@@ -115,7 +115,7 @@ class ZehongTcpController extends Controller
public
function
smsphone
(
$data
)
public
function
smsphone
(
$data
)
{
{
if
(
Redis
::
get
(
$data
[
'id'
])
==
''
)
{
if
(
Redis
::
get
(
$data
[
'id'
])
==
''
)
{
if
(
$data
[
'status'
]
!=
1
||
$data
[
'status'
]
!=
0
)
{
if
(
$data
[
'status'
]
>
1
)
{
$sms
=
new
SmsailiyunController
();
$sms
=
new
SmsailiyunController
();
$code1
=
json_encode
(
$sms
->
sendSms
());
$code1
=
json_encode
(
$sms
->
sendSms
());
$code
=
json_decode
(
$code1
,
true
);
$code
=
json_decode
(
$code1
,
true
);
...
@@ -127,6 +127,7 @@ class ZehongTcpController extends Controller
...
@@ -127,6 +127,7 @@ class ZehongTcpController extends Controller
}
}
}
else
{
}
else
{
if
(
$data
[
'status'
]
==
1
||
$data
[
'status'
]
==
0
)
{
if
(
$data
[
'status'
]
==
1
||
$data
[
'status'
]
==
0
)
{
Log
::
channel
(
'slack'
)
->
info
(
'设备正常 =>'
.
''
.
'设备号=>'
.
$data
[
'id'
]);
Redis
::
del
(
$data
[
'id'
]);
Redis
::
del
(
$data
[
'id'
]);
}
}
}
}
...
...
resources/js/views/map/index.vue
View file @
56128736
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
width=
"35%"
width=
"35%"
:modal=
"false"
:modal=
"false"
top=
"20vh"
top=
"20vh"
custom-class=
"zero-dialog
"
:custom-class=
"dialogClass
"
>
>
<el-table
:data=
"gridData"
:show-header=
"false"
>
<el-table
:data=
"gridData"
:show-header=
"false"
>
<el-table-column
property=
"title"
width=
"180px"
></el-table-column>
<el-table-column
property=
"title"
width=
"180px"
></el-table-column>
...
@@ -209,6 +209,7 @@ export default {
...
@@ -209,6 +209,7 @@ export default {
data
(){
data
(){
const
_this
=
this
;
const
_this
=
this
;
return
{
return
{
dialogClass
:
'zero-dialog'
,
leftDeviceListVisible
:
true
,
leftDeviceListVisible
:
true
,
markersGoodsVisible
:
false
,
markersGoodsVisible
:
false
,
markersGoods
:
[{
markersGoods
:
[{
...
@@ -388,12 +389,17 @@ export default {
...
@@ -388,12 +389,17 @@ export default {
},
},
// 获取设备详细信息
// 获取设备详细信息
getUserDeviceInfo
(
id
)
{
getUserDeviceInfo
(
id
)
{
this
.
dialogClass
=
'zero-dialog'
;
deviceinfo
(
id
)
deviceinfo
(
id
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
deviceInfo
=
res
.
data
;
const
deviceInfo
=
res
.
data
;
console
.
log
(
deviceInfo
);
this
.
center
=
deviceInfo
.
devicecoord
.
replace
(
/
\s
*/g
,
''
).
split
(
','
);
this
.
center
=
deviceInfo
.
devicecoord
.
replace
(
/
\s
*/g
,
''
).
split
(
','
);
this
.
dialogTableVisible
=
true
;
this
.
dialogTableVisible
=
true
;
this
.
markersDeviceVisible
=
true
;
this
.
markersDeviceVisible
=
true
;
if
(
deviceInfo
.
devicepolice
===
4
||
deviceInfo
.
devicepolice
===
5
||
deviceInfo
.
devicepolice
===
6
)
{
this
.
dialogClass
+=
' device-box-fade-alarm'
;
}
this
.
gridData
=
[
this
.
gridData
=
[
{
{
title
:
'设备编号'
,
title
:
'设备编号'
,
...
@@ -596,4 +602,34 @@ export default {
...
@@ -596,4 +602,34 @@ export default {
right
:
1px
;
right
:
1px
;
bottom
:
1px
;
bottom
:
1px
;
}
}
@keyframes
fade
{
from
{
opacity
:
1.0
;
}
50
%
{
opacity
:
1.0
;
background-color
:
red
;
}
to
{
opacity
:
1.0
;
}
}
@-webkit-keyframes
fade
{
from
{
opacity
:
1.0
;
}
50
%
{
opacity
:
1.0
;
background-color
:
red
;
}
to
{
opacity
:
1.0
;
}
}
.device-box-fade-alarm
.el-dialog__header
{
animation
:
fade
600ms
infinite
;
-webkit-animation
:
fade
600ms
infinite
;
}
</
style
>
</
style
>
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