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
3e83e9f9
Commit
3e83e9f9
authored
Sep 21, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供外出库架次联动修改
parent
a9dcdea0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
18 deletions
+65
-18
config.js
...c/privateComponents/components/getSortiesSelect/config.js
+32
-0
index.vue
...c/privateComponents/components/getSortiesSelect/index.vue
+33
-18
No files found.
applications/dee-mes/src/privateComponents/components/getSortiesSelect/config.js
0 → 100644
View file @
3e83e9f9
export
default
{
props
:
{},
layoutConfigData
:
[
{
title
:
'高级组件配置'
,
data
:
[
{
key
:
'linkageAttr'
,
title
:
'架次联动属性'
,
component
:
{
defaultValue
:
'aircraftType'
,
name
:
'el-input'
,
placeholder
:
'机型Key'
}
}
]
}
],
data
()
{
return
{
}
},
created
()
{
},
computed
:
{
},
methods
:
{
}
}
applications/dee-mes/src/privateComponents/components/getSortiesSelect/index.vue
View file @
3e83e9f9
...
...
@@ -17,10 +17,14 @@
</div>
</
template
>
<
script
>
import
config
from
'./config'
import
_get
from
'lodash.get'
export
default
{
componentName
:
'供外出库架次'
,
name
:
'GetSortiesSelect'
,
// name写在组件的最前方,自定义组件为必填
components
:
{},
mixins
:
[
config
],
props
:
{
itemObj
:
{
type
:
Object
,
...
...
@@ -43,31 +47,26 @@ export default {
return
{
options
:
[],
selVal
:
''
,
disabledVal
:
false
disabledVal
:
false
,
linkageValue
:
null
}
},
computed
:
{},
watch
:
{
'form.aircraftType'
:
{
form
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
const
params
=
{
searchItems
:
{
items
:
[{
'fieldName'
:
'aircraftTypeId'
,
operator
:
'EQ'
,
value
:
val
.
split
(
'+'
)[
0
]
}],
operator
:
'AND'
}
handler
(
val
)
{
if
(
val
)
{
if
(
!
this
.
itemObj
.
linkageAttr
)
{
return
}
const
_val
=
_get
(
this
.
form
,
this
.
itemObj
.
linkageAttr
)
console
.
log
(
'watch'
,
_val
)
if
(
_val
!==
this
.
linkageValue
)
{
this
.
linkageValue
=
_val
this
.
getData
(
_val
)
}
this
.
$api
.
searchApi
(
'AircraftSorties'
,
params
).
then
(
res
=>
{
this
.
options
=
res
.
items
.
content
.
map
(
row
=>
{
return
{
value
:
row
.
id
+
'+'
+
row
.
defName
,
label
:
row
.
defName
}
})
})
}
}
},
...
...
@@ -94,6 +93,22 @@ export default {
// 初始化数据
},
methods
:
{
getData
(
val
)
{
const
params
=
{
searchItems
:
{
items
:
[{
'fieldName'
:
'aircraftTypeId'
,
operator
:
'EQ'
,
value
:
val
.
split
(
'+'
)[
0
]
}],
operator
:
'AND'
}
}
this
.
$api
.
searchApi
(
'AircraftSorties'
,
params
).
then
(
res
=>
{
this
.
options
=
res
.
items
.
content
.
map
(
row
=>
{
return
{
value
:
row
.
id
+
'+'
+
row
.
defName
,
label
:
row
.
defName
}
})
})
},
changeVal
()
{
this
.
$emit
(
'input'
,
this
.
selVal
)
}
...
...
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