Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yindong-tongbai-automation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lichunliang
yindong-tongbai-automation
Commits
14730474
Commit
14730474
authored
Aug 08, 2025
by
sxl
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix;禅道bug修改
parent
a8971bb3
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
383 additions
and
478 deletions
+383
-478
patrolLog.js
src/api/patrol/patrolLog.js
+3
-2
patrolProject.js
src/api/patrol/patrolProject.js
+3
-2
placeInspection.js
src/api/patrol/placeInspection.js
+3
-2
hjjc.vue
src/views/Screen/items/hjjc.vue
+2
-2
index.vue
src/views/inspection/patrol/patrolLocationProject/index.vue
+48
-176
index.vue
src/views/inspection/patrol/patrolLog/index.vue
+81
-57
index.vue
src/views/inspection/patrol/patrolProject/index.vue
+92
-87
index.vue
src/views/inspection/repair/repairLog/index.vue
+52
-52
index.vue
src/views/inspection/repair/repairProject/index.vue
+99
-98
No files found.
src/api/patrol/patrolLog.js
View file @
14730474
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
//查询巡检记录列表
//查询巡检记录列表
export
function
listLog
()
{
export
function
listLog
(
data
)
{
return
request
({
return
request
({
url
:
'
/gemho/inspection/list
'
,
url
:
'
/gemho/inspection/list
'
,
method
:
'
get
'
method
:
'
get
'
,
params
:
data
})
})
}
}
//获取巡检记录详细信息
//获取巡检记录详细信息
...
...
src/api/patrol/patrolProject.js
View file @
14730474
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
//获取巡检任务列表
//获取巡检任务列表
export
function
listTask
()
{
export
function
listTask
(
data
)
{
return
request
({
return
request
({
url
:
'
/inspection/task/list
'
,
url
:
'
/inspection/task/list
'
,
method
:
'
get
'
method
:
'
get
'
,
params
:
data
})
})
}
}
//获取巡检任务详情
//获取巡检任务详情
...
...
src/api/patrol/placeInspection.js
View file @
14730474
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
//获取巡检任务列表
//获取巡检任务列表
export
function
listTask
()
{
export
function
listTask
(
data
)
{
return
request
({
return
request
({
url
:
'
/placeInspection/task/list
'
,
url
:
'
/placeInspection/task/list
'
,
method
:
'
get
'
method
:
'
get
'
,
params
:
data
})
})
}
}
//获取巡检任务详情
//获取巡检任务详情
...
...
src/views/Screen/items/hjjc.vue
View file @
14730474
...
@@ -785,10 +785,10 @@ $spacing: 16px;
...
@@ -785,10 +785,10 @@ $spacing: 16px;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
0
$spacing
;
padding
:
0
$spacing
;
padding-top
:
1
6vh
;
padding-top
:
1
73px
;
background
:
url('~@/assets/images/screen/bg12.png')
;
background
:
url('~@/assets/images/screen/bg12.png')
;
color
:
#fff
;
color
:
#fff
;
min-height
:
100vh
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
...
...
src/views/inspection/patrol/patrolLocationProject/index.vue
View file @
14730474
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"巡检日期"
prop=
"pollingData"
>
<el-form-item
label=
"巡检日期"
prop=
"pollingData"
>
<el-date-picker
<el-date-picker
clearable
v-model=
"queryParams.pollingData"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择巡检日期"
>
</el-date-picker>
clearable
v-model=
"queryParams.pollingData"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择巡检日期"
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"巡检人"
prop=
"inspectionUserId"
>
<el-form-item
label=
"巡检人"
prop=
"inspectionUserId"
>
<el-select
<el-select
...
@@ -28,135 +14,57 @@
...
@@ -28,135 +14,57 @@
:remote-method=
"remoteMethod"
:remote-method=
"remoteMethod"
:loading=
"loading"
:loading=
"loading"
>
>
<el-option
<el-option
v-for=
"item in useroptions"
:key=
"item.userId"
:label=
"item.userName + '/' + item.nickName"
:value=
"item.userId"
>
</el-option>
v-for=
"item in useroptions"
:key=
"item.userId"
:label=
"item.nickName + '/' + item.nickName"
:value=
"item.userId"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"巡检地点"
prop=
"placeId"
>
<el-form-item
label=
"巡检地点"
prop=
"placeId"
>
<el-select
<el-select
v-model=
"queryParams.placeId"
placeholder=
"请选择巡检地点"
clearable
>
v-model=
"queryParams.placeId"
<el-option
v-for=
"item in placeList"
:key=
"item.id"
:label=
"item.placeName"
:value=
"item.id"
/>
placeholder=
"请选择巡检地点"
clearable
>
<el-option
v-for=
"item in placeList"
:key=
"item.id"
:label=
"item.placeName"
:value=
"item.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
type=
"primary"
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['inspection:task:add']"
>
新增
</el-button>
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['inspection:task:add']"
>
新增
</el-button
>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['inspection:task:edit']"
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['inspection:task:edit']"
>
修改
</el-button
>
修改
</el-button
>
>
</el-col>
</el-col>
<right-toolbar
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<el-table
<el-table
v-loading=
"loading"
:data=
"taskList"
@
selection-change=
"handleSelectionChange"
>
v-loading=
"loading"
:data=
"taskList"
@
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=
"ID"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"ID"
align=
"center"
prop=
"id"
/>
<el-table-column
<el-table-column
label=
"巡检日期"
align=
"center"
prop=
"pollingData"
width=
"180"
>
label=
"巡检日期"
align=
"center"
prop=
"pollingData"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
pollingData
,
"
{y
}
-{m
}
-{d
}
"
)
}}
<
/span
>
<span>
{{
parseTime
(
scope
.
row
.
pollingData
,
'
{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"
巡检人
"
align
=
"
center
"
prop
=
"
inspectionUserName
"
/>
label
=
"
巡检人
"
align
=
"
center
"
prop
=
"
inspectionUserName
"
/>
<
el
-
table
-
column
label
=
"
巡检地点
"
align
=
"
center
"
prop
=
"
placeName
"
/>
<
el
-
table
-
column
label
=
"
巡检地点
"
align
=
"
center
"
prop
=
"
placeName
"
/>
<
el
-
table
-
column
label
=
"
巡检状态
"
align
=
"
center
"
prop
=
"
taskState
"
>
<
el
-
table
-
column
label
=
"
巡检状态
"
align
=
"
center
"
prop
=
"
taskState
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
scope
.
row
.
taskState
==
1
?
"
已完成
"
:
"
巡检中
"
}}
{{
scope
.
row
.
taskState
==
1
?
'
已完成
'
:
'
巡检中
'
}}
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
备注
"
align
=
"
center
"
prop
=
"
remark
"
/>
<
el
-
table
-
column
label
=
"
备注
"
align
=
"
center
"
prop
=
"
remark
"
/>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"
操作
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
label
=
"
操作
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleUpdate(scope.row)
"
v
-
hasPermi
=
"
['inspection:task:edit']
"
>
修改
<
/el-button
>
size
=
"
mini
"
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['inspection:task:remove']
"
>
删除
<
/el-button
>
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleUpdate(scope.row)
"
v
-
hasPermi
=
"
['inspection:task:edit']
"
>
修改
<
/el-butto
n
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['inspection:task:remove']
"
>
删除
<
/el-butto
n
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
<
pagination
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNum
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNum
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<!--
添加或修改巡检任务对话框
-->
<!--
添加或修改巡检任务对话框
-->
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
500px
"
append
-
to
-
body
>
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
500px
"
append
-
to
-
body
>
...
@@ -183,37 +91,17 @@
...
@@ -183,37 +91,17 @@
:
remote
-
method
=
"
remoteMethod
"
:
remote
-
method
=
"
remoteMethod
"
:
loading
=
"
loading
"
:
loading
=
"
loading
"
>
>
<
el
-
option
<
el
-
option
v
-
for
=
"
item in useroptions
"
:
key
=
"
item.userId
"
:
label
=
"
item.nickName + '/' + item.nickName
"
:
value
=
"
item.userId
"
>
<
/el-option
>
v
-
for
=
"
item in useroptions
"
:
key
=
"
item.userId
"
:
label
=
"
item.nickName + '/' + item.nickName
"
:
value
=
"
item.userId
"
>
<
/el-option
>
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
巡检地点
"
prop
=
"
placeId
"
>
<
el
-
form
-
item
label
=
"
巡检地点
"
prop
=
"
placeId
"
>
<
el
-
select
<
el
-
select
v
-
model
=
"
form.placeId
"
placeholder
=
"
请选择巡检地点
"
clearable
@
change
=
"
placeList
"
>
v
-
model
=
"
form.placeId
"
<
el
-
option
v
-
for
=
"
item in placeList
"
:
key
=
"
item.id
"
:
label
=
"
item.placeName
"
:
value
=
"
item.id
"
/>
placeholder
=
"
请选择巡检地点
"
clearable
@
change
=
"
placeList
"
>
<
el
-
option
v
-
for
=
"
item in placeList
"
:
key
=
"
item.id
"
:
label
=
"
item.placeName
"
:
value
=
"
item.id
"
/>
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
备注
"
prop
=
"
remark
"
>
<
el
-
form
-
item
label
=
"
备注
"
prop
=
"
remark
"
>
<
el
-
input
<
el
-
input
v
-
model
=
"
form.remark
"
type
=
"
textarea
"
placeholder
=
"
请输入内容
"
/>
v
-
model
=
"
form.remark
"
type
=
"
textarea
"
placeholder
=
"
请输入内容
"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/el-form
>
<
/el-form
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
...
@@ -225,17 +113,10 @@
...
@@ -225,17 +113,10 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
import
{
listTask
,
getTask
,
delTask
,
addTask
,
updateTask
,
getInspectionUser
}
from
'
@/api/patrol/placeInspection
'
;
listTask
,
import
{
listLog
as
placeList
}
from
'
@/api/patrol/patrolLocation
'
;
getTask
,
delTask
,
addTask
,
updateTask
,
getInspectionUser
,
}
from
"
@/api/patrol/placeInspection
"
;
import
{
listLog
as
placeList
}
from
"
@/api/patrol/patrolLocation
"
;
export
default
{
export
default
{
name
:
"
Task
"
,
name
:
'
Task
'
,
data
()
{
data
()
{
return
{
return
{
// 遮罩层
// 遮罩层
...
@@ -253,7 +134,7 @@ export default {
...
@@ -253,7 +134,7 @@ export default {
// 巡检任务表格数据
// 巡检任务表格数据
taskList
:
[],
taskList
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
''
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
// 查询参数
// 查询参数
...
@@ -269,15 +150,9 @@ export default {
...
@@ -269,15 +150,9 @@ export default {
form
:
{
}
,
form
:
{
}
,
// 表单校验
// 表单校验
rules
:
{
rules
:
{
pollingData
:
[
pollingData
:
[{
required
:
true
,
message
:
'
巡检日期不能为空
'
,
trigger
:
'
blur
'
}
],
{
required
:
true
,
message
:
"
巡检日期不能为空
"
,
trigger
:
"
blur
"
}
,
inspectionUserId
:
[{
required
:
true
,
message
:
'
巡检人不能为空
'
,
trigger
:
'
blur
'
}
],
],
placeId
:
[{
required
:
true
,
message
:
'
巡检地点不能为空
'
,
trigger
:
'
blur
'
}
],
inspectionUserId
:
[
{
required
:
true
,
message
:
"
巡检人不能为空
"
,
trigger
:
"
blur
"
}
,
],
placeId
:
[
{
required
:
true
,
message
:
"
巡检地点不能为空
"
,
trigger
:
"
blur
"
}
,
],
}
,
}
,
// 巡检地点列表
// 巡检地点列表
placeList
:
[],
placeList
:
[],
...
@@ -288,9 +163,7 @@ export default {
...
@@ -288,9 +163,7 @@ export default {
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
// 禁用今天之前的日期(含今天零点)
// 禁用今天之前的日期(含今天零点)
return
(
return
time
.
getTime
()
<
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
time
.
getTime
()
<
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
);
}
,
}
,
}
,
}
,
}
;
}
;
...
@@ -304,8 +177,7 @@ export default {
...
@@ -304,8 +177,7 @@ export default {
this
.
loading
=
true
;
this
.
loading
=
true
;
getInspectionUser
({
getInspectionUser
({
userName
:
queryString
,
userName
:
queryString
,
}
).
then
((
response
)
=>
{
}
).
then
(
response
=>
{
console
.
log
(
response
.
rows
,
"
response.rows
"
);
this
.
useroptions
=
response
.
rows
;
this
.
useroptions
=
response
.
rows
;
this
.
loading
=
false
;
this
.
loading
=
false
;
...
@@ -316,25 +188,25 @@ export default {
...
@@ -316,25 +188,25 @@ export default {
getDeviceList
()
{
getDeviceList
()
{
listDevice
({
listDevice
({
deviceType
:
this
.
form
.
deviceType
,
deviceType
:
this
.
form
.
deviceType
,
}
).
then
(
(
response
)
=>
{
}
).
then
(
response
=>
{
this
.
deviceList
=
response
.
rows
;
this
.
deviceList
=
response
.
rows
;
}
);
}
);
}
,
}
,
/** 查询巡检任务列表 */
/** 查询巡检任务列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listTask
(
this
.
queryParams
).
then
(
(
response
)
=>
{
listTask
(
this
.
queryParams
).
then
(
response
=>
{
this
.
taskList
=
response
.
rows
;
this
.
taskList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
}
);
// 巡检地点列表
// 巡检地点列表
placeList
().
then
(
(
response
)
=>
{
placeList
().
then
(
response
=>
{
this
.
placeList
=
response
.
rows
;
this
.
placeList
=
response
.
rows
;
}
);
}
);
getInspectionUser
({
getInspectionUser
({
userName
:
null
,
userName
:
null
,
}
).
then
(
(
response
)
=>
{
}
).
then
(
response
=>
{
this
.
useroptions
=
response
.
rows
;
this
.
useroptions
=
response
.
rows
;
}
);
}
);
}
,
}
,
...
@@ -353,7 +225,7 @@ export default {
...
@@ -353,7 +225,7 @@ export default {
taskState
:
null
,
taskState
:
null
,
remark
:
null
,
remark
:
null
,
}
;
}
;
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
'
form
'
);
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
...
@@ -362,12 +234,12 @@ export default {
...
@@ -362,12 +234,12 @@ export default {
}
,
}
,
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
resetForm
(
'
queryForm
'
);
this
.
handleQuery
();
this
.
handleQuery
();
}
,
}
,
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
id
);
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
;
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
this
.
multiple
=
!
selection
.
length
;
}
,
}
,
...
@@ -375,34 +247,34 @@ export default {
...
@@ -375,34 +247,34 @@ export default {
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
添加巡检任务
"
;
this
.
title
=
'
添加巡检任务
'
;
}
,
}
,
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
;
const
id
=
row
.
id
||
this
.
ids
;
getTask
(
id
).
then
(
(
response
)
=>
{
getTask
(
id
).
then
(
response
=>
{
this
.
form
=
{
this
.
form
=
{
...
response
.
data
,
...
response
.
data
,
deviceType
:
Number
(
response
.
data
.
deviceType
),
deviceType
:
Number
(
response
.
data
.
deviceType
),
}
;
}
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
修改巡检任务
"
;
this
.
title
=
'
修改巡检任务
'
;
}
);
}
);
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
((
valid
)
=>
{
this
.
$refs
[
'
form
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateTask
(
this
.
form
).
then
(
(
response
)
=>
{
updateTask
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$modal
.
msgSuccess
(
'
修改成功
'
);
this
.
open
=
false
;
this
.
open
=
false
;
this
.
getList
();
this
.
getList
();
}
);
}
);
}
else
{
}
else
{
addTask
(
this
.
form
).
then
(
(
response
)
=>
{
addTask
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
$modal
.
msgSuccess
(
'
新增成功
'
);
this
.
open
=
false
;
this
.
open
=
false
;
this
.
getList
();
this
.
getList
();
}
);
}
);
...
@@ -420,7 +292,7 @@ export default {
...
@@ -420,7 +292,7 @@ export default {
}
)
}
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getList
();
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
$modal
.
msgSuccess
(
'
删除成功
'
);
}
)
}
)
.
catch
(()
=>
{
}
);
.
catch
(()
=>
{
}
);
}
,
}
,
...
...
src/views/inspection/patrol/patrolLog/index.vue
View file @
14730474
...
@@ -4,8 +4,18 @@
...
@@ -4,8 +4,18 @@
<el-form-item
label=
"巡检日期"
prop=
"pollingData"
>
<el-form-item
label=
"巡检日期"
prop=
"pollingData"
>
<el-date-picker
clearable
v-model=
"queryParams.pollingData"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择巡检日期"
>
</el-date-picker>
<el-date-picker
clearable
v-model=
"queryParams.pollingData"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择巡检日期"
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"巡检人"
prop=
"userId"
>
<el-form-item
label=
"巡检人"
prop=
"inspectionUserId"
>
<el-input
v-model=
"queryParams.userId"
placeholder=
"请输入巡检人"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-select
v-model=
"queryParams.inspectionUserId"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
v-for=
"item in useroptions"
:key=
"item.userId"
:label=
"item.userName + '/' + item.nickName"
:value=
"item.userId"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"报修单编号"
prop=
"repairsId"
>
<el-form-item
label=
"报修单编号"
prop=
"repairsId"
>
<el-input
v-model=
"queryParams.repairsId"
placeholder=
"请输入报修单编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.repairsId"
placeholder=
"请输入报修单编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
...
@@ -30,11 +40,6 @@
...
@@ -30,11 +40,6 @@
<
el
-
table
-
column
label
=
"
巡检人
"
align
=
"
center
"
prop
=
"
inspectionUserName
"
/>
<
el
-
table
-
column
label
=
"
巡检人
"
align
=
"
center
"
prop
=
"
inspectionUserName
"
/>
<
el
-
table
-
column
label
=
"
设备名称
"
align
=
"
center
"
prop
=
"
deviceName
"
/>
<
el
-
table
-
column
label
=
"
设备名称
"
align
=
"
center
"
prop
=
"
deviceName
"
/>
<
el
-
table
-
column
label
=
"
设备状态
"
align
=
"
center
"
prop
=
"
deviceState
"
>
<
el
-
table
-
column
label
=
"
设备状态
"
align
=
"
center
"
prop
=
"
deviceState
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
v
-
if
=
"
scope.row.deviceState == 1
"
type
=
"
success
"
>
正常
<
/el-tag
>
<
el
-
tag
v
-
if
=
"
scope.row.deviceState == 1
"
type
=
"
success
"
>
正常
<
/el-tag
>
<
el
-
tag
v
-
else
type
=
"
danger
"
>
异常
<
/el-tag
>
<
el
-
tag
v
-
else
type
=
"
danger
"
>
异常
<
/el-tag
>
...
@@ -48,7 +53,8 @@
...
@@ -48,7 +53,8 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listLog
,
getLog
,
delLog
,
addLog
,
updateLog
}
from
'
@/api/patrol/patrolLog
'
import
{
listLog
,
getLog
,
delLog
,
addLog
,
updateLog
}
from
'
@/api/patrol/patrolLog
'
;
import
{
getInspectionUser
}
from
'
@/api/patrol/placeInspection
'
;
export
default
{
export
default
{
name
:
'
Inspection
'
,
name
:
'
Inspection
'
,
...
@@ -77,11 +83,13 @@ export default {
...
@@ -77,11 +83,13 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
pollingData
:
null
,
pollingData
:
null
,
user
Id
:
null
,
user
Name
:
null
,
deviceId
:
null
,
deviceId
:
null
,
deviceState
:
null
,
deviceState
:
null
,
repairsId
:
null
,
repairsId
:
null
,
}
,
}
,
// 用户下拉选项
useroptions
:
[],
// 表单参数
// 表单参数
form
:
{
}
,
form
:
{
}
,
// 表单校验
// 表单校验
...
@@ -89,25 +97,41 @@ export default {
...
@@ -89,25 +97,41 @@ export default {
userId
:
[{
required
:
true
,
message
:
'
巡检人不能为空
'
,
trigger
:
'
blur
'
}
],
userId
:
[{
required
:
true
,
message
:
'
巡检人不能为空
'
,
trigger
:
'
blur
'
}
],
deviceId
:
[{
required
:
true
,
message
:
'
设备id不能为空
'
,
trigger
:
'
blur
'
}
],
deviceId
:
[{
required
:
true
,
message
:
'
设备id不能为空
'
,
trigger
:
'
blur
'
}
],
}
,
}
,
}
}
;
}
,
}
,
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
;
}
,
}
,
methods
:
{
methods
:
{
/** 查询巡检记录列表 */
/** 查询巡检记录列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
;
listLog
(
this
.
queryParams
).
then
((
response
)
=>
{
listLog
(
this
.
queryParams
).
then
(
response
=>
{
this
.
inspectionList
=
response
.
rows
this
.
inspectionList
=
response
.
rows
;
this
.
total
=
response
.
total
this
.
total
=
response
.
total
;
this
.
loading
=
false
this
.
loading
=
false
;
}
)
}
);
getInspectionUser
({
userName
:
null
,
}
).
then
(
response
=>
{
this
.
useroptions
=
response
.
rows
;
}
);
}
,
// 远程搜索
remoteMethod
(
queryString
)
{
this
.
loading
=
true
;
getInspectionUser
({
userName
:
queryString
,
}
).
then
(
response
=>
{
this
.
useroptions
=
response
.
rows
;
this
.
loading
=
false
;
}
);
}
,
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
this
.
open
=
false
;
this
.
reset
()
this
.
reset
()
;
}
,
}
,
// 表单重置
// 表单重置
reset
()
{
reset
()
{
...
@@ -123,74 +147,74 @@ export default {
...
@@ -123,74 +147,74 @@ export default {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
}
}
;
this
.
resetForm
(
'
form
'
)
this
.
resetForm
(
'
form
'
)
;
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
this
.
getList
()
;
}
,
}
,
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
resetForm
(
'
queryForm
'
)
this
.
resetForm
(
'
queryForm
'
)
;
this
.
handleQuery
()
this
.
handleQuery
()
;
}
,
}
,
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
;
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
()
this
.
reset
()
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
添加巡检记录
'
this
.
title
=
'
添加巡检记录
'
;
}
,
}
,
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
()
this
.
reset
()
;
const
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
;
getLog
(
id
).
then
(
(
response
)
=>
{
getLog
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
form
=
response
.
data
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
修改巡检记录
'
this
.
title
=
'
修改巡检记录
'
;
}
)
}
)
;
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
'
form
'
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
'
form
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateLog
(
this
.
form
).
then
(
(
response
)
=>
{
updateLog
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
修改成功
'
)
this
.
$modal
.
msgSuccess
(
'
修改成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
else
{
}
else
{
addLog
(
this
.
form
).
then
(
(
response
)
=>
{
addLog
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
}
}
}
}
)
}
)
;
}
,
}
,
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
this
.
$modal
.
confirm
(
'
是否确认删除巡检记录编号为"
'
+
ids
+
'
"的数据项?
'
)
.
confirm
(
'
是否确认删除巡检记录编号为"
'
+
ids
+
'
"的数据项?
'
)
.
then
(
function
()
{
.
then
(
function
()
{
return
delLog
(
ids
)
return
delLog
(
ids
)
;
}
)
}
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getList
()
this
.
getList
()
;
this
.
$modal
.
msgSuccess
(
'
删除成功
'
)
this
.
$modal
.
msgSuccess
(
'
删除成功
'
)
;
}
)
}
)
.
catch
(()
=>
{
}
)
.
catch
(()
=>
{
}
)
;
}
,
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
@@ -200,8 +224,8 @@ export default {
...
@@ -200,8 +224,8 @@ export default {
...
this
.
queryParams
,
...
this
.
queryParams
,
}
,
}
,
`inspection_${new Date().getTime()
}
.xlsx`
`inspection_${new Date().getTime()
}
.xlsx`
)
)
;
}
,
}
,
}
,
}
,
}
}
;
<
/script
>
<
/script
>
src/views/inspection/patrol/patrolProject/index.vue
View file @
14730474
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<
el
-
table
-
column
label
=
"
设备名称
"
align
=
"
center
"
prop
=
"
deviceName
"
/>
<
el
-
table
-
column
label
=
"
设备名称
"
align
=
"
center
"
prop
=
"
deviceName
"
/>
<
el
-
table
-
column
label
=
"
设备编号
"
align
=
"
center
"
prop
=
"
deviceNo
"
/>
<
el
-
table
-
column
label
=
"
设备编号
"
align
=
"
center
"
prop
=
"
deviceNo
"
/>
<
el
-
table
-
column
label
=
"
巡检状态
"
align
=
"
center
"
prop
=
"
taskState
"
>
<
el
-
table
-
column
label
=
"
巡检状态
"
align
=
"
center
"
prop
=
"
taskState
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
s
cope
.
row
.
taskState
==
1
?
'
已完成
'
:
'
巡检中
'
}}
<
/template
>
<
template
slot
-
scope
=
"
scope
"
>
{{
s
electDictLabels
(
taskStateList
,
scope
.
row
.
taskState
)
}}
<
/template
>
<
/el-table-column
>
<
/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
"
>
...
@@ -88,13 +88,13 @@
...
@@ -88,13 +88,13 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listTask
,
getTask
,
delTask
,
addTask
,
updateTask
,
getInspectionUser
}
from
'
@/api/patrol/patrolProject
'
import
{
listTask
,
getTask
,
delTask
,
addTask
,
updateTask
,
getInspectionUser
}
from
'
@/api/patrol/patrolProject
'
;
import
{
listDevice
as
deviceTypeList
}
from
'
@/api/device/deviceType
'
import
{
listDevice
as
deviceTypeList
}
from
'
@/api/device/deviceType
'
;
import
{
listDevice
}
from
'
@/api/device/device
'
import
{
listDevice
}
from
'
@/api/device/device
'
;
import
{
listDept
}
from
'
@/api/system/dept
'
import
{
listDept
}
from
'
@/api/system/dept
'
;
import
{
listUser
}
from
'
@/api/system/user
'
import
{
listUser
}
from
'
@/api/system/user
'
;
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
;
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
;
export
default
{
export
default
{
components
:
{
components
:
{
Treeselect
,
Treeselect
,
...
@@ -137,6 +137,11 @@ export default {
...
@@ -137,6 +137,11 @@ export default {
status
:
undefined
,
status
:
undefined
,
deptId
:
undefined
,
deptId
:
undefined
,
}
,
}
,
taskStateList
:
[
{
label
:
'
待巡检
'
,
value
:
0
}
,
{
label
:
'
巡检中
'
,
value
:
1
}
,
{
label
:
'
已完成
'
,
value
:
2
}
,
],
// 表单参数
// 表单参数
form
:
{
}
,
form
:
{
}
,
deptOptions
:
[],
deptOptions
:
[],
...
@@ -190,104 +195,104 @@ export default {
...
@@ -190,104 +195,104 @@ export default {
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
// 禁用今天之前的日期(含今天零点)
// 禁用今天之前的日期(含今天零点)
return
time
.
getTime
()
<
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
return
time
.
getTime
()
<
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
;
}
,
}
,
}
,
}
,
}
}
;
}
,
}
,
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
;
}
,
}
,
methods
:
{
methods
:
{
// 远程搜索
// 远程搜索
remoteMethod
(
queryString
)
{
remoteMethod
(
queryString
)
{
this
.
loading
=
true
this
.
loading
=
true
;
getInspectionUser
({
getInspectionUser
({
userName
:
queryString
,
userName
:
queryString
,
}
).
then
(
(
response
)
=>
{
}
).
then
(
response
=>
{
this
.
useroptions
=
response
.
rows
this
.
useroptions
=
response
.
rows
;
this
.
loading
=
false
this
.
loading
=
false
;
}
)
}
)
;
}
,
}
,
/** 转换部门数据结构 */
/** 转换部门数据结构 */
normalizer
(
node
)
{
normalizer
(
node
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
delete
node
.
children
delete
node
.
children
;
}
}
return
{
return
{
id
:
node
.
deptId
,
id
:
node
.
deptId
,
label
:
node
.
deptName
,
label
:
node
.
deptName
,
children
:
node
.
children
,
children
:
node
.
children
,
}
}
;
}
,
}
,
deptSelect
(
val
)
{
deptSelect
(
val
)
{
this
.
queryParamsUser
.
deptId
=
val
.
deptId
this
.
queryParamsUser
.
deptId
=
val
.
deptId
;
this
.
form
.
inspectionUserId
=
null
this
.
form
.
inspectionUserId
=
null
;
this
.
getUserList
()
this
.
getUserList
()
;
}
,
}
,
/** 查询用户列表 */
/** 查询用户列表 */
getUserList
()
{
getUserList
()
{
listUser
(
this
.
addDateRange
(
this
.
queryParamsUser
)).
then
(
(
response
)
=>
{
listUser
(
this
.
addDateRange
(
this
.
queryParamsUser
)).
then
(
response
=>
{
this
.
userList
=
response
.
rows
this
.
userList
=
response
.
rows
;
}
)
}
)
;
}
,
}
,
//根据设备类型查询设备列表
//根据设备类型查询设备列表
getDeviceList
(
val
)
{
getDeviceList
(
val
)
{
// 清空部门
// 清空部门
this
.
deptOptions
=
[]
this
.
deptOptions
=
[]
;
const
typeDeptIds
=
this
.
deviceTypeList
.
find
(
(
item
)
=>
item
.
id
===
val
).
typeDeptIds
const
typeDeptIds
=
this
.
deviceTypeList
.
find
(
item
=>
item
.
id
===
val
).
typeDeptIds
;
// 如果有关联的部门ID,则进行查询
// 如果有关联的部门ID,则进行查询
if
(
typeDeptIds
&&
typeDeptIds
.
length
>
0
)
{
if
(
typeDeptIds
&&
typeDeptIds
.
length
>
0
)
{
// 创建所有 listDept 请求的 Promise 数组
// 创建所有 listDept 请求的 Promise 数组
const
deptPromises
=
typeDeptIds
.
map
(
(
deptId
)
=>
const
deptPromises
=
typeDeptIds
.
map
(
deptId
=>
listDept
({
deptId
:
deptId
}
)
listDept
({
deptId
:
deptId
}
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
// 处理并返回数据
// 处理并返回数据
return
this
.
handleTree
(
response
.
data
,
'
deptId
'
)
return
this
.
handleTree
(
response
.
data
,
'
deptId
'
)
;
}
)
}
)
.
catch
(
(
error
)
=>
{
.
catch
(
error
=>
{
return
[]
// 返回空数组,避免 Promise.all 失败
return
[]
;
// 返回空数组,避免 Promise.all 失败
}
)
}
)
)
)
;
//等待所有请求完成
//等待所有请求完成
Promise
.
all
(
deptPromises
)
Promise
.
all
(
deptPromises
)
.
then
((
deptData
)
=>
{
.
then
(
deptData
=>
{
this
.
deptOptions
=
deptData
.
flat
()
this
.
deptOptions
=
deptData
.
flat
();
}
)
.
catch
((
error
)
=>
{
console
.
error
(
'
获取部门数据失败:
'
,
error
)
}
)
}
)
.
catch
(
error
=>
{
console
.
error
(
'
获取部门数据失败:
'
,
error
);
}
);
}
}
this
.
form
.
deviceId
=
null
this
.
form
.
deviceId
=
null
;
this
.
form
.
inspectionUserId
=
null
this
.
form
.
inspectionUserId
=
null
;
listDevice
({
listDevice
({
deviceType
:
this
.
form
.
deviceType
,
deviceType
:
this
.
form
.
deviceType
,
}
).
then
(
(
response
)
=>
{
}
).
then
(
response
=>
{
this
.
deviceList
=
response
.
rows
this
.
deviceList
=
response
.
rows
;
}
)
}
)
;
}
,
}
,
/** 查询巡检任务列表 */
/** 查询巡检任务列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
;
listTask
(
this
.
queryParams
).
then
(
(
response
)
=>
{
listTask
(
this
.
queryParams
).
then
(
response
=>
{
this
.
taskList
=
response
.
rows
this
.
taskList
=
response
.
rows
;
this
.
total
=
response
.
total
this
.
total
=
response
.
total
;
this
.
loading
=
false
this
.
loading
=
false
;
}
)
}
)
;
// 设备类型列表
// 设备类型列表
deviceTypeList
().
then
(
(
response
)
=>
{
deviceTypeList
().
then
(
response
=>
{
this
.
deviceTypeList
=
response
.
rows
this
.
deviceTypeList
=
response
.
rows
;
}
)
}
)
;
getInspectionUser
({
getInspectionUser
({
userName
:
null
,
userName
:
null
,
}
).
then
(
(
response
)
=>
{
}
).
then
(
response
=>
{
this
.
useroptions
=
response
.
rows
this
.
useroptions
=
response
.
rows
;
}
)
}
)
;
}
,
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
this
.
open
=
false
;
this
.
reset
()
this
.
reset
()
;
}
,
}
,
// 表单重置
// 表单重置
reset
()
{
reset
()
{
...
@@ -302,64 +307,64 @@ export default {
...
@@ -302,64 +307,64 @@ export default {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
}
}
;
this
.
resetForm
(
'
form
'
)
this
.
resetForm
(
'
form
'
)
;
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
this
.
getList
()
;
}
,
}
,
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
resetForm
(
'
queryForm
'
)
this
.
resetForm
(
'
queryForm
'
)
;
this
.
handleQuery
()
this
.
handleQuery
()
;
}
,
}
,
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
;
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
()
this
.
reset
()
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
添加巡检任务
'
this
.
title
=
'
添加巡检任务
'
;
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
'
form
'
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
'
form
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateTask
(
this
.
form
).
then
(
(
response
)
=>
{
updateTask
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
修改成功
'
)
this
.
$modal
.
msgSuccess
(
'
修改成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
else
{
}
else
{
addTask
(
this
.
form
).
then
(
(
response
)
=>
{
addTask
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
}
}
}
}
)
}
)
;
}
,
}
,
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
this
.
$modal
.
confirm
(
'
是否确认删除巡检任务编号为"
'
+
ids
+
'
"的数据项?
'
)
.
confirm
(
'
是否确认删除巡检任务编号为"
'
+
ids
+
'
"的数据项?
'
)
.
then
(
function
()
{
.
then
(
function
()
{
return
delTask
(
ids
)
return
delTask
(
ids
)
;
}
)
}
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getList
()
this
.
getList
()
;
this
.
$modal
.
msgSuccess
(
'
删除成功
'
)
this
.
$modal
.
msgSuccess
(
'
删除成功
'
)
;
}
)
}
)
.
catch
(()
=>
{
}
)
.
catch
(()
=>
{
}
)
;
}
,
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
@@ -369,8 +374,8 @@ export default {
...
@@ -369,8 +374,8 @@ export default {
...
this
.
queryParams
,
...
this
.
queryParams
,
}
,
}
,
`task_${new Date().getTime()
}
.xlsx`
`task_${new Date().getTime()
}
.xlsx`
)
)
;
}
,
}
,
}
,
}
,
}
}
;
<
/script
>
<
/script
>
src/views/inspection/repair/repairLog/index.vue
View file @
14730474
...
@@ -23,9 +23,9 @@
...
@@ -23,9 +23,9 @@
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备编码"
align=
"center"
prop=
"deviceNo"
/>
<el-table-column
label=
"设备编码"
align=
"center"
prop=
"deviceNo"
/>
<el-table-column
label=
"巡检人"
align=
"center"
prop=
"inspectionUserName"
/>
<el-table-column
label=
"巡检人"
align=
"center"
prop=
"inspectionUserName"
/>
<el-table-column
label=
"设备故障描述"
align=
"center"
prop=
"deviceErro
r
Detail"
>
<el-table-column
label=
"设备故障描述"
align=
"center"
prop=
"deviceErroDetail"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
deviceErro
r
Detail
||
'
-
'
}}
</span>
<span>
{{
scope
.
row
.
deviceErroDetail
||
'
-
'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"维修单日期"
align=
"center"
prop=
"repairsDate"
width=
"180"
>
<el-table-column
label=
"维修单日期"
align=
"center"
prop=
"repairsDate"
width=
"180"
>
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listMaintain
,
getMaintain
,
delMaintain
,
addMaintain
,
updateMaintain
}
from
'
@/api/repair/repairLog
'
import
{
listMaintain
,
getMaintain
,
delMaintain
,
addMaintain
,
updateMaintain
}
from
'
@/api/repair/repairLog
'
;
import
{
listDevice
as
listDeviceType
}
from
'
@/api/device/deviceType
'
import
{
listDevice
as
listDeviceType
}
from
'
@/api/device/deviceType
'
;
export
default
{
export
default
{
name
:
'
Maintain
'
,
name
:
'
Maintain
'
,
...
@@ -144,28 +144,28 @@ export default {
...
@@ -144,28 +144,28 @@ export default {
rules
:
{
rules
:
{
repairsId
:
[{
required
:
true
,
message
:
'
维修单编号不能为空
'
,
trigger
:
'
blur
'
}
],
repairsId
:
[{
required
:
true
,
message
:
'
维修单编号不能为空
'
,
trigger
:
'
blur
'
}
],
}
,
}
,
}
}
;
}
,
}
,
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
;
listDeviceType
().
then
(
(
response
)
=>
{
listDeviceType
().
then
(
response
=>
{
this
.
deviceTypeList
=
response
.
rows
this
.
deviceTypeList
=
response
.
rows
;
}
)
}
)
;
}
,
}
,
methods
:
{
methods
:
{
/** 查询维修历史列表 */
/** 查询维修历史列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
;
listMaintain
(
this
.
queryParams
).
then
(
(
response
)
=>
{
listMaintain
(
this
.
queryParams
).
then
(
response
=>
{
this
.
maintainList
=
response
.
rows
this
.
maintainList
=
response
.
rows
;
this
.
total
=
response
.
total
this
.
total
=
response
.
total
;
this
.
loading
=
false
this
.
loading
=
false
;
}
)
}
)
;
}
,
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
this
.
open
=
false
;
this
.
reset
()
this
.
reset
()
;
}
,
}
,
// 表单重置
// 表单重置
reset
()
{
reset
()
{
...
@@ -187,68 +187,68 @@ export default {
...
@@ -187,68 +187,68 @@ export default {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
}
}
;
this
.
resetForm
(
'
form
'
)
this
.
resetForm
(
'
form
'
)
;
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
this
.
getList
()
;
}
,
}
,
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
resetForm
(
'
queryForm
'
)
this
.
resetForm
(
'
queryForm
'
)
;
this
.
handleQuery
()
this
.
handleQuery
()
;
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
()
this
.
reset
()
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
添加维修历史
'
this
.
title
=
'
添加维修历史
'
;
}
,
}
,
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
()
this
.
reset
()
;
const
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
;
getMaintain
(
id
).
then
(
(
response
)
=>
{
getMaintain
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
form
=
response
.
data
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
修改维修历史
'
this
.
title
=
'
修改维修历史
'
;
}
)
}
)
;
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
'
form
'
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
'
form
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateMaintain
(
this
.
form
).
then
(
(
response
)
=>
{
updateMaintain
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
修改成功
'
)
this
.
$modal
.
msgSuccess
(
'
修改成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
else
{
}
else
{
addMaintain
(
this
.
form
).
then
(
(
response
)
=>
{
addMaintain
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
}
}
}
}
)
}
)
;
}
,
}
,
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
this
.
$modal
.
confirm
(
'
是否确认删除维修历史编号为"
'
+
ids
+
'
"的数据项?
'
)
.
confirm
(
'
是否确认删除维修历史编号为"
'
+
ids
+
'
"的数据项?
'
)
.
then
(
function
()
{
.
then
(
function
()
{
return
delMaintain
(
ids
)
return
delMaintain
(
ids
)
;
}
)
}
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getList
()
this
.
getList
()
;
this
.
$modal
.
msgSuccess
(
'
删除成功
'
)
this
.
$modal
.
msgSuccess
(
'
删除成功
'
)
;
}
)
}
)
.
catch
(()
=>
{
}
)
.
catch
(()
=>
{
}
)
;
}
,
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
@@ -258,8 +258,8 @@ export default {
...
@@ -258,8 +258,8 @@ export default {
...
this
.
queryParams
,
...
this
.
queryParams
,
}
,
}
,
`maintain_${new Date().getTime()
}
.xlsx`
`maintain_${new Date().getTime()
}
.xlsx`
)
)
;
}
,
}
,
}
,
}
,
}
}
;
<
/script
>
<
/script
>
src/views/inspection/repair/repairProject/index.vue
View file @
14730474
...
@@ -132,14 +132,14 @@
...
@@ -132,14 +132,14 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listWorkOrder
,
getWorkOrder
,
addWorkOrder
,
updateWorkOrder
}
from
'
@/api/repair/repairProject
'
import
{
listWorkOrder
,
getWorkOrder
,
addWorkOrder
,
updateWorkOrder
}
from
'
@/api/repair/repairProject
'
;
import
{
listDevice
as
listDeviceType
}
from
'
@/api/device/deviceType
'
import
{
listDevice
as
listDeviceType
}
from
'
@/api/device/deviceType
'
;
import
{
listDevice
as
listDeviceName
}
from
'
@/api/device/device
'
import
{
listDevice
as
listDeviceName
}
from
'
@/api/device/device
'
;
import
{
listUser
}
from
'
@/api/system/user
'
import
{
listUser
}
from
'
@/api/system/user
'
;
import
{
listDept
}
from
'
@/api/system/dept
'
import
{
listDept
}
from
'
@/api/system/dept
'
;
import
Treeselect
from
'
@riophae/vue-treeselect
'
import
Treeselect
from
'
@riophae/vue-treeselect
'
;
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
;
import
FileUploadInspec
from
'
@/components/FileUploadInspec
'
import
FileUploadInspec
from
'
@/components/FileUploadInspec
'
;
export
default
{
export
default
{
name
:
'
WorkOrder
'
,
name
:
'
WorkOrder
'
,
components
:
{
Treeselect
,
FileUploadInspec
}
,
components
:
{
Treeselect
,
FileUploadInspec
}
,
...
@@ -220,64 +220,64 @@ export default {
...
@@ -220,64 +220,64 @@ export default {
maintainDeptId
:
[{
required
:
true
,
message
:
'
部门名称不能为空
'
,
trigger
:
'
blur
'
}
],
maintainDeptId
:
[{
required
:
true
,
message
:
'
部门名称不能为空
'
,
trigger
:
'
blur
'
}
],
maintainUserId
:
[{
required
:
true
,
message
:
'
维修负责人不能为空
'
,
trigger
:
'
blur
'
}
],
maintainUserId
:
[{
required
:
true
,
message
:
'
维修负责人不能为空
'
,
trigger
:
'
blur
'
}
],
}
,
}
,
}
}
;
}
,
}
,
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
;
listDeviceType
().
then
(
(
response
)
=>
{
listDeviceType
().
then
(
response
=>
{
this
.
deviceTypeList
=
response
.
rows
this
.
deviceTypeList
=
response
.
rows
;
}
)
}
)
;
}
,
}
,
methods
:
{
methods
:
{
/** 查询工单派遣列表 */
/** 查询工单派遣列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
;
listWorkOrder
(
this
.
queryParams
).
then
(
(
response
)
=>
{
listWorkOrder
(
this
.
queryParams
).
then
(
response
=>
{
this
.
workOrderList
=
response
.
rows
this
.
workOrderList
=
response
.
rows
;
this
.
total
=
response
.
total
this
.
total
=
response
.
total
;
this
.
loading
=
false
this
.
loading
=
false
;
}
)
}
)
;
}
,
}
,
// 设备名称
// 设备名称
getDeviceName
(
val
)
{
getDeviceName
(
val
)
{
// 清空部门
// 清空部门
this
.
deptOptions
=
[]
this
.
deptOptions
=
[]
;
const
typeDeptIds
=
this
.
deviceTypeList
.
find
(
(
item
)
=>
item
.
id
===
val
).
typeDeptIds
const
typeDeptIds
=
this
.
deviceTypeList
.
find
(
item
=>
item
.
id
===
val
).
typeDeptIds
;
// 如果有关联的部门ID,则进行查询
// 如果有关联的部门ID,则进行查询
if
(
typeDeptIds
&&
typeDeptIds
.
length
>
0
)
{
if
(
typeDeptIds
&&
typeDeptIds
.
length
>
0
)
{
// 创建所有 listDept 请求的 Promise 数组
// 创建所有 listDept 请求的 Promise 数组
const
deptPromises
=
typeDeptIds
.
map
(
(
deptId
)
=>
const
deptPromises
=
typeDeptIds
.
map
(
deptId
=>
listDept
({
deptId
:
deptId
}
)
listDept
({
deptId
:
deptId
}
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
// 处理并返回数据
// 处理并返回数据
return
this
.
handleTree
(
response
.
data
,
'
deptId
'
)
return
this
.
handleTree
(
response
.
data
,
'
deptId
'
)
;
}
)
}
)
.
catch
(
(
error
)
=>
{
.
catch
(
error
=>
{
return
[]
// 返回空数组,避免 Promise.all 失败
return
[]
;
// 返回空数组,避免 Promise.all 失败
}
)
}
)
)
)
;
//等待所有请求完成
//等待所有请求完成
Promise
.
all
(
deptPromises
)
Promise
.
all
(
deptPromises
)
.
then
((
deptData
)
=>
{
.
then
(
deptData
=>
{
this
.
deptOptions
=
deptData
.
flat
()
this
.
deptOptions
=
deptData
.
flat
();
}
)
.
catch
((
error
)
=>
{
console
.
error
(
'
获取部门数据失败:
'
,
error
)
}
)
}
)
.
catch
(
error
=>
{
console
.
error
(
'
获取部门数据失败:
'
,
error
);
}
);
}
}
listDeviceName
({
deviceType
:
val
}
).
then
(
(
response
)
=>
{
listDeviceName
({
deviceType
:
val
}
).
then
(
response
=>
{
this
.
deviceNameList
=
response
.
rows
this
.
deviceNameList
=
response
.
rows
;
}
)
}
)
;
this
.
form
.
deviceName
=
null
this
.
form
.
deviceName
=
null
;
this
.
form
.
deviceNo
=
null
this
.
form
.
deviceNo
=
null
;
this
.
form
.
maintainDeptId
=
null
this
.
form
.
maintainDeptId
=
null
;
}
,
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
this
.
open
=
false
;
this
.
reset
()
this
.
reset
()
;
}
,
}
,
// 表单重置
// 表单重置
reset
()
{
reset
()
{
...
@@ -301,123 +301,124 @@ export default {
...
@@ -301,123 +301,124 @@ export default {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
}
}
;
this
.
resetForm
(
'
form
'
)
this
.
resetForm
(
'
form
'
)
;
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
this
.
getList
()
;
}
,
}
,
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
resetForm
(
'
queryForm
'
)
this
.
resetForm
(
'
queryForm
'
)
;
this
.
handleQuery
()
this
.
handleQuery
()
;
}
,
}
,
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
;
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
()
this
.
reset
()
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
添加工单派遣
'
this
.
title
=
'
添加工单派遣
'
;
// listDept().then((response) =>
{
// listDept().then((response) =>
{
// this.deptOptions = this.handleTree(response.data, 'deptId')
// this.deptOptions = this.handleTree(response.data, 'deptId')
//
}
)
//
}
)
}
,
}
,
/** 派单 */
/** 派单 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
const
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
;
listDept
().
then
((
response
)
=>
{
listDept
().
then
(
response
=>
{
this
.
deptOptions
=
this
.
handleTree
(
response
.
data
,
'
deptId
'
)
this
.
deptOptions
=
this
.
handleTree
(
response
.
data
,
'
deptId
'
);
}
)
}
);
getWorkOrder
(
id
).
then
((
response
)
=>
{
getWorkOrder
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
form
=
response
.
data
;
this
.
openpd
=
true
console
.
log
(
this
.
form
);
this
.
title
=
'
派遣
'
this
.
openpd
=
true
;
}
)
this
.
title
=
'
派遣
'
;
}
);
}
,
}
,
// 查看
// 查看
handleView
(
row
)
{
handleView
(
row
)
{
const
id
=
row
.
id
||
this
.
ids
const
id
=
row
.
id
||
this
.
ids
;
// listDept().then((response) =>
{
// listDept().then((response) =>
{
// this.deptOptions = this.handleTree(response.data, 'deptId')
// this.deptOptions = this.handleTree(response.data, 'deptId')
//
}
)
//
}
)
getWorkOrder
(
id
).
then
(
(
response
)
=>
{
getWorkOrder
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
form
=
response
.
data
;
this
.
open
=
true
this
.
open
=
true
;
this
.
title
=
'
查看
'
this
.
title
=
'
查看
'
;
console
.
log
(
this
.
form
)
console
.
log
(
this
.
form
)
;
}
)
}
)
;
}
,
}
,
/** 转换部门数据结构 */
/** 转换部门数据结构 */
normalizer
(
node
)
{
normalizer
(
node
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
delete
node
.
children
delete
node
.
children
;
}
}
return
{
return
{
id
:
node
.
deptId
,
id
:
node
.
deptId
,
label
:
node
.
deptName
,
label
:
node
.
deptName
,
children
:
node
.
children
,
children
:
node
.
children
,
}
}
;
}
,
}
,
deptSelect
(
val
)
{
deptSelect
(
val
)
{
this
.
queryParamsUser
.
deptId
=
val
.
deptId
this
.
queryParamsUser
.
deptId
=
val
.
deptId
;
this
.
form
.
maintainUserId
=
null
this
.
form
.
maintainUserId
=
null
;
this
.
getUserList
()
this
.
getUserList
()
;
}
,
}
,
/** 查询用户列表 */
/** 查询用户列表 */
getUserList
()
{
getUserList
()
{
listUser
(
this
.
addDateRange
(
this
.
queryParamsUser
)).
then
(
(
response
)
=>
{
listUser
(
this
.
addDateRange
(
this
.
queryParamsUser
)).
then
(
response
=>
{
this
.
userList
=
response
.
rows
this
.
userList
=
response
.
rows
;
}
)
}
)
;
}
,
}
,
getDeviceNo
(
val
)
{
getDeviceNo
(
val
)
{
this
.
form
.
_deviceName
=
val
this
.
form
.
_deviceName
=
val
;
this
.
form
.
deviceName
=
val
.
deviceName
this
.
form
.
deviceName
=
val
.
deviceName
;
this
.
form
.
deviceNo
=
val
.
deviceNo
this
.
form
.
deviceNo
=
val
.
deviceNo
;
this
.
form
.
deviceId
=
val
.
deviceId
this
.
form
.
deviceId
=
val
.
deviceId
;
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
'
form
'
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
'
form
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
_deviceName
)
{
if
(
this
.
form
.
_deviceName
)
{
delete
this
.
form
.
_deviceName
delete
this
.
form
.
_deviceName
;
}
}
addWorkOrder
(
this
.
form
).
then
(
(
response
)
=>
{
addWorkOrder
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
this
.
$modal
.
msgSuccess
(
'
新增成功
'
)
;
this
.
open
=
false
this
.
open
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
}
}
)
}
)
;
}
,
}
,
// 派单提交
// 派单提交
submitFormOrder
()
{
submitFormOrder
()
{
this
.
$refs
[
'
formpd
'
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
'
formpd
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
updateWorkOrder
({
...
this
.
form
,
...
this
.
formpd
}
).
then
(
(
response
)
=>
{
updateWorkOrder
({
...
this
.
form
,
...
this
.
formpd
}
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'
派单成功
'
)
this
.
$modal
.
msgSuccess
(
'
派单成功
'
)
;
this
.
openpd
=
false
this
.
openpd
=
false
;
this
.
getList
()
this
.
getList
()
;
}
)
}
)
;
}
}
}
)
}
)
;
}
,
}
,
// 文件上传回调
// 文件上传回调
fileSuccess
(
val
)
{
fileSuccess
(
val
)
{
this
.
form
.
deviceErrorPhotos
=
val
this
.
form
.
deviceErrorPhotos
=
val
;
}
,
}
,
// 文件删除
// 文件删除
handleRemove
(
url
)
{
handleRemove
(
url
)
{
this
.
form
.
deviceErrorPhotos
=
url
this
.
form
.
deviceErrorPhotos
=
url
;
}
,
}
,
}
,
}
,
}
}
;
<
/script
>
<
/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