Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
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
TFMOM
TF-MOM-WEB
Commits
e6e59bbe
Commit
e6e59bbe
authored
May 10, 2024
by
wangdanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
器材代用维护
parent
2a02e53b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
114 additions
and
0 deletions
+114
-0
index.vue
...nents/components/SubstituteMaintenanceEquipment/index.vue
+114
-0
No files found.
applications/dee-mes/src/privateComponents/components/SubstituteMaintenanceEquipment/index.vue
0 → 100644
View file @
e6e59bbe
<
template
>
<div>
<dee-as-com
:lay-config=
"layConfig"
@
searchEvent=
"search"
/>
<dee-as-com
ref=
"table"
:lay-config=
"
{
typeName: 'JoExecutePlan',
layKey: 'SubstituteMaintenanceEquipmentTable'
}"
dis-business
:result-data="tableData"
@row-click="onRowClick"
/>
<div
class=
"foot-btn-box"
>
<el-button
type=
"primary"
@
click=
"submitEvent"
>
确认
</el-button>
<el-button
@
click=
"cancelEvent"
>
取消
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'器材代用维护'
,
name
:
'SubstituteMaintenanceEquipment'
,
components
:
{},
props
:
{},
data
()
{
return
{
tableData
:
[],
substituteRowData
:
{},
rowData
:
null
}
},
computed
:
{
layConfig
()
{
return
{
typeName
:
'JoExecutePlan'
,
layKey
:
'SubstituteMaintenanceEquipmentSearch'
}
}
},
watch
:
{},
// 生命周期 - 创建完成(可以访问当前this 实例)
created
()
{
},
// 生命周期 - 挂载之前
beforeMount
()
{
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted
()
{
},
methods
:
{
search
(
data
)
{
this
.
substituteRowData
=
this
.
$utils
.
findByNameVnode
(
this
,
'DeeAsPage'
).
rowData
const
aoInfo
=
data
.
items
.
length
?
data
.
items
[
0
].
value
:
''
const
params
=
{
aoInfo
,
airModel
:
this
.
substituteRowData
.
airModel
,
sorties
:
this
.
substituteRowData
.
serialNo
,
itemResCode
:
this
.
substituteRowData
.
itemCode
}
post
(
`/JoExecutePlan/getCanSubstituteAo`
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
tableData
=
res
.
items
}
})
},
getQueryValue
(
data
,
key
)
{
return
data
.
items
.
find
(
item
=>
item
.
fieldName
===
key
)
?
data
.
items
.
find
(
item
=>
item
.
fieldName
===
key
).
value
:
''
},
onRowClick
(
data
)
{
this
.
rowData
=
data
.
row
},
submitEvent
()
{
if
(
!
this
.
rowData
)
{
this
.
$utils
.
showMessageWarning
(
'请点击列表中的其中一行!'
)
return
false
}
const
params
=
{
source
:
this
.
substituteRowData
,
target
:
this
.
rowData
}
post
(
`/Substitutelink/createSubstituteLink`
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$utils
.
showMessageSuccess
(
'创建成功!'
)
const
obj
=
[{
'fieldName'
:
'sourceId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
substituteRowData
.
id
}]
this
.
$utils
.
findByNameVnode
(
this
,
'DeeAsTable'
).
getData
(
obj
)
this
.
cancelEvent
()
}
})
},
cancelEvent
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.foot-btn-box
{
display
:
flex
;
justify-content
:
center
;
padding
:
20px
}
</
style
>
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