|
@@ -612,35 +612,7 @@ export default {
|
|
|
// })
|
|
|
// }
|
|
|
// },
|
|
|
- geTreeData(){
|
|
|
- this.treeLoad = true;
|
|
|
- if(this.globaltype===1&&this.elementType){
|
|
|
- tabTypeLazyTreeAll({parentId:12345678910,current:1,size:1000}).then((res)=>{
|
|
|
- this.treeLoad = false;
|
|
|
- this.treeData = res.data.data.records;
|
|
|
- // this.defaultExpanded = [this.nodeid];
|
|
|
- })
|
|
|
- }else{
|
|
|
- tabTypeLazyTree({parentId:12345678910,projectId:this.projectId,pcurrent:1,size:1000}).then((res)=>{
|
|
|
- this.treeLoad = false;
|
|
|
- this.treeData = res.data.data.records;
|
|
|
- // this.defaultExpanded = [this.nodeid];
|
|
|
- })
|
|
|
- }
|
|
|
- // if(this.pid){
|
|
|
- // findProjectTree(this.pid, this.wbsid).then((res) => {
|
|
|
- // this.treeLoad = false;
|
|
|
- // this.treeData = res.data.data;
|
|
|
- // this.defaultExpanded = [this.nodeid];
|
|
|
- // })
|
|
|
- // }else{
|
|
|
- // getAlltree(this.userInfo.tenant_id, 1, this.wbsid).then((res) => {
|
|
|
- // this.treeLoad = false;
|
|
|
- // this.treeData = res.data.data;
|
|
|
- // this.defaultExpanded = [this.nodeid];
|
|
|
- // })
|
|
|
- // }
|
|
|
- },
|
|
|
+
|
|
|
//#region 接口
|
|
|
async tabTypeLazyTree (parentId, projectId,current,size,titleName) {//清表树
|
|
|
const { data: res } = await tabTypeLazyTree({ parentId, projectId,current,size,titleName })
|
|
@@ -652,12 +624,13 @@ export default {
|
|
|
|
|
|
//懒加载树
|
|
|
loadNode(node, resolve) {
|
|
|
-
|
|
|
+ console.log(this.elementType);
|
|
|
+ console.log(this.globaltype,'globaltype');
|
|
|
let parentId = 12345678910;
|
|
|
if (node.level != 0) {
|
|
|
parentId = node.data.id;
|
|
|
}
|
|
|
- if(this.globaltype===1&&this.elementType){
|
|
|
+ if(this.globaltype===1&&!this.elementType){
|
|
|
|
|
|
tabTypeLazyTreeAll({parentId,current:1,size:1000}).then((res) => {
|
|
|
let arr = [];
|
|
@@ -666,7 +639,7 @@ export default {
|
|
|
}
|
|
|
return resolve(arr);
|
|
|
});
|
|
|
- }else{
|
|
|
+ }else if(this.globaltype===1&&this.elementType){
|
|
|
|
|
|
tabTypeLazyTree({parentId,projectId:this.projectid,pcurrent:1,size:1000}).then((res) => {
|
|
|
let arr = [];
|
|
@@ -675,13 +648,7 @@ export default {
|
|
|
}
|
|
|
return resolve(arr);
|
|
|
});
|
|
|
- // tabTypeLazyTreeAll({parentId,current:1,size:1000}).then((res) => {
|
|
|
- // let arr = [];
|
|
|
- // if (Array.isArray(res.data.data.records)) {
|
|
|
- // arr = res.data.data.records;
|
|
|
- // }
|
|
|
- // return resolve(arr);
|
|
|
- // });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -1447,7 +1414,7 @@ export default {
|
|
|
onLoad(page, params = {}){
|
|
|
if(this.treeId){
|
|
|
this.eleListable=true;
|
|
|
- if(this.elementType){
|
|
|
+ if(!this.elementType){
|
|
|
this.tabTypeLazyTreeAll(this.treeId, this.page.current,1000,this.input3).then((res)=>{
|
|
|
this.eleList=res.records
|
|
|
this.page.total=res.total
|