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
b1e2d4b3
Commit
b1e2d4b3
authored
Aug 23, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患信息
parent
9b52062d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
922 additions
and
229 deletions
+922
-229
THiddenTroubleController.java
...b/controller/riskManagement/THiddenTroubleController.java
+15
-6
SysUserController.java
...a/com/zehong/web/controller/system/SysUserController.java
+12
-0
THiddenTrouble.java
...rc/main/java/com/zehong/system/domain/THiddenTrouble.java
+110
-28
HiddenTroubleVo.java
...ain/java/com/zehong/system/domain/vo/HiddenTroubleVo.java
+257
-0
ITHiddenTroubleService.java
...ava/com/zehong/system/service/ITHiddenTroubleService.java
+3
-2
THiddenTroubleServiceImpl.java
...zehong/system/service/impl/THiddenTroubleServiceImpl.java
+47
-4
THiddenTroubleMapper.xml
...src/main/resources/mapper/system/THiddenTroubleMapper.xml
+40
-11
user.js
gassafety-web/src/api/system/user.js
+8
-0
index.vue
...y-web/src/views/deviceInspection/inspectionPlan/index.vue
+7
-15
index.vue
...fety-web/src/views/riskManagement/hiddenTrouble/index.vue
+423
-163
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/riskManagement/THiddenTroubleController.java
View file @
b1e2d4b3
package
com
.
zehong
.
web
.
controller
.
riskManagement
;
package
com
.
zehong
.
web
.
controller
.
riskManagement
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.vo.HiddenTroubleVo
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -41,7 +43,7 @@ public class THiddenTroubleController extends BaseController
...
@@ -41,7 +43,7 @@ public class THiddenTroubleController extends BaseController
public
TableDataInfo
list
(
THiddenTrouble
tHiddenTrouble
)
public
TableDataInfo
list
(
THiddenTrouble
tHiddenTrouble
)
{
{
startPage
();
startPage
();
List
<
THiddenTrouble
>
list
=
tHiddenTroubleService
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
List
<
HiddenTroubleVo
>
list
=
tHiddenTroubleService
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -53,7 +55,7 @@ public class THiddenTroubleController extends BaseController
...
@@ -53,7 +55,7 @@ public class THiddenTroubleController extends BaseController
@GetMapping
(
"/getMapHiddenTroublelist"
)
@GetMapping
(
"/getMapHiddenTroublelist"
)
public
AjaxResult
getMapHiddenTroublelist
(
THiddenTrouble
tHiddenTrouble
)
public
AjaxResult
getMapHiddenTroublelist
(
THiddenTrouble
tHiddenTrouble
)
{
{
List
<
THiddenTrouble
>
list
=
tHiddenTroubleService
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
List
<
HiddenTroubleVo
>
list
=
tHiddenTroubleService
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
return
AjaxResult
.
success
(
list
);
return
AjaxResult
.
success
(
list
);
}
}
...
@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController
...
@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController
public
AjaxResult
export
(
THiddenTrouble
tHiddenTrouble
)
public
AjaxResult
export
(
THiddenTrouble
tHiddenTrouble
)
{
{
tHiddenTrouble
.
setDealStatus
(
"3"
);
tHiddenTrouble
.
setDealStatus
(
"3"
);
List
<
THiddenTrouble
>
list
=
tHiddenTroubleService
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
List
<
HiddenTroubleVo
>
list
=
tHiddenTroubleService
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
ExcelUtil
<
THiddenTrouble
>
util
=
new
ExcelUtil
<
THiddenTrouble
>(
THiddenTrouble
.
class
);
ExcelUtil
<
HiddenTroubleVo
>
util
=
new
ExcelUtil
<
HiddenTroubleVo
>(
HiddenTroubleVo
.
class
);
return
util
.
exportExcel
(
list
,
"隐患信息数据"
);
return
util
.
exportExcel
(
list
,
"隐患信息数据"
);
}
}
...
@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController
...
@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('riskManagement:hiddenTrouble:query')"
)
@PreAuthorize
(
"@ss.hasPermi('riskManagement:hiddenTrouble:query')"
)
@GetMapping
(
value
=
"/{troubleId}"
)
@GetMapping
(
value
=
"/{troubleId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"troubleId"
)
int
troubleId
)
public
AjaxResult
getInfo
(
@PathVariable
(
"troubleId"
)
int
troubleId
)
throws
Exception
{
{
return
AjaxResult
.
success
(
tHiddenTroubleService
.
selectTHiddenTroubleById
(
troubleId
));
HiddenTroubleVo
hiddenTroubleVo
=
null
;
try
{
hiddenTroubleVo
=
tHiddenTroubleService
.
selectTHiddenTroubleById
(
troubleId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
"获取隐患信息详情失败"
);
}
return
AjaxResult
.
success
(
hiddenTroubleVo
);
}
}
/**
/**
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/system/SysUserController.java
View file @
b1e2d4b3
...
@@ -67,6 +67,18 @@ public class SysUserController extends BaseController
...
@@ -67,6 +67,18 @@ public class SysUserController extends BaseController
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
* 获取用户列表不分页
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:allList')"
)
@GetMapping
(
"/allList"
)
public
AjaxResult
allList
()
{
SysUser
user
=
new
SysUser
();
List
<
SysUser
>
list
=
userService
.
selectUserList
(
user
);
return
AjaxResult
.
success
(
list
);
}
/**
/**
* 获取巡检员列表
* 获取巡检员列表
*/
*/
...
...
gassafety-system/src/main/java/com/zehong/system/domain/THiddenTrouble.java
View file @
b1e2d4b3
...
@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity;
...
@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 隐患信息对象 t_hidden_trouble
* 隐患信息对象 t_hidden_trouble
*
*
* @author zehong
* @author zehong
* @date 2021-0
7-21
* @date 2021-0
8-20
*/
*/
public
class
THiddenTrouble
extends
BaseEntity
public
class
THiddenTrouble
extends
BaseEntity
{
{
...
@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity
...
@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity
/** 隐患信息id */
/** 隐患信息id */
private
Integer
troubleId
;
private
Integer
troubleId
;
/**
设备id
*/
/**
隐患类型
*/
@Excel
(
name
=
"
设备id
"
)
@Excel
(
name
=
"
隐患类型
"
)
private
Integer
deviceId
;
private
String
troubleType
;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
/** 隐患名称 */
private
String
deviceType
;
@Excel
(
name
=
"隐患名称"
)
private
String
troubleName
;
/** 隐患级别 */
@Excel
(
name
=
"隐患级别"
)
private
String
troubleLevel
;
/** 工单id */
/** 工单id */
@Excel
(
name
=
"工单id"
)
@Excel
(
name
=
"工单id"
)
private
String
orderId
;
private
String
orderId
;
/** 地址 */
/** 设备id */
@Excel
(
name
=
"地址"
)
@Excel
(
name
=
"设备id"
)
private
String
address
;
private
Integer
deviceId
;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel
(
name
=
"设备类型"
,
readConverterExp
=
"0=管道,1调压阀,2阀门井,3流量计,4压力表"
)
private
String
deviceType
;
/** 经度 */
/** 经度 */
@Excel
(
name
=
"经度"
)
@Excel
(
name
=
"经度"
)
...
@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity
...
@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity
@Excel
(
name
=
"纬度"
)
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
private
BigDecimal
latitude
;
/** 是否作废(0正常,1作废) */
@Excel
(
name
=
"是否作废(0正常,1作废)"
)
private
String
isDel
;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel
(
name
=
"处理状态"
,
readConverterExp
=
"1不需处理,2已处理完成,3未处理完成"
)
@Excel
(
name
=
"处理状态"
,
readConverterExp
=
"1不需处理,2已处理完成,3未处理完成"
)
private
String
dealStatus
;
private
String
dealStatus
;
/** 地址 */
@Excel
(
name
=
"地址"
)
private
String
address
;
/** 备注 */
/** 备注 */
@Excel
(
name
=
"备注"
)
@Excel
(
name
=
"备注"
)
private
String
remarks
;
private
String
remarks
;
/** 图片地址 */
@Excel
(
name
=
"图片地址"
)
private
String
pictureUrl
;
/** 上报人(用户id) */
@Excel
(
name
=
"上报人"
,
readConverterExp
=
"用户id"
)
private
Long
reportMan
;
public
void
setTroubleId
(
Integer
troubleId
)
public
void
setTroubleId
(
Integer
troubleId
)
{
{
this
.
troubleId
=
troubleId
;
this
.
troubleId
=
troubleId
;
...
@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity
...
@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity
{
{
return
troubleId
;
return
troubleId
;
}
}
public
String
getTroubleName
()
{
return
troubleName
;
}
public
void
setTroubleName
(
String
troubleName
)
{
this
.
troubleName
=
troubleName
;
}
public
void
setTroubleType
(
String
troubleType
)
{
this
.
troubleType
=
troubleType
;
}
public
String
getTroubleType
()
{
return
troubleType
;
}
public
void
setDeviceId
(
Integer
deviceId
)
public
void
setDeviceId
(
Integer
deviceId
)
{
{
this
.
deviceId
=
deviceId
;
this
.
deviceId
=
deviceId
;
...
@@ -68,16 +111,16 @@ public class THiddenTrouble extends BaseEntity
...
@@ -68,16 +111,16 @@ public class THiddenTrouble extends BaseEntity
{
{
return
deviceId
;
return
deviceId
;
}
}
public
void
setTroubleLevel
(
String
troubleLevel
)
public
String
getDeviceType
()
{
{
return
deviceType
;
this
.
troubleLevel
=
troubleLevel
;
}
}
public
void
setDeviceType
(
String
deviceType
)
{
public
String
getTroubleLevel
()
this
.
deviceType
=
deviceType
;
{
return
troubleLevel
;
}
}
public
void
setOrderId
(
String
orderId
)
public
void
setOrderId
(
String
orderId
)
{
{
this
.
orderId
=
orderId
;
this
.
orderId
=
orderId
;
}
}
...
@@ -86,16 +129,7 @@ public class THiddenTrouble extends BaseEntity
...
@@ -86,16 +129,7 @@ public class THiddenTrouble extends BaseEntity
{
{
return
orderId
;
return
orderId
;
}
}
public
void
setLongitude
(
BigDecimal
longitude
)
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
{
this
.
longitude
=
longitude
;
this
.
longitude
=
longitude
;
}
}
...
@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity
...
@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity
{
{
return
longitude
;
return
longitude
;
}
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
public
void
setLatitude
(
BigDecimal
latitude
)
{
{
this
.
latitude
=
latitude
;
this
.
latitude
=
latitude
;
...
@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity
...
@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity
return
latitude
;
return
latitude
;
}
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
void
setDealStatus
(
String
dealStatus
)
public
void
setDealStatus
(
String
dealStatus
)
{
{
this
.
dealStatus
=
dealStatus
;
this
.
dealStatus
=
dealStatus
;
...
@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity
...
@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity
{
{
return
dealStatus
;
return
dealStatus
;
}
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setRemarks
(
String
remarks
)
public
void
setRemarks
(
String
remarks
)
{
{
this
.
remarks
=
remarks
;
this
.
remarks
=
remarks
;
...
@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity
...
@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity
{
{
return
remarks
;
return
remarks
;
}
}
public
void
setPictureUrl
(
String
pictureUrl
)
{
this
.
pictureUrl
=
pictureUrl
;
}
public
String
getPictureUrl
()
{
return
pictureUrl
;
}
public
void
setReportMan
(
Long
reportMan
)
{
this
.
reportMan
=
reportMan
;
}
public
Long
getReportMan
()
{
return
reportMan
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"troubleId"
,
getTroubleId
())
.
append
(
"troubleId"
,
getTroubleId
())
.
append
(
"troubleType"
,
getTroubleType
())
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"
deviceType"
,
getDeviceType
())
.
append
(
"
troubleLevel"
,
getTroubleLevel
())
.
append
(
"orderId"
,
getOrderId
())
.
append
(
"orderId"
,
getOrderId
())
.
append
(
"address"
,
getAddress
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"deviceType"
,
getDeviceType
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"dealStatus"
,
getDealStatus
())
.
append
(
"dealStatus"
,
getDealStatus
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"address"
,
getAddress
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"remarks"
,
getRemarks
())
.
append
(
"remarks"
,
getRemarks
())
.
append
(
"pictureUrl"
,
getPictureUrl
())
.
append
(
"reportMan"
,
getReportMan
())
.
toString
();
.
toString
();
}
}
}
}
gassafety-system/src/main/java/com/zehong/system/domain/vo/HiddenTroubleVo.java
0 → 100644
View file @
b1e2d4b3
package
com
.
zehong
.
system
.
domain
.
vo
;
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
;
/**
* 隐患信息对象 t_hidden_trouble
*
* @author zehong
* @date 2021-08-20
*/
public
class
HiddenTroubleVo
extends
BaseEntity
{
/** 隐患信息id */
private
Integer
troubleId
;
/** 隐患类型 */
@Excel
(
name
=
"隐患类型"
)
private
String
troubleType
;
/** 隐患名称 */
@Excel
(
name
=
"隐患名称"
)
private
String
troubleName
;
/** 隐患级别 */
@Excel
(
name
=
"隐患级别"
)
private
String
troubleLevel
;
/** 工单id */
@Excel
(
name
=
"工单id"
)
private
String
orderId
;
/** 设备id */
@Excel
(
name
=
"设备id"
)
private
Integer
deviceId
;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel
(
name
=
"设备类型"
,
readConverterExp
=
"0=管道,1调压阀,2阀门井,3流量计,4压力表"
)
private
String
deviceType
;
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
/** 纬度 */
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
/** 是否作废(0正常,1作废) */
@Excel
(
name
=
"是否作废(0正常,1作废)"
)
private
String
isDel
;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel
(
name
=
"处理状态"
,
readConverterExp
=
"1不需处理,2已处理完成,3未处理完成"
)
private
String
dealStatus
;
/** 地址 */
@Excel
(
name
=
"地址"
)
private
String
address
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
/** 图片地址 */
@Excel
(
name
=
"图片地址"
)
private
String
pictureUrl
;
/** 上报人(用户id) */
private
Long
reportMan
;
/** 上报人姓名 */
@Excel
(
name
=
"上报人姓名"
,
readConverterExp
=
"上报人姓名"
)
private
String
reportManName
;
public
void
setTroubleId
(
Integer
troubleId
)
{
this
.
troubleId
=
troubleId
;
}
public
Integer
getTroubleId
()
{
return
troubleId
;
}
public
String
getTroubleName
()
{
return
troubleName
;
}
public
void
setTroubleName
(
String
troubleName
)
{
this
.
troubleName
=
troubleName
;
}
public
void
setTroubleType
(
String
troubleType
)
{
this
.
troubleType
=
troubleType
;
}
public
String
getTroubleType
()
{
return
troubleType
;
}
public
void
setDeviceId
(
Integer
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
Integer
getDeviceId
()
{
return
deviceId
;
}
public
void
setTroubleLevel
(
String
troubleLevel
)
{
this
.
troubleLevel
=
troubleLevel
;
}
public
String
getTroubleLevel
()
{
return
troubleLevel
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
String
getDeviceName
()
{
return
deviceName
;
}
public
void
setDeviceName
(
String
deviceName
)
{
this
.
deviceName
=
deviceName
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
void
setDealStatus
(
String
dealStatus
)
{
this
.
dealStatus
=
dealStatus
;
}
public
String
getDealStatus
()
{
return
dealStatus
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setPictureUrl
(
String
pictureUrl
)
{
this
.
pictureUrl
=
pictureUrl
;
}
public
String
getPictureUrl
()
{
return
pictureUrl
;
}
public
void
setReportMan
(
Long
reportMan
)
{
this
.
reportMan
=
reportMan
;
}
public
Long
getReportMan
()
{
return
reportMan
;
}
public
String
getReportManName
()
{
return
reportManName
;
}
public
void
setReportManName
(
String
reportManName
)
{
this
.
reportManName
=
reportManName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"troubleId"
,
getTroubleId
())
.
append
(
"troubleType"
,
getTroubleType
())
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"troubleLevel"
,
getTroubleLevel
())
.
append
(
"orderId"
,
getOrderId
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"deviceType"
,
getDeviceType
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"dealStatus"
,
getDealStatus
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"address"
,
getAddress
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"remarks"
,
getRemarks
())
.
append
(
"pictureUrl"
,
getPictureUrl
())
.
append
(
"reportMan"
,
getReportMan
())
.
toString
();
}
}
gassafety-system/src/main/java/com/zehong/system/service/ITHiddenTroubleService.java
View file @
b1e2d4b3
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.THiddenTrouble
;
import
com.zehong.system.domain.THiddenTrouble
;
import
com.zehong.system.domain.vo.HiddenTroubleVo
;
/**
/**
* 隐患信息Service接口
* 隐患信息Service接口
...
@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService
...
@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService
* @param troubleId 隐患信息ID
* @param troubleId 隐患信息ID
* @return 隐患信息
* @return 隐患信息
*/
*/
public
THiddenTrouble
selectTHiddenTroubleById
(
int
troubleId
)
;
public
HiddenTroubleVo
selectTHiddenTroubleById
(
int
troubleId
)
throws
Exception
;
/**
/**
* 查询隐患信息列表
* 查询隐患信息列表
...
@@ -25,7 +26,7 @@ public interface ITHiddenTroubleService
...
@@ -25,7 +26,7 @@ public interface ITHiddenTroubleService
* @param tHiddenTrouble 隐患信息
* @param tHiddenTrouble 隐患信息
* @return 隐患信息集合
* @return 隐患信息集合
*/
*/
public
List
<
THiddenTrouble
>
selectTHiddenTroubleList
(
THiddenTrouble
tHiddenTrouble
);
public
List
<
HiddenTroubleVo
>
selectTHiddenTroubleList
(
THiddenTrouble
tHiddenTrouble
);
/**
/**
* 新增隐患信息
* 新增隐患信息
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/THiddenTroubleServiceImpl.java
View file @
b1e2d4b3
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.HiddenTroubleVo
;
import
com.zehong.system.mapper.SysUserMapper
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TPipeMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.THiddenTroubleMapper
;
import
com.zehong.system.mapper.THiddenTroubleMapper
;
...
@@ -19,6 +29,12 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
...
@@ -19,6 +29,12 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
{
{
@Autowired
@Autowired
private
THiddenTroubleMapper
tHiddenTroubleMapper
;
private
THiddenTroubleMapper
tHiddenTroubleMapper
;
@Autowired
private
TDeviceInfoMapper
tDeviceInfoMapper
;
@Autowired
private
TPipeMapper
tPipeMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
/**
/**
* 查询隐患信息
* 查询隐患信息
...
@@ -27,9 +43,22 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
...
@@ -27,9 +43,22 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息
* @return 隐患信息
*/
*/
@Override
@Override
public
THiddenTrouble
selectTHiddenTroubleById
(
int
troubleId
)
public
HiddenTroubleVo
selectTHiddenTroubleById
(
int
troubleId
)
{
{
return
tHiddenTroubleMapper
.
selectTHiddenTroubleById
(
troubleId
);
HiddenTroubleVo
hiddenTroubleVo
=
new
HiddenTroubleVo
();
THiddenTrouble
tHiddenTrouble
=
tHiddenTroubleMapper
.
selectTHiddenTroubleById
(
troubleId
);
BeanUtils
.
copyProperties
(
tHiddenTrouble
,
hiddenTroubleVo
);
if
(
tHiddenTrouble
.
getDeviceId
()
!=
null
){
if
(
"0"
.
equals
(
tHiddenTrouble
.
getDeviceType
())){
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
tHiddenTrouble
.
getDeviceId
());
hiddenTroubleVo
.
setDeviceName
(
pipe
.
getPipeName
());
}
else
{
TDeviceInfo
device
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
tHiddenTrouble
.
getDeviceId
());
hiddenTroubleVo
.
setDeviceName
(
device
.
getDeviceName
());
}
}
return
hiddenTroubleVo
;
}
}
/**
/**
...
@@ -39,9 +68,23 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
...
@@ -39,9 +68,23 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息
* @return 隐患信息
*/
*/
@Override
@Override
public
List
<
THiddenTrouble
>
selectTHiddenTroubleList
(
THiddenTrouble
tHiddenTrouble
)
public
List
<
HiddenTroubleVo
>
selectTHiddenTroubleList
(
THiddenTrouble
tHiddenTrouble
)
{
{
return
tHiddenTroubleMapper
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
List
<
HiddenTroubleVo
>
list
=
new
ArrayList
<>();
List
<
THiddenTrouble
>
tHiddenTroubleList
=
tHiddenTroubleMapper
.
selectTHiddenTroubleList
(
tHiddenTrouble
);
if
(
tHiddenTroubleList
.
size
()
!=
0
)
{
for
(
THiddenTrouble
trouble
:
tHiddenTroubleList
)
{
HiddenTroubleVo
hiddenTroubleVo
=
new
HiddenTroubleVo
();
BeanUtils
.
copyProperties
(
trouble
,
hiddenTroubleVo
);
SysUser
sysUser
=
sysUserMapper
.
selectUserById
(
trouble
.
getReportMan
());
hiddenTroubleVo
.
setReportManName
(
sysUser
.
getNickName
());
list
.
add
(
hiddenTroubleVo
);
}
}
return
list
;
}
}
/**
/**
...
...
gassafety-system/src/main/resources/mapper/system/THiddenTroubleMapper.xml
View file @
b1e2d4b3
...
@@ -6,32 +6,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -6,32 +6,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"THiddenTrouble"
id=
"THiddenTroubleResult"
>
<resultMap
type=
"THiddenTrouble"
id=
"THiddenTroubleResult"
>
<result
property=
"troubleId"
column=
"trouble_id"
/>
<result
property=
"troubleId"
column=
"trouble_id"
/>
<result
property=
"troubleName"
column=
"trouble_name"
/>
<result
property=
"troubleType"
column=
"trouble_type"
/>
<result
property=
"deviceId"
column=
"device_id"
/>
<result
property=
"deviceId"
column=
"device_id"
/>
<result
property=
"
deviceType"
column=
"device_type
"
/>
<result
property=
"
troubleLevel"
column=
"trouble_level
"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"deviceType"
column=
"device_type"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"dealStatus"
column=
"deal_status"
/>
<result
property=
"dealStatus"
column=
"deal_status"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"pictureUrl"
column=
"picture_url"
/>
<result
property=
"reportMan"
column=
"report_man"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTHiddenTroubleVo"
>
<sql
id=
"selectTHiddenTroubleVo"
>
select trouble_id,
device_id, device_type, order_id, address, longitude, latitude, deal_status, update_time, create_time, remarks
from t_hidden_trouble
select trouble_id,
trouble_name, trouble_type, device_id, trouble_level, order_id, longitude, device_type, latitude, is_del, deal_status, update_time, address, create_time, remarks, picture_url, report_man
from t_hidden_trouble
</sql>
</sql>
<select
id=
"selectTHiddenTroubleList"
parameterType=
"THiddenTrouble"
resultMap=
"THiddenTroubleResult"
>
<select
id=
"selectTHiddenTroubleList"
parameterType=
"THiddenTrouble"
resultMap=
"THiddenTroubleResult"
>
<include
refid=
"selectTHiddenTroubleVo"
/>
<include
refid=
"selectTHiddenTroubleVo"
/>
<where>
<where>
and is_del = '0'
<if
test=
"troubleName != null and troubleName != ''"
>
and trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"troubleType != null and troubleType != ''"
>
and trouble_type = #{troubleType}
</if>
<if
test=
"deviceId != null "
>
and device_id = #{deviceId}
</if>
<if
test=
"deviceId != null "
>
and device_id = #{deviceId}
</if>
<if
test=
"
deviceType != null "
>
and device_type = #{deviceType
}
</if>
<if
test=
"
troubleLevel != null and troubleLevel != ''"
>
and trouble_level = #{troubleLevel
}
</if>
<if
test=
"orderId != null and orderId != ''"
>
and order_id = #{orderId}
</if>
<if
test=
"orderId != null and orderId != ''"
>
and order_id = #{orderId}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
and device_type = #{deviceType}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"dealStatus != null and dealStatus != ''"
>
and deal_status = #{dealStatus}
</if>
<if
test=
"dealStatus != null and dealStatus != ''"
>
and deal_status = #{dealStatus}
</if>
<if
test=
"address != null and address != ''"
>
and address = #{address}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
<if
test=
"pictureUrl != null and pictureUrl != ''"
>
and picture_url = #{pictureUrl}
</if>
<if
test=
"reportMan != null "
>
and report_man = #{reportMan}
</if>
</where>
</where>
</select>
</select>
...
@@ -43,44 +56,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -43,44 +56,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"insertTHiddenTrouble"
parameterType=
"THiddenTrouble"
useGeneratedKeys=
"true"
keyProperty=
"troubleId"
>
<insert
id=
"insertTHiddenTrouble"
parameterType=
"THiddenTrouble"
useGeneratedKeys=
"true"
keyProperty=
"troubleId"
>
insert into t_hidden_trouble
insert into t_hidden_trouble
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"troubleName != null"
>
trouble_name,
</if>
<if
test=
"troubleType != null"
>
trouble_type,
</if>
<if
test=
"deviceId != null"
>
device_id,
</if>
<if
test=
"deviceId != null"
>
device_id,
</if>
<if
test=
"
deviceType != null"
>
device_type
,
</if>
<if
test=
"
troubleLevel != null"
>
trouble_level
,
</if>
<if
test=
"orderId != null"
>
order_id,
</if>
<if
test=
"orderId != null"
>
order_id,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"deviceType != null"
>
device_type,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"dealStatus != null"
>
deal_status,
</if>
<if
test=
"dealStatus != null"
>
deal_status,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"pictureUrl != null"
>
picture_url,
</if>
<if
test=
"reportMan != null"
>
report_man,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"troubleName != null"
>
#{troubleName},
</if>
<if
test=
"troubleType != null"
>
#{troubleType},
</if>
<if
test=
"deviceId != null"
>
#{deviceId},
</if>
<if
test=
"deviceId != null"
>
#{deviceId},
</if>
<if
test=
"
deviceType != null"
>
#{deviceType
},
</if>
<if
test=
"
troubleLevel != null"
>
#{troubleLevel
},
</if>
<if
test=
"orderId != null"
>
#{orderId},
</if>
<if
test=
"orderId != null"
>
#{orderId},
</if>
<if
test=
"address != null"
>
#{address},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"deviceType != null"
>
#{deviceType},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"dealStatus != null"
>
#{dealStatus},
</if>
<if
test=
"dealStatus != null"
>
#{dealStatus},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"address != null"
>
#{address},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"pictureUrl != null"
>
#{pictureUrl},
</if>
<if
test=
"reportMan != null"
>
#{reportMan},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateTHiddenTrouble"
parameterType=
"THiddenTrouble"
>
<update
id=
"updateTHiddenTrouble"
parameterType=
"THiddenTrouble"
>
update t_hidden_trouble
update t_hidden_trouble
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"troubleName != null"
>
trouble_name = #{troubleName},
</if>
<if
test=
"troubleType != null"
>
trouble_type = #{troubleType},
</if>
<if
test=
"deviceId != null"
>
device_id = #{deviceId},
</if>
<if
test=
"deviceId != null"
>
device_id = #{deviceId},
</if>
<if
test=
"
deviceType != null"
>
device_id = #{deviceType
},
</if>
<if
test=
"
troubleLevel != null"
>
trouble_level = #{troubleLevel
},
</if>
<if
test=
"orderId != null"
>
order_id = #{orderId},
</if>
<if
test=
"orderId != null"
>
order_id = #{orderId},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"deviceType != null"
>
device_type = #{deviceType},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"dealStatus != null"
>
deal_status = #{dealStatus},
</if>
<if
test=
"dealStatus != null"
>
deal_status = #{dealStatus},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
<if
test=
"pictureUrl != null"
>
picture_url = #{pictureUrl},
</if>
<if
test=
"reportMan != null"
>
report_man = #{reportMan},
</if>
</trim>
</trim>
where trouble_id = #{troubleId}
where trouble_id = #{troubleId}
</update>
</update>
...
...
gassafety-web/src/api/system/user.js
View file @
b1e2d4b3
...
@@ -10,6 +10,14 @@ export function listUser(query) {
...
@@ -10,6 +10,14 @@ export function listUser(query) {
})
})
}
}
// 查询用户列表
export
function
allListUser
()
{
return
request
({
url
:
'/system/user/allList'
,
method
:
'get'
,
})
}
// 查询巡检员列表
// 查询巡检员列表
export
function
inspectorList
(
query
)
{
export
function
inspectorList
(
query
)
{
return
request
({
return
request
({
...
...
gassafety-web/src/views/deviceInspection/inspectionPlan/index.vue
View file @
b1e2d4b3
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<
span
v
-
if
=
"scope.row.planStatus == 3"
>
已完成
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 3"
>
已完成
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
width
=
"280"
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
width
=
"280
px
"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
<
el
-
button
size
=
"normal"
size
=
"normal"
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
<
el
-
input
v
-
model
=
"form2.orderName"
placeholder
=
"请输入工单名称"
/>
<
el
-
input
v
-
model
=
"form2.orderName"
placeholder
=
"请输入工单名称"
/>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"指定执行人员"
prop
=
"appointInspector"
>
<
el
-
form
-
item
label
=
"指定执行人员"
prop
=
"appointInspector"
>
<
el
-
select
v
-
model
=
"form2.appointInspector"
placeholder
=
"请选择执行人员"
clearable
size
=
"small"
@
change
=
"setUserId"
>
<
el
-
select
v
-
model
=
"form2.appointInspector"
placeholder
=
"请选择执行人员"
clearable
size
=
"small"
>
<
el
-
option
<
el
-
option
v
-
for
=
"item in inspector"
v
-
for
=
"item in inspector"
:
key
=
"item.userId"
:
key
=
"item.userId"
...
@@ -230,7 +230,6 @@
...
@@ -230,7 +230,6 @@
level
:
"level"
,
level
:
"level"
,
children
:
"childList"
,
children
:
"childList"
,
}
,
}
,
devices
:
null
,
// 巡检员列表
// 巡检员列表
inspector
:
[],
inspector
:
[],
// 弹出层标题
// 弹出层标题
...
@@ -259,10 +258,10 @@
...
@@ -259,10 +258,10 @@
// 表单校验
// 表单校验
rules
:
{
rules
:
{
planName
:
[
planName
:
[
{
required
:
true
,
message
:
"
计划名称不能为空
"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"
请输入计划名称
"
,
trigger
:
"blur"
}
],
],
orderName
:
[
orderName
:
[
{
required
:
true
,
message
:
"
工单名称不能为空
"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"
请输入工单名称
"
,
trigger
:
"blur"
}
],
],
devices
:
[
devices
:
[
{
required
:
true
,
message
:
"请选择巡检设备"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请选择巡检设备"
,
trigger
:
"blur"
}
...
@@ -287,8 +286,7 @@
...
@@ -287,8 +286,7 @@
}
,
}
,
methods
:
{
methods
:
{
handleChange
(
value
)
{
handleChange
(
value
)
{
// this.devices = value;
console
.
log
(
this
.
form1
.
devices
);
console
.
log
(
this
.
form
.
devices
);
}
,
}
,
/** 查询巡检计划列表 */
/** 查询巡检计划列表 */
getList
()
{
getList
()
{
...
@@ -315,9 +313,6 @@
...
@@ -315,9 +313,6 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
}
);
}
,
}
,
setUserId
(
val
){
this
.
form
.
appointInspector
=
val
;
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open1
=
false
;
this
.
open1
=
false
;
...
@@ -337,7 +332,6 @@
...
@@ -337,7 +332,6 @@
createTime
:
null
,
createTime
:
null
,
remarks
:
null
remarks
:
null
}
;
}
;
this
.
devices
=
null
;
this
.
resetForm
(
"form1"
);
this
.
resetForm
(
"form1"
);
this
.
form2
=
{
this
.
form2
=
{
planId
:
null
,
planId
:
null
,
...
@@ -376,7 +370,7 @@
...
@@ -376,7 +370,7 @@
deviceNodeTree
().
then
(
response
=>
{
deviceNodeTree
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
this
.
options
=
response
.
data
;
this
.
open1
=
true
;
this
.
open1
=
true
;
this
.
title1
=
"
添加
巡检计划"
;
this
.
title1
=
"
新增
巡检计划"
;
}
);
}
);
}
,
}
,
/** 下发按钮操作 */
/** 下发按钮操作 */
...
@@ -386,8 +380,6 @@
...
@@ -386,8 +380,6 @@
const
planId
=
row
.
planId
||
this
.
ids
const
planId
=
row
.
planId
||
this
.
ids
getInspectionPlan
(
planId
).
then
(
response
=>
{
getInspectionPlan
(
planId
).
then
(
response
=>
{
this
.
form2
=
response
.
data
;
this
.
form2
=
response
.
data
;
this
.
plansName
=
this
.
form2
.
planName
;
this
.
form2
.
remarks
=
""
;
this
.
open2
=
true
;
this
.
open2
=
true
;
this
.
title2
=
"填写工单信息"
;
this
.
title2
=
"填写工单信息"
;
}
);
}
);
...
@@ -477,4 +469,4 @@
...
@@ -477,4 +469,4 @@
}
,
}
,
}
}
}
;
}
;
<
/script>
<
/script
>
\ No newline at end of file
gassafety-web/src/views/riskManagement/hiddenTrouble/index.vue
View file @
b1e2d4b3
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"设备id"
prop=
"deviceId"
>
<el-form-item
label=
"隐患名称"
prop=
"troubleName"
>
<el-input
<el-input
v-model=
"queryParams.troubleName"
placeholder=
"请输入隐患名称"
/>
v-model=
"queryParams.deviceId"
placeholder=
"请输入设备id"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"工单id"
prop=
"orderId"
>
<el-form-item
label=
"隐患类型"
prop=
"troubleType"
>
<el-input
<el-select
v-model=
"queryParams.troubleType"
placeholder=
"请选择隐患类型"
clearable
size=
"small"
>
v-model=
"queryParams.orderId"
<el-option
placeholder=
"请输入工单id"
v-for=
"dict in typeOptions"
clearable
:key=
"dict.dictValue"
size=
"small"
:label=
"dict.dictLabel"
@
keyup
.
enter
.
native=
"handleQuery"
:value=
"dict.dictValue"
/>
></el-option>
</el-form-item>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<el-input
v-model=
"queryParams.longitude"
placeholder=
"请输入经度"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"latitude"
>
<el-input
v-model=
"queryParams.latitude"
placeholder=
"请输入纬度"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"处理状态"
prop=
"dealStatus"
>
<el-select
v-model=
"queryParams.dealStatus"
placeholder=
"请选择处理状态"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<!--
<el-form-item
label=
"状态"
prop=
"dealStatus"
>
<el-input
<el-select
v-model=
"queryParams.dealStatus"
placeholder=
"请选择状态"
clearable
size=
"small"
>
v-model=
"queryParams.remarks"
<el-option
label=
""
value=
"0"
/>
placeholder=
"请输入备注"
</el-select>
clearable
</el-form-item>
-->
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<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>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
...
@@ -68,71 +36,82 @@
...
@@ -68,71 +36,82 @@
v-hasPermi=
"['riskManagement:hiddenTrouble:add']"
v-hasPermi=
"['riskManagement:hiddenTrouble:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['riskManagement:hiddenTrouble:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['riskManagement:hiddenTrouble:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
v-hasPermi=
"['riskManagement:hiddenTrouble:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"hiddenTroubleList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"hiddenTroubleList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"隐患名称"
align=
"center"
prop=
"troubleName"
/>
<el-table-column
label=
"隐患信息id"
align=
"center"
prop=
"troubleId"
/>
<el-table-column
label=
"隐患类型"
align=
"center"
prop=
"troubleType"
>
<el-table-column
label=
"设备id"
align=
"center"
prop=
"deviceId"
/>
<template
slot-scope=
"scope"
>
<el-table-column
label=
"工单id"
align=
"center"
prop=
"orderId"
/>
<span
v-if=
"scope.row.troubleType == 1"
>
设备老化
</span>
<el-table-column
label=
"经度"
align=
"center"
prop=
"longitude"
/>
<span
v-if=
"scope.row.troubleType == 2"
>
质保过期
</span>
<el-table-column
label=
"纬度"
align=
"center"
prop=
"latitude"
/>
</
template
>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
/>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remarks"
/>
<el-table-column
label=
"隐患级别"
align=
"center"
prop=
"troubleLevel"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.troubleLevel == 1"
>
Ⅰ级
</span>
<span
v-if=
"scope.row.troubleLevel == 2"
>
Ⅱ级
</span>
<span
v-if=
"scope.row.troubleLevel == 3"
>
Ⅲ级
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"图片"
align=
"center"
prop=
"pictureUrl"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pictureUrl != '' && scope.row.pictureUrl != null"
@
click=
"checkFile(scope.row.pictureUrl)"
>
<i
class=
"el-icon el-icon-view"
></i>
查看
</span>
<span
v-if=
"scope.row.pictureUrl == '' || scope.row.pictureUrl == null"
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"上报人"
align=
"center"
prop=
"reportManName"
/>
<el-table-column
label=
"上报时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未生成工单
</span>
<span
v-if=
"(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''"
>
未处理
</span>
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"280px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
size=
"mini"
size=
"normal"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleIssue(scope.row)"
v-hasPermi=
"['workOrder:basicsInfo:add']"
v-if=
"scope.row.orderId == '' || scope.row.orderId == null"
>
生成工单
</el-button>
<el-button
size=
"normal"
type=
"text"
type=
"text"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['riskManagement:hiddenTrouble:edit']"
v-hasPermi=
"['riskManagement:hiddenTrouble:edit']"
>
修改
</el-button>
v-if=
"scope.row.orderId == '' || scope.row.orderId == null"
>
修改
</el-button>
<el-button
size=
"normal"
type=
"text"
icon=
"el-icon-edit"
@
click=
"showDetail(scope.row)"
>
详情
</el-button>
<el-button
<el-button
size=
"
mini
"
size=
"
normal
"
type=
"text"
type=
"text"
icon=
"el-icon-delete"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
@
click=
"handleIsDel(scope.row)"
v-hasPermi=
"['riskManagement:hiddenTrouble:remove']"
v-if=
"scope.row.orderId == '' || scope.row.orderId == null"
>
删除
</el-button>
>
作废
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total>0"
v-show=
"total>0"
:total=
"total"
:total=
"total"
...
@@ -142,43 +121,162 @@
...
@@ -142,43 +121,162 @@
/>
/>
<!-- 添加或修改隐患信息对话框 -->
<!-- 添加或修改隐患信息对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title1"
:visible
.
sync=
"open1"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form1"
:model=
"form1"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"设备id"
prop=
"deviceId"
>
<el-col>
<el-input
v-model=
"form.deviceId"
placeholder=
"请输入设备id"
/>
<el-form-item
label=
"隐患名称"
prop=
"troubleName"
style=
"width: 720px"
>
<el-input
v-model=
"form1.troubleName"
placeholder=
"请输入隐患名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患类型"
prop=
"troubleType"
>
<el-select
v-model=
"form1.troubleType"
placeholder=
"请选择隐患类型"
>
<el-option
v-for=
"dict in typeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"隐患级别"
prop=
"troubleLevel"
>
<el-select
v-model=
"form1.troubleLevel"
placeholder=
"请选择隐患级别"
>
<el-option
v-for=
"dict in levelOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"上报人"
prop=
"reportMan"
>
<el-select
v-model=
"form1.reportMan"
placeholder=
"请选择上报人"
clearable
size=
"small"
>
<el-option
v-for=
"item in userList"
:key=
"item.userId"
:label=
"item.nickName"
:value=
"item.userId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"隐患设备"
prop=
"device"
>
<el-cascader
v-model=
"form1.device"
:options=
"options"
:props=
"props"
:show-all-levels=
"false"
@
change=
"handleChange"
filterable
clearable
></el-cascader>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"地址"
prop=
"address"
style=
"width: 720px"
>
<el-input
v-model=
"form1.address"
type=
"textarea"
placeholder=
"请输入地址"
/>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"经纬度"
prop=
"longitude"
>
<el-row>
<el-col
:span=
"8"
>
<el-input
v-model
.
number=
"form1.longitude"
placeholder=
"请输入经度"
/>
</el-col>
<el-col
:span=
"8"
style=
"margin-left: 10px"
>
<el-input
v-model
.
number=
"form1.latitude"
placeholder=
"请输入纬度"
/>
</el-col>
<el-col
:span=
"5"
style=
"margin-left: 10px"
>
<el-button
type=
"primary"
plain
@
click=
"MapdialogFun"
>
选择经纬度
</el-button>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"图片上传"
prop=
"pictureUrl"
>
<MyFileUpload
listType=
"picture-card"
@
resFun=
"getFileInfo"
@
remove=
"listRemove"
:fileArr=
"fileList"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form1.pictureUrl"
></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"隐患信息"
prop=
"remarks"
style=
"width: 720px"
>
<el-input
v-model=
"form1.remarks"
type=
"textarea"
placeholder=
"请输入隐患信息"
/>
</el-form-item>
</el-col>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm1"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
:title=
"title2"
:visible
.
sync=
"open2"
width=
"800px"
append-to-body
@
close=
"cancel"
>
<el-form
ref=
"form2"
:model=
"form2"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"隐患名称"
prop=
"troubleName"
>
<font>
{{form2.troubleName}}
</font>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
工单id"
prop=
"orderId
"
>
<el-form-item
label=
"
隐患类型"
prop=
"troubleType
"
>
<
el-input
v-model=
"form.orderId"
placeholder=
"请输入工单id"
/
>
<
font>
{{form2.troubleType}}
</font
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
经度"
prop=
"longitude
"
>
<el-form-item
label=
"
隐患级别"
prop=
"troubleLevel
"
>
<
el-input
v-model=
"form.longitude"
placeholder=
"请输入经度"
/
>
<
font>
{{form2.troubleLevel}}
</font
>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
纬度"
prop=
"latitude
"
>
<el-form-item
label=
"
工单名称"
prop=
"orderName"
style=
"width: 720px
"
>
<el-input
v-model=
"form
.latitude"
placeholder=
"请输入纬度
"
/>
<el-input
v-model=
"form
2.orderName"
placeholder=
"请输入工单名称
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"处理状态"
>
<el-form-item
label=
"指定执行人员"
prop=
"appointInspector"
>
<el-radio-group
v-model=
"form.dealStatus"
>
<el-select
v-model=
"form2.appointInspector"
placeholder=
"请选择执行人员"
clearable
size=
"small"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
<el-option
</el-radio-group>
v-for=
"item in inspector"
:key=
"item.userId"
:label=
"item.nickName"
:value=
"item.userId"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
备注"
prop=
"remarks
"
>
<el-form-item
label=
"
工单描述"
prop=
"remarks"
style=
"width: 720px
"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注
"
/>
<el-input
type=
"textarea"
v-model=
"form2.remarks"
placeholder=
"请输入工单描述
"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm
2
"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<Mapdialog
v-if=
"loadmap"
:dialogTableVisible=
"dialogTableVisible"
@
dialogcancelFun=
"dialogcancelFun"
:slat=
"form1.latitude"
:slng=
"form1.longitude"
@
confirmFun=
"confirmFun($event)"
></Mapdialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
listHiddenTrouble
,
getHiddenTrouble
,
delHiddenTrouble
,
addHiddenTrouble
,
updateHiddenTrouble
,
exportHiddenTrouble
}
from
"@/api/riskManagement/hiddenTrouble"
;
import
{
listHiddenTrouble
,
getHiddenTrouble
,
addHiddenTrouble
,
updateHiddenTrouble
,
exportHiddenTrouble
}
from
"@/api/riskManagement/hiddenTrouble"
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
import
{
inspectorList
,
allListUser
}
from
"@/api/system/user"
;
import
{
deviceNodeTree
}
from
"@/api/device/deviceInfo"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
Mapdialog
from
"@/components/mapDialog/checkDeviceLoaction.vue"
;
export
default
{
export
default
{
name
:
"HiddenTrouble"
,
name
:
"HiddenTrouble"
,
components
:
{
components
:
{
MyFileUpload
,
Mapdialog
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -198,30 +296,97 @@ export default {
...
@@ -198,30 +296,97 @@ export default {
total
:
0
,
total
:
0
,
// 隐患信息表格数据
// 隐患信息表格数据
hiddenTroubleList
:
[],
hiddenTroubleList
:
[],
// 隐患类型字典
typeOptions
:
[],
// 隐患等级字典
levelOptions
:
[],
// 上传文件列表
fileList
:
[],
// 地图
loadmap
:
false
,
dialogTableVisible
:
false
,
// 设备级联
options
:
[],
props
:
{
value
:
"id"
,
label
:
"name"
,
level
:
"level"
,
children
:
"childList"
,
},
// 用户列表
userList
:
[],
// 巡检员列表
inspector
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
1
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open1
:
false
,
// 弹出层标题
title2
:
""
,
// 是否显示弹出层
open2
:
false
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
troubleName
:
null
,
troubleType
:
null
,
deviceId
:
null
,
deviceId
:
null
,
troubleLevel
:
null
,
orderId
:
null
,
orderId
:
null
,
longitude
:
null
,
longitude
:
null
,
deviceType
:
null
,
latitude
:
null
,
latitude
:
null
,
dealStatus
:
null
,
dealStatus
:
null
,
remarks
:
null
address
:
null
,
remarks
:
null
,
pictureUrl
:
null
,
reportMan
:
null
},
},
// 表单参数
// 表单参数
form
:
{},
form1
:
{},
// 表单参数
form2
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
troubleName
:
[
{
required
:
true
,
message
:
"请输入隐患名称"
,
trigger
:
"blur"
}
],
troubleType
:
[
{
required
:
true
,
message
:
"请选择隐患类型"
,
trigger
:
"blur"
}
],
troubleLevel
:
[
{
required
:
true
,
message
:
"请选择隐患级别"
,
trigger
:
"blur"
}
],
reportMan
:
[
{
required
:
true
,
message
:
"请选择上报人"
,
trigger
:
"blur"
}
],
address
:
[
{
required
:
true
,
message
:
"请输入地址"
,
trigger
:
"blur"
}
],
pictureUrl
:
[
{
required
:
true
,
message
:
"请上传图片"
,
trigger
:
"blur"
}
],
longitude
:
[
{
required
:
true
,
message
:
"请输入经纬度"
,
trigger
:
"blur"
}
],
orderName
:
[
{
required
:
true
,
message
:
"请输入工单名称"
,
trigger
:
"blur"
}
],
appointInspector
:
[
{
required
:
true
,
message
:
"请选择巡检人员"
,
trigger
:
"blur"
}
],
}
}
};
};
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getDicts
(
"t_trouble_type"
).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_trouble_level"
).
then
(
response
=>
{
this
.
levelOptions
=
response
.
data
;
});
},
},
methods
:
{
methods
:
{
/** 查询隐患信息列表 */
/** 查询隐患信息列表 */
...
@@ -233,25 +398,98 @@ export default {
...
@@ -233,25 +398,98 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
checkFile
(
url
)
{
window
.
open
(
"http://36.148.23.59:8901/gassafety"
+
url
,
"_blank"
);
},
/** 详细信息跳转 */
showDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/riskManagement/hiddenTroubleDetail'
,
query
:{
toubleId
:
row
.
toubleId
}
})
},
getFileInfo
(
res
){
this
.
form1
.
pictureUrl
=
res
.
url
;
},
listRemove
(
e
)
{
this
.
form1
.
pictureUrl
=
""
;
this
.
fileList
=
[];
},
confirmFun
(
res
)
{
//确认选择经纬度
this
.
form1
.
longitude
=
res
.
lng
;
this
.
form1
.
latitude
=
res
.
lat
;
},
MapdialogFun
()
{
this
.
loadmap
=
true
;
this
.
dialogTableVisible
=
true
;
},
dialogcancelFun
()
{
this
.
loadmap
=
false
;
this
.
dialogTableVisible
=
false
;
},
handleChange
(
value
)
{
console
.
log
(
this
.
form1
.
device
);
let
arr
=
this
.
form1
.
device
;
this
.
form1
.
deviceType
=
arr
[
0
];
this
.
form1
.
deviceId
=
arr
[
1
];
},
getUserList
(){
this
.
loading
=
true
;
allListUser
().
then
(
response
=>
{
this
.
userList
=
response
.
data
;
this
.
loading
=
false
;
});
},
getInspectorList
(){
this
.
loading
=
true
;
inspectorList
().
then
(
response
=>
{
this
.
inspector
=
response
.
data
;
this
.
loading
=
false
;
});
},
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
;
this
.
open1
=
false
;
this
.
open2
=
false
;
this
.
reset
();
this
.
reset
();
},
},
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
1
=
{
troubleId
:
null
,
troubleId
:
null
,
troubleType
:
null
,
deviceId
:
null
,
deviceId
:
null
,
troubleLevel
:
null
,
orderId
:
null
,
orderId
:
null
,
longitude
:
null
,
longitude
:
null
,
device
:
null
,
deviceType
:
null
,
latitude
:
null
,
latitude
:
null
,
dealStatus
:
"0"
,
dealStatus
:
null
,
updateTime
:
null
,
address
:
null
,
createTime
:
null
,
remarks
:
null
,
pictureUrl
:
null
,
reportMan
:
null
};
this
.
resetForm
(
"form1"
);
this
.
form2
=
{
troubleId
:
null
,
troubleName
:
null
,
troubleType
:
null
,
troubleLevel
:
null
,
orderId
:
null
,
orderName
:
null
,
appointInspector
:
null
,
updateTime
:
null
,
updateTime
:
null
,
createTime
:
null
,
createTime
:
null
,
remarks
:
null
remarks
:
null
};
};
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form
2
"
);
},
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
...
@@ -272,68 +510,90 @@ export default {
...
@@ -272,68 +510,90 @@ export default {
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
getUserList
();
this
.
title
=
"添加隐患信息"
;
deviceNodeTree
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
this
.
open1
=
true
;
this
.
title1
=
"新增隐患信息"
;
});
},
/** 下发按钮操作 */
handleIssue
(
row
)
{
this
.
reset
();
this
.
getInspectorList
();
const
troubleId
=
row
.
troubleId
||
this
.
ids
getHiddenTrouble
(
troubleId
).
then
(
response
=>
{
this
.
form2
=
response
.
data
;
this
.
open2
=
true
;
this
.
title2
=
"填写工单信息"
;
});
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
this
.
getUserList
();
deviceNodeTree
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
});
const
troubleId
=
row
.
troubleId
||
this
.
ids
const
troubleId
=
row
.
troubleId
||
this
.
ids
getHiddenTrouble
(
troubleId
).
then
(
response
=>
{
getHiddenTrouble
(
troubleId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form1
=
response
.
data
;
this
.
open
=
true
;
if
(
this
.
form1
.
deviceType
!=
null
&&
this
.
form1
.
deviceId
!=
null
){
this
.
title
=
"修改隐患信息"
;
this
.
form1
.
device
=
[
this
.
form1
.
deviceType
,
this
.
form1
.
deviceId
];
}
this
.
open1
=
true
;
this
.
title1
=
"修改隐患信息"
;
});
});
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
1
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form
1
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
troubleId
!=
null
)
{
if
(
this
.
form
1
.
troubleId
!=
null
)
{
updateHiddenTrouble
(
this
.
form
).
then
(
response
=>
{
updateHiddenTrouble
(
this
.
form
1
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
open
1
=
false
;
this
.
getList
();
this
.
getList
();
});
});
}
else
{
}
else
{
addHiddenTrouble
(
this
.
form
).
then
(
response
=>
{
addHiddenTrouble
(
this
.
form
1
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
open
1
=
false
;
this
.
getList
();
this
.
getList
();
});
});
}
}
}
}
});
});
},
},
/** 删除按钮操作 */
/** 生成工单提交按钮 */
handleDelete
(
row
)
{
submitForm2
()
{
const
troubleIds
=
row
.
troubleId
||
this
.
ids
;
this
.
$refs
[
"form2"
].
validate
(
valid
=>
{
this
.
$confirm
(
'是否确认删除隐患信息编号为"'
+
troubleIds
+
'"的数据项?'
,
"警告"
,
{
if
(
valid
)
{
confirmButtonText
:
"确定"
,
this
.
form2
.
resourceId
=
this
.
form2
.
troubleId
;
cancelButtonText
:
"取消"
,
this
.
form2
.
orderType
=
"2"
;
type
:
"warning"
addBasicsInfo
(
this
.
form2
).
then
(
response
=>
{
}).
then
(
function
()
{
this
.
msgSuccess
(
"生成工单成功"
);
return
delHiddenTrouble
(
troubleIds
);
this
.
open2
=
false
;
}).
then
(()
=>
{
this
.
getList
();
this
.
getList
();
});
this
.
msgSuccess
(
"删除成功"
);
}
}).
catch
(()
=>
{});
});
},
/** 作废按钮操作 */
handleIsDel
(
row
)
{
row
.
isDel
=
"1"
;
this
.
$confirm
(
'是否确认作废隐患名称为"'
+
row
.
troubleName
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
updateHiddenTrouble
(
row
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"已作废"
);
}).
catch
(()
=>
{
});
},
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有隐患信息数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportHiddenTrouble
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
}
};
};
</
script
>
</
script
>
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