Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
Commits
3966fa6d
Commit
3966fa6d
authored
Jul 31, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检计划添加地址字段
parent
519b3734
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
99 deletions
+86
-99
TInspectionPlan.java
...c/main/java/com/zehong/system/domain/TInspectionPlan.java
+13
-1
TInspectionPlanMapper.xml
...rc/main/resources/mapper/system/TInspectionPlanMapper.xml
+6
-2
index.vue
...y-web/src/views/deviceInspection/inspectionPlan/index.vue
+67
-96
No files found.
gassafety-system/src/main/java/com/zehong/system/domain/TInspectionPlan.java
View file @
3966fa6d
...
...
@@ -38,6 +38,10 @@ public class TInspectionPlan extends BaseEntity
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
/** 地址 */
@Excel
(
name
=
"地址"
)
private
String
address
;
/** 计划状态(0未下发,1已下发,2进行中,3已完成) */
@Excel
(
name
=
"计划状态(0未下发,1已下发,2进行中,3已完成)"
)
private
String
planStatus
;
...
...
@@ -100,7 +104,15 @@ public class TInspectionPlan extends BaseEntity
return
endTime
;
}
public
void
setPlanStatus
(
String
planStatus
)
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
void
setPlanStatus
(
String
planStatus
)
{
this
.
planStatus
=
planStatus
;
}
...
...
gassafety-system/src/main/resources/mapper/system/TInspectionPlanMapper.xml
View file @
3966fa6d
...
...
@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"planStatus"
column=
"plan_status"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
...
...
@@ -18,13 +19,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTInspectionPlanVo"
>
select plan_id, plan_name, order_id, start_time, end_time, plan_status, is_del, update_time, create_time, remarks from t_inspection_plan
select plan_id, plan_name, order_id, start_time, end_time,
address,
plan_status, is_del, update_time, create_time, remarks from t_inspection_plan
</sql>
<select
id=
"selectTInspectionPlanList"
parameterType=
"InspectionPlanForm"
resultMap=
"TInspectionPlanResult"
>
<include
refid=
"selectTInspectionPlanVo"
/>
<where>
is_del = '0'
and
is_del = '0'
<if
test=
"planName != null and planName != ''"
>
and plan_name like concat('%', #{planName}, '%')
</if>
<if
test=
"orderId != null and orderId != ''"
>
and order_id like concat('%', #{orderId}, '%')
</if>
<if
test=
"startTime1 != null "
>
and start_time
>
= #{startTime1}
</if>
...
...
@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"orderId != null"
>
order_id,
</if>
<if
test=
"startTime != null"
>
start_time,
</if>
<if
test=
"endTime != null"
>
end_time,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"planStatus != null"
>
plan_status,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
...
...
@@ -59,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"orderId != null"
>
#{orderId},
</if>
<if
test=
"startTime != null"
>
#{startTime},
</if>
<if
test=
"endTime != null"
>
#{endTime},
</if>
<if
test=
"address != null"
>
#{address},
</if>
<if
test=
"planStatus != null"
>
#{planStatus},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
...
...
@@ -74,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"orderId != null"
>
order_id = #{orderId},
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
<if
test=
"planStatus != null"
>
plan_status = #{planStatus},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
...
...
gassafety-web/src/views/deviceInspection/inspectionPlan/index.vue
View file @
3966fa6d
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
68
px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
100
px"
>
<el-form-item
label=
"巡检计划名称"
prop=
"planName"
>
<el-input
v-model=
"queryParams.planName"
...
...
@@ -10,45 +10,50 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工单id"
prop=
"orderId"
>
<el-input
v-model=
"queryParams.orderId"
placeholder=
"请输入工单id"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"开始时间"
prop=
"startTime"
>
<!--
<el-form-item
label=
"计划起始时间"
prop=
"startTime1"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.startTime"
v-model=
"queryParams.startTime
1
"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择开始时间"
>
</el-date-picker>
<font
color=
"#C0C4CC"
>
至
</font>
</el-form-item>
<el-form-item
label=
"
结束时间"
prop=
"endTime
"
>
<el-form-item
label=
"
"
prop=
"endTime1
"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.endTime"
v-model=
"queryParams.endTime
1
"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"计划截止时间"
prop=
"startTime1"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.startTime2"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择开始时间"
>
</el-date-picker>
<font
color=
"#C0C4CC"
>
至
</font>
</el-form-item>
<el-form-item
label=
""
prop=
"endTime1"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.endTime2"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择结束时间"
>
</el-date-picker>
</el-form-item>
-->
<el-form-item
label=
"状态"
prop=
"planStatus"
>
<el-select
v-model=
"queryParams.planStatus"
placeholder=
"请选择状态"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-option
v-for=
"dict in typeOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"计划描述"
prop=
"remarks"
>
<el-input
v-model=
"queryParams.remarks"
placeholder=
"请输入计划描述"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -66,79 +71,60 @@
v-hasPermi=
"['deviceInspection:inspectionPlan: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=
"['deviceInspection:inspectionPlan: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=
"['deviceInspection:inspectionPlan:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
v-hasPermi=
"['deviceInspection:inspectionPlan:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"inspectionPlanList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"
巡检计划id"
align=
"center"
prop=
"planId
"
/>
<el-table-column
label=
"
序号"
type=
"index"
align=
"center"
prop=
"planName
"
/>
<el-table-column
label=
"巡检计划名称"
align=
"center"
prop=
"planName"
/>
<el-table-column
label=
"工单id"
align=
"center"
prop=
"orderId"
/>
<el-table-column
label=
"开始时间"
align=
"center"
prop=
"startTime"
width=
"180"
>
<el-table-column
label=
"计划时间"
align=
"center"
prop=
"startTime"
width=
"280"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
startTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<span>
{{
parseTime
(
scope
.
row
.
startTime
,
'{y
}
/{m
}
/{d
}
'
)
}}
<
/span>
-
<
span
>
{{
parseTime
(
scope
.
row
.
endTime
,
'{y
}
/{m
}
/{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"结束时间"
align
=
"center"
prop
=
"endTime"
width
=
"180"
>
<
el
-
table
-
column
label
=
"地址"
align
=
"center"
prop
=
"address"
/>
<
el
-
table
-
column
label
=
"计划描述"
align
=
"center"
prop
=
"remarks"
/>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
prop
=
"planStatus"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
endTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 0"
>
未下发
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 1"
>
已下发
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 2"
>
进行中
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 3"
>
已完成
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
prop
=
"planStatus"
/>
<
el
-
table
-
column
label
=
"计划描述"
align
=
"center"
prop
=
"remarks"
/>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
font
v
-
if
=
"scope.row.planStatus != 0"
>-<
/font
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['deviceInspection:inspectionPlan:edit']"
v
-
if
=
"scope.row.planStatus == 0"
>
下发
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['deviceInspection:inspectionPlan:edit']"
v
-
if
=
"scope.row.planStatus == 0"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['deviceInspection:inspectionPlan:remove']"
>
删除
<
/el-button
>
@
click
=
"handleIsDel(scope.row)"
v
-
hasPermi
=
"['deviceInspection:inspectionPlan:edit']"
v
-
if
=
"scope.row.planStatus == 0"
>
作废
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
...
...
@@ -153,9 +139,6 @@
<
el
-
form
-
item
label
=
"巡检计划名称"
prop
=
"planName"
>
<
el
-
input
v
-
model
=
"form.planName"
placeholder
=
"请输入巡检计划名称"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"工单id"
prop
=
"orderId"
>
<
el
-
input
v
-
model
=
"form.orderId"
placeholder
=
"请输入工单id"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"开始时间"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.startTime"
...
...
@@ -172,13 +155,11 @@
placeholder
=
"选择结束时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"状态"
>
<
el
-
radio
-
group
v
-
model
=
"form.planStatus"
>
<
el
-
radio
label
=
"1"
>
请选择字典生成
<
/el-radio
>
<
/el-radio-group
>
<
el
-
form
-
item
label
=
"地址"
prop
=
"address"
>
<
el
-
input
v
-
model
=
"form.address"
placeholder
=
"请输入地址"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"计划描述"
prop
=
"remarks"
>
<
el
-
input
v
-
model
=
"form.remarks"
placeholder
=
"请输入计划描述"
/>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form.remarks"
placeholder
=
"请输入计划描述"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
...
...
@@ -214,6 +195,8 @@ export default {
total
:
0
,
// 巡检计划表格数据
inspectionPlanList
:
[],
// 计划状态字典
typeOptions
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -238,6 +221,9 @@ export default {
}
,
created
()
{
this
.
getList
();
this
.
getDicts
(
"t_plan_status"
).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
;
}
);
}
,
methods
:
{
/** 查询巡检计划列表 */
...
...
@@ -321,10 +307,10 @@ export default {
}
}
);
}
,
/**
删除
按钮操作 */
handle
Delete
(
row
)
{
const
plan
Ids
=
row
.
planId
||
this
.
ids
;
this
.
$confirm
(
'是否确认
删除巡检计划编号为"'
+
planIds
+
'"的数据项?'
,
"警告"
,
{
/**
作废
按钮操作 */
handle
IsDel
(
row
)
{
const
plan
Name
=
row
.
planName
;
this
.
$confirm
(
'是否确认
作废巡检计划名称为"'
+
planName
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
...
...
@@ -335,21 +321,6 @@ export default {
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有巡检计划数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportInspectionPlan
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
}
;
<
/script
>
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