|
@@ -648,8 +648,8 @@
|
|
|
//点击元空间
|
|
|
checkSpace(e) {
|
|
|
// let item = tools.mouseInElement(this.view, e);
|
|
|
- // console.log(item)
|
|
|
let item = e ;
|
|
|
+
|
|
|
let items = this.mainScene.root.children;
|
|
|
//点击业务空间
|
|
|
if (
|
|
@@ -681,12 +681,10 @@
|
|
|
i.isBusiness = 6;
|
|
|
}
|
|
|
});
|
|
|
- //测试//////////
|
|
|
- // this.idList.push({
|
|
|
- // id: item.businessId,
|
|
|
- // name: item.businessName || item.name
|
|
|
- // });
|
|
|
- /////////////
|
|
|
+ this.idList.push({
|
|
|
+ id: item.businessId,
|
|
|
+ name: item.businessName || item.name
|
|
|
+ });
|
|
|
}
|
|
|
//点击没有业务空间的元空间
|
|
|
if (
|
|
@@ -694,7 +692,7 @@
|
|
|
(item.isBusiness == 4 || item.isBusiness == 1) &&
|
|
|
this.type != 5
|
|
|
) {
|
|
|
- // console.log("点击的是没有业务空间的元空间", item);
|
|
|
+ console.log("点击的是没有业务空间的元空间",this.type, item);
|
|
|
if (this.type == 4) {
|
|
|
this.idList = [];
|
|
|
items.map(i => {
|
|
@@ -702,18 +700,17 @@
|
|
|
i.isBusiness = 2;
|
|
|
} else if (i.isBusiness == 3) {
|
|
|
i.isBusiness = 1;
|
|
|
+ console.log(i)
|
|
|
}
|
|
|
});
|
|
|
// console.log("清空", this.idList);
|
|
|
}
|
|
|
this.type = 3;
|
|
|
item.isBusiness = 3;
|
|
|
- //////////测试
|
|
|
- // this.idList.push({
|
|
|
- // id: item.id,
|
|
|
- // name: item.businessName || item.name
|
|
|
- // });
|
|
|
- /////////////////
|
|
|
+ this.idList.push({
|
|
|
+ id: item.id,
|
|
|
+ name: item.businessName || item.name
|
|
|
+ });
|
|
|
}
|
|
|
//在重新编辑业务空间状态
|
|
|
if (
|
|
@@ -722,10 +719,10 @@
|
|
|
(item.isBusiness == 4 || item.isBusiness == 1)
|
|
|
) {
|
|
|
item.isBusiness = 3;
|
|
|
- // this.idList.push({
|
|
|
- // id: item.id,
|
|
|
- // name: item.businessName || item.name
|
|
|
- // });
|
|
|
+ this.idList.push({
|
|
|
+ id: item.id,
|
|
|
+ name: item.businessName || item.name
|
|
|
+ });
|
|
|
}
|
|
|
//在重新编辑时的提示
|
|
|
if (
|
|
@@ -734,19 +731,19 @@
|
|
|
) {
|
|
|
// console.log("44444");
|
|
|
item.isBusiness = 3;
|
|
|
- // this.idList.push({
|
|
|
- // id: item.id,
|
|
|
- // name: item.businessName || item.name,
|
|
|
- // parentId: item.businessId
|
|
|
- // });
|
|
|
+ this.idList.push({
|
|
|
+ id: item.id,
|
|
|
+ name: item.businessName || item.name,
|
|
|
+ parentId: item.businessId
|
|
|
+ });
|
|
|
}
|
|
|
if (item.isBusiness == 5) {
|
|
|
this.$message("该空间为业务空间,请勿点击");
|
|
|
};
|
|
|
// 点击之后对所有色块重新着色
|
|
|
items.forEach((a)=>{
|
|
|
- this.isBusinessToColor(item)
|
|
|
- })
|
|
|
+ this.isBusinessToColor(a)
|
|
|
+ });
|
|
|
},
|
|
|
//isbusiness转换相应的颜色
|
|
|
/**
|
|
@@ -754,28 +751,34 @@
|
|
|
*/
|
|
|
isBusinessToColor(item){
|
|
|
if (item.isBusiness == 1) {
|
|
|
- item.color = item.color || new SColor('#000');
|
|
|
- } else if (this.isBusiness == 2) {
|
|
|
+ item.color = item.cacheColor || new SColor('#000');
|
|
|
+ item.fillColor = SColor.White;
|
|
|
+ item.width = item.cacheWidth;
|
|
|
+ } else if (item.isBusiness == 2) {
|
|
|
//已有id 的业务空间
|
|
|
- item.color = item.color || new SColor('#000');
|
|
|
- item.fillColor = item.fillColor || new SColor('#fff')
|
|
|
- } else if (this.isBusiness == 3) {
|
|
|
+ item.color = item.cacheColor || new SColor('#000');
|
|
|
+ item.fillColor =item.cacheFillColor || new SColor('#fff');
|
|
|
+ item.width = item.cacheWidth;
|
|
|
+ } else if (item.isBusiness == 3) {
|
|
|
//被选择的元空间
|
|
|
- item.color = item.color || new SColor('#000');
|
|
|
+ item.color = item.cacheColor|| new SColor('#000');
|
|
|
item.width = 800;
|
|
|
item.fillColor =new SColor('#1abc9c')
|
|
|
} else if (item.isBusiness == 4) {
|
|
|
item.color = new SColor(251,226,1,.8) || new SColor('#000');
|
|
|
- item.fillColor = item.fillColor || new SColor('#fff');
|
|
|
+ item.fillColor = item.cacheFillColor || new SColor('#fff');
|
|
|
+ item.width = item.cacheWidth;
|
|
|
} else if (item.isBusiness == 5) {
|
|
|
+ item.width = item.cacheWidth;
|
|
|
item.fillColor = new SColor(11,12,12,.2) || new SColor('#fff')
|
|
|
} else if (item.isBusiness == 6) {
|
|
|
item.color = new SColor(68,161,140,.4) || new SColor('#000');
|
|
|
item.width = 800;
|
|
|
item.fillColor =new SColor('#1abc9c');
|
|
|
} else if (item.isBusiness == 7) {
|
|
|
- item.color = item.color || new SColor('#000')
|
|
|
- item.fillColor = item.fillColor || new SColor('#fff')
|
|
|
+ item.width = item.cacheWidth;
|
|
|
+ item.color = item.cacheColor || new SColor('#000');
|
|
|
+ item.fillColor = item.cacheFillColor || new SColor('#fff');
|
|
|
}
|
|
|
},
|
|
|
/** 搜索 ------------------------------------------------------------------------------ */
|
|
@@ -896,6 +899,8 @@
|
|
|
canvas.businessId = item.id;
|
|
|
canvas.businessName = item.name;
|
|
|
canvas.fillColor = new SColor(colorArr[index % 10]);
|
|
|
+ canvas.cacheFillColor = canvas.fillColor;
|
|
|
+ canvas.cacheColor = canvas.color;
|
|
|
canvas.isBusiness = 2;
|
|
|
//判断相邻代码
|
|
|
if (!item.isAbut) {
|