|
@@ -44,13 +44,13 @@
|
|
|
<!-- 添加或修改产品树信息对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
- <el-form-item label="归属" prop="aircraftId" v-if="isAdd">
|
|
|
+ <!-- <el-form-item label="归属" prop="aircraftId" v-if="isAdd">
|
|
|
<el-select v-model="form.aircraftId" placeholder="请选择机号信息" style="width:100%">
|
|
|
<el-option v-for="item in aircraftOptions" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="归属" prop="parentId" v-else>
|
|
|
+ </el-select>user/profile
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="归属" prop="parentId" v-if="form.parentId !== 0">
|
|
|
<treeselect v-model="form.parentId" :options="productOptions" :normalizer="normalizer" placeholder="请选择父ID" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="名称" prop="name">
|
|
@@ -99,12 +99,12 @@ export default {
|
|
|
title: '',
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
- // 是否新增
|
|
|
- isAdd: true,
|
|
|
+ // // 是否新增
|
|
|
+ // isAdd: true,
|
|
|
// 是否展开,默认全部展开
|
|
|
isExpandAll: true,
|
|
|
- // 单机列表
|
|
|
- aircraftOptions: undefined,
|
|
|
+ // // 单机列表
|
|
|
+ // aircraftOptions: undefined,
|
|
|
// 重新渲染表格状态
|
|
|
refreshTable: true,
|
|
|
// 查询参数
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList()
|
|
|
- this.getAircraftList()
|
|
|
+ // this.getAircraftList()
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询产品树信息列表 */
|
|
@@ -140,11 +140,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
/** 查询单机信息列表 */
|
|
|
- getAircraftList() {
|
|
|
- aircraftListSelect(this.queryParams).then(response => {
|
|
|
- this.aircraftOptions = response.data
|
|
|
- })
|
|
|
- },
|
|
|
+ // getAircraftList() {
|
|
|
+ // aircraftListSelect(this.queryParams).then(response => {
|
|
|
+ // this.aircraftOptions = response.data
|
|
|
+ // })
|
|
|
+ // },
|
|
|
/** 转换产品树信息数据结构 */
|
|
|
normalizer(node) {
|
|
|
if (node.children && !node.children.length) {
|
|
@@ -160,9 +160,9 @@ export default {
|
|
|
getTreeselect() {
|
|
|
listProduct().then(response => {
|
|
|
this.productOptions = []
|
|
|
- const data = { id: 0, name: '顶级节点', children: [], isDisabled: true }
|
|
|
- data.children = this.handleTree(response.data, 'id', 'parentId')
|
|
|
- this.productOptions.push(data)
|
|
|
+ // const data = { id: 0, name: '顶级节点', children: [], isDisabled: true }
|
|
|
+ this.productOptions = this.handleTree(response.data, 'id')
|
|
|
+ // this.productOptions.push(data)
|
|
|
})
|
|
|
},
|
|
|
// 取消按钮
|
|
@@ -196,10 +196,10 @@ export default {
|
|
|
this.reset()
|
|
|
if (row != null && row.id) {
|
|
|
this.getTreeselect()
|
|
|
- this.isAdd = false
|
|
|
+ // this.isAdd = false
|
|
|
this.form.parentId = row.id
|
|
|
} else {
|
|
|
- this.isAdd = true
|
|
|
+ // this.isAdd = true
|
|
|
this.form.parentId = 0
|
|
|
}
|
|
|
this.open = true
|
|
@@ -223,7 +223,7 @@ export default {
|
|
|
this.form.snsId = row.snsId
|
|
|
this.form.parentId = row.parentId
|
|
|
this.form.id = row.id
|
|
|
- this.isAdd = true
|
|
|
+ // this.isAdd = true
|
|
|
this.open = true
|
|
|
return
|
|
|
}
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
}
|
|
|
getProduct(row.id).then(response => {
|
|
|
this.form = response.data
|
|
|
- this.isAdd = false
|
|
|
+ // this.isAdd = false
|
|
|
this.open = true
|
|
|
this.title = '修改产品树信息'
|
|
|
})
|