Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
3b08e4b5
Commit
3b08e4b5
authored
Oct 08, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新做隐患台账,修改隐患排查
parent
076b02f8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1016 additions
and
136 deletions
+1016
-136
TStaningBook.java
.../src/main/java/com/zehong/system/domain/TStaningBook.java
+280
-8
TStaningBookServiceImpl.java
...m/zehong/system/service/impl/TStaningBookServiceImpl.java
+8
-8
TStaningBookMapper.xml
...m/src/main/resources/mapper/system/TStaningBookMapper.xml
+87
-13
index.vue
danger-manage-web/src/views/system/book/index.vue
+629
-95
index.vue
danger-manage-web/src/views/system/workCheck/index.vue
+12
-12
No files found.
danger-manage-system/src/main/java/com/zehong/system/domain/TStaningBook.java
View file @
3b08e4b5
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
;
import
org.springframework.format.annotation.DateTimeFormat
;
/**
* 隐患台账对象 t_staning_book
*
* @author zehong
* @date 2022-
07-11
* @date 2022-
10-07
*/
public
class
TStaningBook
extends
BaseEntity
{
...
...
@@ -34,18 +37,96 @@ public class TStaningBook extends BaseEntity
@Excel
(
name
=
"隐患描述"
)
private
String
measures
;
/** 完成用时 */
@Excel
(
name
=
"完成用时"
)
/** 隐患危害 */
@Excel
(
name
=
"隐患危害"
)
private
String
troubleHarm
;
/** 隐患上报人 */
@Excel
(
name
=
"隐患上报人"
)
private
Long
escalation
;
private
String
escalationName
;
/** 隐患上报时间 */
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"隐患上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
findTime
;
/** 现场照片 */
@Excel
(
name
=
"现场照片"
)
private
String
picture
;
/** 隐患附件 */
@Excel
(
name
=
"隐患附件"
)
private
String
enclosure
;
/** 整改建议 */
@Excel
(
name
=
"整改建议"
)
private
String
proposal
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
rectificationTerm
;
/** 投入费用 */
@Excel
(
name
=
"投入费用"
)
private
String
investmentCost
;
/** 投入物资 */
@Excel
(
name
=
"投入物资"
)
private
String
investmentMaterial
;
/** 整改人 */
@Excel
(
name
=
"整改人"
)
private
Long
rectification
;
private
String
rectificationName
;
/** 整改后图片 */
@Excel
(
name
=
"整改后图片"
)
private
String
rectificationPictrue
;
/** 整改描述 */
@Excel
(
name
=
"整改描述"
)
private
String
rectificationText
;
/** 整改时间 */
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"整改时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
rectificationTime
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
/** 完成时间 */
@Excel
(
name
=
"完成时间"
)
private
Long
finishDay
;
/** 复查结果 */
@Excel
(
name
=
"复查结果"
)
/** 复查图片 */
@Excel
(
name
=
"复查图片"
)
private
String
inspectPictrue
;
/** 复查时间 */
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"复查时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
inspectTime
;
/** 复查结果描述 */
@Excel
(
name
=
"复查结果描述"
)
private
String
inspectResult
;
/**
责任
人 */
@Excel
(
name
=
"
责任
人"
)
/**
复查
人 */
@Excel
(
name
=
"
复查
人"
)
private
Long
personLiable
;
private
String
personLiableName
;
/** 隐患状态 */
@Excel
(
name
=
"隐患状态 "
)
private
Integer
state
;
/** 部门id */
@Excel
(
name
=
"部门id"
)
private
Long
deptId
;
...
...
@@ -57,9 +138,40 @@ public class TStaningBook extends BaseEntity
private
Long
workId
;
/** 删除 0否 1是 */
@Excel
(
name
=
"删除 0否 1是"
)
private
Integer
isDel
;
public
String
getEscalationName
()
{
return
escalationName
;
}
public
void
setEscalationName
(
String
escalationName
)
{
this
.
escalationName
=
escalationName
;
}
public
String
getRectificationName
()
{
return
rectificationName
;
}
public
void
setRectificationName
(
String
rectificationName
)
{
this
.
rectificationName
=
rectificationName
;
}
public
String
getPersonLiableName
()
{
return
personLiableName
;
}
public
void
setPersonLiableName
(
String
personLiableName
)
{
this
.
personLiableName
=
personLiableName
;
}
public
Date
getRectificationTerm
()
{
return
rectificationTerm
;
}
public
void
setRectificationTerm
(
Date
rectificationTerm
)
{
this
.
rectificationTerm
=
rectificationTerm
;
}
public
String
getDeptName
()
{
return
deptName
;
}
...
...
@@ -113,6 +225,123 @@ public class TStaningBook extends BaseEntity
{
return
measures
;
}
public
void
setTroubleHarm
(
String
troubleHarm
)
{
this
.
troubleHarm
=
troubleHarm
;
}
public
String
getTroubleHarm
()
{
return
troubleHarm
;
}
public
void
setEscalation
(
Long
escalation
)
{
this
.
escalation
=
escalation
;
}
public
Long
getEscalation
()
{
return
escalation
;
}
public
void
setFindTime
(
Date
findTime
)
{
this
.
findTime
=
findTime
;
}
public
Date
getFindTime
()
{
return
findTime
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
public
String
getPicture
()
{
return
picture
;
}
public
void
setEnclosure
(
String
enclosure
)
{
this
.
enclosure
=
enclosure
;
}
public
String
getEnclosure
()
{
return
enclosure
;
}
public
void
setProposal
(
String
proposal
)
{
this
.
proposal
=
proposal
;
}
public
String
getProposal
()
{
return
proposal
;
}
public
void
setInvestmentCost
(
String
investmentCost
)
{
this
.
investmentCost
=
investmentCost
;
}
public
String
getInvestmentCost
()
{
return
investmentCost
;
}
public
void
setInvestmentMaterial
(
String
investmentMaterial
)
{
this
.
investmentMaterial
=
investmentMaterial
;
}
public
String
getInvestmentMaterial
()
{
return
investmentMaterial
;
}
public
void
setRectification
(
Long
rectification
)
{
this
.
rectification
=
rectification
;
}
public
Long
getRectification
()
{
return
rectification
;
}
public
void
setRectificationPictrue
(
String
rectificationPictrue
)
{
this
.
rectificationPictrue
=
rectificationPictrue
;
}
public
String
getRectificationPictrue
()
{
return
rectificationPictrue
;
}
public
void
setRectificationText
(
String
rectificationText
)
{
this
.
rectificationText
=
rectificationText
;
}
public
String
getRectificationText
()
{
return
rectificationText
;
}
public
void
setRectificationTime
(
Date
rectificationTime
)
{
this
.
rectificationTime
=
rectificationTime
;
}
public
Date
getRectificationTime
()
{
return
rectificationTime
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setFinishDay
(
Long
finishDay
)
{
this
.
finishDay
=
finishDay
;
...
...
@@ -122,6 +351,24 @@ public class TStaningBook extends BaseEntity
{
return
finishDay
;
}
public
void
setInspectPictrue
(
String
inspectPictrue
)
{
this
.
inspectPictrue
=
inspectPictrue
;
}
public
String
getInspectPictrue
()
{
return
inspectPictrue
;
}
public
void
setInspectTime
(
Date
inspectTime
)
{
this
.
inspectTime
=
inspectTime
;
}
public
Date
getInspectTime
()
{
return
inspectTime
;
}
public
void
setInspectResult
(
String
inspectResult
)
{
this
.
inspectResult
=
inspectResult
;
...
...
@@ -140,6 +387,15 @@ public class TStaningBook extends BaseEntity
{
return
personLiable
;
}
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
}
public
Integer
getState
()
{
return
state
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
...
...
@@ -176,9 +432,25 @@ public class TStaningBook extends BaseEntity
.
append
(
"troubleType"
,
getTroubleType
())
.
append
(
"troubleLevel"
,
getTroubleLevel
())
.
append
(
"measures"
,
getMeasures
())
.
append
(
"troubleHarm"
,
getTroubleHarm
())
.
append
(
"escalation"
,
getEscalation
())
.
append
(
"findTime"
,
getFindTime
())
.
append
(
"picture"
,
getPicture
())
.
append
(
"enclosure"
,
getEnclosure
())
.
append
(
"proposal"
,
getProposal
())
.
append
(
"investmentCost"
,
getInvestmentCost
())
.
append
(
"investmentMaterial"
,
getInvestmentMaterial
())
.
append
(
"rectification"
,
getRectification
())
.
append
(
"rectificationPictrue"
,
getRectificationPictrue
())
.
append
(
"rectificationText"
,
getRectificationText
())
.
append
(
"rectificationTime"
,
getRectificationTime
())
.
append
(
"remarks"
,
getRemarks
())
.
append
(
"finishDay"
,
getFinishDay
())
.
append
(
"inspectPictrue"
,
getInspectPictrue
())
.
append
(
"inspectTime"
,
getInspectTime
())
.
append
(
"inspectResult"
,
getInspectResult
())
.
append
(
"personLiable"
,
getPersonLiable
())
.
append
(
"state"
,
getState
())
.
append
(
"deptId"
,
getDeptId
())
.
append
(
"workId"
,
getWorkId
())
.
append
(
"createTime"
,
getCreateTime
())
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TStaningBookServiceImpl.java
View file @
3b08e4b5
...
...
@@ -51,14 +51,14 @@ public class TStaningBookServiceImpl implements ITStaningBookService
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
)
{
List
<
TStaningBook
>
list
=
tStaningBookMapper
.
selectTStaningBookList
(
tStaningBook
);
for
(
TStaningBook
book:
list
){
if
(
book
.
getDeptId
()!=
null
){
SysDept
dept
=
deptMapper
.
selectDeptById
(
book
.
getDeptId
());
if
(
dept
!=
null
){
book
.
setDeptName
(
dept
.
getDeptName
());
}
}
}
//
for(TStaningBook book: list){
//
if(book.getDeptId()!=null){
//
SysDept dept = deptMapper.selectDeptById(book.getDeptId());
//
if(dept!=null){
//
book.setDeptName(dept.getDeptName());
//
}
//
}
//
}
return
list
;
}
...
...
danger-manage-system/src/main/resources/mapper/system/TStaningBookMapper.xml
View file @
3b08e4b5
...
...
@@ -10,33 +10,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"troubleType"
column=
"trouble_type"
/>
<result
property=
"troubleLevel"
column=
"trouble_level"
/>
<result
property=
"measures"
column=
"measures"
/>
<result
property=
"troubleHarm"
column=
"trouble_harm"
/>
<result
property=
"escalation"
column=
"escalation"
/>
<result
property=
"escalationName"
column=
"escalationName"
/>
<result
property=
"findTime"
column=
"find_time"
/>
<result
property=
"picture"
column=
"picture"
/>
<result
property=
"enclosure"
column=
"enclosure"
/>
<result
property=
"proposal"
column=
"proposal"
/>
<result
property=
"rectificationTerm"
column=
"rectification_term"
/>
<result
property=
"investmentCost"
column=
"investment_cost"
/>
<result
property=
"investmentMaterial"
column=
"investment_material"
/>
<result
property=
"rectification"
column=
"rectification"
/>
<result
property=
"rectificationName"
column=
"rectificationName"
/>
<result
property=
"rectificationPictrue"
column=
"rectification_pictrue"
/>
<result
property=
"rectificationText"
column=
"rectification_text"
/>
<result
property=
"rectificationTime"
column=
"rectification_time"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"finishDay"
column=
"finish_day"
/>
<result
property=
"inspectPictrue"
column=
"inspect_pictrue"
/>
<result
property=
"inspectTime"
column=
"inspect_time"
/>
<result
property=
"inspectResult"
column=
"inspect_result"
/>
<result
property=
"personLiable"
column=
"person_liable"
/>
<result
property=
"personLiableName"
column=
"personLiableName"
/>
<result
property=
"state"
column=
"state"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"workId"
column=
"work_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"deptName"
column=
"deptName"
/>
</resultMap>
<sql
id=
"selectTStaningBookVo"
>
select book_id, trouble_name, trouble_type, trouble_level, measures,
finish_day, inspect_result, person_liabl
e, dept_id, work_id, create_time, create_by, is_del from t_staning_book
select book_id, trouble_name, trouble_type, trouble_level, measures,
trouble_harm, escalation, find_time, picture, enclosure, proposal,rectification_term, investment_cost, investment_material, rectification, rectification_pictrue, rectification_text, rectification_time, remarks, finish_day, inspect_pictrue, inspect_time, inspect_result, person_liable, stat
e, dept_id, work_id, create_time, create_by, is_del from t_staning_book
</sql>
<select
id=
"selectTStaningBookList"
parameterType=
"TStaningBook"
resultMap=
"TStaningBookResult"
>
<include
refid=
"selectTStaningBookVo"
/>
<where>
<if
test=
"troubleName != null and troubleName != ''"
>
and trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"troubleType != null "
>
and trouble_type = #{troubleType}
</if>
<if
test=
"troubleLevel != null "
>
and trouble_level = #{troubleLevel}
</if>
<if
test=
"measures != null and measures != ''"
>
and measures = #{measures}
</if>
<if
test=
"finishDay != null "
>
and finish_day = #{finishDay}
</if>
<if
test=
"inspectResult != null and inspectResult != ''"
>
and inspect_result = #{inspectResult}
</if>
<if
test=
"personLiable != null "
>
and person_liable = #{personLiable}
</if>
<if
test=
"deptId != null "
>
and dept_id = #{deptId}
</if>
<if
test=
"workId != null "
>
and work_id = #{workId}
</if>
<if
test=
"isDel != null "
>
and is_del = #{isDel}
</if>
SELECT b.*,s1.`staff_name` AS escalationName,
s2.`staff_name` AS rectificationName,
s3.`staff_name` AS personLiableName ,
d.`dept_name` AS deptName
FROM t_staning_book b
LEFT JOIN t_staff s1 ON b.`escalation` = s1.`staff_id`
LEFT JOIN t_staff s2 ON b.`rectification` = s2.`staff_id`
LEFT JOIN t_staff s3 ON b.`person_liable` = s3.`staff_id`
LEFT JOIN sys_dept d ON d.`dept_id` = b.`dept_id`
<where>
<if
test=
"troubleName != null and troubleName != ''"
>
and b.trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"findTime != null "
>
and b.find_time
>
#{findTime}
</if>
<if
test=
"rectificationTime != null "
>
and b.find_time
<
#{rectificationTime}
</if>
<if
test=
"state != null "
>
and b.state = #{state}
</if>
</where>
</select>
...
...
@@ -52,9 +75,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"troubleType != null"
>
trouble_type,
</if>
<if
test=
"troubleLevel != null"
>
trouble_level,
</if>
<if
test=
"measures != null"
>
measures,
</if>
<if
test=
"troubleHarm != null"
>
trouble_harm,
</if>
<if
test=
"escalation != null"
>
escalation,
</if>
<if
test=
"findTime != null"
>
find_time,
</if>
<if
test=
"picture != null"
>
picture,
</if>
<if
test=
"enclosure != null"
>
enclosure,
</if>
<if
test=
"proposal != null"
>
proposal,
</if>
<if
test=
"rectificationTerm != null"
>
rectification_term,
</if>
<if
test=
"investmentCost != null"
>
investment_cost,
</if>
<if
test=
"investmentMaterial != null"
>
investment_material,
</if>
<if
test=
"rectification != null"
>
rectification,
</if>
<if
test=
"rectificationPictrue != null"
>
rectification_pictrue,
</if>
<if
test=
"rectificationText != null"
>
rectification_text,
</if>
<if
test=
"rectificationTime != null"
>
rectification_time,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"finishDay != null"
>
finish_day,
</if>
<if
test=
"inspectPictrue != null"
>
inspect_pictrue,
</if>
<if
test=
"inspectTime != null"
>
inspect_time,
</if>
<if
test=
"inspectResult != null"
>
inspect_result,
</if>
<if
test=
"personLiable != null"
>
person_liable,
</if>
<if
test=
"state != null"
>
state,
</if>
<if
test=
"deptId != null"
>
dept_id,
</if>
<if
test=
"workId != null"
>
work_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -66,9 +106,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"troubleType != null"
>
#{troubleType},
</if>
<if
test=
"troubleLevel != null"
>
#{troubleLevel},
</if>
<if
test=
"measures != null"
>
#{measures},
</if>
<if
test=
"troubleHarm != null"
>
#{troubleHarm},
</if>
<if
test=
"escalation != null"
>
#{escalation},
</if>
<if
test=
"findTime != null"
>
#{findTime},
</if>
<if
test=
"picture != null"
>
#{picture},
</if>
<if
test=
"enclosure != null"
>
#{enclosure},
</if>
<if
test=
"proposal != null"
>
#{proposal},
</if>
<if
test=
"rectificationTerm != null"
>
#{rectificationTerm},
</if>
<if
test=
"investmentCost != null"
>
#{investmentCost},
</if>
<if
test=
"investmentMaterial != null"
>
#{investmentMaterial},
</if>
<if
test=
"rectification != null"
>
#{rectification},
</if>
<if
test=
"rectificationPictrue != null"
>
#{rectificationPictrue},
</if>
<if
test=
"rectificationText != null"
>
#{rectificationText},
</if>
<if
test=
"rectificationTime != null"
>
#{rectificationTime},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"finishDay != null"
>
#{finishDay},
</if>
<if
test=
"inspectPictrue != null"
>
#{inspectPictrue},
</if>
<if
test=
"inspectTime != null"
>
#{inspectTime},
</if>
<if
test=
"inspectResult != null"
>
#{inspectResult},
</if>
<if
test=
"personLiable != null"
>
#{personLiable},
</if>
<if
test=
"state != null"
>
#{state},
</if>
<if
test=
"deptId != null"
>
#{deptId},
</if>
<if
test=
"workId != null"
>
#{workId},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
...
...
@@ -84,9 +141,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"troubleType != null"
>
trouble_type = #{troubleType},
</if>
<if
test=
"troubleLevel != null"
>
trouble_level = #{troubleLevel},
</if>
<if
test=
"measures != null"
>
measures = #{measures},
</if>
<if
test=
"troubleHarm != null"
>
trouble_harm = #{troubleHarm},
</if>
<if
test=
"escalation != null"
>
escalation = #{escalation},
</if>
<if
test=
"findTime != null"
>
find_time = #{findTime},
</if>
<if
test=
"picture != null"
>
picture = #{picture},
</if>
<if
test=
"enclosure != null"
>
enclosure = #{enclosure},
</if>
<if
test=
"proposal != null"
>
proposal = #{proposal},
</if>
<if
test=
"rectificationTerm != null"
>
rectification_term = #{rectificationTerm},
</if>
<if
test=
"investmentCost != null"
>
investment_cost = #{investmentCost},
</if>
<if
test=
"investmentMaterial != null"
>
investment_material = #{investmentMaterial},
</if>
<if
test=
"rectification != null"
>
rectification = #{rectification},
</if>
<if
test=
"rectificationPictrue != null"
>
rectification_pictrue = #{rectificationPictrue},
</if>
<if
test=
"rectificationText != null"
>
rectification_text = #{rectificationText},
</if>
<if
test=
"rectificationTime != null"
>
rectification_time = #{rectificationTime},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
<if
test=
"finishDay != null"
>
finish_day = #{finishDay},
</if>
<if
test=
"inspectPictrue != null"
>
inspect_pictrue = #{inspectPictrue},
</if>
<if
test=
"inspectTime != null"
>
inspect_time = #{inspectTime},
</if>
<if
test=
"inspectResult != null"
>
inspect_result = #{inspectResult},
</if>
<if
test=
"personLiable != null"
>
person_liable = #{personLiable},
</if>
<if
test=
"state != null"
>
state = #{state},
</if>
<if
test=
"deptId != null"
>
dept_id = #{deptId},
</if>
<if
test=
"workId != null"
>
work_id = #{workId},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
...
...
danger-manage-web/src/views/system/book/index.vue
View file @
3b08e4b5
...
...
@@ -10,14 +10,30 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"隐患等级"
prop=
"troubleLevel"
>
<el-select
v-model=
"queryParams.troubleLevel"
placeholder=
"请选择隐患等级"
clearable
size=
"small"
>
<el-form-item
label=
"隐患时间"
prop=
"findTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.findTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"隐患上报开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
""
prop=
"rectificationTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.rectificationTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"隐患上报结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"隐患状态 "
prop=
"state"
>
<el-select
v-model=
"queryParams.state"
placeholder=
"请选择"
>
<el-option
v-for=
"
dict in troubleLevelO
ptions"
:key=
"
dict.dictV
alue"
:label=
"
dict.dictL
abel"
:value=
"
dict.dictValue"
/
>
v-for=
"
item in o
ptions"
:key=
"
item.v
alue"
:label=
"
item.l
abel"
:value=
"
item.value"
>
</el-option
>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -37,28 +53,15 @@
v-hasPermi=
"['system:book: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="['system:book: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="['system:book:remove']"-->
<!-->删除
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleFastAdd"
>
快速录入
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
...
...
@@ -74,26 +77,41 @@
</el-row>
<el-table
v-loading=
"loading"
:data=
"bookList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!--
<el-table-column
label=
"id"
align=
"center"
prop=
"bookId"
/>
-->
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"隐患名称"
align=
"center"
prop=
"troubleName"
/>
<el-table-column
label=
"隐患类型"
align=
"center"
prop=
"troubleType"
:formatter=
"troubleTypeFormat"
/>
<el-table-column
label=
"隐患等级"
align=
"center"
prop=
"troubleLevel"
:formatter=
"troubleLevelFormat"
/>
<el-table-column
label=
"完成用时"
align=
"center"
prop=
"finishDay"
/>
<el-table-column
label=
"复查结果"
align=
"center"
prop=
"inspectResult"
/>
<el-table-column
label=
"隐患上报人"
align=
"center"
prop=
"escalationName"
/>
<el-table-column
label=
"隐患发现时间"
align=
"center"
prop=
"findTime"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"责任部门"
align=
"center"
prop=
"deptName"
/>
<!--
<el-table-column
label=
"责任人"
align=
"center"
prop=
"personLiable"
/>
-->
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"整改人"
align=
"center"
prop=
"rectificationName"
/>
<el-table-column
label=
"整改时间"
align=
"center"
prop=
"rectificationTime"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"隐患状态 "
align=
"center"
prop=
"state"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.state==0"
>
待整改
</span>
<span
v-if=
"scope.row.state==1"
>
待复查
</span>
<span
v-if=
"scope.row.state==2"
>
已闭环
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.state==0"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:book:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleDetail(scope.row)"
v-hasPermi=
"['system:book:edit']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -114,76 +132,411 @@
/>
<!-- 添加或修改隐患台账对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
5
00px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
9
00px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"隐患名称"
prop=
"troubleName"
>
<el-input
v-model=
"form.troubleName"
placeholder=
"请输入隐患名称"
/>
</el-form-item>
<el-form-item
label=
"隐患类型"
prop=
"troubleType"
>
<el-select
v-model=
"form.troubleType"
placeholder=
"请选择隐患等级"
>
<el-option
v-for=
"dict in troubleTypeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
<el-row
:gutter=
"24"
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患类型"
prop=
"troubleType"
width=
"50%"
>
<el-select
v-model=
"form.troubleType"
placeholder=
"请选择隐患类型"
@
change=
"changeType"
>
<el-option
v-for=
"dict in troubleTypeOptions"
: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=
"troubleLevel"
>
<el-select
v-model=
"form.troubleLevel"
placeholder=
"请选择隐患等级"
>
<el-option
v-for=
"dict in troubleLevelOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"隐患描述"
prop=
"measures"
>
<el-input
v-model=
"form.measures"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
<el-form-item
label=
"隐患危害"
prop=
"troubleHarm"
>
<el-input
v-model=
"form.troubleHarm"
placeholder=
"请输入隐患危害"
/>
</el-form-item>
<el-row
:gutter=
"24"
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"上报人"
prop=
"escalation"
>
<!--<el-input v-model="form.escalation" placeholder="请输入隐患上报人" />-->
<el-select
v-model=
"form.escalation"
filterable
placeholder=
"请选择"
>
<el-option
v-for=
"item in staffList"
:key=
"item.staffId"
:label=
"item.staffName"
:value=
"item.staffId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"发现时间"
prop=
"findTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.findTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择隐患上报时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!--<el-form-item label="现场照片" prop="picture">-->
<!--<el-input v-model="form.picture" placeholder="请输入现场照片" />-->
<!--</el-form-item>-->
<el-form-item
label=
"现场照片"
v-if=
"!readOnly"
prop=
"picture"
>
<MyFileUpload
listType=
"picture-card"
@
resFun=
"getFileInfo($event,0)"
@
remove=
"listRemove($event,0)"
:fileArr=
"fileList"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.picture"
></el-input>
</el-form-item>
<el-form-item
label=
"隐患等级"
prop=
"troubleLevel"
>
<el-select
v-model=
"form.troubleLevel"
placeholder=
"请选择隐患等级"
>
<el-form-item
label=
"隐患附件"
prop=
"enclosure"
v-if=
"zhong==1"
>
<!--<el-input v-model="form.enclosure" placeholder="请输入隐患附件" />-->
<FileUpload
listType=
"picture"
@
resFun=
"getFileInfo($event,3)"
@
remove=
"listRemove($event,3)"
:fileArr=
"fileList3"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.enclosure"
></el-input>
</el-form-item>
<el-row
:gutter=
"24"
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"责任部门"
prop=
"deptId"
>
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<el-select
v-model=
"form.deptId"
filterable
placeholder=
"请选择责任部门"
>
<el-option
v-for=
"dict in deptList"
:key=
"dict.deptId"
:label=
"dict.deptName"
:value=
"parseInt(dict.deptId)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改时限"
prop=
"rectificationTerm"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.rectificationTerm"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择整改时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"整改建议"
prop=
"proposal"
>
<el-input
type=
"textarea"
v-model=
"form.proposal"
placeholder=
"请输入整改建议"
/>
</el-form-item>
<!--<el-form-item label="投入费用" prop="investmentCost" v-if="zhong==1">-->
<!--<el-input v-model="form.investmentCost" placeholder="请输入投入费用" />-->
<!--</el-form-item>-->
<!--<el-form-item label="投入物资" prop="investmentMaterial" v-if="zhong==1">-->
<!--<el-input v-model="form.investmentMaterial" placeholder="请输入投入物资" />-->
<!--</el-form-item>-->
<el-form-item
label=
"整改人"
prop=
"rectification"
v-if=
"zhong==2||fast"
>
<el-select
v-model=
"form.rectification"
filterable
placeholder=
"请选择"
>
<el-option
v-for=
"
dict in troubleLevelOptions
"
:key=
"
dict.dictValue
"
:label=
"
dict.dictLabel
"
:value=
"
parseInt(dict.dictValue)"
>
</el-option>
v-for=
"
item in staffList
"
:key=
"
item.staffId
"
:label=
"
item.staffName
"
:value=
"
item.staffId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"责任部门"
prop=
"deptId"
>
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<el-select
v-model=
"form.deptId"
placeholder=
"请选择责任部门"
>
<el-form-item
label=
"整改图片"
v-if=
"!readOnly &&( zhong==2 || fast)"
prop=
"rectificationPictrue"
>
<MyFileUpload
listType=
"picture-card"
@
resFun=
"getFileInfo($event,1)"
@
remove=
"listRemove($event,1)"
:fileArr=
"fileList1"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.rectificationPictrue"
></el-input>
</el-form-item>
<el-form-item
label=
"整改时间"
prop=
"rectificationTime"
v-if =
"zhong==2||fast"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.rectificationTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择复查时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"整改描述"
prop=
"rectificationText"
v-if=
"zhong==2||fast"
>
<el-input
v-model=
"form.rectificationText"
placeholder=
"请输入整改描述"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
<el-form-item
label=
"复查图片"
v-if=
"!readOnly && fast"
prop=
"picture"
>
<MyFileUpload
listType=
"picture-card"
@
resFun=
"getFileInfo($event,2)"
@
remove=
"listRemove($event,2)"
:fileArr=
"fileList2"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.inspectPictrue"
></el-input>
</el-form-item>
<el-form-item
label=
"复查时间"
prop=
"inspectTime"
v-if =
"fast"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.inspectTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择复查时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"复查描述"
prop=
"inspectResult"
v-if =
"fast"
>
<el-input
type=
"textarea"
v-model=
"form.inspectResult"
placeholder=
"请输入复查结果描述"
/>
</el-form-item>
<el-form-item
label=
"复查人"
prop=
"personLiable"
v-if =
"fast"
>
<el-select
v-model=
"form.personLiable"
filterable
placeholder=
"请选择"
>
<el-option
v-for=
"
dict in dept
List"
:key=
"
dict.dept
Id"
:label=
"
dict.dept
Name"
:value=
"
parseInt(dict.deptId)"
>
</el-option>
v-for=
"
item in staff
List"
:key=
"
item.staff
Id"
:label=
"
item.staff
Name"
:value=
"
item.staffId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"隐患描述"
prop=
"measures"
>
<el-input
v-model=
"form.measures"
type=
"textarea"
placeholder=
"请输入隐患描述"
/>
</el-form-item>
<!--<el-form-item label="完成用时" prop="finishDay">-->
<!--<el-input v-model="form.finishDay" placeholder="请输入完成用时" />-->
<!--</el-form-item>-->
<!--<el-form-item label="复查结果" prop="inspectResult">-->
<!--<el-input v-model="form.inspectResult" placeholder="请输入复查结果" />-->
<!--</el-form-item>-->
<!--<el-form-item label="责任人" prop="personLiable">-->
<!--<el-input v-model="form.personLiable" placeholder="请输入责任人" />-->
<!--</el-form-item>-->
<!--<el-form-item label="任务id" prop="workId">-->
<!--<el-input v-model="form.workId" placeholder="请输入任务id" />-->
<!--</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>
<!--详情-->
<el-dialog
:title=
"title"
:visible
.
sync=
"open2"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"隐患名称"
>
<el-input
v-model=
"form.troubleName"
placeholder=
"请输入隐患名称"
disabled
/>
</el-form-item>
<el-row
:gutter=
"24"
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患类型"
prop=
"troubleType"
width=
"50%"
>
<el-select
v-model=
"form.troubleType"
placeholder=
"请选择隐患类型"
disabled
@
change=
"changeType"
>
<el-option
v-for=
"dict in troubleTypeOptions"
: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=
"troubleLevel"
>
<el-select
v-model=
"form.troubleLevel"
placeholder=
"请选择隐患等级"
disabled
>
<el-option
v-for=
"dict in troubleLevelOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"隐患描述"
prop=
"measures"
>
<el-input
v-model=
"form.measures"
type=
"textarea"
placeholder=
"请输入内容"
disabled
/>
</el-form-item>
<el-form-item
label=
"隐患危害"
prop=
"troubleHarm"
>
<el-input
v-model=
"form.troubleHarm"
placeholder=
"请输入隐患危害"
disabled
/>
</el-form-item>
<el-row
:gutter=
"24"
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"上报人"
prop=
"escalation"
>
<!--<el-input v-model="form.escalation" placeholder="请输入隐患上报人" />-->
<el-select
v-model=
"form.escalation"
filterable
placeholder=
"请选择"
disabled
>
<el-option
v-for=
"item in staffList"
:key=
"item.staffId"
:label=
"item.staffName"
:value=
"item.staffId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"发现时间"
prop=
"findTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.findTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择隐患上报时间"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!--<el-form-item label="现场照片" prop="picture">-->
<!--<el-input v-model="form.picture" placeholder="请输入现场照片" />-->
<!--</el-form-item>-->
<el-form-item
label=
"现场照片"
prop=
"picture"
>
<img
:src=
"form.picture"
style=
"width: 20%;vertical-align:middle;cursor:pointer;"
@
click=
"showPicture(form)"
/>
<el-image
:zIndex=
"9999"
:ref=
"'a'+form.id"
:src=
"form.picture"
v-show=
"false"
:preview-src-list=
"[form.picture]"
v-if=
"form.picture != '' && form.picture != null"
></el-image>
</el-form-item>
<el-form-item
label=
"隐患附件"
prop=
"enclosure"
v-if=
"zhong==1"
>
<el-input
v-model=
"form.enclosure"
placeholder=
"请输入隐患附件"
/>
</el-form-item>
<el-row
:gutter=
"24"
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"责任部门"
prop=
"deptId"
>
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<el-select
v-model=
"form.deptId"
filterable
placeholder=
"请选择责任部门"
disabled
>
<el-option
v-for=
"dict in deptList"
:key=
"dict.deptId"
:label=
"dict.deptName"
:value=
"dict.deptId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改时限"
prop=
"rectificationTerm"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.rectificationTerm"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择整改时间"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"整改建议"
prop=
"proposal"
>
<el-input
type=
"textarea"
v-model=
"form.proposal"
placeholder=
"请输入整改建议"
disabled
/>
</el-form-item>
<el-form-item
label=
"投入费用"
prop=
"investmentCost"
v-if=
"zhong==1"
>
<el-input
v-model=
"form.investmentCost"
placeholder=
"请输入投入费用"
disabled
/>
</el-form-item>
<el-form-item
label=
"投入物资"
prop=
"investmentMaterial"
v-if=
"zhong==1"
>
<el-input
v-model=
"form.investmentMaterial"
placeholder=
"请输入投入物资"
disabled
/>
</el-form-item>
<el-form-item
label=
"整改人"
prop=
"rectification"
>
<el-select
v-model=
"form.rectification"
filterable
placeholder=
"请选择"
disabled
>
<el-option
v-for=
"item in staffList"
:key=
"item.staffId"
:label=
"item.staffName"
:value=
"item.staffId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"整改图片"
prop=
"picture"
>
<img
:src=
"form.rectificationPictrue"
style=
"width: 20%;vertical-align:middle;cursor:pointer;"
@
click=
"showPicture(form)"
/>
<el-image
:zIndex=
"9999"
:ref=
"'a'+form.id"
:src=
"form.rectificationPictrue"
v-show=
"false"
:preview-src-list=
"[form.rectificationPictrue]"
v-if=
"form.rectificationPictrue != '' && form.rectificationPictrue != null"
></el-image>
</el-form-item>
<el-form-item
label=
"整改时间"
prop=
"rectificationTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.rectificationTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择复查时间"
disabled
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"整改描述"
prop=
"rectificationText"
>
<el-input
v-model=
"form.rectificationText"
placeholder=
"请输入整改描述"
disabled
/>
</el-form-item>
<el-form-item
label=
"复查图片"
prop=
"picture"
>
<img
:src=
"form.inspectPictrue"
style=
"width: 20%;vertical-align:middle;cursor:pointer;"
@
click=
"showPicture(form)"
/>
<el-image
:zIndex=
"9999"
:ref=
"'a'+form.id"
:src=
"form.inspectPictrue"
v-show=
"false"
:preview-src-list=
"[form.inspectPictrue]"
v-if=
"form.picture != '' && form.inspectPictrue != null"
></el-image>
</el-form-item>
<el-form-item
label=
"复查时间"
prop=
"inspectTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.inspectTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择复查时间"
disabled
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"复查描述"
prop=
"inspectResult"
>
<el-input
type=
"textarea"
v-model=
"form.inspectResult"
placeholder=
"请输入复查结果描述"
disabled
/>
</el-form-item>
<el-form-item
label=
"复查人"
>
<el-select
v-model=
"form.personLiable"
filterable
placeholder=
"请选择"
disabled
>
<el-option
v-for=
"item in staffList"
:key=
"item.staffId"
:label=
"item.staffName"
:value=
"item.staffId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
disabled
/>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<
script
>
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
FileUpload
from
'@/components/FileUpload'
;
import
{
listBook
,
getBook
,
delBook
,
addBook
,
updateBook
,
exportBook
}
from
"@/api/system/book"
;
import
{
listDept
}
from
"@/api/system/dept"
;
import
{
listStaff
}
from
"@/api/safetyManagement/staff"
;
let
uploadfile
=
require
(
"@/assets/uploadfile.png"
);
export
default
{
name
:
"Book"
,
components
:
{
MyFileUpload
,
FileUpload
},
data
()
{
return
{
readOnly
:
false
,
fast
:
false
,
fileList
:[],
fileList1
:[],
fileList2
:[],
fileList3
:[],
options
:
[{
value
:
'0'
,
label
:
'待整改'
},
{
value
:
'1'
,
label
:
'待复查'
},
{
value
:
'2'
,
label
:
'已闭环'
}],
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -200,22 +553,33 @@ export default {
total
:
0
,
// 隐患台账表格数据
bookList
:
[],
//部门列表
deptList
:[],
// 弹出层标题
title
:
""
,
//重大隐患项 0 一般隐患 1重大隐患 2现改隐患
zhong
:
0
,
// 是否显示弹出层
open
:
false
,
open2
:
false
,
// 隐患类型字典
troubleTypeOptions
:
[],
// 隐患等级字典
troubleLevelOptions
:
[],
troubleTypeOptions
:[],
deptList
:[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
troubleName
:
null
,
troubleLevel
:
null
,
findTime
:
null
,
rectificationTime
:
null
,
state
:
null
,
},
queryParams2
:{
pageNum
:
1
,
pageSize
:
2000
,
staffName
:
""
},
staffList
:[],
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -223,27 +587,37 @@ export default {
troubleName
:
[
{
required
:
true
,
message
:
"隐患名称不能为空"
,
trigger
:
"blur"
}
],
troubleType
:[
{
required
:
true
,
message
:
"隐患类型不能为空"
,
trigger
:
"change"
}
],
troubleLevel
:
[
{
required
:
true
,
message
:
"隐患等级不能为空"
,
trigger
:
"change"
}
],
personLiable
:
[
{
required
:
true
,
message
:
"责任人不能为空"
,
trigger
:
"blur"
}
escalation
:
[
{
required
:
true
,
message
:
"上报人不能为空"
,
trigger
:
"blur"
}
],
findTime
:
[
{
required
:
true
,
message
:
"上报时间不能为空"
,
trigger
:
"blur"
}
],
deptId
:
[
{
required
:
true
,
message
:
"部门不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"
责任
部门不能为空"
,
trigger
:
"blur"
}
],
rectificationTerm
:[
{
required
:
true
,
message
:
"整改时限不能为空"
,
trigger
:
"blur"
}
]
}
};
},
created
()
{
this
.
getList
();
this
.
getDeptList
();
this
.
getStaffList
();
this
.
getDicts
(
"t_trouble_type"
).
then
(
response
=>
{
this
.
troubleTypeOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_trouble_level"
).
then
(
response
=>
{
this
.
troubleLevelOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_trouble_type"
).
then
(
response
=>
{
this
.
troubleTypeOptions
=
response
.
data
;
});
},
methods
:
{
/** 查询隐患台账列表 */
...
...
@@ -255,41 +629,76 @@ export default {
this
.
loading
=
false
;
});
},
/** 查询员工列表 */
getStaffList
()
{
this
.
loading
=
true
;
listStaff
(
this
.
queryParams2
).
then
(
response
=>
{
this
.
staffList
=
response
.
rows
;
this
.
loading
=
false
;
}
);
},
getDeptList
()
{
listDept
({
status
:
undefined
}).
then
(
response
=>
{
this
.
deptList
=
response
.
data
;
console
.
log
(
this
.
deptList
)
});
},
// 隐患等级字典翻译
troubleLevelFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
troubleLevelOptions
,
row
.
troubleLevel
);
this
.
deptList
=
response
.
data
;
console
.
log
(
this
.
deptList
)
});
},
// 隐患类型字典翻译
troubleTypeFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
troubleTypeOptions
,
row
.
troubleType
);
},
// 隐患等级字典翻译
troubleLevelFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
troubleLevelOptions
,
row
.
troubleLevel
);
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
this
.
fileList
=
[];
this
.
fileList1
=
[];
this
.
fileList2
=
[];
},
// 表单重置
reset
()
{
this
.
form
=
{
bookId
:
null
,
troubleName
:
null
,
troubleType
:
null
,
troubleLevel
:
null
,
measures
:
null
,
troubleHarm
:
null
,
escalation
:
null
,
findTime
:
null
,
picture
:
null
,
enclosure
:
null
,
proposal
:
null
,
rectificationTerm
:
null
,
investmentCost
:
null
,
investmentMaterial
:
null
,
rectification
:
null
,
rectificationPictrue
:
null
,
rectificationText
:
null
,
rectificationTime
:
null
,
remarks
:
null
,
finishDay
:
null
,
inspectPictrue
:
null
,
inspectTime
:
null
,
inspectResult
:
null
,
personLiable
:
null
,
state
:
null
,
deptId
:
null
,
workId
:
null
,
createTime
:
null
,
createBy
:
null
createBy
:
null
,
isDel
:
null
};
this
.
resetForm
(
"form"
);
this
.
fileList
=
[];
this
.
fileList1
=
[];
this
.
fileList2
=
[];
this
.
fileList3
=
[];
},
/** 搜索按钮操作 */
handleQuery
()
{
...
...
@@ -309,22 +718,136 @@ export default {
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
zhong
=
0
;
this
.
fast
=
false
;
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加隐患台账"
;
},
handleFastAdd
()
{
this
.
reset
();
this
.
fast
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加隐患台账"
;
this
.
zhong
=
3
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
bookId
=
row
.
bookId
||
this
.
ids
getBook
(
bookId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
this
.
form
.
troubleType
==
2
){
this
.
zhong
=
1
}
else
{
this
.
zhong
=
0
}
if
(
this
.
form
.
picture
)
{
this
.
fileList
.
push
({
url
:
this
.
form
.
picture
,
});
}
if
(
this
.
form
.
rectificationPictrue
)
{
this
.
fileList1
.
push
({
url
:
this
.
form
.
rectificationPictrue
,
});
}
if
(
this
.
form
.
inspectPictrue
)
{
this
.
fileList2
.
push
({
url
:
this
.
form
.
inspectPictrue
,
});
}
if
(
this
.
form
.
enclosure
)
{
this
.
fileList3
=
[{
name
:
'file'
,
url
:
uploadfile
}];
}
this
.
open
=
true
;
this
.
title
=
"修改隐患台账"
;
});
},
handleDetail
(
row
)
{
this
.
reset
();
const
bookId
=
row
.
bookId
||
this
.
ids
getBook
(
bookId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
this
.
form
.
picture
)
{
this
.
fileList
.
push
({
url
:
this
.
form
.
picture
,
});
}
if
(
this
.
form
.
inspectPictrue
)
{
this
.
fileList2
.
push
({
url
:
this
.
form
.
inspectPictrue
,
});
}
if
(
this
.
form
.
rectificationPictrue
)
{
this
.
fileList1
.
push
({
url
:
this
.
form
.
rectificationPictrue
,
});
}
if
(
this
.
form
.
enclosure
)
{
this
.
fileList3
=
[{
name
:
'file'
,
url
:
uploadfile
}];
}
this
.
open2
=
true
;
this
.
title
=
"隐患详细信息"
;
});
},
getFileInfo
(
res
,
num
){
if
(
num
==
0
){
this
.
form
.
picture
=
res
.
url
;
}
else
if
(
num
==
1
){
this
.
form
.
rectificationPictrue
=
res
.
url
;
}
else
if
(
num
==
2
){
this
.
form
.
inspectPictrue
=
res
.
url
;
}
else
if
(
num
==
3
){
this
.
form
.
enclosure
=
res
.
url
;
this
.
fileList3
.
push
({
name
:
res
.
fileName
,
url
:
uploadfile
,
});
console
.
log
(
this
.
fileList3
)
}
//this.form.picture = res.url;
//this.$set(this.feedBookForm,'iconUrl',res.url)
},
listRemove
(
e
,
num
)
{
console
.
log
(
e
)
if
(
num
==
0
){
this
.
fileList
=
[];
this
.
form
.
picture
=
""
;
}
else
if
(
num
==
1
){
this
.
fileList1
=
[];
this
.
form
.
rectificationPictrue
=
""
;
}
else
if
(
num
==
2
){
this
.
fileList2
=
[];
this
.
form
.
inspectPictrue
=
""
;
}
else
if
(
num
==
3
){
this
.
fileList3
=
[];
this
.
form
.
enclosure
=
""
;
}
},
showPicture
(
row
){
this
.
$refs
[
'a'
+
row
.
id
].
showViewer
=
true
;
console
.
log
(
"==="
,
row
.
id
);
},
changeType
(){
console
.
log
(
this
.
form
.
troubleType
);
if
(
this
.
form
.
troubleType
==
3
){
this
.
zhong
=
2
;
}
else
if
(
this
.
form
.
troubleType
==
2
){
this
.
zhong
=
1
;
}
else
{
this
.
zhong
=
0
;
}
},
/** 提交按钮 */
submitForm
()
{
console
.
log
(
this
.
form
);
if
(
this
.
fast
){
this
.
form
.
state
=
2
;
}
else
if
(
this
.
form
.
troubleType
==
3
){
this
.
form
.
state
=
1
;
}
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
bookId
!=
null
)
{
...
...
@@ -376,10 +899,21 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.allone
{
display
:flex
;
flex-direction
:row
;
justify-content
:flex-start
;
}
::v-deep
.el-select
{
width
:
100%
;
}
::v-deep
.el-dialog
{
margin-top
:
15vh
!
important
;
::v-deep
.el-dialog__header
{
border-bottom
:
1px
solid
#ccc
;
}
::v-deep
.el-date-editor.el-input
{
width
:
100%
;
}
::v-deep
.el-input.is-disabled
.el-input__inner
{
color
:
#606266
;
}
</
style
>
danger-manage-web/src/views/system/workCheck/index.vue
View file @
3b08e4b5
...
...
@@ -201,7 +201,7 @@
<!--</el-form-item>-->
<el-form-item
label=
"责任部门"
prop=
"deptId"
>
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<el-select
v-model=
"form.deptId"
placeholder=
"请选择责任部门"
>
<el-select
v-model=
"form.deptId"
filterable
placeholder=
"请选择责任部门"
>
<el-option
v-for=
"dict in deptList"
:key=
"dict.deptId"
...
...
@@ -215,17 +215,17 @@
<!--<el-form-item label="关联隐患" prop="bookId">-->
<!--<el-input v-model="form.bookId" placeholder="请" />-->
<!--</el-form-item>-->
<
el-form-item
label=
"关联隐患"
prop=
"bookId"
>
<!--
<el-input v-model="form.deptId" placeholder="请输入部门id" />
-->
<
el-select
v-model=
"form.bookId"
placeholder=
"请选择关联隐患"
>
<
el-option
v-for=
"dict in bookList"
:key=
"dict.bookId"
:label=
"dict.troubleName"
:value=
"parseInt(dict.bookId)"
></el-option
>
<
/el-select
>
<
/el-form-item
>
<
!--<el-form-item label="关联隐患" prop="bookId">--
>
<!--
<!–<el-input v-model="form.deptId" placeholder="请输入部门id" />–>
-->
<
!--<el-select v-model="form.bookId" placeholder="请选择关联隐患">--
>
<
!--<el-option-->
<!--v-for="dict in bookList"-->
<!--:key="dict.bookId"-->
<!--:label="dict.troubleName"-->
<!--:value="parseInt(dict.bookId)"-->
<!--></el-option>--
>
<
!--</el-select>--
>
<
!--</el-form-item>--
>
<el-form-item
label=
"任务范围"
prop=
"workRange"
>
<el-input
v-model=
"form.workRange"
placeholder=
"请输入任务范围"
/>
</el-form-item>
...
...
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