|
@@ -40,13 +40,10 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="架次号" prop="sortieNo">
|
|
<el-form-item label="架次号" prop="sortieNo">
|
|
<!-- <el-input v-model="form.sortieNo" placeholder="请输入架次号" /> -->
|
|
<!-- <el-input v-model="form.sortieNo" placeholder="请输入架次号" /> -->
|
|
- <el-select v-model="form.sortieNo" placeholder="请选择架次号">
|
|
|
|
|
|
+ <el-select v-model="form.sortieNo" placeholder="请选择架次号" @click="selectSortieNo">
|
|
<el-option v-for="item in sortieNoList" :key="item.taskId" :label="item.taskName" :value="item.taskId"> </el-option>
|
|
<el-option v-for="item in sortieNoList" :key="item.taskId" :label="item.taskName" :value="item.taskId"> </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="飞行日期" prop="flightDate">
|
|
|
|
- <el-date-picker v-model="form.flightDate" type="date" value-format="yyyy-MM-dd" placement="bottom-start" placeholder="请选择飞行日期"> </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="数据导入" prop="ossId">
|
|
<el-form-item label="数据导入" prop="ossId">
|
|
<FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx']" />
|
|
<FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx']" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -65,8 +62,10 @@
|
|
import { getDataImport, addDataImport, updateDataImport, removeDataImport } from '@/api/als/dataImport'
|
|
import { getDataImport, addDataImport, updateDataImport, removeDataImport } from '@/api/als/dataImport'
|
|
import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
|
|
import { getAircaftCatalogTree, getAircaftTypeAndModelTree } from '@/api/als/sideTree'
|
|
import { getAircaftModelAll, getAircaftCatalogAll, getSortieNo } from '@/api/als/aircraft'
|
|
import { getAircaftModelAll, getAircaftCatalogAll, getSortieNo } from '@/api/als/aircraft'
|
|
|
|
+import { getTaskExecondRegister } from '@/api/carrierStandard/carrierListExecutionRegistration'
|
|
import { deepClone, debounce } from '@/utils/index'
|
|
import { deepClone, debounce } from '@/utils/index'
|
|
import { getItem } from '@/utils/index'
|
|
import { getItem } from '@/utils/index'
|
|
|
|
+
|
|
import FileUpload from '@/views/als/components/FileUpload'
|
|
import FileUpload from '@/views/als/components/FileUpload'
|
|
export default {
|
|
export default {
|
|
name: 'MDCData',
|
|
name: 'MDCData',
|
|
@@ -97,14 +96,6 @@ export default {
|
|
searchValue: '',
|
|
searchValue: '',
|
|
columns: [
|
|
columns: [
|
|
// { prop: 'id', label: '唯一编号' },
|
|
// { prop: 'id', label: '唯一编号' },
|
|
- {
|
|
|
|
- prop: 'ossId',
|
|
|
|
- label: '文件编号'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- prop: 'source',
|
|
|
|
- label: '数据源'
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
prop: 'aircraftId',
|
|
prop: 'aircraftId',
|
|
label: '编目',
|
|
label: '编目',
|
|
@@ -120,14 +111,34 @@ export default {
|
|
{
|
|
{
|
|
prop: 'sortieNo',
|
|
prop: 'sortieNo',
|
|
label: '架次号'
|
|
label: '架次号'
|
|
|
|
+ // render: (h, params) => {
|
|
|
|
+ // const Item = this.aircaftCatalogAll.find((item) => params.row.aircraftId.trim() === item.aircaftCatalogId.trim())
|
|
|
|
+ // this.getSortieNoAPI(Item.aircaftCatalogCode)
|
|
|
|
+ // if (code === 200) {
|
|
|
|
+ // console.log('data', data)
|
|
|
|
+ // const matchedItem = data.find((item) => params.row.sortieNo === item.taskId)
|
|
|
|
+ // if (matchedItem) {
|
|
|
|
+ // return h('span', matchedItem.taskName)
|
|
|
|
+ // } else {
|
|
|
|
+ // return h('span', {}, '')
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'flightDate',
|
|
|
|
- label: '飞行日期'
|
|
|
|
|
|
+ prop: 'source',
|
|
|
|
+ label: '数据源',
|
|
|
|
+ render: (h, params) => {
|
|
|
|
+ if (params.row.source == 1) {
|
|
|
|
+ return h('span', { class: 'success-state' }, '飞参数据')
|
|
|
|
+ } else {
|
|
|
|
+ return h('span', { class: 'success-state' }, 'MDC数据')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'status',
|
|
|
|
- label: '状态'
|
|
|
|
|
|
+ prop: 'ossId',
|
|
|
|
+ label: '文件编号'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
button: true,
|
|
button: true,
|
|
@@ -241,6 +252,7 @@ export default {
|
|
this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
|
|
this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children)
|
|
.map((e) => e.id)
|
|
.map((e) => e.id)
|
|
.toString()
|
|
.toString()
|
|
|
|
+
|
|
this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
|
|
this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
|
|
}
|
|
}
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
@@ -260,12 +272,20 @@ export default {
|
|
}
|
|
}
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
},
|
|
},
|
|
|
|
+ async selectSortieNo() {
|
|
|
|
+ try {
|
|
|
|
+ const { code, data } = await getTaskExecondRegister(this.form.sortieNo)
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ this.form.flightDate = data.taskTime
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {}
|
|
|
|
+ },
|
|
|
|
|
|
getTreeLeafData(list) {
|
|
getTreeLeafData(list) {
|
|
const newArr = []
|
|
const newArr = []
|
|
function getLeaf(data, arr) {
|
|
function getLeaf(data, arr) {
|
|
data.forEach((e) => {
|
|
data.forEach((e) => {
|
|
- if (e.type === 1) {
|
|
|
|
|
|
+ if (e.type === 2) {
|
|
arr.push(e)
|
|
arr.push(e)
|
|
}
|
|
}
|
|
if (e.children.length) {
|
|
if (e.children.length) {
|
|
@@ -286,6 +306,7 @@ export default {
|
|
} = await getDataImport({ pageSize, pageNum: pageIndex, ...params, source: 2 })
|
|
} = await getDataImport({ pageSize, pageNum: pageIndex, ...params, source: 2 })
|
|
this.tableData = list
|
|
this.tableData = list
|
|
this.tableRequset.total = total
|
|
this.tableRequset.total = total
|
|
|
|
+ // list.
|
|
},
|
|
},
|
|
|
|
|
|
fetch() {
|
|
fetch() {
|
|
@@ -327,16 +348,22 @@ export default {
|
|
this.$refs.table.clearSelection()
|
|
this.$refs.table.clearSelection()
|
|
this.currentNodeKey = data.id
|
|
this.currentNodeKey = data.id
|
|
this.currentNode = data
|
|
this.currentNode = data
|
|
|
|
+ console.log('deta', data)
|
|
this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
|
|
this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data])
|
|
.map((e) => e.id)
|
|
.map((e) => e.id)
|
|
.toString()
|
|
.toString()
|
|
|
|
+ if (!this.aircaftModelIdList) {
|
|
|
|
+ this.aircaftModelIdList = '#'
|
|
|
|
+ }
|
|
this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
|
|
this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
|
|
- this.getSortieNoAPI(data.id)
|
|
|
|
|
|
+ this.getSortieNoAPI(data.label)
|
|
},
|
|
},
|
|
|
|
|
|
- async getSortieNoAPI(aircraftId) {
|
|
|
|
- const res = await getSortieNo({ aircaftCatalogCode: aircraftId })
|
|
|
|
- this.sortieNoList = res.data
|
|
|
|
|
|
+ async getSortieNoAPI(aircaftCatalogCode) {
|
|
|
|
+ const res = await getSortieNo({ aircaftCatalogCode })
|
|
|
|
+ this.sortieNoList = res.data.filter((item) => {
|
|
|
|
+ return item.taskName
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
openDialog() {
|
|
openDialog() {
|
|
@@ -369,6 +396,7 @@ export default {
|
|
|
|
|
|
handUpdate(row) {
|
|
handUpdate(row) {
|
|
this.dialogTitle = '编辑'
|
|
this.dialogTitle = '编辑'
|
|
|
|
+ console.log('row', row)
|
|
this.form = deepClone(row)
|
|
this.form = deepClone(row)
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
},
|
|
},
|