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
764b6777
Commit
764b6777
authored
Aug 11, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检计划解决indexOf错误
parent
624e1196
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
154 additions
and
76 deletions
+154
-76
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+1
-2
index.vue
...y-web/src/views/deviceInspection/inspectionPlan/index.vue
+150
-71
index.vue
gassafety-web/src/views/workOrder/basicsInfo/index.vue
+3
-3
No files found.
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
764b6777
...
...
@@ -290,9 +290,8 @@ export default {
}
});
},
/**
工单
详细信息跳转 */
/** 详细信息跳转 */
showDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/deviceAlarm/alarmdetail'
,
query
:
{
...
...
gassafety-web/src/views/deviceInspection/inspectionPlan/index.vue
View file @
764b6777
...
...
@@ -143,15 +143,14 @@
/>
<!--
添加或修改巡检计划对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"800px"
append
-
to
-
body
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
div
v
-
if
=
"this.title != '填写工单信息'"
>
<
el
-
dialog
:
title
=
"title1"
:
visible
.
sync
=
"open1"
width
=
"800px"
append
-
to
-
body
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form1"
:
model
=
"form1"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
el
-
form
-
item
label
=
"巡检计划名称"
prop
=
"planName"
>
<
el
-
input
v
-
model
=
"form.planName"
placeholder
=
"请输入巡检计划名称"
/>
<
el
-
input
v
-
model
=
"form
1
.planName"
placeholder
=
"请输入巡检计划名称"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"巡检设备"
prop
=
"devices"
>
<
el
-
cascader
v
-
model
=
"form.devices"
v
-
model
=
"form
1
.devices"
:
options
=
"options"
:
props
=
"props"
:
show
-
all
-
levels
=
"false"
...
...
@@ -163,7 +162,7 @@
<
/el-form-item
>
<
el
-
form
-
item
label
=
"开始时间"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.startTime"
v
-
model
=
"form
1
.startTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd HH:mm:ss"
placeholder
=
"选择开始时间"
>
...
...
@@ -171,35 +170,41 @@
<
/el-form-item
>
<
el
-
form
-
item
label
=
"结束时间"
prop
=
"endTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.endTime"
v
-
model
=
"form
1
.endTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd HH:mm:ss"
placeholder
=
"选择结束时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"地址"
prop
=
"address"
>
<
el
-
input
v
-
model
=
"form.address"
placeholder
=
"请输入地址"
/>
<
el
-
input
v
-
model
=
"form
1
.address"
placeholder
=
"请输入地址"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"计划描述"
prop
=
"remarks"
>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form.remarks"
placeholder
=
"请输入计划描述"
/>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form
1
.remarks"
placeholder
=
"请输入计划描述"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm1"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
div
v
-
if
=
"this.title == '填写工单信息'"
>
<
/el-dialog
>
<
el
-
dialog
:
title
=
"title2"
:
visible
.
sync
=
"open2"
width
=
"800px"
append
-
to
-
body
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form2"
:
model
=
"form2"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
el
-
form
-
item
label
=
"巡检计划名称"
prop
=
"plansName"
>
<
font
>
{{
plansName
}}
<
/font
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"计划时间"
>
<
font
>
{{
parseTime
(
form
.
startTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
至
{{
parseTime
(
form
.
endTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/font
>
<
font
>
{{
parseTime
(
form
2
.
startTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
至
{{
parseTime
(
form
2
.
endTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/font
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"地址"
prop
=
"address"
>
<
font
>
{{
form
.
address
}}
<
/font
>
<
font
>
{{
form
2
.
address
}}
<
/font
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"工单名称"
prop
=
"orderName"
>
<
el
-
input
v
-
model
=
"form.orderName"
placeholder
=
"请输入工单名称"
/>
<
el
-
input
v
-
model
=
"form
2
.orderName"
placeholder
=
"请输入工单名称"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"指定执行人员"
prop
=
"appointInspector"
>
<
el
-
select
v
-
model
=
"form
.appointInspectorName
"
placeholder
=
"请选择执行人员"
clearable
size
=
"small"
@
change
=
"setUserId"
>
<
el
-
select
v
-
model
=
"form
2.appointInspector
"
placeholder
=
"请选择执行人员"
clearable
size
=
"small"
@
change
=
"setUserId"
>
<
el
-
option
v
-
for
=
"item in inspector"
:
key
=
"item.userId"
...
...
@@ -209,12 +214,11 @@
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"工单描述"
prop
=
"remarks"
>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form.remarks"
placeholder
=
"请输入工单描述"
/>
<
el
-
input
type
=
"textarea"
v
-
model
=
"form
2
.remarks"
placeholder
=
"请输入工单描述"
/>
<
/el-form-item
>
<
/div
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm
2
"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
...
...
@@ -264,9 +268,13 @@
// 巡检员列表
inspector
:
[],
// 弹出层标题
title
:
""
,
title1
:
""
,
// 是否显示弹出层
open1
:
false
,
// 弹出层标题
title2
:
""
,
// 是否显示弹出层
open
:
false
,
open
2
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -278,8 +286,10 @@
planStatus
:
null
,
remarks
:
null
}
,
// 表单参数
form
:
{
}
,
// 巡检计划表单参数
form1
:
{
}
,
// 工单表单参数
form2
:
{
}
,
// 表单校验
rules
:
{
planName
:
[
...
...
@@ -344,12 +354,13 @@
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
open1
=
false
;
this
.
open2
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
this
.
form
1
=
{
planId
:
null
,
planName
:
null
,
orderId
:
null
,
...
...
@@ -361,7 +372,21 @@
remarks
:
null
}
;
this
.
devices
=
null
;
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form1"
);
this
.
form2
=
{
planId
:
null
,
planName
:
null
,
orderId
:
null
,
orderName
:
null
,
startTime
:
null
,
endTime
:
null
,
planStatus
:
"0"
,
appointInspector
:
null
,
updateTime
:
null
,
createTime
:
null
,
remarks
:
null
}
;
this
.
resetForm
(
"form2"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
...
...
@@ -384,8 +409,8 @@
this
.
reset
();
deviceNodeTree
().
then
(
response
=>
{
this
.
options
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"添加巡检计划"
;
this
.
open
1
=
true
;
this
.
title
1
=
"添加巡检计划"
;
}
);
}
,
/** 下发按钮操作 */
...
...
@@ -394,11 +419,11 @@
this
.
getInspectorList
();
const
planId
=
row
.
planId
||
this
.
ids
getInspectionPlan
(
planId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
plansName
=
this
.
form
.
planName
;
this
.
form
.
remarks
=
""
;
this
.
open
=
true
;
this
.
title
=
"填写工单信息"
;
this
.
form
2
=
response
.
data
;
this
.
plansName
=
this
.
form
2
.
planName
;
this
.
form
2
.
remarks
=
""
;
this
.
open
2
=
true
;
this
.
title
2
=
"填写工单信息"
;
}
);
}
,
/** 修改按钮操作 */
...
...
@@ -409,19 +434,18 @@
}
);
const
planId
=
row
.
planId
||
this
.
ids
getInspectionPlan
(
planId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
.
devices
=
eval
(
this
.
form
.
deviceIds
);
this
.
open
=
true
;
this
.
title
=
"修改巡检计划"
;
this
.
form
1
=
response
.
data
;
this
.
form
1
.
devices
=
eval
(
this
.
form1
.
deviceIds
);
this
.
open
1
=
true
;
this
.
title
1
=
"修改巡检计划"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
/**
新增修改巡检计划
提交按钮 */
submitForm
1
()
{
this
.
$refs
[
"form
1
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
title
!=
"填写工单信息"
)
{
// 二维数组转字符串(处理设备级联选项的值)
var
arr
=
this
.
form
.
devices
;
var
arr
=
this
.
form1
.
devices
;
var
arrLen
=
arr
.
length
;
var
str
=
"["
;
for
(
var
i
=
0
;
i
<
arrLen
;
i
++
)
{
...
...
@@ -438,37 +462,92 @@
}
}
str
+=
"]"
;
this
.
form
.
deviceIds
=
str
;
}
this
.
form1
.
deviceIds
=
str
;
if
(
this
.
title
==
"修改巡检计划"
)
{
updateInspectionPlan
(
this
.
form
).
then
(
response
=>
{
if
(
this
.
title
1
==
"修改巡检计划"
)
{
updateInspectionPlan
(
this
.
form
1
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
open
1
=
false
;
this
.
getList
();
}
);
}
else
if
(
this
.
title
==
"添加巡检计划"
)
{
addInspectionPlan
(
this
.
form
).
then
(
response
=>
{
}
else
if
(
this
.
title
1
==
"添加巡检计划"
)
{
addInspectionPlan
(
this
.
form
1
).
then
(
response
=>
{
this
.
msgSuccess
(
"添加成功"
);
this
.
open
=
false
;
this
.
open
1
=
false
;
this
.
getList
();
}
);
}
else
if
(
this
.
title
==
"填写工单信息"
)
{
this
.
form
.
resourceId
=
this
.
form
.
planId
;
this
.
form
.
orderType
=
"1"
;
addBasicsInfo
(
this
.
form
).
then
(
response
=>
{
}
}
}
);
}
,
/** 生成工单提交按钮 */
submitForm2
()
{
this
.
$refs
[
"form2"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form2
.
resourceId
=
this
.
form2
.
planId
;
this
.
form2
.
orderType
=
"1"
;
addBasicsInfo
(
this
.
form2
).
then
(
response
=>
{
this
.
msgSuccess
(
"生成工单成功"
);
this
.
open
=
false
;
this
.
open2
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
// /** 提交按钮 */
// submitForm()
{
// this.$refs["form"].validate(valid =>
{
// if (valid)
{
// if(this.title != "填写工单信息")
{
// // 二维数组转字符串(处理设备级联选项的值)
// var arr = this.form.devices;
// var arrLen = arr.length;
// var str = "[";
// for (var i = 0; i < arrLen; i++)
{
// str += "[";
// for (var j = 0; j < arr[i].length; j++)
{
// str += arr[i][j];
// if (j < arr[i].length - 1)
{
// str += ",";
//
}
//
}
// str += "]";
// if (i < arrLen - 1)
{
// str += ",";
//
}
//
}
// str += "]";
// this.form.deviceIds = str;
//
}
//
// if (this.title == "修改巡检计划")
{
// updateInspectionPlan(this.form).then(response =>
{
// this.msgSuccess("修改成功");
// this.open = false;
// this.getList();
//
}
);
//
}
else
if
(
this
.
title
==
"添加巡检计划"
)
{
// addInspectionPlan(this.form).then(response =>
{
// this.msgSuccess("添加成功");
// this.open = false;
// this.getList();
//
}
);
//
}
else
if
(
this
.
title
==
"填写工单信息"
)
{
// this.form.resourceId = this.form.planId;
// this.form.orderType = "1";
// addBasicsInfo(this.form).then(response =>
{
// this.msgSuccess("生成工单成功");
// this.open = false;
// this.getList();
//
}
);
//
}
//
}
//
}
);
//
}
,
/** 作废按钮操作 */
handleIsDel
(
row
)
{
row
.
isDel
=
"1"
;
this
.
$confirm
(
'是否确认作废巡检计划名称为"'
+
this
.
form
.
planName
+
'"的数据项?'
,
"警告"
,
{
this
.
$confirm
(
'是否确认作废巡检计划名称为"'
+
row
.
planName
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
...
...
gassafety-web/src/views/workOrder/basicsInfo/index.vue
View file @
764b6777
...
...
@@ -36,7 +36,7 @@
v-model=
"queryParams.startAllotTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
placeholder=
"请选择
开
始时间"
placeholder=
"请选择
起
始时间"
align=
"right"
>
</el-date-picker>
<font
color=
"#C0C4CC"
>
至
</font>
...
...
@@ -47,7 +47,7 @@
v-model=
"queryParams.endAllotTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
placeholder=
"请选择
结束
时间"
placeholder=
"请选择
截止
时间"
align=
"right"
>
</el-date-picker>
</el-form-item>
...
...
@@ -132,7 +132,7 @@
<el-input
v-model=
"form.orderName"
placeholder=
"请输入工单名称"
/>
</el-form-item>
<el-form-item
label=
"指定执行人员"
prop=
"appointInspector"
>
<el-select
v-model=
"form.appointInspector
Name
"
placeholder=
"请选择执行人员"
clearable
size=
"small"
@
change=
"setUserId"
>
<el-select
v-model=
"form.appointInspector"
placeholder=
"请选择执行人员"
clearable
size=
"small"
@
change=
"setUserId"
>
<el-option
v-for=
"item in inspector"
:key=
"item.userId"
...
...
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