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
f747ed7b
Commit
f747ed7b
authored
Aug 18, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Plain Diff
详情布局优化
parents
928bd1ab
ee8f7bd4
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1513 additions
and
506 deletions
+1513
-506
TDeviceInfoController.java
...m/zehong/web/controller/device/TDeviceInfoController.java
+4
-3
TPipeController.java
...ava/com/zehong/web/controller/device/TPipeController.java
+5
-4
TDeviceInfo.java
...m/src/main/java/com/zehong/system/domain/TDeviceInfo.java
+6
-6
DeviceInfoVo.java
...c/main/java/com/zehong/system/domain/vo/DeviceInfoVo.java
+293
-0
PipeVo.java
...tem/src/main/java/com/zehong/system/domain/vo/PipeVo.java
+217
-0
TDeviceInfoMapper.java
...main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
+2
-2
TPipeMapper.java
...m/src/main/java/com/zehong/system/mapper/TPipeMapper.java
+0
-8
ITDeviceInfoService.java
...n/java/com/zehong/system/service/ITDeviceInfoService.java
+3
-2
ITPipeService.java
...rc/main/java/com/zehong/system/service/ITPipeService.java
+3
-2
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+45
-17
TPipeServiceImpl.java
...java/com/zehong/system/service/impl/TPipeServiceImpl.java
+51
-5
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+7
-8
TPipeMapper.xml
...y-system/src/main/resources/mapper/system/TPipeMapper.xml
+0
-5
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+5
-5
index.vue
gassafety-web/src/components/TopNav/index.vue
+22
-5
index.vue
gassafety-web/src/components/mapDialog/index.vue
+135
-0
index.js
gassafety-web/src/router/index.js
+19
-5
permission.js
gassafety-web/src/store/modules/permission.js
+2
-1
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+30
-18
index.vue
gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue
+23
-285
index.vue
gassafety-web/src/views/device/deviceInfo/index.vue
+106
-62
index.vue
gassafety-web/src/views/device/deviceInfoDetail/index.vue
+183
-0
index.vue
gassafety-web/src/views/device/pipe/index.vue
+75
-48
index.vue
gassafety-web/src/views/device/pipeDetail/index.vue
+169
-0
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+10
-15
index.vue
gassafety-web/src/views/statistics/ind/index.vue
+98
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/device/TDeviceInfoController.java
View file @
f747ed7b
...
...
@@ -7,6 +7,7 @@ import com.zehong.common.core.page.TableDataInfo;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.vo.DeviceInfoVo
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -36,7 +37,7 @@ public class TDeviceInfoController extends BaseController
public
TableDataInfo
list
(
TDeviceInfo
tDeviceInfo
)
{
startPage
();
List
<
TDeviceInf
o
>
list
=
tDeviceInfoService
.
selectTDeviceInfoList
(
tDeviceInfo
);
List
<
DeviceInfoV
o
>
list
=
tDeviceInfoService
.
selectTDeviceInfoList
(
tDeviceInfo
);
return
getDataTable
(
list
);
}
...
...
@@ -84,8 +85,8 @@ public class TDeviceInfoController extends BaseController
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDeviceInfo
tDeviceInfo
)
{
List
<
TDeviceInf
o
>
list
=
tDeviceInfoService
.
selectTDeviceInfoList
(
tDeviceInfo
);
ExcelUtil
<
TDeviceInfo
>
util
=
new
ExcelUtil
<
TDeviceInfo
>(
TDeviceInf
o
.
class
);
List
<
DeviceInfoV
o
>
list
=
tDeviceInfoService
.
selectTDeviceInfoList
(
tDeviceInfo
);
ExcelUtil
<
DeviceInfoVo
>
util
=
new
ExcelUtil
<
DeviceInfoVo
>(
DeviceInfoV
o
.
class
);
return
util
.
exportExcel
(
list
,
"设备信息数据"
);
}
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/device/TPipeController.java
View file @
f747ed7b
...
...
@@ -7,6 +7,7 @@ import com.zehong.common.core.page.TableDataInfo;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.PipeVo
;
import
com.zehong.system.service.ITPipeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -35,7 +36,7 @@ public class TPipeController extends BaseController
public
TableDataInfo
list
(
TPipe
tPipe
)
{
startPage
();
List
<
TPipe
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
List
<
PipeVo
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
return
getDataTable
(
list
);
}
...
...
@@ -43,7 +44,7 @@ public class TPipeController extends BaseController
@GetMapping
(
"/pipeAllInfoList"
)
public
AjaxResult
pipeAllInfoList
(
TPipe
tPipe
)
{
List
<
TPipe
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
List
<
PipeVo
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
return
AjaxResult
.
success
(
list
);
}
...
...
@@ -55,8 +56,8 @@ public class TPipeController extends BaseController
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TPipe
tPipe
)
{
List
<
TPipe
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
ExcelUtil
<
TPipe
>
util
=
new
ExcelUtil
<
TPipe
>(
TPipe
.
class
);
List
<
PipeVo
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
ExcelUtil
<
PipeVo
>
util
=
new
ExcelUtil
<
PipeVo
>(
PipeVo
.
class
);
return
util
.
exportExcel
(
list
,
"管道信息数据"
);
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TDeviceInfo.java
View file @
f747ed7b
...
...
@@ -27,7 +27,7 @@ public class TDeviceInfo extends BaseEntity
/** 所属管道编号 */
@Excel
(
name
=
"所属管道编号"
)
private
String
pipeCode
;
private
int
pipeId
;
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
...
...
@@ -109,14 +109,14 @@ public class TDeviceInfo extends BaseEntity
{
return
enterpriseId
;
}
public
void
setPipe
Code
(
String
pipeCode
)
public
void
setPipe
Id
(
int
pipeId
)
{
this
.
pipe
Code
=
pipeCode
;
this
.
pipe
Id
=
pipeId
;
}
public
String
getPipeCode
()
public
int
getPipeId
()
{
return
pipe
Code
;
return
pipe
Id
;
}
public
void
setDeviceName
(
String
deviceName
)
{
...
...
@@ -259,7 +259,7 @@ public class TDeviceInfo extends BaseEntity
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"enterpriseId"
,
getEnterpriseId
())
.
append
(
"pipeCode"
,
getPipe
Code
())
.
append
(
"pipeCode"
,
getPipe
Id
())
.
append
(
"deviceName"
,
getDeviceName
())
.
append
(
"deviceCode"
,
getDeviceCode
())
.
append
(
"deviceAddr"
,
getDeviceAddr
())
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/DeviceInfoVo.java
0 → 100644
View file @
f747ed7b
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 设备信息对象 t_device_info
*
* @author zehong
* @date 2021-07-09
*/
public
class
DeviceInfoVo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 设备id */
private
Integer
deviceId
;
/** 企业id */
@Excel
(
name
=
"企业id"
)
private
Integer
enterpriseId
;
/** 所属管道编号 */
@Excel
(
name
=
"所属管道编号"
)
private
int
pipeId
;
/** 所属管道名称 */
@Excel
(
name
=
"所属管道名称"
)
private
String
pipeName
;
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
/** 设备编号 */
@Excel
(
name
=
"设备编号"
)
private
String
deviceCode
;
/** 所在地址 */
@Excel
(
name
=
"所在地址"
)
private
String
deviceAddr
;
/** 设备型号 */
@Excel
(
name
=
"设备型号"
)
private
String
deviceModel
;
/** 设备类型(1调压阀,2阀门井,3流量计,4压力表) */
@Excel
(
name
=
"设备类型"
)
private
String
deviceType
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
/** 纬度 */
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
/** 物联网编号 */
@Excel
(
name
=
"物联网编号"
)
private
String
iotNo
;
/** 设备图片路径 */
@Excel
(
name
=
"设备图片路径"
)
private
String
iconUrl
;
/** 联系人 */
@Excel
(
name
=
"联系人"
)
private
String
linkman
;
/** 电话 */
@Excel
(
name
=
"电话"
)
private
String
phone
;
/** 安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
installationTime
;
/** 最后巡检时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
inspectionTime
;
/** 是否删除 */
@Excel
(
name
=
"是否删除"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setDeviceId
(
Integer
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
Integer
getDeviceId
()
{
return
deviceId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
int
getPipeId
()
{
return
pipeId
;
}
public
void
setPipeId
(
int
pipeId
)
{
this
.
pipeId
=
pipeId
;
}
public
String
getPipeName
()
{
return
pipeName
;
}
public
void
setPipeName
(
String
pipeName
)
{
this
.
pipeName
=
pipeName
;
}
public
void
setDeviceName
(
String
deviceName
)
{
this
.
deviceName
=
deviceName
;
}
public
String
getDeviceName
()
{
return
deviceName
;
}
public
String
getDeviceCode
()
{
return
deviceCode
;
}
public
void
setDeviceCode
(
String
deviceCode
)
{
this
.
deviceCode
=
deviceCode
;
}
public
void
setDeviceAddr
(
String
deviceAddr
)
{
this
.
deviceAddr
=
deviceAddr
;
}
public
String
getDeviceAddr
()
{
return
deviceAddr
;
}
public
void
setDeviceModel
(
String
deviceModel
)
{
this
.
deviceModel
=
deviceModel
;
}
public
String
getDeviceModel
()
{
return
deviceModel
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setIotNo
(
String
iotNo
)
{
this
.
iotNo
=
iotNo
;
}
public
String
getIotNo
()
{
return
iotNo
;
}
public
void
setIconUrl
(
String
iconUrl
)
{
this
.
iconUrl
=
iconUrl
;
}
public
String
getIconUrl
()
{
return
iconUrl
;
}
public
void
setLinkman
(
String
linkman
)
{
this
.
linkman
=
linkman
;
}
public
String
getLinkman
()
{
return
linkman
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setInstallationTime
(
Date
installationTime
)
{
this
.
installationTime
=
installationTime
;
}
public
Date
getInstallationTime
()
{
return
installationTime
;
}
public
void
setInspectionTime
(
Date
inspectionTime
)
{
this
.
inspectionTime
=
inspectionTime
;
}
public
Date
getInspectionTime
()
{
return
inspectionTime
;
}
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
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"enterpriseId"
,
getEnterpriseId
())
.
append
(
"pipeId"
,
getPipeId
())
.
append
(
"pipeName"
,
getPipeName
())
.
append
(
"deviceName"
,
getDeviceName
())
.
append
(
"deviceCode"
,
getDeviceCode
())
.
append
(
"deviceAddr"
,
getDeviceAddr
())
.
append
(
"deviceModel"
,
getDeviceModel
())
.
append
(
"deviceType"
,
getDeviceType
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"iotNo"
,
getIotNo
())
.
append
(
"iconUrl"
,
getIconUrl
())
.
append
(
"linkman"
,
getLinkman
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"installationTime"
,
getInstallationTime
())
.
append
(
"inspectionTime"
,
getInspectionTime
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafety-system/src/main/java/com/zehong/system/domain/vo/PipeVo.java
0 → 100644
View file @
f747ed7b
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.system.domain.TDeviceInfo
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
import
java.util.List
;
/**
* 管道信息对象 t_pipe
*
* @author zehong
* @date 2021-07-08
*/
public
class
PipeVo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 管道id */
private
Integer
pipeId
;
/** 企业id */
@Excel
(
name
=
"企业id"
)
private
Integer
enterpriseId
;
/** 管道名称 */
@Excel
(
name
=
"管道名称"
)
private
String
pipeName
;
/** 管道编号 */
@Excel
(
name
=
"管道编号"
)
private
String
pipeCode
;
/** 设备列表 */
private
List
<
TDeviceInfo
>
deviceInfoList
;
/** 管道所在地址 */
@Excel
(
name
=
"管道所在地址"
)
private
String
pipeAddr
;
/** 坐标 */
@Excel
(
name
=
"坐标"
)
private
String
coordinates
;
/** 管道长度 */
@Excel
(
name
=
"管道长度"
)
private
double
pipeLength
;
/** 管道类型(1地埋管线、2地表管线) */
@Excel
(
name
=
"管道类型"
,
readConverterExp
=
"1地埋管线、2地表管线"
)
private
String
pipeType
;
/** 管道压力(低压,中压,次高压,高压) */
@Excel
(
name
=
"管道压力"
,
readConverterExp
=
"1低压,2中压,3次高压,4高压"
)
private
String
pipePressure
;
/** 设备图片路径 */
@Excel
(
name
=
"设备图片路径"
)
private
String
iconUrl
;
/** 安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
installationTime
;
/** 最后巡检时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
inspectionTime
;
/** 是否删除 */
@Excel
(
name
=
"是否删除"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setPipeId
(
Integer
pipeId
)
{
this
.
pipeId
=
pipeId
;
}
public
Integer
getPipeId
()
{
return
pipeId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setPipeName
(
String
pipeName
)
{
this
.
pipeName
=
pipeName
;
}
public
String
getPipeName
()
{
return
pipeName
;
}
public
String
getPipeCode
()
{
return
pipeCode
;
}
public
void
setPipeCode
(
String
pipeCode
)
{
this
.
pipeCode
=
pipeCode
;
}
public
List
<
TDeviceInfo
>
getDeviceInfoList
()
{
return
deviceInfoList
;
}
public
void
setDeviceInfoList
(
List
<
TDeviceInfo
>
deviceInfoList
)
{
this
.
deviceInfoList
=
deviceInfoList
;
}
public
void
setPipeAddr
(
String
pipeAddr
)
{
this
.
pipeAddr
=
pipeAddr
;
}
public
String
getPipeAddr
()
{
return
pipeAddr
;
}
public
void
setCoordinates
(
String
coordinates
)
{
this
.
coordinates
=
coordinates
;
}
public
String
getCoordinates
()
{
return
coordinates
;
}
public
void
setPipeLength
(
double
pipeLength
)
{
this
.
pipeLength
=
pipeLength
;
}
public
double
getPipeLength
()
{
return
pipeLength
;
}
public
void
setPipeType
(
String
pipeType
)
{
this
.
pipeType
=
pipeType
;
}
public
String
getPipeType
()
{
return
pipeType
;
}
public
void
setPipePressure
(
String
pipePressure
)
{
this
.
pipePressure
=
pipePressure
;
}
public
String
getPipePressure
()
{
return
pipePressure
;
}
public
void
setIconUrl
(
String
iconUrl
)
{
this
.
iconUrl
=
iconUrl
;
}
public
String
getIconUrl
()
{
return
iconUrl
;
}
public
void
setInstallationTime
(
Date
installationTime
)
{
this
.
installationTime
=
installationTime
;
}
public
Date
getInstallationTime
()
{
return
installationTime
;
}
public
void
setInspectionTime
(
Date
inspectionTime
)
{
this
.
inspectionTime
=
inspectionTime
;
}
public
Date
getInspectionTime
()
{
return
inspectionTime
;
}
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/mapper/TDeviceInfoMapper.java
View file @
f747ed7b
...
...
@@ -24,10 +24,10 @@ public interface TDeviceInfoMapper
/**
* 查询设备信息
*
* @param
deviceCode 设备信息
ID
* @param
pipeId 管道
ID
* @return 设备信息
*/
public
TDeviceInfo
selectTDeviceInfoByCode
(
String
deviceCode
);
public
List
<
TDeviceInfo
>
selectTDeviceInfoByPipeId
(
int
pipeId
);
/**
* 查询设备信息列表
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TPipeMapper.java
View file @
f747ed7b
...
...
@@ -19,14 +19,6 @@ public interface TPipeMapper
*/
public
TPipe
selectTPipeById
(
int
pipeId
);
/**
* 查询管道信息
*
* @param pipeCode 管道编号
* @return 管道信息
*/
public
TPipe
selectTPipeByCode
(
String
pipeCode
);
/**
* 查询管道信息列表
*
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITDeviceInfoService.java
View file @
f747ed7b
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
java.util.Map
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.vo.DeviceInfoVo
;
/**
* 设备信息Service接口
...
...
@@ -19,7 +20,7 @@ public interface ITDeviceInfoService
* @param deviceId 设备信息ID
* @return 设备信息
*/
public
TDeviceInf
o
selectTDeviceInfoById
(
int
deviceId
);
public
DeviceInfoV
o
selectTDeviceInfoById
(
int
deviceId
);
/**
* 查询设备信息列表
...
...
@@ -27,7 +28,7 @@ public interface ITDeviceInfoService
* @param tDeviceInfo 设备信息
* @return 设备信息集合
*/
public
List
<
TDeviceInf
o
>
selectTDeviceInfoList
(
TDeviceInfo
tDeviceInfo
);
public
List
<
DeviceInfoV
o
>
selectTDeviceInfoList
(
TDeviceInfo
tDeviceInfo
);
/**
* 构建前端所需要下拉树结构
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITPipeService.java
View file @
f747ed7b
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.PipeVo
;
/**
* 管道信息Service接口
...
...
@@ -17,7 +18,7 @@ public interface ITPipeService
* @param pipeId 管道信息ID
* @return 管道信息
*/
public
TPipe
selectTPipeById
(
int
pipeId
);
public
PipeVo
selectTPipeById
(
int
pipeId
);
/**
* 查询管道信息列表
...
...
@@ -25,7 +26,7 @@ public interface ITPipeService
* @param tPipe 管道信息
* @return 管道信息集合
*/
public
List
<
TPipe
>
selectTPipeList
(
TPipe
tPipe
);
public
List
<
PipeVo
>
selectTPipeList
(
TPipe
tPipe
);
/**
* 统计管道总长度
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
f747ed7b
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.*
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.DeviceInfoVo
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TPipeMapper
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 设备信息Service业务层处理
...
...
@@ -31,9 +36,16 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @return 设备信息
*/
@Override
public
TDeviceInf
o
selectTDeviceInfoById
(
int
deviceId
)
public
DeviceInfoV
o
selectTDeviceInfoById
(
int
deviceId
)
{
return
tDeviceInfoMapper
.
selectTDeviceInfoById
(
deviceId
);
DeviceInfoVo
deviceInfoVo
=
new
DeviceInfoVo
();
TDeviceInfo
tDeviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
deviceId
);
BeanUtils
.
copyProperties
(
tDeviceInfo
,
deviceInfoVo
);
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
tDeviceInfo
.
getPipeId
());
deviceInfoVo
.
setPipeName
(
pipe
.
getPipeName
());
return
deviceInfoVo
;
}
/**
...
...
@@ -43,9 +55,25 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @return 设备信息
*/
@Override
public
List
<
TDeviceInf
o
>
selectTDeviceInfoList
(
TDeviceInfo
tDeviceInfo
)
public
List
<
DeviceInfoV
o
>
selectTDeviceInfoList
(
TDeviceInfo
tDeviceInfo
)
{
return
tDeviceInfoMapper
.
selectTDeviceInfoList
(
tDeviceInfo
);
List
<
DeviceInfoVo
>
list
=
new
ArrayList
<>();
List
<
TDeviceInfo
>
deviceInfoList
=
tDeviceInfoMapper
.
selectTDeviceInfoList
(
tDeviceInfo
);
if
(
deviceInfoList
.
size
()
!=
0
){
for
(
TDeviceInfo
device
:
deviceInfoList
){
DeviceInfoVo
deviceInfoVo
=
new
DeviceInfoVo
();
BeanUtils
.
copyProperties
(
device
,
deviceInfoVo
);
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
device
.
getPipeId
());
deviceInfoVo
.
setPipeName
(
pipe
.
getPipeName
());
list
.
add
(
deviceInfoVo
);
}
}
return
list
;
}
/**
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TPipeServiceImpl.java
View file @
f747ed7b
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.vo.PipeVo
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.service.ISysDictTypeService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TPipeMapper
;
...
...
@@ -18,7 +27,8 @@ public class TPipeServiceImpl implements ITPipeService
{
@Autowired
private
TPipeMapper
tPipeMapper
;
@Autowired
private
TDeviceInfoMapper
tDeviceInfoMapper
;
/**
* 查询管道信息
*
...
...
@@ -26,9 +36,18 @@ public class TPipeServiceImpl implements ITPipeService
* @return 管道信息
*/
@Override
public
TPipe
selectTPipeById
(
int
pipeId
)
public
PipeVo
selectTPipeById
(
int
pipeId
)
{
return
tPipeMapper
.
selectTPipeById
(
pipeId
);
PipeVo
pipeVo
=
new
PipeVo
();
TPipe
tPipe
=
tPipeMapper
.
selectTPipeById
(
pipeId
);
BeanUtils
.
copyProperties
(
tPipe
,
pipeVo
);
List
<
TDeviceInfo
>
deviceInfoList
=
tDeviceInfoMapper
.
selectTDeviceInfoByPipeId
(
tPipe
.
getPipeId
());
if
(
deviceInfoList
.
size
()
!=
0
)
{
pipeVo
.
setDeviceInfoList
(
deviceInfoList
);
}
return
pipeVo
;
}
/**
...
...
@@ -38,9 +57,26 @@ public class TPipeServiceImpl implements ITPipeService
* @return 管道信息
*/
@Override
public
List
<
TPipe
>
selectTPipeList
(
TPipe
tPipe
)
public
List
<
PipeVo
>
selectTPipeList
(
TPipe
tPipe
)
{
return
tPipeMapper
.
selectTPipeList
(
tPipe
);
List
<
PipeVo
>
list
=
new
ArrayList
<>();
List
<
TPipe
>
tPipeList
=
tPipeMapper
.
selectTPipeList
(
tPipe
);
if
(
tPipeList
.
size
()
!=
0
){
for
(
TPipe
pipe
:
tPipeList
){
PipeVo
pipeVo
=
new
PipeVo
();
BeanUtils
.
copyProperties
(
pipe
,
pipeVo
);
List
<
TDeviceInfo
>
deviceInfoList
=
tDeviceInfoMapper
.
selectTDeviceInfoByPipeId
(
pipe
.
getPipeId
());
if
(
deviceInfoList
.
size
()
!=
0
)
{
pipeVo
.
setDeviceInfoList
(
deviceInfoList
);
}
list
.
add
(
pipeVo
);
}
}
return
list
;
}
/**
...
...
@@ -73,6 +109,16 @@ public class TPipeServiceImpl implements ITPipeService
@Override
public
int
updateTPipe
(
TPipe
tPipe
)
{
if
(
"1"
.
equals
(
tPipe
.
getIsDel
())){
List
<
TDeviceInfo
>
tDeviceInfoList
=
tDeviceInfoMapper
.
selectTDeviceInfoByPipeId
(
tPipe
.
getPipeId
());
if
(
tDeviceInfoList
.
size
()
!=
0
)
{
for
(
TDeviceInfo
device
:
tDeviceInfoList
)
{
device
.
setIsDel
(
"1"
);
tDeviceInfoMapper
.
updateTDeviceInfo
(
device
);
}
}
}
return
tPipeMapper
.
updateTPipe
(
tPipe
);
}
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
f747ed7b
...
...
@@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"TDeviceInfo"
id=
"TDeviceInfoResult"
>
<result
property=
"deviceId"
column=
"device_id"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"pipe
Code"
column=
"pipe_code
"
/>
<result
property=
"pipe
Id"
column=
"pipe_id
"
/>
<result
property=
"deviceName"
column=
"device_name"
/>
<result
property=
"deviceCode"
column=
"device_code"
/>
<result
property=
"deviceAddr"
column=
"device_addr"
/>
...
...
@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTDeviceInfoVo"
>
select device_id, enterprise_id, pipe_
code
, device_name, device_code, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, is_del, remarks from t_device_info
select device_id, enterprise_id, pipe_
id
, device_name, device_code, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, is_del, remarks from t_device_info
</sql>
<select
id=
"selectTDeviceInfoList"
parameterType=
"TDeviceInfo"
resultMap=
"TDeviceInfoResult"
>
...
...
@@ -34,7 +34,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
is_del = '0'
<if
test=
"enterpriseId != null and enterpriseId != 0 "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"pipeCode != null "
>
and pipe_code = #{pipeCode}
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and device_code like concat('%', #{deviceCode}, '%')
</if>
<if
test=
"deviceAddr != null and deviceAddr != ''"
>
and device_addr = #{deviceAddr}
</if>
...
...
@@ -57,9 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where device_id = #{deviceId}
</select>
<select
id=
"selectTDeviceInfoBy
Code"
parameterType=
"String
"
resultMap=
"TDeviceInfoResult"
>
<select
id=
"selectTDeviceInfoBy
PipeId"
parameterType=
"int
"
resultMap=
"TDeviceInfoResult"
>
<include
refid=
"selectTDeviceInfoVo"
/>
where
device_code = #{deviceCode
}
where
pipe_id = #{pipeId
}
</select>
<select
id=
"countDeviceByType"
resultType=
"map"
>
...
...
@@ -72,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_device_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null and enterpriseId != 0"
>
enterprise_id,
</if>
<if
test=
"pipe
Code != null"
>
pipe_code
,
</if>
<if
test=
"pipe
Id != null"
>
pipe_id
,
</if>
<if
test=
"deviceName != null"
>
device_name,
</if>
<if
test=
"deviceCode != null"
>
device_code,
</if>
<if
test=
"deviceAddr != null"
>
device_addr,
</if>
...
...
@@ -90,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null and enterpriseId != 0"
>
#{enterpriseId},
</if>
<if
test=
"pipe
Code != null"
>
#{pipeCode
},
</if>
<if
test=
"pipe
Id != null"
>
#{pipeId
},
</if>
<if
test=
"deviceName != null"
>
#{deviceName},
</if>
<if
test=
"deviceCode != null"
>
#{deviceCode},
</if>
<if
test=
"deviceAddr != null"
>
#{deviceAddr},
</if>
...
...
@@ -112,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_device_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null and enterpriseId != 0"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"pipe
Code != null"
>
pipe_code = #{pipeCode
},
</if>
<if
test=
"pipe
Id != null"
>
pipe_id = #{pipeId
},
</if>
<if
test=
"deviceName != null"
>
device_name = #{deviceName},
</if>
<if
test=
"deviceCode != null"
>
device_code = #{deviceCode},
</if>
<if
test=
"deviceAddr != null"
>
device_addr = #{deviceAddr},
</if>
...
...
gassafety-system/src/main/resources/mapper/system/TPipeMapper.xml
View file @
f747ed7b
...
...
@@ -48,11 +48,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where pipe_id = #{pipeId}
</select>
<select
id=
"selectTPipeByCode"
parameterType=
"String"
resultMap=
"TPipeResult"
>
<include
refid=
"selectTPipeVo"
/>
where pipe_code = #{pipeCode}
</select>
<select
id=
"countPipeLength"
resultType=
"double"
>
select sum(pipe_length) from t_pipe
where is_del = '0'
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
f747ed7b
...
...
@@ -8,17 +8,17 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"所属管道"
prop=
"pipe
Code
"
>
<el-form-item
label=
"所属管道"
prop=
"pipe
Id
"
>
<el-select
v-model=
"form.pipe
Code
"
v-model=
"form.pipe
Id
"
placeholder=
"请选择所属管道"
style=
"width: 100%"
>
<el-option
v-for=
"item in pipeList"
:key=
"item.pipe
Code
"
:key=
"item.pipe
Id
"
:label=
"item.pipeName"
:value=
"item.pipe
Code
"
:value=
"item.pipe
Id
"
>
</el-option>
</el-select>
...
...
@@ -159,7 +159,7 @@ export default {
fileArr
:
[],
pipeList
:
[],
rules
:
{
pipe
Code
:
[
pipe
Id
:
[
{
required
:
true
,
message
:
"请选择所属管道"
,
trigger
:
"blur"
},
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
...
...
gassafety-web/src/components/TopNav/index.vue
View file @
f747ed7b
...
...
@@ -146,13 +146,13 @@ export default {
}
else
{
// 显示左侧联动菜单
path
=
this
.
activeRoutes
(
key
);
console
.
log
(
path
)
console
.
log
(
this
.
$route
.
path
)
console
.
log
(
path
)
;
console
.
log
(
this
.
$route
.
path
)
;
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
if
(
path
[
0
].
path
)
{
if
(
path
[
0
].
path
)
{
this
.
$router
.
push
(
path
[
0
].
path
);
}
else
{
if
(
path
[
0
].
path
==
""
&&
this
.
$route
.
path
==
"/index"
)
return
;
}
else
{
if
(
path
[
0
].
path
==
""
&&
this
.
$route
.
path
==
"/index"
)
return
;
this
.
$router
.
push
(
"/index"
);
}
}
...
...
@@ -207,6 +207,22 @@ export default {
font-weight
:
600
;
text-shadow
:
0px
2px
3px
rgba
(
0
,
0
,
0
,
0
.2
);
padding
:
0
5px
;
border-bottom
:
none
;
position
:
relative
;
&
:after
{
content
:
""
;
position
:
absolute
;
width
:
2px
;
height
:
38px
;
background
:
radial-gradient
(
circle
,
#ffffff
0%
,
rgba
(
255
,
255
,
255
,
0
)
100%
);
right
:
-20px
;
top
:
21px
;
opacity
:
1
;
}
}
.el-menu--horizontal
>
.el-menu-item.is-active
{
...
...
@@ -219,6 +235,7 @@ export default {
.el-menu--horizontal
>
.el-submenu
.el-submenu__title
{
height
:
50px
!
important
;
line-height
:
50px
!
important
;
margin-left
:
15px
;
}
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:hover
,
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:focus
{
...
...
gassafety-web/src/components/mapDialog/index.vue
0 → 100644
View file @
f747ed7b
<
template
>
<el-dialog
title=
"拾取坐标"
:visible
.
sync=
"dialogTableVisible"
:show-close=
"false"
:close-on-click-modal=
"false"
>
<el-row
class=
"lt"
>
经纬度:
<el-input
placeholder=
"经度"
v-model
.
number=
"lnglat.lng"
type=
"number"
></el-input>
<el-input
placeholder=
"纬度"
v-model
.
number=
"lnglat.lat"
type=
"number"
></el-input>
<el-button
type=
"primary"
size=
"small"
@
click=
"confirmFun"
>
确定
</el-button
>
<el-button
size=
"small"
@
click=
"$emit('dialogcancelFun')"
>
取消
</el-button
>
</el-row>
<div
style=
"width: 47vw; height: 57vh"
id=
"container"
></div>
<el-col
:span=
"8"
class=
"button"
>
<el-input
id=
"ss"
placeholder=
"输入地址"
v-model=
"keyWorld"
></el-input><el-button
size=
"small"
type=
"primary"
icon=
"el-icon-search"
@
click=
"search"
style=
"position: fixed;margin-left: 3px;"
>
搜索
</el-button>
</el-col>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
dialogTableVisible
:
false
,
slat
:
0
,
slng
:
0
},
data
(){
return
{
lnglat
:
{
lat
:
""
,
lng
:
""
},
keyWorld
:
""
}
},
mounted
(){
let
that
=
this
;
that
.
$nextTick
(()
=>
{
//初始化地图
let
map
=
new
AMap
.
Map
(
"container"
,
{
center
:
[
114.72995
,
38.37417
],
// resizeEnable: true,
disableSocket
:
true
,
viewMode
:
"3D"
,
showLabel
:
true
,
pitch
:
8
,
zoom
:
10
});
map
.
setFitView
();
//坐标回显
if
(
typeof
that
.
slng
==
"number"
&&
that
.
slng
!=
0
)
{
that
.
lnglat
.
lng
=
that
.
slng
;
that
.
lnglat
.
lat
=
that
.
slat
;
let
marker
=
new
AMap
.
Marker
({
position
:
[
that
.
slng
,
that
.
slat
]
});
marker
.
setMap
(
map
);
map
.
setCenter
([
that
.
slng
,
that
.
slat
]);
}
//点击获取坐标点
var
mouseTool
=
new
AMap
.
MouseTool
(
map
);
//监听draw事件可获取画好的覆盖物
var
overlays
=
[];
mouseTool
.
on
(
'draw'
,
function
(
e
){
map
.
remove
(
overlays
);
overlays
.
push
(
e
.
obj
);
that
.
lnglat
.
lat
=
e
.
obj
.
_position
.
lat
;
that
.
lnglat
.
lng
=
e
.
obj
.
_position
.
lng
;
})
that
.
draw
(
mouseTool
);
//搜索功能
AMap
.
plugin
([
"AMap.AutoComplete"
,
"AMap.PlaceSearch"
],
function
()
{
that
.
placeSearch
=
new
AMap
.
PlaceSearch
({
map
:
map
});
});
})
},
methods
:{
confirmFun
(){
this
.
$emit
(
'confirmFun'
,
this
.
lnglat
);
this
.
$emit
(
'dialogcancelFun'
);
},
draw
(
mouseTool
){
mouseTool
.
marker
({
//同Marker的Option设置
});
},
search
(){
this
.
placeSearch
.
search
(
this
.
keyWorld
);
//关键字查询查询
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.lt
{
margin-bottom
:
10px
;
}
.lt
.el-input
{
width
:
180px
;
margin-right
:
15px
;
display
:
inline-block
;
}
.button
{
position
:
relative
;
top
:
-393px
;
left
:
14px
;
}
.button
.el-input
{
width
:
180px
;
margin-right
:
10px
;
display
:
inline-block
;
}
</
style
>
gassafety-web/src/router/index.js
View file @
f747ed7b
...
...
@@ -53,16 +53,30 @@ export const constantRoutes = [
component
:
(
resolve
)
=>
require
([
'@/views/error/401'
],
resolve
),
hidden
:
true
},
// {
// path: '',
// component: Layout,
// redirect: 'index',
// children: [
// {
// path: 'index',
// component: (resolve) => require(['@/views/index_v1'], resolve),
// name: '首页',
// meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
// }
// ]
// },
// 首页改成地图
{
path
:
''
,
component
:
Layout
,
redirect
:
'
index
'
,
redirect
:
'
/enterprise/mapView
'
,
children
:
[
{
path
:
'
index
'
,
component
:
(
resolve
)
=>
require
([
'@/views/
index_v1
'
],
resolve
),
name
:
'首页'
,
meta
:
{
title
:
'首页'
,
icon
:
'dashboard'
,
noCache
:
true
,
affix
:
true
}
path
:
'
/enterprise/mapView
'
,
component
:
(
resolve
)
=>
require
([
'@/views/
enterprise/mapView
'
],
resolve
),
//
name: '首页',
//
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
}
]
},
...
...
gassafety-web/src/store/modules/permission.js
View file @
f747ed7b
...
...
@@ -26,7 +26,8 @@ const permission = {
path
:
'index'
,
meta
:
{
title
:
'统计报表'
,
icon
:
'dashboard'
}
}]
state
.
topbarRouters
=
routes
.
concat
(
index
);
// state.topbarRouters = routes.concat(index);
state
.
topbarRouters
=
routes
;
},
SET_SIDEBAR_ROUTERS
:
(
state
,
routes
)
=>
{
state
.
sidebarRouters
=
routes
;
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
f747ed7b
...
...
@@ -51,6 +51,8 @@ class gaodeMap {
view
=
null
;
handleInfoWindowOpenFunc
=
null
;
onceFlag
=
false
;
//构造函数中设置中央点默认值
constructor
(
center
)
{
this
.
markers
=
[];
...
...
@@ -107,6 +109,16 @@ class gaodeMap {
this
.
handleInfoWindowOpenFunc
();
this
.
handleInfoWindowOpenFunc
=
null
;
}
// 刚进入页面的时候只调用一次,让左侧的抽屉在地图移动完之后显示
if
(
!
this
.
onceFlag
)
{
this
.
onceFlag
=
true
;
this
.
view
.
backFlag
=
false
;
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
true
;
this
.
myMap
.
setStatus
(
options
);
}
});
this
.
districtBoundaries
();
}
...
...
@@ -237,9 +249,9 @@ class gaodeMap {
// // infoWindow.close();
// that.workerManInfoWindow = infoWindow;
// });
marker
.
markerType
=
markerType
;
marker
.
markerType
=
markerType
;
marker
.
data
=
data
;
marker
.
infoWindow
=
infoWindow
;
marker
.
infoWindow
=
infoWindow
;
marker
.
on
(
"mouseover"
,
this
.
wokerManOpen
);
marker
.
on
(
"mousedown"
,
e
=>
{
// console.log(data);
...
...
@@ -346,17 +358,17 @@ class gaodeMap {
return
marker
;
}
wokerManOpen
=
(
e
)
=>
{
wokerManOpen
=
e
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
console
.
log
(
"e.target.getPosition()"
,
e
.
target
.
getExtData
())
console
.
log
(
"e.target.getPosition()"
,
e
.
target
.
getExtData
());
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
}
}
;
// 鼠标移入设备时候实行的函数
infoOpen
=
e
=>
{
...
...
@@ -724,7 +736,7 @@ class gaodeMap {
let
path
=
coordinates
?
eval
(
coordinates
)
:
[];
let
polyline
=
new
AMap
.
Polyline
({
path
,
strokeColor
:
"#
F7FE38
"
,
strokeColor
:
"#
2EE7E7
"
,
strokeWeight
:
4
,
strokeOpacity
:
0.9
,
zIndex
:
50
,
...
...
@@ -748,7 +760,7 @@ class gaodeMap {
polyline
.
on
(
"mouseout"
,
e
=>
{
// console.log("polyline.getExtData().lineData.alarmState",polyline.getExtData().lineData.alarmState)
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
return
;
polyline
.
setOptions
({
strokeColor
:
"#
F7FE38
"
});
polyline
.
setOptions
({
strokeColor
:
"#
2EE7E7
"
});
// infoWindow.close();
});
// 计算info的位置
...
...
@@ -1107,7 +1119,7 @@ class gaodeMap {
opstions
.
isState
=
0
;
item
.
setExtData
(
opstions
);
let
attr
=
item
.
getOptions
();
attr
.
strokeColor
=
"#
F7FE38
"
;
attr
.
strokeColor
=
"#
2EE7E7
"
;
item
.
setOptions
(
attr
);
});
}
...
...
gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue
View file @
f747ed7b
...
...
@@ -166,117 +166,42 @@
<
script
>
import
{
listDeviceAlarm
,
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
import
{
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
import
{
deviceTree
}
from
"@/api/device/deviceInfo"
;
import
gaodeMap
from
"utils/gaodeMap.js"
;
import
{
map
,
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
import
{
inspectorList
}
from
"@/api/system/user"
;
import
echarts
from
'echarts'
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
export
default
{
export
default
{
name
:
"DeviceAlarm"
,
components
:
{
},
data
()
{
return
{
order_list
:
[],
tableData
:
[{
date
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
},],
inspector
:
[],
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
rules
:
{},
// 报警信息表格数据
deviceAlarmList
:
[],
// 报警类型字典
typeOptions
:
[],
// 设备级联
options
:
[],
dataListdetail1
:
[],
dataListdetail2
:
[],
dataListdetail3
:
[],
props
:
{
multiple
:
true
,
value
:
"id"
,
label
:
"name"
,
level
:
"level"
,
children
:
"childList"
,
},
devices
:
null
,
// 巡检员列表
inspector
:
[],
alarmId
:
''
,
// 弹出层标题
alarmId
:
''
,
// 折线图标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
orderId
:
null
,
alarmType
:
null
,
alarmValue
:
null
,
startTime
:
null
,
endTime
:
null
,
dealStatus
:
null
},
// 表单参数
form
:
{
},
form
:
{
},
};
},
created
()
{
// 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数
this
.
alarmId
=
+
this
.
$route
.
query
.
alarmId
;
console
.
log
(
"query"
,
this
.
$route
.
query
.
alarmId
)
this
.
getList
();
this
.
getDicts
(
"t_order_status"
).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_order_type"
).
then
(
response
=>
{
this
.
ordertypeOptions
=
response
.
data
;
});
this
.
getDeviceAlarm
();
this
.
getDetail
();
},
mounted
()
{
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
this
.
gaoMap
=
gaoMap
;
// this.getDeviceAlarm();
},
methods
:
{
getInspectorList
()
{
this
.
loading
=
true
;
inspectorList
().
then
(
response
=>
{
this
.
inspector
=
response
.
data
;
this
.
loading
=
false
;
});
},
initData
(
getData1
,
getData2
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart1
=
echarts
.
init
(
document
.
getElementById
(
'main1'
));
// 绘制图表
myChart1
.
setOption
({
title
:
{
...
...
@@ -364,14 +289,10 @@
}
]
});
},
drawPieChart
(
getData4
,
getData5
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart2
=
echarts
.
init
(
document
.
getElementById
(
'main2'
));
// 绘制图表
myChart2
.
setOption
({
title
:
{
...
...
@@ -460,8 +381,6 @@
main3
(
getData6
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart3
=
echarts
.
init
(
document
.
getElementById
(
'main3'
));
// 绘制图表
myChart3
.
setOption
({
title
:
{
...
...
@@ -528,12 +447,10 @@
}
]
});
},
main4
(
getData7
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart4
=
echarts
.
init
(
document
.
getElementById
(
'main4'
));
// 绘制图表
myChart4
.
setOption
({
title
:
{
...
...
@@ -600,59 +517,13 @@
}
]
});
},
// 点击按钮显示隐藏
// changeDisplay(e){
// this.isDisplay = !this.isDisplay
// let $timeline = this.$refs.timeline;
// if(!this.showAndHide){
// for(let i = 0; i
<
$timeline
.
$children
.
length
;
i
++
){
// if(i>1){
// $timeline.$children[i].$el.style.display = "block";
// }
// }
// this.showAndHide = true;
// }else{
// for(let i = 0; i
<
$timeline
.
$children
.
length
;
i
++
){
// if(i>1){
// $timeline.$children[i].$el.style.display = "none";
// }
// }
// this.showAndHide = false;
// }
// //$timeline.toggleRowExpansion(row,true)
// },
handleRemove
(
file
)
{
console
.
log
(
file
);
},
handlePictureCardPreview
(
file
)
{
this
.
dialogImageUrl
=
file
.
url
;
this
.
dialogVisible
=
true
;
},
handleDownload
(
file
)
{
console
.
log
(
file
);
},
/** 查询工单基础信息列表 */
getList
()
{
this
.
loading
=
true
;
listDeviceAlarm
(
this
.
queryParams
).
then
(
response
=>
{
this
.
deviceAlarmList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
getDe
viceAlarm
()
{
getDeviceAlarm
(
this
.
alarmId
).
then
(
response
=>
{
const
{
deviceName
,
deviceCode
,
alarmType
,
alarmValue
,
startTime
,
endTime
,
deviceStatus
}
=
response
.
data
;
const
obj1
=
{
deviceName
,
deviceCode
,
alarmType
};
const
obj2
=
{
alarmValue
,
startTime
};
const
obj3
=
{
endTime
,
deviceStatus
};
getDe
tail
()
{
getDeviceAlarm
(
this
.
alarmId
).
then
(
response
=>
{
const
{
deviceName
,
deviceCode
,
alarmType
,
alarmValue
,
startTime
,
endTime
,
deviceStatus
}
=
response
.
data
;
const
obj1
=
{
deviceName
,
deviceCode
,
alarmType
};
const
obj2
=
{
alarmValue
,
startTime
};
const
obj3
=
{
endTime
,
deviceStatus
};
this
.
dataListdetail1
.
push
(
obj1
);
this
.
dataListdetail2
.
push
(
obj2
);
this
.
dataListdetail3
.
push
(
obj3
);
...
...
@@ -679,8 +550,6 @@
getData5
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
workingConditionAccumulation
)
getData6
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
temperature
)
getData7
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
pressure
)
}
this
.
initData
(
getData1
,
getData2
,
getData3
);
this
.
drawPieChart
(
getData4
,
getData5
,
getData3
);
...
...
@@ -692,17 +561,7 @@
console
.
log
(
"getData3"
,
getData3
)
// this.active = parseInt(response.data.orderStatus) + 1;
// if(this.form.deviceInfoList.length>0){
// this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
// }
// for(var i = 0; i
<
this
.
form
.
deviceInfoList
.
length
;
i
++
){
// let obj = this.form.deviceInfoList[i];
// this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
// }
if
(
this
.
form
.
orderType
==
'1'
)
{
if
(
this
.
form
.
orderType
==
'1'
)
{
// 获取设备列表树
let
data
=
{
key1
:
this
.
form
.
deviceInfoList
,
...
...
@@ -714,127 +573,6 @@
}
});
},
// 筛选节点
// filterNode(value, data) {
// if (!value) return true;
// return data.label.indexOf(value) !== -1;
// },
// 节点单击事件
handleNodeClick
(
data
)
{
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
// this.reset();
},
// 表单重置
reset
()
{
this
.
form
=
{
orderId
:
null
,
orderType
:
null
,
orderName
:
null
,
orderStatus
:
"0"
,
createTime
:
null
,
appointInspector
:
null
,
allotTime
:
null
,
actualInspector
:
null
,
actualTime
:
null
,
remarks
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加工单基础信息"
;
},
/** 归档按钮操作 */
handleFinish
(
res
)
{
// this.reset();
getDeviceAlarm
(
res
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"工单信息归档"
;
});
},
/** 修改按钮操作 */
handleUpdate
(
res
)
{
// this.reset();
this
.
getInspectorList
();
getInspectorList
(
this
.
orderId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"工单信息修改"
;
});
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
orderStatus
==
'0'
)
{
updateBasicsInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
if
(
this
.
form
.
orderStatus
==
'2'
)
{
updateOrderStatus
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"操作成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
orderIds
=
row
.
orderId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除工单基础信息编号为"'
+
orderIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delBasicsInfo
(
orderIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有工单基础信息数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportBasicsInfo
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
}
}
}
</
script
>
...
...
gassafety-web/src/views/device/deviceInfo/index.vue
View file @
f747ed7b
...
...
@@ -10,10 +10,10 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"设备
型号"
prop=
"deviceModel
"
>
<el-form-item
label=
"设备
编号"
prop=
"deviceCode
"
>
<el-input
v-model=
"queryParams.device
Model
"
placeholder=
"请输入设备
型
号"
v-model=
"queryParams.device
Code
"
placeholder=
"请输入设备
编
号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
...
...
@@ -29,15 +29,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"物联网编号"
prop=
"iotNo"
>
<el-input
v-model=
"queryParams.iotNo"
placeholder=
"请输入物联网编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -55,7 +46,7 @@
v-hasPermi=
"['device:deviceInfo:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<
!--
<
el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
...
...
@@ -87,14 +78,13 @@
@
click=
"handleExport"
v-hasPermi=
"['device:deviceInfo:export']"
>
导出
</el-button>
</el-col>
</el-col>
-->
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"deviceInfoList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"所属管道"
align=
"center"
prop=
"pipeId"
/>
-->
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"所属管道"
align=
"center"
prop=
"pipeName"
/>
<el-table-column
label=
"设备编号"
align=
"center"
prop=
"deviceCode"
/>
<el-table-column
label=
"设备类型"
align=
"center"
prop=
"deviceType"
>
<template
slot-scope=
"scope"
>
...
...
@@ -106,17 +96,8 @@
</el-table-column>
<el-table-column
label=
"设备型号"
align=
"center"
prop=
"deviceModel"
/>
<el-table-column
label=
"所在地址"
align=
"center"
prop=
"deviceAddr"
/>
<el-table-column
label=
"物联网编号"
align=
"center"
prop=
"iotNo"
/>
<el-table-column
label=
"安装时间"
align=
"center"
prop=
"installationTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
installationTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"最后巡检时间"
align=
"center"
prop=
"inspectionTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
inspectionTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"安装时间"
align=
"center"
prop=
"installationTime"
width=
"180"
/>
<el-table-column
label=
"最后巡检时间"
align=
"center"
prop=
"inspectionTime"
width=
"180"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
...
...
@@ -126,6 +107,12 @@
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['device:deviceInfo:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"showDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -146,25 +133,20 @@
/>
<!-- 添加或修改设备信息对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"8
5
0px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"8
0
0px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-form-item
label=
"所属管道"
prop=
"pipeId"
>
<el-input
v-model=
"form.pipeId"
placeholder=
"请输入所属管道"
/>
</el-form-item>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
</el-form-item>
<el-form-item
label=
"设备编号"
prop=
"deviceCode"
>
<el-input
v-model=
"form.deviceCode"
placeholder=
"请输入设备编号"
/>
</el-form-item>
<el-form-item
label=
"所在地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"form.deviceAddr"
placeholder=
"请输入所在地址"
/>
</el-form-item>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
<el-select
v-model=
"form.pipeId"
placeholder=
"请选择所属管道"
clearable
size=
"small"
style=
"width: 600px"
>
<el-option
v-for=
"item in options"
:key=
"item.pipeId"
:label=
"item.pipeName"
:value=
"item.pipeId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"设备类型"
>
<el-select
v-model=
"form.deviceType"
placeholder=
"请选择设备类型"
>
<el-select
v-model=
"form.deviceType"
placeholder=
"请选择设备类型"
style=
"width: 600px"
>
<el-option
v-for=
"dict in typeOptions"
:key=
"dict.dictValue"
...
...
@@ -173,15 +155,34 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"
经度"
prop=
"longitud
e"
>
<el-input
v-model=
"form.
longitude"
placeholder=
"请输入经度
"
/>
<el-form-item
label=
"
设备名称"
prop=
"deviceNam
e"
>
<el-input
v-model=
"form.
deviceName"
placeholder=
"请输入设备名称"
style=
"width: 600px
"
/>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"latitude"
>
<el-input
v-model=
"form.latitude"
placeholder=
"请输入纬度"
/>
<el-form-item
label=
"设备编号"
prop=
"deviceCode"
>
<el-input
v-model=
"form.deviceCode"
placeholder=
"请输入设备编号"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"物联网编号"
prop=
"iotNo"
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/>
</el-form-item>
<el-form-item
label=
"所在地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"form.deviceAddr"
placeholder=
"请输入所在地址"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"经纬度"
>
<el-row>
<el-col
:span=
"8"
>
<el-input
v-model
.
number=
"form.longitude"
placeholder=
"请输入经度"
/>
</el-col>
<el-col
:span=
"8"
>
<el-input
v-model
.
number=
"form.latitude"
placeholder=
"请输入纬度"
/>
</el-col>
<el-col
:span=
"5"
>
<el-button
type=
"primary"
plain
@
click=
"MapdialogFun"
>
选择经纬度
</el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<MyFileUpload
listType=
"picture-card"
...
...
@@ -213,12 +214,15 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- <Mapdialog v-if="loadmap" :dialogTableVisible="dialogTableVisible" @dialogcancelFun="dialogcancelFun" :slat="form.latitude" :slng="form.longitude" @confirm="qrFun" />-->
</div>
</template>
<
script
>
import
{
listDeviceInfo
,
getDeviceInfo
,
delDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
,
exportDeviceInfo
,
countDeviceByType
}
from
"@/api/device/deviceInfo"
;
import
{
listDeviceInfo
,
getDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
,
exportDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
{
pipeAllInfoList
}
from
"@/api/device/pipe"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
// import Mapdialog from "@/components/maplnglat.vue";
export
default
{
name
:
"DeviceInfo"
,
...
...
@@ -247,8 +251,13 @@ export default {
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 管道列表
options
:
[],
// 上传文件列表
fileList
:
[],
// 地图
loadmap
:
false
,
dialogTableVisible
:
false
,
// 设备类型字典
typeOptions
:
[],
// 查询参数
...
...
@@ -256,8 +265,8 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
enterpriseId
:
null
,
pipeId
:
null
,
deviceName
:
null
,
deviceCode
:
null
,
deviceAddr
:
null
,
deviceModel
:
null
,
deviceType
:
null
,
...
...
@@ -301,6 +310,19 @@ export default {
this
.
form
.
url
=
""
;
this
.
fileList
=
[];
},
// qrFun(res) {
// //确认选择经纬度
// this.form.longitude = res.lng;
// this.form.latitude = res.lat;
// },
// MapdialogFun() {
// this.loadmap = true;
// this.dialogTableVisible = true;
// },
// dialogcancelFun() {
// this.loadmap = false;
// this.dialogTableVisible = false;
// },
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
@@ -348,12 +370,18 @@ export default {
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
pipeAllInfoList
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"添加设备信息"
;
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
pipeAllInfoList
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
});
const
deviceId
=
row
.
deviceId
||
this
.
ids
getDeviceInfo
(
deviceId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
...
...
@@ -388,17 +416,18 @@ export default {
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
deviceIds
=
row
.
deviceId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除设备
信息编号为"'
+
deviceIds
+
'"的数据项?'
,
"警告"
,
{
row
.
isDel
=
"1"
;
this
.
$confirm
(
'是否确认删除设备
名称为"'
+
row
.
deviceName
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delDeviceInfo
(
deviceIds
);
}).
then
(
function
()
{
return
updateDeviceInfo
(
row
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
this
.
msgSuccess
(
"已删除"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
...
...
@@ -414,7 +443,22 @@ export default {
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
/** 详细信息跳转 */
showDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/device/deviceInfoDetail'
,
query
:
{
deviceId
:
row
.
deviceId
}
})
},
}
};
</
script
>
<
style
>
.el-col
{
margin-left
:
0
;
margin-right
:
10px
;
}
</
style
>
gassafety-web/src/views/device/deviceInfoDetail/index.vue
0 → 100644
View file @
f747ed7b
<
template
>
<div
class=
"app-container detail"
style=
"background-color: rgb(238, 241, 245);"
>
<div
style=
"padding-top: 10px;background: #fff;height: 100%;"
>
<div
style=
"width: 5%;height: 45px;margin-left: 20px;"
@
click=
"$router.go(-1)"
>
<el-button
size=
"medium"
type=
"text"
style=
"font-size: 18px; color: rgb(7, 63, 112);float: left;"
>
返回
</el-button>
<div
style=
"float: left;margin-top: 8px;margin-left: 5px;"
><img
src=
"../../../assets/logo/fanhui.png"
style=
"width: 25px;"
alt=
""
></div>
</div>
<div
style=
"width: 100%;height: 440px;"
>
<el-divider></el-divider>
<div
style=
"color: #31EAEA;width: 30%;height: 30px;"
>
<ul><li>
详细信息
</li></ul>
</div>
<div
style=
"float: left;width: 50%;"
>
<el-form
ref=
"form"
v-model=
"form"
:rules=
"rules"
label-width=
"100px"
style=
"float: left;margin-left: 50px;width: 50%;margin-bottom: 25px;"
>
<el-form-item
label=
"设备名称:"
prop=
"deviceName"
>
<font>
{{
form
.
deviceName
}}
</font>
</el-form-item>
<el-form-item
label=
"设备编号:"
prop=
"deviceCode"
>
<font>
{{
form
.
deviceCode
}}
</font>
</el-form-item>
<el-form-item
label=
"设备类型:"
prop=
"deviceType"
>
<font
v-if=
"form.deviceType == 1"
>
调压阀
</font>
<font
v-if=
"form.deviceType == 2"
>
阀门井
</font>
<font
v-if=
"form.deviceType == 3"
>
流量计
</font>
<font
v-if=
"form.deviceType == 4"
>
压力表
</font>
</el-form-item>
<el-form-item
label=
"设备型号:"
prop=
"deviceModel"
>
<font>
{{
form
.
deviceModel
}}
</font>
</el-form-item>
<el-form-item
label=
"物联网编号:"
prop=
"iotNo"
v-if=
"form.iotNo != null || form.iotNo != ''"
>
<font>
{{
form
.
iotNo
}}
</font>
</el-form-item>
<el-form-item
label=
"联系人:"
prop=
"linkman"
>
<font>
{{
form
.
linkman
}}
</font>
</el-form-item>
<el-form-item
label=
"联系电话:"
prop=
"phone"
>
<font>
{{
form
.
phone
}}
</font>
</el-form-item>
<el-form-item
label=
"备注信息:"
prop=
"remarks"
>
<font>
{{
form
.
remarks
}}
</font>
</el-form-item>
</el-form>
<el-form
ref=
"form"
v-model=
"form"
:rules=
"rules"
label-width=
"100px"
style=
"float: left;width: 40%;"
>
<el-form-item
label=
"所属管道:"
prop=
"pipeName"
>
<font>
{{
form
.
pipeName
}}
</font>
</el-form-item>
<el-form-item
label=
"所在地址:"
prop=
"deviceAddr"
>
<font>
{{
form
.
deviceAddr
}}
</font>
</el-form-item>
<el-form-item
label=
"经度:"
prop=
"longitude"
>
<font>
{{
form
.
longitude
}}
</font>
</el-form-item>
<el-form-item
label=
"经度:"
prop=
"latitude"
>
<font>
{{
form
.
latitude
}}
</font>
</el-form-item>
<el-form-item
label=
"安装时间:"
prop=
"installationTime"
>
<font>
{{
form
.
installationTime
}}
</font>
</el-form-item>
<el-form-item
label=
"最后巡检时间:"
prop=
"inspectionTime"
>
<font>
{{
form
.
inspectionTime
}}
</font>
</el-form-item>
<el-form-item
label=
"设备图片:"
prop=
"inspectionTime"
>
<el-image
:src=
"form.iconUrl"
:preview-src-list=
"[form.iconUrl]"
style=
"width: 90px;"
></el-image>
</el-form-item>
</el-form>
</div>
<div
id=
"marbox"
style=
"width: 700px;height: 400px;float: left;margin-top: -25px; border: 1px solid rgb(218, 213, 213);"
>
<div
style=
"width: 100%;height: 100%"
id=
"container"
></div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
gaodeMap
from
"utils/gaodeMap.js"
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
name
:
"DeviceInfoDetail"
,
components
:
{
},
data
()
{
return
{
// 表单参数
form
:
{
},
// 表单校验
rules
:
{
}
};
},
created
()
{
// 如果是跳转来的,则接受初始化参数
this
.
deviceId
=
this
.
$route
.
query
.
deviceId
;
this
.
getDetail
();
},
mounted
(){
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
this
.
gaoMap
=
gaoMap
;
},
methods
:
{
/** 获取巡检计划详情 */
getDetail
(){
getDeviceInfo
(
this
.
deviceId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
console
.
log
(
"this.form"
,
this
.
form
)
this
.
gaoMap
.
resetMapCenter
([
this
.
form
.
longitude
,
this
.
form
.
latitude
]);
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
WORKORDER
,
this
.
form
)
});
},
}
}
</
script
>
<
style
>
.el-divider--horizontal
{
display
:
block
;
height
:
1px
;
width
:
100%
;
margin
:
20px
0
;
}
.feedbackTime-div
{
float
:
left
;
margin-left
:
150px
;
margin-top
:
10px
;
}
.feedbackTime
{
height
:
120px
;
width
:
120px
;
float
:
left
;
margin-left
:
15px
;
margin-top
:
5px
;
margin-bottom
:
15px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.el-card__body
{
padding
:
5px
20px
20px
20px
;
}
.detail
.el-form
{
width
:
20%
;
}
.detail
.el-form-item
{
margin-bottom
:
0px
;
}
.avatar-uploader
{
width
:
25%
;
float
:
left
;
}
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
.avatar
{
width
:
178px
;
height
:
178px
;
display
:
block
;
}
li
{
font-size
:
15px
;
font-weight
:
900
;
}
</
style
>
gassafety-web/src/views/device/pipe/index.vue
View file @
f747ed7b
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
68
px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
100
px"
>
<el-form-item
label=
"管道名称"
prop=
"pipeName"
>
<el-input
v-model=
"queryParams.pipeName"
...
...
@@ -10,6 +10,15 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"管道编号"
prop=
"pipeCode"
>
<el-input
v-model=
"queryParams.pipeCode"
placeholder=
"请输入管道编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"管道类型"
prop=
"pipeType"
>
<el-select
v-model=
"queryParams.pipeType"
placeholder=
"请选择管道类型"
size=
"small"
>
<el-option
...
...
@@ -37,7 +46,7 @@
v-hasPermi=
"['device:pipe:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<
!--
<
el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
...
...
@@ -69,16 +78,13 @@
@
click=
"handleExport"
v-hasPermi=
"['device:pipe:export']"
>
导出
</el-button>
</el-col>
</el-col>
-->
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"pipeList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"管道名称"
align=
"center"
prop=
"pipeName"
/>
<el-table-column
label=
"所在地址"
align=
"center"
prop=
"pipeAddr"
/>
<el-table-column
label=
"管道坐标"
align=
"center"
prop=
"coordinates"
/>
<el-table-column
label=
"管道长度"
align=
"center"
prop=
"pipeLength"
/>
<el-table-column
label=
"管道编号"
align=
"center"
prop=
"pipeCode"
/>
<el-table-column
label=
"管道类型"
align=
"center"
prop=
"pipeType"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pipeType == 1"
>
地埋管线
</span>
...
...
@@ -93,16 +99,10 @@
<span
v-if=
"scope.row.pipePressure == 4"
>
高压
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"安装时间"
align=
"center"
prop=
"installationTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
installationTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"最后巡检时间"
align=
"center"
prop=
"inspectionTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
inspectionTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"管道长度"
align=
"center"
prop=
"pipeLength"
/>
<el-table-column
label=
"所在地址"
align=
"center"
prop=
"pipeAddr"
/>
<el-table-column
label=
"安装时间"
align=
"center"
prop=
"installationTime"
width=
"180"
/>
<el-table-column
label=
"最后巡检时间"
align=
"center"
prop=
"inspectionTime"
width=
"180"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
...
...
@@ -112,6 +112,12 @@
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['device:pipe:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"showDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -132,25 +138,10 @@
/>
<!-- 添加或修改管道信息对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"8
5
0px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"8
0
0px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-form-item
label=
"管道名称"
prop=
"pipeName"
>
<el-input
v-model=
"form.pipeName"
placeholder=
"请输入管道名称"
/>
</el-form-item>
<el-form-item
label=
"管道编号"
prop=
"pipeCode"
>
<el-input
v-model=
"form.pipeCode"
placeholder=
"请输入管道编号"
/>
</el-form-item>
<el-form-item
label=
"所在地址"
prop=
"pipeAddr"
>
<el-input
v-model=
"form.pipeAddr"
placeholder=
"请输入所在地址"
/>
</el-form-item>
<el-form-item
label=
"管道坐标"
prop=
"coordinates"
>
<el-input
v-model=
"form.coordinates"
type=
"textarea"
placeholder=
"请输入坐标"
/>
</el-form-item>
<el-form-item
label=
"管道长度"
prop=
"pipeLength"
>
<el-input
v-model=
"form.pipeLength"
placeholder=
"请输入管道长度"
/>
</el-form-item>
<el-form-item
label=
"管道类型"
>
<el-select
v-model=
"form.pipeType"
placeholder=
"请选择管道类型"
>
<el-select
v-model=
"form.pipeType"
placeholder=
"请选择管道类型"
style=
"width: 600px"
>
<el-option
v-for=
"dict in typeOptions"
:key=
"dict.dictValue"
...
...
@@ -159,8 +150,14 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"管道名称"
prop=
"pipeName"
>
<el-input
v-model=
"form.pipeName"
placeholder=
"请输入管道名称"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"管道编号"
prop=
"pipeCode"
>
<el-input
v-model=
"form.pipeCode"
placeholder=
"请输入管道编号"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"管道压力"
>
<el-select
v-model=
"form.pipePressure"
placeholder=
"请选择管道压力"
>
<el-select
v-model=
"form.pipePressure"
placeholder=
"请选择管道压力"
style=
"width: 600px"
>
<el-option
v-for=
"dict in pressureOptions"
:key=
"dict.dictValue"
...
...
@@ -169,6 +166,20 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"所在地址"
prop=
"pipeAddr"
>
<el-input
v-model=
"form.pipeAddr"
placeholder=
"请输入所在地址"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"管道长度"
prop=
"pipeLength"
>
<el-input
v-model=
"form.pipeLength"
placeholder=
"请输入管道长度"
style=
"width: 600px"
/>
</el-form-item>
<el-form-item
label=
"管道坐标"
prop=
"coordinates"
>
<el-col
:span=
"18"
>
<el-input
v-model=
"form.coordinates"
type=
"textarea"
placeholder=
"请输入坐标"
/>
</el-col>
<el-col
:span=
"5"
>
<el-button
type=
"primary"
plain
@
click=
"MapdialogFun"
>
选择坐标
</el-button>
</el-col>
</el-form-item>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<MyFileUpload
listType=
"picture-card"
...
...
@@ -186,7 +197,7 @@
</el-date-picker>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
style=
"width: 600px"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -305,6 +316,7 @@ export default {
inspectionTime
:
null
,
remarks
:
null
};
this
.
fileList
=
[];
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
...
...
@@ -366,17 +378,23 @@ export default {
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
pipeIds
=
row
.
pipeId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除管道信息编号为"'
+
pipeIds
+
'"的数据项?'
,
"警告"
,
{
row
.
isDel
=
"1"
;
var
devices
=
" "
;
for
(
var
i
=
0
;
i
<
row
.
deviceInfoList
.
length
;
i
++
){
var
obj
=
row
.
deviceInfoList
[
i
];
devices
=
devices
+
obj
.
deviceName
+
" "
;
}
this
.
$confirm
(
'请确认是否删除管道名称为"'
+
row
.
pipeName
+
'"的数据项,该管道下包含的设备('
+
devices
+
')将一并被删除'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delPipe
(
pipeIds
);
}).
then
(
function
()
{
return
updatePipe
(
row
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
this
.
msgSuccess
(
"已删除"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
...
...
@@ -392,7 +410,16 @@ export default {
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
/** 详细信息跳转 */
showDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/device/pipeDetail'
,
query
:
{
pipeId
:
row
.
pipeId
}
})
},
}
};
</
script
>
gassafety-web/src/views/device/pipeDetail/index.vue
0 → 100644
View file @
f747ed7b
<
template
>
<div
class=
"app-container detail"
style=
"background-color: rgb(238, 241, 245);"
>
<div
style=
"padding-top: 10px;background: #fff;height: 100%;"
>
<div
style=
"width: 5%;height: 45px;margin-left: 20px;"
@
click=
"$router.go(-1)"
>
<el-button
size=
"medium"
type=
"text"
style=
"font-size: 18px; color: rgb(7, 63, 112);float: left;"
>
返回
</el-button>
<div
style=
"float: left;margin-top: 8px;margin-left: 5px;"
><img
src=
"../../../assets/logo/fanhui.png"
style=
"width: 25px;"
alt=
""
></div>
</div>
<div
style=
"width: 100%;height: 440px;"
>
<el-divider></el-divider>
<div
style=
"color: #31EAEA;width: 30%;height: 30px;"
>
<ul><li>
详细信息
</li></ul>
</div>
<div
style=
"float: left;width: 50%;"
>
<el-form
ref=
"form"
v-model=
"form"
:rules=
"rules"
label-width=
"100px"
style=
"float: left;margin-left: 50px;width: 50%;margin-bottom: 25px;"
>
<el-form-item
label=
"管道名称:"
prop=
"pipeName"
>
<font>
{{
form
.
pipeName
}}
</font>
</el-form-item>
<el-form-item
label=
"管道编号:"
prop=
"pipeCode"
>
<font>
{{
form
.
pipeCode
}}
</font>
</el-form-item>
<el-form-item
label=
"管道类型:"
prop=
"pipeType"
>
<font
v-if=
"form.pipeType == 1"
>
地埋管线
</font>
<font
v-if=
"form.pipeType == 2"
>
地表管线
</font>
</el-form-item>
<el-form-item
label=
"管道压力:"
prop=
"pipePressure"
>
<font
v-if=
"form.pipePressure == 1"
>
低压
</font>
<font
v-if=
"form.pipePressure == 2"
>
中压
</font>
<font
v-if=
"form.pipePressure == 3"
>
次高压
</font>
<font
v-if=
"form.pipePressure == 4"
>
高压
</font>
</el-form-item>
<el-form-item
label=
"管道长度:"
prop=
"pipeLength"
>
<font>
{{
form
.
pipeLength
}}
</font>
</el-form-item>
<el-form-item
label=
"备注信息:"
prop=
"remarks"
>
<font>
{{
form
.
remarks
}}
</font>
</el-form-item>
</el-form>
<el-form
ref=
"form"
v-model=
"form"
:rules=
"rules"
label-width=
"100px"
style=
"float: left;width: 40%;"
>
<el-form-item
label=
"管道地址:"
prop=
"pipeAddr"
>
<font>
{{
form
.
pipeAddr
}}
</font>
</el-form-item>
<el-form-item
label=
"安装时间:"
prop=
"installationTime"
>
<font>
{{
form
.
installationTime
}}
</font>
</el-form-item>
<el-form-item
label=
"最后巡检时间:"
prop=
"inspectionTime"
>
<font>
{{
form
.
inspectionTime
}}
</font>
</el-form-item>
<el-form-item
label=
"管道图片:"
prop=
"inspectionTime"
>
<el-image
:src=
"form.iconUrl"
:preview-src-list=
"[form.iconUrl]"
style=
"width: 90px;"
></el-image>
</el-form-item>
</el-form>
</div>
<div
id=
"marbox"
style=
"width: 700px;height: 400px;float: left;margin-top: -25px; border: 1px solid rgb(218, 213, 213);"
>
<div
style=
"width: 100%;height: 100%"
id=
"container"
></div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getPipe
}
from
"@/api/device/pipe"
;
import
gaodeMap
from
"utils/gaodeMap.js"
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
name
:
"PipeDetail"
,
components
:
{
},
data
()
{
return
{
// 表单参数
form
:
{
},
// 表单校验
rules
:
{
}
};
},
created
()
{
// 如果是跳转来的,则接受初始化参数
this
.
pipeId
=
this
.
$route
.
query
.
pipeId
;
this
.
getDetail
();
},
mounted
(){
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
this
.
gaoMap
=
gaoMap
;
},
methods
:
{
/** 获取巡检计划详情 */
getDetail
(){
getPipe
(
this
.
pipeId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
console
.
log
(
"this.form"
,
this
.
form
)
this
.
gaoMap
.
resetMapCenter
([
this
.
form
.
longitude
,
this
.
form
.
latitude
]);
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
WORKORDER
,
this
.
form
)
});
},
}
}
</
script
>
<
style
>
.el-divider--horizontal
{
display
:
block
;
height
:
1px
;
width
:
100%
;
margin
:
20px
0
;
}
.feedbackTime-div
{
float
:
left
;
margin-left
:
150px
;
margin-top
:
10px
;
}
.feedbackTime
{
height
:
120px
;
width
:
120px
;
float
:
left
;
margin-left
:
15px
;
margin-top
:
5px
;
margin-bottom
:
15px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.el-card__body
{
padding
:
5px
20px
20px
20px
;
}
.detail
.el-form
{
width
:
20%
;
}
.detail
.el-form-item
{
margin-bottom
:
0px
;
}
.avatar-uploader
{
width
:
25%
;
float
:
left
;
}
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
.avatar
{
width
:
178px
;
height
:
178px
;
display
:
block
;
}
li
{
font-size
:
15px
;
font-weight
:
900
;
}
</
style
>
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
f747ed7b
...
...
@@ -369,7 +369,7 @@ export default {
// 右下角数据 跟值班人员
this
.
rightBottomData
();
this
.
backFlag
=
false
;
//
this.backFlag = false;
},
// 获取地图上的资源
...
...
@@ -492,7 +492,7 @@ export default {
options
.
lineData
.
alarmId
=
alarmId
;
options
.
lineData
.
orderId
=
orderId
;
if
(
endTime
)
{
polyline
.
setOptions
({
strokeColor
:
"#
F7FE38
"
});
polyline
.
setOptions
({
strokeColor
:
"#
2EE7E7
"
});
options
.
lineData
.
alarmState
=
0
;
// 报警类型
options
.
lineData
.
alarmType
=
null
;
...
...
@@ -514,6 +514,7 @@ export default {
});
}
console
.
log
(
"deviceArr"
,
deviceArr
);
// 其他设备
if
(
deviceArr
.
length
>
0
)
{
deviceArr
.
forEach
((
item
)
=>
{
...
...
@@ -591,8 +592,7 @@ export default {
// "ws://192.168.2.23:8903/gassafety/websocketServer"
// );
this
.
ws
.
onopen
=
(
evt
)
=>
{
console
.
log
(
"WebSockets=======gogogog"
);
// this.ws.send("WebSockets!=========================");
console
.
log
(
"WebSockets开启"
);
};
this
.
ws
.
onmessage
=
(
evt
)
=>
{
console
.
log
(
"推送"
,
evt
);
...
...
@@ -604,9 +604,6 @@ export default {
this
.
ws
.
onclose
=
()
=>
{
console
.
log
(
"ws协议关闭"
);
};
// this.ws.onclose = function (evt) {
// console.log("关闭");
// };
},
// 右下角数据
...
...
@@ -914,7 +911,7 @@ export default {
no
:
index
,
userId
:
item
.
userId
,
userName
:
item
.
userName
,
userPhone
:
item
.
phone
,
userPhone
:
item
.
phone
number
,
};
});
console
.
log
(
"值班人员"
,
workManArr
);
...
...
@@ -937,11 +934,10 @@ export default {
);
});
item
.
maxPage
=
Math
.
ceil
(
this
.
allList
[
index
].
length
/
num
);
}
else
{
}
else
{
// 如果为空,就直接把item.list写成[];
item
.
list
=
[];
item
.
list
=
[];
}
});
},
pageBack
(
item
)
{
...
...
@@ -1099,8 +1095,9 @@ export default {
// 清空左边列表
// this.changeBtnDataClear();
// this.gaoMap.placeSearch.search(this.keyWord);
await
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
})
;
this
.
gaoMap
.
markers
=
[]
;
this
.
gaoMap
.
polyLines
=
[];
await
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
});
await
this
.
getPipeList
({
pipeName
:
this
.
keyWord
});
// 值班人员
await
this
.
getInspectorLocations
({
userName
:
this
.
keyWord
});
...
...
@@ -1108,8 +1105,6 @@ export default {
// 设备报警
this
.
getSelectAlarmDevice
();
this
.
pipeList
();
console
.
log
(
this
.
changeBtnData
);
console
.
log
(
this
.
allList
)
}
},
// 清空左边列表
...
...
@@ -1190,6 +1185,7 @@ export default {
window
.
removeEventListener
(
"mousedown"
,
this
.
barClose
);
// 关闭scoket
if
(
this
.
ws
)
{
console
.
log
(
"socket关闭了"
);
this
.
ws
.
close
();
this
.
ws
=
null
;
}
...
...
@@ -1205,7 +1201,6 @@ export default {
bottom
:
0
;
width
:
100%
;
}
.btn-wrapper
{
position
:
fixed
;
right
:
32px
;
...
...
gassafety-web/src/views/statistics/ind/index.vue
0 → 100644
View file @
f747ed7b
<
template
>
<div
class=
"dashboard-editor-container"
>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<el-row
style=
"background:#fff;padding:16px 16px 0;margin-bottom:32px;"
>
<line-chart
:chart-data=
"lineChartData"
/>
</el-row>
<el-row
:gutter=
"32"
>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<raddar-chart
/>
</div>
</el-col>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<pie-chart
/>
</div>
</el-col>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<bar-chart
/>
</div>
</el-col>
</el-row>
</div>
</
template
>
<
script
>
import
PanelGroup
from
'../../dashboard/PanelGroup'
import
LineChart
from
'../../dashboard/LineChart'
import
RaddarChart
from
'../../dashboard/RaddarChart'
import
PieChart
from
'../../dashboard/PieChart'
import
BarChart
from
'../../dashboard/BarChart'
//报表
const
lineChartData
=
{
newVisitis
:
{
expectedData
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
145
]
},
messages
:
{
expectedData
:
[
200
,
192
,
120
,
144
,
160
,
130
,
140
],
actualData
:
[
180
,
160
,
151
,
106
,
145
,
150
,
130
]
},
purchases
:
{
expectedData
:
[
80
,
100
,
121
,
104
,
105
,
90
,
100
],
actualData
:
[
120
,
90
,
100
,
138
,
142
,
130
,
130
]
},
shoppings
:
{
expectedData
:
[
130
,
140
,
141
,
142
,
145
,
150
,
160
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
130
]
}
}
export
default
{
name
:
'Index'
,
components
:
{
PanelGroup
,
LineChart
,
RaddarChart
,
PieChart
,
BarChart
},
data
()
{
return
{
lineChartData
:
lineChartData
.
newVisitis
}
},
methods
:
{
handleSetLineChartData
(
type
)
{
this
.
lineChartData
=
lineChartData
[
type
]
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dashboard-editor-container
{
padding
:
32px
;
background-color
:
rgb
(
240
,
242
,
245
);
position
:
relative
;
.chart-wrapper
{
background
:
#fff
;
padding
:
16px
16px
0
;
margin-bottom
:
32px
;
}
}
@media
(
max-width
:
1024px
)
{
.chart-wrapper
{
padding
:
8px
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment