|
@@ -21,25 +21,27 @@
|
|
|
<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-form ref="form" :model="form" label-width="80px">
|
|
|
+ <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px" :before-close="handleClose">
|
|
|
+ <el-form ref="executeForm" :model="executeForm" label-width="80px">
|
|
|
<el-form-item label="编目" prop="aircraftId">
|
|
|
- <el-select v-model="form.aircraftId" placeholder="请选择编目">
|
|
|
+ <el-select v-model="executeForm.aircraftId" placeholder="请选择编目" @change="changeAircraftId(executeForm.aircraftId)" disabled>
|
|
|
<el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="部件名称" prop="name">
|
|
|
- <el-input v-model="form.name" placeholder="请输入部件名称" />
|
|
|
+ <el-form-item label="模型类型" prop="modelType">
|
|
|
+ <el-select v-model="executeForm.modelType" placeholder="请选择模型类型" @change="changeModelType(executeForm.modelType)">
|
|
|
+ <el-option v-for="item in algoTypeList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="型号" prop="model">
|
|
|
- <el-input v-model="form.model" placeholder="请输入型号" />
|
|
|
+ <el-form-item label="架次号" prop="sortieNo">
|
|
|
+ <LTable ref="sortieNoTableRef" @current-change="sortieNoSelection" class="single-select-table" :columns="sortieNoColumns" :dataSource="sortieNoList" :options="sortieNoOptions" :pagination="SortieNoTableRequset"></LTable>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属系统" prop="system">
|
|
|
- <el-input v-model="form.system" placeholder="请输入所属系统" />
|
|
|
+ <el-form-item label="部件" prop="name">
|
|
|
+ <el-input v-model="executeForm.name" placeholder="请输入部件" />
|
|
|
+ <!-- <treeselect v-model="executeForm.name" :normalizer="normalizer" :options="partsTreeData" :show-count="true" placeholder="请选择部件" /> -->
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <!-- <el-form-item label="剩余时长" prop="remainTiem">
|
|
|
- <el-input v-model="form.remainTiem" placeholder="请输入剩余时长" />
|
|
|
+ <!-- <el-form-item label="所属系统" prop="system">
|
|
|
+ <el-input v-model="form.system" placeholder="请输入所属系统" />
|
|
|
</el-form-item> -->
|
|
|
</el-form>
|
|
|
|
|
@@ -69,6 +71,9 @@ import { deepClone, debounce } from '@/utils/index'
|
|
|
import { getDataImport } from '@/api/als/dataImport'
|
|
|
import { getModel } from '@/api/als/model'
|
|
|
import { getAircaftCatalogAll } from '@/api/als/aircraft'
|
|
|
+// import Treeselect from '@riophae/vue-treeselect'
|
|
|
+// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'LifePrediction',
|
|
|
components: {},
|
|
@@ -154,15 +159,6 @@ export default {
|
|
|
this.checkResultList(row)
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- name: '执行',
|
|
|
- type: 'text',
|
|
|
- round: false,
|
|
|
- plain: false,
|
|
|
- onClick: (row, index, scope) => {
|
|
|
- this.executeAglo(row)
|
|
|
- }
|
|
|
- },
|
|
|
{
|
|
|
name: '删除',
|
|
|
type: 'text',
|
|
@@ -175,6 +171,20 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
+ sortieNoColumns: [
|
|
|
+ {
|
|
|
+ prop: 'sortieNo',
|
|
|
+ label: '架次号'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'source',
|
|
|
+ label: '数据来源'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ossId',
|
|
|
+ label: '文件Id'
|
|
|
+ }
|
|
|
+ ],
|
|
|
options: {
|
|
|
stripe: true, // 斑马纹
|
|
|
mutiSelect: true, // 多选框
|
|
@@ -184,6 +194,21 @@ export default {
|
|
|
border: true,
|
|
|
height: 'calc(100vh - 300px)'
|
|
|
},
|
|
|
+ sortieNoOptions: {
|
|
|
+ stripe: true,
|
|
|
+ mutiSelect: false,
|
|
|
+ index: true,
|
|
|
+ loading: false,
|
|
|
+ initTable: false,
|
|
|
+ border: true,
|
|
|
+ height: '250px'
|
|
|
+ },
|
|
|
+ SortieNoTableRequset: {
|
|
|
+ total: 0,
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ searchValue: ''
|
|
|
+ },
|
|
|
tableCheckItems: [],
|
|
|
tableData: [],
|
|
|
tableRequset: {
|
|
@@ -210,18 +235,17 @@ export default {
|
|
|
updateTime: ''
|
|
|
},
|
|
|
debounceFn: debounce(this.fetch, 500),
|
|
|
- agloForm: {
|
|
|
+ executeForm: {
|
|
|
sortieNo: '',
|
|
|
aircraftId: '',
|
|
|
- agloType: '',
|
|
|
- agloName: '',
|
|
|
- paramsList: []
|
|
|
+ modelType: '',
|
|
|
+ name: ''
|
|
|
},
|
|
|
aircaftCatalogAll: [],
|
|
|
- transferData: [],
|
|
|
algoTypeList: [{ id: 6, name: '寿命预测' }],
|
|
|
- algoNameList: [],
|
|
|
- percentage: 0
|
|
|
+ percentage: 0,
|
|
|
+ modelList: [],
|
|
|
+ sortieNoList: []
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -342,12 +366,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
openDialog() {
|
|
|
+ this.executeForm.aircraftId = this.currentNodeKey
|
|
|
+ if (this.executeForm.aircraftId !== '') {
|
|
|
+ this.changeAircraftId(this.executeForm.aircraftId)
|
|
|
+ }
|
|
|
this.dialogTitle = '新增'
|
|
|
this.dialogVisible = true
|
|
|
- this.form.aircraftId = this.currentNodeKey
|
|
|
- // if (this.form.aircraftId !== '') {
|
|
|
- // this.changeAircraftId(this.form.aircraftId)
|
|
|
- // }
|
|
|
},
|
|
|
|
|
|
handleClose() {
|
|
@@ -396,12 +420,54 @@ export default {
|
|
|
this.progressVisible = false
|
|
|
this.percentage = 0
|
|
|
clearInterval(myTimer)
|
|
|
- this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
|
|
|
+ // this.$router.push({ name: 'PreResult', params: { agloForm: this.agloForm } })
|
|
|
this.handleClose()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '执行成功!'
|
|
|
+ })
|
|
|
+ this.$alert('寿命预测结果为:寿命前期', '寿命预测结果', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
}
|
|
|
}, 30)
|
|
|
},
|
|
|
|
|
|
+ async changeAircraftId(aircraftId) {
|
|
|
+ try {
|
|
|
+ const {
|
|
|
+ data: { list, total }
|
|
|
+ } = await getDataImport({ aircraftId })
|
|
|
+ this.sortieNoList = list
|
|
|
+ this.SortieNoTableRequset.total = total
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
+
|
|
|
+ async sortieNoSelection(val) {
|
|
|
+ this.executeForm.ossId = val.ossId //得到架次数据
|
|
|
+ this.executeForm.sortieNo = val.sortieNo
|
|
|
+ },
|
|
|
+
|
|
|
+ async changeModelType(type) {
|
|
|
+ try {
|
|
|
+ const {
|
|
|
+ data: { list }
|
|
|
+ } = await getModel({ type })
|
|
|
+ this.modelList = list
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
+
|
|
|
+ normalizer(node) {
|
|
|
+ if (node.children && !node.children.length) {
|
|
|
+ delete node.children
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ id: node.id,
|
|
|
+ label: node.name,
|
|
|
+ children: node.children
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
submit() {
|
|
|
switch (this.dialogTitle) {
|
|
|
case '编辑':
|
|
@@ -409,8 +475,9 @@ export default {
|
|
|
this.handleClose()
|
|
|
break
|
|
|
case '新增':
|
|
|
- this.addLifePredictionAPI()
|
|
|
- this.handleClose()
|
|
|
+ // this.addLifePredictionAPI()
|
|
|
+ // this.handleClose()
|
|
|
+ this.beginExecute()
|
|
|
break
|
|
|
}
|
|
|
},
|