Commit f155c729 authored by caolaoban's avatar caolaoban

“修改架次站位查询”

parent 6032c0c7
...@@ -94,10 +94,8 @@ export default { ...@@ -94,10 +94,8 @@ export default {
this.postionList = [] this.postionList = []
this.$set(this.form, 'postion', '') this.$set(this.form, 'postion', '')
if (val) { if (val) {
const sortiesId = val.split(':')[0]
const sortiesTypeId = val.split(':').slice(-1)[0]
const params = { const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }, { 'fieldName': 'soritesTypeId', 'operator': 'EQ', 'value': sortiesTypeId }] }, 'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': val }] },
'openProps': [{ name: 'aircraftSorties' }], 'openProps': [{ name: 'aircraftSorties' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }] 'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
} }
...@@ -119,14 +117,13 @@ export default { ...@@ -119,14 +117,13 @@ export default {
getSortiesList() { getSortiesList() {
this.sortiesData = [] this.sortiesData = []
const params = { 'searchItems': { 'items': [] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] } const params = { 'searchItems': { 'items': [] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
params.openProps = [{ name: 'target' }, { name: 'source' }] this.$api.searchApi('AircraftSorties', params).then(res => {
this.$api.searchApi('SoritesLink', params).then(res => {
if (res.items && res.items.content) { if (res.items && res.items.content) {
this.sortiesData = res.items.content.map(row => { this.sortiesData = res.items.content.map(row => {
return { return {
value: `${row.sourceId}:${row.targetId}`, value: row.id,
label: this.getSoritesLabel(row), label: row.defName,
sortiesName: row.source.defName sortiesName: row.defName
} }
}) })
this.$set(this.form, 'sorties', this.sortiesData[0].value) this.$set(this.form, 'sorties', this.sortiesData[0].value)
...@@ -134,10 +131,10 @@ export default { ...@@ -134,10 +131,10 @@ export default {
} }
}) })
}, },
getSoritesLabel(row) { // getSoritesLabel(row) {
const type = (row.target && row.target.type) ? this.SoriteTypeOptions.find(r => r.value === row.target.type) : '' // const type = (row.target && row.target.type) ? this.SoriteTypeOptions.find(r => r.value === row.target.type) : ''
return `${row.source.defName} ${type && type.label || ''}` // 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' }] }
......
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