Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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
耿迪迪
gassafety-progress
Commits
7365846e
Commit
7365846e
authored
Mar 16, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安全装置类型多选
parent
39edb35e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
4 deletions
+78
-4
TSafeEquipmentStandingBook.java
.../com/zehong/system/domain/TSafeEquipmentStandingBook.java
+16
-1
TSafeEquipmentStandingBookForm.java
...ng/system/domain/form/TSafeEquipmentStandingBookForm.java
+3
-0
TSafeEquipmentStandingBookMapper.xml
...ources/mapper/system/TSafeEquipmentStandingBookMapper.xml
+6
-1
index.vue
...typrogress-web/src/views/standingBook/equipment/index.vue
+53
-2
No files found.
gassafetyprogress-system/src/main/java/com/zehong/system/domain/TSafeEquipmentStandingBook.java
View file @
7365846e
...
...
@@ -40,6 +40,12 @@ public class TSafeEquipmentStandingBook extends BaseEntity
@Excel
(
name
=
"联系电话"
)
private
String
linkMobile
;
/** 安全装置类型 */
private
String
equipmentType
;
/** 安全装置类型 */
private
String
equipments
;
/** 安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
...
...
@@ -120,7 +126,16 @@ public class TSafeEquipmentStandingBook extends BaseEntity
{
return
installTime
;
}
public
void
setBrandName
(
String
brandName
)
public
String
getEquipmentType
()
{
return
equipmentType
;
}
public
void
setEquipmentType
(
String
equipmentType
)
{
this
.
equipmentType
=
equipmentType
;
}
public
void
setBrandName
(
String
brandName
)
{
this
.
brandName
=
brandName
;
}
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/domain/form/TSafeEquipmentStandingBookForm.java
View file @
7365846e
...
...
@@ -21,6 +21,9 @@ public class TSafeEquipmentStandingBookForm
/** 联系电话 */
private
String
linkMobile
;
/** 安全装置类型 */
private
String
equipmentType
;
/** 安装起始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
installTimeStart
;
...
...
gassafetyprogress-system/src/main/resources/mapper/system/TSafeEquipmentStandingBookMapper.xml
View file @
7365846e
...
...
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"userAddress"
column=
"user_address"
/>
<result
property=
"idCard"
column=
"id_card"
/>
<result
property=
"linkMobile"
column=
"link_mobile"
/>
<result
property=
"equipmentType"
column=
"equipment_type"
/>
<result
property=
"installTime"
column=
"install_time"
/>
<result
property=
"brandName"
column=
"brand_name"
/>
<result
property=
"createBy"
column=
"create_by"
/>
...
...
@@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTSafeEquipmentStandingBookVo"
>
select safe_equipment_id, user_name, user_no, user_address, id_card, link_mobile, install_time, brand_name, create_by, create_time, update_by, update_time, is_del, remarks from t_safe_equipment_standing_book
select safe_equipment_id, user_name, user_no, user_address, id_card, link_mobile,
equipment_type,
install_time, brand_name, create_by, create_time, update_by, update_time, is_del, remarks from t_safe_equipment_standing_book
</sql>
<select
id=
"selectTSafeEquipmentStandingBookList"
parameterType=
"TSafeEquipmentStandingBookForm"
resultMap=
"TSafeEquipmentStandingBookResult"
>
...
...
@@ -30,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
is_del = '0'
<if
test=
"userName != null and userName != ''"
>
and user_name like concat('%', #{userName}, '%')
</if>
<if
test=
"linkMobile != null and linkMobile != ''"
>
and link_mobile like concat('%', #{linkMobile}, '%')
</if>
<if
test=
"equipmentType != null and equipmentType != ''"
>
and equipment_type like concat('%', #{equipmentType}, '%')
</if>
<if
test=
"installTimeStart != null "
>
and install_time
>
= #{installTimeStart}
</if>
<if
test=
"installTimeEnd != null "
>
and install_time
<
= #{installTimeEnd}
</if>
</where>
...
...
@@ -50,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"idCard != null"
>
id_card,
</if>
<if
test=
"linkMobile != null"
>
link_mobile,
</if>
<if
test=
"installTime != null"
>
install_time,
</if>
<if
test=
"equipmentType != null"
>
equipment_type,
</if>
<if
test=
"brandName != null"
>
brand_name,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -65,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"idCard != null"
>
#{idCard},
</if>
<if
test=
"linkMobile != null"
>
#{linkMobile},
</if>
<if
test=
"installTime != null"
>
#{installTime},
</if>
<if
test=
"equipmentType != null"
>
#{equipmentType},
</if>
<if
test=
"brandName != null"
>
#{brandName},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
...
...
@@ -84,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"idCard != null"
>
id_card = #{idCard},
</if>
<if
test=
"linkMobile != null"
>
link_mobile = #{linkMobile},
</if>
<if
test=
"installTime != null"
>
install_time = #{installTime},
</if>
<if
test=
"equipmentType != null"
>
equipment_type = #{equipmentType},
</if>
<if
test=
"brandName != null"
>
brand_name = #{brandName},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
...
...
gassafetyprogress-web/src/views/standingBook/equipment/index.vue
View file @
7365846e
...
...
@@ -162,6 +162,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"装置类型"
prop=
"equipments"
>
<el-select
placeholder=
"请选择装置类型"
v-model=
"form.equipments"
multiple
filterable
clearable
style=
"width: 100%"
onchange=
"change()"
>
<el-option
v-for=
"dict in options"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"备注信息"
prop=
"remarks"
>
...
...
@@ -203,6 +217,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"装置类型"
prop=
"equipments"
>
<el-select
placeholder=
"请选择装置类型"
v-model=
"detailForm.equipments"
multiple
filterable
style=
"width: 100%"
disabled
>
<el-option
v-for=
"dict in options"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"详细地址:"
>
...
...
@@ -239,14 +267,14 @@ export default {
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 用户加装安全装置台账表格数据
equipmentList
:
[],
// 装置类型字典
options
:
[],
// 弹出层标题
title1
:
""
,
title2
:
""
,
...
...
@@ -282,6 +310,9 @@ export default {
{
required
:
true
,
message
:
"请输入身份证号"
,
trigger
:
"blur"
},
{
min
:
18
,
max
:
18
,
message
:
"长度18位"
,
trigger
:
"blur"
},
],
equipments
:
[
{
required
:
true
,
message
:
"请选择装置类型"
,
trigger
:
"blur"
}
],
installTime
:
[
{
required
:
true
,
message
:
"选择安装时间"
,
trigger
:
"change"
},
],
...
...
@@ -292,6 +323,9 @@ export default {
this
.
getList
();
},
methods
:
{
change
(){
},
/** 查询用户加装安全装置台账列表 */
getList
()
{
this
.
loading
=
true
;
...
...
@@ -320,6 +354,8 @@ export default {
idCard
:
null
,
linkMobile
:
null
,
installTime
:
null
,
equipmentType
:
null
,
equipments
:
[],
brandName
:
null
,
createBy
:
null
,
createTime
:
null
,
...
...
@@ -339,6 +375,8 @@ export default {
idCard
:
null
,
linkMobile
:
null
,
installTime
:
null
,
equipmentType
:
null
,
equipments
:
[],
brandName
:
null
,
createBy
:
null
,
createTime
:
null
,
...
...
@@ -371,14 +409,24 @@ export default {
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset1
();
this
.
getDicts
(
"t_equipment_type"
).
then
(
response
=>
{
this
.
options
=
response
.
data
;
});
this
.
open1
=
true
;
this
.
title1
=
"添加用户加装安全装置台账"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset1
();
this
.
getDicts
(
"t_equipment_type"
).
then
(
response
=>
{
this
.
options
=
response
.
data
;
});
getEquipment
(
row
.
safeEquipmentId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
this
.
form
.
equipmentType
){
this
.
form
.
equipments
=
this
.
form
.
equipmentType
.
split
(
","
);
}
// this.form.equipments = ["1","2","3"];
this
.
open1
=
true
;
this
.
title1
=
"修改用户加装安全装置台账"
;
});
...
...
@@ -387,6 +435,8 @@ export default {
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
var
str
=
this
.
form
.
equipments
.
toString
();
this
.
form
.
equipmentType
=
str
;
if
(
this
.
form
.
safeEquipmentId
!=
null
)
{
updateEquipment
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
...
...
@@ -438,6 +488,7 @@ export default {
this
.
reset2
();
getEquipment
(
row
.
safeEquipmentId
).
then
(
response
=>
{
this
.
detailForm
=
response
.
data
;
this
.
detailForm
.
equipments
=
this
.
detailForm
.
equipmentType
.
split
(
","
);
this
.
open2
=
true
;
this
.
title2
=
"用户加装安全装置台账详情"
;
});
...
...
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