zhangy 2 lat temu
rodzic
commit
bedc62fd73

+ 17 - 120
src/views/energyOperationSupport/components/securitys/pic1.vue

@@ -180,7 +180,7 @@
           },
           },
           option: {
           option: {
             title: {
             title: {
-              text: '集团应急管理体系'
+              text: '典型事故应急"四步"管控体系'
             },
             },
             tooltip: {
             tooltip: {
               trigger: 'item',
               trigger: 'item',
@@ -302,7 +302,7 @@
           },
           },
           layout: {
           layout: {
             type: 'mindmap',
             type: 'mindmap',
-            direction: 'TB',
+            direction: 'H',
             getHeight: function getHeight() {
             getHeight: function getHeight() {
               return 16;
               return 16;
             },
             },
@@ -313,7 +313,7 @@
               return 20;
               return 20;
             },
             },
             getHGap: function getHGap() {
             getHGap: function getHGap() {
-              return 130;
+              return 120;
             },
             },
           },
           },
           modes: {
           modes: {
@@ -333,14 +333,14 @@
           },
           },
           // plugins: [menu],
           // plugins: [menu],
           fitView: true,
           fitView: true,
-          fitViewPadding: [140,40,20,40],
+          fitViewPadding: 80,
         });
         });
         // graph.data(vm.chart.option.series[0].data[0]);
         // graph.data(vm.chart.option.series[0].data[0]);
         // gragh.render();
         // gragh.render();
         graph.read({
         graph.read({
           ...vm.chart.option.series[0].data[0]
           ...vm.chart.option.series[0].data[0]
         });
         });
-        graph.fitView([140,40,20,40]);
+        graph.fitView(80);
         this.graph = graph;
         this.graph = graph;
         this.bindEvents();
         this.bindEvents();
       },
       },
@@ -376,7 +376,7 @@
             model.collapsed = !model.collapsed;
             model.collapsed = !model.collapsed;
             this.graph.updateItem(e.item, model);
             this.graph.updateItem(e.item, model);
             this.graph.layout();
             this.graph.layout();
-            this.graph.fitView([140,40,20,40]);
+            this.graph.fitView(80);;
           } else {
           } else {
             if (model.value) {
             if (model.value) {
               let args = {
               let args = {
@@ -398,7 +398,7 @@
               // 查找所有的节点路径
               // 查找所有的节点路径
               this.getParentNodes(this.chart.option.series[0].data[0], model.id);
               this.getParentNodes(this.chart.option.series[0].data[0], model.id);
               this.graph.changeData(JSON.parse(JSON.stringify(model)));
               this.graph.changeData(JSON.parse(JSON.stringify(model)));
-              this.graph.fitView([140,40,20,40]);
+              this.graph.fitView(80);
             }
             }
           }
           }
           e.item.toFront();
           e.item.toFront();
@@ -467,9 +467,8 @@
         } else {
         } else {
           // this.chart.option.title.text = node.label;
           // this.chart.option.title.text = node.label;
         }
         }
-        node.collapsed = false;
         this.graph.changeData(JSON.parse(JSON.stringify(node)));
         this.graph.changeData(JSON.parse(JSON.stringify(node)));
-        this.graph.fitView([140,40,20,40]);
+        this.graph.fitView(80);;
       },
       },
       getFileTreeData() {
       getFileTreeData() {
         let that = this,
         let that = this,
@@ -487,14 +486,15 @@
             if (res.code === '0') {
             if (res.code === '0') {
               let arr = [];
               let arr = [];
               // that.chart.height = res.data.length * 100 + 'px';
               // that.chart.height = res.data.length * 100 + 'px';
-              arr = that.treeDataUtil1(res.data, '1');
-              console.log(arr);
+              arr = that.treeDataUtil(res.data, '');
               // arr = that.getParentNodes(res.data, 1)
               // arr = that.getParentNodes(res.data, 1)
-              arr[0].style = {
-                fill: '#f79646'
+              arr[0].labelCfg = {
+                style: {
+                  fontSize: 30,
+                },
               };
               };
               arr[0].id = '1';
               arr[0].id = '1';
-              arr[0].collapsed = false;
+              arr[0].collapsed = false,
                 that.chart.option.series[0].data = arr;
                 that.chart.option.series[0].data = arr;
               // that.setGraphical();
               // that.setGraphical();
               that.createGraphic();
               that.createGraphic();
@@ -516,27 +516,6 @@
         let j = 0;
         let j = 0;
         let g = 0;
         let g = 0;
         let name = '';
         let name = '';
-        let style = {};
-        let labelCfg = {};
-        switch (id.toString().split("-").length) {
-          case 1:
-          style = {
-            fill: '#e6b9b8',
-          };
-          break;
-          case 2:
-          style = {
-            fill: '#ffff66',
-          };
-          break;
-          case 3:
-          style = {
-            fill: '#d9d9d9',
-          };
-          break;
-          default:
-          break;
-        };
         for (let item of treeData) {
         for (let item of treeData) {
           i++;
           i++;
           if (item.fileName === null) {
           if (item.fileName === null) {
@@ -554,8 +533,6 @@
               nodeType: 'node',
               nodeType: 'node',
               label: item.createMan,
               label: item.createMan,
               children: children,
               children: children,
-              style: style,
-              labelCfg: labelCfg,
             });
             });
             children = [];
             children = [];
           } else {
           } else {
@@ -573,8 +550,6 @@
                 isCollapsed: true,
                 isCollapsed: true,
                 label: name,
                 label: name,
                 children: children1,
                 children: children1,
-                style: style,
-                labelCfg: labelCfg,
               });
               });
               j = 0;
               j = 0;
               children1 = [];
               children1 = [];
@@ -600,8 +575,6 @@
               isCollapsed: true,
               isCollapsed: true,
               label: name,
               label: name,
               children: children1,
               children: children1,
-              style: style,
-              labelCfg: labelCfg,
             });
             });
           }
           }
         }
         }
@@ -751,87 +724,13 @@
           that.loading = false;
           that.loading = false;
         })
         })
       },
       },
-      treeDataUtil1(treeData, id) {
-        let that = this;
-        let data = [];
-        let children = [];
-        let children1 = [];
-        let i = 0;
-        let k = 0;
-        let j = 0;
-        let g = 0;
-        let name = '';
-        let style = {};
-        let labelCfg = {};
-        switch (id.toString().split("-").length) {
-          case 2:
-          style = {
-            fill: '#e6b9b8',
-          };
-          break;
-          case 3:
-          style = {
-            fill: '#ffff66',
-          };
-          break;
-          case 4:
-          style = {
-            fill: '#d9d9d9',
-          };
-          break;
-          default:
-          break;
-        };
-        for (let item of treeData) {
-          i++;
-          if(item.children !== null) {
-            if(id === ''){
-              children = that.treeDataUtil1(item.children,i);
-            } else{
-              children = that.treeDataUtil1(item.children,id+'-'+ i);
-            }
-            name = item.createMan;
-          }
-          if(name===''){
-            name = item.createMan;
-          }
-          if(item.fileName != null && item.createMan === name) {
-            g++;
-            children.push({
-              id: id + '-' + i + '-' + (children.length+1),
-              label: item.fileName,
-              value: item.fileUrl,
-              children: [],
-            });
-          }
-          if( i < treeData.length-1 && treeData[i].createMan === name){
-            continue;
-          }
-            data.push({
-                collapsed: true,
-                id: id + '-' + i,
-                nodeType: 'node',
-                isCollapsed: true,
-                label: item.createMan,
-                children: children,
-                style: style,
-                labelCfg: labelCfg,
-              });
-            children = [];
-            name = '';
-        }
-        for (let ch of data) {
-          ch.id = ch.id.slice(2);
-        }
-        return data;
-      },
     },
     },
   };
   };
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
   .root {
   .root {
-    background: url(../../../../assets/img/img/filebg8.jpg) center bottom no-repeat;
+    background: linear-gradient(rgba(0,0,0,0), rgba(173, 173, 173, 0.6)), url(../../../../assets/img/img/filebg7.png) center bottom no-repeat;
     background-size: 100% 100%;
     background-size: 100% 100%;
   }
   }
 
 
@@ -881,15 +780,13 @@
   }
   }
 
 
   .text-nav {
   .text-nav {
-    background-color: #ffff00;
     position: absolute;
     position: absolute;
     top: 40px;
     top: 40px;
-    left: 32%;
+    left: 28%;
     font-size: 60px;
     font-size: 60px;
     font-weight: 600;
     font-weight: 600;
     // background: #73bf8f;
     // background: #73bf8f;
     // border-radius: 4px;
     // border-radius: 4px;
-    color: #ff0000;
-    padding: 36px 50px;
+    color: #000000;
   }
   }
 </style>
 </style>