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
5a6684ee
Commit
5a6684ee
authored
Oct 19, 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
b887097e
79231495
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
189 additions
and
64 deletions
+189
-64
CommonController.java
...va/com/zehong/web/controller/common/CommonController.java
+3
-0
TUserLocationController.java
...controller/inspectorLocation/TUserLocationController.java
+12
-10
TUserLocation.java
...src/main/java/com/zehong/system/domain/TUserLocation.java
+14
-0
TUserLocationMapper.java
...in/java/com/zehong/system/mapper/TUserLocationMapper.java
+1
-0
ITUserLocationService.java
...java/com/zehong/system/service/ITUserLocationService.java
+1
-0
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+0
-1
TInspectionPlanServiceImpl.java
...ehong/system/service/impl/TInspectionPlanServiceImpl.java
+1
-1
TUserLocationServiceImpl.java
.../zehong/system/service/impl/TUserLocationServiceImpl.java
+6
-1
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+8
-1
TDeviceReportDataMapper.xml
.../main/resources/mapper/system/TDeviceReportDataMapper.xml
+59
-35
TUserLocationMapper.xml
.../src/main/resources/mapper/system/TUserLocationMapper.xml
+10
-1
index.vue
gassafety-web/src/components/TopNav/index.vue
+57
-4
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+2
-2
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+2
-2
index.vue
gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue
+2
-2
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+8
-1
index.vue
gassafety-web/src/views/workOrder/detail/index.vue
+3
-3
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/common/CommonController.java
View file @
5a6684ee
...
@@ -78,6 +78,9 @@ public class CommonController
...
@@ -78,6 +78,9 @@ public class CommonController
// String url = serverConfig.getUrl() + fileName;
// String url = serverConfig.getUrl() + fileName;
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
String
fileServer
=
serverConfig
.
getUrl
().
contains
(
"127"
)
&&
serverConfig
.
getUrl
().
contains
(
"8093"
)
&&
!
filePath
.
contains
(
"/data"
)?
serverConfig
.
getUrl
()
:
serverConfig
.
getUrl
().
replace
(
"127.0.0.1:8903"
,
"36.148.23.59:8901"
);
String
fileServer
=
serverConfig
.
getUrl
().
contains
(
"127"
)
&&
serverConfig
.
getUrl
().
contains
(
"8093"
)
&&
!
filePath
.
contains
(
"/data"
)?
serverConfig
.
getUrl
()
:
serverConfig
.
getUrl
().
replace
(
"127.0.0.1:8903"
,
"36.148.23.59:8901"
);
if
(
fileServer
.
contains
(
"rqgw.zhkjgf.com"
)){
fileServer
=
serverConfig
.
getUrl
().
replace
(
"rqgw.zhkjgf.com"
,
"36.148.23.59:8901"
);
}
String
url
=
fileServer
+
FileUploadUtils
.
upload
(
filePath
,
file
);
String
url
=
fileServer
+
FileUploadUtils
.
upload
(
filePath
,
file
);
AjaxResult
ajax
=
AjaxResult
.
success
();
AjaxResult
ajax
=
AjaxResult
.
success
();
ajax
.
put
(
"fileName"
,
fileName
);
ajax
.
put
(
"fileName"
,
fileName
);
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/inspectorLocation/TUserLocationController.java
View file @
5a6684ee
...
@@ -11,14 +11,7 @@ import com.zehong.system.domain.vo.TUserLocationVo;
...
@@ -11,14 +11,7 @@ import com.zehong.system.domain.vo.TUserLocationVo;
import
com.zehong.system.service.ISysUserService
;
import
com.zehong.system.service.ISysUserService
;
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.*
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.domain.AjaxResult
;
...
@@ -123,7 +116,17 @@ public class TUserLocationController extends BaseController
...
@@ -123,7 +116,17 @@ public class TUserLocationController extends BaseController
{
{
return
toAjax
(
tUserLocationService
.
insertTUserLocation
(
tUserLocation
));
return
toAjax
(
tUserLocationService
.
insertTUserLocation
(
tUserLocation
));
}
}
/**
* 小程序巡检员批量定位
* @param tUserLocationList
* @return
*/
@Log
(
title
=
"巡检员定位"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
value
=
"/addlist"
)
public
AjaxResult
addlist
(
@RequestParam
String
tUserLocationList
)
{
return
toAjax
(
tUserLocationService
.
addTUserLocationList
(
tUserLocationList
));
}
/**
/**
* 修改巡检员定位
* 修改巡检员定位
*/
*/
...
@@ -134,7 +137,6 @@ public class TUserLocationController extends BaseController
...
@@ -134,7 +137,6 @@ public class TUserLocationController extends BaseController
{
{
return
toAjax
(
tUserLocationService
.
updateTUserLocation
(
tUserLocation
));
return
toAjax
(
tUserLocationService
.
updateTUserLocation
(
tUserLocation
));
}
}
/**
/**
* 删除巡检员定位
* 删除巡检员定位
*/
*/
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TUserLocation.java
View file @
5a6684ee
package
com
.
zehong
.
system
.
domain
;
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.springframework.format.annotation.DateTimeFormat
;
/**
/**
* 巡检员定位对象 t_user_location
* 巡检员定位对象 t_user_location
...
@@ -36,7 +39,18 @@ public class TUserLocation extends BaseEntity
...
@@ -36,7 +39,18 @@ public class TUserLocation extends BaseEntity
private
String
phonenumber
;
private
String
phonenumber
;
private
String
nickName
;
private
String
nickName
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@Override
public
Date
getCreateTime
()
{
return
createTime
;
}
@Override
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getNickName
()
{
public
String
getNickName
()
{
return
nickName
;
return
nickName
;
}
}
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TUserLocationMapper.java
View file @
5a6684ee
...
@@ -43,6 +43,7 @@ public interface TUserLocationMapper
...
@@ -43,6 +43,7 @@ public interface TUserLocationMapper
* @return 结果
* @return 结果
*/
*/
public
int
insertTUserLocation
(
TUserLocation
tUserLocation
);
public
int
insertTUserLocation
(
TUserLocation
tUserLocation
);
public
int
insertTUserLocationList
(
List
<
TUserLocation
>
list
);
/**
/**
* 修改巡检员定位
* 修改巡检员定位
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITUserLocationService.java
View file @
5a6684ee
...
@@ -43,6 +43,7 @@ public interface ITUserLocationService
...
@@ -43,6 +43,7 @@ public interface ITUserLocationService
* @return 结果
* @return 结果
*/
*/
public
int
insertTUserLocation
(
TUserLocation
tUserLocation
);
public
int
insertTUserLocation
(
TUserLocation
tUserLocation
);
public
int
addTUserLocationList
(
String
tUserLocationList
);
/**
/**
* 修改巡检员定位
* 修改巡检员定位
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
5a6684ee
...
@@ -127,7 +127,6 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
...
@@ -127,7 +127,6 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
String
[]
strgps
=
str
.
split
(
","
);
String
[]
strgps
=
str
.
split
(
","
);
map
.
put
(
"longitude"
,
strgps
[
0
].
substring
(
3
,
strgps
[
0
].
length
()
-
1
));
map
.
put
(
"longitude"
,
strgps
[
0
].
substring
(
3
,
strgps
[
0
].
length
()
-
1
));
map
.
put
(
"latitude"
,
strgps
[
1
].
substring
(
1
,
strgps
[
1
].
length
()
-
2
));
map
.
put
(
"latitude"
,
strgps
[
1
].
substring
(
1
,
strgps
[
1
].
length
()
-
2
));
System
.
out
.
println
(
"============================="
+
map
.
get
(
"longitude"
)+
","
+
map
.
get
(
"latitude"
));
//JSONObject jo = JSONObject.parseObject(str);
//JSONObject jo = JSONObject.parseObject(str);
}
}
}
}
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TInspectionPlanServiceImpl.java
View file @
5a6684ee
...
@@ -76,11 +76,11 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
...
@@ -76,11 +76,11 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
if
(
dataList
.
size
()
!=
0
)
{
if
(
dataList
.
size
()
!=
0
)
{
InspectionDataVo
inspectionDataVo
=
new
InspectionDataVo
();
TDeviceInfo
deviceInfo
=
null
;
TDeviceInfo
deviceInfo
=
null
;
TPipe
pipe
=
null
;
TPipe
pipe
=
null
;
for
(
TInspectionData
temp
:
dataList
)
{
for
(
TInspectionData
temp
:
dataList
)
{
InspectionDataVo
inspectionDataVo
=
new
InspectionDataVo
();
BeanUtils
.
copyProperties
(
temp
,
inspectionDataVo
);
BeanUtils
.
copyProperties
(
temp
,
inspectionDataVo
);
if
(!
"0"
.
equals
(
temp
.
getDeviceType
()))
{
if
(!
"0"
.
equals
(
temp
.
getDeviceType
()))
{
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TUserLocationServiceImpl.java
View file @
5a6684ee
...
@@ -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
java.util.Map
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -63,7 +64,11 @@ public class TUserLocationServiceImpl implements ITUserLocationService
...
@@ -63,7 +64,11 @@ public class TUserLocationServiceImpl implements ITUserLocationService
tUserLocation
.
setCreateTime
(
DateUtils
.
getNowDate
());
tUserLocation
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tUserLocationMapper
.
insertTUserLocation
(
tUserLocation
);
return
tUserLocationMapper
.
insertTUserLocation
(
tUserLocation
);
}
}
@Override
public
int
addTUserLocationList
(
String
tUserLocationList
){
List
<
TUserLocation
>
list
=(
List
<
TUserLocation
>
)
JSONObject
.
parse
(
tUserLocationList
);
return
tUserLocationMapper
.
insertTUserLocationList
(
list
);
}
/**
/**
* 修改巡检员定位
* 修改巡检员定位
*
*
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
5a6684ee
...
@@ -259,10 +259,17 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
...
@@ -259,10 +259,17 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
public
PageInfo
<
TWorkOrder
>
selectWaitingWorkOrder
(
String
userId
,
Integer
type
,
String
searchStr
,
Integer
waitingtype
){
public
PageInfo
<
TWorkOrder
>
selectWaitingWorkOrder
(
String
userId
,
Integer
type
,
String
searchStr
,
Integer
waitingtype
){
List
<
TWorkOrder
>
workOrderList
=
tWorkOrderMapper
.
selectWaitingWorkOrder
(
userId
,
type
,
searchStr
,
waitingtype
);
List
<
TWorkOrder
>
workOrderList
=
tWorkOrderMapper
.
selectWaitingWorkOrder
(
userId
,
type
,
searchStr
,
waitingtype
);
for
(
TWorkOrder
t
:
workOrderList
){
for
(
TWorkOrder
t
:
workOrderList
){
if
(
t
.
getOrderType
().
equals
(
'3'
)){
if
(
t
.
getOrderType
().
equals
(
"3"
)){
String
address
=
tDeviceAlarmMapper
.
selectAddressByOrderId
(
t
.
getOrderId
());
String
address
=
tDeviceAlarmMapper
.
selectAddressByOrderId
(
t
.
getOrderId
());
t
.
setAddress
(
address
);
t
.
setAddress
(
address
);
}
}
if
(
t
.
getOrderType
().
equals
(
"1"
)){
t
.
setLatitude
(
tInspectionDataMapper
.
selectFinishTInspectionData
(
t
.
getResourceId
())+
""
);
TInspectionPlan
plan
=
tInspectionPlanMapper
.
selectTInspectionPlanById
(
t
.
getResourceId
());
if
(
plan
!=
null
){
t
.
setLongitude
((
plan
.
getDeviceIds
().
split
(
","
).
length
/
2
)+
""
);
}
}
}
}
PageInfo
<
TWorkOrder
>
pageInfo
=
new
PageInfo
<>(
workOrderList
);
PageInfo
<
TWorkOrder
>
pageInfo
=
new
PageInfo
<>(
workOrderList
);
return
pageInfo
;
return
pageInfo
;
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceReportDataMapper.xml
View file @
5a6684ee
...
@@ -86,53 +86,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -86,53 +86,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</select>
<select
id=
"selectRealtimeDataList"
parameterType=
"DeviceReportDataForm"
resultMap=
"TDeviceReportDataResultVo"
>
<select
id=
"selectRealtimeDataList"
parameterType=
"DeviceReportDataForm"
resultMap=
"TDeviceReportDataResultVo"
>
select
SELECT
max(t.report_time) report_time,
*
t.device_report_data_id,
FROM
t.device_num,
(
t.standard_condition_accumulation,
SELECT
t.working_condition_accumulation,
t.report_time,
t.residual_quantity,
t.device_report_data_id,
t.standard_condition_flow,
t.device_num,
t.working_condition_flow,
t.standard_condition_accumulation,
t.temperature,
t.working_condition_accumulation,
t.pressure,
t.residual_quantity,
t.communication_status,
t.standard_condition_flow,
t.create_time,
t.working_condition_flow,
t.update_time,
t.temperature,
d.device_id,
t.pressure,
d.device_name,
t.communication_status,
d.device_code,
t.create_time,
d.device_type,
t.update_time,
d.device_model,
d.device_id,
CASE (SELECT COUNT(DISTINCT alarm.device_id) FROM t_device_alarm alarm WHERE alarm.device_id = d.device_id AND alarm.end_time IS NULL)
d.device_name,
WHEN 0 THEN '正常'
d.device_code,
ELSE '报警'
d.device_type,
END as device_status
d.device_model,
from t_device_report_data t
CASE (
LEFT JOIN t_device_info d on t.device_num = d.iot_no
SELECT
COUNT(DISTINCT alarm.device_id)
FROM
t_device_alarm alarm
WHERE
alarm.device_id = d.device_id
AND alarm.end_time IS NULL
)
WHEN 0 THEN
'正常'
ELSE
'报警'
END AS device_status
FROM
t_device_report_data t
LEFT JOIN t_device_info d ON t.device_num = d.iot_no
WHERE
(
d.device_type = '3'
OR d.device_type = '4'
)
ORDER BY t.create_time DESC
)data
<where>
<where>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and d.device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and d
ata
.device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
and d.device_type = #{deviceType}
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
and d
ata
.device_type = #{deviceType}
</if>
<if
test=
"deviceType == null "
>
and (d
.device_type = '3' or d
.device_type = '4')
</if>
<if
test=
"deviceType == null "
>
and (d
ata.device_type = '3' or data
.device_type = '4')
</if>
<if
test=
"startReportTime != null "
>
and
t.report
_time
>
= #{startReportTime}
</if>
<if
test=
"startReportTime != null "
>
and
data.create
_time
>
= #{startReportTime}
</if>
<if
test=
"endReportTime != null "
>
and
t.report
_time
<
= #{endReportTime}
</if>
<if
test=
"endReportTime != null "
>
and
data.create
_time
<
= #{endReportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and
t
.communication_status = #{communicationStatus}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and
data
.communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and
t
.device_status = #{deviceStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and
data
.device_status = #{deviceStatus}
</if>
</where>
</where>
group by d
.device_id
GROUP BY data
.device_id
</select>
</select>
<select
id=
"selectTDeviceReportDataByDeviceNum"
parameterType=
"String"
resultMap=
"TDeviceReportDataResult"
>
<select
id=
"selectTDeviceReportDataByDeviceNum"
parameterType=
"String"
resultMap=
"TDeviceReportDataResult"
>
select
max(report_time)
report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
from t_device_report_data
from t_device_report_data
where device_num = #{deviceNum}
where device_num = #{deviceNum}
ORDER BY create_time DESC
LIMIT 1
</select>
</select>
<select
id=
"getTDeviceReportDataList"
parameterType=
"String"
resultMap=
"TDeviceReportDataResult"
>
<select
id=
"getTDeviceReportDataList"
parameterType=
"String"
resultMap=
"TDeviceReportDataResult"
>
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
from t_device_report_data
from t_device_report_data
where device_num = #{deviceNum} and
report
_time
>
= DATE_SUB(NOW(),INTERVAL 2 HOUR)
where device_num = #{deviceNum} and
create
_time
>
= DATE_SUB(NOW(),INTERVAL 2 HOUR)
</select>
</select>
<select
id=
"getAlarmDeviceReportDataList"
parameterType=
"TDeviceReportData"
resultMap=
"TDeviceReportDataResult"
>
<select
id=
"getAlarmDeviceReportDataList"
parameterType=
"TDeviceReportData"
resultMap=
"TDeviceReportDataResult"
>
...
...
gassafety-system/src/main/resources/mapper/system/TUserLocationMapper.xml
View file @
5a6684ee
...
@@ -61,7 +61,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -61,7 +61,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
</trim>
</trim>
</insert>
</insert>
<insert
id=
"insertTUserLocationList"
>
INSERT INTO t_user_location (user_id,longitude,latitude,create_time)
VALUES
<foreach
collection=
"list"
index=
"index"
separator=
","
item=
"item"
>
(#{item.userId},
#{item.longitude},
#{item.latitude},
#{item.createTime})
</foreach>
</insert>
<update
id=
"updateTUserLocation"
parameterType=
"TUserLocation"
>
<update
id=
"updateTUserLocation"
parameterType=
"TUserLocation"
>
update t_user_location
update t_user_location
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
...
...
gassafety-web/src/components/TopNav/index.vue
View file @
5a6684ee
...
@@ -8,8 +8,10 @@
...
@@ -8,8 +8,10 @@
<!--
<el-menu-item
:style=
"
{'--theme': theme}" :index="item.path" :key="index" v-if="index
<
visibleNumber
"
--
>
<!--
<el-menu-item
:style=
"
{'--theme': theme}" :index="item.path" :key="index" v-if="index
<
visibleNumber
"
--
>
<el-menu-item
<el-menu-item
:index=
"item.path"
:index=
"item.path"
:key=
"index"
:key=
"index
+ `$
{item.meta.title}`
"
v-if="index
<
visibleNumber
"
v-if="index
<
visibleNumber
"
:class=
"
{ isActive: menuAcitve == item.meta.title }"
@click="menuClick($event, item)"
>
>
<!-- 导航栏左侧图标 -->
<!-- 导航栏左侧图标 -->
<!--
<svg-icon
:icon-class=
"item.meta.icon"
/>
-->
<!--
<svg-icon
:icon-class=
"item.meta.icon"
/>
-->
...
@@ -22,8 +24,10 @@
...
@@ -22,8 +24,10 @@
<!-- <div> -->
<!-- <div> -->
<el-submenu
<el-submenu
class=
"onlyNavTio moreLise"
class=
"onlyNavTio moreLise"
:class=
"{ noBg: moreMenu }"
index=
"more"
index=
"more"
v-if=
"topMenus.length > visibleNumber"
v-if=
"topMenus.length > visibleNumber"
ref=
"noBg"
>
>
<
template
slot=
"title"
>
更多菜单
</
template
>
<
template
slot=
"title"
>
更多菜单
</
template
>
<
template
v-for=
"(item, index) in topMenus"
>
<
template
v-for=
"(item, index) in topMenus"
>
...
@@ -32,6 +36,7 @@
...
@@ -32,6 +36,7 @@
:index=
"item.path"
:index=
"item.path"
:key=
"index"
:key=
"index"
v-if=
"index >= visibleNumber"
v-if=
"index >= visibleNumber"
@
click=
"menuClick($event, item)"
><svg-icon
:icon-class=
"item.meta.icon"
/>
><svg-icon
:icon-class=
"item.meta.icon"
/>
{{
item
.
meta
.
title
}}
</el-menu-item
{{
item
.
meta
.
title
}}
</el-menu-item
>
>
...
@@ -55,12 +60,17 @@ export default {
...
@@ -55,12 +60,17 @@ export default {
// 当前激活菜单的 index
// 当前激活菜单的 index
currentIndex
:
undefined
,
currentIndex
:
undefined
,
myRouter
:
[],
myRouter
:
[],
// 因为更多菜单前面的最后一个总是出问题,所以调整一下
menuAcitve
:
null
,
moreMenu
:
false
,
};
};
},
},
computed
:
{
computed
:
{
theme
()
{
theme
()
{
return
this
.
$store
.
state
.
settings
.
theme
;
return
this
.
$store
.
state
.
settings
.
theme
;
},
},
// 顶部显示菜单
// 顶部显示菜单
topMenus
()
{
topMenus
()
{
let
topMenus
=
[];
let
topMenus
=
[];
...
@@ -132,15 +142,54 @@ export default {
...
@@ -132,15 +142,54 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
setVisibleNumber
();
this
.
setVisibleNumber
();
this
.
moreMenuChange
();
},
},
methods
:
{
methods
:
{
menuClick
(
e
,
item
)
{
this
.
menuAcitve
=
item
.
meta
.
title
;
this
.
moreMenu
=
false
;
},
// 为了解决菜单样式bug问题
moreMenuChange
()
{
// 展示更多的前一个路由
const
lastMenuPath
=
this
.
topMenus
[
this
.
visibleNumber
-
1
]?.
path
;
// 当前跳转的路由
const
routerMenuPath
=
this
.
$route
.
matched
[
0
].
path
;
// 如果点击的正好是展示更多的前一个,展示更多就不能拥有高亮
if
(
lastMenuPath
==
routerMenuPath
)
{
this
.
moreMenu
=
true
;
this
.
$refs
.
noBg
.
$el
.
addEventListener
(
"mouseover"
,
this
.
mouseOver
);
this
.
$refs
.
noBg
.
$el
.
addEventListener
(
"mouseout"
,
this
.
mouseOut
);
}
else
{
this
.
removeEvt
();
}
// var reg = new RegExp("(\\s|^)" + 'is-active' + "(\\s|$)");
// console.log("this.topMenus",this.topMenus[this.visibleNumber-1].path)
// console.log("this.topMenus",this.$route.matched[0].path)
},
mouseOver
()
{
this
.
moreMenu
=
false
;
},
mouseOut
()
{
this
.
moreMenu
=
true
;
},
removeEvt
()
{
if
(
this
.
$refs
.
noBg
)
{
this
.
$refs
.
noBg
.
$el
.
removeEventListener
(
"mouseover"
,
this
.
mouseOver
);
this
.
$refs
.
noBg
.
$el
.
removeEventListener
(
"mouseout"
,
this
.
mouseOut
);
}
},
// 根据宽度计算设置显示栏数
// 根据宽度计算设置显示栏数
setVisibleNumber
()
{
setVisibleNumber
()
{
const
width
=
document
.
body
.
getBoundingClientRect
().
width
/
3
;
const
width
=
document
.
body
.
getBoundingClientRect
().
width
/
3
;
this
.
visibleNumber
=
parseInt
(
width
/
8
5
);
this
.
visibleNumber
=
parseInt
(
width
/
8
8
);
},
},
// 菜单选择事件
// 菜单选择事件
handleSelect
(
key
,
keyPath
)
{
handleSelect
(
key
,
keyPath
)
{
// 点菜单的时候清楚事件,为了解决菜单样式bug问题
this
.
removeEvt
();
let
path
;
let
path
;
this
.
currentIndex
=
key
;
this
.
currentIndex
=
key
;
if
(
this
.
ishttp
(
key
))
{
if
(
this
.
ishttp
(
key
))
{
...
@@ -154,7 +203,7 @@ export default {
...
@@ -154,7 +203,7 @@ export default {
path
=
this
.
activeRoutes
(
key
);
path
=
this
.
activeRoutes
(
key
);
// console.log("path",this.$store.state.permission.topbarRouters);
// console.log("path",this.$store.state.permission.topbarRouters);
console
.
log
(
this
.
$route
.
path
);
console
.
log
(
this
.
$route
.
path
);
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
if
(
path
[
0
].
path
)
{
if
(
path
[
0
].
path
)
{
this
.
$router
.
push
(
path
[
0
].
path
);
this
.
$router
.
push
(
path
[
0
].
path
);
...
@@ -252,7 +301,8 @@ export default {
...
@@ -252,7 +301,8 @@ export default {
}
}
.navTopBar
:focus
,
.navTopBar
:focus
,
.navTopBar.is-active
{
.navTopBar.is-active
,
.isActive
{
outline
:
none
;
outline
:
none
;
background-image
:
url("../../assets/logo/item-background.png")
;
background-image
:
url("../../assets/logo/item-background.png")
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
...
@@ -325,4 +375,7 @@ export default {
...
@@ -325,4 +375,7 @@ export default {
}
}
// height: 100px;
// height: 100px;
}
}
.noBg
{
background
:
none
!
important
;
}
</
style
>
</
style
>
gassafety-web/src/utils/gaodeMap.js
View file @
5a6684ee
...
@@ -56,7 +56,7 @@ class gaodeMap {
...
@@ -56,7 +56,7 @@ class gaodeMap {
showLabel
:
true
,
showLabel
:
true
,
// labelzIndex: 110,
// labelzIndex: 110,
pitch
:
8
,
pitch
:
8
,
zoom
:
9
,
zoom
:
12
,
mapStyle
,
mapStyle
,
// mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
// mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
...
@@ -341,7 +341,7 @@ class gaodeMap {
...
@@ -341,7 +341,7 @@ class gaodeMap {
this
.
markers
.
splice
(
this
.
changePolineListNum
,
0
,
marker
);
this
.
markers
.
splice
(
this
.
changePolineListNum
,
0
,
marker
);
this
.
changePolineListNum
=
null
;
this
.
changePolineListNum
=
null
;
}
}
map
.
setZoom
(
"1
1
"
);
map
.
setZoom
(
"1
2
"
);
//map.setFitView();
//map.setFitView();
function
infoClose
(
e
)
{
function
infoClose
(
e
)
{
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
5a6684ee
...
@@ -76,7 +76,7 @@ class gaodeMap {
...
@@ -76,7 +76,7 @@ class gaodeMap {
showLabel
:
true
,
showLabel
:
true
,
// labelzIndex: 110,
// labelzIndex: 110,
pitch
:
8
,
pitch
:
8
,
zoom
:
9
,
zoom
:
13
,
//mapStyle: 'amap://styles/darkblue',
//mapStyle: 'amap://styles/darkblue',
mapStyle
mapStyle
});
});
...
@@ -427,7 +427,7 @@ class gaodeMap {
...
@@ -427,7 +427,7 @@ class gaodeMap {
// 如果这个值为false说明不是workerpoint,就push进去
// 如果这个值为false说明不是workerpoint,就push进去
if
(
!
marker
.
workerPoint
)
{
if
(
!
marker
.
workerPoint
)
{
this
.
markers
.
push
(
marker
);
this
.
markers
.
push
(
marker
);
map
.
setZoom
(
"1
1
"
);
map
.
setZoom
(
"1
3
"
);
}
}
//map.setFitView();
//map.setFitView();
...
...
gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue
View file @
5a6684ee
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<el-row
style=
"width: 100%;height: 40px;"
>
<el-row
style=
"width: 100%;height: 40px;"
>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<div
style=
""
>
<div
style=
""
>
<ul><li
style=
"list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;"
>
报警信息
管理
详情
</li></ul>
<ul><li
style=
"list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;"
>
报警信息详情
</li></ul>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
</el-col>
</el-col>
</el-row>
</el-row>
<
template
v-if=
"$route.query.deviceType!='管道'"
>
<
template
v-if=
"$route.query.deviceType!='管道'
&& form.deviceType != '管道'
"
>
<el-row
v-if=
"form.deviceType != '压力表'"
>
<el-row
v-if=
"form.deviceType != '压力表'"
>
<el-col
:span=
"12"
style=
"padding: 10px;"
>
<el-col
:span=
"12"
style=
"padding: 10px;"
>
<div
id=
"main1"
style=
"height:300px;background-color: rgb(247 247 247);padding: 5px;"
>
<div
id=
"main1"
style=
"height:300px;background-color: rgb(247 247 247);padding: 5px;"
>
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
5a6684ee
...
@@ -945,13 +945,20 @@ export default {
...
@@ -945,13 +945,20 @@ export default {
}
else
{
}
else
{
this
.
gaoMap
.
markerShow
(
8
,
false
);
this
.
gaoMap
.
markerShow
(
8
,
false
);
}
}
// 值班人员
if
(
this
.
leftBarNum
.
includes
(
9
))
{
if
(
this
.
leftBarNum
.
includes
(
9
))
{
this
.
gaoMap
.
markerShow
(
9
,
true
);
this
.
gaoMap
.
markerShow
(
9
,
true
);
// this.panTo(item);
// this.panTo(item);
}
else
{
}
else
{
this
.
gaoMap
.
markerShow
(
9
,
false
);
this
.
gaoMap
.
markerShow
(
9
,
false
);
}
}
// 摄像头
if
(
this
.
leftBarNum
.
includes
(
10
))
{
this
.
gaoMap
.
markerShow
(
10
,
true
);
// this.panTo(item);
}
else
{
this
.
gaoMap
.
markerShow
(
10
,
false
);
}
},
},
panTo
(
item
,
bool
)
{
panTo
(
item
,
bool
)
{
this
.
gaoMap
.
myMap
.
setZoom
(
12
);
this
.
gaoMap
.
myMap
.
setZoom
(
12
);
...
...
gassafety-web/src/views/workOrder/detail/index.vue
View file @
5a6684ee
...
@@ -187,17 +187,17 @@
...
@@ -187,17 +187,17 @@
<div
class=
"feedbackTime-div"
>
<div
class=
"feedbackTime-div"
>
<div
class=
"feedbackTime"
>
<div
class=
"feedbackTime"
>
<el-image
:src=
"activity.pictureUrl1"
:preview-src-list=
"[activity.pictureUrl1]"
<el-image
:src=
"activity.pictureUrl1"
:preview-src-list=
"[activity.pictureUrl1]"
v-if=
"activity.pictureUrl1 != null && activity.pictureUrl1 != ''"
style=
"width: 100%;"
>
v-if=
"activity.pictureUrl1 != null && activity.pictureUrl1 != ''"
:z-index=
"9999"
style=
"width: 100%;"
>
</el-image>
</el-image>
</div>
</div>
<div
class=
"feedbackTime"
>
<div
class=
"feedbackTime"
>
<el-image
:src=
"activity.pictureUrl2"
:preview-src-list=
"[activity.pictureUrl2]"
<el-image
:src=
"activity.pictureUrl2"
:preview-src-list=
"[activity.pictureUrl2]"
v-if=
"activity.pictureUrl2 != null && activity.pictureUrl2 != ''"
style=
"width: 100%;"
>
v-if=
"activity.pictureUrl2 != null && activity.pictureUrl2 != ''"
:z-index=
"9999"
style=
"width: 100%;"
>
</el-image>
</el-image>
</div>
</div>
<div
class=
"feedbackTime"
>
<div
class=
"feedbackTime"
>
<el-image
:src=
"activity.pictureUrl3"
:preview-src-list=
"[activity.pictureUrl3]"
<el-image
:src=
"activity.pictureUrl3"
:preview-src-list=
"[activity.pictureUrl3]"
v-if=
"activity.pictureUrl3 != null && activity.pictureUrl3 != ''"
style=
"width: 100%;"
>
v-if=
"activity.pictureUrl3 != null && activity.pictureUrl3 != ''"
:z-index=
"9999"
style=
"width: 100%;"
>
</el-image>
</el-image>
</div>
</div>
</div>
</div>
...
...
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