|
@@ -163,7 +163,7 @@
|
|
|
|
|
|
<script >
|
|
<script >
|
|
import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
-import { getLazyTree,add,getDetail,getChildList,updateNode,removeNode,getSameList,sortNode,getEngineeringTypeName } from "@/api/measure/template.js";
|
|
|
|
|
|
+import { getLazyTree,add,getDetail,getChildList,updateNode,removeNode,getSameList,sortNode,getEngineeringTypeName,getNodeTypeList } from "@/api/measure/template.js";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
import {isObjectEmpty} from "@/util/util";
|
|
import {isObjectEmpty} from "@/util/util";
|
|
|
|
|
|
@@ -244,16 +244,14 @@ import {isObjectEmpty} from "@/util/util";
|
|
init(){
|
|
init(){
|
|
const {id} = this.$route.query;
|
|
const {id} = this.$route.query;
|
|
this.id = id
|
|
this.id = id
|
|
- this.getNodeTypelist()
|
|
|
|
|
|
+ // this.getNodeTypelist(id)
|
|
},
|
|
},
|
|
//获取节点类型
|
|
//获取节点类型
|
|
- getNodeTypelist () {
|
|
|
|
|
|
+ getNodeTypelist (id) {
|
|
if (this.dataTypeList.length > 1) {
|
|
if (this.dataTypeList.length > 1) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- getDictionary({
|
|
|
|
- code: 'meter_node_type'
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
+ getNodeTypeList({id}).then((res) => {
|
|
res.data.data.forEach(element => {
|
|
res.data.data.forEach(element => {
|
|
element.dictKey = Number(element.dictKey)
|
|
element.dictKey = Number(element.dictKey)
|
|
});
|
|
});
|
|
@@ -327,6 +325,7 @@ import {isObjectEmpty} from "@/util/util";
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
if(item.key==='add'){
|
|
if(item.key==='add'){
|
|
console.log('新增');
|
|
console.log('新增');
|
|
|
|
+ this.getNodeTypelist(data.id)
|
|
this.menuKey='add'
|
|
this.menuKey='add'
|
|
this.adddialogVisible=true
|
|
this.adddialogVisible=true
|
|
this.getEngineeringTypeNameById(data.id)
|
|
this.getEngineeringTypeNameById(data.id)
|
|
@@ -336,6 +335,7 @@ import {isObjectEmpty} from "@/util/util";
|
|
|
|
|
|
else if(item.key==='edit'){
|
|
else if(item.key==='edit'){
|
|
console.log('编辑',data,node);
|
|
console.log('编辑',data,node);
|
|
|
|
+ this.getNodeTypelist(data.id)
|
|
this.menuKey='edit'
|
|
this.menuKey='edit'
|
|
this.adddialogVisible=true
|
|
this.adddialogVisible=true
|
|
this.editNodeHandle()
|
|
this.editNodeHandle()
|
|
@@ -422,6 +422,7 @@ import {isObjectEmpty} from "@/util/util";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getNodeDetail (data, node) {
|
|
getNodeDetail (data, node) {
|
|
|
|
+ this.getNodeTypelist(data.id)
|
|
let parentName = '';
|
|
let parentName = '';
|
|
if (node.parent.data) {
|
|
if (node.parent.data) {
|
|
parentName = node.parent.data.title;
|
|
parentName = node.parent.data.title;
|