tyler пре 2 година
родитељ
комит
4c23642575
2 измењених фајлова са 26 додато и 25 уклоњено
  1. 21 21
      .env.staging
  2. 5 4
      src/components/TreeChart/index.vue

+ 21 - 21
.env.staging

@@ -11,30 +11,30 @@ VUE_APP_ACCESS_TOKEN_PREFIX='Bearer '
 
 # mips
 # api请求地址
-#VUE_APP_BASE_API='http://16.163.228.151:8042'
-## 文件下载地址
-#VUE_APP_BASE_DO_API='http://16.163.228.151:8042'
-## CDN文件地址
-#VUE_APP_CDN_API='http://16.163.228.151:8042'
-## 区域js文件地址
-#VUE_APP_SYSTEM_JS='http://ng-upload.elken.com'
-## 结算页面地址
-#VUE_APP_BASE_WEBSITE='http://16.163.228.151:8042'
-## 会员页面地址
-#VUE_APP_FRONTEND_WEBSITE='http://16.163.228.151:8045'
-
-
-# test
-# api请求地址
-VUE_APP_BASE_API='http://16.163.228.151:8020'
+VUE_APP_BASE_API='http://16.163.228.151:8042'
 # 文件下载地址
-VUE_APP_BASE_DO_API='http://16.163.228.151:8020'
+VUE_APP_BASE_DO_API='http://16.163.228.151:8042'
 # CDN文件地址
-VUE_APP_CDN_API='http://16.163.228.151:8021'
+VUE_APP_CDN_API='http://16.163.228.151:8042'
 # 区域js文件地址
-VUE_APP_SYSTEM_JS='http://16.163.228.151:8021'
+VUE_APP_SYSTEM_JS='http://ng-upload.elken.com'
 # 结算页面地址
-VUE_APP_BASE_WEBSITE='http://16.163.228.151:8019'
+VUE_APP_BASE_WEBSITE='http://16.163.228.151:8042'
 # 会员页面地址
-VUE_APP_FRONTEND_WEBSITE='http://16.163.228.151:8017'
+VUE_APP_FRONTEND_WEBSITE='http://16.163.228.151:8045'
+
+
+# test
+# # api请求地址
+# VUE_APP_BASE_API='http://16.163.228.151:8020'
+# # 文件下载地址
+# VUE_APP_BASE_DO_API='http://16.163.228.151:8020'
+# # CDN文件地址
+# VUE_APP_CDN_API='http://16.163.228.151:8021'
+# # 区域js文件地址
+# VUE_APP_SYSTEM_JS='http://16.163.228.151:8021'
+# # 结算页面地址
+# VUE_APP_BASE_WEBSITE='http://16.163.228.151:8019'
+# # 会员页面地址
+# VUE_APP_FRONTEND_WEBSITE='http://16.163.228.151:8017'
 

+ 5 - 4
src/components/TreeChart/index.vue

@@ -402,6 +402,7 @@ export default {
       let elesArr = Array.from(
         new Set(this.myChart._chartsViews[0]._data._graphicEls)
       );
+      console.log(elesArr.length)
       let dep = this.myChart._chartsViews[0]._data.tree.root.height; //获取树高
       console.log(dep);
       let layer_height = 90; //层级之间的高度
@@ -413,19 +414,19 @@ export default {
       let newWidth = Math.max(currentWidth, layer_width);
       console.log(newWidth);
       if (newWidth < 200) {
-        this.center[0] = '-70%';
+        this.center[0] = '-60%';
         this.center[1] = (dep * 2) + '0%';
 
       }else if (newWidth > 200 && newWidth < 500) {
-        this.center[0] = '-50%';
+        this.center[0] = '-56%';
         this.center[1] = (dep * 1.5) + '0%';
 
       }else if (newWidth > 500 && newWidth < 1000) {
-        this.center[0] = '-10%';
+        this.center[0] = '-20%';
         this.center[1] = (dep) + '0%';
 
       } else if (newWidth > 1000){
-        this.center[0] = this.center[0] = elesArr.length > 60 ? newWidth * 1.2 : newWidth * 0.6;
+        this.center[0] = elesArr.length > 60 ? newWidth * 1.5 : newWidth * 1.2;
         this.center[1] = (dep ) + '0%';
       }
       this.chartWidth = newWidth;