|
@@ -120,25 +120,24 @@ export default {
|
|
|
|
|
|
let areaId = value[value.length - 1];
|
|
|
this.mountform.areaId = areaId
|
|
|
- let areaTree = this.areaTree;
|
|
|
- this.mountform.areaName = findName(areaId);
|
|
|
-
|
|
|
- function findName(id) {
|
|
|
- let nodeName = undefined;
|
|
|
- loopFind(areaTree);
|
|
|
- function loopFind(tree) {
|
|
|
- tree.forEach(item => {
|
|
|
- if (item.id == id) {
|
|
|
- nodeName = item.nodeName;
|
|
|
- } else if (item.childs) {
|
|
|
- loopFind(item.childs);
|
|
|
- } else {
|
|
|
- return;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- return nodeName;
|
|
|
- }
|
|
|
+ // let areaTree = this.areaTree;
|
|
|
+ // this.mountform.areaName = findName(areaId);
|
|
|
+ // function findName(id) {
|
|
|
+ // let nodeName = undefined;
|
|
|
+ // loopFind(areaTree);
|
|
|
+ // function loopFind(tree) {
|
|
|
+ // tree.forEach(item => {
|
|
|
+ // if (item.id == id) {
|
|
|
+ // nodeName = item.nodeName;
|
|
|
+ // } else if (item.childs) {
|
|
|
+ // loopFind(item.childs);
|
|
|
+ // } else {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // return nodeName;
|
|
|
+ // }
|
|
|
},
|
|
|
//确认
|
|
|
confirm(formName) {
|
|
@@ -160,7 +159,7 @@ export default {
|
|
|
// 请求 挂载设备
|
|
|
getMountDevice(data) {
|
|
|
data.id = this.rowData.id
|
|
|
- data.categoryId = this.rowData.categoryId
|
|
|
+ // data.categoryId = this.rowData.categoryId
|
|
|
this.fetch({
|
|
|
api: "/device/device/mount",
|
|
|
method: "POST",
|