|
@@ -180,7 +180,7 @@
|
|
|
},
|
|
|
option: {
|
|
|
title: {
|
|
|
- text: '集团应急管理体系'
|
|
|
+ text: '典型事故应急"四步"管控体系'
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
@@ -302,7 +302,7 @@
|
|
|
},
|
|
|
layout: {
|
|
|
type: 'mindmap',
|
|
|
- direction: 'TB',
|
|
|
+ direction: 'H',
|
|
|
getHeight: function getHeight() {
|
|
|
return 16;
|
|
|
},
|
|
@@ -313,7 +313,7 @@
|
|
|
return 20;
|
|
|
},
|
|
|
getHGap: function getHGap() {
|
|
|
- return 130;
|
|
|
+ return 120;
|
|
|
},
|
|
|
},
|
|
|
modes: {
|
|
@@ -333,14 +333,14 @@
|
|
|
},
|
|
|
// plugins: [menu],
|
|
|
fitView: true,
|
|
|
- fitViewPadding: [140,40,20,40],
|
|
|
+ fitViewPadding: 80,
|
|
|
});
|
|
|
// graph.data(vm.chart.option.series[0].data[0]);
|
|
|
// gragh.render();
|
|
|
graph.read({
|
|
|
...vm.chart.option.series[0].data[0]
|
|
|
});
|
|
|
- graph.fitView([140,40,20,40]);
|
|
|
+ graph.fitView(80);
|
|
|
this.graph = graph;
|
|
|
this.bindEvents();
|
|
|
},
|
|
@@ -376,7 +376,7 @@
|
|
|
model.collapsed = !model.collapsed;
|
|
|
this.graph.updateItem(e.item, model);
|
|
|
this.graph.layout();
|
|
|
- this.graph.fitView([140,40,20,40]);
|
|
|
+ this.graph.fitView(80);;
|
|
|
} else {
|
|
|
if (model.value) {
|
|
|
let args = {
|
|
@@ -398,7 +398,7 @@
|
|
|
// 查找所有的节点路径
|
|
|
this.getParentNodes(this.chart.option.series[0].data[0], model.id);
|
|
|
this.graph.changeData(JSON.parse(JSON.stringify(model)));
|
|
|
- this.graph.fitView([140,40,20,40]);
|
|
|
+ this.graph.fitView(80);
|
|
|
}
|
|
|
}
|
|
|
e.item.toFront();
|
|
@@ -467,9 +467,8 @@
|
|
|
} else {
|
|
|
// this.chart.option.title.text = node.label;
|
|
|
}
|
|
|
- node.collapsed = false;
|
|
|
this.graph.changeData(JSON.parse(JSON.stringify(node)));
|
|
|
- this.graph.fitView([140,40,20,40]);
|
|
|
+ this.graph.fitView(80);;
|
|
|
},
|
|
|
getFileTreeData() {
|
|
|
let that = this,
|
|
@@ -487,14 +486,15 @@
|
|
|
if (res.code === '0') {
|
|
|
let arr = [];
|
|
|
// 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[0].style = {
|
|
|
- fill: '#f79646'
|
|
|
+ arr[0].labelCfg = {
|
|
|
+ style: {
|
|
|
+ fontSize: 30,
|
|
|
+ },
|
|
|
};
|
|
|
arr[0].id = '1';
|
|
|
- arr[0].collapsed = false;
|
|
|
+ arr[0].collapsed = false,
|
|
|
that.chart.option.series[0].data = arr;
|
|
|
// that.setGraphical();
|
|
|
that.createGraphic();
|
|
@@ -516,27 +516,6 @@
|
|
|
let j = 0;
|
|
|
let g = 0;
|
|
|
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) {
|
|
|
i++;
|
|
|
if (item.fileName === null) {
|
|
@@ -554,8 +533,6 @@
|
|
|
nodeType: 'node',
|
|
|
label: item.createMan,
|
|
|
children: children,
|
|
|
- style: style,
|
|
|
- labelCfg: labelCfg,
|
|
|
});
|
|
|
children = [];
|
|
|
} else {
|
|
@@ -573,8 +550,6 @@
|
|
|
isCollapsed: true,
|
|
|
label: name,
|
|
|
children: children1,
|
|
|
- style: style,
|
|
|
- labelCfg: labelCfg,
|
|
|
});
|
|
|
j = 0;
|
|
|
children1 = [];
|
|
@@ -600,8 +575,6 @@
|
|
|
isCollapsed: true,
|
|
|
label: name,
|
|
|
children: children1,
|
|
|
- style: style,
|
|
|
- labelCfg: labelCfg,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -751,87 +724,13 @@
|
|
|
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>
|
|
|
|
|
|
<style lang="scss">
|
|
|
.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%;
|
|
|
}
|
|
|
|
|
@@ -881,15 +780,13 @@
|
|
|
}
|
|
|
|
|
|
.text-nav {
|
|
|
- background-color: #ffff00;
|
|
|
position: absolute;
|
|
|
top: 40px;
|
|
|
- left: 32%;
|
|
|
+ left: 28%;
|
|
|
font-size: 60px;
|
|
|
font-weight: 600;
|
|
|
// background: #73bf8f;
|
|
|
// border-radius: 4px;
|
|
|
- color: #ff0000;
|
|
|
- padding: 36px 50px;
|
|
|
+ color: #000000;
|
|
|
}
|
|
|
</style>
|