Browse Source

Merge branch 'master' into chart15.3

Karsa 1 year ago
parent
commit
72fadfdf0c

+ 1 - 1
config/dev.env.js

@@ -5,7 +5,7 @@ module.exports = merge(prodEnv, {
   NODE_ENV:'"development"',
   VUE_APP_API_ROOT:'"/adminapi"',  //
   Domain:'"brilliantstart.cn"',
-  Login:'"http://localhost:3030/login"',
+  // Login:'"http://localhost:3030/login"',
   CHART_LINK:'"https://charttest.hzinsights.com/chartshow"',
   SHEET_LINK:'"https://charttest.hzinsights.com/sheetshow"',
 	REPORT_SHARE_LINK:'"http://rddpweb.brilliantstart.cn"',

+ 1 - 1
config/prod.env.js

@@ -2,7 +2,7 @@ module.exports = {
 	NODE_ENV:'"production"',
 	VUE_APP_API_ROOT:'"https://hzeta.hzinsights.com/adminapi"',  //生产环境
 	Domain:'"hzinsights.com"',
-	Login:'"https://hzeta.hzinsights.com/login"',
+	// Login:'"https://hzeta.hzinsights.com/login"',
 	CHART_LINK:'"https://chartlib.hzinsights.com/chartshow"',
 	SHEET_LINK:'"https://chartlib.hzinsights.com/sheetshow"',
 	REPORT_SHARE_LINK:'"https://ficc.hzinsights.com"',

+ 1 - 2
config/prod.test.env.js

@@ -2,8 +2,7 @@ module.exports = {
 	NODE_ENV:'"test"',
 	VUE_APP_API_ROOT:'"http://8.136.199.33:7778/adminapi"',  //测试环境
 	Domain:'"brilliantstart.cn"',
-	// Login:'"http://rddpapi.brilliantstart.cn/login"',
-	Login:'"http://8.136.199.33:7778/login"',
+	// Login:'"http://8.136.199.33:7778/login"',
 	CHART_LINK:'"https://charttest.hzinsights.com/chartshow"',
 	SHEET_LINK:'"https://charttest.hzinsights.com/sheetshow"',
 	REPORT_SHARE_LINK:'"http://rddpweb.brilliantstart.cn"',

+ 2 - 1
src/api/http.js

@@ -56,7 +56,8 @@ function checkStatus(response) {
           showClose: false,
         })
         .then(() => {
-          window.location.href = process.env.Login;
+          window.location.href = window.location.origin + '/login';
+
         });
     }
     return res;

+ 1 - 1
src/main.js

@@ -138,7 +138,7 @@ router.beforeEach((to, from, next) => {
 
   let auth = localStorage.getItem("auth") || false;
   if (to.path != "/login" && !auth) {
-    window.location.href = process.env.Login;
+    window.location.href = window.location.origin + '/login';
     return false;
   }
 

+ 17 - 14
src/utils/svgToblob.js

@@ -15,20 +15,23 @@
       ctx.scale(ratio,ratio)
 
       callback && callback();
-      
-      canvas.toBlob(async(blob) => {
-        console.log('toblob')
-        console.log(blob)   
-        const data = [new ClipboardItem({ [blob.type]: blob })];
-        await navigator.clipboard.write(data).then(
-          () => {
-            bus.$message.success('复制成功!')
-          },
-          () => {
-            bus.$message.success('浏览器暂不支持')
-          }
-        );
-      })
+      if(window.ClipboardItem) {
+        canvas.toBlob(async(blob) => {
+          console.log('toblob')
+          console.log(blob)   
+          const data = [new ClipboardItem({ [blob.type]: blob })];
+          await navigator.clipboard.write(data).then(
+            () => {
+              bus.$message.success('复制成功!')
+            },
+            () => {
+              bus.$message.warning('浏览器暂不支持')
+            }
+          );
+        })
+      }else {
+        bus.$message.warning('浏览器暂不支持')
+      }
     }	
  
   }

+ 15 - 11
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -1872,17 +1872,21 @@ export const chartSetMixin = {
         }
         ctx.scale(zoomX,zoomY)
         ctx.drawImage(img, 0, 0); // 将canvas转为blob
-        canvas.toBlob(async (blob) => {
-          const data = [new ClipboardItem({ [blob.type]: blob })]; 
-          await navigator.clipboard.write(data).then(
-            () => {
-             this.$message.success('复制成功!')
-            },
-            () => {
-              this.$message.success('复制失败,稍后再试')
-            }
-          );
-        });
+        if(window.ClipboardItem) {
+          canvas.toBlob(async (blob) => {
+            const data = [new ClipboardItem({ [blob.type]: blob })]; 
+            await navigator.clipboard.write(data).then(
+              () => {
+               this.$message.success('复制成功!')
+              },
+              () => {
+                this.$message.warning('复制失败,稍后再试')
+              }
+            );
+          });
+        }else {
+          this.$message.warning('浏览器暂不支持')
+        }
       };
     },
 

+ 1 - 2
src/views/report_manage/cloudDisk.vue

@@ -88,8 +88,7 @@
           </el-table-column>
           <template slot="empty" >
             <div style="padding: 140px 0">
-              <img src="~@/assets/img/data_m/nodata-big.png" alt="" style="display:block;width:260px;height:220px;margin: 0 auto;">
-              <span style="font-size: 16px;color: #999999;">暂无文件</span>
+              <tableNoData text="暂无文件"/>
             </div>
           </template>
         </el-table>

+ 18 - 13
src/views/sandbox_manage/index.vue

@@ -521,19 +521,24 @@ export default {
         ctx.fillStyle="#fff";
         ctx.fillRect(0, 0, img.width, img.height);
         ctx.drawImage(img, 0, 0);
-        canvas.toBlob(async (blob) => {
-          const data = [new ClipboardItem({ [blob.type]: blob })]; 
-          await navigator.clipboard.write(data).then(
-            () => {
-             this.$message.success('复制成功!')
-            },
-            () => {
-              this.$message.success('复制失败,稍后再试')
-            }
-          ).finally(()=>{
-                        this.lockLoding && this.lockLoding.close();
-                    });
-        });
+        if(window.ClipboardItem) {
+          canvas.toBlob(async (blob) => {
+            const data = [new ClipboardItem({ [blob.type]: blob })]; 
+            await navigator.clipboard.write(data).then(
+              () => {
+               this.$message.success('复制成功!')
+              },
+              () => {
+                this.$message.warning('复制失败,稍后再试')
+              }
+            ).finally(()=>{
+                          this.lockLoding && this.lockLoding.close();
+                      });
+          });
+        }else {
+          this.lockLoding && this.lockLoding.close();
+          this.$message.warning('浏览器暂不支持')
+        }
       }
     }, 500),
     /* 排序 */

+ 26 - 21
src/views/sandbox_manage/sandFlow/index.vue

@@ -262,27 +262,32 @@ export default {
                 img.crossOrigin = "Anonymous";
                 img.src = svgToBase64(dataUri);
                 img.onload = ()=>{
-                canvas.width = img.width;
-                canvas.height = img.height;
-                console.log('width',img.width)
-                console.log('height',img.height)
-                ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
-                ctx.fillStyle="#fff";
-                ctx.fillRect(0, 0, img.width, img.height);
-                ctx.drawImage(img, 0, 0);
-                canvas.toBlob(async (blob) => {
-                    const data = [new ClipboardItem({ [blob.type]: blob })]; 
-                    await navigator.clipboard.write(data).then(
-                    () => {
-                        this.$message.success('复制成功!')
-                    },
-                    () => {
-                        this.$message.success('复制失败,稍后再试')
-                    }
-                    ).finally(()=>{
-                        this.lockLoding && this.lockLoding.close();
-                    });
-                });
+									canvas.width = img.width;
+									canvas.height = img.height;
+									console.log('width',img.width)
+									console.log('height',img.height)
+									ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
+									ctx.fillStyle="#fff";
+									ctx.fillRect(0, 0, img.width, img.height);
+									ctx.drawImage(img, 0, 0);
+									if(window.ClipboardItem) {
+										canvas.toBlob(async (blob) => {
+												const data = [new ClipboardItem({ [blob.type]: blob })]; 
+												await navigator.clipboard.write(data).then(
+												() => {
+														this.$message.success('复制成功!')
+												},
+												() => {
+														this.$message.warning('复制失败,稍后再试')
+												}
+												).finally(()=>{
+														this.lockLoding && this.lockLoding.close();
+												});
+										});
+									}else {
+										this.lockLoding && this.lockLoding.close();
+										this.$message.warning('浏览器暂不支持')
+									}	
                 }
 			},{
 				preserveDimensions:true,//让svg为实际图片大小

+ 1 - 1
src/views/semantics_manage/semantics/semanticsEditPage.vue

@@ -98,7 +98,7 @@
       </div>
     </div>
     <div class="semantics-content" v-if="compareFiles.length===0">
-      <p class="empty">暂无信息</p> 
+      <tableNoData text="暂无信息" class="empty"/>
     </div>
     <!-- 选择对比文档弹窗 -->
     <select-file-dialog