|
@@ -9,17 +9,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 查看飞机健康状态 -->
|
|
|
- <FaultStatisticsDialog ref="FaultStatisticsDialog" />
|
|
|
+ <!-- <FaultStatisticsDialog ref="FaultStatisticsDialog" /> -->
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { columns, options, defaultProps } from './index.js'
|
|
|
import { getAircaftTypeAndModelTree, getAircraftsByCode } from '@/api/task/carrierFlightMission'
|
|
|
-import FaultStatisticsDialog from './FaultStatisticsDialog/index.vue'
|
|
|
+// import FaultStatisticsDialog from './FaultStatisticsDialog/index.vue'
|
|
|
+//获取飞机健康状态接口
|
|
|
+import { getFaultStatisticsList } from '@/api/task/carrierFlightMission'
|
|
|
export default {
|
|
|
name: 'FittingsModal',
|
|
|
- components: { FaultStatisticsDialog },
|
|
|
+ // components: { FaultStatisticsDialog },
|
|
|
props: { taskId: {} },
|
|
|
data() {
|
|
|
// 这里存放数据
|
|
@@ -27,7 +29,7 @@ export default {
|
|
|
currentNodeKey: '',
|
|
|
currentRow: null,
|
|
|
menuTreeData: [],
|
|
|
- columns: columns(this),
|
|
|
+ columns: columns(this), //列定义获取方式
|
|
|
options,
|
|
|
dialogTableData: [],
|
|
|
defaultProps,
|
|
@@ -61,6 +63,26 @@ export default {
|
|
|
if (code == 200) {
|
|
|
this.dialogTableData = data.list
|
|
|
this.tableRequset.total = data.totalCount
|
|
|
+ debugger
|
|
|
+
|
|
|
+ //获取飞机故障统计集合
|
|
|
+ const { code: healthCode, data: healthData } = await getFaultStatisticsList()
|
|
|
+ if (healthCode == 200) {
|
|
|
+ //创建每架飞机的健康状态映射对象
|
|
|
+ const healthStatusMap = {}
|
|
|
+ healthData.forEach((item) => {
|
|
|
+ healthStatusMap[item.aircraftNum] = item.repairStatus
|
|
|
+ })
|
|
|
+ this.dialogTableData.forEach(async (aircraft) => {
|
|
|
+ aircraft.healthStatus = healthStatusMap[aircraft.aircaftCatalogCode] || ''
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.dialogTableData.forEach(async (aircraft) => {
|
|
|
+ aircraft.healthStatus = ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //强制更新列定义
|
|
|
+ this.columns = this.getColums()
|
|
|
}
|
|
|
},
|
|
|
async getAircaftTypeAndModelTree() {
|
|
@@ -84,37 +106,9 @@ export default {
|
|
|
select(row) {
|
|
|
this.$emit('select', row)
|
|
|
this.fittingsVisible = false
|
|
|
- },
|
|
|
- look(row) {
|
|
|
- this.$refs.FaultStatisticsDialog.opneDialog(row)
|
|
|
}
|
|
|
- // onFaultStatisticsDialogOpen() {
|
|
|
- // const modal = document.querySelector('.el-dialog__modal')
|
|
|
- // if (modal) {
|
|
|
- // modal.style.position = 'absolute'
|
|
|
- // modal.style.zIndex = 999
|
|
|
-
|
|
|
- // const dialog = this.$refs.FaultStatisticsDialog.$el
|
|
|
- // const rect = dialog.getBoundingClientRect()
|
|
|
- // modal.style.top = rect.top + 'px'
|
|
|
- // modal.style.left = rect.left + 'px'
|
|
|
- // modal.style.width = rect.width + 'px'
|
|
|
- // modal.style.height = rect.height + 'px'
|
|
|
- // }
|
|
|
- // },
|
|
|
- // onFaultStatisticsDialogClose() {
|
|
|
- // const modal = document.querySelector('.el-dialog__modal')
|
|
|
- // if (modal) {
|
|
|
- // modal.style.position = 'fixed'
|
|
|
- // modal.style.zIndex = 2000
|
|
|
-
|
|
|
- // const dialog = this.$refs.FaultStatisticsDialog.$el
|
|
|
- // const rect = dialog.getBoundingClientRect()
|
|
|
- // modal.style.top = '0'
|
|
|
- // modal.style.left = '0'
|
|
|
- // modal.style.width = '100%'
|
|
|
- // modal.style.height = '100%'
|
|
|
- // }
|
|
|
+ // look(row) {
|
|
|
+ // this.$refs.FaultStatisticsDialog.opneDialog(row)
|
|
|
// }
|
|
|
}
|
|
|
}
|