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
32050b4e
Commit
32050b4e
authored
May 18, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查项
parent
64e242fa
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2115 additions
and
16 deletions
+2115
-16
TInsInsListInforController.java
...eb/controller/supervision/TInsInsListInforController.java
+103
-0
TInsStaInforController.java
...ng/web/controller/supervision/TInsStaInforController.java
+6
-0
TInsInsListInfor.java
.../main/java/com/zehong/system/domain/TInsInsListInfor.java
+258
-0
TInsInsListInforMapper.java
...java/com/zehong/system/mapper/TInsInsListInforMapper.java
+61
-0
ITInsInsListInforService.java
...a/com/zehong/system/service/ITInsInsListInforService.java
+61
-0
TInsInsListInforServiceImpl.java
...hong/system/service/impl/TInsInsListInforServiceImpl.java
+125
-0
TInsTaskInforServiceImpl.java
.../zehong/system/service/impl/TInsTaskInforServiceImpl.java
+32
-6
TInsInsListInforMapper.xml
...c/main/resources/mapper/system/TInsInsListInforMapper.xml
+134
-0
hideType.js
zh-baseversion-web/src/api/supervision/hideType.js
+9
-0
inspect.js
zh-baseversion-web/src/api/supervision/inspect.js
+53
-0
DetailInfo.vue
.../src/views/supervision/hideType/components/DetailInfo.vue
+3
-1
index.vue
zh-baseversion-web/src/views/supervision/hideType/index.vue
+583
-0
DetailInfo.vue
...b/src/views/supervision/inspect/components/DetailInfo.vue
+148
-0
index.vue
zh-baseversion-web/src/views/supervision/inspect/index.vue
+491
-0
DetailInfo.vue
...web/src/views/supervision/scope/components/DetailInfo.vue
+3
-1
index.vue
zh-baseversion-web/src/views/supervision/scope/index.vue
+24
-4
DetailInfo.vue
...-web/src/views/supervision/task/components/DetailInfo.vue
+3
-1
index.vue
zh-baseversion-web/src/views/supervision/task/index.vue
+18
-3
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervision/TInsInsListInforController.java
0 → 100644
View file @
32050b4e
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.TInsInsListInfor
;
import
com.zehong.system.service.ITInsInsListInforService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 监督检查-获取检查项Controller
*
* @author zehong
* @date 2024-05-17
*/
@RestController
@RequestMapping
(
"/supervision/inspect"
)
public
class
TInsInsListInforController
extends
BaseController
{
@Autowired
private
ITInsInsListInforService
tInsInsListInforService
;
/**
* 查询监督检查-获取检查项列表
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:inspect:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TInsInsListInfor
tInsInsListInfor
)
{
startPage
();
List
<
TInsInsListInfor
>
list
=
tInsInsListInforService
.
selectTInsInsListInforList
(
tInsInsListInfor
);
return
getDataTable
(
list
);
}
/**
* 导出监督检查-获取检查项列表
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:inspect:export')"
)
@Log
(
title
=
"监督检查-获取检查项"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TInsInsListInfor
tInsInsListInfor
)
{
List
<
TInsInsListInfor
>
list
=
tInsInsListInforService
.
selectTInsInsListInforList
(
tInsInsListInfor
);
ExcelUtil
<
TInsInsListInfor
>
util
=
new
ExcelUtil
<
TInsInsListInfor
>(
TInsInsListInfor
.
class
);
return
util
.
exportExcel
(
list
,
"监督检查-获取检查项数据"
);
}
/**
* 获取监督检查-获取检查项详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:inspect:query')"
)
@GetMapping
(
value
=
"/{fInsInsListInforId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"fInsInsListInforId"
)
Long
fInsInsListInforId
)
{
return
AjaxResult
.
success
(
tInsInsListInforService
.
selectTInsInsListInforById
(
fInsInsListInforId
));
}
/**
* 新增监督检查-获取检查项
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:inspect:add')"
)
@Log
(
title
=
"监督检查-获取检查项"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TInsInsListInfor
tInsInsListInfor
)
{
return
toAjax
(
tInsInsListInforService
.
insertTInsInsListInfor
(
tInsInsListInfor
));
}
/**
* 修改监督检查-获取检查项
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:inspect:edit')"
)
@Log
(
title
=
"监督检查-获取检查项"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TInsInsListInfor
tInsInsListInfor
)
{
return
toAjax
(
tInsInsListInforService
.
updateTInsInsListInfor
(
tInsInsListInfor
));
}
/**
* 删除监督检查-获取检查项
*/
@PreAuthorize
(
"@ss.hasPermi('supervision:inspect:remove')"
)
@Log
(
title
=
"监督检查-获取检查项"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{fInsInsListInforIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
fInsInsListInforIds
)
{
return
toAjax
(
tInsInsListInforService
.
deleteTInsInsListInforByIds
(
fInsInsListInforIds
));
}
}
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervision/TInsStaInforController.java
View file @
32050b4e
...
@@ -45,6 +45,12 @@ public class TInsStaInforController extends BaseController
...
@@ -45,6 +45,12 @@ public class TInsStaInforController extends BaseController
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
@GetMapping
(
"/hiddenList"
)
public
AjaxResult
hiddenList
(
TInsStaInfor
tInsStaInfor
){
List
<
TInsStaInfor
>
list
=
tInsStaInforService
.
selectTInsStaInforList
(
tInsStaInfor
);
return
AjaxResult
.
success
(
list
);
}
/**
/**
* 导出监督检查-隐患分类分级标准列表
* 导出监督检查-隐患分类分级标准列表
*/
*/
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TInsInsListInfor.java
0 → 100644
View file @
32050b4e
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_ins_list_infor
*
* @author zehong
* @date 2024-05-17
*/
public
class
TInsInsListInfor
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id */
private
Long
fInsInsListInforId
;
/** 检查项任务编码 */
@Excel
(
name
=
"检查项任务编码"
)
private
String
fCheckTaskCode
;
/** j检查项唯一编码 */
@Excel
(
name
=
"j检查项唯一编码"
)
private
String
fUniqueCode
;
/** 检查项名称 */
@Excel
(
name
=
"检查项名称"
)
private
String
fCheckTimeName
;
/** 检查对象分类 */
@Excel
(
name
=
"检查对象分类"
)
private
String
fCheckClassification
;
/** 检查方法 */
@Excel
(
name
=
"检查方法"
)
private
String
fCheckMethod
;
/** 检查内容 */
@Excel
(
name
=
"检查内容"
)
private
String
fCheckCount
;
/** 隐患级别 */
@Excel
(
name
=
"隐患级别"
)
private
String
fHazardLevel
;
/** 启用状态,0-启用,1-禁用 */
@Excel
(
name
=
"启用状态"
,
dictType
=
"t_enable_state"
)
private
Long
fEnableState
;
/** 检查依据 */
@Excel
(
name
=
"检查依据"
)
private
String
fCheckBasis
;
/** 隐患分类分级标准id */
private
Long
fHazardTypeLevelId
;
@Excel
(
name
=
"隐患分类分级标准"
)
private
String
hazardName
;
/** 系统默认 createBy */
@Excel
(
name
=
"创建人"
)
private
String
fCreateBy
;
/** 系统默认 createTime */
@Excel
(
name
=
"创建时间"
)
private
String
fCreateTime
;
/** 系统默认 updateBy */
@Excel
(
name
=
"更新人"
)
private
String
fUpdateBy
;
/** 系统默认updateTime */
@Excel
(
name
=
"更新时间"
)
private
String
fUpdateTime
;
/** 删除标记,0-可用,1-已删除 */
@Excel
(
name
=
"删除标记"
,
dictType
=
"t_delete_flag"
)
private
Long
fDeleteFlag
;
public
void
setfInsInsListInforId
(
Long
fInsInsListInforId
)
{
this
.
fInsInsListInforId
=
fInsInsListInforId
;
}
public
Long
getfInsInsListInforId
()
{
return
fInsInsListInforId
;
}
public
void
setfCheckTaskCode
(
String
fCheckTaskCode
)
{
this
.
fCheckTaskCode
=
fCheckTaskCode
;
}
public
String
getfCheckTaskCode
()
{
return
fCheckTaskCode
;
}
public
void
setfUniqueCode
(
String
fUniqueCode
)
{
this
.
fUniqueCode
=
fUniqueCode
;
}
public
String
getfUniqueCode
()
{
return
fUniqueCode
;
}
public
void
setfCheckTimeName
(
String
fCheckTimeName
)
{
this
.
fCheckTimeName
=
fCheckTimeName
;
}
public
String
getfCheckTimeName
()
{
return
fCheckTimeName
;
}
public
void
setfCheckClassification
(
String
fCheckClassification
)
{
this
.
fCheckClassification
=
fCheckClassification
;
}
public
String
getfCheckClassification
()
{
return
fCheckClassification
;
}
public
void
setfCheckMethod
(
String
fCheckMethod
)
{
this
.
fCheckMethod
=
fCheckMethod
;
}
public
String
getfCheckMethod
()
{
return
fCheckMethod
;
}
public
void
setfCheckCount
(
String
fCheckCount
)
{
this
.
fCheckCount
=
fCheckCount
;
}
public
String
getfCheckCount
()
{
return
fCheckCount
;
}
public
void
setfHazardLevel
(
String
fHazardLevel
)
{
this
.
fHazardLevel
=
fHazardLevel
;
}
public
String
getfHazardLevel
()
{
return
fHazardLevel
;
}
public
void
setfEnableState
(
Long
fEnableState
)
{
this
.
fEnableState
=
fEnableState
;
}
public
Long
getfEnableState
()
{
return
fEnableState
;
}
public
void
setfCheckBasis
(
String
fCheckBasis
)
{
this
.
fCheckBasis
=
fCheckBasis
;
}
public
String
getfCheckBasis
()
{
return
fCheckBasis
;
}
public
void
setfHazardTypeLevelId
(
Long
fHazardTypeLevelId
)
{
this
.
fHazardTypeLevelId
=
fHazardTypeLevelId
;
}
public
Long
getfHazardTypeLevelId
()
{
return
fHazardTypeLevelId
;
}
public
String
getHazardName
()
{
return
hazardName
;
}
public
void
setHazardName
(
String
hazardName
)
{
this
.
hazardName
=
hazardName
;
}
public
void
setfCreateBy
(
String
fCreateBy
)
{
this
.
fCreateBy
=
fCreateBy
;
}
public
String
getfCreateBy
()
{
return
fCreateBy
;
}
public
void
setfCreateTime
(
String
fCreateTime
)
{
this
.
fCreateTime
=
fCreateTime
;
}
public
String
getfCreateTime
()
{
return
fCreateTime
;
}
public
void
setfUpdateBy
(
String
fUpdateBy
)
{
this
.
fUpdateBy
=
fUpdateBy
;
}
public
String
getfUpdateBy
()
{
return
fUpdateBy
;
}
public
void
setfUpdateTime
(
String
fUpdateTime
)
{
this
.
fUpdateTime
=
fUpdateTime
;
}
public
String
getfUpdateTime
()
{
return
fUpdateTime
;
}
public
void
setfDeleteFlag
(
Long
fDeleteFlag
)
{
this
.
fDeleteFlag
=
fDeleteFlag
;
}
public
Long
getfDeleteFlag
()
{
return
fDeleteFlag
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"fInsInsListInforId"
,
getfInsInsListInforId
())
.
append
(
"fCheckTaskCode"
,
getfCheckTaskCode
())
.
append
(
"fUniqueCode"
,
getfUniqueCode
())
.
append
(
"fCheckTimeName"
,
getfCheckTimeName
())
.
append
(
"fCheckClassification"
,
getfCheckClassification
())
.
append
(
"fCheckMethod"
,
getfCheckMethod
())
.
append
(
"fCheckCount"
,
getfCheckCount
())
.
append
(
"fHazardLevel"
,
getfHazardLevel
())
.
append
(
"fEnableState"
,
getfEnableState
())
.
append
(
"fCheckBasis"
,
getfCheckBasis
())
.
append
(
"fHazardTypeLevelId"
,
getfHazardTypeLevelId
())
.
append
(
"fCreateBy"
,
getfCreateBy
())
.
append
(
"fCreateTime"
,
getfCreateTime
())
.
append
(
"fUpdateBy"
,
getfUpdateBy
())
.
append
(
"fUpdateTime"
,
getfUpdateTime
())
.
append
(
"fDeleteFlag"
,
getfDeleteFlag
())
.
toString
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TInsInsListInforMapper.java
0 → 100644
View file @
32050b4e
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TInsInsListInfor
;
/**
* 监督检查-获取检查项Mapper接口
*
* @author zehong
* @date 2024-05-17
*/
public
interface
TInsInsListInforMapper
{
/**
* 查询监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 监督检查-获取检查项
*/
public
TInsInsListInfor
selectTInsInsListInforById
(
Long
fInsInsListInforId
);
/**
* 查询监督检查-获取检查项列表
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 监督检查-获取检查项集合
*/
public
List
<
TInsInsListInfor
>
selectTInsInsListInforList
(
TInsInsListInfor
tInsInsListInfor
);
/**
* 新增监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public
int
insertTInsInsListInfor
(
TInsInsListInfor
tInsInsListInfor
);
/**
* 修改监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public
int
updateTInsInsListInfor
(
TInsInsListInfor
tInsInsListInfor
);
/**
* 删除监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 结果
*/
public
int
deleteTInsInsListInforById
(
Long
fInsInsListInforId
);
/**
* 批量删除监督检查-获取检查项
*
* @param fInsInsListInforIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTInsInsListInforByIds
(
Long
[]
fInsInsListInforIds
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITInsInsListInforService.java
0 → 100644
View file @
32050b4e
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TInsInsListInfor
;
/**
* 监督检查-获取检查项Service接口
*
* @author zehong
* @date 2024-05-17
*/
public
interface
ITInsInsListInforService
{
/**
* 查询监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 监督检查-获取检查项
*/
public
TInsInsListInfor
selectTInsInsListInforById
(
Long
fInsInsListInforId
);
/**
* 查询监督检查-获取检查项列表
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 监督检查-获取检查项集合
*/
public
List
<
TInsInsListInfor
>
selectTInsInsListInforList
(
TInsInsListInfor
tInsInsListInfor
);
/**
* 新增监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public
int
insertTInsInsListInfor
(
TInsInsListInfor
tInsInsListInfor
);
/**
* 修改监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public
int
updateTInsInsListInfor
(
TInsInsListInfor
tInsInsListInfor
);
/**
* 批量删除监督检查-获取检查项
*
* @param fInsInsListInforIds 需要删除的监督检查-获取检查项ID
* @return 结果
*/
public
int
deleteTInsInsListInforByIds
(
Long
[]
fInsInsListInforIds
);
/**
* 删除监督检查-获取检查项信息
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 结果
*/
public
int
deleteTInsInsListInforById
(
Long
fInsInsListInforId
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TInsInsListInforServiceImpl.java
0 → 100644
View file @
32050b4e
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.SecurityUtils
;
import
com.zehong.common.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TInsInsListInforMapper
;
import
com.zehong.system.domain.TInsInsListInfor
;
import
com.zehong.system.service.ITInsInsListInforService
;
/**
* 监督检查-获取检查项Service业务层处理
*
* @author zehong
* @date 2024-05-17
*/
@Service
public
class
TInsInsListInforServiceImpl
implements
ITInsInsListInforService
{
@Autowired
private
TInsInsListInforMapper
tInsInsListInforMapper
;
/**
* 查询监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 监督检查-获取检查项
*/
@Override
public
TInsInsListInfor
selectTInsInsListInforById
(
Long
fInsInsListInforId
)
{
return
tInsInsListInforMapper
.
selectTInsInsListInforById
(
fInsInsListInforId
);
}
/**
* 查询监督检查-获取检查项列表
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 监督检查-获取检查项
*/
@Override
public
List
<
TInsInsListInfor
>
selectTInsInsListInforList
(
TInsInsListInfor
tInsInsListInfor
)
{
return
tInsInsListInforMapper
.
selectTInsInsListInforList
(
tInsInsListInfor
);
}
/**
* 新增监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
@Override
public
int
insertTInsInsListInfor
(
TInsInsListInfor
tInsInsListInfor
){
try
{
tInsInsListInfor
.
setfCreateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsInsListInfor
.
setfCreateBy
(
SecurityUtils
.
getUsername
());
return
tInsInsListInforMapper
.
insertTInsInsListInfor
(
tInsInsListInfor
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_unique_code"
)){
throw
new
CustomException
(
"检查项唯一编码不唯一"
);
}
}
return
0
;
}
}
/**
* 修改监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
@Override
public
int
updateTInsInsListInfor
(
TInsInsListInfor
tInsInsListInfor
)
{
try
{
tInsInsListInfor
.
setfUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsInsListInfor
.
setfUpdateBy
(
SecurityUtils
.
getUsername
());
return
tInsInsListInforMapper
.
updateTInsInsListInfor
(
tInsInsListInfor
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_unique_code"
)){
throw
new
CustomException
(
"检查项唯一编码不唯一"
);
}
}
return
0
;
}
}
/**
* 批量删除监督检查-获取检查项
*
* @param fInsInsListInforIds 需要删除的监督检查-获取检查项ID
* @return 结果
*/
@Override
public
int
deleteTInsInsListInforByIds
(
Long
[]
fInsInsListInforIds
)
{
return
tInsInsListInforMapper
.
deleteTInsInsListInforByIds
(
fInsInsListInforIds
);
}
/**
* 删除监督检查-获取检查项信息
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 结果
*/
@Override
public
int
deleteTInsInsListInforById
(
Long
fInsInsListInforId
)
{
return
tInsInsListInforMapper
.
deleteTInsInsListInforById
(
fInsInsListInforId
);
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TInsTaskInforServiceImpl.java
View file @
32050b4e
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.sql.SQLIntegrityConstraintViolationException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.exception.CustomException
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.common.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TInsTaskInforMapper
;
import
com.zehong.system.mapper.TInsTaskInforMapper
;
...
@@ -56,9 +59,21 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService
...
@@ -56,9 +59,21 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService
@Override
@Override
public
int
insertTInsTaskInfor
(
TInsTaskInfor
tInsTaskInfor
)
public
int
insertTInsTaskInfor
(
TInsTaskInfor
tInsTaskInfor
)
{
{
try
{
tInsTaskInfor
.
setfCreateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsTaskInfor
.
setfCreateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsTaskInfor
.
setfCreateBy
(
SecurityUtils
.
getUsername
());
tInsTaskInfor
.
setfCreateBy
(
SecurityUtils
.
getUsername
());
return
tInsTaskInforMapper
.
insertTInsTaskInfor
(
tInsTaskInfor
);
return
tInsTaskInforMapper
.
insertTInsTaskInfor
(
tInsTaskInfor
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_unique_code"
)){
throw
new
CustomException
(
"任务唯一编码不唯一"
);
}
}
return
0
;
}
}
}
/**
/**
...
@@ -70,9 +85,20 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService
...
@@ -70,9 +85,20 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService
@Override
@Override
public
int
updateTInsTaskInfor
(
TInsTaskInfor
tInsTaskInfor
)
public
int
updateTInsTaskInfor
(
TInsTaskInfor
tInsTaskInfor
)
{
{
try
{
tInsTaskInfor
.
setfUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsTaskInfor
.
setfUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsTaskInfor
.
setfModifyBy
(
SecurityUtils
.
getUsername
());
tInsTaskInfor
.
setfModifyBy
(
SecurityUtils
.
getUsername
());
return
tInsTaskInforMapper
.
updateTInsTaskInfor
(
tInsTaskInfor
);
return
tInsTaskInforMapper
.
updateTInsTaskInfor
(
tInsTaskInfor
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_unique_code"
)){
throw
new
CustomException
(
"任务唯一编码不唯一"
);
}
}
return
0
;
}
}
}
/**
/**
...
...
zh-baseversion-system/src/main/resources/mapper/system/TInsInsListInforMapper.xml
0 → 100644
View file @
32050b4e
<?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.TInsInsListInforMapper"
>
<resultMap
type=
"TInsInsListInfor"
id=
"TInsInsListInforResult"
>
<result
property=
"fInsInsListInforId"
column=
"f_ins_ins_list_infor_id"
/>
<result
property=
"fCheckTaskCode"
column=
"f_check_task_code"
/>
<result
property=
"fUniqueCode"
column=
"f_unique_code"
/>
<result
property=
"fCheckTimeName"
column=
"f_check_time_name"
/>
<result
property=
"fCheckClassification"
column=
"f_check_classification"
/>
<result
property=
"fCheckMethod"
column=
"f_check_method"
/>
<result
property=
"fCheckCount"
column=
"f_check_count"
/>
<result
property=
"fHazardLevel"
column=
"f_hazard_level"
/>
<result
property=
"fEnableState"
column=
"f_enable_state"
/>
<result
property=
"fCheckBasis"
column=
"f_check_basis"
/>
<result
property=
"fHazardTypeLevelId"
column=
"f_hazard_type_level_id"
/>
<result
property=
"fCreateBy"
column=
"f_create_by"
/>
<result
property=
"fCreateTime"
column=
"f_create_time"
/>
<result
property=
"fUpdateBy"
column=
"f_update_by"
/>
<result
property=
"fUpdateTime"
column=
"f_update_time"
/>
<result
property=
"fDeleteFlag"
column=
"f_delete_flag"
/>
</resultMap>
<sql
id=
"selectTInsInsListInforVo"
>
SELECT
inspect.f_ins_ins_list_infor_id,
inspect.f_check_task_code,
inspect.f_unique_code,
inspect.f_check_time_name,
inspect.f_check_classification,
inspect.f_check_method,
inspect.f_check_count,
inspect.f_hazard_level,
inspect.f_enable_state,
inspect.f_check_basis,
inspect.f_hazard_type_level_id,
inspect.f_create_by,
inspect.f_create_time,
inspect.f_update_by,
inspect.f_update_time,
inspect.f_delete_flag,
hidden.f_hazard_name AS hazardName
FROM
t_ins_ins_list_infor inspect
LEFT JOIN t_ins_task_infor task ON task.f_unique_code = inspect.f_check_task_code
LEFT JOIN t_ins_sta_infor hidden ON hidden.f_ins_sta_infor_id = inspect.f_hazard_type_level_id
</sql>
<select
id=
"selectTInsInsListInforList"
parameterType=
"TInsInsListInfor"
resultMap=
"TInsInsListInforResult"
>
<include
refid=
"selectTInsInsListInforVo"
/>
<where>
<if
test=
"fCheckTimeName != null and fCheckTimeName != ''"
>
and inspect.f_check_time_name like concat('%', #{fCheckTimeName}, '%')
</if>
</where>
ORDER BY inspect.f_create_time DESC
</select>
<select
id=
"selectTInsInsListInforById"
parameterType=
"Long"
resultMap=
"TInsInsListInforResult"
>
<include
refid=
"selectTInsInsListInforVo"
/>
where inspect.f_ins_ins_list_infor_id = #{fInsInsListInforId}
</select>
<insert
id=
"insertTInsInsListInfor"
parameterType=
"TInsInsListInfor"
useGeneratedKeys=
"true"
keyProperty=
"fInsInsListInforId"
>
insert into t_ins_ins_list_infor
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fCheckTaskCode != null"
>
f_check_task_code,
</if>
<if
test=
"fUniqueCode != null"
>
f_unique_code,
</if>
<if
test=
"fCheckTimeName != null"
>
f_check_time_name,
</if>
<if
test=
"fCheckClassification != null"
>
f_check_classification,
</if>
<if
test=
"fCheckMethod != null"
>
f_check_method,
</if>
<if
test=
"fCheckCount != null"
>
f_check_count,
</if>
<if
test=
"fHazardLevel != null"
>
f_hazard_level,
</if>
<if
test=
"fEnableState != null"
>
f_enable_state,
</if>
<if
test=
"fCheckBasis != null"
>
f_check_basis,
</if>
<if
test=
"fHazardTypeLevelId != null"
>
f_hazard_type_level_id,
</if>
<if
test=
"fCreateBy != null"
>
f_create_by,
</if>
<if
test=
"fCreateTime != null"
>
f_create_time,
</if>
<if
test=
"fUpdateBy != null"
>
f_update_by,
</if>
<if
test=
"fUpdateTime != null"
>
f_update_time,
</if>
<if
test=
"fDeleteFlag != null"
>
f_delete_flag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fCheckTaskCode != null"
>
#{fCheckTaskCode},
</if>
<if
test=
"fUniqueCode != null"
>
#{fUniqueCode},
</if>
<if
test=
"fCheckTimeName != null"
>
#{fCheckTimeName},
</if>
<if
test=
"fCheckClassification != null"
>
#{fCheckClassification},
</if>
<if
test=
"fCheckMethod != null"
>
#{fCheckMethod},
</if>
<if
test=
"fCheckCount != null"
>
#{fCheckCount},
</if>
<if
test=
"fHazardLevel != null"
>
#{fHazardLevel},
</if>
<if
test=
"fEnableState != null"
>
#{fEnableState},
</if>
<if
test=
"fCheckBasis != null"
>
#{fCheckBasis},
</if>
<if
test=
"fHazardTypeLevelId != null"
>
#{fHazardTypeLevelId},
</if>
<if
test=
"fCreateBy != null"
>
#{fCreateBy},
</if>
<if
test=
"fCreateTime != null"
>
#{fCreateTime},
</if>
<if
test=
"fUpdateBy != null"
>
#{fUpdateBy},
</if>
<if
test=
"fUpdateTime != null"
>
#{fUpdateTime},
</if>
<if
test=
"fDeleteFlag != null"
>
#{fDeleteFlag},
</if>
</trim>
</insert>
<update
id=
"updateTInsInsListInfor"
parameterType=
"TInsInsListInfor"
>
update t_ins_ins_list_infor
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fCheckTaskCode != null"
>
f_check_task_code = #{fCheckTaskCode},
</if>
<if
test=
"fUniqueCode != null"
>
f_unique_code = #{fUniqueCode},
</if>
<if
test=
"fCheckTimeName != null"
>
f_check_time_name = #{fCheckTimeName},
</if>
<if
test=
"fCheckClassification != null"
>
f_check_classification = #{fCheckClassification},
</if>
<if
test=
"fCheckMethod != null"
>
f_check_method = #{fCheckMethod},
</if>
<if
test=
"fCheckCount != null"
>
f_check_count = #{fCheckCount},
</if>
<if
test=
"fHazardLevel != null"
>
f_hazard_level = #{fHazardLevel},
</if>
<if
test=
"fEnableState != null"
>
f_enable_state = #{fEnableState},
</if>
<if
test=
"fCheckBasis != null"
>
f_check_basis = #{fCheckBasis},
</if>
<if
test=
"fHazardTypeLevelId != null"
>
f_hazard_type_level_id = #{fHazardTypeLevelId},
</if>
<if
test=
"fCreateBy != null"
>
f_create_by = #{fCreateBy},
</if>
<if
test=
"fCreateTime != null"
>
f_create_time = #{fCreateTime},
</if>
<if
test=
"fUpdateBy != null"
>
f_update_by = #{fUpdateBy},
</if>
<if
test=
"fUpdateTime != null"
>
f_update_time = #{fUpdateTime},
</if>
<if
test=
"fDeleteFlag != null"
>
f_delete_flag = #{fDeleteFlag},
</if>
</trim>
where f_ins_ins_list_infor_id = #{fInsInsListInforId}
</update>
<delete
id=
"deleteTInsInsListInforById"
parameterType=
"Long"
>
delete from t_ins_ins_list_infor where f_ins_ins_list_infor_id = #{fInsInsListInforId}
</delete>
<delete
id=
"deleteTInsInsListInforByIds"
parameterType=
"String"
>
delete from t_ins_ins_list_infor where f_ins_ins_list_infor_id in
<foreach
item=
"fInsInsListInforId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{fInsInsListInforId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
zh-baseversion-web/src/api/supervision/hideType.js
View file @
32050b4e
...
@@ -51,3 +51,12 @@ export function exportInfor(query) {
...
@@ -51,3 +51,12 @@ export function exportInfor(query) {
params
:
query
params
:
query
})
})
}
}
//所有隐患分类
export
function
hiddenList
(
query
)
{
return
request
({
url
:
'/supervision/hideType/hiddenList'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/api/supervision/inspect.js
0 → 100644
View file @
32050b4e
import
request
from
'@/utils/request'
// 查询监督检查-获取检查项列表
export
function
listInfor
(
query
)
{
return
request
({
url
:
'/supervision/inspect/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询监督检查-获取检查项详细
export
function
getInfor
(
fInsInsListInforId
)
{
return
request
({
url
:
'/supervision/inspect/'
+
fInsInsListInforId
,
method
:
'get'
})
}
// 新增监督检查-获取检查项
export
function
addInfor
(
data
)
{
return
request
({
url
:
'/supervision/inspect'
,
method
:
'post'
,
data
:
data
})
}
// 修改监督检查-获取检查项
export
function
updateInfor
(
data
)
{
return
request
({
url
:
'/supervision/inspect'
,
method
:
'put'
,
data
:
data
})
}
// 删除监督检查-获取检查项
export
function
delInfor
(
fInsInsListInforId
)
{
return
request
({
url
:
'/supervision/inspect/'
+
fInsInsListInforId
,
method
:
'delete'
})
}
// 导出监督检查-获取检查项
export
function
exportInfor
(
query
)
{
return
request
({
url
:
'/supervision/inspect/export'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/views/supervision/hideType/components/DetailInfo.vue
View file @
32050b4e
...
@@ -212,7 +212,9 @@
...
@@ -212,7 +212,9 @@
name
:
"detail-info"
,
name
:
"detail-info"
,
data
(){
data
(){
return
{
return
{
detailInfo
:
{},
detailInfo
:
{
fDeleteFlag
:
0
},
detailOpen
:
false
detailOpen
:
false
}
}
},
},
...
...
zh-baseversion-web/src/views/supervision/hideType/index.vue
0 → 100644
View file @
32050b4e
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"隐患名称"
prop=
"fHazardName"
>
<el-input
v-model=
"queryParams.fHazardName"
placeholder=
"请输入隐患名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"隐患编码"
prop=
"fHazardCode"
>
<el-input
v-model=
"queryParams.fHazardCode"
placeholder=
"请输入隐患编码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"隐患类别"
prop=
"fHazardCategory"
>
<el-select
v-model=
"queryParams.fHazardCategory"
placeholder=
"请选择隐患类别"
clearable
size=
"small"
>
<el-option
v-for=
"dict in fHazardCategoryOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<!--
<el-form-item
label=
"隐患等级"
prop=
"fHazardLevel"
>
<el-input
v-model=
"queryParams.fHazardLevel"
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"
v-hasPermi=
"['supervision:hideType: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:hideType: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:hideType: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:hideType:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"inforList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"隐患名称"
align=
"center"
prop=
"fHazardName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"隐患编码"
align=
"center"
prop=
"fHazardCode"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"隐患描述"
align=
"center"
prop=
"fHazardDescribe"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardDescribe"
>
{{
scope
.
row
.
fHazardDescribe
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"对象分类"
align=
"center"
prop=
"fObjectType"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fObjectType"
>
{{
scope
.
row
.
fObjectType
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患类别"
align=
"center"
prop=
"fHazardCategory"
:formatter=
"fHazardCategoryFormat"
/>
<el-table-column
label=
"隐患环节/部位"
align=
"center"
prop=
"fHazardLink"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardLink"
>
{{
scope
.
row
.
fHazardLink
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患等级"
align=
"center"
prop=
"fHazardLevel"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardLevel"
>
{{
scope
.
row
.
fHazardLevel
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患定义来源"
align=
"center"
prop=
"fHazardDefinitionSourceCode"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardDefinitionSourceCode"
>
{{
scope
.
row
.
fHazardDefinitionSourceCode
}}
</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-document"
@
click=
"handleDetail(scope.row)"
v-hasPermi=
"['supervision:hideType:query']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['supervision:hideType:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['supervision:hideType: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=
"120px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患名称"
prop=
"fHazardName"
>
<el-input
v-model=
"form.fHazardName"
placeholder=
"请输入隐患名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患编码"
prop=
"fHazardCode"
>
<el-input
v-model=
"form.fHazardCode"
placeholder=
"请输入隐患编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"隐患描述"
prop=
"fHazardDescribe"
>
<el-input
type=
"textarea"
v-model=
"form.fHazardDescribe"
placeholder=
"请输入隐患描述"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"对象分类"
prop=
"fObjectType"
>
<el-input
v-model=
"form.fObjectType"
placeholder=
"请输入对象分类"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患类别"
prop=
"fHazardCategory"
>
<el-select
v-model=
"form.fHazardCategory"
placeholder=
"请选择隐患类别"
style=
"width: 100%"
>
<el-option
v-for=
"dict in fHazardCategoryOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患环节/部位"
prop=
"fHazardLink"
>
<el-input
v-model=
"form.fHazardLink"
placeholder=
"请输入隐患环节/部位"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患等级"
prop=
"fHazardLevel"
>
<el-input
v-model=
"form.fHazardLevel"
placeholder=
"请输入隐患等级"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患定义来源"
prop=
"fHazardDefinitionSourceCode"
>
<el-input
v-model=
"form.fHazardDefinitionSourceCode"
placeholder=
"请输入隐患定义来源"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改责任归属"
prop=
"fOwnerResponse"
>
<el-input
v-model=
"form.fOwnerResponse"
placeholder=
"请输入整改责任归属"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"主管部门关联"
prop=
"fAdministrativeSysOrganizationId"
>
<el-input
v-model=
"form.fAdministrativeSysOrganizationId"
placeholder=
"请输入主管部门关联"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"主管部门名称"
prop=
"fAdministrativeDepartmentName"
>
<el-input
v-model=
"form.fAdministrativeDepartmentName"
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
v-for=
"dict in fIsEnforcementOptions"
: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=
"执法部门id"
prop=
"fEnforcementSysOrganizationId"
>
<el-input
v-model=
"form.fEnforcementSysOrganizationId"
placeholder=
"请输入执法部门id"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"执法部门名称"
prop=
"fEnforcementDepartmentName"
>
<el-input
v-model=
"form.fEnforcementDepartmentName"
placeholder=
"请输入执法部门名称冗余"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改监督部门"
prop=
"fSupervisionSysOrganizationId"
>
<el-input
v-model=
"form.fSupervisionSysOrganizationId"
placeholder=
"请输入整改监督部门"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改部门名称"
prop=
"fSupervisionDepartmentName"
>
<el-input
v-model=
"form.fSupervisionDepartmentName"
placeholder=
"请输入整改部门名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改要求"
prop=
"fRectRequire"
>
<el-input
v-model=
"form.fRectRequire"
placeholder=
"请输入整改要求"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改期限"
prop=
"fRectDeadline"
>
<el-input
v-model=
"form.fRectDeadline"
placeholder=
"请输入整改期限"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患排查依据"
prop=
"fHazardCheckBasis"
>
<el-input
v-model=
"form.fHazardCheckBasis"
placeholder=
"请输入隐患排查依据"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查项ID"
prop=
"fCheckItemId"
>
<el-input
v-model=
"form.fCheckItemId"
placeholder=
"请输入检查项ID"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查部门"
prop=
"fCheckDept"
>
<el-input
v-model=
"form.fCheckDept"
placeholder=
"请输入检查部门"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查方法"
prop=
"fCheckMethod"
>
<el-input
v-model=
"form.fCheckMethod"
placeholder=
"请输入检查方法"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"执法参考依据"
prop=
"fEnforcementAccording"
>
<el-input
v-model=
"form.fEnforcementAccording"
placeholder=
"请输入执法参考依据"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"删除标记"
prop=
"fDeleteFlag"
>
<el-select
v-model=
"form.fDeleteFlag"
placeholder=
"请选择删除标记"
style=
"width: 100%"
>
<el-option
v-for=
"dict in fDeleteFlagOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
</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
{
listInfor
,
getInfor
,
delInfor
,
addInfor
,
updateInfor
,
exportInfor
}
from
"@/api/supervision/hideType"
;
import
DetailInfo
from
"./components/DetailInfo"
;
export
default
{
name
:
"Infor"
,
components
:
{
DetailInfo
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
fHazardNames
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 隐患分类分级标准表格数据
inforList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 隐患类别
fHazardCategoryOptions
:
[],
// 是否强制执法,Y-是,N-否字典
fIsEnforcementOptions
:
[],
// 删除标记0-可用,1-已删除字典
fDeleteFlagOptions
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
fHazardName
:
null
,
fHazardCode
:
null
,
fHazardCategory
:
null
,
fHazardLevel
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
fHazardName
:
[
{
required
:
true
,
message
:
"隐患名称不能为空"
,
trigger
:
"blur"
}
],
fHazardCode
:
[
{
required
:
true
,
message
:
"隐患编码不能为空"
,
trigger
:
"blur"
}
],
fHazardCategory
:
[
{
required
:
true
,
message
:
"请选择隐患类别"
,
trigger
:
"change"
}
],
}
};
},
created
()
{
this
.
getList
();
this
.
getDicts
(
"t_hazard_category"
).
then
(
response
=>
{
this
.
fHazardCategoryOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_is_enforcement"
).
then
(
response
=>
{
this
.
fIsEnforcementOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_delete_flag"
).
then
(
response
=>
{
this
.
fDeleteFlagOptions
=
response
.
data
;
});
},
methods
:
{
/** 查询隐患分类分级标准列表 */
getList
()
{
this
.
loading
=
true
;
listInfor
(
this
.
queryParams
).
then
(
response
=>
{
this
.
inforList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 隐患类别
fHazardCategoryFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
fHazardCategoryOptions
,
row
.
fHazardCategory
);
},
// 是否强制执法,Y-是,N-否字典翻译
fIsEnforcementFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
fIsEnforcementOptions
,
row
.
fIsEnforcement
);
},
// 删除标记0-可用,1-已删除字典翻译
fDeleteFlagFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
fDeleteFlagOptions
,
row
.
fDeleteFlag
);
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
fInsStaInforId
:
null
,
fHazardName
:
null
,
fHazardCode
:
null
,
fHazardDescribe
:
null
,
fObjectType
:
null
,
fHazardCategory
:
null
,
fHazardLink
:
null
,
fHazardLevel
:
null
,
fHazardDefinitionSourceCode
:
null
,
fOwnerResponse
:
null
,
fAdministrativeSysOrganizationId
:
null
,
fAdministrativeDepartmentName
:
null
,
fIsEnforcement
:
null
,
fEnforcementSysOrganizationId
:
null
,
fEnforcementDepartmentName
:
null
,
fSupervisionSysOrganizationId
:
null
,
fSupervisionDepartmentName
:
null
,
fRectRequire
:
null
,
fRectDeadline
:
null
,
fHazardCheckBasis
:
null
,
fCheckItemId
:
null
,
fCheckDept
:
null
,
fCheckMethod
:
null
,
fEnforcementAccording
:
null
,
fCreateBy
:
null
,
fCreateTime
:
null
,
fUpdateBy
:
null
,
fUpdateTime
:
null
,
fDeleteFlag
:
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
.
fInsStaInforId
);
this
.
fHazardNames
=
selection
.
map
(
item
=>
item
.
fHazardName
);
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加隐患分类分级标准"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
fInsStaInforId
=
row
.
fInsStaInforId
||
this
.
ids
getInfor
(
fInsStaInforId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改隐患分类分级标准"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
fInsStaInforId
!=
null
)
{
updateInfor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addInfor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
fInsStaInforIds
=
row
.
fInsStaInforId
||
this
.
ids
;
const
fHazardNames
=
row
.
fHazardName
||
this
.
fHazardNames
;
this
.
$confirm
(
'是否确认删除隐患分类分级标准名称为"'
+
fHazardNames
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delInfor
(
fInsStaInforIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有隐患分类分级标准数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportInfor
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
fInsStaInforId
);
},
}
};
</
script
>
zh-baseversion-web/src/views/supervision/inspect/components/DetailInfo.vue
0 → 100644
View file @
32050b4e
<
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.fCheckTaskCode"
>
{{
detailInfo
.
fCheckTaskCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查项唯一编码"
>
<span
v-if=
"detailInfo.fUniqueCode"
>
{{
detailInfo
.
fUniqueCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查项名称"
>
<span
v-if=
"detailInfo.fCheckTimeName"
>
{{
detailInfo
.
fCheckTimeName
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查对象分类"
>
<span
v-if=
"detailInfo.fCheckClassification"
>
{{
detailInfo
.
fCheckClassification
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查方法"
>
<span
v-if=
"detailInfo.fCheckMethod"
>
{{
detailInfo
.
fCheckMethod
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查内容"
>
<span
v-if=
"detailInfo.fCheckCount"
>
{{
detailInfo
.
fCheckCount
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患级别"
>
<span
v-if=
"detailInfo.fHazardLevel"
>
{{
detailInfo
.
fHazardLevel
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"启用状态"
>
<span
v-if=
"detailInfo.fEnableState.toString()"
>
{{
$parent
.
fEnableStateFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查依据"
>
<span
v-if=
"detailInfo.fCheckBasis"
>
{{
detailInfo
.
fCheckBasis
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患分类分级标准"
>
<span
v-if=
"detailInfo.hazardName"
>
{{
detailInfo
.
hazardName
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"删除标记"
prop=
"fDeleteFlag"
>
<span
v-if=
"detailInfo.fDeleteFlag.toString()"
>
{{
$parent
.
fDeleteFlagFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
>
<span
v-if=
"detailInfo.fCreateTime"
>
{{
detailInfo
.
fCreateTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
>
<span
v-if=
"detailInfo.fCreateBy"
>
{{
detailInfo
.
fCreateBy
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"修改时间"
>
<span
v-if=
"detailInfo.fUpdateTime"
>
{{
detailInfo
.
fUpdateTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"修改人"
>
<span
v-if=
"detailInfo.fUpdateBy"
>
{{
detailInfo
.
fUpdateBy
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
getInfor
}
from
"@/api/supervision/inspect"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailInfo
:
{
fEnableState
:
0
,
fDeleteFlag
:
0
},
detailOpen
:
false
}
},
methods
:{
getDetailInfo
(
id
){
getInfor
(
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/inspect/index.vue
0 → 100644
View file @
32050b4e
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"90px"
>
<el-form-item
label=
"检查项名称"
prop=
"fCheckTimeName"
>
<el-input
v-model=
"queryParams.fCheckTimeName"
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"
v-hasPermi=
"['supervision:inspect: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:inspect: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:inspect: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:inspect:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"inforList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检查项任务编码"
align=
"center"
prop=
"fCheckTaskCode"
/>
<el-table-column
label=
"检查项唯一编码"
align=
"center"
prop=
"fUniqueCode"
/>
<el-table-column
label=
"检查项名称"
align=
"center"
prop=
"fCheckTimeName"
/>
<el-table-column
label=
"检查对象分类"
align=
"center"
prop=
"fCheckClassification"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fCheckClassification"
>
{{
scope
.
row
.
fCheckClassification
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"检查方法"
align=
"center"
prop=
"fCheckMethod"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fCheckMethod"
>
{{
scope
.
row
.
fCheckMethod
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"检查内容"
align=
"center"
prop=
"fCheckCount"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fCheckCount"
>
{{
scope
.
row
.
fCheckCount
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患级别"
align=
"center"
prop=
"fHazardLevel"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fHazardLevel"
>
{{
scope
.
row
.
fHazardLevel
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"启用状态"
align=
"center"
prop=
"fEnableState"
:formatter=
"fEnableStateFormat"
/>
<el-table-column
label=
"检查依据"
align=
"center"
prop=
"fCheckBasis"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fCheckBasis"
>
{{
scope
.
row
.
fCheckBasis
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患分类分级标准"
align=
"center"
prop=
"hazardName"
/>
<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:inspect:query']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['supervision:inspect:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['supervision:inspect: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=
"fCheckTaskCode"
>
<el-select
v-model=
"form.fCheckTaskCode"
placeholder=
"请选择任务编码"
style=
"width: 100%"
>
<el-option
v-for=
"task in taskData"
:key=
"task.fInsTaskInforId"
:label=
"task.fUniqueCode"
:value=
"task.fUniqueCode"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查项唯一编码"
prop=
"fUniqueCode"
>
<el-input
v-model=
"form.fUniqueCode"
placeholder=
"请输入检查项唯一编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查项名称"
prop=
"fCheckTimeName"
>
<el-input
v-model=
"form.fCheckTimeName"
placeholder=
"请输入检查项名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查对象分类"
prop=
"fCheckClassification"
>
<el-input
v-model=
"form.fCheckClassification"
placeholder=
"请输入检查对象分类"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查方法"
prop=
"fCheckMethod"
>
<el-input
v-model=
"form.fCheckMethod"
placeholder=
"请输入检查方法"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查内容"
prop=
"fCheckCount"
>
<el-input
v-model=
"form.fCheckCount"
placeholder=
"请输入检查内容"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患级别"
prop=
"fHazardLevel"
>
<el-input
v-model=
"form.fHazardLevel"
placeholder=
"请输入隐患级别"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"启用状态"
prop=
"fEnableState"
>
<el-select
v-model=
"form.fEnableState"
placeholder=
"请选择启用状态"
style=
"width:100%;"
>
<el-option
v-for=
"dict in fEnableStateOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查依据"
prop=
"fCheckBasis"
>
<el-input
v-model=
"form.fCheckBasis"
placeholder=
"请输入检查依据"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患分类分级标准"
prop=
"fHazardTypeLevelId"
>
<el-select
v-model=
"form.fHazardTypeLevelId"
placeholder=
"请选择隐患分类分级标准"
style=
"width: 100%"
>
<el-option
v-for=
"hidden in hiddenData"
:key=
"hidden.fInsStaInforId"
:label=
"hidden.fHazardName"
:value=
"hidden.fInsStaInforId"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"删除标记"
prop=
"fDeleteFlag"
>
<el-select
v-model=
"form.fDeleteFlag"
placeholder=
"请选择删除标记"
style=
"width:100%;"
>
<el-option
v-for=
"dict in fDeleteFlagOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
</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
{
listInfor
,
getInfor
,
delInfor
,
addInfor
,
updateInfor
,
exportInfor
}
from
"@/api/supervision/inspect"
;
import
{
taskList
}
from
"@/api/supervision/task"
;
import
{
hiddenList
}
from
"@/api/supervision/hideType"
;
import
DetailInfo
from
"./components/DetailInfo"
;
export
default
{
name
:
"Infor"
,
components
:
{
DetailInfo
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
fCheckTimeNames
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 检查项表格数据
inforList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 启用状态,0-启用,1-禁用字典
fEnableStateOptions
:
[],
// 删除标记,0-可用,1-已删除字典
fDeleteFlagOptions
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
fCheckTimeName
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
fCheckTaskCode
:
[
{
required
:
true
,
message
:
"请选择检查项任务编码"
,
trigger
:
"change"
}
],
fUniqueCode
:
[
{
required
:
true
,
message
:
"检查项唯一编码不能为空"
,
trigger
:
"blur"
}
],
fCheckTimeName
:
[
{
required
:
true
,
message
:
"检查项名称不能为空"
,
trigger
:
"blur"
}
],
fHazardTypeLevelId
:
[
{
required
:
true
,
message
:
"请选择隐患分类分级标准"
,
trigger
:
"change"
}
],
},
taskData
:
[],
hiddenData
:
[]
};
},
created
()
{
this
.
getList
();
this
.
getDicts
(
"t_enable_state"
).
then
(
response
=>
{
this
.
fEnableStateOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_delete_flag"
).
then
(
response
=>
{
this
.
fDeleteFlagOptions
=
response
.
data
;
});
},
methods
:
{
/** 查询检查项列表 */
getList
()
{
this
.
loading
=
true
;
listInfor
(
this
.
queryParams
).
then
(
response
=>
{
this
.
inforList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 启用状态,0-启用,1-禁用字典翻译
fEnableStateFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
fEnableStateOptions
,
row
.
fEnableState
);
},
// 删除标记,0-可用,1-已删除字典翻译
fDeleteFlagFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
fDeleteFlagOptions
,
row
.
fDeleteFlag
);
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
fInsInsListInforId
:
null
,
fCheckTaskCode
:
null
,
fUniqueCode
:
null
,
fCheckTimeName
:
null
,
fCheckClassification
:
null
,
fCheckMethod
:
null
,
fCheckCount
:
null
,
fHazardLevel
:
null
,
fEnableState
:
null
,
fCheckBasis
:
null
,
fHazardTypeLevelId
:
null
,
fCreateBy
:
null
,
fCreateTime
:
null
,
fUpdateBy
:
null
,
fUpdateTime
:
null
,
fDeleteFlag
:
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
.
fInsInsListInforId
);
this
.
fCheckTimeNames
=
selection
.
map
(
item
=>
item
.
fCheckTimeName
);
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
getTaskList
();
this
.
getHiddenList
();
this
.
open
=
true
;
this
.
title
=
"添加检查项"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
fInsInsListInforId
=
row
.
fInsInsListInforId
||
this
.
ids
getInfor
(
fInsInsListInforId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
getTaskList
();
this
.
getHiddenList
();
this
.
open
=
true
;
this
.
title
=
"修改检查项"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
fInsInsListInforId
!=
null
)
{
updateInfor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addInfor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
fInsInsListInforIds
=
row
.
fInsInsListInforId
||
this
.
ids
;
const
fCheckTimeNames
=
row
.
fCheckTimeName
||
this
.
fCheckTimeNames
;
this
.
$confirm
(
'是否确认删除检查项名称为"'
+
fCheckTimeNames
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delInfor
(
fInsInsListInforIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有检查项数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportInfor
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
//任务列表
getTaskList
(){
taskList
().
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
taskData
=
res
.
data
;
}
})
},
//所有隐患
getHiddenList
(){
hiddenList
().
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
hiddenData
=
res
.
data
;
}
})
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
fInsInsListInforId
);
},
}
};
</
script
>
zh-baseversion-web/src/views/supervision/scope/components/DetailInfo.vue
View file @
32050b4e
...
@@ -115,7 +115,9 @@
...
@@ -115,7 +115,9 @@
name
:
"detail-info"
,
name
:
"detail-info"
,
data
(){
data
(){
return
{
return
{
detailInfo
:
{},
detailInfo
:
{
fDeleteFlag
:
0
},
detailOpen
:
false
detailOpen
:
false
}
}
},
},
...
...
zh-baseversion-web/src/views/supervision/scope/index.vue
View file @
32050b4e
...
@@ -88,10 +88,30 @@
...
@@ -88,10 +88,30 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"fName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"fName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"对象分类"
align=
"center"
prop=
"fObjectType"
:formatter=
"fObjectTypeFormat"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"对象分类"
align=
"center"
prop=
"fObjectType"
:formatter=
"fObjectTypeFormat"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"检查表实例关联Id"
align=
"center"
prop=
"fHazardCheckTableRecordId"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"检查表实例关联Id"
align=
"center"
prop=
"fHazardCheckTableRecordId"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"抽查要求"
align=
"center"
prop=
"fSpotCheckType"
:formatter=
"fSpotCheckTypeFormat"
/>
<template
slot-scope=
"scope"
>
<el-table-column
label=
"城区标识"
align=
"center"
prop=
"fSpecialFlag"
:formatter=
"fSpecialFlagFormat"
/>
<span
v-if=
"scope.row.fHazardCheckTableRecordId"
>
{{
scope
.
row
.
fHazardCheckTableRecordId
}}
</span>
<el-table-column
label=
"此对象应检数据"
align=
"center"
prop=
"fLotCount"
/>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"抽查要求"
align=
"center"
prop=
"fSpotCheckType"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fSpotCheckType"
>
{{
fSpotCheckTypeFormat
(
scope
.
row
)
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"城区标识"
align=
"center"
prop=
"fSpecialFlag"
:formatter=
"fSpecialFlagFormat"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fSpecialFlag"
>
{{
fSpecialFlagFormat
(
scope
.
row
)
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"此对象应检数据"
align=
"center"
prop=
"fLotCount"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fLotCount"
>
{{
scope
.
row
.
fLotCount
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"fCreateTime"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"fCreateTime"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"fCreateBy"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"fCreateBy"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
zh-baseversion-web/src/views/supervision/task/components/DetailInfo.vue
View file @
32050b4e
...
@@ -122,7 +122,9 @@
...
@@ -122,7 +122,9 @@
name
:
"detail-info"
,
name
:
"detail-info"
,
data
(){
data
(){
return
{
return
{
detailInfo
:
{},
detailInfo
:
{
fDeleteFlag
:
0
},
detailOpen
:
false
detailOpen
:
false
}
}
},
},
...
...
zh-baseversion-web/src/views/supervision/task/index.vue
View file @
32050b4e
...
@@ -118,10 +118,25 @@
...
@@ -118,10 +118,25 @@
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"fName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"fName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务唯一编码"
align=
"center"
prop=
"fUniqueCode"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务唯一编码"
align=
"center"
prop=
"fUniqueCode"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务归属"
align=
"center"
prop=
"fTaskBelong"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务归属"
align=
"center"
prop=
"fTaskBelong"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"任务类型"
align=
"center"
prop=
"fTaskType"
:formatter=
"fTaskTypeFormat"
/>
<el-table-column
label=
"任务类型"
align=
"center"
prop=
"fTaskType"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fTaskType"
>
{{
fTaskTypeFormat
(
scope
.
row
)
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"是否下发"
align=
"center"
prop=
"fDistributeFlag"
:formatter=
"fDistributeFlagFormat"
/>
<el-table-column
label=
"是否下发"
align=
"center"
prop=
"fDistributeFlag"
:formatter=
"fDistributeFlagFormat"
/>
<el-table-column
label=
"任务开始时间"
align=
"center"
prop=
"fStartTime"
/>
<el-table-column
label=
"任务开始时间"
align=
"center"
prop=
"fStartTime"
>
<el-table-column
label=
"任务截至时间"
align=
"center"
prop=
"fEndTime"
/>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fStartTime"
>
{{
scope
.
row
.
fStartTime
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"任务截至时间"
align=
"center"
prop=
"fEndTime"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fEndTime"
>
{{
scope
.
row
.
fEndTime
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"任务状态"
align=
"center"
prop=
"fStatus"
:formatter=
"fStatusFormat"
/>
<el-table-column
label=
"任务状态"
align=
"center"
prop=
"fStatus"
:formatter=
"fStatusFormat"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
...
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