Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
9e9aa1ec
Commit
9e9aa1ec
authored
Aug 01, 2019
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed shareholder structure -- frank
parent
a38a84c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
89 deletions
+0
-89
organization-full-chart.ctrl.js
...ure/organizationFullChart/organization-full-chart.ctrl.js
+0
-89
No files found.
atms-web/src/main/webapp/app/admin/infrastructure/organizationFullChart/organization-full-chart.ctrl.js
View file @
9e9aa1ec
...
...
@@ -31,15 +31,6 @@ infrastructureModule.controller('organizationFullChartController', ['$scope', '$
nodeBinding
:
{
field_0
:
"name"
},
// nodes: [
// {id: 5, pid: 4, name: "Subsidary1", percent: "100%"},
// {id: 6, pid: 4, name: "Subsidary2", percent: "100%"},
// {id: 1, name: "Shareholder1", percent: "100%", spids: []},
// {id: 2, name: "Shareholder2", percent: "100%"},
// {id: 3, name: "Shareholder3", percent: "100%"},
// {id: 4, pid: 1, spids: [2, 3], name: "Comapny", percent: ""}
//
// ],
nodes
:
nodesCotent
,
onExportStart
:
exportStart
,
onClick
:
click
,
...
...
@@ -130,86 +121,6 @@ infrastructureModule.controller('organizationFullChartController', ['$scope', '$
}
$
(
linkSelector
+
">g>text"
).
text
(
percent
+
"%"
);
}
// nodesCotentValue = [
// {id: 5, pid: 4, name: "Subsidary1", percent: "100%"},
// {id: 6, pid: 4, name: "Subsidary2", percent: "100%"},
// {id: 1, name: "Shareholder1", percent: "100%", spids: []},
// {id: 2, name: "Shareholder2", percent: "100%"},
// {id: 3, name: "Shareholder3", percent: "100%"},
// {id: 4, pid: 1, spids: [2, 3], name: "Comapny", percent: ""}
// ];
// middleNode = {id: 4, pid: 1, spids: [2, 3], name: "Comapny", percent: "100%"};
// if (middleNode && middleNode.id > 0) {
// //check if there are more than 1 sub node,need change x coordinate
// var subNodes = _.filter(nodesCotentValue, function (item) {
// return item.id > middleNode.id;
// });
//
// var beforeNodes = _.filter(nodesCotentValue, function (item) {
// return item.id < middleNode.id;
// });
// var haveMoreThanOneNode = false;
// if (subNodes.length > 1) {
// haveMoreThanOneNode = true;
// }
//
// var y = beforeNodes.length > 0 && subNodes.length > 0 ? 346 : 166;
// for (var iii = 0; iii < subNodes.length; iii++) {
// var value = 80 + 220 * iii;
// var nodeSelector = "svg>g[link-id='[" + middleNode.id + "][" + subNodes[iii].id + "]']";
// $(nodeSelector + ">g").attr("transform", "matrix(1,0,0,1," + value + "," + y + ") rotate(0)");
// $(nodeSelector + ">g>text").text(subNodes[iii].percent + "%");
// }
//
// var middleNodeSelector = "svg>g[node-id=" + middleNode.id + "]>rect";
// var polygon = makeSVG('polygon', {"points": '100,0 0,100 200,100', style: "fill:#ffff;stroke:#000;stroke-width:1", height: 115, width: 250});
// $(middleNodeSelector).css("fill", "transparent").css("stroke-width", 0).after(polygon);
//
// var node = _.find(nodesCotentValue, function (item) {
// return item.id === 1;
// });
// var linkSelector = "svg>g[link-id='[1][" + middleNode.id + "]']";
// var linkXValue = 80;
// if (haveMoreThanOneNode) {
// linkXValue = linkXValue + 110;
// }
//
// $(linkSelector + ">g").attr("transform", "matrix(1,0,0,1," + linkXValue + ",166) rotate(0)");
// var linkSelectorG = linkSelector + ">g";
// var linkSelectorGText = linkSelectorG + ">text";
// $(linkSelectorGText).text(node.percent + "%");
// if (middleNode.id > 2) {
// var count = 0;
// for (var i = 2; i < middleNode.id; i++) {
// var subNode = _.find(nodesCotentValue, function (item) {
// return item.id === i;
// });
// var nodeSelector = "svg>g[second-link-id='[" + middleNode.id + "][" + i + "]']";
// var value = 0;
// var value2 = 0;
// if (haveMoreThanOneNode) {
// value = 320 + 110 + 220 * count;
// value2 = 100 + 110;
// } else {
// value = 320 + 220 * count;
// value2 = 100;
// }
// $(nodeSelector + ">path").attr("stroke", "#000");
// $(nodeSelector + ">path").attr("d", "M" + value2 + ",180 L" + value2 + ",160 L" + value + ",160 L" + value + ",102");
// count++;
// var val2 = value - 20;
// var rateG = makeSVG('g', {"transform": "matrix(1,0,0,1," + val2 + ",128) rotate(0)"});
// $(nodeSelector + ">path").after(rateG);
// var nodeSelectorG = nodeSelector + ">g";
// var rateText = makeSVG('text', {"text-anchor": "middle", "fill": "#aeaeae", "width": "290", "x": "0", "y": "0", "style": "font-size:10px"});
// $(nodeSelectorG).append(rateText);
// var nodeSelectorGText = nodeSelectorG + ">text";
// $(nodeSelectorGText).text(subNode.percent + "%");
// }
// }
// }
};
var
makeSVG
=
function
(
tag
,
attrs
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment