Bläddra i källkod

Merge branch 'dev-rmd2' of Rmengdi/LQBZ_web into master

www 3 månader sedan
förälder
incheckning
8c55419a3f

+ 5 - 0
src/api/als/dataImport.js

@@ -5,6 +5,11 @@ export const getDataImport = async (data) => {
   return await get('/als/dataImport/list', data)
 }
 
+// 查询数据导入信息列表
+export const getAllDataImport = async (data) => {
+  return await get('/als/dataImport/listAll', data)
+}
+
 // 新增数据导入信息
 export const addDataImport = async (data) => {
   return await post('/als/dataImport', data)

+ 5 - 0
src/api/als/faultStatistics.js

@@ -5,6 +5,11 @@ export const getFaultStatistics = async (data) => {
   return await get('/als/faultStatistics/list', data)
 }
 
+// 查询故障统计列表
+export const getExclusionList = async (data) => {
+  return await get('/als/faultStatistics/exclusionList', data)
+}
+
 // 查询故障统计列表
 export const getFaultStatisticsEcharts = async (data) => {
   return await get('/als/faultStatistics/statistics', data)

+ 10 - 10
src/router/modules/system.js

@@ -263,16 +263,16 @@ export default [
           title: '知识抽取'
         }
       },
-      {
-        name: 'ExtractList',
-        path: '/knowledgeGraph/extractList',
-        component: () => import('@/views/als/knowledgeExtraction/extractList.vue'),
-        name: 'ExtractList',
-        meta: {
-          parent: 'BasicData',
-          title: '抽取列表'
-        }
-      },
+      // {
+      //   name: 'ExtractList',
+      //   path: '/knowledgeGraph/extractList',
+      //   component: () => import('@/views/als/knowledgeExtraction/extractList.vue'),
+      //   name: 'ExtractList',
+      //   meta: {
+      //     parent: 'BasicData',
+      //     title: '抽取列表'
+      //   }
+      // },
       {
         name: 'EntityManage',
         path: '/knowledgeGraph/entityManage',

+ 2 - 2
src/views/als/faultDiagnosis/index.vue

@@ -429,7 +429,7 @@ export default {
     },
 
     checkRelustShow(row) {
-      this.resultShowData = row.resultContent
+      this.resultShowData = JSON.parse(row.resultContent)
       this.resultShowVisible = true
     },
 
@@ -455,7 +455,7 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-          this.resultShowData = res.data
+          this.resultShowData = JSON.parse(res.data)
           this.resultShowVisible = true
           // this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
           //   confirmButtonText: '确定'

+ 23 - 34
src/views/als/lifePrediction/index.vue

@@ -29,17 +29,7 @@
             </el-select>
           </el-form-item>
           <el-form-item label="架次号" prop="sortieNo">
-            <LTable
-              ref="sortieNoTableRef"
-              :defaultFetch="false"
-              :fetch="sortieNoFetch"
-              @selection-change="sortieNoSelection"
-              class="single-select-table"
-              :columns="sortieNoColumns"
-              :dataSource="sortieNoList"
-              :options="sortieNoOptions"
-              :pagination="SortieNoTableRequset"
-            ></LTable>
+            <LTable ref="sortieNoTableRef" :defaultFetch="false" :fetch="sortieNoFetch" @selection-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions"></LTable>
           </el-form-item>
           <el-form-item label="部件" prop="partId">
             <treeselect noOptionsText="该机型暂无构型信息,请在构型管理中添加" :value="form.partId" :normalizer="normalizer" :options="partsData" :show-count="true" placeholder="请选择部件" @select="partIdSelect" />
@@ -54,12 +44,8 @@
       <el-dialog title="执行进度" :visible.sync="progressVisible" width="800px" :before-close="handleClose">
         <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
-      <el-dialog title="结果展示" :visible.sync="resultVisible" width="50%">
-        <el-image style="width: 500px" :src="resultUrl" :preview-src-list="[resultUrl]"></el-image>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="resultVisible = false">取 消</el-button>
-          <el-button type="primary" @click="resultVisible = false">确 定</el-button>
-        </span>
+      <el-dialog title="结果展示" :visible.sync="resultVisible" width="50%" :before-close="resultShowDialogClose">
+        <el-image style="width: 500px" :src="resultShowData.ossId" :preview-src-list="[resultShowData.ossId]"></el-image>
       </el-dialog>
     </div>
   </div>
@@ -75,7 +61,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { handleTree } from '../utils/common'
 import { executeEvaluation } from '@/api/als/algorithm'
-import { getDataImport } from '@/api/als/dataImport'
+import { getAllDataImport } from '@/api/als/dataImport'
 
 export default {
   name: 'LifePrediction',
@@ -212,12 +198,6 @@ export default {
         border: true,
         height: '250px'
       },
-      SortieNoTableRequset: {
-        total: 0,
-        pageIndex: 1,
-        pageSize: 10,
-        searchValue: ''
-      },
       sortieNoList: [],
       sortieNoCheckItems: [],
       form: {
@@ -246,7 +226,10 @@ export default {
         aircraftId: [{ required: true, message: '编目不能为空', trigger: 'change' }],
         partId: [{ required: true, message: '部件不能为空', trigger: 'change' }]
       },
-      resultUrl: ''
+      resultUrl: '',
+      resultShowData: {
+        ossId: ''
+      }
     }
   },
   watch: {
@@ -337,13 +320,10 @@ export default {
       this.sortieNoCheckItems = []
       try {
         if (this.$refs.sortieNoTableRef) this.$refs.sortieNoTableRef.clearSelection()
-        const { keyWord } = this
-        const { pageSize, pageIndex } = this.SortieNoTableRequset
-        const {
-          data: { list, total }
-        } = await getDataImport({ pageSize, pageNum: pageIndex, ...params, source: 1 })
-        this.sortieNoList = list
-        this.SortieNoTableRequset.total = total
+        const { code, data } = await getAllDataImport({ ...params, source: 1 })
+        if (code === 200) {
+          this.sortieNoList = data
+        }
       } catch (error) {}
     },
 
@@ -398,16 +378,23 @@ export default {
         ossIds: []
       }
     },
+
+    resultShowDialogClose() {
+      this.resultVisible = true
+      this.resultShowData = {
+        ossId: ''
+      }
+    },
+
     checkResult(row) {
       // this.form = deepClone(row)
-      this.resultUrl = row.resultContent
+      this.resultShowData = JSON.parse(row.resultContent)
       this.resultVisible = true
     },
     async beginExecute() {
       this.sortieNoCheckItems.forEach((item) => {
         this.form.ossIds.push(item.ossId)
       })
-      console.log('333', this.form)
       if (this.sortieNoCheckItems.length == 0) {
         this.$message({
           type: 'success',
@@ -437,6 +424,8 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
+          this.resultShowData = JSON.parse(res.data)
+          this.resultVisible = true
           this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
         }
       } catch (error) {

+ 4 - 4
src/views/home/index.vue

@@ -90,7 +90,7 @@
 
 <script>
 import { getHomeLastMission, getAviationList, getHomeAviationProject, getHomeAviationAmount, getHomeAviationMoney } from '@/api/home'
-import { getFaultStatisticsListAll, getFaultStatistics } from '@/api/als/faultStatistics'
+import { getExclusionList, getFaultStatistics } from '@/api/als/faultStatistics'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 
 import * as echarts from 'echarts'
@@ -158,11 +158,11 @@ export default {
       const { pageSize, pageIndex } = this.tableRequset
       const {
         data: { list, total }
-      } = await getFaultStatistics({ pageSize, pageIndex })
+      } = await getExclusionList({ pageSize, pageNum: pageIndex })
       // const { data } = await getFaultStatisticsListAll({})
       this.tableRequset.total = total
-      this.maintainTableData = list.filter((item) => {
-        return item.repairStatus !== '已完成'
+      this.maintainTableData = list.map((item) => {
+        return { ...item, repairStatus: '排故中' }
       })
       // this.getAircaftCatalogAllAPI()
       const { data: AircaftCatalogData } = await getAircaftCatalogAll({

+ 1 - 1
src/views/home/table.js

@@ -111,7 +111,7 @@ export const maintainColumns = (_this) => [
 export const maintainOptions = {
   stripe: true, // 斑马纹
   mutiSelect: false, // 多选框
-  index: false, // 显示序号, 多选则 mutiSelect
+  index: true, // 显示序号, 多选则 mutiSelect
   loading: false, // 表格动画
   initTable: true, // 是否一挂载就加载数据
   border: true,

+ 2 - 2
src/views/system/systemBackup/importDialog/index.vue

@@ -2,10 +2,10 @@
   <el-dialog :title="dialogtitle" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center>
     <div class="upload">
       <div class="upload-left">导入文件</div>
-      <el-upload class="upload-right" ref="upload" accept=".arff" :action="fileApi" :file-list="fileList" :data="fileData" :auto-upload="false" :on-success="onSuccess" :limit="1">
+      <el-upload class="upload-right" ref="upload" accept=".arff,.csv" :action="fileApi" :file-list="fileList" :data="fileData" :auto-upload="false" :on-success="onSuccess" :limit="1">
         <el-button slot="trigger" style="margin-right: 30px" size="small" type="primary">选择文件</el-button>
         <el-button size="small" type="success" @click="submitUpload">导入数据</el-button>
-        <div slot="tip" class="el-upload__tip" style="margin-left: 10px; margin-top: 10px; font-size: 14px">只能导入 arff 文件</div>
+        <div slot="tip" class="el-upload__tip" style="margin-left: 10px; margin-top: 10px; font-size: 14px">只能导入 csv / arff 文件</div>
       </el-upload>
     </div>
   </el-dialog>