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
c8d6a9bc
Commit
c8d6a9bc
authored
Aug 23, 2023
by
旭艳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装配计划维护二期开发-搜索
parent
7c08aa1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
494 additions
and
17 deletions
+494
-17
content.vue
...ssemblyPlanManagement/assemblyPlanMaintenance/content.vue
+115
-6
search.vue
...assemblyPlanManagement/assemblyPlanMaintenance/search.vue
+344
-11
gantt.vue
...s/assemblyPlanManagement/stationPlanMaintenance/gantt.vue
+35
-0
No files found.
applications/dee-mes/src/views/assemblyPlanManagement/assemblyPlanMaintenance/content.vue
View file @
c8d6a9bc
<
template
>
<div>
content
</div>
<div
class=
"tf-mom-web-content"
>
<header>
<div
class=
"left"
>
<el-button
:disabled=
"disabledGenerateUpdates"
@
click=
"generateOrUpdate"
>
装配计划生成及更新
</el-button>
<span>
提示:双击站位查看站位计划
</span>
</div>
<div
class=
"right"
>
<!--
<el-button
@
click=
"exportGantt"
>
导出
</el-button>
-->
<div
class=
"legnd"
>
<div
v-for=
"item in planStatusData"
:key=
"item.id"
>
<span
/>
<span>
{{
item
.
label
}}
</span>
</div>
</div>
</div>
</header>
</div>
</
template
>
<
script
>
...
...
@@ -10,20 +28,111 @@ export default {
data
()
{
return
{
disabledGenerateUpdates
:
true
,
planStatusData
:
[],
planStatusLoading
:
true
}
},
created
()
{
this
.
getPlanStatus
()
},
mounted
()
{
},
methods
:
{
/**
* 装配计划生成及更新
*/
generateOrUpdate
()
{
// const that = this
// if (that.generateOrUpdateShow) {
// that.$message({
// showClose: true,
// message: '正在更新,请稍后再试',
// type: 'warning'
// })
// } else {
// that.generateOrUpdateShow = true
// }
// that.$refs.gantt.loading = true
// // 如果项目计划状态为已下达
// // 生成
// if (that.projectStatus === 'Y') {
// that.generateProject()
// that.generateOrUpdateShow = false
// // })
// } else {
// // 更新
// // that.initAoLinks()
// that.updateProject()
// }
},
/**
* 获取站位/装配单元计划状态
*/
getPlanStatus
()
{
this
.
$utils
.
getDicListByCode
(
'WRProductionState'
)
.
then
((
res
)
=>
{
this
.
planStatusData
=
[]
if
(
res
)
{
this
.
planStatusData
=
res
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
res
.
message
,
type
:
'error'
})
}
})
.
catch
((
err
)
=>
console
.
error
(
err
))
.
finally
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
planStatusLoading
=
false
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.tf-mom-web-content
{
.right
{
display
:
flex
;
>
.legnd
{
display
:
flex
;
position
:
relative
;
>
div
{
align-items
:
center
;
margin-left
:
20px
;
display
:
flex
;
>
span
{
&
:first-child
{
display
:
inline-block
;
width
:
22px
;
height
:
16px
;
margin-right
:
6px
;
}
&
:last-child
{
font-size
:
10px
;
}
}
&
:nth-child
(
1
)
>
span
:first-child
{
background
:
#59c4e6
;
}
&
:nth-child
(
2
)
>
span
:first-child
{
background
:
#fcce10
;
}
&
:nth-child
(
3
)
>
span
:first-child
{
background
:
#97b552
;
}
&
:nth-child
(
4
)
>
span
:first-child
{
background
:
rgb
(
230
,
193
,
31
);
}
}
}
}
}
</
style
>
applications/dee-mes/src/views/assemblyPlanManagement/assemblyPlanMaintenance/search.vue
View file @
c8d6a9bc
...
...
@@ -6,45 +6,378 @@
</div>
<div
class=
"row"
>
<label>
机型:
</label>
<el-select
size=
"mini"
/>
<el-select
v-model=
"form.model"
size=
"mini"
placeholder=
"请选择"
:loading=
"modelLoading"
@
change=
"getAddRecursion"
>
<el-option
v-for=
"item in modelData"
:key=
"item.id"
:label=
"item.defName"
:value=
"item.id"
/>
</el-select>
</div>
<div
class=
"row"
>
<label>
场次:
</label>
<el-select
size=
"mini"
/>
<label>
架次:
</label>
<el-select
v-model=
"form.sorties"
size=
"mini"
placeholder=
"请选择"
:loading=
"sortiesLoading"
>
<el-option
v-for=
"(item, i) in sortiesData"
:key=
"item.value + i"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<div
class=
"row"
>
<label>
状态:
</label>
<el-select
size=
"mini"
/>
<el-select
v-model=
"form.status"
size=
"mini"
placeholder=
"请选择"
:loading=
"statusLoading"
>
<el-option
key=
"全部"
label=
"全部"
:value=
"false"
/>
<el-option
v-for=
"item in statusData"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<div
class=
"row"
>
<el-button
size=
"mini"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"getProjectPlan"
>
查询
</el-button>
</div>
</div>
<div
class=
"sorties-box box"
>
sorties
<el-table
ref=
"projectPlanTable"
:data=
"projectPlanData"
border
highlight-current-row
size=
"mini"
height=
"100%"
@
row-click=
"getStation"
>
<el-table-column
prop=
"resName"
label=
"机型"
width=
"60"
align=
"center"
/>
<el-table-column
prop=
"serialNo"
label=
"架次"
width=
"50"
align=
"center"
/>
<el-table-column
prop=
"assemblyEndTime"
label=
"交付时间"
min-width=
"70"
align=
"center"
:formatter=
"formatterDate"
/>
<el-table-column
prop=
"statusCode"
label=
"状态"
width=
"60"
align=
"center"
:formatter=
"formatterStatusCode"
/>
</el-table>
</div>
<div
class=
"station-box box"
>
station
<el-table
:data=
"standData"
border
size=
"mini"
height=
"100%"
align=
"center"
>
<el-table-column
prop=
"extPosition.serialNumber"
label=
"站位"
width=
"60"
align=
"center"
/>
<el-table-column
prop=
"scheduledStart"
label=
"计划开工"
min-width=
"50"
align=
"center"
:formatter=
"formatterDate"
/>
<el-table-column
prop=
"scheduledEnd"
label=
"计划完工"
min-width=
"50"
align=
"center"
:formatter=
"formatterDate"
/>
</el-table>
</div>
</div>
</
template
>
<
script
>
// import { post } from '@/utils/http'
export
default
{
name
:
'TfMomWebSearch'
,
data
()
{
return
{
form
:
{
model
:
null
,
sorties
:
null
,
status
:
null
},
modelData
:
[],
modelLoading
:
true
,
sortiesData
:
[],
sortiesLoading
:
true
,
statusData
:
[],
statusLoading
:
true
,
projectPlanData
:
[],
standData
:
[],
standLoading
:
true
,
SoriteTypeOptions
:
[]
}
},
created
()
{
this
.
$utils
.
getDicListByCode
(
'SoriteType'
).
then
(
res
=>
{
this
.
SoriteTypeOptions
=
res
})
this
.
getAddModel
()
this
.
getStatusData
()
},
mounted
()
{
},
methods
:
{
/**
* 格式化时间值
*/
formatterDate
(
row
,
column
,
cellValue
,
index
)
{
return
new
Date
(
cellValue
).
toLocaleDateString
()
},
/**
* 格式化状态值
*/
formatterStatusCode
(
row
,
column
,
cellValue
,
index
)
{
const
status
=
this
.
statusData
.
filter
((
p
)
=>
p
.
value
===
cellValue
)[
0
]
||
''
if
(
status
)
{
return
status
.
label
}
return
''
},
/**
* 获取新增机型
*/
getAddModel
()
{
const
param
=
{
'searchItems'
:
{
'items'
:
[{
'fieldName'
:
'id'
,
'operator'
:
'NEQ'
,
'value'
:
0
}]
},
'sortItem'
:
[{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'asc'
}]
}
this
.
$api
.
searchApi
(
'AircraftType'
,
param
)
.
then
((
res
)
=>
{
this
.
modelData
=
[]
if
(
res
.
items
&&
res
.
items
.
content
)
{
this
.
modelData
=
res
.
items
.
content
this
.
$nextTick
(()
=>
{
if
(
this
.
modelData
.
length
)
{
this
.
form
.
model
=
this
.
modelData
[
0
].
id
this
.
getAddRecursion
()
}
})
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
res
.
message
,
type
:
'error'
})
}
})
.
catch
((
err
)
=>
console
.
error
(
err
))
.
finally
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
modelLoading
=
false
})
})
},
/**
* 获取架次数据
*/
getAddRecursion
()
{
this
.
sortiesLoading
=
true
if
(
!
this
.
model
)
{
this
.
sortiesData
=
[]
this
.
sorties
=
null
}
const
params
=
{
'searchItems'
:
{
'items'
:
[{
'fieldName'
:
'id'
,
'operator'
:
'NEQ'
,
'value'
:
0
}]
},
'sortItem'
:
[{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'asc'
}]
}
params
.
openProps
=
[{
name
:
'target'
},
{
name
:
'source'
}]
this
.
$api
.
searchApi
(
'SoritesLink'
,
params
)
.
then
((
res
)
=>
{
this
.
sortiesData
=
[]
if
(
res
)
{
this
.
sortiesData
=
res
.
items
.
content
.
map
(
row
=>
{
return
{
value
:
`
${
row
.
sourceId
}
:
${
row
.
targetId
}
`
,
label
:
this
.
getSoritesLabel
(
row
)
}
})
this
.
$nextTick
(()
=>
{
if
(
this
.
sortiesData
.
length
)
{
this
.
form
.
sorties
=
this
.
sortiesData
[
0
].
value
}
})
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
res
.
message
,
type
:
'error'
})
}
})
.
catch
((
err
)
=>
console
.
error
(
err
))
.
finally
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
sortiesLoading
=
false
})
})
},
getSoritesLabel
(
row
)
{
const
type
=
(
row
.
target
&&
row
.
target
.
type
)
?
this
.
SoriteTypeOptions
.
find
(
r
=>
r
.
value
===
row
.
target
.
type
)
:
''
return
`
${
row
.
source
.
defName
}
${
type
&&
type
.
label
||
''
}
`
},
/**
* 获取状态数据
*/
getStatusData
()
{
this
.
$utils
.
getDicListByCode
(
'ProdScheduleStatus'
)
.
then
((
res
)
=>
{
this
.
statusData
=
[]
if
(
res
)
{
this
.
statusData
=
res
this
.
$nextTick
(()
=>
{
if
(
this
.
statusData
.
length
)
{
this
.
form
.
status
=
false
// this.statusData[0].dictKey
// this.getProjectPlan()
}
})
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
res
.
message
,
type
:
'error'
})
}
})
.
catch
((
err
)
=>
console
.
error
(
err
))
.
finally
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
statusLoading
=
false
})
})
},
/**
* 获取项目计划
*/
getProjectPlan
()
{
const
sortiesId
=
this
.
form
.
sorties
.
split
(
':'
)[
0
]
const
sortiesTypeId
=
this
.
form
.
sorties
.
split
(
':'
).
slice
(
-
1
)[
0
]
const
param
=
{
pageFrom
:
1
,
pageSize
:
50
,
searchItems
:
{
children
:
[
{
items
:
[
{
fieldName
:
'soritesTypeId'
,
operator
:
'EQ'
,
value
:
sortiesTypeId
},
{
fieldName
:
'aircraftSortiesId'
,
operator
:
'EQ'
,
value
:
sortiesId
},
{
fieldName
:
'state'
,
operator
:
'LIKE'
,
value
:
this
.
form
.
status
?
this
.
form
.
status
:
''
}
],
operator
:
'AND'
}
],
items
:
[],
operator
:
'AND'
},
openProps
:
[{
name
:
'aircraftSorties'
},
{
name
:
'aircraftType'
},
{
name
:
'extPositionPlans'
,
openProps
:
[{
name
:
'extPosition'
}]
}],
sortItem
:
[
{
fieldName
:
'modifyTime'
,
sortOrder
:
'desc'
}
],
toValidateKeys
:
''
}
this
.
$api
.
searchApi
(
'ORProduction'
,
param
)
.
then
((
res
)
=>
{
if
(
res
)
{
this
.
projectPlanData
=
[]
this
.
standData
=
[]
if
(
res
&&
res
.
items
&&
res
.
items
.
content
&&
res
.
items
.
content
.
length
)
{
this
.
projectPlanData
=
res
.
items
.
content
.
map
((
p
)
=>
{
return
{
id
:
p
.
id
,
resName
:
p
.
aircraftType
.
defName
,
serialNo
:
p
.
aircraftSorties
.
defName
,
assemblyEndTime
:
p
.
assemblyEndTime
,
statusCode
:
p
.
state
,
standData
:
p
.
extPositionPlans
}
})
}
// 默认选中值
// if(this.projectPlanCurRow){
// }
this
.
$refs
.
projectPlanTable
.
setCurrentRow
(
this
.
projectPlanData
[
0
])
this
.
getStation
(
this
.
projectPlanData
[
0
])
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
res
.
message
,
type
:
'error'
})
}
})
.
catch
((
err
)
=>
console
.
error
(
err
))
.
finally
(()
=>
{})
},
/**
* 获取站位
*/
getStation
(
val
)
{
if
(
val
)
{
this
.
standData
=
val
.
standData
}
}
}
}
</
script
>
...
...
applications/dee-mes/src/views/assemblyPlanManagement/stationPlanMaintenance/gantt.vue
View file @
c8d6a9bc
...
...
@@ -564,6 +564,41 @@ export default {
' '
+
new
Date
(
date
).
toTimeString
().
split
(
' '
)[
0
]
return
text
},
/**
* 修改工期及开工时间
*/
updatePlanTime
(
item
)
{
// const that = this
// that.loading = true
// const param = {
// // maxTime: that.getLongTime(),
// // minTime: _min_date,
// minTime: that.start_date,
// parentId: that.$parent.platformId,
// wrProduction: [item]
// }
// // return tooltipData
// this.HttpRequest(`/WrProduction/updatePlanTime`, param, 'post', true)
// .then((res) => {
// if (res.message.includes('成功')) {
// this.$message({
// showClose: true,
// message: '修改成功!',
// type: 'success'
// })
// } else {
// this.$message({
// showClose: true,
// message: res.message,
// type: 'error'
// })
// }
// })
// .catch((err) => console.error(err))
// .finally(() => {
// that.getGanttData()
// })
}
}
}
...
...
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