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
7070bd76
Commit
7070bd76
authored
Dec 19, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患修改
parent
c8a7eef9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
262 additions
and
90 deletions
+262
-90
THiddenLibrary.java
...rc/main/java/com/zehong/system/domain/THiddenLibrary.java
+70
-4
THiddenTroubleWork.java
...ain/java/com/zehong/system/domain/THiddenTroubleWork.java
+20
-0
THiddenLibraryMapper.xml
...src/main/resources/mapper/system/THiddenLibraryMapper.xml
+28
-8
THiddenTroubleWorkMapper.xml
...main/resources/mapper/system/THiddenTroubleWorkMapper.xml
+4
-1
index.vue
danger-manage-web/src/views/system/library/index.vue
+96
-55
index.vue
danger-manage-web/src/views/system/workCheck/index.vue
+44
-22
No files found.
danger-manage-system/src/main/java/com/zehong/system/domain/THiddenLibrary.java
View file @
7070bd76
...
@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
...
@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 隐患排查库对象 t_hidden_library
* 隐患排查库对象 t_hidden_library
*
*
* @author zehong
* @author zehong
* @date 2022-
07-13
* @date 2022-
12-12
*/
*/
public
class
THiddenLibrary
extends
BaseEntity
public
class
THiddenLibrary
extends
BaseEntity
{
{
...
@@ -18,15 +18,41 @@ public class THiddenLibrary extends BaseEntity
...
@@ -18,15 +18,41 @@ public class THiddenLibrary extends BaseEntity
/** $column.columnComment */
/** $column.columnComment */
private
Long
libraryId
;
private
Long
libraryId
;
/** 部门id */
@Excel
(
name
=
"部门id"
)
private
Long
deptId
;
private
String
deptName
;
/** 风险点 */
@Excel
(
name
=
"风险点"
)
private
String
riskPoint
;
/** 检查项目 */
@Excel
(
name
=
"检查项目"
)
private
String
inspectTerm
;
/** 检查依据 */
@Excel
(
name
=
"检查依据"
)
private
String
inspectBasis
;
/** 排查库标题 */
/** 排查库标题 */
@Excel
(
name
=
"排查库标题"
)
@Excel
(
name
=
"排查库标题"
)
private
String
libraryName
;
private
String
libraryName
;
/**
排查库内容
*/
/**
内容以及标准
*/
@Excel
(
name
=
"
排查库内容
"
)
@Excel
(
name
=
"
内容以及标准
"
)
private
String
libraryContent
;
private
String
libraryContent
;
public
void
setLibraryId
(
Long
libraryId
)
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
void
setLibraryId
(
Long
libraryId
)
{
{
this
.
libraryId
=
libraryId
;
this
.
libraryId
=
libraryId
;
}
}
...
@@ -35,6 +61,42 @@ public class THiddenLibrary extends BaseEntity
...
@@ -35,6 +61,42 @@ public class THiddenLibrary extends BaseEntity
{
{
return
libraryId
;
return
libraryId
;
}
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setRiskPoint
(
String
riskPoint
)
{
this
.
riskPoint
=
riskPoint
;
}
public
String
getRiskPoint
()
{
return
riskPoint
;
}
public
void
setInspectTerm
(
String
inspectTerm
)
{
this
.
inspectTerm
=
inspectTerm
;
}
public
String
getInspectTerm
()
{
return
inspectTerm
;
}
public
void
setInspectBasis
(
String
inspectBasis
)
{
this
.
inspectBasis
=
inspectBasis
;
}
public
String
getInspectBasis
()
{
return
inspectBasis
;
}
public
void
setLibraryName
(
String
libraryName
)
public
void
setLibraryName
(
String
libraryName
)
{
{
this
.
libraryName
=
libraryName
;
this
.
libraryName
=
libraryName
;
...
@@ -58,6 +120,10 @@ public class THiddenLibrary extends BaseEntity
...
@@ -58,6 +120,10 @@ public class THiddenLibrary extends BaseEntity
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"libraryId"
,
getLibraryId
())
.
append
(
"libraryId"
,
getLibraryId
())
.
append
(
"deptId"
,
getDeptId
())
.
append
(
"riskPoint"
,
getRiskPoint
())
.
append
(
"inspectTerm"
,
getInspectTerm
())
.
append
(
"inspectBasis"
,
getInspectBasis
())
.
append
(
"libraryName"
,
getLibraryName
())
.
append
(
"libraryName"
,
getLibraryName
())
.
append
(
"libraryContent"
,
getLibraryContent
())
.
append
(
"libraryContent"
,
getLibraryContent
())
.
toString
();
.
toString
();
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/THiddenTroubleWork.java
View file @
7070bd76
...
@@ -75,6 +75,10 @@ public class THiddenTroubleWork extends BaseEntity
...
@@ -75,6 +75,10 @@ public class THiddenTroubleWork extends BaseEntity
@Excel
(
name
=
"责任部门"
)
@Excel
(
name
=
"责任部门"
)
private
String
deptName
;
private
String
deptName
;
private
Long
staffId
;
private
String
staffName
;
/** 任务进展 */
/** 任务进展 */
@Excel
(
name
=
"任务进展 "
)
@Excel
(
name
=
"任务进展 "
)
private
Integer
workStep
;
private
Integer
workStep
;
...
@@ -89,6 +93,22 @@ public class THiddenTroubleWork extends BaseEntity
...
@@ -89,6 +93,22 @@ public class THiddenTroubleWork extends BaseEntity
private
Integer
limits
=
0
;
private
Integer
limits
=
0
;
public
Long
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
Long
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
Integer
getLimits
()
{
public
Integer
getLimits
()
{
return
limits
;
return
limits
;
}
}
...
...
danger-manage-system/src/main/resources/mapper/system/THiddenLibraryMapper.xml
View file @
7070bd76
...
@@ -6,18 +6,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -6,18 +6,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"THiddenLibrary"
id=
"THiddenLibraryResult"
>
<resultMap
type=
"THiddenLibrary"
id=
"THiddenLibraryResult"
>
<result
property=
"libraryId"
column=
"library_id"
/>
<result
property=
"libraryId"
column=
"library_id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"riskPoint"
column=
"risk_point"
/>
<result
property=
"inspectTerm"
column=
"inspect_term"
/>
<result
property=
"inspectBasis"
column=
"inspect_basis"
/>
<result
property=
"libraryName"
column=
"library_name"
/>
<result
property=
"libraryName"
column=
"library_name"
/>
<result
property=
"libraryContent"
column=
"library_content"
/>
<result
property=
"libraryContent"
column=
"library_content"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTHiddenLibraryVo"
>
<sql
id=
"selectTHiddenLibraryVo"
>
select library_id, library_name, library_content from t_hidden_library
SELECT h.library_id, h.dept_id, h.risk_point, h.inspect_term, h.inspect_basis, h.library_name, h.library_content ,
d.`dept_name`
FROM t_hidden_library h LEFT JOIN sys_dept d ON d.dept_id = h.dept_id
</sql>
</sql>
<select
id=
"selectTHiddenLibraryList"
parameterType=
"THiddenLibrary"
resultMap=
"THiddenLibraryResult"
>
<select
id=
"selectTHiddenLibraryList"
parameterType=
"THiddenLibrary"
resultMap=
"THiddenLibraryResult"
>
<include
refid=
"selectTHiddenLibraryVo"
/>
<include
refid=
"selectTHiddenLibraryVo"
/>
<where>
<where>
<if
test=
"libraryName != null and libraryName != ''"
>
and library_name like concat('%', #{libraryName}, '%')
</if>
<if
test=
"deptId != null "
>
and dept_id = #{deptId}
</if>
<if
test=
"riskPoint != null and riskPoint != ''"
>
and risk_point like concat('%', #{riskPoint}, '%')
</if>
</where>
</where>
</select>
</select>
...
@@ -29,20 +37,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -29,20 +37,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"insertTHiddenLibrary"
parameterType=
"THiddenLibrary"
useGeneratedKeys=
"true"
keyProperty=
"libraryId"
>
<insert
id=
"insertTHiddenLibrary"
parameterType=
"THiddenLibrary"
useGeneratedKeys=
"true"
keyProperty=
"libraryId"
>
insert into t_hidden_library
insert into t_hidden_library
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"libraryName != null and libraryName != ''"
>
library_name,
</if>
<if
test=
"deptId != null"
>
dept_id,
</if>
<if
test=
"libraryContent != null and libraryContent != ''"
>
library_content,
</if>
<if
test=
"riskPoint != null"
>
risk_point,
</if>
<if
test=
"inspectTerm != null"
>
inspect_term,
</if>
<if
test=
"inspectBasis != null"
>
inspect_basis,
</if>
<if
test=
"libraryName != null"
>
library_name,
</if>
<if
test=
"libraryContent != null"
>
library_content,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"libraryName != null and libraryName != ''"
>
#{libraryName},
</if>
<if
test=
"deptId != null"
>
#{deptId},
</if>
<if
test=
"libraryContent != null and libraryContent != ''"
>
#{libraryContent},
</if>
<if
test=
"riskPoint != null"
>
#{riskPoint},
</if>
<if
test=
"inspectTerm != null"
>
#{inspectTerm},
</if>
<if
test=
"inspectBasis != null"
>
#{inspectBasis},
</if>
<if
test=
"libraryName != null"
>
#{libraryName},
</if>
<if
test=
"libraryContent != null"
>
#{libraryContent},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateTHiddenLibrary"
parameterType=
"THiddenLibrary"
>
<update
id=
"updateTHiddenLibrary"
parameterType=
"THiddenLibrary"
>
update t_hidden_library
update t_hidden_library
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"libraryName != null and libraryName != ''"
>
library_name = #{libraryName},
</if>
<if
test=
"deptId != null"
>
dept_id = #{deptId},
</if>
<if
test=
"libraryContent != null and libraryContent != ''"
>
library_content = #{libraryContent},
</if>
<if
test=
"riskPoint != null"
>
risk_point = #{riskPoint},
</if>
<if
test=
"inspectTerm != null"
>
inspect_term = #{inspectTerm},
</if>
<if
test=
"inspectBasis != null"
>
inspect_basis = #{inspectBasis},
</if>
<if
test=
"libraryName != null"
>
library_name = #{libraryName},
</if>
<if
test=
"libraryContent != null"
>
library_content = #{libraryContent},
</if>
</trim>
</trim>
where library_id = #{libraryId}
where library_id = #{libraryId}
</update>
</update>
...
...
danger-manage-system/src/main/resources/mapper/system/THiddenTroubleWorkMapper.xml
View file @
7070bd76
...
@@ -20,6 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -20,6 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"workRange"
column=
"work_range"
/>
<result
property=
"workRange"
column=
"work_range"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"staffId"
column=
"staff_id"
/>
<result
property=
"staffName"
column=
"staff_name"
/>
<result
property=
"workStep"
column=
"work_step"
/>
<result
property=
"workStep"
column=
"work_step"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
@@ -34,9 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -34,9 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTHiddenTroubleWorkList"
parameterType=
"THiddenTroubleWork"
resultMap=
"THiddenTroubleWorkResult"
>
<select
id=
"selectTHiddenTroubleWorkList"
parameterType=
"THiddenTroubleWork"
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,
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,
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
,u.`staff_name`,tw.`staff_id`
FROM t_hidden_trouble_work tw
FROM t_hidden_trouble_work tw
LEFT JOIN sys_dept d ON d.dept_id = tw.dept_id
LEFT JOIN sys_dept d ON d.dept_id = tw.dept_id
LEFT JOIN sys_user u ON u.`user_id` = tw.`staff_id`
LEFT JOIN t_staning_book b ON b.book_id = tw.book_id
LEFT JOIN t_staning_book b ON b.book_id = tw.book_id
<where>
<where>
<if
test=
"parentId != null "
>
and tw.parent_id = #{parentId}
</if>
<if
test=
"parentId != null "
>
and tw.parent_id = #{parentId}
</if>
...
...
danger-manage-web/src/views/system/library/index.vue
View file @
7070bd76
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"排查库标题"
prop=
"libraryName"
>
<el-form-item
label=
"所属部门"
prop=
"deptId"
>
<treeselect
v-model=
"queryParams.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
/>
<!--
<el-select
v-model=
"queryParams.deptId"
filterable
placeholder=
"请选择部门"
>
-->
<!--
<el-option-->
<!--v-for="item in deptList"-->
<!--:key="item.deptId"-->
<!--:label="item.deptName"-->
<!--:value="item.deptId"-->
<!-->-->
<!--
</el-option>
-->
<!--
</el-select>
-->
</el-form-item>
<el-form-item
label=
"风险点"
prop=
"riskPoint"
>
<el-input
<el-input
v-model=
"queryParams.
libraryName
"
v-model=
"queryParams.
riskPoint
"
placeholder=
"请输入
排查库标题
"
placeholder=
"请输入
风险点
"
clearable
clearable
size=
"small"
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
...
@@ -27,28 +39,7 @@
...
@@ -27,28 +39,7 @@
v-hasPermi=
"['system:library:add']"
v-hasPermi=
"['system:library:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</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:library: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:library:remove']"-->
<!-->删除
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
type=
"warning"
...
@@ -65,16 +56,13 @@
...
@@ -65,16 +56,13 @@
<el-table
v-loading=
"loading"
:data=
"libraryList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"libraryList"
@
selection-change=
"handleSelectionChange"
>
<!--
<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=
"libraryId"
/>
<!--
<el-table-column
label=
"风险点"
align=
"center"
prop=
"libraryId"
/>
-->
<el-table-column
label=
"排查库标题"
align=
"center"
prop=
"libraryName"
/>
<el-table-column
label=
"所属部门"
align=
"center"
prop=
"deptName"
/>
<el-table-column
label=
"排查库内容"
align=
"center"
prop=
"libraryContent"
>
<el-table-column
label=
"风险点"
align=
"center"
prop=
"riskPoint"
/>
<template
slot-scope=
"scope"
>
<el-table-column
label=
"隐患名称"
align=
"center"
prop=
"inspectTerm"
/>
<dl
v-html=
"scope.row.libraryContent"
>
<el-table-column
label=
"检查依据"
align=
"center"
prop=
"inspectBasis"
/>
{{
scope
.
row
.
libraryContent
}}
<!--
<el-table-column
label=
"排查库标题"
align=
"center"
prop=
"libraryName"
/>
-->
</dl>
<el-table-column
label=
"内容以及标准"
align=
"center"
prop=
"libraryContent"
/>
</
template
>
</el-table-column>
<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"
>
<el-button
<el-button
...
@@ -105,12 +93,36 @@
...
@@ -105,12 +93,36 @@
<!-- 添加或修改隐患排查库对话框 -->
<!-- 添加或修改隐患排查库对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
style=
"width: 95%"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"排查库标题"
prop=
"libraryName"
>
<el-form-item
label=
"所属部门"
prop=
"deptId"
>
<el-input
v-model=
"form.libraryName"
placeholder=
"请输入排查库标题"
/>
<treeselect
v-model=
"form.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
/>
<!--<el-select v-model="form.deptId" filterable placeholder="请选择部门" >-->
<!--<el-option-->
<!--v-for="item in deptList"-->
<!--:key="item.deptId"-->
<!--:label="item.deptName"-->
<!--:value="item.deptId"-->
<!-->-->
<!--</el-option>-->
<!--</el-select>-->
</el-form-item>
<!--<el-form-item label="所属部门" prop="deptId">-->
<!--<el-input v-model="form.deptId" placeholder="请输入部门" />-->
<!--</el-form-item>-->
<el-form-item
label=
"风险点"
prop=
"riskPoint"
>
<el-input
v-model=
"form.riskPoint"
placeholder=
"请输入风险点"
/>
</el-form-item>
<el-form-item
label=
"隐患名称"
prop=
"inspectTerm"
>
<el-input
v-model=
"form.inspectTerm"
placeholder=
"请输入隐患名称"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"排查库内容"
prop=
"libraryContent"
>
<el-form-item
label=
"检查依据"
prop=
"inspectBasis"
>
<editor
v-model=
"form.libraryContent"
:min-height=
"192"
/>
<el-input
type=
"textarea"
v-model=
"form.inspectBasis"
placeholder=
"请输入检查依据"
/>
</el-form-item>
<!--<el-form-item label="排查库标题" prop="libraryName">-->
<!--<el-input v-model="form.libraryName" placeholder="请输入排查库标题" />-->
<!--</el-form-item>-->
<el-form-item
label=
"内容以及标准"
prop=
"libraryContent"
>
<el-input
type=
"textarea"
v-model=
"form.libraryContent"
:min-height=
"192"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -124,11 +136,13 @@
...
@@ -124,11 +136,13 @@
<
script
>
<
script
>
import
{
listLibrary
,
getLibrary
,
delLibrary
,
addLibrary
,
updateLibrary
,
exportLibrary
}
from
"@/api/system/library"
;
import
{
listLibrary
,
getLibrary
,
delLibrary
,
addLibrary
,
updateLibrary
,
exportLibrary
}
from
"@/api/system/library"
;
import
Editor
from
'@/components/Editor'
;
import
Editor
from
'@/components/Editor'
;
import
{
treeselect
}
from
"@/api/system/dept"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
export
default
{
export
default
{
name
:
"Library"
,
name
:
"Library"
,
components
:
{
components
:
{
Editor
,
Editor
,
Treeselect
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -148,31 +162,45 @@ export default {
...
@@ -148,31 +162,45 @@ export default {
total
:
0
,
total
:
0
,
// 隐患排查库表格数据
// 隐患排查库表格数据
libraryList
:
[],
libraryList
:
[],
deptList
:[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
// 部门树选项
deptOptions
:
undefined
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
libraryName
:
null
,
deptId
:
null
,
riskPoint
:
null
,
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
libraryName
:
[
deptId
:
[
{
required
:
true
,
message
:
"排查库标题不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"部门不能为空"
,
trigger
:
"change"
}
],
riskPoint
:
[
{
required
:
true
,
message
:
"风险点不能为空"
,
trigger
:
"change"
}
],
],
libraryContent
:
[
inspectTerm
:
[
{
required
:
true
,
message
:
"排查库内容不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"隐患名称不能为空"
,
trigger
:
"change"
}
]
],
inspectBasis
:
[
{
required
:
true
,
message
:
"检查依据不能为空"
,
trigger
:
"change"
}
],
// libraryContent: [
// { required: true, message: "内容/标准不能为空", trigger: "change" }
// ],
}
}
};
};
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getTreeselect
();
},
},
methods
:
{
methods
:
{
/** 查询隐患排查库列表 */
/** 查询隐患排查库列表 */
...
@@ -193,6 +221,10 @@ export default {
...
@@ -193,6 +221,10 @@ export default {
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
libraryId
:
null
,
libraryId
:
null
,
deptId
:
null
,
riskPoint
:
null
,
inspectTerm
:
null
,
inspectBasis
:
null
,
libraryName
:
null
,
libraryName
:
null
,
libraryContent
:
null
libraryContent
:
null
};
};
...
@@ -264,6 +296,18 @@ export default {
...
@@ -264,6 +296,18 @@ export default {
this
.
msgSuccess
(
"删除成功"
);
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
/** 查询部门列表 */
// getDeptList() {
// listDept().then(response => {
// this.deptList = response.data;
// });
// },
/** 查询部门下拉树结构 */
getTreeselect
()
{
treeselect
().
then
(
response
=>
{
this
.
deptOptions
=
response
.
data
;
});
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
const
queryParams
=
this
.
queryParams
;
...
@@ -283,13 +327,10 @@ export default {
...
@@ -283,13 +327,10 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
dl
{
::v-deep
.vue-treeselect
{
margin
:
0
;
width
:
200px
;
}
::v-deep
p
{
margin
:
0
;
}
}
::v-deep
.el-form-item
__label
{
::v-deep
.el-form-item
--medium
.el-form-item__content
{
width
:
110px
!
important
;
line-height
:
34px
;
}
}
</
style
>
</
style
>
danger-manage-web/src/views/system/workCheck/index.vue
View file @
7070bd76
...
@@ -199,15 +199,26 @@
...
@@ -199,15 +199,26 @@
<!--<el-form-item label="责任部门" prop="deptId">-->
<!--<el-form-item label="责任部门" prop="deptId">-->
<!--<el-input v-model="form.deptId" placeholder="请输入责任部门" />-->
<!--<el-input v-model="form.deptId" placeholder="请输入责任部门" />-->
<!--</el-form-item>-->
<!--</el-form-item>-->
<el-form-item
label=
"责任部门"
prop=
"deptId"
>
<!--<el-form-item label="责任部门" prop="deptId">-->
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<!--<!–<el-input v-model="form.deptId" placeholder="请输入部门id" />–>-->
<el-select
v-model=
"form.deptId"
filterable
placeholder=
"请选择责任部门"
>
<!--<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-select
v-model=
"form.staffId"
filterable
placeholder=
"请选择责任人"
>
<el-option
<el-option
v-for=
"dict in deptList"
v-for=
"item in userList"
:key=
"dict.deptId"
:key=
"item.staffId"
:label=
"dict.deptName"
:label=
"item.staffName"
:value=
"parseInt(dict.deptId)"
:value=
"item.staffId"
></el-option>
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -231,18 +242,18 @@
...
@@ -231,18 +242,18 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"排查库"
>
<el-form-item
label=
"排查库"
>
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<el-select
v-model=
"form.libraryId"
placeholder=
"请选择"
@
change=
"selectLibrary"
>
<el-select
v-model=
"form.libraryId"
multiple
filterable
placeholder=
"请选择"
@
change=
"selectLibrary"
>
<el-option
<el-option
v-for=
"dict in libraryList"
v-for=
"dict in libraryList"
:key=
"dict.libraryId"
:key=
"dict.libraryId"
:label=
"dict.
libraryName
"
:label=
"dict.
riskPoint+'——'+dict.inspectTerm
"
:value=
"parseInt(dict.libraryId)"
:value=
"parseInt(dict.libraryId)"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<
el-form-item
label=
"排查内容"
prop=
"content"
>
<
!--<el-form-item label="排查内容" prop="content">--
>
<
editor
v-model=
"form.content"
:min-height=
"200"
/
>
<
!--<editor v-model="form.content" :min-height="200"/>--
>
<
/el-form-item
>
<
!--</el-form-item>--
>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -448,6 +459,7 @@ import { listLibrary} from "@/api/system/library";
...
@@ -448,6 +459,7 @@ import { listLibrary} from "@/api/system/library";
import
{
listBook
}
from
"@/api/system/book"
;
import
{
listBook
}
from
"@/api/system/book"
;
import
Editor
from
'@/components/Editor'
;
import
Editor
from
'@/components/Editor'
;
import
{
listDept
}
from
"@/api/system/dept"
;
import
{
listDept
}
from
"@/api/system/dept"
;
import
{
listStaff
}
from
"@/api/safetyManagement/staff"
;
export
default
{
export
default
{
name
:
"WorkCheck"
,
name
:
"WorkCheck"
,
components
:
{
components
:
{
...
@@ -505,6 +517,7 @@ export default {
...
@@ -505,6 +517,7 @@ export default {
workName
:
null
,
workName
:
null
,
workType
:
null
,
workType
:
null
,
},
},
userList
:[],
// 查询参数
// 查询参数
queryParams2
:
{
queryParams2
:
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -527,12 +540,12 @@ export default {
...
@@ -527,12 +540,12 @@ export default {
workName
:
[
workName
:
[
{
required
:
true
,
message
:
"任务名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"任务名称不能为空"
,
trigger
:
"blur"
}
],
],
workType
:
[
//
workType: [
{
required
:
true
,
message
:
"任务排查类型不能为空"
,
trigger
:
"change"
}
//
{ required: true, message: "任务排查类型不能为空", trigger: "change" }
],
//
],
workForm
:
[
//
workForm: [
{
required
:
true
,
message
:
"任务排查形式不能为空"
,
trigger
:
"change"
}
//
{ required: true, message: "任务排查形式不能为空", trigger: "change" }
],
//
],
workBeginTime
:
[
workBeginTime
:
[
{
required
:
true
,
message
:
"排查开始时间不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"排查开始时间不能为空"
,
trigger
:
"blur"
}
],
],
...
@@ -542,9 +555,9 @@ export default {
...
@@ -542,9 +555,9 @@ export default {
deptId
:
[
deptId
:
[
{
required
:
true
,
message
:
"责任部门不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"责任部门不能为空"
,
trigger
:
"blur"
}
],
],
content
:
[
//
content: [
{
required
:
true
,
message
:
"排查内容不能为空"
,
trigger
:
"blur"
}
//
{ required: true, message: "排查内容不能为空", trigger: "blur" }
],
//
],
},
},
rules2
:
{
rules2
:
{
assessmentContent
:
[
assessmentContent
:
[
...
@@ -562,6 +575,7 @@ export default {
...
@@ -562,6 +575,7 @@ export default {
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getDeptList
();
this
.
getDeptList
();
this
.
selectUserList
();
this
.
getBookList
();
this
.
getBookList
();
this
.
getDicts
(
"work_type"
).
then
(
response
=>
{
this
.
getDicts
(
"work_type"
).
then
(
response
=>
{
this
.
workCycleOptions
=
response
.
data
;
this
.
workCycleOptions
=
response
.
data
;
...
@@ -685,6 +699,7 @@ export default {
...
@@ -685,6 +699,7 @@ export default {
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
form
.
content
=
this
.
form
.
libraryId
.
toString
();
if
(
this
.
form
.
workId
!=
null
)
{
if
(
this
.
form
.
workId
!=
null
)
{
updateWorkCheck
(
this
.
form
).
then
(
response
=>
{
updateWorkCheck
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
msgSuccess
(
"修改成功"
);
...
@@ -758,6 +773,13 @@ export default {
...
@@ -758,6 +773,13 @@ export default {
}
}
});
});
},
},
// 查询用户列表
selectUserList
(){
listStaff
({
pageNum
:
1
,
pageSize
:
99999
}).
then
(
response
=>
{
console
.
log
(
response
.
rows
);
this
.
userList
=
response
.
rows
;
});
},
selectLibrary
(
val
){
selectLibrary
(
val
){
for
(
var
i
=
0
;
i
<
this
.
libraryList
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
libraryList
.
length
;
i
++
){
if
(
this
.
libraryList
[
i
].
libraryId
==
val
){
if
(
this
.
libraryList
[
i
].
libraryId
==
val
){
...
...
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