|
@@ -17,13 +17,29 @@
|
|
|
</div>
|
|
|
<el-dialog title="诊断结果" :visible.sync="resultVisible" width="1200px">
|
|
|
<LTable ref="resultTable" :showColumnSetting="false" :defaultFetch="false" :columns="resultColumns" :dataSource="resultTableData" :options="resultOptions" :pagination="resultTableRequset"></LTable>
|
|
|
- <!-- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="resultVisible=false">确 定</el-button>
|
|
|
- </span> -->
|
|
|
</el-dialog>
|
|
|
<el-dialog title="执行进度" :visible.sync="progressVisible" width="800px">
|
|
|
<el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="结果展示" :visible.sync="resultShowVisible" :before-close="resultShowDialogClose" width="800px">
|
|
|
+ <el-descriptions border :column="1">
|
|
|
+ <el-descriptions-item label="评分">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <el-rate v-model="changeScore" disabled text-color="#ff9900" score-template="{value}"> </el-rate>
|
|
|
+ <span style="margin-left: 3px; color: #f7ba2a; font-size: 1.2rem">{{ diagnosisResult.score }}</span>
|
|
|
+ </div>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="退化结果">
|
|
|
+ <el-tag style="margin-right: 20px" type="danger" v-for="(item, index) in diagnosisResult.degradation" :key="index">{{ item }}</el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="故障结果">
|
|
|
+ <el-tag style="margin-right: 20px" type="danger" v-for="(item, index) in diagnosisResult.fault" :key="index">{{ item }}</el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="resultShowDialogClose">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -47,6 +63,7 @@ export default {
|
|
|
return {
|
|
|
resultVisible: false,
|
|
|
progressVisible: false,
|
|
|
+ resultShowVisible: false,
|
|
|
keyWordData: '',
|
|
|
aircaftModelIdList: [],
|
|
|
currentNodeKey: '',
|
|
@@ -163,36 +180,34 @@ export default {
|
|
|
label: '算法名称'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'param',
|
|
|
- label: '部件',
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '执行时间',
|
|
|
render: (h, params) => {
|
|
|
- const matchedItem = this.allAirConfig.find((item) => params.row.param === item.id)
|
|
|
- if (matchedItem) {
|
|
|
- return h('span', matchedItem.name)
|
|
|
- } else {
|
|
|
- return h('span', {}, '')
|
|
|
- }
|
|
|
+ return h('span', params.row.createTime.split(' ')[0])
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- prop: 'remarks',
|
|
|
- label: '参数特征'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'columnData',
|
|
|
- label: '数据列'
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态',
|
|
|
+ render: (h, params) => {
|
|
|
+ return h('span', { class: 'success-state' }, '成功')
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- prop: 'resultContent',
|
|
|
+ button: true,
|
|
|
label: '结果',
|
|
|
- render: (h, params) => {
|
|
|
- const result = JSON.parse(params.row.resultContent).result
|
|
|
- if (result) {
|
|
|
- return h('span', result)
|
|
|
- } else {
|
|
|
- return h('span', {}, '-')
|
|
|
+ width: '240px',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ name: '查看结果',
|
|
|
+ type: 'text',
|
|
|
+ round: false,
|
|
|
+ plain: false,
|
|
|
+ onClick: (row, index, scope) => {
|
|
|
+ this.checkRelustShow(row)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ ]
|
|
|
}
|
|
|
],
|
|
|
resultOptions: {
|
|
@@ -232,7 +247,13 @@ export default {
|
|
|
resultShowData: {
|
|
|
url: '',
|
|
|
result: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ diagnosisResult: {
|
|
|
+ degradation: [],
|
|
|
+ fault: [],
|
|
|
+ score: null
|
|
|
+ },
|
|
|
+ changeScore: null
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -287,7 +308,6 @@ export default {
|
|
|
|
|
|
async getFaultDiagnosisResultAPI(params) {
|
|
|
if (this.$refs.resultTable) this.$refs.resultTable.clearSelection()
|
|
|
- const { keyWord } = this
|
|
|
const { pageSize, pageIndex } = this.resultTableRequset
|
|
|
const {
|
|
|
data: { list, total }
|
|
@@ -374,6 +394,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ resultShowDialogClose() {
|
|
|
+ this.resultShowVisible = false
|
|
|
+ this.diagnosisResult = {
|
|
|
+ degradation: [],
|
|
|
+ fault: [],
|
|
|
+ score: null
|
|
|
+ }
|
|
|
+ this.changeScore = null
|
|
|
+ },
|
|
|
+
|
|
|
submit() {
|
|
|
this.beginExecute(row)
|
|
|
},
|
|
@@ -382,11 +412,18 @@ export default {
|
|
|
this.tableCheckItems = val
|
|
|
},
|
|
|
|
|
|
- checkRelustList(row) {
|
|
|
- this.getFaultDiagnosisResultAPI({ sortieNo: row.sortieNo })
|
|
|
+ async checkRelustList(row) {
|
|
|
+ this.getFaultDiagnosisResultAPI({ diagnosisId: row.id })
|
|
|
this.resultVisible = true
|
|
|
},
|
|
|
|
|
|
+ checkRelustShow(row) {
|
|
|
+ const resData = JSON.parse(row.resultContent)
|
|
|
+ this.changeScore = resData.score / 20
|
|
|
+ this.diagnosisResult = resData
|
|
|
+ this.resultShowVisible = true
|
|
|
+ },
|
|
|
+
|
|
|
async getImgUrl(ossId) {
|
|
|
const { data } = await getListByIdsApi(ossId)
|
|
|
const newUrl = data[0].url
|
|
@@ -416,9 +453,12 @@ export default {
|
|
|
type: 'success',
|
|
|
message: '执行成功!'
|
|
|
})
|
|
|
- this.resultVisible = true
|
|
|
- console.log('11', JSON.parse(res.msg))
|
|
|
- this.getFaultDiagnosisResultAPI({ sortieNo: this.currentSortieNo })
|
|
|
+ const resData = JSON.parse(res.data)
|
|
|
+ this.changeScore = resData.score / 20
|
|
|
+ this.diagnosisResult = resData
|
|
|
+
|
|
|
+ // this.resultVisible = true
|
|
|
+ this.resultShowVisible = true
|
|
|
this.getDataImportAPI({ aircraftId: this.aircaftModelIdList })
|
|
|
this.handleClose()
|
|
|
}
|