Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
e56ada59
Commit
e56ada59
authored
Aug 27, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 燃气用户下 增加 安全装置加装信息 开发中
parent
0d7e386d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1177 additions
and
19 deletions
+1177
-19
TGasuserSafetyDeviceInfoController.java
...troller/supervise/TGasuserSafetyDeviceInfoController.java
+127
-0
TGasuserSafetyDeviceInfo.java
...va/com/zehong/system/domain/TGasuserSafetyDeviceInfo.java
+195
-0
TGasuserSafetyDeviceInfoMapper.java
.../zehong/system/mapper/TGasuserSafetyDeviceInfoMapper.java
+77
-0
ITGasuserSafetyDeviceInfoService.java
...hong/system/service/ITGasuserSafetyDeviceInfoService.java
+82
-0
TGasuserSafetyDeviceInfoServiceImpl.java
...tem/service/impl/TGasuserSafetyDeviceInfoServiceImpl.java
+123
-0
TGasuserSafetyDeviceInfoMapper.xml
...esources/mapper/system/TGasuserSafetyDeviceInfoMapper.xml
+133
-0
user.js
zh-baseversion-web/src/api/regulation/user.js
+40
-0
index.vue
...eb/src/views/regulation/userManagement/gasUsers/index.vue
+400
-19
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TGasuserSafetyDeviceInfoController.java
0 → 100644
View file @
e56ada59
package
com
.
zehong
.
web
.
controller
.
supervise
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
import
com.zehong.system.service.ITGasuserSafetyDeviceInfoService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 用户管理-燃气用户-安全装置加装维护Controller
*
* @author zehong
* @date 2024-08-27
*/
@RestController
@RequestMapping
(
"/gasUserSafetyDevice/info"
)
public
class
TGasuserSafetyDeviceInfoController
extends
BaseController
{
@Autowired
private
ITGasuserSafetyDeviceInfoService
tGasuserSafetyDeviceInfoService
;
/**
* 查询用户管理-燃气用户-安全装置加装维护列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
startPage
();
List
<
TGasuserSafetyDeviceInfo
>
list
=
tGasuserSafetyDeviceInfoService
.
selectTGasuserSafetyDeviceInfoList
(
tGasuserSafetyDeviceInfo
);
return
getDataTable
(
list
);
}
/**
* 查询无绑定的 关联设备信息
* @return
*/
@RequestMapping
(
"/queryNoSelectSafeDeviceInfoList"
)
public
TableDataInfo
queryNoSelectSafeDeviceInfoList
(
@RequestBody
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
){
List
<
TGasuserSafetyDeviceInfo
>
tGasuserSafetyDeviceInfos
=
tGasuserSafetyDeviceInfoService
.
queryNoSelectSafeDeviceInfoList
(
tGasuserSafetyDeviceInfo
);
return
getDataTable
(
tGasuserSafetyDeviceInfos
);
}
/**
* 导出用户管理-燃气用户-安全装置加装维护列表
*/
@Log
(
title
=
"用户管理-燃气用户-安全装置加装维护"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
List
<
TGasuserSafetyDeviceInfo
>
list
=
tGasuserSafetyDeviceInfoService
.
queryNoSelectSafeDeviceInfoList
(
tGasuserSafetyDeviceInfo
);
ExcelUtil
<
TGasuserSafetyDeviceInfo
>
util
=
new
ExcelUtil
<
TGasuserSafetyDeviceInfo
>(
TGasuserSafetyDeviceInfo
.
class
);
return
util
.
exportExcel
(
list
,
"用户管理-燃气用户-安全装置加装维护数据"
);
}
/**
* 获取用户管理-燃气用户-安全装置加装维护详细信息
*/
@GetMapping
(
value
=
"/{gasUserSafetyDeviceId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"gasUserSafetyDeviceId"
)
Long
gasUserSafetyDeviceId
)
{
return
AjaxResult
.
success
(
tGasuserSafetyDeviceInfoService
.
selectTGasuserSafetyDeviceInfoById
(
gasUserSafetyDeviceId
));
}
/**
* 新增用户管理-燃气用户-安全装置加装维护
*/
@Log
(
title
=
"用户管理-燃气用户-安全装置加装维护"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
return
toAjax
(
tGasuserSafetyDeviceInfoService
.
insertTGasuserSafetyDeviceInfo
(
tGasuserSafetyDeviceInfo
));
}
/**
* 修改用户管理-燃气用户-安全装置加装维护
*/
@Log
(
title
=
"用户管理-燃气用户-安全装置加装维护"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
return
toAjax
(
tGasuserSafetyDeviceInfoService
.
updateTGasuserSafetyDeviceInfo
(
tGasuserSafetyDeviceInfo
));
}
/**
* 删除用户管理-燃气用户-安全装置加装维护
*/
@Log
(
title
=
"用户管理-燃气用户-安全装置加装维护"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{gasUserSafetyDeviceIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
gasUserSafetyDeviceIds
)
{
return
toAjax
(
tGasuserSafetyDeviceInfoService
.
deleteTGasuserSafetyDeviceInfoByIds
(
gasUserSafetyDeviceIds
));
}
/**
* 关联安装加装装置 批量删除
* @param safetyDetailIds s
*/
@RequestMapping
(
"/deleteSafetyDeviceListInfo"
)
public
void
deleteSafetyDeviceListInfo
(
@RequestBody
Long
[]
safetyDetailIds
){
tGasuserSafetyDeviceInfoService
.
deleteSafetyDeviceListInfo
(
safetyDetailIds
);
}
/**
* 关联安装加装装置 单条删除
* @param safetyDetailId i
*/
@RequestMapping
(
"/deleteSafetyDeviceInfo"
)
public
void
deleteSafetyDeviceInfo
(
@RequestBody
Long
safetyDetailId
){
tGasuserSafetyDeviceInfoService
.
deleteSafetyDeviceInfo
(
safetyDetailId
);
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/TGasuserSafetyDeviceInfo.java
0 → 100644
View file @
e56ada59
package
com
.
zehong
.
system
.
domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 用户管理-燃气用户-安全装置加装维护对象 t_gasuser_safety_device_info
*
* @author zehong
* @date 2024-08-27
*/
public
class
TGasuserSafetyDeviceInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 安全装置加装ID */
private
Long
gasUserSafetyDeviceId
;
/** 用户管理-燃气用户关联id */
@Excel
(
name
=
"用户管理-燃气用户关联id"
)
private
Long
relationGasuserId
;
/** 关联设备类型 */
@Excel
(
name
=
"关联设备类型"
)
private
String
relationDeviceType
;
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
/** 设备型号 */
@Excel
(
name
=
"设备型号"
)
private
String
deviceModel
;
/** 物联网编号 */
@Excel
(
name
=
"物联网编号"
)
private
String
fIotNo
;
/** 探测介质 */
@Excel
(
name
=
"探测介质"
)
private
String
detectionMedium
;
/** 设备安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"设备安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
deviceInstallTime
;
/** 安装位置 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"安装位置"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
deviceInstallPosition
;
/** 负责人 */
@Excel
(
name
=
"负责人"
)
private
String
head
;
/** 联系电话 */
@Excel
(
name
=
"联系电话"
)
private
String
phone
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
public
void
setGasUserSafetyDeviceId
(
Long
gasUserSafetyDeviceId
)
{
this
.
gasUserSafetyDeviceId
=
gasUserSafetyDeviceId
;
}
public
Long
getGasUserSafetyDeviceId
()
{
return
gasUserSafetyDeviceId
;
}
public
void
setRelationGasuserId
(
Long
relationGasuserId
)
{
this
.
relationGasuserId
=
relationGasuserId
;
}
public
Long
getRelationGasuserId
()
{
return
relationGasuserId
;
}
public
void
setRelationDeviceType
(
String
relationDeviceType
)
{
this
.
relationDeviceType
=
relationDeviceType
;
}
public
String
getRelationDeviceType
()
{
return
relationDeviceType
;
}
public
void
setDeviceName
(
String
deviceName
)
{
this
.
deviceName
=
deviceName
;
}
public
String
getDeviceName
()
{
return
deviceName
;
}
public
void
setDeviceModel
(
String
deviceModel
)
{
this
.
deviceModel
=
deviceModel
;
}
public
String
getDeviceModel
()
{
return
deviceModel
;
}
public
void
setfIotNo
(
String
fIotNo
)
{
this
.
fIotNo
=
fIotNo
;
}
public
String
getfIotNo
()
{
return
fIotNo
;
}
public
void
setDetectionMedium
(
String
detectionMedium
)
{
this
.
detectionMedium
=
detectionMedium
;
}
public
String
getDetectionMedium
()
{
return
detectionMedium
;
}
public
void
setDeviceInstallTime
(
Date
deviceInstallTime
)
{
this
.
deviceInstallTime
=
deviceInstallTime
;
}
public
Date
getDeviceInstallTime
()
{
return
deviceInstallTime
;
}
public
void
setDeviceInstallPosition
(
Date
deviceInstallPosition
)
{
this
.
deviceInstallPosition
=
deviceInstallPosition
;
}
public
Date
getDeviceInstallPosition
()
{
return
deviceInstallPosition
;
}
public
void
setHead
(
String
head
)
{
this
.
head
=
head
;
}
public
String
getHead
()
{
return
head
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"gasUserSafetyDeviceId"
,
getGasUserSafetyDeviceId
())
.
append
(
"relationGasuserId"
,
getRelationGasuserId
())
.
append
(
"relationDeviceType"
,
getRelationDeviceType
())
.
append
(
"deviceName"
,
getDeviceName
())
.
append
(
"deviceModel"
,
getDeviceModel
())
.
append
(
"fIotNo"
,
getfIotNo
())
.
append
(
"detectionMedium"
,
getDetectionMedium
())
.
append
(
"deviceInstallTime"
,
getDeviceInstallTime
())
.
append
(
"deviceInstallPosition"
,
getDeviceInstallPosition
())
.
append
(
"head"
,
getHead
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"isDel"
,
getIsDel
())
.
toString
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TGasuserSafetyDeviceInfoMapper.java
0 → 100644
View file @
e56ada59
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
/**
* 用户管理-燃气用户-安全装置加装维护Mapper接口
*
* @author zehong
* @date 2024-08-27
*/
public
interface
TGasuserSafetyDeviceInfoMapper
{
/**
* 查询用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceId 用户管理-燃气用户-安全装置加装维护ID
* @return 用户管理-燃气用户-安全装置加装维护
*/
public
TGasuserSafetyDeviceInfo
selectTGasuserSafetyDeviceInfoById
(
Long
gasUserSafetyDeviceId
);
/**
* 查询用户管理-燃气用户-安全装置加装维护列表
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 用户管理-燃气用户-安全装置加装维护集合
*/
public
List
<
TGasuserSafetyDeviceInfo
>
selectTGasuserSafetyDeviceInfoList
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 查询没有被关联的数据
* @param gasuserSafetyDeviceInfo g
* @return r
*/
public
List
<
TGasuserSafetyDeviceInfo
>
queryNoSelectSafeDeviceInfoList
(
TGasuserSafetyDeviceInfo
gasuserSafetyDeviceInfo
);
/**
* 新增用户管理-燃气用户-安全装置加装维护
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 结果
*/
public
int
insertTGasuserSafetyDeviceInfo
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 修改用户管理-燃气用户-安全装置加装维护
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 结果
*/
public
int
updateTGasuserSafetyDeviceInfo
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 删除用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceId 用户管理-燃气用户-安全装置加装维护ID
* @return 结果
*/
public
int
deleteTGasuserSafetyDeviceInfoById
(
Long
gasUserSafetyDeviceId
);
/**
* 批量删除用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTGasuserSafetyDeviceInfoByIds
(
Long
[]
gasUserSafetyDeviceIds
);
/**
* 逻辑删除
* @param gasUserSafetyDeviceIds gas
* @return r
*/
public
int
deleteSafetyDeviceListInfo
(
Long
[]
gasUserSafetyDeviceIds
);
public
int
deleteSafetyDeviceInfo
(
Long
deviceId
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITGasuserSafetyDeviceInfoService.java
0 → 100644
View file @
e56ada59
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
/**
* 用户管理-燃气用户-安全装置加装维护Service接口
*
* @author zehong
* @date 2024-08-27
*/
public
interface
ITGasuserSafetyDeviceInfoService
{
/**
* 查询用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceId 用户管理-燃气用户-安全装置加装维护ID
* @return 用户管理-燃气用户-安全装置加装维护
*/
public
TGasuserSafetyDeviceInfo
selectTGasuserSafetyDeviceInfoById
(
Long
gasUserSafetyDeviceId
);
/**
* 查询用户管理-燃气用户-安全装置加装维护列表
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 用户管理-燃气用户-安全装置加装维护集合
*/
public
List
<
TGasuserSafetyDeviceInfo
>
selectTGasuserSafetyDeviceInfoList
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 查询用户管理-燃气用户-安全装置加装维护列表-燃气用户界面使用
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 用户管理-燃气用户-安全装置加装维护集合
*/
public
List
<
TGasuserSafetyDeviceInfo
>
queryNoSelectSafeDeviceInfoList
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 新增用户管理-燃气用户-安全装置加装维护
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 结果
*/
public
int
insertTGasuserSafetyDeviceInfo
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 修改用户管理-燃气用户-安全装置加装维护
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 结果
*/
public
int
updateTGasuserSafetyDeviceInfo
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
);
/**
* 批量删除用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceIds 需要删除的用户管理-燃气用户-安全装置加装维护ID
* @return 结果
*/
public
int
deleteTGasuserSafetyDeviceInfoByIds
(
Long
[]
gasUserSafetyDeviceIds
);
/**
* 关联设备数据删除接口
* @param deviceIds
*/
void
deleteSafetyDeviceListInfo
(
Long
[]
deviceIds
);
/**
* 关联设备数据删除接口
* @param deviceIds
*/
void
deleteSafetyDeviceInfo
(
Long
deviceId
);
/**
* 删除用户管理-燃气用户-安全装置加装维护信息
*
* @param gasUserSafetyDeviceId 用户管理-燃气用户-安全装置加装维护ID
* @return 结果
*/
public
int
deleteTGasuserSafetyDeviceInfoById
(
Long
gasUserSafetyDeviceId
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TGasuserSafetyDeviceInfoServiceImpl.java
0 → 100644
View file @
e56ada59
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TGasuserSafetyDeviceInfoMapper
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
import
com.zehong.system.service.ITGasuserSafetyDeviceInfoService
;
import
javax.annotation.Resource
;
/**
* 用户管理-燃气用户-安全装置加装维护Service业务层处理
*
* @author zehong
* @date 2024-08-27
*/
@Service
public
class
TGasuserSafetyDeviceInfoServiceImpl
implements
ITGasuserSafetyDeviceInfoService
{
@Resource
private
TGasuserSafetyDeviceInfoMapper
tGasuserSafetyDeviceInfoMapper
;
/**
* 查询用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceId 用户管理-燃气用户-安全装置加装维护ID
* @return 用户管理-燃气用户-安全装置加装维护
*/
@Override
public
TGasuserSafetyDeviceInfo
selectTGasuserSafetyDeviceInfoById
(
Long
gasUserSafetyDeviceId
)
{
return
tGasuserSafetyDeviceInfoMapper
.
selectTGasuserSafetyDeviceInfoById
(
gasUserSafetyDeviceId
);
}
/**
* 查询用户管理-燃气用户-安全装置加装维护列表
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 用户管理-燃气用户-安全装置加装维护
*/
@Override
public
List
<
TGasuserSafetyDeviceInfo
>
selectTGasuserSafetyDeviceInfoList
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
return
tGasuserSafetyDeviceInfoMapper
.
selectTGasuserSafetyDeviceInfoList
(
tGasuserSafetyDeviceInfo
);
}
/**
* 查询用户管理-燃气用户-安全装置加装维护列表-燃气用户界面使用
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 用户管理-燃气用户-安全装置加装维护集合
*/
@Override
public
List
<
TGasuserSafetyDeviceInfo
>
queryNoSelectSafeDeviceInfoList
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
return
tGasuserSafetyDeviceInfoMapper
.
queryNoSelectSafeDeviceInfoList
(
tGasuserSafetyDeviceInfo
);
}
/**
* 新增用户管理-燃气用户-安全装置加装维护
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 结果
*/
@Override
public
int
insertTGasuserSafetyDeviceInfo
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
return
tGasuserSafetyDeviceInfoMapper
.
insertTGasuserSafetyDeviceInfo
(
tGasuserSafetyDeviceInfo
);
}
/**
* 修改用户管理-燃气用户-安全装置加装维护
*
* @param tGasuserSafetyDeviceInfo 用户管理-燃气用户-安全装置加装维护
* @return 结果
*/
@Override
public
int
updateTGasuserSafetyDeviceInfo
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
)
{
return
tGasuserSafetyDeviceInfoMapper
.
updateTGasuserSafetyDeviceInfo
(
tGasuserSafetyDeviceInfo
);
}
/**
* 批量删除用户管理-燃气用户-安全装置加装维护
*
* @param gasUserSafetyDeviceIds 需要删除的用户管理-燃气用户-安全装置加装维护ID
* @return 结果
*/
@Override
public
int
deleteTGasuserSafetyDeviceInfoByIds
(
Long
[]
gasUserSafetyDeviceIds
)
{
return
tGasuserSafetyDeviceInfoMapper
.
deleteTGasuserSafetyDeviceInfoByIds
(
gasUserSafetyDeviceIds
);
}
/**
* 关联安装加装装置 批量删除
* @param deviceIds ids
*/
@Override
public
void
deleteSafetyDeviceListInfo
(
Long
[]
deviceIds
)
{
tGasuserSafetyDeviceInfoMapper
.
deleteSafetyDeviceListInfo
(
deviceIds
);
}
/**
* 关联安装加装装置 单条删除
* @param deviceId deviceId
*/
@Override
public
void
deleteSafetyDeviceInfo
(
Long
deviceId
)
{
tGasuserSafetyDeviceInfoMapper
.
deleteSafetyDeviceInfo
(
deviceId
);
}
/**
* 删除用户管理-燃气用户-安全装置加装维护信息
*
* @param gasUserSafetyDeviceId 用户管理-燃气用户-安全装置加装维护ID
* @return 结果
*/
@Override
public
int
deleteTGasuserSafetyDeviceInfoById
(
Long
gasUserSafetyDeviceId
)
{
return
tGasuserSafetyDeviceInfoMapper
.
deleteTGasuserSafetyDeviceInfoById
(
gasUserSafetyDeviceId
);
}
}
zh-baseversion-system/src/main/resources/mapper/system/TGasuserSafetyDeviceInfoMapper.xml
0 → 100644
View file @
e56ada59
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TGasuserSafetyDeviceInfoMapper"
>
<resultMap
type=
"TGasuserSafetyDeviceInfo"
id=
"TGasuserSafetyDeviceInfoResult"
>
<result
property=
"gasUserSafetyDeviceId"
column=
"f_gasUser_safety_device_id"
/>
<result
property=
"relationGasuserId"
column=
"f_relation_gasUser_id"
/>
<result
property=
"relationDeviceType"
column=
"f_relation_device_type"
/>
<result
property=
"deviceName"
column=
"f_device_name"
/>
<result
property=
"deviceModel"
column=
"f_device_model"
/>
<result
property=
"fIotNo"
column=
"f_iot_no"
/>
<result
property=
"detectionMedium"
column=
"f_detection_medium"
/>
<result
property=
"deviceInstallTime"
column=
"f_device_install_time"
/>
<result
property=
"deviceInstallPosition"
column=
"f_device_install_position"
/>
<result
property=
"head"
column=
"f_head"
/>
<result
property=
"phone"
column=
"f_phone"
/>
<result
property=
"isDel"
column=
"is_del"
/>
</resultMap>
<sql
id=
"selectTGasuserSafetyDeviceInfoVo"
>
select f_gasUser_safety_device_id, f_relation_gasUser_id, f_relation_device_type, f_device_name, f_device_model, f_iot_no, f_detection_medium, f_device_install_time, f_device_install_position, f_head, f_phone, is_del from t_gasuser_safety_device_info
</sql>
<select
id=
"selectTGasuserSafetyDeviceInfoList"
parameterType=
"TGasuserSafetyDeviceInfo"
resultMap=
"TGasuserSafetyDeviceInfoResult"
>
<include
refid=
"selectTGasuserSafetyDeviceInfoVo"
/>
<where>
<if
test=
"relationGasuserId != null "
>
and f_relation_gasUser_id = #{relationGasuserId}
</if>
<if
test=
"relationDeviceType != null and relationDeviceType != ''"
>
and f_relation_device_type = #{relationDeviceType}
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and f_device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"deviceModel != null and deviceModel != ''"
>
and f_device_model = #{deviceModel}
</if>
<if
test=
"fIotNo != null and fIotNo != ''"
>
and f_iot_no = #{fIotNo}
</if>
<if
test=
"detectionMedium != null and detectionMedium != ''"
>
and f_detection_medium = #{detectionMedium}
</if>
<if
test=
"deviceInstallTime != null "
>
and f_device_install_time = #{deviceInstallTime}
</if>
<if
test=
"deviceInstallPosition != null "
>
and f_device_install_position = #{deviceInstallPosition}
</if>
<if
test=
"head != null and head != ''"
>
and f_head = #{head}
</if>
<if
test=
"phone != null and phone != ''"
>
and f_phone = #{phone}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
</select>
<select
id=
"queryNoSelectSafeDeviceInfoList"
parameterType=
"tGasuserSafetyDeviceInfo"
resultMap=
"TGasuserSafetyDeviceInfoResult"
>
<include
refid=
"selectTGasuserSafetyDeviceInfoVo"
/>
<where>
is_del='0' and f_relation_gasUser_id is null
<if
test=
"relationGasuserId != null "
>
and f_relation_gasUser_id = #{relationGasuserId}
</if>
<if
test=
"relationDeviceType != null and relationDeviceType != ''"
>
and f_relation_device_type = #{relationDeviceType}
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and f_device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"deviceModel != null and deviceModel != ''"
>
and f_device_model = #{deviceModel}
</if>
<if
test=
"fIotNo != null and fIotNo != ''"
>
and f_iot_no = #{fIotNo}
</if>
<if
test=
"detectionMedium != null and detectionMedium != ''"
>
and f_detection_medium = #{detectionMedium}
</if>
<if
test=
"deviceInstallTime != null "
>
and f_device_install_time = #{deviceInstallTime}
</if>
<if
test=
"deviceInstallPosition != null "
>
and f_device_install_position = #{deviceInstallPosition}
</if>
<if
test=
"head != null and head != ''"
>
and f_head = #{head}
</if>
<if
test=
"phone != null and phone != ''"
>
and f_phone = #{phone}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
</select>
<select
id=
"selectTGasuserSafetyDeviceInfoById"
parameterType=
"Long"
resultMap=
"TGasuserSafetyDeviceInfoResult"
>
<include
refid=
"selectTGasuserSafetyDeviceInfoVo"
/>
where f_gasUser_safety_device_id = #{gasUserSafetyDeviceId}
</select>
<insert
id=
"insertTGasuserSafetyDeviceInfo"
parameterType=
"TGasuserSafetyDeviceInfo"
useGeneratedKeys=
"true"
keyProperty=
"gasUserSafetyDeviceId"
>
insert into t_gasuser_safety_device_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"relationGasuserId != null"
>
f_relation_gasUser_id,
</if>
<if
test=
"relationDeviceType != null"
>
f_relation_device_type,
</if>
<if
test=
"deviceName != null"
>
f_device_name,
</if>
<if
test=
"deviceModel != null"
>
f_device_model,
</if>
<if
test=
"fIotNo != null"
>
f_iot_no,
</if>
<if
test=
"detectionMedium != null"
>
f_detection_medium,
</if>
<if
test=
"deviceInstallTime != null"
>
f_device_install_time,
</if>
<if
test=
"deviceInstallPosition != null"
>
f_device_install_position,
</if>
<if
test=
"head != null"
>
f_head,
</if>
<if
test=
"phone != null"
>
f_phone,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"relationGasuserId != null"
>
#{relationGasuserId},
</if>
<if
test=
"relationDeviceType != null"
>
#{relationDeviceType},
</if>
<if
test=
"deviceName != null"
>
#{deviceName},
</if>
<if
test=
"deviceModel != null"
>
#{deviceModel},
</if>
<if
test=
"fIotNo != null"
>
#{fIotNo},
</if>
<if
test=
"detectionMedium != null"
>
#{detectionMedium},
</if>
<if
test=
"deviceInstallTime != null"
>
#{deviceInstallTime},
</if>
<if
test=
"deviceInstallPosition != null"
>
#{deviceInstallPosition},
</if>
<if
test=
"head != null"
>
#{head},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
</trim>
</insert>
<update
id=
"updateTGasuserSafetyDeviceInfo"
parameterType=
"TGasuserSafetyDeviceInfo"
>
update t_gasuser_safety_device_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"relationGasuserId != null"
>
f_relation_gasUser_id = #{relationGasuserId},
</if>
<if
test=
"relationDeviceType != null"
>
f_relation_device_type = #{relationDeviceType},
</if>
<if
test=
"deviceName != null"
>
f_device_name = #{deviceName},
</if>
<if
test=
"deviceModel != null"
>
f_device_model = #{deviceModel},
</if>
<if
test=
"fIotNo != null"
>
f_iot_no = #{fIotNo},
</if>
<if
test=
"detectionMedium != null"
>
f_detection_medium = #{detectionMedium},
</if>
<if
test=
"deviceInstallTime != null"
>
f_device_install_time = #{deviceInstallTime},
</if>
<if
test=
"deviceInstallPosition != null"
>
f_device_install_position = #{deviceInstallPosition},
</if>
<if
test=
"head != null"
>
f_head = #{head},
</if>
<if
test=
"phone != null"
>
f_phone = #{phone},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
</trim>
where f_gasUser_safety_device_id = #{gasUserSafetyDeviceId}
</update>
<delete
id=
"deleteTGasuserSafetyDeviceInfoById"
parameterType=
"Long"
>
delete from t_gasuser_safety_device_info where f_gasUser_safety_device_id = #{gasUserSafetyDeviceId}
</delete>
<delete
id=
"deleteTGasuserSafetyDeviceInfoByIds"
parameterType=
"String"
>
delete from t_gasuser_safety_device_info where f_gasUser_safety_device_id in
<foreach
item=
"gasUserSafetyDeviceId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{gasUserSafetyDeviceId}
</foreach>
</delete>
<update
id=
"deleteSafetyDeviceListInfo"
>
update t_gasuser_safety_device_info set is_del='1' where f_gasUser_safety_device_id in
<foreach
item=
"deviceId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{deviceId}
</foreach>
</update>
<update
id=
"deleteSafetyDeviceInfo"
>
update t_gasuser_safety_device_info set is_del='1' where f_gasUser_safety_device_id = #{deviceId}
</update>
</mapper>
\ No newline at end of file
zh-baseversion-web/src/api/regulation/user.js
View file @
e56ada59
...
...
@@ -60,4 +60,44 @@ export function newExportUser(query) {
method
:
'get'
,
params
:
query
})
}
// 查询 安装加装装置数据
export
function
getNoSelectSafetyDetailInfo
(
data
)
{
return
request
({
url
:
'/gasUserSafetyDevice/info/queryNoSelectSafeDeviceInfoList'
,
method
:
'post'
,
data
:
data
})
}
// 查询 安装加装装置数据
export
function
addSafetyDetailInfo
(
data
)
{
return
request
({
url
:
'/gasUserSafetyDevice/info'
,
method
:
'post'
,
data
:
data
})
}
// 关联安装加装装置 批量删除
export
function
deleteSafetyDeviceListInfo
(
data
)
{
return
request
({
url
:
'/gasUserSafetyDevice/deleteSafetyDeviceListInfo'
,
method
:
'post'
,
data
:
data
})
}
// 删除关联设备信息
export
function
deleteSafetyDeviceInfo
(
deviceId
)
{
return
request
({
url
:
'/gasUserSafetyDevice/deleteSafetyDeviceInfo'
,
method
:
'delete'
,
data
:
deviceId
})
}
\ No newline at end of file
zh-baseversion-web/src/views/regulation/userManagement/gasUsers/index.vue
View file @
e56ada59
...
...
@@ -197,20 +197,6 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="经度" prop="longitude">-->
<!-- <el-input v-model="form.longitude" placeholder="请输入经度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="纬度" prop="latitude">-->
<!-- <el-input v-model="form.latitude" placeholder="请输入纬度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col
:span=
"22"
>
...
...
@@ -267,12 +253,208 @@
</el-row>
</el-form>
<div
class=
"tableTitle"
>
<img
:src=
"relationImg"
style=
"width: 24px; height: 25px;position: relative; left: -355px; top: -12px;"
/>
<span
class=
"midText"
>
安全装置加装
</span>
</div>
<el-table
v-loading=
"loadings"
ref=
"multipleTable"
:data=
"DetailInfoList"
tooltip-effect=
"dark"
style=
"width: 100%"
max-height=
"250"
@
selection-change=
"tableDataSelectionChange"
>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备型号"
align=
"center"
prop=
"deviceModel"
/>
<el-table-column
label=
"设备类型"
align=
"center"
prop=
"deviceType"
/>
<el-table-column
label=
"物联网编号"
width=
"85"
align=
"center"
prop=
"iotNo"
/>
<el-table-column
label=
"探测介质"
align=
"center"
prop=
"detMed"
/>
<el-table-column
label=
"设备安装时间"
width=
"100"
align=
"center"
prop=
"deviceInstallTime"
/>
<el-table-column
label=
"安装位置"
align=
"center"
prop=
"deviceInstallPosition"
/>
<el-table-column
label=
"负责人"
align=
"center"
prop=
"head"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"deleteDataListilInfo(scope.row,scope.$index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"selectDataListInfo"
>
选择安全装置加装
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!--添加关联设备弹出框-->
<el-dialog
title=
"添加关联设备"
:visible
.
sync=
"dialogFormVisible"
>
<el-form
ref=
"formDetailInfo"
:model=
"formDetailInfo"
:rules=
"formDetailInfoRules"
label-width=
"95px"
style=
"height: 230px"
>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"formDetailInfo.deviceName"
placeholder=
"请输入设备名称"
autocomplete=
"off"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"formDetailInfo.deviceModel"
placeholder=
"请输入设备型号"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备类型"
prop=
"relationDeviceType"
>
<el-input
v-model=
"formDetailInfo.relationDeviceType"
placeholder=
"请输入设备类型"
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"物联网编号"
prop=
"fIotNo"
>
<el-input
v-model=
"formDetailInfo.fIotNo"
placeholder=
"请输入物联网编号"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备安装时间"
prop=
"deviceInstallTime"
>
<el-input
v-model=
"formDetailInfo.deviceInstallTime"
placeholder=
"请选择安装时间"
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"安装位置"
prop=
"deviceInstallPosition"
>
<el-input
v-model=
"formDetailInfo.deviceInstallPosition"
placeholder=
"请输入安装位置"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"负责人"
prop=
"head"
>
<el-input
v-model=
"formDetailInfo.head"
placeholder=
"请输入负责人"
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"联系电话"
prop=
"phone"
>
<el-input
v-model=
"formDetailInfo.phone"
placeholder=
"请输入联系电话"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"22"
>
<el-form-item
label=
"探测介质"
prop=
"detectionMedium"
>
<el-input
v-model=
"formDetailInfo.detectionMedium"
placeholder=
"请输入探测介质"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"addSafetyDeviceInfo"
>
提 交
</el-button>
<el-button
@
click=
"dialogFormVisible=false"
>
取 消
</el-button>
</div>
</el-dialog>
<!--选择关联设备弹出框-->
<el-dialog
title=
"选择关联设备"
width=
"1100px"
:visible
.
sync=
"dialogTableVisible"
formLabelWidth=
"160px"
>
<
template
>
<el-form
:model=
"dateQueryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"dateQueryParams.deviceName"
placeholder=
"请输入设备名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"设备型号"
prop=
"deviceCode"
>
<el-input
v-model=
"dateQueryParams.deviceModel"
placeholder=
"请输入设备型号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"物联网编号"
prop=
"deviceAddr"
>
<el-input
v-model=
"dateQueryParams.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=
"handleQueryData"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQueryDate"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"dialogFormVisible = true"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"deleteListDetailInfo"
>
删除
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getDataList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loadings"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
max-height=
"250"
@
selection-change=
"tableDataSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备型号"
align=
"center"
prop=
"deviceModel"
/>
<el-table-column
label=
"设备类型"
align=
"center"
prop=
"deviceType"
/>
<el-table-column
label=
"物联网编号"
width=
"85"
align=
"center"
prop=
"iotNo"
/>
<el-table-column
label=
"探测介质"
align=
"center"
prop=
"detMed"
/>
<el-table-column
label=
"设备安装时间"
width=
"100"
align=
"center"
prop=
"deviceInstallTime"
/>
<el-table-column
label=
"安装位置"
align=
"center"
prop=
"deviceInstallPosition"
/>
<el-table-column
label=
"负责人"
align=
"center"
prop=
"head"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"deleteDetailInfo(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"insertListDetailInfo"
>
提 交
</el-button>
<el-button
@
click=
"dialogTableVisible=false"
>
取 消
</el-button>
</div>
</template>
</el-dialog>
<GetPos
:dialogVisible
.
sync=
"dialogTableVisibles"
device=
""
...
...
@@ -284,9 +466,9 @@
</template>
<
script
>
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
newExportUser
}
from
"@/api/regulation/user"
;
import
{
selectTEnterprise
}
from
"@/api/regulation/supervise"
;
import
{
noPageListVillage
}
from
"@/api/regulation/userManagement/village"
;
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
newExportUser
,
getNoSelectSafetyDetailInfo
,
addSafetyDetailInfo
,
deleteSafetyDeviceInfo
,
deleteSafetyDeviceListInfo
}
from
"@/api/regulation/user"
;
import
{
selectTEnterprise
}
from
"@/api/regulation/supervise"
;
import
{
noPageListVillage
}
from
"@/api/regulation/userManagement/village"
;
import
GetPos
from
'@/components/GetPos'
;
export
default
{
name
:
"User"
,
...
...
@@ -295,8 +477,28 @@ export default {
},
data
()
{
return
{
relationImg
:
require
(
'@/assets/project/relation.png'
),
//下拉框数据
test
:{},
dialogTableVisible
:
false
,
//存储已被选中的下级数据id
DetailInfoListId
:[],
//存储已经选中的下级关联数据
DetailInfoList
:[],
/*添加关联设备*/
formDetailInfo
:{
gasUserSafetyDeviceId
:
''
,
relationDeviceType
:
''
,
deviceName
:
''
,
deviceModel
:
''
,
fIotNo
:
''
,
detectionMedium
:
''
,
deviceInstallTime
:
''
,
deviceInstallPosition
:
''
,
head
:
''
,
phone
:
''
},
dialogFormVisible
:
false
,
/**--------------地图使用数据---------------*/
dialogTableVisibles
:
false
,
devicePos
:
[],
...
...
@@ -335,7 +537,21 @@ export default {
nickName
:
null
,
},
// 表单参数
form
:
{},
form
:
{
userId
:
null
,
username
:
null
,
nickName
:
null
,
userType
:
null
,
gasType
:
null
,
address
:
null
,
longitude
:
null
,
latitude
:
null
,
linkman
:
null
,
phone
:
null
,
email
:
null
,
isDel
:
null
,
remarks
:
null
},
// 表单校验
rules
:
{
/*username: [
...
...
@@ -353,7 +569,30 @@ export default {
{
required
:
true
,
message
:
"请输入地址"
,
trigger
:
"blur"
},
// { min: 0, max: 30, message: "长度30位", trigger: "blur" },
],
}
villageId
:
[
{
required
:
true
,
message
:
"请选择居住区(村、庄)"
,
trigger
:
"blur"
},
// { min: 0, max: 30, message: "长度30位", trigger: "blur" },
],
},
//关联设备下级数据 表单校验
formDetailInfoRules
:{
deviceName
:[
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
},
{
min
:
0
,
max
:
20
,
message
:
"长度20位"
,
trigger
:
"blur"
},
],
deviceModel
:[
{
required
:
true
,
message
:
"请输入设备型号"
,
trigger
:
"blur"
},
{
min
:
0
,
max
:
20
,
message
:
"长度20位"
,
trigger
:
"blur"
},
],
relationDeviceType
:[
{
required
:
true
,
message
:
"请选择设备类型"
,
trigger
:
"blur"
},
],
fIotNo
:[
{
required
:
true
,
message
:
"请输入联网编号"
,
trigger
:
"blur"
},
{
min
:
0
,
max
:
20
,
message
:
"长度20位"
,
trigger
:
"blur"
},
],
},
};
},
created
()
{
...
...
@@ -367,6 +606,127 @@ export default {
this
.
getNoPageListVillage
();
},
methods
:
{
/**关联设备单条删除方法*/
deleteSafetyDeviceInfo
(
row
){
const
deviceIds
=
row
.
gasUserSafetyDeviceId
;
this
.
$confirm
(
'是否确认删除设备信息编号为"'
+
deviceIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
deleteSafetyDeviceInfo
(
deviceIds
);
}).
then
(()
=>
{
// this.tableData.splice(index,1);
this
.
getDataList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/**
* 批量删除关联设备方法
* @param row
*/
deleteListDetailInfo
(
row
){
const
deviceIds
=
this
.
ids
;
this
.
$confirm
(
'是否确认删除安全装置加装为"'
+
deviceIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
deleteSafetyDeviceListInfo
(
deviceIds
);
}).
then
(()
=>
{
this
.
getDataList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/**添加关联设备与设备绑定的数据 (存储到数组中)*/
insertListDetailInfo
(
row
){
//获取已经选中的下级设备id
const
deviceIds
=
this
.
ids
;
const
li
=
this
.
datalist
;
if
(
this
.
form
.
userId
!=
null
)
{
//修改
this
.
DetailInfoList
=
this
.
DetailInfoList
.
concat
(
this
.
datalist
)
//添加到数组中 以便下次使用
this
.
DetailInfoListId
.
push
(
deviceIds
);
// alert(this.DetailInfoListId)
this
.
dialogTableVisible
=
false
this
.
msgSuccess
(
"添加成功"
);
}
else
{
//添加
// this.DetailInfoList.push(this.datalist)
//清空数组数据 将之前的数据清空
this
.
DetailInfoListId
.
splice
(
row
);
this
.
DetailInfoList
=
this
.
datalist
;
//添加到数组中 以便下次使用
this
.
DetailInfoListId
.
push
(
deviceIds
);
// alert(this.DetailInfoListId)
this
.
dialogTableVisible
=
false
this
.
msgSuccess
(
"添加成功"
);
}
},
/**关联设备添加方法*/
addSafetyDeviceInfo
(){
this
.
$refs
[
"formDetailInfoRules"
].
validate
(
valid
=>
{
if
(
valid
)
{
addSafetyDetailInfo
(
this
.
formDetailInfo
).
then
(
response
=>
{
// this.tableData.push(this.formDetailInfo)
//关闭弹出层
this
.
dialogFormVisible
=
false
;
//数据表单重置
this
.
formDetailInfo
=
{
relationDeviceType
:
null
,
deviceName
:
null
,
deviceModel
:
null
,
fIotNo
:
null
,
detectionMedium
:
null
,
deviceInstallTime
:
null
,
deviceInstallPosition
:
null
,
head
:
null
,
phone
:
null
};
this
.
getDataList
();
this
.
msgSuccess
(
"新增成功"
);
});
}
});
},
/** 下级数据搜索*/
handleQueryData
(){
this
.
getDataList
();
},
/**查询下级数据列表方法*/
getDataList
(){
this
.
loadings
=
true
;
// console.log(this.dateQueryParams)
//查询下级设备数据
getNoSelectSafetyDetailInfo
(
this
.
dateQueryParams
).
then
(
response
=>
{
//下级设备数据 到时候换成下级数据
this
.
tableData
=
response
.
rows
;
this
.
detailTotal
=
response
.
total
;
this
.
loadings
=
false
;
});
},
/**
* 选择关联设备查询方法
*/
selectDataListInfo
(){
//查询下级设备数据
getDdeviceDetailInfo
(
this
.
dateQueryParams
).
then
(
response
=>
{
//下级设备数据 到时候换成下级数据
this
.
tableData
=
response
.
rows
;
this
.
detailTotal
=
response
.
total
;
this
.
loadings
=
false
;
//打开选择关联设备弹出框
this
.
dialogTableVisible
=
true
});
},
//获取居住区集合
getNoPageListVillage
(){
noPageListVillage
(
this
.
queryForm
).
then
(
response
=>
{
...
...
@@ -521,3 +881,24 @@ export default {
}
};
</
script
>
<
style
>
.tableTitle
{
position
:
relative
;
margin
:
24px
auto
;
width
:
600px
;
height
:
2px
;
background-color
:
#d4d4d4
;
text-align
:
center
;
font-size
:
16px
;
color
:
rgba
(
101
,
101
,
101
,
1
);
}
.midText
{
position
:
absolute
;
left
:
3%
;
background-color
:
#ffffff
;
padding
:
0
15px
;
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
}
</
style
>
\ No newline at end of file
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