Commit d5436d4c authored by arvin's avatar arvin

update

parent 23d36a3f
......@@ -17,12 +17,12 @@
</el-select>
</el-form-item>
<el-form-item label="架次:">
<el-select v-model="form.sorties" :style="{'width':'80px'}" size="mini" placeholder="架次">
<el-select v-model="form.sorties" :style="{'width':'100px'}" size="mini" placeholder="架次">
<el-option
v-for="item in sortiesData"
:key="item.id"
:label="item.defName"
:value="item.id"
v-for="(item, i) in sortiesData"
:key="item.value + i"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
......@@ -47,7 +47,7 @@
<el-button type="" size="mini" @click="goto">站位计划调整</el-button>
</el-form-item>
<el-form-item
style="width: calc(100% - 850px);
style="width: calc(100% - 870px);
text-align: right;"
>
<div class="legnd">
......@@ -83,6 +83,7 @@ export default {
headerShow: true,
modelData: [],
sortiesData: [],
SoriteTypeOptions: [],
curColorStatus: '',
timeoutId: null,
form: {}
......@@ -121,8 +122,11 @@ export default {
}
}
},
created() {
this.getModelData()
created() { // SoriteType
this.$utils.getDicListByCode('SoriteType').then(res => {
this.SoriteTypeOptions = res
this.getModelData()
})
},
mounted() {
......@@ -131,13 +135,23 @@ export default {
getSortiesList() {
this.sortiesData = []
const params = { 'searchItems': { 'items': [{ 'fieldName': 'id', 'operator': 'NEQ', 'value': 0 }] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
this.$api.searchApi('AircraftSorties', params).then(res => {
params.openProps = [{ name: 'target' }, { name: 'source' }]
this.$api.searchApi('SoritesLink', params).then(res => {
if (res.items && res.items.content) {
this.sortiesData = res.items.content
this.$set(this.form, 'sorties', this.sortiesData[0].id)
this.sortiesData = res.items.content.map(row => {
return {
value: `${row.sourceId}:${row.targetId}`,
label: this.getSoritesLabel(row)
}
})
this.$set(this.form, 'sorties', this.sortiesData[0].value)
}
})
},
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 || ''}`
},
getModelData() {
this.modelData = []
const params = { 'searchItems': { 'items': [{ 'fieldName': 'id', 'operator': 'NEQ', 'value': 0 }] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
......
......@@ -100,8 +100,10 @@ export default {
methods: {
getStation() {
const sortiesId = this.sortiesId.split(':')[0]
const sortiesTypeId = this.sortiesId.split(':').slice(-1)[0]
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': this.sortiesId }] },
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }, { 'fieldName': 'soritesTypeId', 'operator': 'EQ', 'value': sortiesTypeId }] },
'openProps': [{ name: 'aircraftSorties' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
}
......
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