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
3c2710a6
Commit
3c2710a6
authored
Aug 04, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.61.77.35:9999/gengdidi/gassafety
into master
parents
0841da97
105b1977
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1112 additions
and
252 deletions
+1112
-252
TDeviceInfoController.java
...m/zehong/web/controller/device/TDeviceInfoController.java
+17
-0
TInspectionPlanController.java
...ontroller/deviceInspection/TInspectionPlanController.java
+1
-0
TInspectionPlan.java
...c/main/java/com/zehong/system/domain/TInspectionPlan.java
+16
-5
InspectionPlanVo.java
...in/java/com/zehong/system/domain/vo/InspectionPlanVo.java
+159
-0
ITDeviceInfoService.java
...n/java/com/zehong/system/service/ITDeviceInfoService.java
+8
-3
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+91
-4
TInspectionPlanServiceImpl.java
...ehong/system/service/impl/TInspectionPlanServiceImpl.java
+1
-0
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+2
-2
TInspectionPlanMapper.xml
...rc/main/resources/mapper/system/TInspectionPlanMapper.xml
+5
-1
deviceInfo.js
gassafety-web/src/api/device/deviceInfo.js
+8
-0
lineInfoWindow.vue
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
+1
-1
lineInfoWindow.vue
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
+248
-0
workerManView.vue
gassafety-web/src/components/PopWindowGis/workerManView.vue
+62
-21
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+94
-13
submitForm.js
gassafety-web/src/utils/submitForm.js
+25
-0
index.vue
...y-web/src/views/deviceInspection/inspectionPlan/index.vue
+333
-184
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+41
-18
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/device/TDeviceInfoController.java
View file @
3c2710a6
...
@@ -59,6 +59,23 @@ public class TDeviceInfoController extends BaseController
...
@@ -59,6 +59,23 @@ public class TDeviceInfoController extends BaseController
return
AjaxResult
.
success
(
tDeviceInfoService
.
buildDeviceTreeSelect
(
param
));
return
AjaxResult
.
success
(
tDeviceInfoService
.
buildDeviceTreeSelect
(
param
));
}
}
/**
* 获取设备树
*/
@GetMapping
(
"/deviceNodeTree"
)
public
AjaxResult
deviceNodeTree
()
throws
Exception
{
List
<
Map
<
Object
,
Object
>>
list
=
null
;
try
{
list
=
tDeviceInfoService
.
buildDeviceTree
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
"获取设备列表失败"
);
}
return
AjaxResult
.
success
(
list
);
}
/**
/**
* 导出设备信息列表
* 导出设备信息列表
*/
*/
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/deviceInspection/TInspectionPlanController.java
View file @
3c2710a6
...
@@ -3,6 +3,7 @@ package com.zehong.web.controller.deviceInspection;
...
@@ -3,6 +3,7 @@ package com.zehong.web.controller.deviceInspection;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TInspectionPlan.java
View file @
3c2710a6
...
@@ -28,14 +28,17 @@ public class TInspectionPlan extends BaseEntity
...
@@ -28,14 +28,17 @@ public class TInspectionPlan extends BaseEntity
@Excel
(
name
=
"工单id"
)
@Excel
(
name
=
"工单id"
)
private
String
orderId
;
private
String
orderId
;
/** 设备id */
private
String
deviceIds
;
/** 开始时间 */
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
startTime
;
private
Date
startTime
;
/** 结束时间 */
/** 结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
endTime
;
private
Date
endTime
;
/** 地址 */
/** 地址 */
...
@@ -84,6 +87,14 @@ public class TInspectionPlan extends BaseEntity
...
@@ -84,6 +87,14 @@ public class TInspectionPlan extends BaseEntity
return
orderId
;
return
orderId
;
}
}
public
String
getDeviceIds
()
{
return
deviceIds
;
}
public
void
setDeviceIds
(
String
deviceIds
)
{
this
.
deviceIds
=
deviceIds
;
}
public
void
setStartTime
(
Date
startTime
)
public
void
setStartTime
(
Date
startTime
)
{
{
this
.
startTime
=
startTime
;
this
.
startTime
=
startTime
;
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/InspectionPlanVo.java
0 → 100644
View file @
3c2710a6
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 巡检计划对象 t_inspection_plan
*
* @author zehong
* @date 2021-07-21
*/
public
class
InspectionPlanVo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 巡检计划id */
private
Integer
planId
;
/** 巡检计划名称 */
private
String
planName
;
/** 设备id */
private
String
deviceIds
;
/** 设备树列表 */
private
Map
<
Object
,
List
>
deviceList
;
/** 工单id */
private
String
orderId
;
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
startTime
;
/** 结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
endTime
;
/** 地址 */
private
String
address
;
/** 计划状态(0未下发,1已下发,2进行中,3已完成) */
private
String
planStatus
;
/** 是否作废(0正常,1作废) */
private
String
isDel
;
/** 计划描述 */
private
String
remarks
;
public
void
setPlanId
(
Integer
planId
)
{
this
.
planId
=
planId
;
}
public
Integer
getPlanId
()
{
return
planId
;
}
public
void
setPlanName
(
String
planName
)
{
this
.
planName
=
planName
;
}
public
String
getPlanName
()
{
return
planName
;
}
public
String
getDeviceIds
()
{
return
deviceIds
;
}
public
void
setDeviceIds
(
String
deviceIds
)
{
this
.
deviceIds
=
deviceIds
;
}
public
Map
<
Object
,
List
>
getDeviceList
()
{
return
deviceList
;
}
public
void
setDeviceList
(
Map
<
Object
,
List
>
deviceList
)
{
this
.
deviceList
=
deviceList
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
void
setPlanStatus
(
String
planStatus
)
{
this
.
planStatus
=
planStatus
;
}
public
String
getPlanStatus
()
{
return
planStatus
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
}
gassafety-system/src/main/java/com/zehong/system/service/ITDeviceInfoService.java
View file @
3c2710a6
...
@@ -3,10 +3,7 @@ package com.zehong.system.service;
...
@@ -3,10 +3,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.zehong.common.core.domain.TreeSelect
;
import
com.zehong.common.core.domain.entity.SysDept
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
/**
/**
* 设备信息Service接口
* 设备信息Service接口
...
@@ -40,6 +37,14 @@ public interface ITDeviceInfoService
...
@@ -40,6 +37,14 @@ public interface ITDeviceInfoService
*/
*/
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTreeSelect
(
Map
<
Object
,
List
>
param
);
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTreeSelect
(
Map
<
Object
,
List
>
param
);
/**
* 设备树
*
* @param
* @return 树结构列表
*/
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTree
()
throws
Exception
;
/**
/**
* 统计各设备类型的设备总数
* 统计各设备类型的设备总数
* @return
* @return
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
3c2710a6
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.zehong.common.core.domain.TreeSelect
;
import
com.zehong.common.core.domain.entity.SysDept
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.mapper.TPipeMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
/**
* 设备信息Service业务层处理
* 设备信息Service业务层处理
...
@@ -24,6 +21,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
...
@@ -24,6 +21,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
{
{
@Autowired
@Autowired
private
TDeviceInfoMapper
tDeviceInfoMapper
;
private
TDeviceInfoMapper
tDeviceInfoMapper
;
@Autowired
private
TPipeMapper
tPipeMapper
;
/**
/**
* 查询设备信息
* 查询设备信息
...
@@ -83,6 +82,94 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
...
@@ -83,6 +82,94 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
return
list
;
return
list
;
}
}
/**
* 设备树
*
* @param
* @return 树结构列表
*/
@Override
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTree
()
throws
Exception
{
List
<
TPipe
>
pipeList
=
tPipeMapper
.
selectTPipeList
(
new
TPipe
());
List
<
TDeviceInfo
>
deviceList
=
tDeviceInfoMapper
.
selectTDeviceInfoList
(
new
TDeviceInfo
());
List
<
Map
<
Object
,
Object
>>
treeNodeList
=
new
ArrayList
<>();
if
(
pipeList
.
size
()
!=
0
){
List
<
Map
<
Object
,
Object
>>
childNodeList
=
new
ArrayList
<>();
for
(
TPipe
pipe
:
pipeList
){
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
pipe
.
getPipeId
());
map
.
put
(
"level"
,
2
);
map
.
put
(
"name"
,
pipe
.
getPipeName
());
childNodeList
.
add
(
map
);
}
Map
<
Object
,
Object
>
treeNode
=
new
HashMap
<>();
treeNode
.
put
(
"id"
,
0
);
treeNode
.
put
(
"level"
,
1
);
treeNode
.
put
(
"name"
,
"管道"
);
treeNode
.
put
(
"childList"
,
childNodeList
);
treeNodeList
.
add
(
treeNode
);
}
if
(
deviceList
.
size
()
!=
0
)
{
List
<
Map
<
Object
,
Object
>>
childNodeList1
=
new
ArrayList
<>();
List
<
Map
<
Object
,
Object
>>
childNodeList2
=
new
ArrayList
<>();
List
<
Map
<
Object
,
Object
>>
childNodeList3
=
new
ArrayList
<>();
List
<
Map
<
Object
,
Object
>>
childNodeList4
=
new
ArrayList
<>();
for
(
TDeviceInfo
device
:
deviceList
)
{
Map
<
Object
,
Object
>
childNode
=
new
HashMap
<>();
childNode
.
put
(
"id"
,
device
.
getDeviceId
());
childNode
.
put
(
"level"
,
2
);
childNode
.
put
(
"name"
,
device
.
getDeviceName
());
if
(
"1"
.
equals
(
device
.
getDeviceType
()))
{
childNodeList1
.
add
(
childNode
);
}
else
if
(
"2"
.
equals
(
device
.
getDeviceType
()))
{
childNodeList2
.
add
(
childNode
);
}
else
if
(
"3"
.
equals
(
device
.
getDeviceType
()))
{
childNodeList3
.
add
(
childNode
);
}
else
if
(
"4"
.
equals
(
device
.
getDeviceType
())){
childNodeList4
.
add
(
childNode
);
}
}
Map
<
Object
,
Object
>
treeNode1
=
new
HashMap
<>();
treeNode1
.
put
(
"id"
,
1
);
treeNode1
.
put
(
"level"
,
1
);
treeNode1
.
put
(
"name"
,
"调压阀"
);
treeNode1
.
put
(
"childList"
,
childNodeList1
);
Map
<
Object
,
Object
>
treeNode2
=
new
HashMap
<>();
treeNode2
.
put
(
"id"
,
2
);
treeNode2
.
put
(
"level"
,
1
);
treeNode2
.
put
(
"name"
,
"阀门井"
);
treeNode2
.
put
(
"childList"
,
childNodeList2
);
Map
<
Object
,
Object
>
treeNode3
=
new
HashMap
<>();
treeNode3
.
put
(
"id"
,
3
);
treeNode3
.
put
(
"level"
,
1
);
treeNode3
.
put
(
"name"
,
"流量计"
);
treeNode3
.
put
(
"childList"
,
childNodeList3
);
Map
<
Object
,
Object
>
treeNode4
=
new
HashMap
<>();
treeNode4
.
put
(
"id"
,
4
);
treeNode4
.
put
(
"level"
,
1
);
treeNode4
.
put
(
"name"
,
"压力表"
);
treeNode4
.
put
(
"childList"
,
childNodeList4
);
treeNodeList
.
add
(
treeNode1
);
treeNodeList
.
add
(
treeNode2
);
treeNodeList
.
add
(
treeNode3
);
treeNodeList
.
add
(
treeNode4
);
}
return
treeNodeList
;
}
/**
/**
* 统计各设备类型的设备总数
* 统计各设备类型的设备总数
* @return
* @return
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TInspectionPlanServiceImpl.java
View file @
3c2710a6
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TInspectionPlanMapper
;
import
com.zehong.system.mapper.TInspectionPlanMapper
;
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
3c2710a6
...
@@ -7,6 +7,7 @@ import com.zehong.common.core.domain.entity.SysUser;
...
@@ -7,6 +7,7 @@ import com.zehong.common.core.domain.entity.SysUser;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.*
;
import
com.zehong.system.domain.*
;
import
com.zehong.system.domain.form.TWorkOrderForm
;
import
com.zehong.system.domain.form.TWorkOrderForm
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
import
com.zehong.system.domain.vo.OrderFeedbackVo
;
import
com.zehong.system.domain.vo.OrderFeedbackVo
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
com.zehong.system.mapper.*
;
import
com.zehong.system.mapper.*
;
...
@@ -289,9 +290,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
...
@@ -289,9 +290,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
plan
.
setUpdateTime
(
DateUtils
.
getNowDate
());
plan
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tInspectionPlanMapper
.
updateTInspectionPlan
(
plan
);
tInspectionPlanMapper
.
updateTInspectionPlan
(
plan
);
}
else
if
(
"0"
.
equals
(
tWorkOrder
.
getOrderStatus
())){
tWorkOrder
.
setUpdateTime
(
DateUtils
.
getNowDate
());
}
}
tWorkOrder
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tWorkOrderMapper
.
updateTWorkOrder
(
tWorkOrder
);
return
tWorkOrderMapper
.
updateTWorkOrder
(
tWorkOrder
);
}
}
...
...
gassafety-system/src/main/resources/mapper/system/TInspectionPlanMapper.xml
View file @
3c2710a6
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"planId"
column=
"plan_id"
/>
<result
property=
"planId"
column=
"plan_id"
/>
<result
property=
"planName"
column=
"plan_name"
/>
<result
property=
"planName"
column=
"plan_name"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"deviceIds"
column=
"device_ids"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"address"
column=
"address"
/>
...
@@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectTInspectionPlanVo"
>
<sql
id=
"selectTInspectionPlanVo"
>
select plan_id, plan_name, order_id, start_time, end_time, address, plan_status, is_del, update_time, create_time, remarks from t_inspection_plan
select plan_id, plan_name, order_id,
device_ids,
start_time, end_time, address, plan_status, is_del, update_time, create_time, remarks from t_inspection_plan
</sql>
</sql>
<select
id=
"selectTInspectionPlanList"
parameterType=
"InspectionPlanForm"
resultMap=
"TInspectionPlanResult"
>
<select
id=
"selectTInspectionPlanList"
parameterType=
"InspectionPlanForm"
resultMap=
"TInspectionPlanResult"
>
...
@@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"planName != null"
>
plan_name,
</if>
<if
test=
"planName != null"
>
plan_name,
</if>
<if
test=
"orderId != null"
>
order_id,
</if>
<if
test=
"orderId != null"
>
order_id,
</if>
<if
test=
"deviceIds != null"
>
device_ids,
</if>
<if
test=
"startTime != null"
>
start_time,
</if>
<if
test=
"startTime != null"
>
start_time,
</if>
<if
test=
"endTime != null"
>
end_time,
</if>
<if
test=
"endTime != null"
>
end_time,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"address != null"
>
address,
</if>
...
@@ -59,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -59,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"planName != null"
>
#{planName},
</if>
<if
test=
"planName != null"
>
#{planName},
</if>
<if
test=
"orderId != null"
>
#{orderId},
</if>
<if
test=
"orderId != null"
>
#{orderId},
</if>
<if
test=
"deviceIds != null"
>
#{deviceIds},
</if>
<if
test=
"startTime != null"
>
#{startTime},
</if>
<if
test=
"startTime != null"
>
#{startTime},
</if>
<if
test=
"endTime != null"
>
#{endTime},
</if>
<if
test=
"endTime != null"
>
#{endTime},
</if>
<if
test=
"address != null"
>
#{address},
</if>
<if
test=
"address != null"
>
#{address},
</if>
...
@@ -75,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -75,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"planName != null"
>
plan_name = #{planName},
</if>
<if
test=
"planName != null"
>
plan_name = #{planName},
</if>
<if
test=
"orderId != null"
>
order_id = #{orderId},
</if>
<if
test=
"orderId != null"
>
order_id = #{orderId},
</if>
<if
test=
"deviceIds != null"
>
device_ids = #{deviceIds},
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime},
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
...
...
gassafety-web/src/api/device/deviceInfo.js
View file @
3c2710a6
...
@@ -78,3 +78,11 @@ export function deviceTree(data) {
...
@@ -78,3 +78,11 @@ export function deviceTree(data) {
})
})
}
}
// 设备树
export
function
deviceNodeTree
()
{
return
request
({
url
:
'/device/deviceInfo/deviceNodeTree'
,
method
:
'get'
})
}
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
View file @
3c2710a6
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<
div
class
=
"eq-text"
>
<
div
class
=
"eq-text"
>
<
span
>
管道压力:
<
/span
>
<
span
>
管道压力:
<
/span
>
<
span
>
{{
<
span
>
{{
[
"低
押
"
,
"中压"
,
"次高压"
,
"高压"
][
obj
.
pipePressure
-
1
]
[
"低
压
"
,
"中压"
,
"次高压"
,
"高压"
][
obj
.
pipePressure
-
1
]
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
0 → 100644
View file @
3c2710a6
<
template
>
<div
class=
"wrapper"
>
<div
class=
"top display-default"
>
<div
class=
"left text"
>
{{
obj
.
pipeName
}}
</div>
<div
class=
"right text"
>
<img
@
click=
"close"
src=
"../../assets/images/closeBtn.png"
alt=
""
/>
</div>
</div>
<!-- 设备信息 -->
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<!--
<div
:title=
"obj.pipeName"
class=
"eq-text"
>
<span>
管道名称:
</span>
<span>
{{
obj
.
pipeName
}}
</span>
</div>
-->
<div
class=
"eq-text"
>
<span>
管道编号:
</span>
<span>
{{
obj
.
pipeCode
}}
</span>
</div>
<div
class=
"eq-text"
>
<span>
管道长度:
</span>
<span>
{{
`${obj.pipeLength ? obj.pipeLength + "米" : ""
}
`
}}
<
/span
>
<
/div
>
<
div
class
=
"eq-text"
>
<
span
>
管道类型:
<
/span
>
<
span
>
{{
[
"地埋管线"
,
"地表管线"
][
obj
.
pipeType
-
1
]
}}
<
/span
>
<
/div
>
<
div
class
=
"eq-text"
>
<
span
>
管道压力:
<
/span
>
<
span
>
{{
[
"低压"
,
"中压"
,
"次高压"
,
"高压"
][
obj
.
pipePressure
-
1
]
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"pic"
>
<!--
<
img
:
src
=
"obj.iconUrl"
alt
=
""
/>
-->
<
el
-
image
@
mouseover
=
"mousedown"
id
=
"img"
ref
=
"previewImg"
:
src
=
"obj.iconUrl"
:
preview
-
src
-
list
=
"bigImageArr"
:
z
-
index
=
"9999999"
><
/el-image
>
<
/div
>
<
/div
>
<
div
class
=
"maintain-content"
>
<
div
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
/div
>
<
div
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
}}
<
/span
>
<
/div
>
<
div
>
<
span
>
备注信息:
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"!obj.editorPage"
>
<
div
class
=
"warn-content"
>
<
div
>
报警状态
<
span
>
报警
<
/span></
div
>
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
/div
>
<
div
class
=
"btn"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
/div
>
<
/template
>
<
/div
>
<!--
报警状态
-->
<
/div
>
<
/template
>
<
script
>
//line移入时的的infowindow
import
moment
from
"moment"
;
export
default
{
props
:
{
obj
:
{
typs
:
Object
}
,
}
,
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
}
,
mounted
()
{
console
.
log
(
"stopWindow"
);
this
.
$refs
.
previewImg
.
$el
.
addEventListener
(
"mouseover"
,
(
e
)
=>
{
console
.
log
(
"11"
,
e
);
// e.stopPropagation();
console
.
log
(
"stopWindow"
);
}
);
}
,
computed
:
{
bigImageArr
()
{
return
[
this
.
dialogImageUrl
];
}
,
}
,
methods
:
{
moment
,
mousedown
()
{
console
.
log
(
"?"
);
}
,
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
stopWindow
()
{
console
.
log
(
"阻止window冒泡的图片"
);
}
,
stopw
()
{
console
.
log
(
"stopwindow"
);
}
,
}
,
}
;
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
wrapper
{
width
:
406
px
;
// height: 488px;
background
:
#
fff
;
border
-
radius
:
4
px
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
// overflow: hidden;
.
top
{
width
:
100
%
;
height
:
51
px
;
background
-
color
:
#
053
b6a
;
.
text
{
font
-
weight
:
600
;
font
-
size
:
16
px
;
color
:
#
ffffff
;
line
-
height
:
51
px
;
}
.
left
{
padding
-
left
:
22
px
;
}
.
right
{
padding
-
right
:
22
px
;
img
{
cursor
:
pointer
;
}
}
}
.
content
{
position
:
relative
;
max
-
height
:
400
px
;
overflow
:
hidden
;
overflow
-
y
:
auto
;
.
eq
-
content
{
min
-
height
:
156
px
;
box
-
sizing
:
border
-
box
;
padding
:
13
px
22
px
0
px
22
px
;
// border-bottom: 1px solid #e2e2e2;
.
text
-
wrapper
{
padding
-
top
:
1
px
;
&
>
div
{
margin
-
bottom
:
6
px
;
}
.
eq
-
text
{
font
-
size
:
14
px
;
font
-
weight
:
400
;
color
:
#
1
d1d1d
;
opacity
:
1
;
&
>
span
{
vertical
-
align
:
top
;
display
:
inline
-
block
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word
-
break
:
break
-
all
;
max
-
width
:
100
px
;
}
}
}
.
pic
{
width
:
177
px
;
height
:
129
px
;
// background-color: black;
#
img
{
width
:
100
%
;
height
:
100
%
;
}
}
}
}
.
maintain
-
content
{
width
:
100
%
;
height
:
119
px
;
padding
-
left
:
22
px
;
padding
-
right
:
22
px
;
padding
-
bottom
:
10
px
;
// padding-top: 16px;
box
-
sizing
:
border
-
box
;
// border-bottom: 1px solid #e2e2e2;
&
>
div
{
margin
-
bottom
:
8
px
;
font
-
size
:
14
px
;
font
-
weight
:
400
;
span
{
vertical
-
align
:
top
;
display
:
inline
-
block
;
word
-
break
:
break
-
all
;
max
-
width
:
250
px
;
}
}
}
.
warn
-
content
{
height
:
82
px
;
box
-
sizing
:
border
-
box
;
padding
:
8
px
0
0
22
px
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
&
>
div
{
font
-
size
:
14
px
;
font
-
weight
:
400
;
margin
-
bottom
:
8
px
;
}
}
.
btn
{
padding
-
top
:
32
px
;
text
-
align
:
center
;
.
elbtn
{
background
-
color
:
#
053
b6a
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
width
:
95
px
;
height
:
33
px
;
}
}
}
.
wrapperEditorPage
{
}
.
display
-
default
{
display
:
flex
;
justify
-
content
:
space
-
between
;
}
<
/style
>
gassafety-web/src/components/PopWindowGis/workerManView.vue
View file @
3c2710a6
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
:before-close=
"handleClose"
>
>
<div>
<el-form>
<el-form-item
label=
"选择时间段:"
prop=
""
>
<el-date-picker
<el-date-picker
v-model=
"dateValue"
v-model=
"dateValue"
type=
"datetimerange"
type=
"datetimerange"
...
@@ -13,7 +14,9 @@
...
@@ -13,7 +14,9 @@
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
>
>
</el-date-picker>
</el-date-picker>
</div>
</el-form-item>
</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
:loading=
"okLoading"
type=
"primary"
@
click=
"ok"
<el-button
:loading=
"okLoading"
type=
"primary"
@
click=
"ok"
...
@@ -23,31 +26,69 @@
...
@@ -23,31 +26,69 @@
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
MyFileUpload
from
"@/components/MyFileUpload"
;
import
{
addPipe
,
updatePipe
}
from
"@/api/device/pipe.js"
;
import
{
getString
}
from
"@/utils/gassafety.js"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
{
getInspectorLocations
}
from
"@/api/inspectorLocation/location"
;
export
default
{
export
default
{
props
:
{
props
:
{
id
:
{
userId
:
{
type
:
Number
,
},
title
:
{
type
:
String
,
type
:
String
,
},
},
title
:{
target
:
{
type
:
String
,
type
:
Object
,
}
},
gaodeMap
:
{
type
:
Object
,
},
},
},
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
dialogVisible
:
false
,
dialogVisible
:
false
,
dateValue
:
""
,
dateValue
:
""
,
okLoading
:
false
,
formData
:
{},
};
};
},
},
computed
:
{},
created
()
{},
created
()
{
this
.
formData
.
userId
=
this
.
userId
;
},
methods
:
{
methods
:
{
ok
()
{},
ok
()
{
this
.
okLoading
=
true
;
this
.
formData
.
beginTime
=
moment
(
this
.
dateValue
[
0
]).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
(
this
.
dateValue
[
1
]).
format
(
"YYYY-MM-DD HH:mm:ss"
);
getInspectorLocations
(
this
.
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
arr
=
res
.
data
.
map
((
res
)
=>
{
return
[
res
.
longitude
,
res
.
latitude
];
});
arr
=
arr
.
sort
((
a
,
b
)
=>
{
return
-
1
;
});
this
.
okLoading
=
false
;
this
.
$message
({
type
:
"success"
,
// center:true,
offset
:
100
,
message
:
res
.
msg
,
});
this
.
dialogVisible
=
false
;
this
.
gaodeMap
.
trackBack
(
this
.
target
,
arr
);
}
});
},
async
requeset
(
id
,
data
)
{
async
requeset
(
id
,
data
)
{
id
?
console
.
log
(
"修改"
)
:
console
.
log
(
"新增"
);
id
?
console
.
log
(
"修改"
)
:
console
.
log
(
"新增"
);
return
id
?
updatePipe
(
data
)
:
addPipe
(
data
);
return
id
?
updatePipe
(
data
)
:
addPipe
(
data
);
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
3c2710a6
...
@@ -3,7 +3,7 @@ import regulatorBox from "../components/PopWindow/regulatorBox.vue";
...
@@ -3,7 +3,7 @@ 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
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
Gis
/lineInfoWindow.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
markerInfoWindow
from
"../components/PopWindow/markerInfoWindow.vue"
;
import
markerInfoWindow
from
"../components/PopWindow/markerInfoWindow.vue"
;
import
workerManInfowindow
from
"../components/PopWindowGis/workerManInfowindow.vue"
;
import
workerManInfowindow
from
"../components/PopWindowGis/workerManInfowindow.vue"
;
...
@@ -178,8 +178,20 @@ class gaodeMap {
...
@@ -178,8 +178,20 @@ class gaodeMap {
// 值班人员的marker
// 值班人员的marker
if
(
DEVICE_TYPE
.
INSPECTOR
==
markerType
)
{
if
(
DEVICE_TYPE
.
INSPECTOR
==
markerType
)
{
// 存值
// 存值
const
{
createTime
,
locationId
,
longitude
,
latitude
}
=
data
;
const
{
marker
.
setExtData
({
createTime
,
locationId
,
pos
:
[
longitude
,
latitude
]
});
createTime
,
locationId
,
longitude
,
latitude
,
userId
,
type
}
=
data
;
marker
.
setExtData
({
createTime
,
locationId
,
pos
:
[
longitude
,
latitude
],
deviceType
:
type
});
// 值班人员的事件
// 值班人员的事件
// marker.on("click", e => {
// marker.on("click", e => {
...
@@ -192,18 +204,20 @@ class gaodeMap {
...
@@ -192,18 +204,20 @@ class gaodeMap {
e
.
target
.
content
=
this
.
getMarketContent
(
data
);
e
.
target
.
content
=
this
.
getMarketContent
(
data
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
that
.
addCloneDome
(
e
.
target
,
infoWindow
);
//
that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
// infoWindow.close();
that
.
workerManInfoWindow
=
infoWindow
;
that
.
workerManInfoWindow
=
infoWindow
;
});
});
marker
.
on
(
"mousedown"
,
e
=>
{
marker
.
on
(
"mousedown"
,
e
=>
{
console
.
log
(
data
);
that
.
closeInfoWindow
();
that
.
closeInfoWindow
();
that
.
workerManView
({
title
:
"值班人员轨迹回放"
});
that
.
workerManView
({
title
:
"值班人员轨迹回放"
,
target
:
marker
,
userId
});
});
});
}
}
if
(
if
(
DEVICE_TYPE
.
WORKORDER
!=
markerType
&&
DEVICE_TYPE
.
WORKORDER
!=
markerType
&&
DEVICE_TYPE
.
INSPECTOR
!=
markerType
DEVICE_TYPE
.
INSPECTOR
!=
markerType
...
@@ -293,7 +307,7 @@ class gaodeMap {
...
@@ -293,7 +307,7 @@ class gaodeMap {
map
.
setStatus
(
options
);
map
.
setStatus
(
options
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
that
.
addCloneDome
(
e
.
target
,
infoWindow
);
//
that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
// infoWindow.close();
that
.
markerInfoWindow
=
infoWindow
;
that
.
markerInfoWindow
=
infoWindow
;
...
@@ -470,11 +484,66 @@ class gaodeMap {
...
@@ -470,11 +484,66 @@ class gaodeMap {
// target: options.obj,
// target: options.obj,
...
options
,
...
options
,
//把当前对象当作that传进去
//把当前对象当作that传进去
gaodeMap
:
this
,
gaodeMap
:
this
// lineOkCallBack: this.lineOkCallBack
// lineOkCallBack: this.lineOkCallBack
});
});
notice
.
show
();
notice
.
show
();
}
}
//
trackBack
(
marker
,
arr
)
{
// 值班人员轨迹回放
AMap
.
plugin
(
"AMap.MoveAnimation"
,
function
()
{
let
lineArr
=
arr
;
marker
.
moveMarker
&&
map
.
remove
(
marker
.
moveMarker
);
marker
.
polyline
&&
map
.
remove
(
marker
.
polyline
);
marker
.
passedPolyline
&&
map
.
remove
(
marker
.
passedPolyline
);
let
icon
=
new
AMap
.
Icon
({
//size: new AMap.Size(51, 23),
image
:
require
(
"../assets/images/zhibanrenyuan.png"
)
});
marker
.
moveMarker
=
new
AMap
.
Marker
({
map
:
map
,
position
:
lineArr
[
0
],
icon
,
offset
:
new
AMap
.
Pixel
(
-
13
,
-
26
)
});
marker
.
polyline
=
new
AMap
.
Polyline
({
map
:
map
,
path
:
lineArr
,
showDir
:
true
,
strokeColor
:
"#28F"
,
//线颜色
// strokeOpacity: 1, //线透明度
strokeWeight
:
6
//线宽
// strokeStyle: "solid" //线样式
});
marker
.
passedPolyline
=
new
AMap
.
Polyline
({
map
:
map
,
strokeColor
:
"#AF5"
,
//线颜色
strokeWeight
:
6
//线宽
});
marker
.
moveMarker
.
on
(
"moving"
,
function
(
e
)
{
marker
.
passedPolyline
.
setPath
(
e
.
passedPath
);
});
marker
.
moveMarker
.
on
(
"moveend"
,
e
=>
{
e
.
index
==
lineArr
.
length
-
1
&&
map
.
remove
(
marker
.
moveMarker
);
});
marker
.
moveMarker
.
on
(
"moveAlong"
,
()
=>
{
console
.
log
(
e
);
});
marker
.
moveMarker
.
moveAlong
(
lineArr
,
{
// 每一段的时长
duration
:
1200
,
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation
:
false
});
// map.setFitView();
});
}
/**
/**
* 添加折线
* 添加折线
* @param path
* @param path
...
@@ -589,7 +658,7 @@ class gaodeMap {
...
@@ -589,7 +658,7 @@ class gaodeMap {
// this.removeCloneDom();
// this.removeCloneDom();
// document.body.appendChild(polyline.cloneDom);
// document.body.appendChild(polyline.cloneDom);
// infoWindow.close();
// infoWindow.close();
this
.
addCloneDome
(
polyline
,
infoWindow
);
//
this.addCloneDome(polyline, infoWindow);
// infoWindow.close();
// infoWindow.close();
this
.
showInfoWindow
=
infoWindow
;
this
.
showInfoWindow
=
infoWindow
;
// const
// const
...
@@ -607,6 +676,7 @@ class gaodeMap {
...
@@ -607,6 +676,7 @@ class gaodeMap {
}
}
// 把map里的in佛window转化成vue里的dom
// 把map里的in佛window转化成vue里的dom
addCloneDome
(
target
,
infoWindow
)
{
addCloneDome
(
target
,
infoWindow
)
{
target
.
cloneDom
=
infoWindow
.
dom
.
cloneNode
(
true
);
target
.
cloneDom
=
infoWindow
.
dom
.
cloneNode
(
true
);
target
.
cloneDom
.
style
.
top
=
infoWindow
.
dom
.
offsetTop
+
80
+
"px"
;
target
.
cloneDom
.
style
.
top
=
infoWindow
.
dom
.
offsetTop
+
80
+
"px"
;
...
@@ -618,7 +688,7 @@ class gaodeMap {
...
@@ -618,7 +688,7 @@ class gaodeMap {
this
.
cloneDom
=
target
.
cloneDom
;
this
.
cloneDom
=
target
.
cloneDom
;
this
.
cloneDom
.
addEventListener
(
"mousedown"
,
e
=>
{
this
.
cloneDom
.
addEventListener
(
"mousedown"
,
e
=>
{
// e.stopPropagation();
// e.stopPropagation();
console
.
log
(
"this"
);
//
console.log("this");
});
});
infoWindow
.
close
();
infoWindow
.
close
();
...
@@ -740,6 +810,18 @@ class gaodeMap {
...
@@ -740,6 +810,18 @@ class gaodeMap {
this
.
markers
.
forEach
(
item
=>
{
this
.
markers
.
forEach
(
item
=>
{
const
{
deviceType
}
=
item
.
getExtData
();
const
{
deviceType
}
=
item
.
getExtData
();
if
(
deviceType
==
type
)
{
if
(
deviceType
==
type
)
{
// 如果是值班人员,还要隐藏身上的线条以及marker
if
(
type
==
9
)
{
if
(
bool
)
{
item
.
moveMarker
&&
item
.
moveMarker
.
show
();
item
.
polyline
&&
item
.
polyline
.
show
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
show
();
}
else
{
item
.
moveMarker
&&
item
.
moveMarker
.
hide
();
item
.
polyline
&&
item
.
polyline
.
hide
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
hide
();
}
}
bool
?
item
.
show
()
:
item
.
hide
();
bool
?
item
.
show
()
:
item
.
hide
();
}
}
// //console.log("deviceType",deviceType);
// //console.log("deviceType",deviceType);
...
@@ -794,7 +876,6 @@ class gaodeMap {
...
@@ -794,7 +876,6 @@ class gaodeMap {
let
opstions
=
item
.
getExtData
();
let
opstions
=
item
.
getExtData
();
opstions
.
isState
=
0
;
opstions
.
isState
=
0
;
item
.
setExtData
(
opstions
);
item
.
setExtData
(
opstions
);
let
attr
=
item
.
getOptions
();
let
attr
=
item
.
getOptions
();
attr
.
strokeColor
=
"#F7FE38"
;
attr
.
strokeColor
=
"#F7FE38"
;
item
.
setOptions
(
attr
);
item
.
setOptions
(
attr
);
...
...
gassafety-web/src/utils/submitForm.js
0 → 100644
View file @
3c2710a6
import
{
Message
}
from
'element-ui'
;
// 提交通用
export
const
submitForm
=
async
(
run
,
params
)
=>
{
const
hide
=
Message
.
loading
(
"正在提交"
,
1
);
try
{
hide
.
close
()
const
res
=
await
run
(
params
);
// console.log(res.code);
// console.log("res99",res)
if
(
res
.
code
===
200
)
{
if
(
res
.
data
===
-
1
)
{
Message
.
error
(
res
.
message
);
return
false
;
}
Message
.
success
(
res
.
message
);
return
true
;
}
return
false
;
}
catch
(
error
)
{
hide
.
close
();
Message
.
error
(
"提交失败,请重试!"
);
return
false
;
}
};
\ No newline at end of file
gassafety-web/src/views/deviceInspection/inspectionPlan/index.vue
View file @
3c2710a6
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
3c2710a6
...
@@ -123,8 +123,7 @@ export default {
...
@@ -123,8 +123,7 @@ export default {
// 1新建,2编辑,3删除,点按钮变色
// 1新建,2编辑,3删除,点按钮变色
targetNum
:
0
,
targetNum
:
0
,
// 左边的bar的active判定
// 左边的bar的active判定
leftBarNum
:
[
1
,
2
,
3
,
4
,
7
],
leftBarNum
:
[
1
,
2
,
3
,
4
,
7
,
8
,
9
],
// 新建里的值
// 新建里的值
iconClass
:
"icon-create"
,
iconClass
:
"icon-create"
,
createValue
:
0
,
createValue
:
0
,
...
@@ -155,27 +154,22 @@ export default {
...
@@ -155,27 +154,22 @@ export default {
icon
:
"icon-ylb"
,
icon
:
"icon-ylb"
,
label
:
"压力表"
,
label
:
"压力表"
,
},
},
{
value
:
8
,
icon
:
"icon-yh"
,
label
:
"隐患"
,
},
{
value
:
9
,
icon
:
"icon-zhibanrenyuan"
,
label
:
"值班人员"
,
},
],
],
keyWord
:
""
,
keyWord
:
""
,
// 右下角的数据data
// 右下角的数据data
rightBototmData
:
[],
rightBototmData
:
[],
};
};
},
},
async
created
()
{
await
countPipeLength
().
then
((
res
)
=>
{
// console.log("管道管道管道管道管道管道", res);
const
obj
=
{
number
:
res
.
data
,
type
:
"99"
};
this
.
rightBototmData
.
push
(
obj
);
});
await
countDeviceByType
().
then
((
res
)
=>
{
// console.log("markerresresresresresresresresresresresres", res);
this
.
rightBototmData
.
push
(...
res
.
data
);
});
// 值班人员
this
.
getInspectorLocations
();
console
.
log
(
this
.
rightBototmData
);
},
mounted
()
{
mounted
()
{
this
.
initMap
();
this
.
initMap
();
},
},
...
@@ -188,6 +182,22 @@ export default {
...
@@ -188,6 +182,22 @@ export default {
gaoMap
.
searchTips
(
"tipinput"
);
gaoMap
.
searchTips
(
"tipinput"
);
this
.
getDeviceInfo
();
this
.
getDeviceInfo
();
this
.
getPipeList
();
this
.
getPipeList
();
// 右下角数据
this
.
rightBottomData
();
},
// 右下角数据
async
rightBottomData
()
{
await
countPipeLength
().
then
((
res
)
=>
{
// console.log("管道管道管道管道管道管道", res);
const
obj
=
{
number
:
res
.
data
,
type
:
"99"
};
this
.
rightBototmData
.
push
(
obj
);
});
await
countDeviceByType
().
then
((
res
)
=>
{
// console.log("markerresresresresresresresresresresresres", res);
this
.
rightBototmData
.
push
(...
res
.
data
);
});
// 值班人员
this
.
getInspectorLocations
();
},
},
// 左边的Bar修改值
// 左边的Bar修改值
leftBarChange
(
item
)
{
leftBarChange
(
item
)
{
...
@@ -233,6 +243,12 @@ export default {
...
@@ -233,6 +243,12 @@ export default {
}
else
{
}
else
{
this
.
gaoMap
.
markerShow
(
4
,
false
);
this
.
gaoMap
.
markerShow
(
4
,
false
);
}
}
if
(
this
.
leftBarNum
.
includes
(
9
))
{
this
.
gaoMap
.
markerShow
(
9
,
true
);
}
else
{
this
.
gaoMap
.
markerShow
(
9
,
false
);
}
},
},
addDevice
()
{
addDevice
()
{
if
(
this
.
iconClass
==
"icon-create"
)
{
if
(
this
.
iconClass
==
"icon-create"
)
{
...
@@ -383,7 +399,9 @@ export default {
...
@@ -383,7 +399,9 @@ export default {
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
console
.
log
(
" 值班人员"
,
res
);
console
.
log
(
" 值班人员"
,
res
);
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
INSPECTOR
,
res
.
data
[
i
]);
let
options
=
res
.
data
[
i
];
options
.
type
=
9
;
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
INSPECTOR
,
options
);
}
}
}
}
});
});
...
@@ -401,6 +419,7 @@ export default {
...
@@ -401,6 +419,7 @@ export default {
this
.
gaoMap
.
mapOperateType
=
"normal"
;
this
.
gaoMap
.
mapOperateType
=
"normal"
;
// map.remove(this.gaodeMap.markerOverlays);
// map.remove(this.gaodeMap.markerOverlays);
},
},
// 搜索
search
()
{
search
()
{
this
.
searchClear
();
this
.
searchClear
();
map
.
clearMap
();
map
.
clearMap
();
...
@@ -418,10 +437,13 @@ export default {
...
@@ -418,10 +437,13 @@ export default {
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
});
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
});
this
.
gaoMap
.
polyLines
=
[];
this
.
gaoMap
.
polyLines
=
[];
this
.
getPipeList
({
pipeName
:
this
.
keyWord
});
this
.
getPipeList
({
pipeName
:
this
.
keyWord
});
// 值班人员
this
.
getInspectorLocations
();
}
}
},
},
// 新建下拉列表关闭 window点击事件
// 新建下拉列表关闭 window点击事件
barClose
()
{
barClose
()
{
// return;
console
.
log
(
"window"
);
console
.
log
(
"window"
);
this
.
deviceType
=
false
;
this
.
deviceType
=
false
;
// 关闭当前线条的infowindow
// 关闭当前线条的infowindow
...
@@ -443,6 +465,7 @@ export default {
...
@@ -443,6 +465,7 @@ export default {
this
.
targetNum
=
0
;
this
.
targetNum
=
0
;
map
.
clearMap
();
map
.
clearMap
();
this
.
initMap
();
this
.
initMap
();
this
.
leftBarNum
=
[
1
,
2
,
3
,
4
,
7
,
8
,
9
];
},
},
},
},
...
...
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