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
effb6f6f
Commit
effb6f6f
authored
Dec 07, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图增加切断装置
parent
cd47bb4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
+62
-2
2020_12_07_132116_add_shut_off_to_device_table.php
...ations/2020_12_07_132116_add_shut_off_to_device_table.php
+34
-0
index.vue
resources/js/views/map/index.vue
+28
-2
No files found.
database/migrations/2020_12_07_132116_add_shut_off_to_device_table.php
0 → 100644
View file @
effb6f6f
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddShutOffToDeviceTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'device'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'shutoff_status'
)
->
default
(
0
)
->
comment
(
'切断装置状态,0初始化状态,1开启,2关闭'
);
$table
->
integer
(
'shutoff_type'
)
->
default
(
0
)
->
comment
(
'切断装置类型,0未绑定,1电磁阀,2机械手'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'device'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'shutoff_status'
);
$table
->
dropColumn
(
'shutoff_type'
);
});
}
}
resources/js/views/map/index.vue
View file @
effb6f6f
...
...
@@ -54,7 +54,7 @@
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogTableVisible"
width=
"
2
0%"
width=
"
4
0%"
:modal=
"false"
custom-class=
"zero-dialog"
>
...
...
@@ -70,7 +70,7 @@
<template
slot=
"title"
>
设备列表 -
{{
leftDeviceName
}}
</
template
>
<el-table
:data=
"markersDevice"
style=
"100%"
max-height=
"700"
>
<el-table
:data=
"markersDevice"
style=
"100%"
max-height=
"700"
@
row-click=
"openDeviceBox"
>
<el-table-column
property=
"devicenum"
label=
"设备编号"
width=
"200px"
></el-table-column>
<el-table-column
property=
"deviceinfo"
label=
"位置"
width=
"200px"
></el-table-column>
<el-table-column
property=
"nd"
label=
"值"
width=
"40px"
></el-table-column>
...
...
@@ -322,6 +322,14 @@ export default {
title
:
'检测介质'
,
content
:
deviceInfo
.
gas
,
},
{
title
:
'切断装置'
,
content
:
this
.
shutoffDevice
(
deviceInfo
.
shutoff_type
),
},
{
title
:
'切断装置状态'
,
content
:
this
.
shutoffStatus
(
deviceInfo
.
shutoff_status
),
},
{
title
:
'状态'
,
content
:
deviceInfo
.
status_name
,
...
...
@@ -341,6 +349,24 @@ export default {
];
});
},
// 切断装置
shutoffDevice
(
id
)
{
const
shutoff_types
=
[];
shutoff_types
[
0
]
=
'未绑定'
;
shutoff_types
[
1
]
=
'电磁阀'
;
shutoff_types
[
2
]
=
'机械手'
;
return
shutoff_types
[
id
];
},
shutoffStatus
(
id
)
{
const
shutoff
=
[];
shutoff
[
0
]
=
'初始化'
;
shutoff
[
1
]
=
'开启'
;
shutoff
[
2
]
=
'关闭'
;
return
shutoff
[
id
];
},
openDeviceBox
(
row
,
column
,
event
)
{
this
.
getUserDeviceInfo
(
row
.
id
);
},
},
};
</
script
>
...
...
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