Browse Source

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

www 3 months ago
parent
commit
dfee3b9b8c

+ 19 - 5
src/views/als/faultDiagnosis/index.vue

@@ -45,7 +45,11 @@
       </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.ossId" :preview-src-list="[resultShowData.ossId]"></el-image>
+        <el-image style="width: 500px" :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>
+        </span>
       </el-dialog>
     </div>
   </div>
@@ -62,6 +66,7 @@ import Treeselect from '@riophae/vue-treeselect'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { executeFault } from '@/api/als/algorithm'
+import { getListByIdsApi } from '@/api/als/oss'
 
 export default {
   name: 'FaultDiagnosis',
@@ -258,7 +263,7 @@ export default {
       allAirConfig: [],
       percentage: 0,
       resultShowData: {
-        ossId: '',
+        url: '',
         result: ''
       }
     }
@@ -407,9 +412,9 @@ export default {
     },
 
     resultShowDialogClose() {
-      this.resultShowVisible = true
+      this.resultShowVisible = false
       this.resultShowData = {
-        ossId: '',
+        url: '',
         result: ''
       }
     },
@@ -430,9 +435,16 @@ export default {
 
     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
       this.resultShowVisible = true
     },
 
+    async getImgUrl(ossId) {
+      const url = await getListByIdsApi(ossId)
+      return url
+    },
+
     async beginExecute() {
       this.progressVisible = true
 
@@ -455,7 +467,9 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-          this.resultShowData = JSON.parse(res.data)
+          // 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
           this.resultShowVisible = true
           // this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
           //   confirmButtonText: '确定'

+ 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']" />
+                <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx', 'csv', 'png']" />
               </el-form-item>
             </el-col>
             <el-col :span="12">

+ 17 - 6
src/views/als/lifePrediction/index.vue

@@ -45,7 +45,11 @@
         <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
       <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-image style="width: 500px" :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>
+        </span>
       </el-dialog>
     </div>
   </div>
@@ -62,6 +66,7 @@ import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { handleTree } from '../utils/common'
 import { executeEvaluation } from '@/api/als/algorithm'
 import { getAllDataImport } from '@/api/als/dataImport'
+import { getListByIdsApi } from '@/api/als/oss'
 
 export default {
   name: 'LifePrediction',
@@ -228,7 +233,7 @@ export default {
       },
       resultUrl: '',
       resultShowData: {
-        ossId: ''
+        url: ''
       }
     }
   },
@@ -380,15 +385,15 @@ export default {
     },
 
     resultShowDialogClose() {
-      this.resultVisible = true
+      this.resultVisible = false
       this.resultShowData = {
-        ossId: ''
+        url: ''
       }
     },
 
     checkResult(row) {
       // this.form = deepClone(row)
-      this.resultShowData = JSON.parse(row.resultContent)
+      this.resultShowData.url = this.getImgUrl(JSON.parse(row.resultContent).ossId)
       this.resultVisible = true
     },
     async beginExecute() {
@@ -424,7 +429,8 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-          this.resultShowData = JSON.parse(res.data)
+          this.resultShowData.url = this.getImgUrl(JSON.parse(res.data.data).ossId)
+
           this.resultVisible = true
           this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
         }
@@ -436,6 +442,11 @@ export default {
       }
     },
 
+    async getImgUrl(ossId) {
+      const url = await getListByIdsApi(ossId)
+      return url
+    },
+
     normalizer(node) {
       if (node.children && !node.children.length) {
         delete node.children

+ 1 - 1
src/views/basicData/dataAircraftCataloging/index.js

@@ -48,7 +48,7 @@ export const columns = (_this) => [
     prop: 'status',
     label: '状态',
     render: (h, params) => {
-      if (params.row.status == 0) {
+      if (params.row.status == 1) {
         return h('span', { class: 'success-state' }, '服役')
       } else {
         return h('span', { class: 'warning-state' }, '退役')