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
Show 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 @@
...
@@ -17,10 +17,14 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
config
from
'./config'
import
_get
from
'lodash.get'
export
default
{
export
default
{
componentName
:
'供外出库架次'
,
componentName
:
'供外出库架次'
,
name
:
'GetSortiesSelect'
,
// name写在组件的最前方,自定义组件为必填
name
:
'GetSortiesSelect'
,
// name写在组件的最前方,自定义组件为必填
components
:
{},
components
:
{},
mixins
:
[
config
],
props
:
{
props
:
{
itemObj
:
{
itemObj
:
{
type
:
Object
,
type
:
Object
,
...
@@ -43,31 +47,26 @@ export default {
...
@@ -43,31 +47,26 @@ export default {
return
{
return
{
options
:
[],
options
:
[],
selVal
:
''
,
selVal
:
''
,
disabledVal
:
false
disabledVal
:
false
,
linkageValue
:
null
}
}
},
},
computed
:
{},
computed
:
{},
watch
:
{
watch
:
{
'form.aircraftType'
:
{
form
:
{
immediate
:
true
,
immediate
:
true
,
deep
:
true
,
deep
:
true
,
handler
(
val
,
oldVal
)
{
handler
(
val
)
{
if
(
val
!==
oldVal
)
{
if
(
val
)
{
const
params
=
{
if
(
!
this
.
itemObj
.
linkageAttr
)
{
searchItems
:
{
return
items
:
[{
'fieldName'
:
'aircraftTypeId'
,
operator
:
'EQ'
,
value
:
val
.
split
(
'+'
)[
0
]
}],
operator
:
'AND'
}
}
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 {
...
@@ -94,6 +93,22 @@ export default {
// 初始化数据
// 初始化数据
},
},
methods
:
{
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
()
{
changeVal
()
{
this
.
$emit
(
'input'
,
this
.
selVal
)
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