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
a17c2317
Commit
a17c2317
authored
Jul 22, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备信息 gengdidi
parent
afd434b8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
284 additions
and
211 deletions
+284
-211
TPipeController.java
...ava/com/zehong/web/controller/device/TPipeController.java
+8
-0
pipe.js
gassafety-web/src/api/device/pipe.js
+9
-0
zhibaorenyuan.png
gassafety-web/src/assets/images/zhibaorenyuan.png
+0
-0
dutyPerson.vue
gassafety-web/src/components/PopWindow/dutyPerson.vue
+0
-60
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+80
-45
regulatorBox.vue
gassafety-web/src/components/PopWindow/regulatorBox.vue
+81
-43
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+81
-43
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+25
-17
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+0
-3
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/device/TPipeController.java
View file @
a17c2317
...
@@ -39,6 +39,14 @@ public class TPipeController extends BaseController
...
@@ -39,6 +39,14 @@ public class TPipeController extends BaseController
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
@GetMapping
(
"/pipeAllInfoList"
)
public
AjaxResult
pipeAllInfoList
(
TPipe
tPipe
)
{
List
<
TPipe
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
return
AjaxResult
.
success
(
list
);
}
/**
/**
* 导出管道信息列表
* 导出管道信息列表
*/
*/
...
...
gassafety-web/src/api/device/pipe.js
View file @
a17c2317
...
@@ -9,6 +9,15 @@ export function listPipe(query) {
...
@@ -9,6 +9,15 @@ export function listPipe(query) {
})
})
}
}
// 查询管道信息列表
export
function
pipeAllInfoList
(
query
)
{
return
request
({
url
:
'/device/pipe/pipeAllInfoList'
,
method
:
'get'
,
params
:
query
})
}
// 查询管道信息详细
// 查询管道信息详细
export
function
getPipe
(
pipeId
)
{
export
function
getPipe
(
pipeId
)
{
return
request
({
return
request
({
...
...
gassafety-web/src/assets/images/zhibaorenyuan.png
0 → 100644
View file @
a17c2317
1 KB
gassafety-web/src/components/PopWindow/dutyPerson.vue
deleted
100644 → 0
View file @
afd434b8
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"80%"
:before-close=
"handleClose"
>
<el-form
ref=
"editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini"
>
<el-form-item
label=
"所属燃气公司"
prop=
"a"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"d"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"e"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"备注信息"
prop=
"l"
>
<el-input
type=
"textarea"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
}
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
},
hide
()
{
this
.
remove
()
},
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
</
script
>
gassafety-web/src/components/PopWindow/flowMeter.vue
View file @
a17c2317
<
template
>
<
template
>
<el-dialog
<el-dialog
:title=
"title"
:title=
"title"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"80%"
width=
"80%"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<el-form
ref=
"
editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini
"
>
<el-form
ref=
"
form"
:model=
"form"
:rules=
"rules"
label-width=
"135px
"
>
<el-form-item
label=
"所属
燃气公司"
prop=
"enterpriseId
"
>
<el-form-item
label=
"所属
管道"
prop=
"pipeCode
"
>
<el-input
v-model=
"
editForm.enterpriseId"
></el-input
>
<el-input
v-model=
"
form.pipeCode"
placeholder=
"请输入所属管道"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"deviceName"
>
<el-form-item
label=
"
设备
名称"
prop=
"deviceName"
>
<el-input
v-model=
"
editForm.deviceName"
></el-input
>
<el-input
v-model=
"
form.deviceName"
placeholder=
"请输入设备名称"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"deviceAddr"
>
<el-form-item
label=
"
所在
地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
editForm.deviceAddr"
></el-input
>
<el-input
v-model=
"
form.deviceAddr"
placeholder=
"请输入所在地址"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
所属管道"
prop=
"pipeId
"
>
<el-form-item
label=
"
设备型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"
editForm.pipeId"
></el-input
>
<el-input
v-model=
"
form.deviceModel"
placeholder=
"请输入设备型号"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
联系人"
prop=
"linkman
"
>
<el-form-item
label=
"
经度"
prop=
"longitude
"
>
<el-input
v-model=
"
editForm.linkman"
></el-input
>
<el-input
v-model=
"
form.longitude"
placeholder=
"请输入经度"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
电话"
prop=
"phon
e"
>
<el-form-item
label=
"
纬度"
prop=
"latitud
e"
>
<el-input
v-model=
"
editForm.phone"
></el-input
>
<el-input
v-model=
"
form.latitude"
placeholder=
"请输入纬度"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
型号"
prop=
"deviceModel
"
>
<el-form-item
label=
"
物联网编号"
prop=
"iotNo
"
>
<el-input
v-model=
"editForm.deviceModel"
></el-input
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"经纬度"
prop=
"deviceModel"
>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<el-row>
<FileUpload
:fileArr=
"fileList"
@
resFun=
"getFileInfo"
/>
<el-col
:span=
"6"
style=
"margin-right: 10px"
>
<el-input
v-model=
"editForm.longitude"
></el-input>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model=
"editForm.latitude"
></el-input>
</el-col>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-col
:span=
"11"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.installationTime"
style=
"width: 100%;"
></el-date-picker>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"最后巡检日期"
prop=
"inspectionTime"
>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-col
:span=
"11"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入电话"
/>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.inspectionTime"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
</el-col>
<el-form-item
label=
"安装时间"
prop=
"installationTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.installationTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择安装时间"
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注
信息
"
prop=
"remarks"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"editForm.remarks"
></el-input
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
submitForm
"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
export
default
{
props
:
{
props
:
{
title
:
{
type
:
String
}
title
:
{
type
:
String
}
},
},
data
()
{
data
()
{
return
{
return
{
// isShow: false,
form
:
{
editForm
:
{},
deviceType
:
"1"
dialogVisible
:
false
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
}
}
},
},
components
:
{
FileUpload
,
},
methods
:
{
methods
:
{
show
()
{
show
()
{
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
...
@@ -77,13 +91,34 @@
...
@@ -77,13 +91,34 @@
hide
()
{
hide
()
{
this
.
remove
()
this
.
remove
()
},
},
getFileInfo
(
res
){
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
}
});
}
}
});
},
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
done
();
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
}
}
}
...
...
gassafety-web/src/components/PopWindow/regulatorBox.vue
View file @
a17c2317
<
template
>
<
template
>
<el-dialog
<el-dialog
:title=
"title"
:title=
"title"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"80%"
width=
"80%"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<el-form
ref=
"
editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini
"
>
<el-form
ref=
"
form"
:model=
"form"
:rules=
"rules"
label-width=
"135px
"
>
<el-form-item
label=
"所属
燃气公司"
prop=
"enterpriseId
"
>
<el-form-item
label=
"所属
管道"
prop=
"pipeCode
"
>
<el-input
v-model=
"
editForm.enterpriseId"
></el-input
>
<el-input
v-model=
"
form.pipeCode"
placeholder=
"请输入所属管道"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"deviceName"
>
<el-form-item
label=
"
设备
名称"
prop=
"deviceName"
>
<el-input
v-model=
"
editForm.deviceName"
></el-input
>
<el-input
v-model=
"
form.deviceName"
placeholder=
"请输入设备名称"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"deviceAddr"
>
<el-form-item
label=
"
所在
地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
editForm.deviceAddr"
></el-input
>
<el-input
v-model=
"
form.deviceAddr"
placeholder=
"请输入所在地址"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
联系人"
prop=
"linkman
"
>
<el-form-item
label=
"
设备型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"
editForm.linkman"
></el-input
>
<el-input
v-model=
"
form.deviceModel"
placeholder=
"请输入设备型号"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<el-input
v-model=
"editForm.phone"
></el-input>
<el-input
v-model=
"form.longitude"
placeholder=
"请输入经度"
/>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"latitude"
>
<el-input
v-model=
"form.latitude"
placeholder=
"请输入纬度"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
型号"
prop=
"deviceModel
"
>
<el-form-item
label=
"
物联网编号"
prop=
"iotNo
"
>
<el-input
v-model=
"editForm.deviceModel"
></el-input
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"经纬度"
prop=
"deviceModel"
>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<el-row>
<FileUpload
:fileArr=
"fileList"
@
resFun=
"getFileInfo"
/>
<el-col
:span=
"6"
style=
"margin-right: 10px"
>
<el-input
v-model=
"editForm.longitude"
></el-input>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model=
"editForm.latitude"
></el-input>
</el-col>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-col
:span=
"11"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.installationTime"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
</el-col>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入电话"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"最后巡检日期"
prop=
"inspectionTime"
>
<el-form-item
label=
"安装时间"
prop=
"installationTime"
>
<el-col
:span=
"11"
>
<el-date-picker
clearable
size=
"small"
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.inspectionTime"
style=
"width: 100%;"
></el-date-picker>
v-model=
"form.installationTime"
</el-col>
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择安装时间"
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注
信息
"
prop=
"remarks"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"editForm.remarks"
></el-input
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
submitForm
"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
export
default
{
props
:
{
props
:
{
title
:
{
type
:
String
}
title
:
{
type
:
String
}
},
},
data
()
{
data
()
{
return
{
return
{
// isShow: false,
form
:
{
editForm
:
{},
deviceType
:
"1"
dialogVisible
:
false
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
}
}
},
},
components
:
{
FileUpload
,
},
methods
:
{
methods
:
{
show
()
{
show
()
{
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
...
@@ -74,13 +91,34 @@
...
@@ -74,13 +91,34 @@
hide
()
{
hide
()
{
this
.
remove
()
this
.
remove
()
},
},
getFileInfo
(
res
){
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
}
});
}
}
});
},
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
done
();
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
}
}
}
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
a17c2317
<
template
>
<
template
>
<el-dialog
<el-dialog
:title=
"title"
:title=
"title"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"80%"
width=
"80%"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<el-form
ref=
"
editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini
"
>
<el-form
ref=
"
form"
:model=
"form"
:rules=
"rules"
label-width=
"135px
"
>
<el-form-item
label=
"所属
燃气公司"
prop=
"enterpriseId
"
>
<el-form-item
label=
"所属
管道"
prop=
"pipeCode
"
>
<el-input
v-model=
"
editForm.enterpriseId"
></el-input
>
<el-input
v-model=
"
form.pipeCode"
placeholder=
"请输入所属管道"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"deviceName"
>
<el-form-item
label=
"
设备
名称"
prop=
"deviceName"
>
<el-input
v-model=
"
editForm.deviceName"
></el-input
>
<el-input
v-model=
"
form.deviceName"
placeholder=
"请输入设备名称"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"deviceAddr"
>
<el-form-item
label=
"
所在
地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
editForm.deviceAddr"
></el-input
>
<el-input
v-model=
"
form.deviceAddr"
placeholder=
"请输入所在地址"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
联系人"
prop=
"linkman
"
>
<el-form-item
label=
"
设备型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"
editForm.linkman"
></el-input
>
<el-input
v-model=
"
form.deviceModel"
placeholder=
"请输入设备型号"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<el-input
v-model=
"editForm.phone"
></el-input>
<el-input
v-model=
"form.longitude"
placeholder=
"请输入经度"
/>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"latitude"
>
<el-input
v-model=
"form.latitude"
placeholder=
"请输入纬度"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
型号"
prop=
"deviceModel
"
>
<el-form-item
label=
"
物联网编号"
prop=
"iotNo
"
>
<el-input
v-model=
"editForm.deviceModel"
></el-input
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"经纬度"
prop=
"deviceModel"
>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<el-row>
<FileUpload
:fileArr=
"fileList"
@
resFun=
"getFileInfo"
/>
<el-col
:span=
"6"
style=
"margin-right: 10px"
>
<el-input
v-model=
"editForm.longitude"
></el-input>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model=
"editForm.latitude"
></el-input>
</el-col>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-col
:span=
"11"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.installationTime"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
</el-col>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入电话"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"最后巡检日期"
prop=
"inspectionTime"
>
<el-form-item
label=
"安装时间"
prop=
"installationTime"
>
<el-col
:span=
"11"
>
<el-date-picker
clearable
size=
"small"
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.inspectionTime"
style=
"width: 100%;"
></el-date-picker>
v-model=
"form.installationTime"
</el-col>
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择安装时间"
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注
信息
"
prop=
"remarks"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"editForm.remarks"
></el-input
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
submitForm
"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
export
default
{
props
:
{
props
:
{
title
:
{
type
:
String
}
title
:
{
type
:
String
}
},
},
data
()
{
data
()
{
return
{
return
{
// isShow: false,
form
:
{
editForm
:
{},
deviceType
:
"1"
dialogVisible
:
false
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
}
}
},
},
components
:
{
FileUpload
,
},
methods
:
{
methods
:
{
show
()
{
show
()
{
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
...
@@ -74,13 +91,34 @@
...
@@ -74,13 +91,34 @@
hide
()
{
hide
()
{
this
.
remove
()
this
.
remove
()
},
},
getFileInfo
(
res
){
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
}
});
}
}
});
},
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
done
();
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
}
}
}
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
a17c2317
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
;
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
dutyPerson
from
"../components/PopWindow/dutyPerson.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
lineInfoWindow
from
"../components/PopWindow/lineInfoWindow.vue"
;
import
lineInfoWindow
from
"../components/PopWindow/lineInfoWindow.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
markerInfoWindow
from
"../components/PopWindow/markerInfoWindow.vue"
;
import
markerInfoWindow
from
"../components/PopWindow/markerInfoWindow.vue"
;
import
vue
from
"../main"
;
import
vue
from
"../main"
;
let
defaultCenter
=
"石家庄"
;
let
defaultCenter
=
"石家庄"
;
...
@@ -111,14 +111,17 @@ class gaodeMap {
...
@@ -111,14 +111,17 @@ class gaodeMap {
this
.
setMarkerIcon
(
marker
);
this
.
setMarkerIcon
(
marker
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
setExtData
(
data
);
that
.
deviceType
=
markerType
;
that
.
deviceType
=
markerType
;
let
editWindow
=
that
.
createInfowindow
();
let
editWindow
=
that
.
createInfowindow
();
marker
.
on
(
"click"
,
function
(
e
)
{
marker
.
on
(
"click"
,
function
(
e
)
{
if
(
"edit"
==
that
.
mapOperateType
)
{
if
(
"edit"
==
that
.
mapOperateType
)
{
editWindow
.
form
=
e
.
target
.
getExtData
();
editWindow
.
show
();
editWindow
.
show
();
}
else
if
(
"delete"
==
that
.
mapOperateType
)
{
}
else
if
(
"delete"
==
that
.
mapOperateType
)
{
if
(
confirm
(
"确认删除"
)
==
true
)
{
if
(
confirm
(
"确认删除"
)
==
true
)
{
map
.
remove
(
marker
);
map
.
remove
(
marker
);
that
.
deleteMarker
(
markerType
,
data
.
deviceId
);
}
}
}
else
{
}
else
{
map
.
setZoomAndCenter
(
13
,
e
.
target
.
getPosition
());
map
.
setZoomAndCenter
(
13
,
e
.
target
.
getPosition
());
...
@@ -130,9 +133,8 @@ class gaodeMap {
...
@@ -130,9 +133,8 @@ class gaodeMap {
}
}
});
});
marker
.
on
(
"dragend"
,
function
(
e
)
{
marker
.
on
(
"dragend"
,
function
(
e
)
{
editWindow
.
editForm
.
longitude
=
e
.
lnglat
.
lng
;
editWindow
.
form
.
longitude
=
e
.
lnglat
.
lng
;
editWindow
.
editForm
.
latitude
=
e
.
lnglat
.
lat
;
editWindow
.
form
.
latitude
=
e
.
lnglat
.
lat
;
console
.
log
(
e
.
lnglat
,
"rrrr===="
);
});
});
this
.
markers
.
push
(
marker
);
this
.
markers
.
push
(
marker
);
map
.
setZoom
(
"11"
);
map
.
setZoom
(
"11"
);
...
@@ -216,12 +218,21 @@ class gaodeMap {
...
@@ -216,12 +218,21 @@ class gaodeMap {
case
DEVICE_TYPE
.
FLOWMETER
:{
case
DEVICE_TYPE
.
FLOWMETER
:{
return
html
;
return
html
;
}
}
case
DEVICE_TYPE
.
DUTYPERSON
:{
return
html
;
}
}
}
}
}
/**
* 删除marker
* @param delType
* @param deviceId
*/
deleteMarker
(
delType
,
deviceId
){
if
(
DEVICE_TYPE
.
REGEULATORBOX
==
delType
||
DEVICE_TYPE
.
VALUEWELL
==
delType
||
DEVICE_TYPE
.
FLOWMETER
==
delType
){
delDeviceInfo
(
deviceId
);
}
}
/**
/**
* 设置设备图标
* 设置设备图标
* @param marker
* @param marker
...
@@ -255,7 +266,7 @@ class gaodeMap {
...
@@ -255,7 +266,7 @@ class gaodeMap {
case
DEVICE_TYPE
.
DUTYPERSON
:
{
case
DEVICE_TYPE
.
DUTYPERSON
:
{
let
icon
=
new
AMap
.
Icon
({
let
icon
=
new
AMap
.
Icon
({
//size: new AMap.Size(51, 23),
//size: new AMap.Size(51, 23),
image
:
require
(
"../assets/images/
tiaoyaxiang
.png"
),
image
:
require
(
"../assets/images/
zhibaorenyuan
.png"
),
});
});
marker
.
setIcon
(
icon
);
marker
.
setIcon
(
icon
);
break
;
break
;
...
@@ -480,10 +491,13 @@ class gaodeMap {
...
@@ -480,10 +491,13 @@ class gaodeMap {
this
.
mouseTool
.
on
(
"draw"
,
function
(
e
)
{
this
.
mouseTool
.
on
(
"draw"
,
function
(
e
)
{
if
(
e
.
obj
.
getExtData
().
type
!=
"newLine"
)
{
if
(
e
.
obj
.
getExtData
().
type
!=
"newLine"
)
{
const
device
=
that
.
createInfowindow
();
const
device
=
that
.
createInfowindow
();
device
.
map
=
map
;
device
.
obj
=
e
.
obj
;
device
.
gaoMap
=
that
;
e
.
obj
.
on
(
"click"
,
function
(
aa
)
{
e
.
obj
.
on
(
"click"
,
function
(
aa
)
{
let
postion
=
aa
.
target
.
_position
;
let
postion
=
aa
.
target
.
_position
;
device
.
editF
orm
.
longitude
=
postion
.
lng
;
device
.
f
orm
.
longitude
=
postion
.
lng
;
device
.
editF
orm
.
latitude
=
postion
.
lat
;
device
.
f
orm
.
latitude
=
postion
.
lat
;
device
.
show
();
device
.
show
();
});
});
}
}
...
@@ -525,11 +539,6 @@ class gaodeMap {
...
@@ -525,11 +539,6 @@ class gaodeMap {
title
:
"流量计"
title
:
"流量计"
});
});
}
}
case
DEVICE_TYPE
.
DUTYPERSON
:
{
return
createPop
(
dutyPerson
,
{
title
:
"值班人员"
});
}
}
}
}
}
...
@@ -543,8 +552,7 @@ class gaodeMap {
...
@@ -543,8 +552,7 @@ class gaodeMap {
if
(
if
(
DEVICE_TYPE
.
REGEULATORBOX
==
deviceType
||
DEVICE_TYPE
.
REGEULATORBOX
==
deviceType
||
DEVICE_TYPE
.
VALUEWELL
==
deviceType
||
DEVICE_TYPE
.
VALUEWELL
==
deviceType
||
DEVICE_TYPE
.
FLOWMETER
==
deviceType
||
DEVICE_TYPE
.
FLOWMETER
==
deviceType
DEVICE_TYPE
.
DUTYPERSON
==
deviceType
)
{
)
{
that
.
mouseTool
.
marker
({
that
.
mouseTool
.
marker
({
draggable
:
true
draggable
:
true
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
a17c2317
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
<el-option
label=
"调压箱"
value=
"2"
></el-option>
<el-option
label=
"调压箱"
value=
"2"
></el-option>
<el-option
label=
"阀门井"
value=
"3"
></el-option>
<el-option
label=
"阀门井"
value=
"3"
></el-option>
<el-option
label=
"流量计"
value=
"4"
></el-option>
<el-option
label=
"流量计"
value=
"4"
></el-option>
<el-option
label=
"值班人员"
value=
"5"
></el-option>
</el-select>
</el-select>
</div>
</div>
</
template
>
</
template
>
...
@@ -61,8 +60,6 @@ export default {
...
@@ -61,8 +60,6 @@ export default {
value
:
""
,
value
:
""
,
operateType
:
""
,
operateType
:
""
,
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
enterpriseId
:
null
,
enterpriseId
:
null
,
pipeId
:
null
,
pipeId
:
null
,
deviceName
:
null
,
deviceName
:
null
,
...
...
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