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
1e8e04e4
Commit
1e8e04e4
authored
Aug 29, 2023
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.隐患排查任务还没有开始的时候,增加修改功能,开始后不可修改。2.隐患排查任务,选责任部门,再选风险点和责任人。3.任务详情,排查内容显示的不对。
parent
47bb5fb9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
32 deletions
+101
-32
THiddenTroubleWorkController.java
...controller/hiddenDanger/THiddenTroubleWorkController.java
+6
-0
THiddenTroubleWork.java
...ain/java/com/zehong/system/domain/THiddenTroubleWork.java
+19
-0
TRiskManagerMapper.java
...ain/java/com/zehong/system/mapper/TRiskManagerMapper.java
+1
-0
THiddenTroubleWorkServiceImpl.java
...ng/system/service/impl/THiddenTroubleWorkServiceImpl.java
+13
-2
THiddenTroubleWorkMapper.xml
...main/resources/mapper/system/THiddenTroubleWorkMapper.xml
+2
-1
TRiskManagerMapper.xml
...m/src/main/resources/mapper/system/TRiskManagerMapper.xml
+6
-0
index.vue
danger-manage-web/src/views/system/workCheck/index.vue
+54
-29
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/hiddenDanger/THiddenTroubleWorkController.java
View file @
1e8e04e4
package
com
.
zehong
.
web
.
controller
.
hiddenDanger
;
import
java.util.Date
;
import
java.util.List
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.core.domain.model.LoginUser
;
import
com.zehong.common.utils.ServletUtils
;
...
...
@@ -108,6 +110,10 @@ public class THiddenTroubleWorkController extends BaseController
@PutMapping
public
AjaxResult
edit
(
@RequestBody
THiddenTroubleWork
tHiddenTroubleWork
)
{
THiddenTroubleWork
work
=
tHiddenTroubleWorkService
.
selectTHiddenTroubleWorkById
(
tHiddenTroubleWork
.
getWorkId
());
if
(
work
.
getWorkBeginTime
().
getTime
()<
new
Date
().
getTime
()){
return
AjaxResult
.
error
(
"任务已开始,不可修改"
);
}
return
toAjax
(
tHiddenTroubleWorkService
.
updateTHiddenTroubleWork
(
tHiddenTroubleWork
));
}
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/THiddenTroubleWork.java
View file @
1e8e04e4
...
...
@@ -90,9 +90,28 @@ public class THiddenTroubleWork extends BaseEntity
private
Integer
isDel
;
private
List
<
THiddenTroubleWork
>
children
;
private
List
<
TRiskManager
>
riskList
;
private
Integer
limits
=
0
;
private
Integer
isupdate
=
0
;
public
List
<
TRiskManager
>
getRiskList
()
{
return
riskList
;
}
public
void
setRiskList
(
List
<
TRiskManager
>
riskList
)
{
this
.
riskList
=
riskList
;
}
public
Integer
getIsupdate
()
{
return
isupdate
;
}
public
void
setIsupdate
(
Integer
isupdate
)
{
this
.
isupdate
=
isupdate
;
}
public
Long
getStaffId
()
{
return
staffId
;
}
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/TRiskManagerMapper.java
View file @
1e8e04e4
...
...
@@ -60,4 +60,5 @@ public interface TRiskManagerMapper
public
int
deleteTRiskManagerByIds
(
Long
[]
ids
);
public
String
selectNamesByid
(
String
[]
ids
);
public
List
<
TRiskManager
>
selectByids
(
String
[]
ids
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/THiddenTroubleWorkServiceImpl.java
View file @
1e8e04e4
...
...
@@ -8,8 +8,10 @@ import java.util.List;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.THiddenTroubleAssessment
;
import
com.zehong.system.domain.TRiskManager
;
import
com.zehong.system.domain.TStaningBook
;
import
com.zehong.system.mapper.THiddenTroubleAssessmentMapper
;
import
com.zehong.system.mapper.TRiskManagerMapper
;
import
com.zehong.system.mapper.TStaningBookMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -32,7 +34,7 @@ public class THiddenTroubleWorkServiceImpl implements ITHiddenTroubleWorkService
@Autowired
private
THiddenTroubleWorkMapper
tHiddenTroubleWorkMapper
;
@Autowired
private
T
StaningBookMapper
tStaningBook
Mapper
;
private
T
RiskManagerMapper
tRiskManager
Mapper
;
@Autowired
private
THiddenTroubleAssessmentMapper
tHiddenTroubleAssessmentMapper
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
THiddenTroubleWorkServiceImpl
.
class
);
...
...
@@ -46,7 +48,11 @@ public class THiddenTroubleWorkServiceImpl implements ITHiddenTroubleWorkService
@Override
public
THiddenTroubleWork
selectTHiddenTroubleWorkById
(
Long
workId
)
{
return
tHiddenTroubleWorkMapper
.
selectTHiddenTroubleWorkById
(
workId
);
THiddenTroubleWork
work
=
tHiddenTroubleWorkMapper
.
selectTHiddenTroubleWorkById
(
workId
);
work
.
setRiskList
(
tRiskManagerMapper
.
selectByids
(
work
.
getContent
().
split
(
","
)));
return
work
;
}
/**
...
...
@@ -59,6 +65,11 @@ public class THiddenTroubleWorkServiceImpl implements ITHiddenTroubleWorkService
public
List
<
THiddenTroubleWork
>
selectTHiddenTroubleWorkList
(
THiddenTroubleWork
tHiddenTroubleWork
)
{
List
<
THiddenTroubleWork
>
list
=
tHiddenTroubleWorkMapper
.
selectTHiddenTroubleWorkList
(
tHiddenTroubleWork
);
for
(
THiddenTroubleWork
t
:
list
){
if
(
t
.
getWorkBeginTime
().
getTime
()>
new
Date
().
getTime
()){
t
.
setIsupdate
(
1
);
}
}
if
(
tHiddenTroubleWork
.
getParentId
()==
0
){
for
(
THiddenTroubleWork
w
:
list
){
THiddenTroubleWork
tw
=
new
THiddenTroubleWork
();
...
...
danger-manage-system/src/main/resources/mapper/system/THiddenTroubleWorkMapper.xml
View file @
1e8e04e4
...
...
@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTHiddenTroubleWorkById"
parameterType=
"Long"
resultMap=
"THiddenTroubleWorkResult"
>
SELECT tw.work_id, tw.parent_id, tw.book_id, tw.work_cycle, tw.work_name, tw.work_type, tw.work_form, tw.work_begin_time, tw.work_end_time,tw.finish_time,
tw.time_term, tw.work_range, tw.dept_id, tw.work_step, tw.content, tw.create_time, tw.create_by, tw.is_del,
d.dept_name,b.trouble_name
d.dept_name,b.trouble_name
,tw.staff_id,tw.content
FROM t_hidden_trouble_work tw
LEFT JOIN sys_dept d ON d.dept_id = tw.dept_id
LEFT JOIN t_staning_book b ON b.book_id = tw.book_id
...
...
@@ -137,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"timeTerm != null"
>
time_term = #{timeTerm},
</if>
<if
test=
"workRange != null"
>
work_range = #{workRange},
</if>
<if
test=
"deptId != null"
>
dept_id = #{deptId},
</if>
<if
test=
"staffId != null"
>
staff_id = #{staffId},
</if>
<if
test=
"workStep != null"
>
work_step = #{workStep},
</if>
<if
test=
"content != null"
>
content = #{content},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
...
...
danger-manage-system/src/main/resources/mapper/system/TRiskManagerMapper.xml
View file @
1e8e04e4
...
...
@@ -89,4 +89,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</select>
<select
id=
"selectByids"
parameterType=
"string"
resultMap=
"TRiskManagerResult"
>
SELECT * from t_risk_manager WHERE id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
</mapper>
\ No newline at end of file
danger-manage-web/src/views/system/workCheck/index.vue
View file @
1e8e04e4
...
...
@@ -96,6 +96,13 @@
</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.isupdate == 1"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<el-button
v-if =
"scope.row.workCycle==1 || scope.row.parentId!=0"
size=
"mini"
...
...
@@ -199,17 +206,17 @@
<!--<el-form-item label="责任部门" prop="deptId">-->
<!--<el-input v-model="form.deptId" placeholder="请输入责任部门" />-->
<!--</el-form-item>-->
<
!--<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-form-item
label=
"责任部门"
prop=
"deptId"
>
<!--
<el-input v-model="form.deptId" placeholder="请输入部门id" />
-->
<
el-select
v-model=
"form.deptId"
@
change=
"selectUserList"
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-form-item
label=
"责任人"
prop=
"staffId"
>
<el-select
v-model=
"form.staffId"
filterable
placeholder=
"请选择责任人"
>
<el-option
...
...
@@ -247,7 +254,7 @@
v-for=
"dict in libraryList"
:key=
"dict.libraryId"
:label=
"dict.riskPointName+'——'+dict.inspectTerm"
:value=
"
parseInt(dict.libraryId)
"
:value=
"
dict.libraryId
"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -267,9 +274,9 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
title=
"排查记录列表"
:visible
.
sync=
"open2"
width=
"1
2
00px"
append-to-body
>
<el-dialog
title=
"排查记录列表"
:visible
.
sync=
"open2"
width=
"1
3
00px"
append-to-body
>
<el-row
:gutter=
"24"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
7
"
>
<div
class=
"div-left"
>
<div
style=
"font-size: 22px;text-align: center;padding: 10px 0 0 0;"
>
任务信息
</div>
<el-form
label-width=
"80px"
style=
"padding: 15px 0 0 0;width: 95%"
>
...
...
@@ -277,9 +284,9 @@
<el-form-item
label=
"任务名称:"
style=
"margin-bottom: 10px"
>
<span>
{{workInfo.workName}}
</span>
</el-form-item>
<
el-form-item
label=
"关联隐患:"
style=
"margin-bottom: 10px"
>
<
span>
{{workInfo.troubleName}}
</span
>
<
/el-form-item
>
<
!--<el-form-item label="关联隐患:" style="margin-bottom: 10px">--
>
<
!--<span>{{workInfo.troubleName}}</span>--
>
<
!--</el-form-item>--
>
<el-form-item
label=
"任务周期:"
style=
"margin-bottom: 10px"
>
<span>
{{workInfo.workCycle}}
</span>
</el-form-item>
...
...
@@ -305,15 +312,22 @@
</el-form-item>
<el-form-item
label=
"排查内容"
prop=
"content"
>
<dl
v-html=
"workInfo.content"
>
{{workInfo.content}}
</dl>
<!--<dl v-html="workInfo.content">-->
<!--{{workInfo.riskList}}-->
<!--</dl>-->
<!--<editor v-model="workInfo.content" :min-height="200"/>-->
</el-form-item>
<div
style=
"width: 100%;margin-top: -20px"
>
<div
style=
"width: 90%;margin-left: 8%;margin-top: 10px"
v-for=
"item in workInfo.riskList"
>
{{item.riskControl}}
</div>
</div>
</el-form>
</div>
</el-col>
<el-col
:span=
"1
8
"
>
<el-col
:span=
"1
7
"
>
<el-table
v-loading=
"loading"
:data=
"childrenList"
height=
"535px"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"workName"
/>
<el-table-column
label=
"排查开始时间"
align=
"center"
prop=
"workBeginTime"
width=
"180"
>
...
...
@@ -632,7 +646,7 @@ export default {
created
()
{
this
.
getList
();
this
.
getDeptList
();
this
.
selectUserList
();
//
this.selectUserList();
this
.
getBookList
();
this
.
getDicts
(
"work_type"
).
then
(
response
=>
{
this
.
workCycleOptions
=
response
.
data
;
...
...
@@ -646,9 +660,7 @@ export default {
this
.
getDicts
(
"assessment_level"
).
then
(
response
=>
{
this
.
assessmentLevelOptions
=
response
.
data
;
});
listLibrary
({
pageNum
:
1
,
pageSize
:
1000
}).
then
(
response
=>
{
this
.
libraryList
=
response
.
rows
;
});
},
methods
:
{
/** 查询隐患排查任务列表 */
...
...
@@ -746,15 +758,23 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
var
turnNum
=
function
(
nums
){
return
nums
.
map
(
Number
);
}
const
workId
=
row
.
workId
||
this
.
ids
getWorkCheck
(
workId
).
then
(
response
=>
{
response
.
data
.
libraryId
=
turnNum
(
response
.
data
.
content
.
split
(
","
));
this
.
form
=
response
.
data
;
// this.form.libraryId = [11] //= turnNum(this.form.content.split(","));
console
.
log
(
this
.
form
)
this
.
open
=
true
;
this
.
title
=
"修改隐患排查任务"
;
});
},
/** 提交按钮 */
submitForm
()
{
console
.
log
(
this
.
form
.
libraryId
);
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form
.
content
=
this
.
form
.
libraryId
.
toString
();
...
...
@@ -837,11 +857,15 @@ export default {
});
},
// 查询用户列表
selectUserList
(){
listStaff
({
pageNum
:
1
,
pageSize
:
99999
}).
then
(
response
=>
{
selectUserList
(
deptId
){
console
.
log
(
deptId
);
listStaff
({
pageNum
:
1
,
pageSize
:
99999
,
deptId
:
deptId
}).
then
(
response
=>
{
console
.
log
(
response
.
rows
);
this
.
userList
=
response
.
rows
;
});
});
listLibrary
({
pageNum
:
1
,
pageSize
:
10000
,
deptId
:
deptId
}).
then
(
response
=>
{
this
.
libraryList
=
response
.
rows
;
});
},
selectLibrary
(
val
){
for
(
var
i
=
0
;
i
<
this
.
libraryList
.
length
;
i
++
){
...
...
@@ -895,9 +919,10 @@ export default {
min-height
:
500px
;
}
.div-left
{
min-
height
:
530px
;
height
:
530px
;
border-radius
:
10px
;
background
:
white
;
overflow-y
:
auto
;
}
dl
{
...
...
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