|
@@ -7,7 +7,8 @@
|
|
|
<div class="view-dataSpecies-right">
|
|
|
<div class="view-dataType-title">
|
|
|
<div class="view-dataType-title-btn">
|
|
|
- <el-button type="success" @click="openDialog()" :disabled="currentConfigNodeKey === ''">新增</el-button>
|
|
|
+ <!-- <el-button type="success" @click="openDialog()" :disabled="currentConfigNodeKey === ''">新增</el-button> -->
|
|
|
+ <el-button type="success" @click="openDialog()" :disabled="!(currentNode.type == 2) || currentConfigNodeKey == ''">新增</el-button>
|
|
|
<el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
|
|
|
<el-dropdown split-button type="primary" style="margin-left: 10px" trigger="click" @command="handleExport">
|
|
|
更多
|
|
@@ -55,9 +56,9 @@
|
|
|
<el-input v-model="form.componentNum" placeholder="请输入部件编码" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="出厂日期" prop="factoryDate">
|
|
|
- <el-date-picker clearable v-model="form.factoryDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择出厂日期"></el-date-picker>
|
|
|
+ <el-date-picker placement="bottom-start" clearable v-model="form.factoryDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择出厂日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="当前安装飞机" prop="currentInstallAircraft">
|
|
|
+ <el-form-item label="当前安装飞机" label-width="110px" prop="currentInstallAircraft">
|
|
|
<el-input v-model="form.currentInstallAircraft" placeholder="请输入当前安装飞机" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工作时次" prop="workTime">
|
|
@@ -366,7 +367,7 @@ export default {
|
|
|
data: { list, totalCount }
|
|
|
} = await getLifetimeSpareParts({ pageSize, pageNum: pageIndex, keyWord, ...params })
|
|
|
this.tableData = list
|
|
|
- this.tableRequset.total = total
|
|
|
+ this.tableRequset.total = totalCount
|
|
|
},
|
|
|
|
|
|
fetch() {
|
|
@@ -418,16 +419,18 @@ export default {
|
|
|
// this.$refs.table.clearSelection()
|
|
|
this.currentAirId = this.form.airId = data.id
|
|
|
this.currentAirModelId = this.form.airModelId = data.parentId
|
|
|
- // this.currentNode = data
|
|
|
+ this.currentNode = data
|
|
|
// this.form.aircraftType = data.label
|
|
|
// this.getAirInstallAPI(this.currentNodeKey)
|
|
|
let dataTree = []
|
|
|
- if (data.type === 1) {
|
|
|
- const { data: data1 } = await getAirConfiguration({ aircraftType: data.id })
|
|
|
- dataTree = data1
|
|
|
- } else if (data.type === 2) {
|
|
|
+ if (data.type === 2) {
|
|
|
const { data: data1 } = await getAirConfiguration({ aircraftType: data.parentId })
|
|
|
dataTree = data1
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择飞机编目!'
|
|
|
+ })
|
|
|
}
|
|
|
this.configAll = dataTree
|
|
|
this.configTreeData = []
|
|
@@ -435,9 +438,6 @@ export default {
|
|
|
// topNode.children = data1
|
|
|
topNode.children = handleTree(dataTree, 'id')
|
|
|
this.configTreeData.push(topNode)
|
|
|
- console.log(this.aircaftModelAll)
|
|
|
- console.log(this.aircaftCatalogAll)
|
|
|
- console.log(this.configAll)
|
|
|
},
|
|
|
|
|
|
treeConfigNodeClick(data) {
|