Commit b5407afa authored by 旭艳's avatar 旭艳

装配计划维护二期-甘特图

parent fbc75a35
......@@ -105,20 +105,20 @@
align="center"
>
<el-table-column
prop="extPosition.serialNumber"
prop="serialNumber"
label="站位"
width="60"
align="center"
/>
<el-table-column
prop="scheduledStart"
prop="extPositionPlans[0].scheduledStart"
label="计划开工"
min-width="50"
align="center"
:formatter="formatterDate"
/>
<el-table-column
prop="scheduledEnd"
prop="extPositionPlans[0].scheduledEnd"
label="计划完工"
min-width="50"
align="center"
......@@ -167,7 +167,7 @@ export default {
* 格式化时间值
*/
formatterDate(row, column, cellValue, index) {
return new Date(cellValue).toLocaleDateString()
return cellValue ? new Date(cellValue).toLocaleDateString() : ''
},
/**
* 格式化状态值
......@@ -268,8 +268,6 @@ export default {
this.$nextTick(() => {
if (this.statusData.length) {
this.form.status = false
// this.statusData[0].dictKey
// this.getProjectPlan()
}
})
} else {
......@@ -358,7 +356,7 @@ export default {
// }
this.$refs.projectPlanTable.setCurrentRow(this.projectPlanData[0])
this.getStation(this.projectPlanData[0])
this.getStation()
} else {
this.$message({
showClose: true,
......@@ -373,10 +371,27 @@ export default {
/**
* 获取站位
*/
getStation(val) {
if (val) {
this.standData = val.standData
getStation() {
const sortiesId = this.form.sorties.split(':')[0]
const sortiesTypeId = this.form.sorties.split(':').slice(-1)[0]
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }, { 'fieldName': 'soritesTypeId', 'operator': 'EQ', 'value': sortiesTypeId }] },
'openProps': [{ name: 'extPositionPlans' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
}
this.standLoading = true
this.$api.searchApi('ExtPosition', params).then(res => {
if (res.items) {
this.standData = res.items.content
} else {
this.standData = []
}
this.standLoading = false
this.$bus.$emit('getGantData', this.form, this.projectPlanData)
}).catch(() => {
this.standData = []
this.standLoading = false
})
}
}
}
......
......@@ -444,7 +444,7 @@ export default {
return {
id: p.id,
start_date: p.joExecutePlan[0].scheduledStart,
status: p.joExecutePlan[0].state,
status: p.joExecutePlan[0].planState,
text: p.serialNumber,
parent: m.id,
right_text: p.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment