|
@@ -21,13 +21,26 @@
|
|
|
<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="60%" :before-close="handleClose">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="编目" prop="aircraftId">
|
|
|
<el-select v-model="form.aircraftId" placeholder="请选择编目" @change="changeAircraftId(form.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="sortieNo">
|
|
|
+ <LTable
|
|
|
+ ref="sortieNoTableRef"
|
|
|
+ :defaultFetch="false"
|
|
|
+ :fetch="sortieNoFetch"
|
|
|
+ @selection-change="sortieNoSelection"
|
|
|
+ class="single-select-table"
|
|
|
+ :columns="sortieNoColumns"
|
|
|
+ :dataSource="sortieNoList"
|
|
|
+ :options="sortieNoOptions"
|
|
|
+ :pagination="SortieNoTableRequset"
|
|
|
+ ></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" />
|
|
|
</el-form-item>
|
|
@@ -41,8 +54,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="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>
|
|
@@ -62,6 +75,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'
|
|
|
|
|
|
export default {
|
|
|
name: 'LifePrediction',
|
|
@@ -125,17 +139,13 @@ export default {
|
|
|
prop: 'status',
|
|
|
label: '状态'
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'resultContent',
|
|
|
- label: '结果'
|
|
|
- },
|
|
|
{
|
|
|
button: true,
|
|
|
label: '操作',
|
|
|
width: '240px',
|
|
|
group: [
|
|
|
{
|
|
|
- name: '查看',
|
|
|
+ name: '查看结果',
|
|
|
type: 'text',
|
|
|
round: false,
|
|
|
plain: false,
|
|
@@ -172,6 +182,44 @@ export default {
|
|
|
pageSize: 10,
|
|
|
searchValue: ''
|
|
|
},
|
|
|
+ sortieNoColumns: [
|
|
|
+ {
|
|
|
+ prop: 'sortieNo',
|
|
|
+ label: '架次号'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'source',
|
|
|
+ label: '数据来源',
|
|
|
+ render: (h, params) => {
|
|
|
+ if (params.row.source == 1) {
|
|
|
+ return h('span', { class: 'success-state' }, '飞参数据')
|
|
|
+ } else {
|
|
|
+ return h('span', { class: 'success-state' }, 'MDC数据')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ossId',
|
|
|
+ label: '文件Id'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ sortieNoOptions: {
|
|
|
+ stripe: true, // 斑马纹
|
|
|
+ mutiSelect: true, // 多选框
|
|
|
+ index: true, // 显示序号, 多选则 mutiSelect
|
|
|
+ loading: false, // 表格动画
|
|
|
+ initTable: false, // 是否一挂载就加载数据
|
|
|
+ border: true,
|
|
|
+ height: '250px'
|
|
|
+ },
|
|
|
+ SortieNoTableRequset: {
|
|
|
+ total: 0,
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ searchValue: ''
|
|
|
+ },
|
|
|
+ sortieNoList: [],
|
|
|
+ sortieNoCheckItems: [],
|
|
|
form: {
|
|
|
id: '',
|
|
|
aircraftId: '',
|
|
@@ -182,12 +230,23 @@ export default {
|
|
|
model: '',
|
|
|
methodType: '',
|
|
|
status: '',
|
|
|
- resultContent: ''
|
|
|
+ resultContent: '',
|
|
|
+ ossIds: []
|
|
|
},
|
|
|
debounceFn: debounce(this.fetch, 500),
|
|
|
aircaftCatalogAll: [],
|
|
|
percentage: 0,
|
|
|
- partsData: []
|
|
|
+ partsData: [],
|
|
|
+ // executeForm: {
|
|
|
+ // sortieNo: '',
|
|
|
+ // aircraftId: '',
|
|
|
+ // partId: ''
|
|
|
+ // },
|
|
|
+ rules: {
|
|
|
+ aircraftId: [{ required: true, message: '编目不能为空', trigger: 'change' }],
|
|
|
+ partId: [{ required: true, message: '部件不能为空', trigger: 'change' }]
|
|
|
+ },
|
|
|
+ resultUrl: ''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -266,6 +325,28 @@ export default {
|
|
|
this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
|
|
|
},
|
|
|
|
|
|
+ sortieNoFetch() {
|
|
|
+ this.getAirDataAPI({ aircraftId: this.currentNode.id })
|
|
|
+ },
|
|
|
+
|
|
|
+ async sortieNoSelection(val) {
|
|
|
+ this.sortieNoCheckItems = val
|
|
|
+ },
|
|
|
+
|
|
|
+ async getAirDataAPI(params) {
|
|
|
+ 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
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
+
|
|
|
async searchClick() {
|
|
|
this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList, name: this.keyWordData })
|
|
|
},
|
|
@@ -282,7 +363,9 @@ export default {
|
|
|
|
|
|
openDialog() {
|
|
|
const aircraftType = this.currentNode.parentId
|
|
|
+ this.form.aircraftId = this.currentNode.id
|
|
|
this.getAirConfigurationAPI({ aircraftType })
|
|
|
+ this.getAirDataAPI({ aircraftId: this.currentNode.id })
|
|
|
this.dialogTitle = '新增'
|
|
|
this.dialogVisible = true
|
|
|
},
|
|
@@ -311,14 +394,27 @@ export default {
|
|
|
model: '',
|
|
|
methodType: '',
|
|
|
status: '',
|
|
|
- resultContent: ''
|
|
|
+ resultContent: '',
|
|
|
+ ossIds: []
|
|
|
}
|
|
|
},
|
|
|
checkResult(row) {
|
|
|
// this.form = deepClone(row)
|
|
|
+ this.resultUrl = 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',
|
|
|
+ message: '请选择架次号!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.progressVisible = true
|
|
|
|
|
|
let myTimer = setInterval(() => {
|
|
@@ -363,13 +459,17 @@ export default {
|
|
|
},
|
|
|
|
|
|
submit() {
|
|
|
- switch (this.dialogTitle) {
|
|
|
- case '编辑':
|
|
|
- break
|
|
|
- case '新增':
|
|
|
- this.beginExecute()
|
|
|
- break
|
|
|
- }
|
|
|
+ this.$refs['form'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ switch (this.dialogTitle) {
|
|
|
+ case '编辑':
|
|
|
+ break
|
|
|
+ case '新增':
|
|
|
+ this.beginExecute()
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
selection(val) {
|