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
e5cab16a
Commit
e5cab16a
authored
May 21, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽查隐患
parent
d415cbe2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1369 additions
and
7 deletions
+1369
-7
TInsSpotHazardRefController.java
...b/controller/supervision/TInsSpotHazardRefController.java
+103
-0
TInsSpotHazardRef.java
...main/java/com/zehong/system/domain/TInsSpotHazardRef.java
+243
-0
TInsSpotHazardRefMapper.java
...ava/com/zehong/system/mapper/TInsSpotHazardRefMapper.java
+61
-0
ITInsSpotHazardRefService.java
.../com/zehong/system/service/ITInsSpotHazardRefService.java
+61
-0
TInsSpotHazardRefServiceImpl.java
...ong/system/service/impl/TInsSpotHazardRefServiceImpl.java
+124
-0
TInsSpotHazardRefMapper.xml
.../main/resources/mapper/system/TInsSpotHazardRefMapper.xml
+106
-0
spot.js
zh-baseversion-web/src/api/supervision/spot.js
+53
-0
index.vue
...version-web/src/views/supervision/rectification/index.vue
+7
-7
DetailInfo.vue
...-web/src/views/supervision/spot/components/DetailInfo.vue
+134
-0
index.vue
zh-baseversion-web/src/views/supervision/spot/index.vue
+477
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervision/TInsSpotHazardRefController.java
0 → 100644
View file @
e5cab16a
package
com
.
zehong
.
web
.
controller
.
supervision
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
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.TInsSpotHazardRef
;
import
com.zehong.system.service.ITInsSpotHazardRefService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 监督检查-抽查隐患Controller
*
* @author zehong
* @date 2024-05-21
*/
@RestController
@RequestMapping
(
"/supervision/spot"
)
public
class
TInsSpotHazardRefController
extends
BaseController
{
@Autowired
private
ITInsSpotHazardRefService
tInsSpotHazardRefService
;
/**
* 查询监督检查-抽查隐患列表
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:spot:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TInsSpotHazardRef
tInsSpotHazardRef
)
{
startPage
();
List
<
TInsSpotHazardRef
>
list
=
tInsSpotHazardRefService
.
selectTInsSpotHazardRefList
(
tInsSpotHazardRef
);
return
getDataTable
(
list
);
}
/**
* 导出监督检查-抽查隐患列表
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:spot:export')"
)
@Log
(
title
=
"监督检查-抽查隐患"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TInsSpotHazardRef
tInsSpotHazardRef
)
{
List
<
TInsSpotHazardRef
>
list
=
tInsSpotHazardRefService
.
selectTInsSpotHazardRefList
(
tInsSpotHazardRef
);
ExcelUtil
<
TInsSpotHazardRef
>
util
=
new
ExcelUtil
<
TInsSpotHazardRef
>(
TInsSpotHazardRef
.
class
);
return
util
.
exportExcel
(
list
,
"监督检查-抽查隐患数据"
);
}
/**
* 获取监督检查-抽查隐患详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:spot:query')"
)
@GetMapping
(
value
=
"/{fInsSpotHazardRefId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"fInsSpotHazardRefId"
)
Long
fInsSpotHazardRefId
)
{
return
AjaxResult
.
success
(
tInsSpotHazardRefService
.
selectTInsSpotHazardRefById
(
fInsSpotHazardRefId
));
}
/**
* 新增监督检查-抽查隐患
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:spot:add')"
)
@Log
(
title
=
"监督检查-抽查隐患"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TInsSpotHazardRef
tInsSpotHazardRef
)
{
return
toAjax
(
tInsSpotHazardRefService
.
insertTInsSpotHazardRef
(
tInsSpotHazardRef
));
}
/**
* 修改监督检查-抽查隐患
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:spot:edit')"
)
@Log
(
title
=
"监督检查-抽查隐患"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TInsSpotHazardRef
tInsSpotHazardRef
)
{
return
toAjax
(
tInsSpotHazardRefService
.
updateTInsSpotHazardRef
(
tInsSpotHazardRef
));
}
/**
* 删除监督检查-抽查隐患
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:spot:remove')"
)
@Log
(
title
=
"监督检查-抽查隐患"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{fInsSpotHazardRefIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
fInsSpotHazardRefIds
)
{
return
toAjax
(
tInsSpotHazardRefService
.
deleteTInsSpotHazardRefByIds
(
fInsSpotHazardRefIds
));
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/TInsSpotHazardRef.java
0 → 100644
View file @
e5cab16a
package
com
.
zehong
.
system
.
domain
;
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_ins_spot_hazard_ref
*
* @author zehong
* @date 2024-05-21
*/
public
class
TInsSpotHazardRef
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id */
private
Long
fInsSpotHazardRefId
;
/** 隐患唯一编码 */
@Excel
(
name
=
"隐患唯一编码"
)
private
String
fHazardUniqueCode
;
/** 隐患在市级平台系统中的自有编号 */
@Excel
(
name
=
"隐患在市级平台系统中的自有编号"
)
private
String
fHazardOutUniqueCode
;
/** 设计供气企业编码 */
@Excel
(
name
=
"设计供气企业编码"
)
private
String
fInvolveEnterpriseCode
;
/** 检查对象分类,按分类代码表23 分类填写
23-0100 :气代煤
23-0200-0201:传统电代煤
23-0200-0202:石墨烯
23-0200-0203:聚能
23-0200-0204:空气源热泵
23-0200-0205:地源热泵
23-9900-0301:集中供热
23-9900-0302:光伏+
23-9900-0303:光热+
23-9900-0304:醇基燃料
23-9900-0305:生物质 */
@Excel
(
name
=
"检查对象分类"
,
dictType
=
"t_type_code"
)
private
String
fObjType
;
/** 对象编码 */
@Excel
(
name
=
"对象编码"
)
private
String
fObjCode
;
/** 对象所在行政区,县级行政区ID */
@Excel
(
name
=
"对象所在行政区,县级行政区ID"
)
private
String
fObjBelongRegionId
;
/** 监督检查时间 yyyy-MM-dd hh:mm:ss */
@Excel
(
name
=
"监督检查时间"
)
private
String
fCheckTime
;
/** 隐患分类分级编码 */
@Excel
(
name
=
"隐患分类分级编码"
)
private
String
fHazardTypeLevelId
;
/** 隐患分类分级标准中的内容不足以表述隐患,或隐患
分类分级编码对应了“其他”类隐患的,应该用补充说
明把隐患描述完整 */
@Excel
(
name
=
"隐患描述"
)
private
String
fHazardDesc
;
/** 隐患整改前照片 */
@Excel
(
name
=
"隐患整改前照片"
)
private
String
fBeforePicture
;
/** 是否执行:1 是 0 否 */
@Excel
(
name
=
"是否执行:1 是 0 否"
,
readConverterExp
=
"1=是,0=否"
)
private
String
fIsEnforcement
;
/** 备注 */
private
String
fRemark
;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
private
String
fLastTime
;
public
void
setfInsSpotHazardRefId
(
Long
fInsSpotHazardRefId
)
{
this
.
fInsSpotHazardRefId
=
fInsSpotHazardRefId
;
}
public
Long
getfInsSpotHazardRefId
()
{
return
fInsSpotHazardRefId
;
}
public
void
setfHazardUniqueCode
(
String
fHazardUniqueCode
)
{
this
.
fHazardUniqueCode
=
fHazardUniqueCode
;
}
public
String
getfHazardUniqueCode
()
{
return
fHazardUniqueCode
;
}
public
void
setfHazardOutUniqueCode
(
String
fHazardOutUniqueCode
)
{
this
.
fHazardOutUniqueCode
=
fHazardOutUniqueCode
;
}
public
String
getfHazardOutUniqueCode
()
{
return
fHazardOutUniqueCode
;
}
public
void
setfInvolveEnterpriseCode
(
String
fInvolveEnterpriseCode
)
{
this
.
fInvolveEnterpriseCode
=
fInvolveEnterpriseCode
;
}
public
String
getfInvolveEnterpriseCode
()
{
return
fInvolveEnterpriseCode
;
}
public
void
setfObjType
(
String
fObjType
)
{
this
.
fObjType
=
fObjType
;
}
public
String
getfObjType
()
{
return
fObjType
;
}
public
void
setfObjCode
(
String
fObjCode
)
{
this
.
fObjCode
=
fObjCode
;
}
public
String
getfObjCode
()
{
return
fObjCode
;
}
public
void
setfObjBelongRegionId
(
String
fObjBelongRegionId
)
{
this
.
fObjBelongRegionId
=
fObjBelongRegionId
;
}
public
String
getfObjBelongRegionId
()
{
return
fObjBelongRegionId
;
}
public
void
setfCheckTime
(
String
fCheckTime
)
{
this
.
fCheckTime
=
fCheckTime
;
}
public
String
getfCheckTime
()
{
return
fCheckTime
;
}
public
void
setfHazardTypeLevelId
(
String
fHazardTypeLevelId
)
{
this
.
fHazardTypeLevelId
=
fHazardTypeLevelId
;
}
public
String
getfHazardTypeLevelId
()
{
return
fHazardTypeLevelId
;
}
public
void
setfHazardDesc
(
String
fHazardDesc
)
{
this
.
fHazardDesc
=
fHazardDesc
;
}
public
String
getfHazardDesc
()
{
return
fHazardDesc
;
}
public
void
setfBeforePicture
(
String
fBeforePicture
)
{
this
.
fBeforePicture
=
fBeforePicture
;
}
public
String
getfBeforePicture
()
{
return
fBeforePicture
;
}
public
void
setfIsEnforcement
(
String
fIsEnforcement
)
{
this
.
fIsEnforcement
=
fIsEnforcement
;
}
public
String
getfIsEnforcement
()
{
return
fIsEnforcement
;
}
public
void
setfRemark
(
String
fRemark
)
{
this
.
fRemark
=
fRemark
;
}
public
String
getfRemark
()
{
return
fRemark
;
}
public
void
setfLastTime
(
String
fLastTime
)
{
this
.
fLastTime
=
fLastTime
;
}
public
String
getfLastTime
()
{
return
fLastTime
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"fInsSpotHazardRefId"
,
getfInsSpotHazardRefId
())
.
append
(
"fHazardUniqueCode"
,
getfHazardUniqueCode
())
.
append
(
"fHazardOutUniqueCode"
,
getfHazardOutUniqueCode
())
.
append
(
"fInvolveEnterpriseCode"
,
getfInvolveEnterpriseCode
())
.
append
(
"fObjType"
,
getfObjType
())
.
append
(
"fObjCode"
,
getfObjCode
())
.
append
(
"fObjBelongRegionId"
,
getfObjBelongRegionId
())
.
append
(
"fCheckTime"
,
getfCheckTime
())
.
append
(
"fHazardTypeLevelId"
,
getfHazardTypeLevelId
())
.
append
(
"fHazardDesc"
,
getfHazardDesc
())
.
append
(
"fBeforePicture"
,
getfBeforePicture
())
.
append
(
"fIsEnforcement"
,
getfIsEnforcement
())
.
append
(
"fRemark"
,
getfRemark
())
.
append
(
"fLastTime"
,
getfLastTime
())
.
toString
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TInsSpotHazardRefMapper.java
0 → 100644
View file @
e5cab16a
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TInsSpotHazardRef
;
/**
* 监督检查-抽查隐患Mapper接口
*
* @author zehong
* @date 2024-05-21
*/
public
interface
TInsSpotHazardRefMapper
{
/**
* 查询监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 监督检查-抽查隐患
*/
public
TInsSpotHazardRef
selectTInsSpotHazardRefById
(
Long
fInsSpotHazardRefId
);
/**
* 查询监督检查-抽查隐患列表
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 监督检查-抽查隐患集合
*/
public
List
<
TInsSpotHazardRef
>
selectTInsSpotHazardRefList
(
TInsSpotHazardRef
tInsSpotHazardRef
);
/**
* 新增监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public
int
insertTInsSpotHazardRef
(
TInsSpotHazardRef
tInsSpotHazardRef
);
/**
* 修改监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public
int
updateTInsSpotHazardRef
(
TInsSpotHazardRef
tInsSpotHazardRef
);
/**
* 删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 结果
*/
public
int
deleteTInsSpotHazardRefById
(
Long
fInsSpotHazardRefId
);
/**
* 批量删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTInsSpotHazardRefByIds
(
Long
[]
fInsSpotHazardRefIds
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITInsSpotHazardRefService.java
0 → 100644
View file @
e5cab16a
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TInsSpotHazardRef
;
/**
* 监督检查-抽查隐患Service接口
*
* @author zehong
* @date 2024-05-21
*/
public
interface
ITInsSpotHazardRefService
{
/**
* 查询监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 监督检查-抽查隐患
*/
public
TInsSpotHazardRef
selectTInsSpotHazardRefById
(
Long
fInsSpotHazardRefId
);
/**
* 查询监督检查-抽查隐患列表
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 监督检查-抽查隐患集合
*/
public
List
<
TInsSpotHazardRef
>
selectTInsSpotHazardRefList
(
TInsSpotHazardRef
tInsSpotHazardRef
);
/**
* 新增监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public
int
insertTInsSpotHazardRef
(
TInsSpotHazardRef
tInsSpotHazardRef
);
/**
* 修改监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
public
int
updateTInsSpotHazardRef
(
TInsSpotHazardRef
tInsSpotHazardRef
);
/**
* 批量删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefIds 需要删除的监督检查-抽查隐患ID
* @return 结果
*/
public
int
deleteTInsSpotHazardRefByIds
(
Long
[]
fInsSpotHazardRefIds
);
/**
* 删除监督检查-抽查隐患信息
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 结果
*/
public
int
deleteTInsSpotHazardRefById
(
Long
fInsSpotHazardRefId
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TInsSpotHazardRefServiceImpl.java
0 → 100644
View file @
e5cab16a
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.sql.SQLIntegrityConstraintViolationException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
com.zehong.common.exception.CustomException
;
import
com.zehong.common.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TInsSpotHazardRefMapper
;
import
com.zehong.system.domain.TInsSpotHazardRef
;
import
com.zehong.system.service.ITInsSpotHazardRefService
;
/**
* 监督检查-抽查隐患Service业务层处理
*
* @author zehong
* @date 2024-05-21
*/
@Service
public
class
TInsSpotHazardRefServiceImpl
implements
ITInsSpotHazardRefService
{
@Autowired
private
TInsSpotHazardRefMapper
tInsSpotHazardRefMapper
;
/**
* 查询监督检查-抽查隐患
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 监督检查-抽查隐患
*/
@Override
public
TInsSpotHazardRef
selectTInsSpotHazardRefById
(
Long
fInsSpotHazardRefId
)
{
return
tInsSpotHazardRefMapper
.
selectTInsSpotHazardRefById
(
fInsSpotHazardRefId
);
}
/**
* 查询监督检查-抽查隐患列表
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 监督检查-抽查隐患
*/
@Override
public
List
<
TInsSpotHazardRef
>
selectTInsSpotHazardRefList
(
TInsSpotHazardRef
tInsSpotHazardRef
)
{
return
tInsSpotHazardRefMapper
.
selectTInsSpotHazardRefList
(
tInsSpotHazardRef
);
}
/**
* 新增监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
@Override
public
int
insertTInsSpotHazardRef
(
TInsSpotHazardRef
tInsSpotHazardRef
)
{
try
{
tInsSpotHazardRef
.
setfLastTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
return
tInsSpotHazardRefMapper
.
insertTInsSpotHazardRef
(
tInsSpotHazardRef
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_hazard_unique_code"
)){
throw
new
CustomException
(
"隐患唯一编码不唯一"
);
}
}
return
0
;
}
}
/**
* 修改监督检查-抽查隐患
*
* @param tInsSpotHazardRef 监督检查-抽查隐患
* @return 结果
*/
@Override
public
int
updateTInsSpotHazardRef
(
TInsSpotHazardRef
tInsSpotHazardRef
)
{
try
{
tInsSpotHazardRef
.
setfLastTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
return
tInsSpotHazardRefMapper
.
updateTInsSpotHazardRef
(
tInsSpotHazardRef
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_hazard_unique_code"
)){
throw
new
CustomException
(
"隐患唯一编码不唯一"
);
}
}
return
0
;
}
}
/**
* 批量删除监督检查-抽查隐患
*
* @param fInsSpotHazardRefIds 需要删除的监督检查-抽查隐患ID
* @return 结果
*/
@Override
public
int
deleteTInsSpotHazardRefByIds
(
Long
[]
fInsSpotHazardRefIds
)
{
return
tInsSpotHazardRefMapper
.
deleteTInsSpotHazardRefByIds
(
fInsSpotHazardRefIds
);
}
/**
* 删除监督检查-抽查隐患信息
*
* @param fInsSpotHazardRefId 监督检查-抽查隐患ID
* @return 结果
*/
@Override
public
int
deleteTInsSpotHazardRefById
(
Long
fInsSpotHazardRefId
)
{
return
tInsSpotHazardRefMapper
.
deleteTInsSpotHazardRefById
(
fInsSpotHazardRefId
);
}
}
zh-baseversion-system/src/main/resources/mapper/system/TInsSpotHazardRefMapper.xml
0 → 100644
View file @
e5cab16a
<?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.TInsSpotHazardRefMapper"
>
<resultMap
type=
"TInsSpotHazardRef"
id=
"TInsSpotHazardRefResult"
>
<result
property=
"fInsSpotHazardRefId"
column=
"f_ins_spot_hazard_ref_id"
/>
<result
property=
"fHazardUniqueCode"
column=
"f_hazard_unique_code"
/>
<result
property=
"fHazardOutUniqueCode"
column=
"f_hazard_out_unique_code"
/>
<result
property=
"fInvolveEnterpriseCode"
column=
"f_involve_enterprise_code"
/>
<result
property=
"fObjType"
column=
"f_obj_type"
/>
<result
property=
"fObjCode"
column=
"f_obj_code"
/>
<result
property=
"fObjBelongRegionId"
column=
"f_obj_belong_region_id"
/>
<result
property=
"fCheckTime"
column=
"f_check_time"
/>
<result
property=
"fHazardTypeLevelId"
column=
"f_hazard_type_level_id"
/>
<result
property=
"fHazardDesc"
column=
"f_hazard_desc"
/>
<result
property=
"fBeforePicture"
column=
"f_before_picture"
/>
<result
property=
"fIsEnforcement"
column=
"f_is_enforcement"
/>
<result
property=
"fRemark"
column=
"f_remark"
/>
<result
property=
"fLastTime"
column=
"f_last_time"
/>
</resultMap>
<sql
id=
"selectTInsSpotHazardRefVo"
>
select f_ins_spot_hazard_ref_id, f_hazard_unique_code, f_hazard_out_unique_code, f_involve_enterprise_code, f_obj_type, f_obj_code, f_obj_belong_region_id, f_check_time, f_hazard_type_level_id, f_hazard_desc, f_before_picture, f_is_enforcement, f_remark, f_last_time from t_ins_spot_hazard_ref
</sql>
<select
id=
"selectTInsSpotHazardRefList"
parameterType=
"TInsSpotHazardRef"
resultMap=
"TInsSpotHazardRefResult"
>
<include
refid=
"selectTInsSpotHazardRefVo"
/>
<where>
<if
test=
"fHazardUniqueCode != null and fHazardUniqueCode != ''"
>
and f_hazard_unique_code like concat('%', #{fHazardUniqueCode}, '%')
</if>
<if
test=
"fObjType != null and fObjType != ''"
>
and f_obj_type = #{fObjType}
</if>
<if
test=
"fIsEnforcement != null and fIsEnforcement != ''"
>
and f_is_enforcement = #{fIsEnforcement}
</if>
</where>
</select>
<select
id=
"selectTInsSpotHazardRefById"
parameterType=
"Long"
resultMap=
"TInsSpotHazardRefResult"
>
<include
refid=
"selectTInsSpotHazardRefVo"
/>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</select>
<insert
id=
"insertTInsSpotHazardRef"
parameterType=
"TInsSpotHazardRef"
useGeneratedKeys=
"true"
keyProperty=
"fInsSpotHazardRefId"
>
insert into t_ins_spot_hazard_ref
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fHazardUniqueCode != null"
>
f_hazard_unique_code,
</if>
<if
test=
"fHazardOutUniqueCode != null"
>
f_hazard_out_unique_code,
</if>
<if
test=
"fInvolveEnterpriseCode != null"
>
f_involve_enterprise_code,
</if>
<if
test=
"fObjType != null"
>
f_obj_type,
</if>
<if
test=
"fObjCode != null"
>
f_obj_code,
</if>
<if
test=
"fObjBelongRegionId != null"
>
f_obj_belong_region_id,
</if>
<if
test=
"fCheckTime != null"
>
f_check_time,
</if>
<if
test=
"fHazardTypeLevelId != null"
>
f_hazard_type_level_id,
</if>
<if
test=
"fHazardDesc != null"
>
f_hazard_desc,
</if>
<if
test=
"fBeforePicture != null"
>
f_before_picture,
</if>
<if
test=
"fIsEnforcement != null"
>
f_is_enforcement,
</if>
<if
test=
"fRemark != null"
>
f_remark,
</if>
<if
test=
"fLastTime != null"
>
f_last_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fHazardUniqueCode != null"
>
#{fHazardUniqueCode},
</if>
<if
test=
"fHazardOutUniqueCode != null"
>
#{fHazardOutUniqueCode},
</if>
<if
test=
"fInvolveEnterpriseCode != null"
>
#{fInvolveEnterpriseCode},
</if>
<if
test=
"fObjType != null"
>
#{fObjType},
</if>
<if
test=
"fObjCode != null"
>
#{fObjCode},
</if>
<if
test=
"fObjBelongRegionId != null"
>
#{fObjBelongRegionId},
</if>
<if
test=
"fCheckTime != null"
>
#{fCheckTime},
</if>
<if
test=
"fHazardTypeLevelId != null"
>
#{fHazardTypeLevelId},
</if>
<if
test=
"fHazardDesc != null"
>
#{fHazardDesc},
</if>
<if
test=
"fBeforePicture != null"
>
#{fBeforePicture},
</if>
<if
test=
"fIsEnforcement != null"
>
#{fIsEnforcement},
</if>
<if
test=
"fRemark != null"
>
#{fRemark},
</if>
<if
test=
"fLastTime != null"
>
#{fLastTime},
</if>
</trim>
</insert>
<update
id=
"updateTInsSpotHazardRef"
parameterType=
"TInsSpotHazardRef"
>
update t_ins_spot_hazard_ref
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fHazardUniqueCode != null"
>
f_hazard_unique_code = #{fHazardUniqueCode},
</if>
<if
test=
"fHazardOutUniqueCode != null"
>
f_hazard_out_unique_code = #{fHazardOutUniqueCode},
</if>
<if
test=
"fInvolveEnterpriseCode != null"
>
f_involve_enterprise_code = #{fInvolveEnterpriseCode},
</if>
<if
test=
"fObjType != null"
>
f_obj_type = #{fObjType},
</if>
<if
test=
"fObjCode != null"
>
f_obj_code = #{fObjCode},
</if>
<if
test=
"fObjBelongRegionId != null"
>
f_obj_belong_region_id = #{fObjBelongRegionId},
</if>
<if
test=
"fCheckTime != null"
>
f_check_time = #{fCheckTime},
</if>
<if
test=
"fHazardTypeLevelId != null"
>
f_hazard_type_level_id = #{fHazardTypeLevelId},
</if>
<if
test=
"fHazardDesc != null"
>
f_hazard_desc = #{fHazardDesc},
</if>
<if
test=
"fBeforePicture != null"
>
f_before_picture = #{fBeforePicture},
</if>
<if
test=
"fIsEnforcement != null"
>
f_is_enforcement = #{fIsEnforcement},
</if>
<if
test=
"fRemark != null"
>
f_remark = #{fRemark},
</if>
<if
test=
"fLastTime != null"
>
f_last_time = #{fLastTime},
</if>
</trim>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</update>
<delete
id=
"deleteTInsSpotHazardRefById"
parameterType=
"Long"
>
delete from t_ins_spot_hazard_ref where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</delete>
<delete
id=
"deleteTInsSpotHazardRefByIds"
parameterType=
"String"
>
delete from t_ins_spot_hazard_ref where f_ins_spot_hazard_ref_id in
<foreach
item=
"fInsSpotHazardRefId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{fInsSpotHazardRefId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
zh-baseversion-web/src/api/supervision/spot.js
0 → 100644
View file @
e5cab16a
import
request
from
'@/utils/request'
// 查询监督检查-抽查隐患列表
export
function
listRef
(
query
)
{
return
request
({
url
:
'/supervision/spot/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询监督检查-抽查隐患详细
export
function
getRef
(
fInsSpotHazardRefId
)
{
return
request
({
url
:
'/supervision/spot/'
+
fInsSpotHazardRefId
,
method
:
'get'
})
}
// 新增监督检查-抽查隐患
export
function
addRef
(
data
)
{
return
request
({
url
:
'/supervision/spot'
,
method
:
'post'
,
data
:
data
})
}
// 修改监督检查-抽查隐患
export
function
updateRef
(
data
)
{
return
request
({
url
:
'/supervision/spot'
,
method
:
'put'
,
data
:
data
})
}
// 删除监督检查-抽查隐患
export
function
delRef
(
fInsSpotHazardRefId
)
{
return
request
({
url
:
'/supervision/spot/'
+
fInsSpotHazardRefId
,
method
:
'delete'
})
}
// 导出监督检查-抽查隐患
export
function
exportRef
(
query
)
{
return
request
({
url
:
'/supervision/spot/export'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/views/supervision/rectification/index.vue
View file @
e5cab16a
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
<span
v-else
>
-
</span>
<span
v-else
>
-
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"整改完成日期"
align=
"center"
prop=
"fCompletionDate"
>
<el-table-column
label=
"整改完成日期"
align=
"center"
prop=
"fCompletionDate"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fCompletionDate"
>
{{
scope
.
row
.
fCompletionDate
}}
</span>
<span
v-if=
"scope.row.fCompletionDate"
>
{{
scope
.
row
.
fCompletionDate
}}
</span>
<span
v-else
>
-
</span>
<span
v-else
>
-
</span>
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
<span
v-else
>
-
</span>
<span
v-else
>
-
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"执法日期"
align=
"center"
prop=
"fPenaltyDate"
>
<el-table-column
label=
"执法日期"
align=
"center"
prop=
"fPenaltyDate"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fPenaltyDate"
>
{{
scope
.
row
.
fPenaltyDate
}}
</span>
<span
v-if=
"scope.row.fPenaltyDate"
>
{{
scope
.
row
.
fPenaltyDate
}}
</span>
<span
v-else
>
-
</span>
<span
v-else
>
-
</span>
...
@@ -265,8 +265,8 @@
...
@@ -265,8 +265,8 @@
<el-date-picker
<el-date-picker
style=
"width: 100%"
style=
"width: 100%"
v-model=
"form.fCheckTime"
v-model=
"form.fCheckTime"
type=
"date"
type=
"date
time
"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
placeholder=
"选择监督检查时间"
>
placeholder=
"选择监督检查时间"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
...
@@ -306,8 +306,8 @@
...
@@ -306,8 +306,8 @@
<el-date-picker
<el-date-picker
style=
"width: 100%"
style=
"width: 100%"
v-model=
"form.fCompletionDate"
v-model=
"form.fCompletionDate"
type=
"date"
type=
"date
time
"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
placeholder=
"选择整改完成日期"
>
placeholder=
"选择整改完成日期"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
...
@@ -465,7 +465,7 @@ export default {
...
@@ -465,7 +465,7 @@ export default {
{
required
:
true
,
message
:
"请选择检查记录编码"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"请选择检查记录编码"
,
trigger
:
"change"
}
],
],
fObjType
:
[
fObjType
:
[
{
required
:
true
,
message
:
"
检查对象分类不能为空
"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"
请选择检查对象分类
"
,
trigger
:
"change"
}
],
],
fObjCode
:
[
fObjCode
:
[
{
required
:
true
,
message
:
"对象编码不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"对象编码不能为空"
,
trigger
:
"blur"
}
...
...
zh-baseversion-web/src/views/supervision/spot/components/DetailInfo.vue
0 → 100644
View file @
e5cab16a
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"1000px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
label-width=
"140px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患唯一编码"
>
<span
v-if=
"detailInfo.fHazardUniqueCode"
>
{{
detailInfo
.
fHazardUniqueCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患自有编号"
>
<span
v-if=
"detailInfo.fHazardOutUniqueCode"
>
{{
detailInfo
.
fHazardOutUniqueCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设计供气企业编码"
>
<span
v-if=
"detailInfo.fInvolveEnterpriseCode"
>
{{
detailInfo
.
fInvolveEnterpriseCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查对象分类"
>
<span
v-if=
"detailInfo.fObjType"
>
{{
$parent
.
fObjTypeFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"对象编码"
>
<span
v-if=
"detailInfo.fObjCode"
>
{{
detailInfo
.
fObjCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"行政区县级行政区ID"
>
<span
v-if=
"detailInfo.fObjBelongRegionId"
>
{{
detailInfo
.
fObjBelongRegionId
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"监督检查时间"
>
<span
v-if=
"detailInfo.fCheckTime"
>
{{
detailInfo
.
fCheckTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患分类分级编码"
>
<span
v-if=
"detailInfo.fHazardTypeLevelId"
>
{{
detailInfo
.
fHazardTypeLevelId
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患描述"
>
<span
v-if=
"detailInfo.fHazardDesc"
>
{{
detailInfo
.
fHazardDesc
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否执行"
prop=
"fIsEnforcement"
>
<span
v-if=
"detailInfo.fIsEnforcement == '1'"
>
是
</span>
<span
v-else-if=
"detailInfo.fIsEnforcement == '0'"
>
否
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患整改前照片"
>
<el-image
:src=
"detailInfo.fBeforePicture"
:preview-src-list=
"[detailInfo.fBeforePicture]"
v-if=
"detailInfo.fBeforePicture != '' && detailInfo.fBeforePicture != null"
:z-index=
5000
style=
"width: 200px;height: 200px;"
></el-image>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
>
<span
v-if=
"detailInfo.fRemark"
>
{{
detailInfo
.
fRemark
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
getRef
}
from
"@/api/supervision/spot"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailInfo
:
{
fDeleteFlag
:
0
},
detailOpen
:
false
}
},
methods
:{
getDetailInfo
(
id
){
getRef
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
detailInfo
=
res
.
data
;
this
.
detailOpen
=
true
;
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
zh-baseversion-web/src/views/supervision/spot/index.vue
0 → 100644
View file @
e5cab16a
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"隐患唯一编码"
prop=
"fHazardUniqueCode"
>
<el-input
v-model=
"queryParams.fHazardUniqueCode"
placeholder=
"请输入隐患唯一编码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"检查对象分类"
prop=
"fObjType"
>
<el-select
v-model=
"queryParams.fObjType"
placeholder=
"请选择检查对象分类"
clearable
size=
"small"
>
<el-option
v-for=
"dict in fObjTypeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"是否执行"
prop=
"fIsEnforcement"
>
<el-select
v-model=
"queryParams.fIsEnforcement"
placeholder=
"请选择是否执行"
clearable
size=
"small"
>
<el-option
label=
"是"
value=
"1"
/>
<el-option
label=
"否"
value=
"0"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</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=
"handleAdd"
v-hasPermi=
"['supervision:spot:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['supervision:spot: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=
"['supervision:spot: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=
"['supervision:spot:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"refList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"隐患唯一编码"
align=
"center"
prop=
"fHazardUniqueCode"
/>
<el-table-column
label=
"自有编号"
align=
"center"
prop=
"fHazardOutUniqueCode"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardOutUniqueCode"
>
{{
scope
.
row
.
fHazardOutUniqueCode
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"设计供气企业编码"
align=
"center"
prop=
"fInvolveEnterpriseCode"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fInvolveEnterpriseCode"
>
{{
scope
.
row
.
fInvolveEnterpriseCode
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"检查对象分类"
align=
"center"
prop=
"fObjType"
:formatter=
"fObjTypeFormat"
/>
<el-table-column
label=
"对象编码"
align=
"center"
prop=
"fObjCode"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fObjCode"
>
{{
scope
.
row
.
fObjCode
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"行政区县级行政区ID"
align=
"center"
prop=
"fObjBelongRegionId"
width=
"150"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fObjBelongRegionId"
>
{{
scope
.
row
.
fObjBelongRegionId
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"监督检查时间"
align=
"center"
prop=
"fCheckTime"
width=
"150"
/>
<el-table-column
label=
"隐患分类分级编码"
align=
"center"
prop=
"fHazardTypeLevelId"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardTypeLevelId"
>
{{
scope
.
row
.
fHazardTypeLevelId
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患描述"
align=
"center"
prop=
"fHazardDesc"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardDesc"
>
{{
scope
.
row
.
fHazardDesc
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患整改前照片"
align=
"center"
prop=
"fBeforePicture"
>
<
template
slot-scope=
"scope"
>
<el-image
v-if=
"scope.row.fBeforePicture"
:src=
"scope.row.fBeforePicture"
:preview-src-list=
"[scope.row.fBeforePicture]"
:z-index=
"9999"
style=
"width: 30px;height: 30px;"
></el-image>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"是否执行"
align=
"center"
prop=
"fIsEnforcement"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fIsEnforcement == '1'"
>
是
</span>
<span
v-else-if=
"scope.row.fIsEnforcement == '0'"
>
否
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-document"
@
click=
"handleDetail(scope.row)"
v-hasPermi=
"['supervision:spot:query']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['supervision:spot:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['supervision:spot:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改抽查隐患对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"900px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"140px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患唯一编码"
prop=
"fHazardUniqueCode"
>
<el-input
v-model=
"form.fHazardUniqueCode"
placeholder=
"请输入隐患唯一编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患自有编号"
prop=
"fHazardOutUniqueCode"
>
<el-input
v-model=
"form.fHazardOutUniqueCode"
placeholder=
"请输入隐患自有编号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"设计供气企业编码"
prop=
"fInvolveEnterpriseCode"
>
<el-input
v-model=
"form.fInvolveEnterpriseCode"
placeholder=
"请输入设计供气企业编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查对象分类"
prop=
"fObjType"
>
<el-select
v-model=
"form.fObjType"
placeholder=
"请选择检查对象分类"
style=
"width: 100%"
>
<el-option
v-for=
"dict in fObjTypeOptions"
: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=
"fObjCode"
>
<el-input
v-model=
"form.fObjCode"
placeholder=
"请输入对象编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"行政区县级行政区ID"
prop=
"fObjBelongRegionId"
>
<el-input
v-model=
"form.fObjBelongRegionId"
placeholder=
"请输入行政区县级行政区ID"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"监督检查时间"
prop=
"fCheckTime"
>
<el-date-picker
style=
"width: 100%"
v-model=
"form.fCheckTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择监督检查时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患分类分级编码"
prop=
"fHazardTypeLevelId"
>
<el-input
v-model=
"form.fHazardTypeLevelId"
placeholder=
"请输入隐患分类分级编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患描述"
prop=
"fHazardDesc"
>
<el-input
v-model=
"form.fHazardDesc"
placeholder=
"隐患描述"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否执行"
prop=
"fIsEnforcement"
>
<el-select
v-model=
"form.fIsEnforcement"
placeholder=
"请选择是否执行"
style=
"width: 100%"
>
<el-option
label=
"是"
value=
"1"
/>
<el-option
label=
"否"
value=
"0"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"隐患整改前照片"
prop=
"fBeforePicture"
>
<imageUpload
v-model=
"form.fBeforePicture"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"fRemark"
>
<el-input
type=
"textarea"
v-model=
"form.fRemark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</template>
<
script
>
import
{
listRef
,
getRef
,
delRef
,
addRef
,
updateRef
,
exportRef
}
from
"@/api/supervision/spot"
;
import
ImageUpload
from
'@/components/ImageUpload'
;
import
DetailInfo
from
"./components/DetailInfo"
;
export
default
{
name
:
"Ref"
,
components
:
{
ImageUpload
,
DetailInfo
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 抽查隐患表格数据
refList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 检查对象分类
fObjTypeOptions
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
fHazardUniqueCode
:
null
,
fObjType
:
null
,
fIsEnforcement
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
fHazardUniqueCode
:
[
{
required
:
true
,
message
:
"隐患唯一编码不能为空"
,
trigger
:
"blur"
}
],
fObjType
:
[
{
required
:
true
,
message
:
"请选择检查对象分类"
,
trigger
:
"change"
}
],
fCheckTime
:
[
{
required
:
true
,
message
:
"请选择监督检查时间"
,
trigger
:
"change"
}
],
}
};
},
created
()
{
this
.
getList
();
this
.
getDicts
(
"t_type_code"
).
then
(
response
=>
{
this
.
fObjTypeOptions
=
response
.
data
;
});
},
methods
:
{
/** 查询抽查隐患列表 */
getList
()
{
this
.
loading
=
true
;
listRef
(
this
.
queryParams
).
then
(
response
=>
{
this
.
refList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 检查对象分类
fObjTypeFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
fObjTypeOptions
,
row
.
fObjType
);
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
fInsSpotHazardRefId
:
null
,
fHazardUniqueCode
:
null
,
fHazardOutUniqueCode
:
null
,
fInvolveEnterpriseCode
:
null
,
fObjType
:
null
,
fObjCode
:
null
,
fObjBelongRegionId
:
null
,
fCheckTime
:
null
,
fHazardTypeLevelId
:
null
,
fHazardDesc
:
null
,
fBeforePicture
:
null
,
fIsEnforcement
:
null
,
fRemark
:
null
,
fLastTime
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
fInsSpotHazardRefId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加抽查隐患"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
fInsSpotHazardRefId
=
row
.
fInsSpotHazardRefId
||
this
.
ids
getRef
(
fInsSpotHazardRefId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改抽查隐患"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
fInsSpotHazardRefId
!=
null
)
{
updateRef
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addRef
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
fInsSpotHazardRefIds
=
row
.
fInsSpotHazardRefId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除抽查隐患编号为"'
+
fInsSpotHazardRefIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delRef
(
fInsSpotHazardRefIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有抽查隐患数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportRef
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
fInsSpotHazardRefId
);
},
}
};
</
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