Ver Fonte

最后版

Rmengdi há 5 meses atrás
pai
commit
5c5c5d390c

+ 1 - 1
.env.development

@@ -5,4 +5,4 @@ ENV = 'development'
 # 开发环境
 VUE_APP_BASE_API ='/api'
 
-VUE_APP_BASE_API_target ='http://localhost:9099'
+VUE_APP_BASE_API_target ='http://192.168.2.10:9091'

+ 2 - 2
src/api/als/ERManage.js

@@ -1,8 +1,8 @@
 import { get, post } from '@/http/index'
 
 //查询所有三元组
-export const getERList = async () => {
-  return await get('/kgqa/relation/getAllTriples')
+export const getERList = async (data) => {
+  return await get('/kgqa/relation/getAllTriples', data)
 }
 
 //查询数据库中目前已经有的关系

+ 2 - 2
src/api/als/entityManage.js

@@ -1,8 +1,8 @@
 import { get, post } from '@/http/index'
 
 //查询所有实体
-export const getEntityList = async () => {
-  return await get('/kgqa/entity/getAllEntities')
+export const getEntityList = async (data) => {
+  return await get('/kgqa/entity/getAllEntities', data)
 }
 
 //	获取图数据库中的所有实体类名称

+ 6 - 1
src/api/als/faultStatistics.js

@@ -10,6 +10,11 @@ export const getExclusionList = async (data) => {
   return await get('/als/faultStatistics/exclusionList', data)
 }
 
+// 查询故障统计列表不分页
+export const getExclusionListAll = async (data) => {
+  return await get('/als/faultStatistics/exclusionListAll', data)
+}
+
 // 查询故障统计列表
 export const getFaultStatisticsEcharts = async (data) => {
   return await get('/als/faultStatistics/statistics', data)
@@ -51,5 +56,5 @@ export const getFaultStatisticsListAll = async (data) => {
 
 // 同步
 export const getSync = async (data) => {
-  return await get('/extra/statistics', data)
+  return await get('/als/faultStatistics/extra/statistics', data)
 }

+ 1 - 1
src/views/als/components/FileUpload/index.vue

@@ -78,7 +78,7 @@ export default {
       number: 0,
       uploadList: [],
       // baseUrl: '/api',
-      uploadFileUrl: '/api/als/common/upload',
+      uploadFileUrl: '/api/als/resource/oss/upload',
       headers: { Authorization: getItem('token') },
       fileList: [],
       loading: null

+ 14 - 3
src/views/als/falseAlarm/index.vue

@@ -393,8 +393,20 @@ export default {
     async checkCurve(row) {
       this.isFalseAlarm = row.status
       this.form = deepClone(row)
-      const { data } = await getCurveData(row.code, row.sortieNo)
-      this.getResultData(data)
+      try {
+        const { code, data } = await getCurveData(row.code, row.sortieNo)
+        console.log('resultData', code, data)
+        if (code === 200) {
+          if (data) {
+            this.getResultData(data)
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '无飞参数据!'
+            })
+          }
+        }
+      } catch (error) {}
     },
 
     getResultData(data) {
@@ -425,7 +437,6 @@ export default {
     },
 
     handleResultData(resultData) {
-      console.log('resultData', resultData)
       const headData = Object.keys(resultData)
       const contentData = {}
       headData.forEach((headItem) => {

+ 12 - 13
src/views/als/faultDiagnosis/index.vue

@@ -45,7 +45,7 @@
       </el-dialog>
       <el-dialog title="结果展示" :visible.sync="resultShowVisible" :before-close="resultShowDialogClose" width="800px">
         <div style="margin: 10px 0px">{{ resultShowData.result }}</div>
-        <el-image style="width: 500px" :src="resultShowData.url" :preview-src-list="[resultShowData.url]"></el-image>
+        <el-image style="width: 500px" v-if="resultShowData.url !== ''" :src="resultShowData.url" :preview-src-list="[resultShowData.url]"></el-image>
         <span slot="footer" class="dialog-footer">
           <el-button @click="resultShowDialogClose">取 消</el-button>
           <el-button type="primary" @click="resultShowDialogClose">确 定</el-button>
@@ -274,6 +274,7 @@ export default {
       this.debounceFn()
     }
   },
+  computed: {},
   mounted() {
     this.getAircaftCatalogTreeAPI()
   },
@@ -433,16 +434,17 @@ export default {
       this.resultVisible = true
     },
 
-    checkRelustShow(row) {
-      this.resultShowData = JSON.parse(row.resultContent)
-      this.resultShowData.url = this.getImgUrl(JSON.parse(row.resultContent).ossId)
-      this.resultShowData.result = JSON.parse(res.data.data).result
+    async checkRelustShow(row) {
+      const { data } = await getListByIdsApi(JSON.parse(row.resultContent).ossId)
+      this.resultShowData.url = data[0].url
+      this.resultShowData.result = JSON.parse(row.resultContent).result
       this.resultShowVisible = true
     },
 
     async getImgUrl(ossId) {
-      const url = await getListByIdsApi(ossId)
-      return url
+      const { data } = await getListByIdsApi(ossId)
+      const newUrl = data[0].url
+      return newUrl
     },
 
     async beginExecute() {
@@ -467,13 +469,10 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-          // this.resultShowData = JSON.parse(res.data)
-          this.resultShowData.url = this.getImgUrl(JSON.parse(res.data.data).ossId)
-          this.resultShowData.result = JSON.parse(res.data.data).result
+          const { data } = await getListByIdsApi(JSON.parse(res.data).ossId)
+          this.resultShowData.url = data[0].url
+          this.resultShowData.result = JSON.parse(res.data).result
           this.resultShowVisible = true
-          // this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
-          //   confirmButtonText: '确定'
-          // })
           this.getFaultDiagnosisAPI({ sortieNo: this.currentSortieNo })
           this.handleClose()
         }

+ 11 - 11
src/views/als/faultStatistics/echarts.vue

@@ -20,7 +20,7 @@
         </div>
         <div class="input-with-select">
           <span>机型</span>
-          <el-select v-model="select.aircraftModel" placeholder="请选择" @change="getFaultStatisticsListAll({ distinctField: 'aircraft_num' })" filterable clearable>
+          <el-select v-model="select.aircraftModel" placeholder="请选择" @change="getFaultStatisticsListAllAPI({ distinctField: 'aircraft_num' })" filterable clearable>
             <el-option v-for="item in aircraftModelList" :key="item.aircraftModel" :label="item.aircraftModel" :value="item.aircraftModel"> </el-option>
           </el-select>
         </div>
@@ -95,8 +95,10 @@ export default {
       select: {
         startStatisticsDate: '',
         endStatisticsDate: '',
+        // major: '',
+        // aircraftModel: '',
+        // groups: ''
         major: '特设',
-        aircraftModel: '',
         groups: '空56旅',
         aircraftModel: '歼-20'
       },
@@ -196,10 +198,9 @@ export default {
   },
   mounted() {
     this.getFaultStatisticsAPI(this.select)
-    // this.getAircaftTypeAndModelTreeAPI()
   },
   methods: {
-    async getFaultStatisticsListAll(params) {
+    async getFaultStatisticsListAllAPI(params) {
       if (params.distinctField == 'aircraft_num') {
         params.aircraftModel = this.select.aircraftModel
       }
@@ -315,13 +316,12 @@ export default {
       echartRight.setOption(option)
     },
     async getFaultStatisticsAPI(params) {
-      const { keyWord } = this
-      const res = await getFaultStatisticsEcharts({ keyWord, ...params })
-      this.getFaultStatisticsListAll({ distinctField: 'groups' })
-      this.getFaultStatisticsListAll({ distinctField: 'major' })
-      this.getFaultStatisticsListAll({ distinctField: 'aircraft_model' })
-      this.getFaultStatisticsListAll({ distinctField: 'aircraft_num' })
-      this.getFaultStatisticsListAll({ distinctField: 'faulty_parts_name' })
+      const res = await getFaultStatisticsEcharts({ ...params })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'groups' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'major' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'aircraft_model' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'aircraft_num' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'faulty_parts_name' })
       const names = []
       const values = []
       const data = []

+ 10 - 45
src/views/als/faultStatistics/index.vue

@@ -36,7 +36,7 @@
             </div>
             <div class="input-with-select">
               <span>机型</span>
-              <el-select v-model="select.aircraftModel" placeholder="请选择" @change="getFaultStatisticsListAll({ distinctField: 'aircraft_num' })" filterable clearable>
+              <el-select v-model="select.aircraftModel" placeholder="请选择" @change="getFaultStatisticsListAllAPI({ distinctField: 'aircraft_num' })" filterable clearable>
                 <el-option v-for="item in aircraftModelList" :key="item.aircraftModel" :label="item.aircraftModel" :value="item.aircraftModel"> </el-option>
               </el-select>
             </div>
@@ -410,8 +410,9 @@ export default {
       select: {
         startStatisticsDate: '',
         endStatisticsDate: '',
-        major: '',
-        aircraftModel: ''
+        groups: '空56旅',
+        major: '特设',
+        aircraftModel: '歼-20'
       },
       typeTree: {
         children: 'children',
@@ -787,10 +788,9 @@ export default {
   },
   mounted() {
     this.getFaultStatisticsAPI()
-    // this.getAircaftTypeAndModelTreeAPI()
   },
   methods: {
-    async getFaultStatisticsListAll(params) {
+    async getFaultStatisticsListAllAPI(params) {
       if (params.distinctField == 'aircraft_num') {
         params.aircraftModel = this.select.aircraftModel
       }
@@ -808,17 +808,6 @@ export default {
       }
     },
 
-    async getAircaftTypeAndModelTreeAPI(params) {
-      const { data } = await getAircaftTypeAndModelTree(params)
-      this.menuTreeData = data
-      if (data.length) {
-        this.currentNodeKey = data[0].value
-        this.currentNode = data[0]
-        this.aircaftModelIdList = this.getTreeLeafData(data[0]?.children).map((e) => e.id)
-        this.getFaultStatisticsAPI({ aircaftModelIdList: this.aircaftModelIdList })
-      }
-    },
-
     async removeFaultStatisticsAPI(params) {
       try {
         const { code } = await removeFaultStatistics(params)
@@ -833,22 +822,6 @@ export default {
       } catch (error) {}
     },
 
-    getTreeLeafData(list) {
-      const newArr = []
-      function getLeaf(data, arr) {
-        data.forEach((e) => {
-          if (e.type === 1) {
-            arr.push(e)
-          }
-          if (e.children.length) {
-            getLeaf(e.children, arr)
-          }
-        })
-      }
-      getLeaf(list, newArr)
-      return newArr
-    },
-
     async getFaultStatisticsAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
@@ -858,11 +831,11 @@ export default {
       } = await getFaultStatistics({ pageSize, pageNum: pageIndex, keyWord, ...params })
       this.tableData = list
       this.tableRequset.total = total
-      this.getFaultStatisticsListAll({ distinctField: 'groups' })
-      this.getFaultStatisticsListAll({ distinctField: 'major' })
-      this.getFaultStatisticsListAll({ distinctField: 'aircraft_model' })
-      this.getFaultStatisticsListAll({ distinctField: 'aircraft_num' })
-      this.getFaultStatisticsListAll({ distinctField: 'faulty_parts_name' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'groups' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'major' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'aircraft_model' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'aircraft_num' })
+      this.getFaultStatisticsListAllAPI({ distinctField: 'faulty_parts_name' })
     },
 
     fetch() {
@@ -915,14 +888,6 @@ export default {
       })
     },
 
-    treeNodeClick(data) {
-      this.$refs.table.clearSelection()
-      this.currentNodeKey = data.id
-      this.currentNode = data
-      this.aircaftModelIdList = this.getTreeLeafData(data.children.length ? data.children : [data]).map((e) => e.id)
-      this.getFaultStatisticsAPI()
-    },
-
     openDialog() {
       this.dialogTitle = '新增'
       this.dialogVisible = true

+ 1 - 1
src/views/als/flightData/index.vue

@@ -53,7 +53,7 @@
           <el-row>
             <el-col :span="12">
               <el-form-item label="上传飞参数据" label-width="110px" prop="ossId">
-                <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx', 'csv', 'png']" />
+                <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx', 'csv', 'txt']" />
               </el-form-item>
             </el-col>
             <el-col :span="12">

+ 49 - 46
src/views/als/judgeFaultLogic/index.vue

@@ -21,7 +21,7 @@
         <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改判故逻辑对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
         <el-form ref="form" :model="form" :rules="rules" label-width="80px">
           <el-form-item label="机型" prop="model">
             <el-select v-model="form.model" placeholder="请选择机型">
@@ -38,11 +38,11 @@
               </div>
             </el-checkbox-group>
           </el-form-item>
-          <el-form-item label="模型" prop="pattern">
+          <!-- <el-form-item label="模型" prop="pattern">
             <el-select v-model="form.pattern" placeholder="请选择模型">
               <el-option v-for="item in modelData.list" :key="item.id" :label="item.name" :value="item.id" />
             </el-select>
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
 
         <span slot="footer" class="dialog-footer">
@@ -90,12 +90,13 @@ export default {
       },
       searchValue: '',
       columns: [
-        { prop: 'id', label: '编号' },
+        // { prop: 'id', label: '编号' },
         {
           prop: 'model',
           label: '机型',
+          width: '300px',
           render: (h, params) => {
-            const matchedItem = this.aircaftModelAll.find((item) => params.row.model === item.aircaftModelId)
+            const matchedItem = this.aircaftModelAll?.find((item) => params.row.model === item.aircaftModelId)
             if (matchedItem) {
               return h('span', matchedItem.aircaftModelName)
             } else {
@@ -105,24 +106,25 @@ export default {
         },
         {
           prop: 'hmcCode',
-          label: 'HMC码'
+          label: 'HMC码',
+          width: '300px'
         },
         {
           prop: 'parameterColumn',
           label: '参数列'
         },
-        {
-          prop: 'pattern',
-          label: '模型',
-          render: (h, params) => {
-            const matchedItem = this.modelData.list.find((item) => params.row.pattern === item.id)
-            if (matchedItem) {
-              return h('span', matchedItem.name)
-            } else {
-              return h('span', {}, '')
-            }
-          }
-        },
+        // {
+        //   prop: 'pattern',
+        //   label: '模型',
+        //   render: (h, params) => {
+        //     const matchedItem = this.modelData.list?.find((item) => params.row.pattern === item.id)
+        //     if (matchedItem) {
+        //       return h('span', matchedItem.name)
+        //     } else {
+        //       return h('span', {}, '')
+        //     }
+        //   }
+        // },
         {
           button: true,
           label: '操作',
@@ -182,10 +184,10 @@ export default {
         updateTime: ''
       },
       rules: {
-        model: [{ required: true, message: '机型不能为空', trigger: 'blur' }],
+        model: [{ required: true, message: '机型不能为空', trigger: 'change' }],
         hmcCode: [{ required: true, message: 'HMC码不能为空', trigger: 'blur' }],
-        parameterColumn: [{ required: true, message: '参数列不能为空', trigger: 'blur' }],
-        pattern: [{ required: true, message: '模型不能为空', trigger: 'blur' }]
+        parameterColumn: [{ required: true, message: '参数列不能为空', trigger: 'change' }]
+        // pattern: [{ required: false, message: '模型不能为空', trigger: 'blur' }]
       },
       debounceFn: debounce(this.fetch, 500),
       aircaftModelAll: []
@@ -212,6 +214,7 @@ export default {
     async getModelAPI() {
       const { data } = await getModel({ pageSize: 100, pageNum: 1, ...{ type: 5 } })
       this.modelData = data
+      console.log('this.modelData', this.modelData)
     },
 
     async getAircaftTypeAndModelTreeAPI(params) {
@@ -260,10 +263,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getJudgeFaultLogic({ pageSize, pageNum: pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
       const getAircaftModelAllParams = {
         aircaftTypeCode: '',
         aircaftTypeId: '',
@@ -283,22 +286,18 @@ export default {
 
     async addJudgeFaultLogicAPI() {
       this.form.parameterColumn = this.form.parameterColumn.toString()
-      this.$refs['form'].validate(async (valid) => {
-        if (valid) {
-          try {
-            delete this.form.aircaftModelName
-            const { code } = await addJudgeFaultLogic({ ...this.form })
-            if (code === 200) {
-              this.$message({
-                type: 'success',
-                message: '操作成功!'
-              })
-              this.getJudgeFaultLogicAPI()
-              this.handleClose()
-            }
-          } catch (error) {}
+      try {
+        delete this.form.aircaftModelName
+        const { code } = await addJudgeFaultLogic({ ...this.form })
+        if (code === 200) {
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          })
+          this.getJudgeFaultLogicAPI()
+          this.handleClose()
         }
-      })
+      } catch (error) {}
     },
 
     async updateJudgeFaultLogicAPI() {
@@ -358,14 +357,18 @@ export default {
     },
 
     submit() {
-      switch (this.dialogTitle) {
-        case '编辑':
-          this.updateJudgeFaultLogicAPI()
-          break
-        case '新增':
-          this.addJudgeFaultLogicAPI()
-          break
-      }
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          switch (this.dialogTitle) {
+            case '编辑':
+              this.updateJudgeFaultLogicAPI()
+              break
+            case '新增':
+              this.addJudgeFaultLogicAPI()
+              break
+          }
+        }
+      })
     },
 
     selection(val) {

+ 14 - 6
src/views/als/knowledgeManage/ERManage/index.vue

@@ -13,7 +13,7 @@
         </div>
       </div>
       <div class="view-dataType-table">
-        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options"></LTable>
+        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改模型信息对话框 -->
       <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
@@ -144,7 +144,8 @@ export default {
         relationName: ''
       },
       debounceFn: debounce(this.fetch, 500),
-      relationList: []
+      relationList: [],
+      loading: null
     }
   },
   watch: {
@@ -196,12 +197,18 @@ export default {
     async getRelationAPI(params) {
       try {
         if (this.$refs.table) this.$refs.table.clearSelection()
+        const { pageSize, pageIndex } = this.tableRequset
+        this.loading = this.$loading({
+          lock: true,
+          text: '正在获取知识图谱实体关系数据,请稍候...',
+          spinner: 'el-icon-loading'
+        })
         const {
           data: { dataList, total }
-        } = await getERList()
-        const tableData = this.handleERData(dataList)
-        this.tableData = tableData
-        // this.tableRequset.total = total
+        } = await getERList({ pageSize, pageNum: pageIndex, ...params })
+        this.tableData = dataList
+        this.tableRequset.total = total
+        this.loading.close()
       } catch (error) {}
     },
 
@@ -236,6 +243,7 @@ export default {
           data: { dataList }
         } = await getAllRelationClass()
         this.relationList = dataList
+        this.loading.close()
       } catch (error) {}
     },
 

+ 16 - 2
src/views/als/knowledgeManage/entityManage/index.vue

@@ -13,7 +13,7 @@
         </div>
       </div>
       <div class="view-dataType-table">
-        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options"></LTable>
+        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改模型信息对话框 -->
       <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
@@ -146,11 +146,24 @@ export default {
     async getEntityAPI(params) {
       try {
         if (this.$refs.table) this.$refs.table.clearSelection()
+        const { pageSize, pageIndex } = this.tableRequset
+        this.loading = this.$loading({
+          lock: true,
+          text: '正在获取知识图谱实体数据,请稍候...',
+          spinner: 'el-icon-loading'
+        })
         const {
           data: { dataList, total }
-        } = await getEntityList()
+        } = await getEntityList({ pageSize, pageNum: pageIndex, ...params })
         this.tableData = dataList
         this.tableRequset.total = total
+        this.loading.close()
+
+        // const {
+        //   data: { dataList, total }
+        // } = await getEntityList()
+        // this.tableData = dataList
+        // this.tableRequset.total = total
       } catch (error) {}
     },
 
@@ -160,6 +173,7 @@ export default {
           data: { dataList }
         } = await getAllEntityClass()
         this.categoryList = dataList
+        this.loading.close()
       } catch (error) {}
     },
 

+ 13 - 11
src/views/als/lifePrediction/index.vue

@@ -128,7 +128,14 @@ export default {
         },
         {
           prop: 'status',
-          label: '状态'
+          label: '状态',
+          render: (h, params) => {
+            if (params.row.status == 0) {
+              return h('span', { class: 'warning-state' }, '失败')
+            } else {
+              return h('span', { class: 'success-state' }, '成功')
+            }
+          }
         },
         {
           button: true,
@@ -391,9 +398,9 @@ export default {
       }
     },
 
-    checkResult(row) {
-      // this.form = deepClone(row)
-      this.resultShowData.url = this.getImgUrl(JSON.parse(row.resultContent).ossId)
+    async checkResult(row) {
+      const { data } = await getListByIdsApi(JSON.parse(row.resultContent).ossId)
+      this.resultShowData.url = data[0].url
       this.resultVisible = true
     },
     async beginExecute() {
@@ -429,8 +436,8 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-          this.resultShowData.url = this.getImgUrl(JSON.parse(res.data.data).ossId)
-
+          const { data } = await getListByIdsApi(JSON.parse(res.data).ossId)
+          this.resultShowData.url = data[0].url
           this.resultVisible = true
           this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
         }
@@ -442,11 +449,6 @@ export default {
       }
     },
 
-    async getImgUrl(ossId) {
-      const url = await getListByIdsApi(ossId)
-      return url
-    },
-
     normalizer(node) {
       if (node.children && !node.children.length) {
         delete node.children

+ 18 - 13
src/views/home/index.vue

@@ -6,7 +6,7 @@
           <template slot="content">
             <div class="airStatus">
               <div class="firstRow">
-                <div v-for="item of aircaftCatalogAll" :key="item.aircaftCatalogId" class="cell">
+                <div v-for="item of airMap" :key="item.aircaftCatalogId" class="cell">
                   <el-image style="width: 80px; height: 80px; margin-top: 10px" :src="imgUrl"></el-image>
                   <div class="info">
                     <p>{{ item.aircaftCatalogCode }}</p>
@@ -90,7 +90,7 @@
 
 <script>
 import { getHomeLastMission, getAviationList, getHomeAviationProject, getHomeAviationAmount, getHomeAviationMoney } from '@/api/home'
-import { getExclusionList, getFaultStatistics } from '@/api/als/faultStatistics'
+import { getExclusionList, getExclusionListAll } from '@/api/als/faultStatistics'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 
 import * as echarts from 'echarts'
@@ -120,12 +120,14 @@ export default {
       bottomRightOptions,
       imgUrl: require('@/assets/images/飞机.png'),
       aircaftCatalogAll: [],
+      airMap: [],
       tableRequset: {
         total: 0,
         pageIndex: 1,
         pageSize: 10,
         searchValue: ''
-      }
+      },
+      allFaultRecord: []
     }
   },
   mounted() {
@@ -159,27 +161,30 @@ export default {
       const {
         data: { list, total }
       } = await getExclusionList({ pageSize, pageNum: pageIndex })
-      // const { data } = await getFaultStatisticsListAll({})
       this.tableRequset.total = total
       this.maintainTableData = list.map((item) => {
         return { ...item, repairStatus: '排故中' }
       })
-      // this.getAircaftCatalogAllAPI()
+      const res = await getExclusionListAll({})
+      this.allFaultRecord = res.data
       const { data: AircaftCatalogData } = await getAircaftCatalogAll({
         keyWord: '',
         aircaftModelIdList: []
       })
       this.aircaftCatalogAll = AircaftCatalogData
-      this.maintainTableData.forEach((item) => {
-        this.aircaftCatalogAll.forEach((airItem) => {
-          if (airItem.aircaftCatalogCode === item.aircraftNum) {
-            airItem.healthStatus = '故障'
-          } else {
-            airItem.healthStatus = '健康'
-          }
+      this.airMap = []
+      this.aircaftCatalogAll.forEach((item) => {
+        const obj = this.allFaultRecord.find((airItem) => {
+          return item.aircaftCatalogCode == airItem.aircraftNum
         })
+        if (obj) {
+          item.healthStatus = '故障'
+        } else {
+          item.healthStatus = '健康'
+        }
+        this.airMap.push({ ...item })
       })
-      console.log('this.aircaftCatalogAll', this.aircaftCatalogAll)
+      console.log('this.aircaftCatalogAll', this.airMap)
     },
     handleChange(item) {
       switch (item) {

+ 2 - 2
vue.config.js

@@ -8,7 +8,7 @@ module.exports = defineConfig({
     open: true, //值为 true的话,项目启动时自动打开到浏览器里边, false不会打开
     proxy: {
       ['/api/als']: {
-        target: 'http://localhost:9090',
+        target: 'http://192.168.2.10:9090',
         ws: false,
         changeOrigin: true,
         pathRewrite: {
@@ -16,7 +16,7 @@ module.exports = defineConfig({
         }
       },
       ['/api/kgqa']: {
-        target: 'http://192.168.0.106:7073',
+        target: 'http://192.168.2.120:7073',
         ws: false,
         changeOrigin: true,
         pathRewrite: {