Commit 57e4478d authored by 旭艳's avatar 旭艳

开工状态修改

parent c109aec8
...@@ -313,15 +313,15 @@ export default { ...@@ -313,15 +313,15 @@ export default {
return { return {
value: row.defCode, value: row.defCode,
label: row.defName, label: row.defName,
status: row.extPosition && row.extPosition.length && row.extPosition[0].extPositionPlans && row.extPosition[0].extPositionPlans[0] ? row.extPosition[0].extPositionPlans[0].planState : '',
postionId: row.extPosition && row.extPosition.length && row.extPosition[0].extPositionPlans && row.extPosition[0].extPositionPlans[0] ? row.extPosition[0].extPositionPlans[0].id : '' postionId: row.extPosition && row.extPosition.length && row.extPosition[0].extPositionPlans && row.extPosition[0].extPositionPlans[0] ? row.extPosition[0].extPositionPlans[0].id : ''
} }
}) })
this.$set(this.searchFormData, 'sorties', this.sortiesData[0].value) this.$set(this.searchFormData, 'sorties', this.sortiesData[0].value)
this.$set(this.searchFormData, 'sortiesName', this.sortiesData[0].label) this.$set(this.searchFormData, 'sortiesName', this.sortiesData[0].label)
this.$set(this.searchFormData, 'workId', this.sortiesData[0].postionId) this.$set(this.searchFormData, 'workId', this.sortiesData[0].postionId)
this.$set(this, 'status', this.sortiesData[0].status) // this.$set(this, 'status', this.sortiesData[0].status)
// this.status = res.items.content[0].extPosition[0].extPositionPlans[0].planState // this.status = res.items.content[0].extPosition[0].extPositionPlans[0].planState
this.getWorkStatus()
this.getTableData() this.getTableData()
} }
}) })
...@@ -396,9 +396,45 @@ export default { ...@@ -396,9 +396,45 @@ export default {
const sorties = this.sortiesData.find(r => r.value === this.searchFormData.sorties) const sorties = this.sortiesData.find(r => r.value === this.searchFormData.sorties)
this.$set(this.searchFormData, 'sortiesName', sorties && sorties.label || '') this.$set(this.searchFormData, 'sortiesName', sorties && sorties.label || '')
this.$set(this.searchFormData, 'workId', sorties && sorties.postionId || '') this.$set(this.searchFormData, 'workId', sorties && sorties.postionId || '')
this.status = sorties.status this.getWorkStatus()
// this.status = sorties.status
this.getTableData() this.getTableData()
}, },
getWorkStatus() {
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'aircraftSorties.defCode',
'operator': 'EQ',
'value': this.searchFormData.sortiesName
},
{
'fieldName': 'extPosition.serialNumber',
'operator': 'EQ',
'value': this.searchFormData.postionName
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': []
}
this.$api.searchApi('ExtPositionPlan', params).then(res => {
if (res.items.content) {
if (res.items.content.length > 0) {
this.status = res.items.content[0].planState
} else {
this.status = ''
}
}
})
},
tabClick(tab) { tabClick(tab) {
this.activeName = tab.index this.activeName = tab.index
if (this.activeName === '1') { if (this.activeName === '1') {
......
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