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
6a2797e0
Commit
6a2797e0
authored
Aug 02, 2023
by
arvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单架次MBOM配置
parent
e844d320
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
258 additions
and
31 deletions
+258
-31
gatt.vue
...-mes/src/privateComponents/components/MBOMConfig/gatt.vue
+86
-10
step.vue
...-mes/src/privateComponents/components/MBOMConfig/step.vue
+29
-0
tree.vue
...-mes/src/privateComponents/components/MBOMConfig/tree.vue
+85
-21
unit.vue
...-mes/src/privateComponents/components/MBOMConfig/unit.vue
+29
-0
view.vue
...-mes/src/privateComponents/components/MBOMConfig/view.vue
+29
-0
No files found.
applications/dee-mes/src/privateComponents/components/MBOMConfig/gatt.vue
View file @
6a2797e0
<
template
>
<div
class=
""
>
<el-button-group>
<el-button
:type=
"viewType==='ExtPosition'?'primary':''"
@
click=
"setView('ExtPosition')"
>
站位路线
</el-button>
<el-button
:type=
"viewType==='unit'?'primary':''"
@
click=
"setView('unit')"
>
装配单元路线
</el-button>
<el-button
:type=
"viewType==='AircraftSorties'?'primary':''"
@
click=
"setView('AircraftSorties')"
>
架次视图路线
</el-button>
</el-button-group>
<div
class=
"TfMomWebGatt-page"
>
<div
class=
"btn-bar"
>
<el-radio-group
v-model=
"viewType"
size=
"small"
@
input=
"setView"
>
<el-radio-button
label=
"ExtPosition"
>
站位路线
</el-radio-button>
<el-radio-button
label=
"unit"
>
装配单元路线
</el-radio-button>
<el-radio-button
label=
"AircraftSorties"
>
架次视图路线
</el-radio-button>
</el-radio-group>
<dee-tools
mode=
"normal"
:tools=
"tools"
/>
</div>
<div
class=
"content-model"
>
<step
v-show=
"viewType === 'ExtPosition'"
/>
<unit
v-show=
"viewType === 'unit'"
/>
<view2
v-show=
"viewType === 'AircraftSorties'"
/>
</div>
</div>
</
template
>
<
script
>
import
step
from
'./step.vue'
import
unit
from
'./unit.vue'
import
view2
from
'./view.vue'
export
default
{
componentName
:
'单架次MBOM甘特图'
,
name
:
'TfMomWebGatt'
,
components
:
{
step
,
unit
,
view2
},
data
()
{
return
{
viewType
:
'ExtPosition'
,
...
...
@@ -30,7 +41,53 @@ export default {
]
}
},
computed
:
{
tools
()
{
const
btns
=
[{
name
:
'导出'
,
icon
:
'/icons/c-export.png'
,
handler
:
{
click
:
()
=>
{
this
.
import
()
}
}
}]
if
(
this
.
viewType
===
'AircraftSorties'
)
{
return
btns
}
if
(
this
.
viewType
===
'ExtPosition'
)
{
btns
.
unshift
({
name
:
'保存'
,
icon
:
'/icons/c-export.png'
,
handler
:
{
click
:
()
=>
{
this
.
save
()
}
}
})
return
btns
}
btns
.
unshift
({
name
:
'设置排序'
,
icon
:
'/icons/check.png'
,
handler
:
{
click
:
()
=>
{
this
.
config
()
}
}
})
btns
.
unshift
({
name
:
'保存'
,
icon
:
'/icons/c-export.png'
,
handler
:
{
click
:
()
=>
{
this
.
save
()
}
}
})
return
btns
}
},
mounted
()
{
},
...
...
@@ -39,11 +96,30 @@ export default {
setView
(
type
)
{
this
.
viewType
=
type
this
.
$emit
(
'changeView'
,
this
.
viewType
)
},
getData
(
params
)
{
console
.
log
(
params
)
},
import
()
{
},
save
()
{
},
config
()
{
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.TfMomWebGatt-page
{
height
:
100%
;
.btn-bar
{
height
:
40px
;
display
:
flex
;
justify-content
:
space-between
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/MBOMConfig/step.vue
View file @
6a2797e0
<
template
>
<div>
站位路线
</div>
</
template
>
<
script
>
export
default
{
name
:
'TfMomWebStep'
,
data
()
{
return
{
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-mes/src/privateComponents/components/MBOMConfig/tree.vue
View file @
6a2797e0
<
template
>
<div
class=
"TfMomWeb-tree"
>
<el-tree
v-show=
"AircraftName"
ref=
"tree"
:data=
"treeData"
default-expand-all
:props=
"props"
node-key=
"id"
:expand-on-click-node=
"false"
@
node-click=
"nodeClick"
>
<span
slot-scope=
"
{ node, data }" class="
custom-tree-node
">
<span
slot-scope=
"
{ node, data }" class="
dee-as-tree-node" :class="{'disable-dee-as-tree-node': data.disabled, 'current':currentNode.id === data.id}
">
<i
v-show=
"data.subTypeName==='aircraft'"
class=
"el-icon-s-promotion"
/>
<i
v-show=
"data.subTypeName==='ExtPosition'"
class=
"el-icon-s-tools"
/>
<span>
{{
node
.
label
}}
</span>
...
...
@@ -23,7 +28,8 @@ export default {
AircraftName
:
''
,
AircraftSortiesId
:
''
,
AircraftSortiesName
:
''
,
treeData
:
[],
currentNode
:
{},
postionList
:
[],
viewType
:
'ExtPosition'
,
emitMethods
:
[
{
...
...
@@ -42,22 +48,57 @@ export default {
}
],
props
:
{
disabled
:
(
data
)
=>
{
console
.
log
(
'ddddd'
)
if
(
this
.
viewType
===
'ExtPosition'
)
{
return
data
.
subTypeName
===
'ExtPosition'
}
return
data
.
subTypeName
===
'aircraft'
}
label
:
(
data
,
node
)
=>
this
.
setLabel
(
data
,
node
)
}
}
},
computed
:
{
treeData
()
{
return
this
.
initTree
(
this
.
viewType
,
this
.
postionList
)
}
},
mounted
()
{
},
methods
:
{
initTree
(
type
,
postionList
)
{
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
defaultNodeClick
()
},
100
)
})
return
[{
id
:
0
,
subTypeName
:
'aircraft'
,
serialNumber
:
`
${
this
.
AircraftName
}
-
${
this
.
AircraftSortiesName
}
`
,
disabled
:
this
.
disableClickFun
(
type
,
{
subTypeName
:
'aircraft'
}),
children
:
postionList
.
map
(
r
=>
{
r
.
disabled
=
this
.
disableClickFun
(
type
,
r
)
return
r
})
}]
},
setLabel
(
data
,
node
)
{
return
data
.
serialNumber
},
disableClickFun
(
type
,
data
)
{
if
(
type
===
'unit'
)
{
return
data
.
subTypeName
===
'aircraft'
}
return
data
.
subTypeName
===
'ExtPosition'
},
nodeClick
(
data
,
node
)
{
if
(
data
.
disabled
)
{
this
.
$refs
.
tree
.
setCurrentKey
(
null
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
tree
.
setCurrentKey
(
this
.
currentNode
.
id
)
})
return
}
this
.
currentNode
=
data
this
.
$emit
(
'nodeClick'
,
data
)
},
getData
(
params
)
{
const
items
=
params
.
items
||
params
const
AircraftType
=
items
.
find
(
r
=>
r
.
fieldName
===
'AircraftType'
)
...
...
@@ -85,26 +126,49 @@ export default {
this
.
$api
.
searchApi
(
'ExtPosition'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
content
)
{
this
.
treeData
=
[{
id
:
''
,
subTypeName
:
'aircraft'
,
label
:
`
${
this
.
AircraftName
}
-
${
this
.
AircraftSortiesName
}
`
,
children
:
res
.
items
.
content
.
map
(
r
=>
{
r
.
label
=
r
.
serialNumber
return
r
})
}]
this
.
postionList
=
res
.
items
.
content
}
else
{
this
.
postionList
=
[]
}
}).
catch
(()
=>
{
this
.
postionList
=
[]
})
},
setNode
(
type
)
{
this
.
viewType
=
type
},
defaultNodeClick
()
{
const
tree
=
this
.
$refs
.
tree
if
(
!
tree
)
{
return
}
const
root
=
tree
.
getNode
(
0
)
if
(
this
.
viewType
===
'unit'
)
{
this
.
currentNode
=
root
.
childNodes
[
0
]
&&
root
.
childNodes
[
0
].
data
}
else
{
this
.
currentNode
=
root
.
data
}
if
(
!
this
.
currentNode
)
{
return
}
this
.
$nextTick
(()
=>
{
tree
.
setCurrentKey
(
this
.
currentNode
.
id
)
this
.
$emit
(
'node-click'
,
this
.
currentNode
)
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.TfMomWeb-tree
{
.dee-as-tree-node
{
width
:
100%
;
&
.disable-dee-as-tree-node
{
color
:
#ccc
;
cursor
:
not
-
allowed
;;
}
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/MBOMConfig/unit.vue
View file @
6a2797e0
<
template
>
<div>
装配单元路线
</div>
</
template
>
<
script
>
export
default
{
name
:
'TfMomWebUnit'
,
data
()
{
return
{
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-mes/src/privateComponents/components/MBOMConfig/view.vue
View file @
6a2797e0
<
template
>
<div>
架次视图路线
</div>
</
template
>
<
script
>
export
default
{
name
:
'TfMomWebView'
,
data
()
{
return
{
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
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