Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
c0404b0f
Commit
c0404b0f
authored
Mar 17, 2026
by
xulihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重大危险源档案管理添加监管码;添加“监督检查记录”功能;添加“隐患及整改”功能
parent
c69195a5
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
2062 additions
and
9 deletions
+2062
-9
TDangersRectificationsController.java
...ontroller/energency/TDangersRectificationsController.java
+97
-0
TSupervisionInspectionController.java
...ontroller/energency/TSupervisionInspectionController.java
+97
-0
TDangersRectifications.java
...java/com/zehong/system/domain/TDangersRectifications.java
+125
-0
TSupMajorHazard.java
...c/main/java/com/zehong/system/domain/TSupMajorHazard.java
+11
-1
TSupervisionInspection.java
...java/com/zehong/system/domain/TSupervisionInspection.java
+139
-0
TDangersRectificationsMapper.java
...om/zehong/system/mapper/TDangersRectificationsMapper.java
+61
-0
TSupervisionInspectionMapper.java
...om/zehong/system/mapper/TSupervisionInspectionMapper.java
+61
-0
ITDangersRectificationsService.java
...zehong/system/service/ITDangersRectificationsService.java
+61
-0
ITSupervisionInspectionService.java
...zehong/system/service/ITSupervisionInspectionService.java
+61
-0
TDangersRectificationsServiceImpl.java
...ystem/service/impl/TDangersRectificationsServiceImpl.java
+94
-0
TSupervisionInspectionServiceImpl.java
...ystem/service/impl/TSupervisionInspectionServiceImpl.java
+94
-0
TDangersRectificationsMapper.xml
.../resources/mapper/system/TDangersRectificationsMapper.xml
+85
-0
TSupMajorHazardMapper.xml
...rc/main/resources/mapper/system/TSupMajorHazardMapper.xml
+8
-2
TSupervisionInspectionMapper.xml
.../resources/mapper/system/TSupervisionInspectionMapper.xml
+90
-0
dangersRectifications.js
...web/src/api/majorpollsourcelevel/dangersRectifications.js
+53
-0
supMajorHazard.js
...ersion-web/src/api/majorpollsourcelevel/supMajorHazard.js
+53
-0
index.vue
...iews/majorpollsourcelevel/dangersRectifications/index.vue
+422
-0
index.vue
...rsion-web/src/views/majorpollsourcelevel/record/index.vue
+101
-6
index.vue
...b/src/views/majorpollsourcelevel/supMajorHazard/index.vue
+349
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/energency/TDangersRectificationsController.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
web
.
controller
.
energency
;
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.TDangersRectifications
;
import
com.zehong.system.service.ITDangersRectificationsService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 隐患及整改Controller
*
* @author zehong
* @date 2026-03-16
*/
@RestController
@RequestMapping
(
"/dangers/rectifications"
)
public
class
TDangersRectificationsController
extends
BaseController
{
@Autowired
private
ITDangersRectificationsService
tDangersRectificationsService
;
/**
* 查询隐患及整改列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TDangersRectifications
tDangersRectifications
)
{
startPage
();
List
<
TDangersRectifications
>
list
=
tDangersRectificationsService
.
selectTDangersRectificationsList
(
tDangersRectifications
);
return
getDataTable
(
list
);
}
/**
* 导出隐患及整改列表
*/
@Log
(
title
=
"隐患及整改"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDangersRectifications
tDangersRectifications
)
{
List
<
TDangersRectifications
>
list
=
tDangersRectificationsService
.
selectTDangersRectificationsList
(
tDangersRectifications
);
ExcelUtil
<
TDangersRectifications
>
util
=
new
ExcelUtil
<
TDangersRectifications
>(
TDangersRectifications
.
class
);
return
util
.
exportExcel
(
list
,
"隐患及整改数据"
);
}
/**
* 获取隐患及整改详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tDangersRectificationsService
.
selectTDangersRectificationsById
(
id
));
}
/**
* 新增隐患及整改
*/
@Log
(
title
=
"隐患及整改"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TDangersRectifications
tDangersRectifications
)
{
return
toAjax
(
tDangersRectificationsService
.
insertTDangersRectifications
(
tDangersRectifications
));
}
/**
* 修改隐患及整改
*/
@Log
(
title
=
"隐患及整改"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TDangersRectifications
tDangersRectifications
)
{
return
toAjax
(
tDangersRectificationsService
.
updateTDangersRectifications
(
tDangersRectifications
));
}
/**
* 删除隐患及整改
*/
@Log
(
title
=
"隐患及整改"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tDangersRectificationsService
.
deleteTDangersRectificationsByIds
(
ids
));
}
}
\ No newline at end of file
zh-baseversion-admin/src/main/java/com/zehong/web/controller/energency/TSupervisionInspectionController.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
web
.
controller
.
energency
;
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.TSupervisionInspection
;
import
com.zehong.system.service.ITSupervisionInspectionService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 监督检查记录Controller
*
* @author zehong
* @date 2026-03-16
*/
@RestController
@RequestMapping
(
"/supervision/inspection"
)
public
class
TSupervisionInspectionController
extends
BaseController
{
@Autowired
private
ITSupervisionInspectionService
tSupervisionInspectionService
;
/**
* 查询监督检查记录列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TSupervisionInspection
tSupervisionInspection
)
{
startPage
();
List
<
TSupervisionInspection
>
list
=
tSupervisionInspectionService
.
selectTSupervisionInspectionList
(
tSupervisionInspection
);
return
getDataTable
(
list
);
}
/**
* 导出监督检查记录列表
*/
@Log
(
title
=
"监督检查记录"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TSupervisionInspection
tSupervisionInspection
)
{
List
<
TSupervisionInspection
>
list
=
tSupervisionInspectionService
.
selectTSupervisionInspectionList
(
tSupervisionInspection
);
ExcelUtil
<
TSupervisionInspection
>
util
=
new
ExcelUtil
<
TSupervisionInspection
>(
TSupervisionInspection
.
class
);
return
util
.
exportExcel
(
list
,
"监督检查记录数据"
);
}
/**
* 获取监督检查记录详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tSupervisionInspectionService
.
selectTSupervisionInspectionById
(
id
));
}
/**
* 新增监督检查记录
*/
@Log
(
title
=
"监督检查记录"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TSupervisionInspection
tSupervisionInspection
)
{
return
toAjax
(
tSupervisionInspectionService
.
insertTSupervisionInspection
(
tSupervisionInspection
));
}
/**
* 修改监督检查记录
*/
@Log
(
title
=
"监督检查记录"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TSupervisionInspection
tSupervisionInspection
)
{
return
toAjax
(
tSupervisionInspectionService
.
updateTSupervisionInspection
(
tSupervisionInspection
));
}
/**
* 删除监督检查记录
*/
@Log
(
title
=
"监督检查记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tSupervisionInspectionService
.
deleteTSupervisionInspectionByIds
(
ids
));
}
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/domain/TDangersRectifications.java
0 → 100644
View file @
c0404b0f
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_dangers_rectifications
*
* @author zehong
* @date 2026-03-16
*/
public
class
TDangersRectifications
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 重大危险源监管表id */
@Excel
(
name
=
"重大危险源监管表id"
)
private
Long
fHazardId
;
/** 风险等级 */
@Excel
(
name
=
"风险等级"
)
private
String
riskLevel
;
/** 整改措施 */
@Excel
(
name
=
"整改措施"
)
private
String
rectificationMeasures
;
/** 隐患描述 */
@Excel
(
name
=
"隐患描述"
)
private
String
hazardDescription
;
/** 整改完成时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"整改完成时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
completionTime
;
/** 佐证材料 */
@Excel
(
name
=
"佐证材料"
)
private
String
fileUrl
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setfHazardId
(
Long
fHazardId
)
{
this
.
fHazardId
=
fHazardId
;
}
public
Long
getfHazardId
()
{
return
fHazardId
;
}
public
void
setRiskLevel
(
String
riskLevel
)
{
this
.
riskLevel
=
riskLevel
;
}
public
String
getRiskLevel
()
{
return
riskLevel
;
}
public
void
setRectificationMeasures
(
String
rectificationMeasures
)
{
this
.
rectificationMeasures
=
rectificationMeasures
;
}
public
String
getRectificationMeasures
()
{
return
rectificationMeasures
;
}
public
void
setHazardDescription
(
String
hazardDescription
)
{
this
.
hazardDescription
=
hazardDescription
;
}
public
String
getHazardDescription
()
{
return
hazardDescription
;
}
public
void
setCompletionTime
(
Date
completionTime
)
{
this
.
completionTime
=
completionTime
;
}
public
Date
getCompletionTime
()
{
return
completionTime
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
public
String
getFileUrl
()
{
return
fileUrl
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"fHazardId"
,
getfHazardId
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"riskLevel"
,
getRiskLevel
())
.
append
(
"rectificationMeasures"
,
getRectificationMeasures
())
.
append
(
"hazardDescription"
,
getHazardDescription
())
.
append
(
"completionTime"
,
getCompletionTime
())
.
append
(
"fileUrl"
,
getFileUrl
())
.
toString
();
}
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/domain/TSupMajorHazard.java
View file @
c0404b0f
...
...
@@ -71,7 +71,17 @@ public class TSupMajorHazard extends BaseEntity
/** 备注 */
private
String
fRemarks
;
public
void
setfHazardId
(
Long
fHazardId
)
private
String
supervisionCode
;
public
String
getSupervisionCode
()
{
return
supervisionCode
;
}
public
void
setSupervisionCode
(
String
supervisionCode
)
{
this
.
supervisionCode
=
supervisionCode
;
}
public
void
setfHazardId
(
Long
fHazardId
)
{
this
.
fHazardId
=
fHazardId
;
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TSupervisionInspection.java
0 → 100644
View file @
c0404b0f
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_supervision_inspection
*
* @author zehong
* @date 2026-03-16
*/
public
class
TSupervisionInspection
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 重大危险源监管表id */
@Excel
(
name
=
"重大危险源监管表id"
)
private
Long
fHazardId
;
/** 检查日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"检查日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inspectionDate
;
/** 检查单位id */
@Excel
(
name
=
"检查单位id"
)
private
String
enterpriseId
;
/** 检查单位名称 */
@Excel
(
name
=
"检查单位名称"
)
private
String
enterpriseName
;
/** 发现问题 */
@Excel
(
name
=
"发现问题"
)
private
String
identifyProblems
;
/** 整改要求 */
@Excel
(
name
=
"整改要求"
)
private
String
rectificationRequirements
;
/** 复查结果 */
@Excel
(
name
=
"复查结果"
)
private
String
reviewResults
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setfHazardId
(
Long
fHazardId
)
{
this
.
fHazardId
=
fHazardId
;
}
public
Long
getfHazardId
()
{
return
fHazardId
;
}
public
void
setInspectionDate
(
Date
inspectionDate
)
{
this
.
inspectionDate
=
inspectionDate
;
}
public
Date
getInspectionDate
()
{
return
inspectionDate
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setIdentifyProblems
(
String
identifyProblems
)
{
this
.
identifyProblems
=
identifyProblems
;
}
public
String
getIdentifyProblems
()
{
return
identifyProblems
;
}
public
void
setRectificationRequirements
(
String
rectificationRequirements
)
{
this
.
rectificationRequirements
=
rectificationRequirements
;
}
public
String
getRectificationRequirements
()
{
return
rectificationRequirements
;
}
public
void
setReviewResults
(
String
reviewResults
)
{
this
.
reviewResults
=
reviewResults
;
}
public
String
getReviewResults
()
{
return
reviewResults
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"fHazardId"
,
getfHazardId
())
.
append
(
"inspectionDate"
,
getInspectionDate
())
.
append
(
"enterpriseId"
,
getEnterpriseId
())
.
append
(
"enterpriseName"
,
getEnterpriseName
())
.
append
(
"identifyProblems"
,
getIdentifyProblems
())
.
append
(
"rectificationRequirements"
,
getRectificationRequirements
())
.
append
(
"reviewResults"
,
getReviewResults
())
.
append
(
"createTime"
,
getCreateTime
())
.
toString
();
}
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TDangersRectificationsMapper.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TDangersRectifications
;
/**
* 隐患及整改Mapper接口
*
* @author zehong
* @date 2026-03-16
*/
public
interface
TDangersRectificationsMapper
{
/**
* 查询隐患及整改
*
* @param id 隐患及整改ID
* @return 隐患及整改
*/
public
TDangersRectifications
selectTDangersRectificationsById
(
Long
id
);
/**
* 查询隐患及整改列表
*
* @param tDangersRectifications 隐患及整改
* @return 隐患及整改集合
*/
public
List
<
TDangersRectifications
>
selectTDangersRectificationsList
(
TDangersRectifications
tDangersRectifications
);
/**
* 新增隐患及整改
*
* @param tDangersRectifications 隐患及整改
* @return 结果
*/
public
int
insertTDangersRectifications
(
TDangersRectifications
tDangersRectifications
);
/**
* 修改隐患及整改
*
* @param tDangersRectifications 隐患及整改
* @return 结果
*/
public
int
updateTDangersRectifications
(
TDangersRectifications
tDangersRectifications
);
/**
* 删除隐患及整改
*
* @param id 隐患及整改ID
* @return 结果
*/
public
int
deleteTDangersRectificationsById
(
Long
id
);
/**
* 批量删除隐患及整改
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTDangersRectificationsByIds
(
Long
[]
ids
);
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TSupervisionInspectionMapper.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TSupervisionInspection
;
/**
* 监督检查记录Mapper接口
*
* @author zehong
* @date 2026-03-16
*/
public
interface
TSupervisionInspectionMapper
{
/**
* 查询监督检查记录
*
* @param id 监督检查记录ID
* @return 监督检查记录
*/
public
TSupervisionInspection
selectTSupervisionInspectionById
(
Long
id
);
/**
* 查询监督检查记录列表
*
* @param tSupervisionInspection 监督检查记录
* @return 监督检查记录集合
*/
public
List
<
TSupervisionInspection
>
selectTSupervisionInspectionList
(
TSupervisionInspection
tSupervisionInspection
);
/**
* 新增监督检查记录
*
* @param tSupervisionInspection 监督检查记录
* @return 结果
*/
public
int
insertTSupervisionInspection
(
TSupervisionInspection
tSupervisionInspection
);
/**
* 修改监督检查记录
*
* @param tSupervisionInspection 监督检查记录
* @return 结果
*/
public
int
updateTSupervisionInspection
(
TSupervisionInspection
tSupervisionInspection
);
/**
* 删除监督检查记录
*
* @param id 监督检查记录ID
* @return 结果
*/
public
int
deleteTSupervisionInspectionById
(
Long
id
);
/**
* 批量删除监督检查记录
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTSupervisionInspectionByIds
(
Long
[]
ids
);
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/ITDangersRectificationsService.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TDangersRectifications
;
/**
* 隐患及整改Service接口
*
* @author zehong
* @date 2026-03-16
*/
public
interface
ITDangersRectificationsService
{
/**
* 查询隐患及整改
*
* @param id 隐患及整改ID
* @return 隐患及整改
*/
public
TDangersRectifications
selectTDangersRectificationsById
(
Long
id
);
/**
* 查询隐患及整改列表
*
* @param tDangersRectifications 隐患及整改
* @return 隐患及整改集合
*/
public
List
<
TDangersRectifications
>
selectTDangersRectificationsList
(
TDangersRectifications
tDangersRectifications
);
/**
* 新增隐患及整改
*
* @param tDangersRectifications 隐患及整改
* @return 结果
*/
public
int
insertTDangersRectifications
(
TDangersRectifications
tDangersRectifications
);
/**
* 修改隐患及整改
*
* @param tDangersRectifications 隐患及整改
* @return 结果
*/
public
int
updateTDangersRectifications
(
TDangersRectifications
tDangersRectifications
);
/**
* 批量删除隐患及整改
*
* @param ids 需要删除的隐患及整改ID
* @return 结果
*/
public
int
deleteTDangersRectificationsByIds
(
Long
[]
ids
);
/**
* 删除隐患及整改信息
*
* @param id 隐患及整改ID
* @return 结果
*/
public
int
deleteTDangersRectificationsById
(
Long
id
);
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/ITSupervisionInspectionService.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TSupervisionInspection
;
/**
* 监督检查记录Service接口
*
* @author zehong
* @date 2026-03-16
*/
public
interface
ITSupervisionInspectionService
{
/**
* 查询监督检查记录
*
* @param id 监督检查记录ID
* @return 监督检查记录
*/
public
TSupervisionInspection
selectTSupervisionInspectionById
(
Long
id
);
/**
* 查询监督检查记录列表
*
* @param tSupervisionInspection 监督检查记录
* @return 监督检查记录集合
*/
public
List
<
TSupervisionInspection
>
selectTSupervisionInspectionList
(
TSupervisionInspection
tSupervisionInspection
);
/**
* 新增监督检查记录
*
* @param tSupervisionInspection 监督检查记录
* @return 结果
*/
public
int
insertTSupervisionInspection
(
TSupervisionInspection
tSupervisionInspection
);
/**
* 修改监督检查记录
*
* @param tSupervisionInspection 监督检查记录
* @return 结果
*/
public
int
updateTSupervisionInspection
(
TSupervisionInspection
tSupervisionInspection
);
/**
* 批量删除监督检查记录
*
* @param ids 需要删除的监督检查记录ID
* @return 结果
*/
public
int
deleteTSupervisionInspectionByIds
(
Long
[]
ids
);
/**
* 删除监督检查记录信息
*
* @param id 监督检查记录ID
* @return 结果
*/
public
int
deleteTSupervisionInspectionById
(
Long
id
);
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TDangersRectificationsServiceImpl.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDangersRectificationsMapper
;
import
com.zehong.system.domain.TDangersRectifications
;
import
com.zehong.system.service.ITDangersRectificationsService
;
/**
* 隐患及整改Service业务层处理
*
* @author zehong
* @date 2026-03-16
*/
@Service
public
class
TDangersRectificationsServiceImpl
implements
ITDangersRectificationsService
{
@Autowired
private
TDangersRectificationsMapper
tDangersRectificationsMapper
;
/**
* 查询隐患及整改
*
* @param id 隐患及整改ID
* @return 隐患及整改
*/
@Override
public
TDangersRectifications
selectTDangersRectificationsById
(
Long
id
)
{
return
tDangersRectificationsMapper
.
selectTDangersRectificationsById
(
id
);
}
/**
* 查询隐患及整改列表
*
* @param tDangersRectifications 隐患及整改
* @return 隐患及整改
*/
@Override
public
List
<
TDangersRectifications
>
selectTDangersRectificationsList
(
TDangersRectifications
tDangersRectifications
)
{
return
tDangersRectificationsMapper
.
selectTDangersRectificationsList
(
tDangersRectifications
);
}
/**
* 新增隐患及整改
*
* @param tDangersRectifications 隐患及整改
* @return 结果
*/
@Override
public
int
insertTDangersRectifications
(
TDangersRectifications
tDangersRectifications
)
{
tDangersRectifications
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tDangersRectificationsMapper
.
insertTDangersRectifications
(
tDangersRectifications
);
}
/**
* 修改隐患及整改
*
* @param tDangersRectifications 隐患及整改
* @return 结果
*/
@Override
public
int
updateTDangersRectifications
(
TDangersRectifications
tDangersRectifications
)
{
return
tDangersRectificationsMapper
.
updateTDangersRectifications
(
tDangersRectifications
);
}
/**
* 批量删除隐患及整改
*
* @param ids 需要删除的隐患及整改ID
* @return 结果
*/
@Override
public
int
deleteTDangersRectificationsByIds
(
Long
[]
ids
)
{
return
tDangersRectificationsMapper
.
deleteTDangersRectificationsByIds
(
ids
);
}
/**
* 删除隐患及整改信息
*
* @param id 隐患及整改ID
* @return 结果
*/
@Override
public
int
deleteTDangersRectificationsById
(
Long
id
)
{
return
tDangersRectificationsMapper
.
deleteTDangersRectificationsById
(
id
);
}
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TSupervisionInspectionServiceImpl.java
0 → 100644
View file @
c0404b0f
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TSupervisionInspectionMapper
;
import
com.zehong.system.domain.TSupervisionInspection
;
import
com.zehong.system.service.ITSupervisionInspectionService
;
/**
* 监督检查记录Service业务层处理
*
* @author zehong
* @date 2026-03-16
*/
@Service
public
class
TSupervisionInspectionServiceImpl
implements
ITSupervisionInspectionService
{
@Autowired
private
TSupervisionInspectionMapper
tSupervisionInspectionMapper
;
/**
* 查询监督检查记录
*
* @param id 监督检查记录ID
* @return 监督检查记录
*/
@Override
public
TSupervisionInspection
selectTSupervisionInspectionById
(
Long
id
)
{
return
tSupervisionInspectionMapper
.
selectTSupervisionInspectionById
(
id
);
}
/**
* 查询监督检查记录列表
*
* @param tSupervisionInspection 监督检查记录
* @return 监督检查记录
*/
@Override
public
List
<
TSupervisionInspection
>
selectTSupervisionInspectionList
(
TSupervisionInspection
tSupervisionInspection
)
{
return
tSupervisionInspectionMapper
.
selectTSupervisionInspectionList
(
tSupervisionInspection
);
}
/**
* 新增监督检查记录
*
* @param tSupervisionInspection 监督检查记录
* @return 结果
*/
@Override
public
int
insertTSupervisionInspection
(
TSupervisionInspection
tSupervisionInspection
)
{
tSupervisionInspection
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tSupervisionInspectionMapper
.
insertTSupervisionInspection
(
tSupervisionInspection
);
}
/**
* 修改监督检查记录
*
* @param tSupervisionInspection 监督检查记录
* @return 结果
*/
@Override
public
int
updateTSupervisionInspection
(
TSupervisionInspection
tSupervisionInspection
)
{
return
tSupervisionInspectionMapper
.
updateTSupervisionInspection
(
tSupervisionInspection
);
}
/**
* 批量删除监督检查记录
*
* @param ids 需要删除的监督检查记录ID
* @return 结果
*/
@Override
public
int
deleteTSupervisionInspectionByIds
(
Long
[]
ids
)
{
return
tSupervisionInspectionMapper
.
deleteTSupervisionInspectionByIds
(
ids
);
}
/**
* 删除监督检查记录信息
*
* @param id 监督检查记录ID
* @return 结果
*/
@Override
public
int
deleteTSupervisionInspectionById
(
Long
id
)
{
return
tSupervisionInspectionMapper
.
deleteTSupervisionInspectionById
(
id
);
}
}
\ No newline at end of file
zh-baseversion-system/src/main/resources/mapper/system/TDangersRectificationsMapper.xml
0 → 100644
View file @
c0404b0f
<?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.TDangersRectificationsMapper"
>
<resultMap
type=
"com.zehong.system.domain.TDangersRectifications"
id=
"TDangersRectificationsResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"fHazardId"
column=
"f_hazard_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"riskLevel"
column=
"risk_level"
/>
<result
property=
"rectificationMeasures"
column=
"rectification_measures"
/>
<result
property=
"hazardDescription"
column=
"hazard_description"
/>
<result
property=
"completionTime"
column=
"completion_time"
/>
<result
property=
"fileUrl"
column=
"file_url"
/>
</resultMap>
<sql
id=
"selectTDangersRectificationsVo"
>
select id, f_hazard_id, create_time, risk_level, rectification_measures, hazard_description, completion_time, file_url from t_dangers_rectifications
</sql>
<select
id=
"selectTDangersRectificationsList"
parameterType=
"com.zehong.system.domain.TDangersRectifications"
resultMap=
"TDangersRectificationsResult"
>
<include
refid=
"selectTDangersRectificationsVo"
/>
<where>
<if
test=
"fHazardId != null "
>
and f_hazard_id = #{fHazardId}
</if>
<if
test=
"riskLevel != null and riskLevel != ''"
>
and risk_level = #{riskLevel}
</if>
<if
test=
"rectificationMeasures != null and rectificationMeasures != ''"
>
and rectification_measures = #{rectificationMeasures}
</if>
<if
test=
"hazardDescription != null and hazardDescription != ''"
>
and hazard_description = #{hazardDescription}
</if>
<if
test=
"completionTime != null "
>
and completion_time = #{completionTime}
</if>
<if
test=
"fileUrl != null and fileUrl != ''"
>
and file_url = #{fileUrl}
</if>
</where>
</select>
<select
id=
"selectTDangersRectificationsById"
parameterType=
"Long"
resultMap=
"TDangersRectificationsResult"
>
<include
refid=
"selectTDangersRectificationsVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTDangersRectifications"
parameterType=
"com.zehong.system.domain.TDangersRectifications"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_dangers_rectifications
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fHazardId != null"
>
f_hazard_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"riskLevel != null"
>
risk_level,
</if>
<if
test=
"rectificationMeasures != null"
>
rectification_measures,
</if>
<if
test=
"hazardDescription != null"
>
hazard_description,
</if>
<if
test=
"completionTime != null"
>
completion_time,
</if>
<if
test=
"fileUrl != null"
>
file_url,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fHazardId != null"
>
#{fHazardId},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"riskLevel != null"
>
#{riskLevel},
</if>
<if
test=
"rectificationMeasures != null"
>
#{rectificationMeasures},
</if>
<if
test=
"hazardDescription != null"
>
#{hazardDescription},
</if>
<if
test=
"completionTime != null"
>
#{completionTime},
</if>
<if
test=
"fileUrl != null"
>
#{fileUrl},
</if>
</trim>
</insert>
<update
id=
"updateTDangersRectifications"
parameterType=
"com.zehong.system.domain.TDangersRectifications"
>
update t_dangers_rectifications
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fHazardId != null"
>
f_hazard_id = #{fHazardId},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"riskLevel != null"
>
risk_level = #{riskLevel},
</if>
<if
test=
"rectificationMeasures != null"
>
rectification_measures = #{rectificationMeasures},
</if>
<if
test=
"hazardDescription != null"
>
hazard_description = #{hazardDescription},
</if>
<if
test=
"completionTime != null"
>
completion_time = #{completionTime},
</if>
<if
test=
"fileUrl != null"
>
file_url = #{fileUrl},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTDangersRectificationsById"
parameterType=
"Long"
>
delete from t_dangers_rectifications where id = #{id}
</delete>
<delete
id=
"deleteTDangersRectificationsByIds"
parameterType=
"String"
>
delete from t_dangers_rectifications where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
zh-baseversion-system/src/main/resources/mapper/system/TSupMajorHazardMapper.xml
View file @
c0404b0f
...
...
@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"fUpdateTime"
column=
"f_update_time"
/>
<result
property=
"fIsDel"
column=
"f_is_del"
/>
<result
property=
"fRemarks"
column=
"f_remarks"
/>
<result
property=
"supervisionCode"
column=
"supervision_code"
/>
</resultMap>
<resultMap
type=
"TSupMajorHazard"
id=
"ExportTSupMajorHazardResult"
>
...
...
@@ -34,9 +35,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"fUpdateTime"
column=
"f_update_time"
/>
<result
property=
"fIsDel"
column=
"f_is_del"
/>
<result
property=
"fRemarks"
column=
"f_remarks"
/>
<result
property=
"supervisionCode"
column=
"supervision_code"
/>
</resultMap>
<sql
id=
"selectTSupMajorHazardVo"
>
select f_hazard_id, f_name, f_res_per, f_phone, f_eva_infor, longitude, latitude, f_level, f_create_time, f_update_time, f_is_del, f_remarks,beyond_enterprise_id from t_sup_major_hazard
select f_hazard_id, f_name, f_res_per, f_phone, f_eva_infor, longitude, latitude, f_level, f_create_time, f_update_time, f_is_del, f_remarks,beyond_enterprise_id
,supervision_code
from t_sup_major_hazard
</sql>
<sql
id=
"exportSelectTSupMajorHazardVo"
>
...
...
@@ -54,7 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_is_del,
f_remarks,
beyond_enterprise_id ,
dict_label
dict_label,
supervision_code,
FROM
t_sup_major_hazard hazard inner join sys_dict_data dictData on hazard.f_level = dictData.dict_value and dictData.dict_type = 'major_poll_source_level'
</sql>
...
...
@@ -93,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fUpdateTime != null"
>
f_update_time,
</if>
<if
test=
"fIsDel != null"
>
f_is_del,
</if>
<if
test=
"fRemarks != null"
>
f_remarks,
</if>
<if
test=
"supervisionCode != null"
>
supervision_code,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fName != null"
>
#{fName},
</if>
...
...
@@ -107,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fUpdateTime != null"
>
#{fUpdateTime},
</if>
<if
test=
"fIsDel != null"
>
#{fIsDel},
</if>
<if
test=
"fRemarks != null"
>
#{fRemarks},
</if>
<if
test=
"supervisionCode != null"
>
#{supervisionCode},
</if>
</trim>
</insert>
...
...
@@ -125,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fUpdateTime != null"
>
f_update_time = #{fUpdateTime},
</if>
<if
test=
"fIsDel != null"
>
f_is_del = #{fIsDel},
</if>
<if
test=
"fRemarks != null"
>
f_remarks = #{fRemarks},
</if>
<if
test=
"supervisionCode != null"
>
supervision_code = #{supervisionCode},
</if>
</trim>
where f_hazard_id = #{fHazardId}
</update>
...
...
zh-baseversion-system/src/main/resources/mapper/system/TSupervisionInspectionMapper.xml
0 → 100644
View file @
c0404b0f
<?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.TSupervisionInspectionMapper"
>
<resultMap
type=
"com.zehong.system.domain.TSupervisionInspection"
id=
"TSupervisionInspectionResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"fHazardId"
column=
"f_hazard_id"
/>
<result
property=
"inspectionDate"
column=
"inspection_date"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"enterpriseName"
column=
"enterprise_name"
/>
<result
property=
"identifyProblems"
column=
"identify_problems"
/>
<result
property=
"rectificationRequirements"
column=
"rectification_requirements"
/>
<result
property=
"reviewResults"
column=
"review_results"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<sql
id=
"selectTSupervisionInspectionVo"
>
select id, f_hazard_id, inspection_date, enterprise_id, enterprise_name, identify_problems, rectification_requirements, review_results, create_time from t_supervision_inspection
</sql>
<select
id=
"selectTSupervisionInspectionList"
parameterType=
"com.zehong.system.domain.TSupervisionInspection"
resultMap=
"TSupervisionInspectionResult"
>
<include
refid=
"selectTSupervisionInspectionVo"
/>
<where>
<if
test=
"fHazardId != null "
>
and f_hazard_id = #{fHazardId}
</if>
<if
test=
"inspectionDate != null "
>
and inspection_date = #{inspectionDate}
</if>
<if
test=
"enterpriseId != null and enterpriseId != ''"
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and enterprise_name like concat('%', #{enterpriseName}, '%')
</if>
<if
test=
"identifyProblems != null and identifyProblems != ''"
>
and identify_problems = #{identifyProblems}
</if>
<if
test=
"rectificationRequirements != null and rectificationRequirements != ''"
>
and rectification_requirements = #{rectificationRequirements}
</if>
<if
test=
"reviewResults != null and reviewResults != ''"
>
and review_results = #{reviewResults}
</if>
</where>
</select>
<select
id=
"selectTSupervisionInspectionById"
parameterType=
"Long"
resultMap=
"TSupervisionInspectionResult"
>
<include
refid=
"selectTSupervisionInspectionVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTSupervisionInspection"
parameterType=
"com.zehong.system.domain.TSupervisionInspection"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_supervision_inspection
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fHazardId != null"
>
f_hazard_id,
</if>
<if
test=
"inspectionDate != null"
>
inspection_date,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"enterpriseName != null"
>
enterprise_name,
</if>
<if
test=
"identifyProblems != null"
>
identify_problems,
</if>
<if
test=
"rectificationRequirements != null"
>
rectification_requirements,
</if>
<if
test=
"reviewResults != null"
>
review_results,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fHazardId != null"
>
#{fHazardId},
</if>
<if
test=
"inspectionDate != null"
>
#{inspectionDate},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId},
</if>
<if
test=
"enterpriseName != null"
>
#{enterpriseName},
</if>
<if
test=
"identifyProblems != null"
>
#{identifyProblems},
</if>
<if
test=
"rectificationRequirements != null"
>
#{rectificationRequirements},
</if>
<if
test=
"reviewResults != null"
>
#{reviewResults},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
</trim>
</insert>
<update
id=
"updateTSupervisionInspection"
parameterType=
"com.zehong.system.domain.TSupervisionInspection"
>
update t_supervision_inspection
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fHazardId != null"
>
f_hazard_id = #{fHazardId},
</if>
<if
test=
"inspectionDate != null"
>
inspection_date = #{inspectionDate},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"enterpriseName != null"
>
enterprise_name = #{enterpriseName},
</if>
<if
test=
"identifyProblems != null"
>
identify_problems = #{identifyProblems},
</if>
<if
test=
"rectificationRequirements != null"
>
rectification_requirements = #{rectificationRequirements},
</if>
<if
test=
"reviewResults != null"
>
review_results = #{reviewResults},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTSupervisionInspectionById"
parameterType=
"Long"
>
delete from t_supervision_inspection where id = #{id}
</delete>
<delete
id=
"deleteTSupervisionInspectionByIds"
parameterType=
"String"
>
delete from t_supervision_inspection where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
zh-baseversion-web/src/api/majorpollsourcelevel/dangersRectifications.js
0 → 100644
View file @
c0404b0f
import
request
from
'@/utils/request'
// 查询隐患及整改列表
export
function
listRectifications
(
query
)
{
return
request
({
url
:
'/dangers/rectifications/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询隐患及整改详细
export
function
getRectifications
(
id
)
{
return
request
({
url
:
'/dangers/rectifications/'
+
id
,
method
:
'get'
})
}
// 新增隐患及整改
export
function
addRectifications
(
data
)
{
return
request
({
url
:
'/dangers/rectifications'
,
method
:
'post'
,
data
:
data
})
}
// 修改隐患及整改
export
function
updateRectifications
(
data
)
{
return
request
({
url
:
'/dangers/rectifications'
,
method
:
'put'
,
data
:
data
})
}
// 删除隐患及整改
export
function
delRectifications
(
id
)
{
return
request
({
url
:
'/dangers/rectifications/'
+
id
,
method
:
'delete'
})
}
// 导出隐患及整改
export
function
exportRectifications
(
query
)
{
return
request
({
url
:
'/dangers/rectifications/export'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/api/majorpollsourcelevel/supMajorHazard.js
0 → 100644
View file @
c0404b0f
import
request
from
'@/utils/request'
// 查询监督检查记录列表
export
function
listInspection
(
query
)
{
return
request
({
url
:
'/supervision/inspection/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询监督检查记录详细
export
function
getInspection
(
id
)
{
return
request
({
url
:
'/supervision/inspection/'
+
id
,
method
:
'get'
})
}
// 新增监督检查记录
export
function
addInspection
(
data
)
{
return
request
({
url
:
'/supervision/inspection'
,
method
:
'post'
,
data
:
data
})
}
// 修改监督检查记录
export
function
updateInspection
(
data
)
{
return
request
({
url
:
'/supervision/inspection'
,
method
:
'put'
,
data
:
data
})
}
// 删除监督检查记录
export
function
delInspection
(
id
)
{
return
request
({
url
:
'/supervision/inspection/'
+
id
,
method
:
'delete'
})
}
// 导出监督检查记录
export
function
exportInspection
(
query
)
{
return
request
({
url
:
'/supervision/inspection/export'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/views/majorpollsourcelevel/dangersRectifications/index.vue
0 → 100644
View file @
c0404b0f
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<!--
<el-form-item
label=
"重大危险源监管表 id"
prop=
"fHazardId"
v-if=
"false"
>
<el-input
v-model=
"queryParams.fHazardId"
placeholder=
"请输入重大危险源监管表 id"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"风险等级"
prop=
"riskLevel"
>
<el-select
v-model=
"queryParams.riskLevel"
placeholder=
"请选择风险等级"
clearable
size=
"small"
>
<el-option
v-for=
"dict in riskLevelOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"完成时间"
prop=
"completionTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.completionTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择整改完成时间"
>
</el-date-picker>
</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"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"rectificationsList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"风险等级"
align=
"center"
prop=
"riskLevel"
:formatter=
"riskLevelFormat"
/>
<el-table-column
label=
"整改措施"
align=
"center"
prop=
"rectificationMeasures"
/>
<el-table-column
label=
"隐患描述"
align=
"center"
prop=
"hazardDescription"
/>
<el-table-column
label=
"整改完成时间"
align=
"center"
prop=
"completionTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
completionTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"佐证材料"
align
=
"center"
prop
=
"fileUrl"
width
=
"150px"
>
<
template
slot
-
scope
=
"scope"
>
<
span
class
=
"dbtn"
@
click
=
"checkFile(scope.row.fileUrl)"
v
-
if
=
"scope.row.fileUrl != null && scope.row.fileUrl!=''"
>
<
i
class
=
"el-icon el-icon-view"
><
/i>查看/
下载
<
/span
>
<
span
v
-
else
>-<
/span
>
<
/template
>
<
/el-table-column
>
<
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-edit"
@
click
=
"handleUpdate(scope.row)"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
>
删除
<
/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
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"风险等级"
prop
=
"riskLevel"
>
<
el
-
select
v
-
model
=
"form.riskLevel"
placeholder
=
"请选择风险等级"
>
<
el
-
option
v
-
for
=
"dict in riskLevelOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictLabel"
:
value
=
"dict.dictValue"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"整改措施"
prop
=
"rectificationMeasures"
>
<
el
-
input
v
-
model
=
"form.rectificationMeasures"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"隐患描述"
prop
=
"hazardDescription"
>
<
el
-
input
v
-
model
=
"form.hazardDescription"
placeholder
=
"请输入隐患描述"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"整改完成时间"
prop
=
"completionTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.completionTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择整改完成时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"佐证材料"
prop
=
"fileUrl"
>
<
FileUpload
listType
=
"picture"
@
resFun
=
"getFileInfo"
@
remove
=
"listRemove"
:
fileArr
=
"fileList"
/>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.fileUrl"
><
/el-input
>
<
/el-form-item
>
<
/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
>
<
/div
>
<
/template
>
<
script
>
import
{
listRectifications
,
getRectifications
,
delRectifications
,
addRectifications
,
updateRectifications
,
exportRectifications
}
from
"@/api/majorpollsourcelevel/dangersRectifications"
;
import
uploadfile
from
"@/assets/uploadfile.png"
;
import
FileUpload
from
"@/components/FileUpload/index.vue"
;
export
default
{
name
:
"dangersRectifications"
,
components
:
{
FileUpload
}
,
props
:
{
fHazardId
:
{
type
:
[
String
,
Number
],
default
:
null
}
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 隐患及整改表格数据
rectificationsList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
fHazardId
:
null
,
riskLevel
:
null
,
rectificationMeasures
:
null
,
hazardDescription
:
null
,
completionTime
:
null
,
fileUrl
:
null
}
,
// 表单参数
form
:
{
}
,
fileList
:[],
fileurl
:
''
,
// 风险等级字典
riskLevelOptions
:
[],
// 表单校验
rules
:
{
riskLevel
:
[
{
required
:
true
,
message
:
"风险等级不能为空"
,
trigger
:
"blur"
}
],
rectificationMeasures
:
[
{
required
:
true
,
message
:
"整改措施不能为空"
,
trigger
:
"blur"
}
],
hazardDescription
:
[
{
required
:
true
,
message
:
"隐患描述不能为空"
,
trigger
:
"blur"
}
],
completionTime
:
[
{
required
:
true
,
message
:
"整改完成时间不能为空"
,
trigger
:
"blur"
}
],
}
}
;
}
,
watch
:
{
fHazardId
:
{
handler
(
newVal
)
{
if
(
newVal
)
{
this
.
queryParams
.
fHazardId
=
newVal
;
}
}
,
immediate
:
true
}
}
,
created
()
{
this
.
getList
();
this
.
getDicts
(
"risk_level"
).
then
(
response
=>
{
this
.
riskLevelOptions
=
response
.
data
;
}
);
}
,
methods
:
{
// 风险等级字典翻译
riskLevelFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
riskLevelOptions
,
row
.
riskLevel
);
}
,
/** 初始化查询 - 从父组件传入 fHazardId */
initQuery
(
fHazardId
)
{
this
.
queryParams
.
fHazardId
=
fHazardId
;
this
.
handleQuery
();
}
,
/** 查询隐患及整改列表 */
getList
()
{
this
.
loading
=
true
;
listRectifications
(
this
.
queryParams
).
then
(
response
=>
{
this
.
rectificationsList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
fileList
=
[];
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
fHazardId
:
null
,
createTime
:
null
,
riskLevel
:
null
,
rectificationMeasures
:
null
,
hazardDescription
:
null
,
completionTime
:
null
,
fileUrl
:
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
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加隐患及整改"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getRectifications
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改隐患及整改"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
form
.
fHazardId
=
this
.
queryParams
.
fHazardId
;
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateRectifications
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addRectifications
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除隐患及整改编号为"'
+
ids
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delRectifications
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有隐患及整改数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportRectifications
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
,
//上传
getFileInfo
(
res
){
//this.form.dealPlan = res.fileName;
this
.
form
.
fileUrl
=
res
.
url
;
this
.
fileList
.
push
({
name
:
res
.
fileName
,
url
:
uploadfile
,
}
);
}
,
listRemove
(
e
)
{
this
.
fileList
=
[];
}
,
checkFile
(
url
)
{
window
.
open
(
url
,
'_blank'
);
}
,
//点击下载
downloadFile
()
{
var
item
=
this
.
fileurl
;
var
title
=
item
.
split
(
"/"
)[
item
.
split
(
"/"
).
length
-
1
];
this
.
download
(
item
,
title
);
}
,
download
(
src
,
fileName
)
{
let
x
=
new
XMLHttpRequest
();
x
.
open
(
"GET"
,
src
,
true
);
x
.
responseType
=
'blob'
;
x
.
onload
=
function
(
e
)
{
let
url
=
window
.
URL
.
createObjectURL
(
x
.
response
)
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
a
.
download
=
fileName
a
.
click
()
}
x
.
send
();
}
,
}
}
;
<
/script
>
zh-baseversion-web/src/views/majorpollsourcelevel/record/index.vue
View file @
c0404b0f
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"监管码"
prop=
"supervisionCode"
>
<el-input
v-model=
"queryParams.supervisionCode"
placeholder=
"请输入监管码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"fName"
>
<el-input
v-model=
"queryParams.fName"
...
...
@@ -70,6 +79,7 @@
<el-table
v-loading=
"loading"
:data=
"recordList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"监管码"
align=
"center"
prop=
"supervisionCode"
/>
<el-table-column
label=
"名称"
align=
"center"
prop=
"fName"
/>
<el-table-column
label=
"责任人"
align=
"center"
prop=
"fResPer"
/>
<el-table-column
label=
"电话"
align=
"center"
prop=
"fPhone"
/>
...
...
@@ -91,6 +101,18 @@
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-document"
@
click=
"handleSupervisionRecord(scope.row)"
>
监督检查记录
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-warning-outline"
@
click=
"handleHazardRectification(scope.row)"
>
隐患及整改
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -108,19 +130,24 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"1
1
"
>
<el-col
:span=
"1
2
"
>
<el-form-item
label=
"名称"
prop=
"fName"
>
<el-input
v-model=
"form.fName"
placeholder=
"请输入名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"1
2
"
>
<el-form-item
label=
"
责任人"
prop=
"fResPer
"
>
<el-input
v-model=
"form.
fResPer"
placeholder=
"请输入责任人
"
/>
<el-col
:span=
"1
1
"
>
<el-form-item
label=
"
监管码"
prop=
"supervisionCode
"
>
<el-input
v-model=
"form.
supervisionCode"
placeholder=
"请输入监管码
"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"责任人"
prop=
"fResPer"
>
<el-input
v-model=
"form.fResPer"
placeholder=
"请输入责任人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"电话"
prop=
"fPhone"
>
<el-input
v-model=
"form.fPhone"
onkeyup=
"this.value=this.value.replace(/\D/g,'')"
placeholder=
"请输入电话"
/>
...
...
@@ -191,6 +218,34 @@
@
close=
"dialogcancelFun"
@
getPath=
"getPath"
/>
<!-- 监督检查记录对话框 -->
<el-dialog
:title=
"'监督检查记录'"
:visible
.
sync=
"supervisionDialogVisible"
width=
"70%"
append-to-body
@
close=
"closeSupervisionDialog"
>
<sup-major-hazard
ref=
"supMajorHazardRef"
:f-hazard-id=
"currentFHazardId"
/>
</el-dialog>
<!-- 隐患及整改对话框 -->
<el-dialog
:title=
"'隐患及整改'"
:visible
.
sync=
"hazardDialogVisible"
width=
"70%"
append-to-body
@
close=
"closeHazardDialog"
>
<dangers-rectifications
ref=
"dangersRectificationsRef"
:f-hazard-id=
"currentFHazardId"
/>
</el-dialog>
</div>
</template>
...
...
@@ -200,11 +255,16 @@ import GetPos from '@/components/GetPos';
import
Editor
from
'@/components/Editor'
;
import
{
enterpriseLists
}
from
"@/api/regulation/info"
;
import
{
getInspectionUsers
}
from
"@/api/system/user"
;
import
SupMajorHazard
from
'../supMajorHazard/index.vue'
;
import
DangersRectifications
from
'../dangersRectifications/index.vue'
;
export
default
{
name
:
"Record"
,
components
:
{
GetPos
,
Editor
Editor
,
SupMajorHazard
,
DangersRectifications
},
data
()
{
return
{
...
...
@@ -240,6 +300,7 @@ export default {
pageSize
:
10
,
fName
:
null
,
fResPer
:
null
,
supervisionCode
:
null
,
},
// 表单参数
form
:
{},
...
...
@@ -255,7 +316,13 @@ export default {
/**--------------地图使用数据---------------*/
dialogTableVisibles
:
false
,
devicePos
:
[]
devicePos
:
[],
// 监督检查记录对话框
supervisionDialogVisible
:
false
,
// 隐患及整改对话框
hazardDialogVisible
:
false
,
// 当前选中的 fHazardId
currentFHazardId
:
null
,
};
},
created
()
{
...
...
@@ -443,6 +510,34 @@ export default {
});
},
/** 打开监督检查记录 */
handleSupervisionRecord
(
row
)
{
this
.
currentFHazardId
=
row
.
fHazardId
;
this
.
supervisionDialogVisible
=
true
;
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
.
supMajorHazardRef
)
{
this
.
$refs
.
supMajorHazardRef
.
initQuery
(
this
.
currentFHazardId
);
}
});
},
/** 打开隐患及整改 */
handleHazardRectification
(
row
)
{
this
.
currentFHazardId
=
row
.
fHazardId
;
this
.
hazardDialogVisible
=
true
;
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
.
dangersRectificationsRef
)
{
this
.
$refs
.
dangersRectificationsRef
.
initQuery
(
this
.
currentFHazardId
);
}
});
},
/** 关闭监督检查记录对话框 */
closeSupervisionDialog
()
{
this
.
currentFHazardId
=
null
;
},
/** 关闭隐患及整改对话框 */
closeHazardDialog
()
{
this
.
currentFHazardId
=
null
;
}
}
};
</
script
>
zh-baseversion-web/src/views/majorpollsourcelevel/supMajorHazard/index.vue
0 → 100644
View file @
c0404b0f
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<!--
<el-form-item
label=
"重大危险源监管表 id"
prop=
"fHazardId"
v-if=
"false"
>
<el-input
v-model=
"queryParams.fHazardId"
placeholder=
"请输入重大危险源监管表 id"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"检查日期"
prop=
"inspectionDate"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.inspectionDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择检查日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"检查单位名称"
prop=
"enterpriseName"
>
<el-input
v-model=
"queryParams.enterpriseName"
placeholder=
"请输入检查单位名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</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"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"inspectionList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检查日期"
align=
"center"
prop=
"inspectionDate"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
inspectionDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"检查单位名称"
align
=
"center"
prop
=
"enterpriseName"
/>
<
el
-
table
-
column
label
=
"发现问题"
align
=
"center"
prop
=
"identifyProblems"
/>
<
el
-
table
-
column
label
=
"整改要求"
align
=
"center"
prop
=
"rectificationRequirements"
/>
<
el
-
table
-
column
label
=
"复查结果"
align
=
"center"
prop
=
"reviewResults"
/>
<
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-edit"
@
click
=
"handleUpdate(scope.row)"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
>
删除
<
/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
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"检查日期"
prop
=
"inspectionDate"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.inspectionDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择检查日期"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"检查单位名称"
prop
=
"enterpriseName"
>
<
el
-
input
v
-
model
=
"form.enterpriseName"
placeholder
=
"请输入检查单位名称"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"发现问题"
prop
=
"identifyProblems"
>
<
el
-
input
v
-
model
=
"form.identifyProblems"
type
=
"textarea"
placeholder
=
"请输入发现问题"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"整改要求"
prop
=
"rectificationRequirements"
>
<
el
-
input
v
-
model
=
"form.rectificationRequirements"
type
=
"textarea"
placeholder
=
"请输入整改要求"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"复查结果"
prop
=
"reviewResults"
>
<
el
-
input
v
-
model
=
"form.reviewResults"
type
=
"textarea"
placeholder
=
"请输入复查结果"
/>
<
/el-form-item
>
<
/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
>
<
/div
>
<
/template
>
<
script
>
import
{
listInspection
,
getInspection
,
delInspection
,
addInspection
,
updateInspection
,
exportInspection
}
from
"@/api/majorpollsourcelevel/supMajorHazard"
;
export
default
{
name
:
"SupMajorHazard"
,
components
:
{
}
,
props
:
{
fHazardId
:
{
type
:
[
String
,
Number
],
default
:
null
}
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 监督检查记录表格数据
inspectionList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
fHazardId
:
null
,
inspectionDate
:
null
,
enterpriseId
:
null
,
enterpriseName
:
null
,
identifyProblems
:
null
,
rectificationRequirements
:
null
,
reviewResults
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
inspectionDate
:
[
{
required
:
true
,
message
:
"检查日期不能为空"
,
trigger
:
"blur"
}
],
enterpriseName
:
[
{
required
:
true
,
message
:
"检查单位名称不能为空"
,
trigger
:
"blur"
}
],
identifyProblems
:
[
{
required
:
true
,
message
:
"发现问题不能为空"
,
trigger
:
"blur"
}
],
rectificationRequirements
:
[
{
required
:
true
,
message
:
"整改要求不能为空"
,
trigger
:
"blur"
}
],
reviewResults
:
[
{
required
:
true
,
message
:
"复查结果不能为空"
,
trigger
:
"blur"
}
]
}
}
;
}
,
watch
:
{
fHazardId
:
{
handler
(
newVal
)
{
if
(
newVal
)
{
this
.
queryParams
.
fHazardId
=
newVal
;
}
}
,
immediate
:
true
}
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 初始化查询 - 从父组件传入 fHazardId */
initQuery
(
fHazardId
)
{
this
.
queryParams
.
fHazardId
=
fHazardId
;
this
.
handleQuery
();
}
,
/** 查询监督检查记录列表 */
getList
()
{
this
.
loading
=
true
;
listInspection
(
this
.
queryParams
).
then
(
response
=>
{
this
.
inspectionList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
fHazardId
:
null
,
inspectionDate
:
null
,
enterpriseId
:
null
,
enterpriseName
:
null
,
identifyProblems
:
null
,
rectificationRequirements
:
null
,
reviewResults
:
null
,
createTime
:
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
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加监督检查记录"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getInspection
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改监督检查记录"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form
.
fHazardId
=
this
.
queryParams
.
fHazardId
;
if
(
this
.
form
.
id
!=
null
)
{
updateInspection
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addInspection
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除监督检查记录编号为"'
+
ids
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delInspection
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有监督检查记录数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportInspection
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
}
;
<
/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