Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
74a73389
Commit
74a73389
authored
Aug 19, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备信息获取经纬度、管道信息获取坐标
parent
ae570df8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
651 additions
and
543 deletions
+651
-543
DeviceInfoVo.java
...c/main/java/com/zehong/system/domain/vo/DeviceInfoVo.java
+4
-4
PipeVo.java
...tem/src/main/java/com/zehong/system/domain/vo/PipeVo.java
+4
-4
index.vue
gassafety-web/src/views/device/deviceInfo/index.vue
+401
-293
index.vue
gassafety-web/src/views/device/pipe/index.vue
+242
-242
No files found.
gassafety-system/src/main/java/com/zehong/system/domain/vo/DeviceInfoVo.java
View file @
74a73389
...
...
@@ -79,13 +79,13 @@ public class DeviceInfoVo extends BaseEntity
private
String
phone
;
/** 安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
installationTime
;
/** 最后巡检时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inspectionTime
;
/** 是否删除 */
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/PipeVo.java
View file @
74a73389
...
...
@@ -63,13 +63,13 @@ public class PipeVo extends BaseEntity
private
String
iconUrl
;
/** 安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
installationTime
;
/** 最后巡检时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inspectionTime
;
/** 是否删除 */
...
...
gassafety-web/src/views/device/deviceInfo/index.vue
View file @
74a73389
...
...
@@ -133,20 +133,31 @@
/>
<!-- 添加或修改设备信息对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
append-to-body
@
close=
"cancel"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"所属管道"
prop=
"pipeId"
>
<el-select
v-model=
"form.pipeId"
placeholder=
"请选择所属管道"
clearable
size=
"small"
style=
"width: 600px"
>
<el-select
v-model=
"form.pipeId"
placeholder=
"请选择所属管道"
style=
"width: 100%"
>
<el-option
v-for=
"item in options"
:key=
"item.pipeId"
:label=
"item.pipeName"
:value=
"item.pipeId"
></el-option>
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"设备类型"
>
<el-select
v-model=
"form.deviceType"
placeholder=
"请选择设备类型"
style=
"width: 600px"
>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备编号"
prop=
"deviceCode"
>
<el-input
v-model=
"form.deviceCode"
placeholder=
"请输入设备编号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备类型"
prop=
"deviceType"
>
<el-select
v-model=
"form.deviceType"
placeholder=
"请选择设备类型"
style=
"width: 100%"
>
<el-option
v-for=
"dict in typeOptions"
:key=
"dict.dictValue"
...
...
@@ -155,34 +166,72 @@
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"设备编号"
prop=
"deviceCode"
>
<el-input
v-model=
"form.deviceCode"
placeholder=
"请输入设备编号"
style=
"width: 600px"
/>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
style=
"width: 600px"
/>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"物联网编号"
prop=
"iotNo"
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"23"
>
<el-form-item
label=
"所在地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"form.deviceAddr"
placeholder=
"请输入所在地址"
style=
"width: 600px
"
/>
<el-input
v-model=
"form.deviceAddr"
placeholder=
"请输入所在地址
"
/>
</el-form-item>
<el-form-item
label=
"经纬度"
>
</el-col>
<el-col
:span=
"23"
>
<el-form-item
label=
"经纬度坐标"
prop=
"longitude"
>
<el-row>
<el-col
:span=
"8"
>
<el-input
v-model
.
number=
"form.longitude"
placeholder=
"请输入经度"
/>
</el-col>
<el-col
:span=
"8
"
>
<el-col
:span=
"8"
style=
"margin-left: 10px
"
>
<el-input
v-model
.
number=
"form.latitude"
placeholder=
"请输入纬度"
/>
</el-col>
<el-col
:span=
"5
"
>
<el-col
:span=
"5"
style=
"margin-left: 10px
"
>
<el-button
type=
"primary"
plain
@
click=
"MapdialogFun"
>
选择经纬度
</el-button>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系电话"
prop=
"phone"
>
<el-input
type=
"number"
maxlength=
"12"
v-model=
"form.phone"
placeholder=
"请输入联系电话"
/>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<MyFileUpload
listType=
"picture-card"
...
...
@@ -190,44 +239,58 @@
@
remove=
"listRemove"
:fileArr=
"fileList"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.iconUrl"
></el-input>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入电话"
/>
</el-form-item>
<el-form-item
label=
"安装时间"
prop=
"installationTime"
>
</el-col>
<el-col>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-col
:span=
"11"
>
<el-date-picker
clearable
size=
"small"
style=
"width: 100%"
v-model=
"form.installationTime"
type=
"datetim
e"
value-format=
"yyyy-MM-dd HH:mm:ss
"
placeholder=
"选择安装时间
"
>
type=
"dat
e"
value-format=
"yyyy-MM-dd
"
placeholder=
"请选择安装日期
"
>
</el-date-picker>
</el-col>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-col>
<el-col
:span=
"23"
>
<el-form-item
label=
"备注信息"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入备注信息"
/>
</el-form-item>
</el-col>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- <Mapdialog v-if="loadmap" :dialogTableVisible="dialogTableVisible" @dialogcancelFun="dialogcancelFun" :slat="form.latitude" :slng="form.longitude" @confirm="qrFun" />-->
<Mapdialog
v-if=
"loadmap"
:dialogTableVisible=
"dialogTableVisible"
@
dialogcancelFun=
"dialogcancelFun"
:slat=
"form.latitude"
:slng=
"form.longitude"
@
confirmFun=
"confirmFun($event)"
></Mapdialog>
</div>
</template>
<
script
>
import
{
listDeviceInfo
,
getDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
,
exportDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
{
pipeAllInfoList
}
from
"@/api/device/pipe"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
// import Mapdialog from "@/components/maplnglat
.vue";
import
{
listDeviceInfo
,
getDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
,
exportDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
{
pipeAllInfoList
}
from
"@/api/device/pipe"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
Mapdialog
from
"@/components/mapDialog/checkDeviceLoaction
.vue"
;
export
default
{
export
default
{
name
:
"DeviceInfo"
,
components
:
{
MyFileUpload
,
Mapdialog
},
data
()
{
return
{
...
...
@@ -284,6 +347,43 @@ export default {
form
:
{},
// 表单校验
rules
:
{
pipeId
:
[
{
required
:
true
,
message
:
"请选择所属管道"
,
trigger
:
"blur"
},
],
deviceType
:
[
{
required
:
true
,
message
:
"请选择设备类型"
,
trigger
:
"blur"
},
],
deviceName
:
[
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
},
],
deviceCode
:
[
{
required
:
true
,
message
:
"请输入设备编号"
,
trigger
:
"blur"
},
],
deviceModel
:
[
{
required
:
true
,
message
:
"请输入设备型号"
,
trigger
:
"blur"
},
],
deviceAddr
:
[
{
required
:
true
,
message
:
"请输入所在地址"
,
trigger
:
"blur"
},
],
longitude
:
[
{
required
:
true
,
message
:
"请输入经纬度"
,
trigger
:
"blur"
},
],
iotNo
:
[
{
required
:
true
,
message
:
"请输入物联网编号"
,
trigger
:
"blur"
},
],
/*linkman: [
{ required: true, message: "请输入联系人", trigger: "blur" }
],
phone: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{ min: 11, max: 11, message: "长度11个数字", trigger: "blur" },
],
iconUrl: [
{ required: true, message: "请上传图片", trigger: "change" }
],
installationTime: [
{ required: true, message: "请选择日期", trigger: "change" },
],*/
}
};
},
...
...
@@ -307,22 +407,22 @@ export default {
this
.
form
.
iconUrl
=
res
.
url
;
},
listRemove
(
e
)
{
this
.
form
.
u
rl
=
""
;
this
.
form
.
iconU
rl
=
""
;
this
.
fileList
=
[];
},
// qr
Fun(res) {
//
//确认选择经纬度
//
this.form.longitude = res.lng;
//
this.form.latitude = res.lat;
//
},
//
MapdialogFun() {
//
this.loadmap = true;
//
this.dialogTableVisible = true;
//
},
//
dialogcancelFun() {
//
this.loadmap = false;
//
this.dialogTableVisible = false;
//
},
confirm
Fun
(
res
)
{
//确认选择经纬度
this
.
form
.
longitude
=
res
.
lng
;
this
.
form
.
latitude
=
res
.
lat
;
},
MapdialogFun
()
{
this
.
loadmap
=
true
;
this
.
dialogTableVisible
=
true
;
},
dialogcancelFun
()
{
this
.
loadmap
=
false
;
this
.
dialogTableVisible
=
false
;
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
@@ -373,7 +473,7 @@ export default {
pipeAllInfoList
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"添加
设备信息"
;
this
.
title
=
"新增
设备信息"
;
});
},
/** 修改按钮操作 */
...
...
@@ -385,14 +485,14 @@ export default {
const
deviceId
=
row
.
deviceId
||
this
.
ids
getDeviceInfo
(
deviceId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改设备信息"
;
});
if
(
this
.
form
.
iconUrl
)
{
this
.
fileList
.
push
({
url
:
this
.
form
.
iconUrl
,
});
}
this
.
open
=
true
;
this
.
title
=
"修改设备信息"
;
});
},
/** 提交按钮 */
submitForm
()
{
...
...
@@ -405,6 +505,7 @@ export default {
this
.
getList
();
});
}
else
{
console
.
log
(
this
.
form
,
"this.form"
);
addDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
...
...
@@ -454,11 +555,18 @@ export default {
})
},
}
};
};
</
script
>
<
style
>
.el-col
{
margin-left
:
0
;
margin-right
:
10px
;
.notice
{
background
:
white
;
position
:
fixed
;
top
:
102px
;
right
:
0
;
left
:
0
;
margin
:
auto
;
width
:
80%
;
height
:
80%
;
border
:
solid
1px
;
}
</
style
>
gassafety-web/src/views/device/pipe/index.vue
View file @
74a73389
...
...
@@ -243,11 +243,11 @@
</template>
<
script
>
import
{
listPipe
,
getPipe
,
addPipe
,
updatePipe
,
exportPipe
}
from
"@/api/device/pipe"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
//
import Mapdialog from "@/components/mapDialog/checkPipeLineLocation.vue";
import
{
listPipe
,
getPipe
,
addPipe
,
updatePipe
,
exportPipe
}
from
"@/api/device/pipe"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
Mapdialog
from
"@/components/mapDialog/checkPipeLineLocation.vue"
;
export
default
{
export
default
{
name
:
"Pipe"
,
components
:
{
MyFileUpload
,
...
...
@@ -280,6 +280,7 @@ export default {
// 地图
loadmap
:
false
,
dialogTableVisible
:
false
,
str
:
""
,
// 管道压力数据字典
pressureOptions
:
[],
// 查询参数
...
...
@@ -365,9 +366,8 @@ export default {
this
.
fileList
=
[];
},
confirmFun
(
res
)
{
//确认选择经纬度
this
.
form
.
longitude
=
res
.
lng
;
this
.
form
.
latitude
=
res
.
lat
;
//确认选择坐标
this
.
form
.
coordinates
=
res
;
},
MapdialogFun
()
{
this
.
loadmap
=
true
;
...
...
@@ -503,7 +503,7 @@ export default {
})
},
}
};
};
</
script
>
<
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