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
cdc68b51
Commit
cdc68b51
authored
Jul 22, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/gassafety
parents
c31e231e
f433d7b1
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 @
cdc68b51
...
...
@@ -39,6 +39,14 @@ public class TPipeController extends BaseController
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 @
cdc68b51
...
...
@@ -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
)
{
return
request
({
...
...
gassafety-web/src/assets/images/zhibaorenyuan.png
0 → 100644
View file @
cdc68b51
1 KB
gassafety-web/src/components/PopWindow/dutyPerson.vue
deleted
100644 → 0
View file @
c31e231e
<
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 @
cdc68b51
<
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=
"enterpriseId
"
>
<el-input
v-model=
"
editForm.enterpriseId"
></el-input
>
<el-form
ref=
"
form"
:model=
"form"
:rules=
"rules"
label-width=
"135px
"
>
<el-form-item
label=
"所属
管道"
prop=
"pipeCode
"
>
<el-input
v-model=
"
form.pipeCode"
placeholder=
"请输入所属管道"
/
>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"deviceName"
>
<el-input
v-model=
"
editForm.deviceName"
></el-input
>
<el-form-item
label=
"
设备
名称"
prop=
"deviceName"
>
<el-input
v-model=
"
form.deviceName"
placeholder=
"请输入设备名称"
/
>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
editForm.deviceAddr"
></el-input
>
<el-form-item
label=
"
所在
地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
form.deviceAddr"
placeholder=
"请输入所在地址"
/
>
</el-form-item>
<el-form-item
label=
"
所属管道"
prop=
"pipeId
"
>
<el-input
v-model=
"
editForm.pipeId"
></el-input
>
<el-form-item
label=
"
设备型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"
form.deviceModel"
placeholder=
"请输入设备型号"
/
>
</el-form-item>
<el-form-item
label=
"
联系人"
prop=
"linkman
"
>
<el-input
v-model=
"
editForm.linkman"
></el-input
>
<el-form-item
label=
"
经度"
prop=
"longitude
"
>
<el-input
v-model=
"
form.longitude"
placeholder=
"请输入经度"
/
>
</el-form-item>
<el-form-item
label=
"
电话"
prop=
"phon
e"
>
<el-input
v-model=
"
editForm.phone"
></el-input
>
<el-form-item
label=
"
纬度"
prop=
"latitud
e"
>
<el-input
v-model=
"
form.latitude"
placeholder=
"请输入纬度"
/
>
</el-form-item>
<el-form-item
label=
"
型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"editForm.deviceModel"
></el-input
>
<el-form-item
label=
"
物联网编号"
prop=
"iotNo
"
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/
>
</el-form-item>
<el-form-item
label=
"经纬度"
prop=
"deviceModel"
>
<el-row>
<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
label=
"设备图片上传"
prop=
"iconUrl"
>
<FileUpload
:fileArr=
"fileList"
@
resFun=
"getFileInfo"
/>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.installationTime"
style=
"width: 100%;"
></el-date-picker>
</el-col>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
</el-form-item>
<el-form-item
label=
"最后巡检日期"
prop=
"inspectionTime"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.inspectionTime"
style=
"width: 100%;"
></el-date-picker>
</el-col>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入电话"
/>
</el-form-item>
<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
label=
"备注
信息
"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"editForm.remarks"
></el-input
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/
>
</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>
<el-button
type=
"primary"
@
click=
"
submitForm
"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
form
:
{
deviceType
:
"1"
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
}
},
components
:
{
FileUpload
,
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
...
...
@@ -77,13 +91,34 @@
hide
()
{
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
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
done
();
}
}
}
...
...
gassafety-web/src/components/PopWindow/regulatorBox.vue
View file @
cdc68b51
<
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=
"enterpriseId
"
>
<el-input
v-model=
"
editForm.enterpriseId"
></el-input
>
<el-form
ref=
"
form"
:model=
"form"
:rules=
"rules"
label-width=
"135px
"
>
<el-form-item
label=
"所属
管道"
prop=
"pipeCode
"
>
<el-input
v-model=
"
form.pipeCode"
placeholder=
"请输入所属管道"
/
>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"deviceName"
>
<el-input
v-model=
"
editForm.deviceName"
></el-input
>
<el-form-item
label=
"
设备
名称"
prop=
"deviceName"
>
<el-input
v-model=
"
form.deviceName"
placeholder=
"请输入设备名称"
/
>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
editForm.deviceAddr"
></el-input
>
<el-form-item
label=
"
所在
地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
form.deviceAddr"
placeholder=
"请输入所在地址"
/
>
</el-form-item>
<el-form-item
label=
"
联系人"
prop=
"linkman
"
>
<el-input
v-model=
"
editForm.linkman"
></el-input
>
<el-form-item
label=
"
设备型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"
form.deviceModel"
placeholder=
"请输入设备型号"
/
>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"editForm.phone"
></el-input>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<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
label=
"
型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"editForm.deviceModel"
></el-input
>
<el-form-item
label=
"
物联网编号"
prop=
"iotNo
"
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/
>
</el-form-item>
<el-form-item
label=
"经纬度"
prop=
"deviceModel"
>
<el-row>
<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
label=
"设备图片上传"
prop=
"iconUrl"
>
<FileUpload
:fileArr=
"fileList"
@
resFun=
"getFileInfo"
/>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.installationTime"
style=
"width: 100%;"
></el-date-picker>
</el-col>
<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=
"inspectionTime"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.inspectionTime"
style=
"width: 100%;"
></el-date-picker>
</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
label=
"备注
信息
"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"editForm.remarks"
></el-input
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/
>
</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>
<el-button
type=
"primary"
@
click=
"
submitForm
"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
form
:
{
deviceType
:
"1"
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
}
},
components
:
{
FileUpload
,
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
...
...
@@ -74,13 +91,34 @@
hide
()
{
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
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
done
();
}
}
}
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
cdc68b51
<
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=
"enterpriseId
"
>
<el-input
v-model=
"
editForm.enterpriseId"
></el-input
>
<el-form
ref=
"
form"
:model=
"form"
:rules=
"rules"
label-width=
"135px
"
>
<el-form-item
label=
"所属
管道"
prop=
"pipeCode
"
>
<el-input
v-model=
"
form.pipeCode"
placeholder=
"请输入所属管道"
/
>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"deviceName"
>
<el-input
v-model=
"
editForm.deviceName"
></el-input
>
<el-form-item
label=
"
设备
名称"
prop=
"deviceName"
>
<el-input
v-model=
"
form.deviceName"
placeholder=
"请输入设备名称"
/
>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
editForm.deviceAddr"
></el-input
>
<el-form-item
label=
"
所在
地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"
form.deviceAddr"
placeholder=
"请输入所在地址"
/
>
</el-form-item>
<el-form-item
label=
"
联系人"
prop=
"linkman
"
>
<el-input
v-model=
"
editForm.linkman"
></el-input
>
<el-form-item
label=
"
设备型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"
form.deviceModel"
placeholder=
"请输入设备型号"
/
>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"editForm.phone"
></el-input>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<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
label=
"
型号"
prop=
"deviceModel
"
>
<el-input
v-model=
"editForm.deviceModel"
></el-input
>
<el-form-item
label=
"
物联网编号"
prop=
"iotNo
"
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/
>
</el-form-item>
<el-form-item
label=
"经纬度"
prop=
"deviceModel"
>
<el-row>
<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
label=
"设备图片上传"
prop=
"iconUrl"
>
<FileUpload
:fileArr=
"fileList"
@
resFun=
"getFileInfo"
/>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"installationTime"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.installationTime"
style=
"width: 100%;"
></el-date-picker>
</el-col>
<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=
"inspectionTime"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"editForm.inspectionTime"
style=
"width: 100%;"
></el-date-picker>
</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
label=
"备注
信息
"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"editForm.remarks"
></el-input
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/
>
</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>
<el-button
type=
"primary"
@
click=
"
submitForm
"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
form
:
{
deviceType
:
"1"
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
}
},
components
:
{
FileUpload
,
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
...
...
@@ -74,13 +91,34 @@
hide
()
{
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
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
done
();
}
}
}
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
cdc68b51
...
...
@@ -2,9 +2,9 @@
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
dutyPerson
from
"../components/PopWindow/dutyPerson.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
lineInfoWindow
from
"../components/PopWindow/lineInfoWindow.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
markerInfoWindow
from
"../components/PopWindow/markerInfoWindow.vue"
;
import
vue
from
"../main"
;
let
defaultCenter
=
"石家庄"
;
...
...
@@ -111,14 +111,17 @@ class gaodeMap {
this
.
setMarkerIcon
(
marker
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
setExtData
(
data
);
that
.
deviceType
=
markerType
;
let
editWindow
=
that
.
createInfowindow
();
marker
.
on
(
"click"
,
function
(
e
)
{
if
(
"edit"
==
that
.
mapOperateType
)
{
editWindow
.
form
=
e
.
target
.
getExtData
();
editWindow
.
show
();
}
else
if
(
"delete"
==
that
.
mapOperateType
)
{
if
(
confirm
(
"确认删除"
)
==
true
)
{
map
.
remove
(
marker
);
that
.
deleteMarker
(
markerType
,
data
.
deviceId
);
}
}
else
{
map
.
setZoomAndCenter
(
13
,
e
.
target
.
getPosition
());
...
...
@@ -130,9 +133,8 @@ class gaodeMap {
}
});
marker
.
on
(
"dragend"
,
function
(
e
)
{
editWindow
.
editForm
.
longitude
=
e
.
lnglat
.
lng
;
editWindow
.
editForm
.
latitude
=
e
.
lnglat
.
lat
;
console
.
log
(
e
.
lnglat
,
"rrrr===="
);
editWindow
.
form
.
longitude
=
e
.
lnglat
.
lng
;
editWindow
.
form
.
latitude
=
e
.
lnglat
.
lat
;
});
this
.
markers
.
push
(
marker
);
map
.
setZoom
(
"11"
);
...
...
@@ -216,12 +218,21 @@ class gaodeMap {
case
DEVICE_TYPE
.
FLOWMETER
:{
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
...
...
@@ -255,7 +266,7 @@ class gaodeMap {
case
DEVICE_TYPE
.
DUTYPERSON
:
{
let
icon
=
new
AMap
.
Icon
({
//size: new AMap.Size(51, 23),
image
:
require
(
"../assets/images/
tiaoyaxiang
.png"
),
image
:
require
(
"../assets/images/
zhibaorenyuan
.png"
),
});
marker
.
setIcon
(
icon
);
break
;
...
...
@@ -480,10 +491,13 @@ class gaodeMap {
this
.
mouseTool
.
on
(
"draw"
,
function
(
e
)
{
if
(
e
.
obj
.
getExtData
().
type
!=
"newLine"
)
{
const
device
=
that
.
createInfowindow
();
device
.
map
=
map
;
device
.
obj
=
e
.
obj
;
device
.
gaoMap
=
that
;
e
.
obj
.
on
(
"click"
,
function
(
aa
)
{
let
postion
=
aa
.
target
.
_position
;
device
.
editF
orm
.
longitude
=
postion
.
lng
;
device
.
editF
orm
.
latitude
=
postion
.
lat
;
device
.
f
orm
.
longitude
=
postion
.
lng
;
device
.
f
orm
.
latitude
=
postion
.
lat
;
device
.
show
();
});
}
...
...
@@ -525,11 +539,6 @@ class gaodeMap {
title
:
"流量计"
});
}
case
DEVICE_TYPE
.
DUTYPERSON
:
{
return
createPop
(
dutyPerson
,
{
title
:
"值班人员"
});
}
}
}
...
...
@@ -543,8 +552,7 @@ class gaodeMap {
if
(
DEVICE_TYPE
.
REGEULATORBOX
==
deviceType
||
DEVICE_TYPE
.
VALUEWELL
==
deviceType
||
DEVICE_TYPE
.
FLOWMETER
==
deviceType
||
DEVICE_TYPE
.
DUTYPERSON
==
deviceType
DEVICE_TYPE
.
FLOWMETER
==
deviceType
)
{
that
.
mouseTool
.
marker
({
draggable
:
true
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
cdc68b51
...
...
@@ -45,7 +45,6 @@
<el-option
label=
"调压箱"
value=
"2"
></el-option>
<el-option
label=
"阀门井"
value=
"3"
></el-option>
<el-option
label=
"流量计"
value=
"4"
></el-option>
<el-option
label=
"值班人员"
value=
"5"
></el-option>
</el-select>
</div>
</
template
>
...
...
@@ -61,8 +60,6 @@ export default {
value
:
""
,
operateType
:
""
,
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
enterpriseId
:
null
,
pipeId
:
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