Commit d5436d4c authored by arvin's avatar arvin

update

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