11wqe1 5 months ago
parent
commit
d0403991bf

+ 6 - 6
src/components/pages/components/exjsmind.vue

@@ -71,15 +71,15 @@ export default {
 
       let elements = this.$refs.jsm.getElementsByClassName("jsmind-inner")[0];
 
-      // let sw = (700 / jm.view.size.w).toFixed(2);
+      let sw = (700 / jm.view.size.w).toFixed(2);
 
 
-      elements.style.height = `${jm.view.size.h}px`;
-      // elements.style.width = `${jm.view.size.w * sw}px`;
+      elements.style.height = `${jm.view.size.h * sw}px`;
+      elements.style.width = `${jm.view.size.w * sw}px`;
 
-      // jm.view.minZoom = sw; //
-      // jm.view.setZoom(jm.view.minZoom); // 应用最小缩放级别
-      // jm.view.show(); // 重绘思维导图以应用缩放变化
+      jm.view.minZoom = sw; 
+      jm.view.setZoom(jm.view.minZoom); // 应用最小缩放级别
+      jm.view.show(); // 重绘思维导图以应用缩放变化
     }
   },
 };

+ 7 - 1
src/components/pages/components/exportDataDialog.vue

@@ -1990,10 +1990,16 @@ export default {
       data4Copy.forEach(e => {
         e.tarD = JSON.parse(e.rate);
       });
+      console.log('tar',JSON.parse(JSON.stringify(tar)));
+      console.log('data4Copy',JSON.parse(JSON.stringify(data4Copy)));
+
+      
       tar.forEach((k, ki) => {
         data4Copy.forEach((e, ei) => {
           if (ki == e.task) {
-            k[e.tool ? e.tool : 0].rate = e.tarD;
+            if (k[e.tool ? e.tool : 0] && k[e.tool ? e.tool : 0].rate) {
+              k[e.tool ? e.tool : 0].rate = e.tarD;
+            }
           }
         });
       });