|
@@ -68,8 +68,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="800px">
|
|
|
- 展示结果
|
|
|
+ <el-dialog title="结果展示" :visible.sync="resultVisible" width="1200px">
|
|
|
+ <LTable ref="resultTableRef" :columns="resultColumns" :dataSource="resultTableData" :options="resultOptions"></LTable>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="resultVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="resultVisible = false">确 定</el-button>
|
|
@@ -118,7 +118,6 @@ export default {
|
|
|
},
|
|
|
searchValue: '',
|
|
|
columns: [
|
|
|
- { prop: 'id', label: '编号' },
|
|
|
{
|
|
|
prop: 'sortieNo',
|
|
|
label: '架次号'
|
|
@@ -137,7 +136,15 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
prop: 'modelType',
|
|
|
- label: '模型类型'
|
|
|
+ label: '模型类型',
|
|
|
+ render: (h, params) => {
|
|
|
+ const matchedItem = this.$enumData.agloModelList.find((item) => params.row.modelType === item.key)
|
|
|
+ if (matchedItem) {
|
|
|
+ return h('span', matchedItem.name)
|
|
|
+ } else {
|
|
|
+ return h('span', {}, '')
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
prop: 'param',
|
|
@@ -151,25 +158,20 @@ export default {
|
|
|
// prop: 'ossId',
|
|
|
// label: '文件Id'
|
|
|
// },
|
|
|
- {
|
|
|
- prop: 'resultContent',
|
|
|
- label: '结果'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // prop: 'result',
|
|
|
+ // label: '结果'
|
|
|
+ // },
|
|
|
{
|
|
|
prop: 'status',
|
|
|
- label: '状态'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'modelType1',
|
|
|
- label: '模型类型'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'param1',
|
|
|
- label: '参数'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'columnData1',
|
|
|
- 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,
|
|
@@ -185,15 +187,6 @@ export default {
|
|
|
this.checkResultList(row)
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- name: '执行',
|
|
|
- type: 'text',
|
|
|
- round: false,
|
|
|
- plain: false,
|
|
|
- onClick: (row, index, scope) => {
|
|
|
- this.executeAglo(row)
|
|
|
- }
|
|
|
- },
|
|
|
{
|
|
|
name: '删除',
|
|
|
type: 'text',
|
|
@@ -206,6 +199,40 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
+ resultColumns: [
|
|
|
+ {
|
|
|
+ prop: 'sortieNo',
|
|
|
+ label: '架次号'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'aircraftId',
|
|
|
+ label: '编目',
|
|
|
+ render: (h, params) => {
|
|
|
+ const matchedItem = this.aircaftCatalogAll.find((item) => params.row.aircraftId.trim() === item.aircaftCatalogId.trim())
|
|
|
+ if (matchedItem) {
|
|
|
+ return h('span', matchedItem.aircaftCatalogCode)
|
|
|
+ } else {
|
|
|
+ return h('span', {}, '')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '模型类型',
|
|
|
+ render: (h, params) => {
|
|
|
+ const matchedItem = this.$enumData.agloModelList.find((item) => params.row.modelType === item.key)
|
|
|
+ if (matchedItem) {
|
|
|
+ return h('span', matchedItem.name)
|
|
|
+ } else {
|
|
|
+ return h('span', {}, '')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'resultContent',
|
|
|
+ label: '结果'
|
|
|
+ }
|
|
|
+ ],
|
|
|
sortieNoColumns: [
|
|
|
{
|
|
|
prop: 'sortieNo',
|
|
@@ -238,6 +265,15 @@ export default {
|
|
|
border: true,
|
|
|
height: '250px'
|
|
|
},
|
|
|
+ resultOptions: {
|
|
|
+ stripe: true,
|
|
|
+ mutiSelect: false,
|
|
|
+ index: false,
|
|
|
+ loading: false,
|
|
|
+ initTable: false,
|
|
|
+ border: true,
|
|
|
+ height: '300px'
|
|
|
+ },
|
|
|
SortieNoTableRequset: {
|
|
|
total: 0,
|
|
|
pageIndex: 1,
|
|
@@ -246,6 +282,7 @@ export default {
|
|
|
},
|
|
|
tableCheckItems: [],
|
|
|
tableData: [],
|
|
|
+ resultTableData: [],
|
|
|
tableRequset: {
|
|
|
total: 0,
|
|
|
pageIndex: 1,
|
|
@@ -346,6 +383,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
getLeaf(list, newArr)
|
|
|
return newArr
|
|
|
},
|
|
@@ -417,6 +455,8 @@ export default {
|
|
|
|
|
|
handleClose() {
|
|
|
this.dialogVisible = false
|
|
|
+ this.transferRightData = []
|
|
|
+ this.$refs.sortieNoTableRef.clearSelection()
|
|
|
this.executeForm = {
|
|
|
sortieNo: '',
|
|
|
aircraftId: '',
|
|
@@ -464,16 +504,19 @@ export default {
|
|
|
},
|
|
|
|
|
|
checkResultList(row) {
|
|
|
- this.form = deepClone(row)
|
|
|
+ if (row.status === '0') {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '执行失败,无法查看结果!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.resultTableData = [row]
|
|
|
this.resultVisible = true
|
|
|
},
|
|
|
- executeAglo(row) {
|
|
|
- // this.executeVisible = true
|
|
|
- // this.agloForm.sortieNo = row.sortieNo
|
|
|
- // this.agloForm.aircraftId = row.aircraftId
|
|
|
- },
|
|
|
async beginExecute() {
|
|
|
this.progressVisible = true
|
|
|
+ this.percentage += 1
|
|
|
try {
|
|
|
const res = await executeFault(this.executeForm)
|
|
|
this.percentage += 1
|
|
@@ -487,6 +530,10 @@ export default {
|
|
|
type: 'success',
|
|
|
message: '执行成功!'
|
|
|
})
|
|
|
+ const result = res.data
|
|
|
+ this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
this.getFaultDiagnosisAPI({ aircraftId: this.aircaftModelIdList })
|
|
|
} else {
|
|
|
this.percentage += 1
|
|
@@ -510,9 +557,10 @@ export default {
|
|
|
async changeAircraftId(aircraftId) {
|
|
|
try {
|
|
|
const {
|
|
|
- data: { list }
|
|
|
+ data: { list, total }
|
|
|
} = await getDataImport({ aircraftId })
|
|
|
this.sortieNoList = list
|
|
|
+ this.SortieNoTableRequset.total = total
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
|
|
@@ -520,16 +568,21 @@ export default {
|
|
|
this.executeForm.ossId = val.ossId
|
|
|
this.executeForm.sortieNo = val.sortieNo
|
|
|
if (val.ossId) {
|
|
|
- const res = await getColumnDataAPI(val.ossId)
|
|
|
- if (res.code === 200) {
|
|
|
- this.transferData = []
|
|
|
- res.data.forEach((item, index) => {
|
|
|
- this.transferData.push({
|
|
|
- key: index,
|
|
|
- label: item
|
|
|
+ try {
|
|
|
+ const res = await getColumnDataAPI(val.ossId)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.transferData = []
|
|
|
+ res.data.forEach((item, index) => {
|
|
|
+ this.transferData.push({
|
|
|
+ key: index,
|
|
|
+ label: item
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- }
|
|
|
+ if (this.executeForm.modelId) {
|
|
|
+ this.changeModelId(this.executeForm.modelId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (error) {}
|
|
|
}
|
|
|
},
|
|
|
|